yujialong 12 months ago
parent 9a33def7de
commit 32b22e17e2
  1. 4
      config/request.js
  2. 9
      libs/Oss/upload.js
  3. 8
      pages.json
  4. 2
      pages/login/login.vue
  5. 4
      pages/person/person.vue
  6. 15
      styles/common.scss
  7. 38
      team/auth/auth.vue
  8. 103
      team/infoEdit/infoEdit.vue
  9. 8
      team/personAuth/personAuth.vue
  10. 57
      team/rePersonAuth/rePersonAuth.vue

@ -6,8 +6,8 @@
export default { export default {
// baseURL: 'https://huorantech.cn/', // baseURL: 'https://huorantech.cn/',
baseURL: 'http://192.168.31.217:10010/', // baseURL: 'http://192.168.31.217:10010/',
// baseURL: '124.71.79.122/', baseURL: 'http://124.71.79.122/',
headers: { headers: {
'Content-Type': 'application/json;charset=UTF-8' 'Content-Type': 'application/json;charset=UTF-8'
}, },

@ -41,7 +41,8 @@ var OSS={
policyBase64:config.policyBase64, policyBase64:config.policyBase64,
} }
export default function(tempFilePaths, callback) { export default function(tempFilePaths, callback) {
const fileName = Date.now() + '.' + Util.getFileExt(tempFilePaths) const ext = Util.getFileExt(tempFilePaths)
const fileName = Date.now() + '.' + ext
uni.uploadFile({ uni.uploadFile({
   url: OSS.host,    url: OSS.host,
   filePath: tempFilePaths,    filePath: tempFilePaths,
@ -56,7 +57,11 @@ export default function(tempFilePaths, callback) {
signature: OSS.signature, // 输入你获取的的signature signature: OSS.signature, // 输入你获取的的signature
}, },
success: (res) => { success: (res) => {
callback(OSS.host + '/' + fileName) callback({
name: fileName,
url: OSS.host + '/' + fileName,
ext
})
}, },
fail: (res) => { fail: (res) => {
console.log(res); console.log(res);

@ -161,6 +161,14 @@
"navigationBarTitleText" : "实名认证", "navigationBarTitleText" : "实名认证",
"enablePullDownRefresh" : false "enablePullDownRefresh" : false
} }
},
{
"path" : "rePersonAuth/rePersonAuth",
"style" :
{
"navigationBarTitleText" : "实名认证",
"enablePullDownRefresh" : false
}
} }
] ]
} }

@ -124,6 +124,7 @@
const e = data.sessionKey const e = data.sessionKey
uni.setStorageSync('token', data.token) uni.setStorageSync('token', data.token)
uni.setStorageSync('platformId', data.platformId) uni.setStorageSync('platformId', data.platformId)
uni.setStorageSync('openId', e.openid)
this.toIndex() this.toIndex()
} }
}).catch(e => { }).catch(e => {
@ -204,6 +205,7 @@
}) })
uni.setStorageSync('token', data.token) uni.setStorageSync('token', data.token)
uni.setStorageSync('platformId', platformId) uni.setStorageSync('platformId', platformId)
uni.setStorageSync('openId', data.sessionKey.openid)
this.toIndex() this.toIndex()
}, },
toAgreement(id) { toAgreement(id) {

@ -193,7 +193,9 @@
}, },
}, },
onShow() { onShow() {
// #ifdef MP-WEIXIN
this.headerTop = uni.getMenuButtonBoundingClientRect().top + 8 + 'px' this.headerTop = uni.getMenuButtonBoundingClientRect().top + 8 + 'px'
// #endif
this.per = true this.per = true
this.getAuthOrNot() this.getAuthOrNot()
this.platformId === 7 || this.getTeams() this.platformId === 7 || this.getTeams()
@ -287,7 +289,7 @@
}, },
// //
toAuth() { toAuth() {
this.isAuth || this.toPage('/team/personAuth/personAuth') this.toPage(this.isAuth ? '/team/rePersonAuth/rePersonAuth' : '/team/personAuth/personAuth')
}, },
// //
tips() { tips() {

@ -6,7 +6,7 @@ button[type=primary] {
} }
page { page {
height: 100%; height: 100%;
background-color: #f5f5f5; background-color: #f5f6f9;
} }
ul { ul {
padding-left: 0; padding-left: 0;
@ -94,10 +94,13 @@ ul {
align-items: center; align-items: center;
padding: 28rpx 0; padding: 28rpx 0;
border-bottom: 1px solid #E6E8ED; border-bottom: 1px solid #E6E8ED;
&:last-child { &:last-child, &.no-bd {
border-bottom: 0; border-bottom: 0;
} }
} }
.py {
padding: 28rpx 0;
}
.ph { .ph {
font-size: 28rpx; font-size: 28rpx;
color: #999; color: #999;
@ -119,7 +122,7 @@ ul {
} }
.val { .val {
font-size: 26rpx; font-size: 26rpx;
color: #a9a9a9; color: #232323;
} }
input, textarea { input, textarea {
flex: 1; flex: 1;
@ -132,6 +135,12 @@ ul {
textarea { textarea {
height: 150rpx; height: 150rpx;
} }
.mul-right {
flex: 1;
textarea {
width: 100%;
}
}
.req { .req {
.name:after { .name:after {
content: '*'; content: '*';

@ -2,19 +2,19 @@
<view class="page"> <view class="page">
<view class="block"> <view class="block">
<view class="title">上传营业执照</view> <view class="title">上传营业执照</view>
<image class="credential" :src="businessLicense" mode="widthFix" @click="uploadBusinessLicense"></image> <image class="credential" :src="businessLicensePicture" mode="widthFix" @click="uploadBusinessLicense"></image>
</view> </view>
<view v-if="isPreschool" class="block"> <view v-if="isPreschool" class="block">
<view class="title">上传办学许可证</view> <view class="title">上传办学许可证</view>
<image class="credential" src="https://occupationlab.com/images/preschoolEdu/credentials2.png" mode="widthFix"></image> <image class="credential" :src="licenseForRunningSchool" mode="widthFix" @click="uploadSchoolLicense"></image>
</view> </view>
<view class="block"> <view class="block">
<view class="form-list"> <view class="form-list">
<view class="line with-arrow"> <view class="line with-arrow">
<view class="name">{{ platformName }}名称</view> <view class="name">{{ isPreschool ? '幼儿园' : '企业' }}名称</view>
<input type="text" :placeholder="'请输入' + platformName + '名称'" v-model="form.comapnyName" /> <input type="text" :placeholder="'请输入' + platformName + '名称'" v-model="form.companyName" />
<uni-icons type="right" size="18" color="#ababab"></uni-icons> <uni-icons type="right" size="18" color="#ababab"></uni-icons>
</view> </view>
<view class="line with-arrow"> <view class="line with-arrow">
@ -43,12 +43,13 @@
data() { data() {
return { return {
form: { form: {
comapnyName: '', companyName: '',
creditCode: '', creditCode: '',
legalPerson: '', legalPerson: '',
}, },
platformId: uni.getStorageSync('platformId'), platformId: uni.getStorageSync('platformId'),
businessLicense: 'https://occupationlab.com/images/preschoolEdu/credentials1.png' businessLicensePicture: 'https://occupationlab.com/images/preschoolEdu/credentials1.png',
licenseForRunningSchool: 'https://occupationlab.com/images/preschoolEdu/credentials2.png'
} }
}, },
computed: { computed: {
@ -71,20 +72,21 @@
uni.chooseImage({ uni.chooseImage({
success: (res) => { success: (res) => {
const file = res.tempFilePaths[0]; const file = res.tempFilePaths[0];
OSS(file, async (name) => { OSS(file, async ({ url }) => {
that.businessLicense = name that.businessLicensePicture = url
const { data } = await businessLicensePictureVerification(name) const { data } = await businessLicensePictureVerification(url)
if (data) { if (data) {
that.form = { that.form = {
comapnyName: data.name, companyName: data.name,
creditCode: data.reg_num, creditCode: data.reg_num,
legalPerson: data.person, legalPerson: data.person,
address: data.address, address: data.address,
business: data.business, business: data.business,
capital: data.capital, capital: data.capital,
establish_date: data.establish_date, establishDate: data.establish_date,
type: data.type, type: data.type,
valid_period: data.valid_period, validPeriod: data.valid_period,
platformsOurce: uni.getStorageSync('platformId'),
} }
} }
}) })
@ -92,23 +94,27 @@
}); });
}, },
// //
uploadBack() { uploadSchoolLicense() {
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, async (name) => { OSS(file, async (name) => {
that.reverseOfIDCard = name that.licenseForRunningSchool = name
}) })
} }
}); });
}, },
submit() { submit() {
const { form } = this const { form } = this
if (!form.comapnyName) return this.$util.errMsg(`请输入${platformName}名称!`) if (!form.companyName) return this.$util.errMsg(`请输入${platformName}名称!`)
if (!form.creditCode) return this.$util.errMsg('请输入统一社会信用代码!') if (!form.creditCode) return this.$util.errMsg('请输入统一社会信用代码!')
if (!form.legalPerson) return this.$util.errMsg('请输入法人!') if (!form.legalPerson) return this.$util.errMsg('请输入法人!')
creditCodeAuthentication(form).then(res => { creditCodeAuthentication({
...form,
businessLicensePicture: this.businessLicensePicture,
licenseForRunningSchool: this.licenseForRunningSchool,
}).then(res => {
this.$util.sucMsg('认证成功!') this.$util.sucMsg('认证成功!')
setTimeout(() => { setTimeout(() => {
uni.switchTab({ uni.switchTab({

@ -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;

@ -46,6 +46,7 @@
export default { export default {
data() { data() {
return { return {
openId: uni.getStorageSync('openId'),
form: { form: {
userName: '', userName: '',
idCardNo: '', idCardNo: '',
@ -77,10 +78,10 @@
uni.chooseImage({ uni.chooseImage({
success: (res) => { success: (res) => {
const file = res.tempFilePaths[0]; const file = res.tempFilePaths[0];
OSS(file, async (name) => { OSS(file, async ({ url }) => {
that.theFrontOfIDCard = name that.theFrontOfIDCard = url
const { data } = await faceAuthentication({ const { data } = await faceAuthentication({
imgFile: name, imgFile: url,
side: 'face' side: 'face'
}) })
if (data) { if (data) {
@ -127,6 +128,7 @@
reverseOfIdCard: this.reverseOfIDCard, reverseOfIdCard: this.reverseOfIDCard,
sex: frontData.sex, sex: frontData.sex,
startDate: backData.start_date, startDate: backData.start_date,
openId: this.openId
}).then(res => { }).then(res => {
this.$util.sucMsg('认证成功!') this.$util.sucMsg('认证成功!')
setTimeout(() => { setTimeout(() => {

@ -0,0 +1,57 @@
<template>
<view>
<view class="block">
<view class="form-list">
<view class="line">
<view class="name">真实姓名</view>
<view class="val">{{ info.realName }}</view>
</view>
<view class="line">
<view class="name">证件类型</view>
<view class="val">身份证</view>
</view>
<view class="line">
<view class="name">身份证号码</view>
<view class="val">{{ info.idCardNo }}</view>
</view>
</view>
</view>
<view class="btn-wrap">
<view class="btn" @click="toAuth">重新认证</view>
</view>
</view>
</template>
<script>
import { authenticationOrNot } from '@/apis/modules/user.js'
export default {
data() {
return {
info: {
realName: '',
idCardNo: '',
}
}
},
onShow() {
this.getInfo()
},
methods: {
async getInfo() {
const res = await authenticationOrNot()
if (res.authenticationInformation) {
this.info = res.authenticationInformation
}
},
//
toAuth() {
this.$util.to('/team/personAuth/personAuth')
}
}
}
</script>
<style scoped lang="scss">
</style>
Loading…
Cancel
Save