个人认证
This commit is contained in:
@@ -9,7 +9,7 @@ import store from '@/store'
|
|||||||
|
|
||||||
// 基础配置
|
// 基础配置
|
||||||
const config = {
|
const config = {
|
||||||
apiUrl : 'https://e-chain.cnskl.com/api/',
|
apiUrl : 'http://api.ahxh.shangkelian.cn/api/',
|
||||||
timeout : 60000
|
timeout : 60000
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
21
apis/interfaces/certification.js
Normal file
21
apis/interfaces/certification.js
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
/**
|
||||||
|
* Web唐明明
|
||||||
|
* 匆匆数载恍如梦,岁月迢迢华发增。
|
||||||
|
* 碌碌无为枉半生,一朝惊醒万事空。
|
||||||
|
* moduleName: 认证
|
||||||
|
*/
|
||||||
|
|
||||||
|
import { request } from '../index'
|
||||||
|
|
||||||
|
// 个人认证
|
||||||
|
const personal = (data) => {
|
||||||
|
return request({
|
||||||
|
url: 'user/certification',
|
||||||
|
method: 'POST',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export {
|
||||||
|
personal
|
||||||
|
}
|
||||||
11
pages.json
11
pages.json
@@ -54,7 +54,7 @@
|
|||||||
"path": "pages/coupons/management",
|
"path": "pages/coupons/management",
|
||||||
"name": "couponsManagement",
|
"name": "couponsManagement",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText":"创建优惠券"
|
"navigationBarTitleText":"优惠券管理"
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
"path": "pages/coupons/add",
|
"path": "pages/coupons/add",
|
||||||
@@ -66,7 +66,7 @@
|
|||||||
"path": "pages/coupons/magDetails",
|
"path": "pages/coupons/magDetails",
|
||||||
"name": "couponsDetails",
|
"name": "couponsDetails",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText":"优惠券管理"
|
"navigationBarTitleText":"优惠券详情"
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
"path": "pages/coupons/selectGoods",
|
"path": "pages/coupons/selectGoods",
|
||||||
@@ -80,6 +80,13 @@
|
|||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText":"登录"
|
"navigationBarTitleText":"登录"
|
||||||
}
|
}
|
||||||
|
}, {
|
||||||
|
"path" : "pages/certification/personal",
|
||||||
|
"name" : "Personal",
|
||||||
|
"auth" : true,
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText":"个人认证"
|
||||||
|
}
|
||||||
}],
|
}],
|
||||||
"globalStyle": {
|
"globalStyle": {
|
||||||
"navigationStyle": "custom",
|
"navigationStyle": "custom",
|
||||||
|
|||||||
@@ -1,9 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<view>
|
<view>
|
||||||
<!-- 副标题 -->
|
|
||||||
<view class="sub-title">
|
|
||||||
<text>请正确填写你的个人身份信息</text>
|
|
||||||
</view>
|
|
||||||
<!-- 填写姓名 -->
|
<!-- 填写姓名 -->
|
||||||
<view class="password">
|
<view class="password">
|
||||||
<view class="group">
|
<view class="group">
|
||||||
@@ -24,7 +20,7 @@
|
|||||||
<text>上传身份证正面</text>
|
<text>上传身份证正面</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="idcard-block positive">
|
<view class="idcard-block positive">
|
||||||
<image :src="positive" mode="aspectFit" @click="upload('positive')"/>
|
<image :src="positive.showpath" mode="aspectFit" @click="upload('positive')"/>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="idcard-item">
|
<view class="idcard-item">
|
||||||
@@ -32,7 +28,7 @@
|
|||||||
<text>上传身份证背面</text>
|
<text>上传身份证背面</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="idcard-block reverse">
|
<view class="idcard-block reverse">
|
||||||
<image :src="reverse" mode="aspectFit" @click="upload('reverse')" />
|
<image :src="reverse.showpath" mode="aspectFit" @click="upload('reverse')"></image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -44,19 +40,22 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
// import uploading from '@/apis/oss'
|
|
||||||
import { personal } from '@/apis/interfaces/certification'
|
import { personal } from '@/apis/interfaces/certification'
|
||||||
|
import { uploads } from '@/apis/interfaces/uploading'
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
positive: '',
|
positive: {
|
||||||
reverse: '',
|
showpath: '',
|
||||||
|
path: ''
|
||||||
|
},
|
||||||
|
reverse : {
|
||||||
|
showpath: '',
|
||||||
|
path: ''
|
||||||
|
},
|
||||||
nikcName: '',
|
nikcName: '',
|
||||||
idcardNo: ''
|
idcardNo: ''
|
||||||
}
|
}
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 创建钱包
|
// 创建钱包
|
||||||
@@ -70,27 +69,13 @@
|
|||||||
}
|
}
|
||||||
personal({
|
personal({
|
||||||
name: this.nikcName,
|
name: this.nikcName,
|
||||||
id_card: this.idcardNo
|
id_card: this.idcardNo,
|
||||||
|
front_card: this.positive.path,
|
||||||
|
back_card: this.reverse.path,
|
||||||
}).then(res=>{
|
}).then(res=>{
|
||||||
uni.showModal({
|
console.log(res)
|
||||||
title: '提示',
|
|
||||||
content: '您的身份认证已完成,是否立即激活钱包~',
|
|
||||||
confirmText: '立即激活',
|
|
||||||
confirmColor: '#009B69',
|
|
||||||
cancelColor: '#666666',
|
|
||||||
cancelText: '稍后激活',
|
|
||||||
success: res=> {
|
|
||||||
if(res.confirm) {
|
|
||||||
uni.redirectTo({
|
|
||||||
url: '../wallet/mnemonic'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
if(res.cancel) {
|
|
||||||
uni.navigateBack()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
|
console.log(err)
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
title: err.message
|
title: err.message
|
||||||
@@ -98,19 +83,18 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 上传身份证
|
// 上传身份证
|
||||||
upload(type){
|
upload(key){
|
||||||
uni.chooseImage({
|
uni.chooseImage({
|
||||||
success(files){
|
count: 1,
|
||||||
uni.showToast({
|
success: files=> {
|
||||||
icon: 'none',
|
uploads([{
|
||||||
title: '暂未开放'
|
uri: files.tempFilePaths[0]
|
||||||
|
}]).then(res => {
|
||||||
|
this[key] = {
|
||||||
|
showpath: res.url[0],
|
||||||
|
path: res.path[0]
|
||||||
|
}
|
||||||
})
|
})
|
||||||
// let filesArr = files.tempFilePaths.map(val => {
|
|
||||||
// return {
|
|
||||||
// uri: val
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
// uploading(filesArr)
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -129,26 +113,28 @@
|
|||||||
// 上传证件
|
// 上传证件
|
||||||
.idcard-flex{
|
.idcard-flex{
|
||||||
display: flex;
|
display: flex;
|
||||||
padding: ($padding*2) $padding 0;
|
margin-top: $margin - 10;
|
||||||
|
background: white;
|
||||||
|
padding: $padding $padding/2;
|
||||||
.idcard-item{
|
.idcard-item{
|
||||||
margin: 0 $margin;
|
margin: 0 $margin/2;
|
||||||
width: calc(50% - #{$margin * 2});
|
width: calc(50% - #{$margin});
|
||||||
.idcard-title{
|
.idcard-title{
|
||||||
text-align: center;
|
text-align: center;
|
||||||
color: $text-gray;
|
color: $text-gray;
|
||||||
font-size: $title-size-m;
|
font-size: $title-size-sm;
|
||||||
padding-bottom: $padding;
|
padding-bottom: $padding;
|
||||||
}
|
}
|
||||||
.idcard-block{
|
.idcard-block{
|
||||||
position: relative;
|
position: relative;
|
||||||
border-radius: $radius-m;
|
border:solid 1rpx $border-color-lg;
|
||||||
box-shadow: 0 0 4rpx 4rpx rgba($color: $text-color, $alpha: .02);
|
|
||||||
background-color: white;
|
background-color: white;
|
||||||
padding-top: 63%;
|
padding-top: 63%;
|
||||||
background-position: center;
|
background-position: center;
|
||||||
background-size: 36%;
|
background-size: 36%;
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
box-sizing: border-box;
|
||||||
&.positive{
|
&.positive{
|
||||||
background-image: url(../../static/background/idcard-positive.png);
|
background-image: url(../../static/background/idcard-positive.png);
|
||||||
}
|
}
|
||||||
@@ -161,62 +147,66 @@
|
|||||||
left: 0;
|
left: 0;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
z-index: 1;
|
z-index: 2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 身份信息
|
// 身份信息
|
||||||
.password{
|
.password{
|
||||||
padding: 0 $padding * 2;
|
|
||||||
.prompt{
|
.prompt{
|
||||||
margin-top: $margin * 2;
|
margin-top: $margin * 2;
|
||||||
font-size: $title-size-m;
|
font-size: $title-size-m;
|
||||||
color: $mian-color;
|
color: $mian-color;
|
||||||
}
|
}
|
||||||
.group{
|
.group{
|
||||||
margin-top: $margin;
|
|
||||||
border-radius: $radius-m;
|
|
||||||
box-shadow: 0 0 4rpx 4rpx rgba($color: $text-color, $alpha: .02);
|
|
||||||
background-color: white;
|
background-color: white;
|
||||||
.inputs{
|
.inputs{
|
||||||
padding: $padding $padding + 10;
|
position: relative;
|
||||||
border-bottom: solid 1rpx $border-color;
|
height: 90rpx;
|
||||||
&:last-child{
|
padding-left: 220rpx;
|
||||||
border-bottom: none;
|
padding-right: $padding;
|
||||||
|
&::before{
|
||||||
|
position: absolute;
|
||||||
|
left: $margin;
|
||||||
|
bottom: 0;
|
||||||
|
right: 0;
|
||||||
|
height: 1rpx;
|
||||||
|
background: $border-color;
|
||||||
|
content: " ";
|
||||||
|
}
|
||||||
|
&:last-child::before{
|
||||||
|
display: none;
|
||||||
}
|
}
|
||||||
label{
|
label{
|
||||||
|
position: absolute;
|
||||||
|
left: $margin;
|
||||||
|
height: 90rpx;
|
||||||
|
line-height: 90rpx;
|
||||||
color: $text-gray;
|
color: $text-gray;
|
||||||
font-size: $title-size-m;
|
font-size: $title-size-lg;
|
||||||
}
|
}
|
||||||
input{
|
input{
|
||||||
height: 70rpx;
|
height: 90rpx;
|
||||||
line-height: 70rpx;
|
line-height: 90rpx;
|
||||||
font-size: $title-size;
|
font-size: $title-size-lg;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 按钮
|
// 按钮
|
||||||
.buttons{
|
.buttons{
|
||||||
padding: $padding * 2;
|
padding: $padding;
|
||||||
.text{
|
|
||||||
text-align: center;
|
|
||||||
line-height: 90rpx;
|
|
||||||
height: 90rpx;
|
|
||||||
margin-bottom: $margin * 2;
|
|
||||||
font-size: $title-size-lg;
|
|
||||||
color: $mian-color;
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
button{
|
button{
|
||||||
height: 90rpx;
|
height: 90rpx;
|
||||||
line-height: 90rpx;
|
line-height: 90rpx;
|
||||||
background-color: $mian-color;
|
background-color: $mian-color-deep;
|
||||||
border-radius: $radius-lg;
|
border-radius: 0;
|
||||||
color: white;
|
color: white;
|
||||||
font-weight: bold;
|
font-size: $title-size-lg;
|
||||||
font-size: $title-size;
|
&::after{
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -274,11 +274,7 @@
|
|||||||
break
|
break
|
||||||
case 2:
|
case 2:
|
||||||
content = {
|
content = {
|
||||||
image: [{
|
image: []
|
||||||
showpath: '',
|
|
||||||
path : '',
|
|
||||||
title : ''
|
|
||||||
}]
|
|
||||||
}
|
}
|
||||||
break
|
break
|
||||||
case 3:
|
case 3:
|
||||||
@@ -440,6 +436,7 @@
|
|||||||
font-size: $title-size;
|
font-size: $title-size;
|
||||||
line-height: 50rpx;
|
line-height: 50rpx;
|
||||||
height: 200rpx;
|
height: 200rpx;
|
||||||
|
|
||||||
}
|
}
|
||||||
.module-imgs{
|
.module-imgs{
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
@@ -3,10 +3,11 @@
|
|||||||
<view class="btns">
|
<view class="btns">
|
||||||
<view class="item" @click="$Router.push({name: 'instrumentBasics'})">基础信息</view>
|
<view class="item" @click="$Router.push({name: 'instrumentBasics'})">基础信息</view>
|
||||||
<view class="item" @click="$Router.push({name: 'goodsManagement'})">商品权证</view>
|
<view class="item" @click="$Router.push({name: 'goodsManagement'})">商品权证</view>
|
||||||
<view class="item" @click="$Router.push({name: 'instrumentBasics'})">优惠券管理</view>
|
<view class="item" @click="$Router.push({name: 'couponsManagement'})">优惠券管理</view>
|
||||||
<view class="item" @click="$Router.push({name: 'instrumentBasics'})">店员管理</view>
|
<view class="item" @click="$Router.push({name: 'instrumentBasics'})">店员管理</view>
|
||||||
<view class="item" @click="$Router.push({name: 'instrumentCustomer'})">成交客户</view>
|
<view class="item" @click="$Router.push({name: 'instrumentCustomer'})">成交客户</view>
|
||||||
<view class="item" @click="$Router.push({name: 'instrumentBasics'})">店员管理</view>
|
<view class="item" @click="$Router.push({name: 'Personal'})">个人认证</view>
|
||||||
|
<view class="item" @click="$Router.push({name: 'instrumentBasics'})">企业认证</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
Reference in New Issue
Block a user