调整分享,创建资料等bug
This commit is contained in:
@@ -1,20 +1,37 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class="content">
|
||||
<block v-if="!eSign">
|
||||
<!-- 上传身份证 -->
|
||||
<view class="identity-title">请拍摄并上传你的身份证照片</view>
|
||||
<view class="identity-flex">
|
||||
<view class="identity-item" @click="updImg('frontCard')">
|
||||
<view class="upd" style="background-image: url('/static/imgs/card_front.png');">
|
||||
<image v-if="frontCard.showpath != ''" :src="frontCard.showpath" class="idcardImg-img" mode="aspectFit"></image>
|
||||
<view class="identity-from">
|
||||
<view class="identity-title">请拍摄并上传你的身份证照片</view>
|
||||
<view class="identity-flex">
|
||||
<view class="identity-item" @click="updImg('frontCard')">
|
||||
<view class="upd" style="background-image: url('/static/imgs/card_front.png');">
|
||||
<image v-if="frontCard.showpath != ''" :src="frontCard.showpath" class="idcardImg-img" mode="aspectFit"></image>
|
||||
</view>
|
||||
<view class="text">拍摄正面</view>
|
||||
</view>
|
||||
<view class="identity-item" @click="updImg('backCard')">
|
||||
<view class="upd" style="background-image: url('/static/imgs/card_verso.png');">
|
||||
<image v-if="backCard.showpath != ''" :src="backCard.showpath" class="idcardImg-img" mode="aspectFit"></image>
|
||||
</view>
|
||||
<view class="text">拍摄反面</view>
|
||||
</view>
|
||||
<view class="text">拍摄正面</view>
|
||||
</view>
|
||||
<view class="identity-item" @click="updImg('backCard')">
|
||||
<view class="upd" style="background-image: url('/static/imgs/card_verso.png');">
|
||||
<image v-if="backCard.showpath != ''" :src="backCard.showpath" class="idcardImg-img" mode="aspectFit"></image>
|
||||
</view>
|
||||
<view class="text">拍摄反面</view>
|
||||
</view>
|
||||
<view class="identity-from">
|
||||
<!-- 经营省份 -->
|
||||
<view class="identity-inpus" v-if="provinces.length > 0">
|
||||
<label>经营省份</label>
|
||||
<picker class="city-picker" :value="provincesVal" :range="provinces" range-key="name" @change="onPickerChange($event, 'provincesVal')">
|
||||
<view class="city-picker-text">{{provinces[provincesVal].name}}<uni-icons class="city-icon" type="bottom" color="gray"></uni-icons></view>
|
||||
</picker>
|
||||
</view>
|
||||
<view class="identity-inpus" v-if="citys.length > 0">
|
||||
<label>经营城市</label>
|
||||
<picker class="city-picker" :value="citysVal" :range="citys" range-key="name" @change="onPickerChange($event, 'citysVal')">
|
||||
<view class="city-picker-text">{{citys[citysVal].name}}<uni-icons class="city-icon" type="bottom" color="gray"></uni-icons></view>
|
||||
</picker>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
@@ -33,6 +50,14 @@
|
||||
<input type="idcard" placeholder="-" v-model="realData.organ" disabled>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 经营地址 -->
|
||||
<view class="identity-from" v-if="eSign">
|
||||
<view class="identity-inpus">
|
||||
<label>经营城市</label>
|
||||
<view class="identity-inpus-text">{{province}} {{city}}</view>
|
||||
<!-- <input type="text" placeholder="-" v-model="city" disabled> -->
|
||||
</view>
|
||||
</view>
|
||||
<!-- 按钮 -->
|
||||
<view class="btn" v-if="!eSign">
|
||||
<button size="default" @click="idCard && !isPathChange ? getSignUrl(): realInfo()">{{idCard && !isPathChange ? '人脸认证': '提交身份信息'}}</button>
|
||||
@@ -41,7 +66,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { certification, identityOcr, certified, eSigns } from '@/apis/interfaces/user'
|
||||
import { certification, identityOcr, certified, eSigns, getRegion } from '@/apis/interfaces/user'
|
||||
import { uploads } from '@/apis/interfaces/uploading'
|
||||
export default {
|
||||
data() {
|
||||
@@ -57,7 +82,14 @@
|
||||
organ : ''
|
||||
}, // 个人信息
|
||||
signUrl : '',
|
||||
isRefresh : false
|
||||
isRefresh : false,
|
||||
province : '',
|
||||
city : '',
|
||||
// 省市区选择
|
||||
provinces : [],
|
||||
provincesVal: 0,
|
||||
citys : [],
|
||||
citysVal : 0
|
||||
}
|
||||
},
|
||||
onShow(){
|
||||
@@ -67,7 +99,16 @@
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getCertified()
|
||||
getRegion().then(res => {
|
||||
this.provinces = res
|
||||
this.getCity()
|
||||
this.getCertified()
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
icon : 'none'
|
||||
})
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
// 检查实名结果
|
||||
@@ -92,6 +133,36 @@
|
||||
})
|
||||
})
|
||||
},
|
||||
// 选择省市
|
||||
onPickerChange(e, key){
|
||||
let index = e.detail.value
|
||||
this[key] = index
|
||||
this.isPathChange = true
|
||||
if(key === 'provincesVal'){
|
||||
this.getCity()
|
||||
}
|
||||
},
|
||||
// 获取城市
|
||||
getCity(id){
|
||||
uni.showLoading({
|
||||
title: '获取城市',
|
||||
mask : true
|
||||
})
|
||||
getRegion(this.provinces[this.provincesVal].id).then(res => {
|
||||
this.citys = res
|
||||
if(id){
|
||||
this.citysVal = this.citys.findIndex(val => val.id === id)
|
||||
}else{
|
||||
this.citysVal = 0
|
||||
}
|
||||
uni.hideLoading()
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
icon : 'none'
|
||||
})
|
||||
})
|
||||
},
|
||||
// 提交真实信息
|
||||
getInfo(){
|
||||
uni.showLoading({
|
||||
@@ -107,6 +178,14 @@
|
||||
showpath: res.back_card,
|
||||
path : res.back_card_path
|
||||
}
|
||||
if(res.province.id != 0){
|
||||
this.province = res.province.name
|
||||
this.provincesVal = this.provinces.findIndex(val => val.id === res.province.id)
|
||||
}
|
||||
if(res.city.id != 0){
|
||||
this.getCity(res.city.id)
|
||||
this.city = res.city.name
|
||||
}
|
||||
this.realData = res;
|
||||
uni.hideLoading()
|
||||
}).catch(err => {
|
||||
@@ -123,13 +202,16 @@
|
||||
title: '提交中信息...',
|
||||
mask : true
|
||||
})
|
||||
certification({
|
||||
certification({
|
||||
province_id: this.provinces[this.provincesVal].id,
|
||||
city_id: this.citys[this.citysVal].id,
|
||||
front_card: this.frontCard.path,
|
||||
back_card : this.backCard.path,
|
||||
redirect_url: 'http://web.douhuofalv.com/app/e-sign?sign_type=personal',
|
||||
app_scheme: 'doufire://'
|
||||
}).then(res => {
|
||||
let certificationData = res;
|
||||
this.idCard = true
|
||||
this.isPathChange = false
|
||||
this.realData = certificationData.certification
|
||||
this.signUrl = certificationData.sign.authShortUrl
|
||||
@@ -180,7 +262,6 @@
|
||||
url: res.authShortUrl
|
||||
}
|
||||
})
|
||||
// plus.runtime.openURL(res.authShortUrl)
|
||||
uni.hideLoading()
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
@@ -219,7 +300,8 @@
|
||||
<style lang="scss" scoped>
|
||||
// 身份信息
|
||||
.identity-from{
|
||||
border-bottom: 30rpx solid #f8f8f8;
|
||||
border-top: 30rpx solid #f8f8f8;
|
||||
background-color: white;
|
||||
.identity-inpus{
|
||||
display: flex;
|
||||
border-bottom: solid 1rpx #F6F6F6;
|
||||
@@ -240,6 +322,23 @@
|
||||
width: calc(100% - 180rpx);
|
||||
text-align: right;
|
||||
}
|
||||
.identity-inpus-text{
|
||||
font-size: 32rpx;
|
||||
width: calc(100% - 180rpx);
|
||||
text-align: right;
|
||||
}
|
||||
.city-picker{
|
||||
width: calc(100% - 180rpx);
|
||||
.city-picker-text{
|
||||
padding-right: 50rpx;
|
||||
position: relative;
|
||||
text-align: right;
|
||||
.city-icon{
|
||||
position: absolute;
|
||||
right: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// 身份证上传
|
||||
@@ -247,11 +346,10 @@
|
||||
padding: 0 30rpx;
|
||||
line-height: 90rpx;
|
||||
font-size: 30rpx;
|
||||
color: #111111;
|
||||
border-top: 30rpx solid #f8f8f8;
|
||||
color: gray;
|
||||
}
|
||||
.identity-flex{
|
||||
background: white;
|
||||
display: flex;
|
||||
padding: 0 20rpx 30rpx;
|
||||
.identity-item{
|
||||
@@ -282,7 +380,6 @@
|
||||
font-size: 28rpx;
|
||||
}
|
||||
}
|
||||
border-bottom: 30rpx solid #f8f8f8;
|
||||
}
|
||||
// 身份认证按钮
|
||||
.btn{
|
||||
|
||||
Reference in New Issue
Block a user