|
|
@ -1,13 +1,10 @@ |
|
|
|
<template> |
|
|
|
<template> |
|
|
|
<view> |
|
|
|
<view class="page"> |
|
|
|
<view class="block"> |
|
|
|
<view class="block"> |
|
|
|
<view class="form-list edit-form"> |
|
|
|
<view class="form-list edit-form"> |
|
|
|
<view class="line with-arrow"> |
|
|
|
<view class="line with-arrow"> |
|
|
|
<view class="name">LOGO</view> |
|
|
|
<view class="name">LOGO</view> |
|
|
|
<view @click="uploadLogo"> |
|
|
|
<image class="avatar" :src="logo" @click="uploadLogo"></image> |
|
|
|
<image class="avatar" :src="logo"></image> |
|
|
|
|
|
|
|
<uni-icons type="right" size="18" color="#ababab"></uni-icons> |
|
|
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="line with-arrow"> |
|
|
|
<view class="line with-arrow"> |
|
|
|
<view class="name">幼儿园名称</view> |
|
|
|
<view class="name">幼儿园名称</view> |
|
|
@ -23,25 +20,44 @@ |
|
|
|
<view class="name">幼儿园slogan</view> |
|
|
|
<view class="name">幼儿园slogan</view> |
|
|
|
<textarea placeholder="请输入幼儿园slogan"></textarea> |
|
|
|
<textarea placeholder="请输入幼儿园slogan"></textarea> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="line with-arrow"> |
|
|
|
|
|
|
|
<view class="name">省份</view> |
|
|
|
|
|
|
|
<view class="inline"> |
|
|
|
|
|
|
|
<text v-if="disabled" class="name">{{ provinceName }}</text> |
|
|
|
|
|
|
|
<uni-data-picker v-else class="picker-input" :clear-icon="false" :readonly="disabled" placeholder="请选择省份" popup-title="请选择省份" preload :localdata="provinces" :map="{text: 'provinceName', value: 'provinceId'}" v-model="provinceId" @change="getCity"></uni-data-picker> |
|
|
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
<uni-icons type="right" size="18" color="#ababab"></uni-icons> |
|
|
|
|
|
|
|
</view> |
|
|
|
<view class="line textarea-line"> |
|
|
|
<view class="line textarea-line"> |
|
|
|
<view class="name">地址</view> |
|
|
|
<view class="name">地址</view> |
|
|
|
<textarea placeholder="请输入地址"></textarea> |
|
|
|
<textarea placeholder="请输入地址"></textarea> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="line textarea-line"> |
|
|
|
<view class="line textarea-line no-bd"> |
|
|
|
<view class="name">幼儿园简介</view> |
|
|
|
<view class="name">幼儿园简介</view> |
|
|
|
<!-- <editor id="editor" class="ql-container" placeholder="请输入幼儿园简介" show-img-size show-img-toolbar |
|
|
|
|
|
|
|
show-img-resize @ready="onEditorReady"> |
|
|
|
|
|
|
|
</editor> --> |
|
|
|
|
|
|
|
<textarea placeholder="请输入幼儿园简介"></textarea> |
|
|
|
<textarea placeholder="请输入幼儿园简介"></textarea> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="py"> |
|
|
|
|
|
|
|
<uni-file-picker v-model="desPics" limit="3" title="最多选择3张图片" :auto-upload="false" @select="select" ></uni-file-picker> |
|
|
|
|
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
<view class="block info"> |
|
|
|
|
|
|
|
<view class="title">联系我们</view> |
|
|
|
<view class="block"> |
|
|
|
<view class="line">地址:测试测试</view> |
|
|
|
<view class="form-list edit-form"> |
|
|
|
<view class="line">联系电话:测试测试</view> |
|
|
|
<view class="line textarea-line"> |
|
|
|
<image class="qrcode" src="@/static/image/info-bg.jpg"></image> |
|
|
|
<view class="name">地址</view> |
|
|
|
|
|
|
|
<textarea placeholder="请输入地址"></textarea> |
|
|
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="line with-arrow"> |
|
|
|
|
|
|
|
<view class="name">联系电话</view> |
|
|
|
|
|
|
|
<input type="text" placeholder="请输入联系电话" /> |
|
|
|
|
|
|
|
<uni-icons type="right" size="18" color="#ababab"></uni-icons> |
|
|
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="py"> |
|
|
|
|
|
|
|
<uni-file-picker v-model="desPics" limit="3" title="请上传二维码,最多选择3张图片" :auto-upload="false" @select="select" ></uni-file-picker> |
|
|
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
<view class="btn-wrap"> |
|
|
|
<view class="btn-wrap"> |
|
|
@ -52,15 +68,25 @@ |
|
|
|
|
|
|
|
|
|
|
|
<script> |
|
|
|
<script> |
|
|
|
import { my } from '@/apis/modules/parner.js' |
|
|
|
import { my } from '@/apis/modules/parner.js' |
|
|
|
|
|
|
|
import { queryProvince, queryCity, updateAvatars, getUserRolesPermissionMenu } from '@/apis/modules/user.js' |
|
|
|
import OSS from '@/libs/Oss/upload' |
|
|
|
import OSS from '@/libs/Oss/upload' |
|
|
|
export default { |
|
|
|
export default { |
|
|
|
data() { |
|
|
|
data() { |
|
|
|
return { |
|
|
|
return { |
|
|
|
logo: 'https://cube.elemecdn.com/3/7c/3ea6beec64369c2642b92c6726f1epng.png' |
|
|
|
logo: 'https://cube.elemecdn.com/3/7c/3ea6beec64369c2642b92c6726f1epng.png', |
|
|
|
|
|
|
|
disabled: true, |
|
|
|
|
|
|
|
provinces: [], |
|
|
|
|
|
|
|
cities: [], |
|
|
|
|
|
|
|
provinceId: '', |
|
|
|
|
|
|
|
cityId: '', |
|
|
|
|
|
|
|
provinceName: '', |
|
|
|
|
|
|
|
cityName: '', |
|
|
|
|
|
|
|
desPics: [] |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
onShow() { |
|
|
|
onShow() { |
|
|
|
// this.getInfo() |
|
|
|
// this.getInfo() |
|
|
|
|
|
|
|
this.getProvince() |
|
|
|
}, |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
methods: { |
|
|
|
// 获取个人信息 |
|
|
|
// 获取个人信息 |
|
|
@ -73,14 +99,53 @@ |
|
|
|
this.info = my.info |
|
|
|
this.info = my.info |
|
|
|
}).catch(e => {}) |
|
|
|
}).catch(e => {}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
// 获取省份 |
|
|
|
|
|
|
|
getProvince() { |
|
|
|
|
|
|
|
queryProvince().then(({ list }) => { |
|
|
|
|
|
|
|
if (this.disabled) { |
|
|
|
|
|
|
|
const { provinceId } = this |
|
|
|
|
|
|
|
if (provinceId) this.provinceName = list.find(e => e.provinceId == provinceId).provinceName |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
this.provinces = list |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}).catch(res => {}) |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
// 获取城市 |
|
|
|
|
|
|
|
getCity(val) { |
|
|
|
|
|
|
|
if (this.provinceId) { |
|
|
|
|
|
|
|
queryCity({ |
|
|
|
|
|
|
|
provinceId: this.provinceId |
|
|
|
|
|
|
|
}).then(({ list }) => { |
|
|
|
|
|
|
|
if (this.disabled) { |
|
|
|
|
|
|
|
const { cityId } = this |
|
|
|
|
|
|
|
if (cityId) this.cityName = list.find(e => e.cityId == cityId).cityName |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
this.cities = list |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}).catch(res => {}) |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
this.cities = [] |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (val) this.cityId = '' |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
select(e){ |
|
|
|
|
|
|
|
console.log('选择文件:',e) |
|
|
|
|
|
|
|
OSS(e.tempFilePaths[0], (res) => { |
|
|
|
|
|
|
|
this.desPics.push({ |
|
|
|
|
|
|
|
name: res.name, |
|
|
|
|
|
|
|
extname: res.ext, |
|
|
|
|
|
|
|
url: res.url, |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
}, |
|
|
|
// 上传logo |
|
|
|
// 上传logo |
|
|
|
uploadLogo() { |
|
|
|
uploadLogo() { |
|
|
|
const that = this |
|
|
|
const that = this |
|
|
|
uni.chooseImage({ |
|
|
|
uni.chooseImage({ |
|
|
|
success: (res) => { |
|
|
|
success: (res) => { |
|
|
|
const file = res.tempFilePaths[0]; |
|
|
|
const file = res.tempFilePaths[0]; |
|
|
|
OSS(file, (name) => { |
|
|
|
OSS(file, ({ url }) => { |
|
|
|
that.logo = name |
|
|
|
that.logo = url |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
@ -99,6 +164,10 @@ |
|
|
|
</script> |
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
|
|
<style scoped lang="scss"> |
|
|
|
<style scoped lang="scss"> |
|
|
|
|
|
|
|
.page { |
|
|
|
|
|
|
|
padding-bottom: 170rpx; |
|
|
|
|
|
|
|
-webkit-overflow-scrolling: touch; |
|
|
|
|
|
|
|
} |
|
|
|
.avatar { |
|
|
|
.avatar { |
|
|
|
width: 80rpx; |
|
|
|
width: 80rpx; |
|
|
|
height: 80rpx; |
|
|
|
height: 80rpx; |
|
|
|