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 {
// baseURL: 'https://huorantech.cn/',
baseURL: 'http://192.168.31.217:10010/',
// baseURL: '124.71.79.122/',
// baseURL: 'http://192.168.31.217:10010/',
baseURL: 'http://124.71.79.122/',
headers: {
'Content-Type': 'application/json;charset=UTF-8'
},

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

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

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

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

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

@ -2,19 +2,19 @@
<view class="page">
<view class="block">
<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 v-if="isPreschool" class="block">
<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 class="block">
<view class="form-list">
<view class="line with-arrow">
<view class="name">{{ platformName }}名称</view>
<input type="text" :placeholder="'请输入' + platformName + '名称'" v-model="form.comapnyName" />
<view class="name">{{ isPreschool ? '幼儿园' : '企业' }}名称</view>
<input type="text" :placeholder="'请输入' + platformName + '名称'" v-model="form.companyName" />
<uni-icons type="right" size="18" color="#ababab"></uni-icons>
</view>
<view class="line with-arrow">
@ -43,12 +43,13 @@
data() {
return {
form: {
comapnyName: '',
companyName: '',
creditCode: '',
legalPerson: '',
},
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: {
@ -71,20 +72,21 @@
uni.chooseImage({
success: (res) => {
const file = res.tempFilePaths[0];
OSS(file, async (name) => {
that.businessLicense = name
const { data } = await businessLicensePictureVerification(name)
OSS(file, async ({ url }) => {
that.businessLicensePicture = url
const { data } = await businessLicensePictureVerification(url)
if (data) {
that.form = {
comapnyName: data.name,
companyName: data.name,
creditCode: data.reg_num,
legalPerson: data.person,
address: data.address,
business: data.business,
capital: data.capital,
establish_date: data.establish_date,
establishDate: data.establish_date,
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
uni.chooseImage({
success: (res) => {
const file = res.tempFilePaths[0];
OSS(file, async (name) => {
that.reverseOfIDCard = name
that.licenseForRunningSchool = name
})
}
});
},
submit() {
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.legalPerson) return this.$util.errMsg('请输入法人!')
creditCodeAuthentication(form).then(res => {
creditCodeAuthentication({
...form,
businessLicensePicture: this.businessLicensePicture,
licenseForRunningSchool: this.licenseForRunningSchool,
}).then(res => {
this.$util.sucMsg('认证成功!')
setTimeout(() => {
uni.switchTab({

@ -1,13 +1,10 @@
<template>
<view>
<view class="page">
<view class="block">
<view class="form-list edit-form">
<view class="line with-arrow">
<view class="name">LOGO</view>
<view @click="uploadLogo">
<image class="avatar" :src="logo"></image>
<uni-icons type="right" size="18" color="#ababab"></uni-icons>
</view>
<image class="avatar" :src="logo" @click="uploadLogo"></image>
</view>
<view class="line with-arrow">
<view class="name">幼儿园名称</view>
@ -23,25 +20,44 @@
<view class="name">幼儿园slogan</view>
<textarea placeholder="请输入幼儿园slogan"></textarea>
</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="name">地址</view>
<textarea placeholder="请输入地址"></textarea>
</view>
<view class="line textarea-line">
<view class="line textarea-line no-bd">
<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>
</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 class="block info">
<view class="title">联系我们</view>
<view class="line">地址测试测试</view>
<view class="line">联系电话测试测试</view>
<image class="qrcode" src="@/static/image/info-bg.jpg"></image>
<view class="block">
<view class="form-list edit-form">
<view class="line textarea-line">
<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 class="btn-wrap">
@ -52,15 +68,25 @@
<script>
import { my } from '@/apis/modules/parner.js'
import { queryProvince, queryCity, updateAvatars, getUserRolesPermissionMenu } from '@/apis/modules/user.js'
import OSS from '@/libs/Oss/upload'
export default {
data() {
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() {
// this.getInfo()
this.getProvince()
},
methods: {
//
@ -73,14 +99,53 @@
this.info = my.info
}).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
uploadLogo() {
const that = this
uni.chooseImage({
success: (res) => {
const file = res.tempFilePaths[0];
OSS(file, (name) => {
that.logo = name
OSS(file, ({ url }) => {
that.logo = url
})
}
});
@ -99,6 +164,10 @@
</script>
<style scoped lang="scss">
.page {
padding-bottom: 170rpx;
-webkit-overflow-scrolling: touch;
}
.avatar {
width: 80rpx;
height: 80rpx;

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