节点中心

This commit is contained in:
zhangmanman
2021-09-25 09:52:10 +08:00
8 changed files with 144 additions and 100 deletions

View 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
}

View File

@@ -87,7 +87,7 @@
"path": "pages/coupons/magDetails",
"name": "couponsDetails",
"style": {
"navigationBarTitleText": "优惠券管理"
"navigationBarTitleText": "优惠券详情"
}
}, {
"path": "pages/coupons/selectGoods",
@@ -101,6 +101,13 @@
"style": {
"navigationBarTitleText": "登录"
}
}, {
"path": "pages/certification/personal",
"name": "Personal",
"auth": true,
"style": {
"navigationBarTitleText": "个人认证"
}
}, {
"path": "pages/setting/setting",
"name": "setting",
@@ -115,6 +122,13 @@
"style": {
"navigationBarTitleText": "关于我们"
}
}, {
"path": "pages/company/approve",
"name": "companyApprove",
"auth": true,
"style": {
"navigationBarTitleText": "企业认证"
}
}],
"globalStyle": {
"navigationStyle": "custom",

View File

@@ -1,9 +1,5 @@
<template>
<view>
<!-- 副标题 -->
<view class="sub-title">
<text>请正确填写你的个人身份信息</text>
</view>
<!-- 填写姓名 -->
<view class="password">
<view class="group">
@@ -24,7 +20,7 @@
<text>上传身份证正面</text>
</view>
<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 class="idcard-item">
@@ -32,7 +28,7 @@
<text>上传身份证背面</text>
</view>
<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>
@@ -44,19 +40,22 @@
</template>
<script>
// import uploading from '@/apis/oss'
import { personal } from '@/apis/interfaces/certification'
import { uploads } from '@/apis/interfaces/uploading'
export default {
data() {
return {
positive: '',
reverse: '',
positive: {
showpath: '',
path: ''
},
reverse : {
showpath: '',
path: ''
},
nikcName: '',
idcardNo: ''
}
},
mounted() {
},
methods: {
// 创建钱包
@@ -70,24 +69,17 @@
}
personal({
name: this.nikcName,
id_card: this.idcardNo
id_card: this.idcardNo,
front_card: this.positive.path,
back_card: this.reverse.path,
}).then(res=>{
uni.showModal({
title: '提示',
content: '您的身份认证已完成,是否立即激活钱包~',
confirmText: '立即激活',
confirmColor: '#009B69',
cancelColor: '#666666',
cancelText: '稍后激活',
success: res=> {
if(res.confirm) {
uni.redirectTo({
url: '../wallet/mnemonic'
})
}
if(res.cancel) {
uni.navigateBack()
}
content: '个人认证信息已提交,请耐心等待审核',
showCancel: false,
confirmColor: '#8b64fd',
success: modalRes => {
this.$Router.back()
}
})
}).catch(err => {
@@ -98,19 +90,18 @@
})
},
// 上传身份证
upload(type){
upload(key){
uni.chooseImage({
success(files){
uni.showToast({
icon: 'none',
title: '暂未开放'
count: 1,
success: files=> {
uploads([{
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 +120,28 @@
// 上传证件
.idcard-flex{
display: flex;
padding: ($padding*2) $padding 0;
margin-top: $margin - 10;
background: white;
padding: $padding $padding/2;
.idcard-item{
margin: 0 $margin;
width: calc(50% - #{$margin * 2});
margin: 0 $margin/2;
width: calc(50% - #{$margin});
.idcard-title{
text-align: center;
color: $text-gray;
font-size: $title-size-m;
font-size: $title-size-sm;
padding-bottom: $padding;
}
.idcard-block{
position: relative;
border-radius: $radius-m;
box-shadow: 0 0 4rpx 4rpx rgba($color: $text-color, $alpha: .02);
border:solid 1rpx $border-color-lg;
background-color: white;
padding-top: 63%;
background-position: center;
background-size: 36%;
background-repeat: no-repeat;
overflow: hidden;
box-sizing: border-box;
&.positive{
background-image: url(../../static/background/idcard-positive.png);
}
@@ -161,62 +154,66 @@
left: 0;
height: 100%;
width: 100%;
z-index: 1;
z-index: 2;
}
}
}
}
// 身份信息
.password{
padding: 0 $padding * 2;
.prompt{
margin-top: $margin * 2;
font-size: $title-size-m;
color: $mian-color;
}
.group{
margin-top: $margin;
border-radius: $radius-m;
box-shadow: 0 0 4rpx 4rpx rgba($color: $text-color, $alpha: .02);
background-color: white;
.inputs{
padding: $padding $padding + 10;
border-bottom: solid 1rpx $border-color;
&:last-child{
border-bottom: none;
position: relative;
height: 90rpx;
padding-left: 220rpx;
padding-right: $padding;
&::before{
position: absolute;
left: $margin;
bottom: 0;
right: 0;
height: 1rpx;
background: $border-color;
content: " ";
}
&:last-child::before{
display: none;
}
label{
position: absolute;
left: $margin;
height: 90rpx;
line-height: 90rpx;
color: $text-gray;
font-size: $title-size-m;
font-size: $title-size-lg;
}
input{
height: 70rpx;
line-height: 70rpx;
font-size: $title-size;
height: 90rpx;
line-height: 90rpx;
font-size: $title-size-lg;
}
}
}
}
// 按钮
.buttons{
padding: $padding * 2;
.text{
text-align: center;
line-height: 90rpx;
height: 90rpx;
margin-bottom: $margin * 2;
font-size: $title-size-lg;
color: $mian-color;
font-weight: bold;
}
padding: $padding;
button{
height: 90rpx;
line-height: 90rpx;
background-color: $mian-color;
border-radius: $radius-lg;
background-color: $mian-color-deep;
border-radius: 0;
color: white;
font-weight: bold;
font-size: $title-size;
font-size: $title-size-lg;
&::after{
border: none;
}
}
}
</style>

View File

@@ -97,13 +97,13 @@
};
},
created(){
console.log(this.$Route)
// 读取配置信息
appliesCreate().then(res=>{
console.log(res)
this.industry = res.industries
this.formType = this.$Route.query.formType
this.name = res.info.name
this.industryIndex = res.industries.findIndex(val => val.industry_id === res.info.industry.industry_id) || 0
this.industry = res
this.formType = this.$Route.query.form_type
if(this.formType === 'put'){
appliesInfo().then(formValue => {
for(let val of formValue.categories){
@@ -111,12 +111,14 @@
this.categorys.push(val.category_id)
}
}
this.category = formValue.categories
this.corporate = formValue.certification.name
this.identity = formValue.certification.idcard
this.org = formValue.certification.code
this.logo = formValue.cover
this.license = formValue.certification.license
this.name = formValue.name
this.industryIndex = this.industry.findIndex(val=> val.industry_id === formValue.industry.industry_id)
this.category = formValue.categories
this.corporate = formValue.certification.name
this.identity = formValue.certification.idcard
this.org = formValue.certification.code
this.logo = formValue.cover
this.license = formValue.certification.license
}).catch(valueErr => {
uni.showToast({
title: valueErr.message,
@@ -124,7 +126,7 @@
})
})
}else{
this.category = res.info.categories
this.getAppliesCategory(res[0].industry_id)
}
}).catch(err =>{
uni.showToast({
@@ -181,8 +183,13 @@
// 选择器
changePicker(e){
this.industryIndex = e.detail.value
this.getAppliesCategory(this.industry[e.detail.value].industry_id)
},
// 获取经营类目
getAppliesCategory(id){
appliesCategory({
industry: this.industry[e.detail.value].industry_id,
industry: id,
}).then(res => {
this.category = res
}).catch(err => {
@@ -222,8 +229,7 @@
// 内容
.content{
.header{
height: 15vh;
padding-bottom: $padding * 2;
padding: $padding * 2 0;
box-sizing: border-box;
@extend .vertical;
.title{
@@ -281,7 +287,7 @@
}
}
.logo{
min-height: 98rpx;
height: $padding + 98;
padding-bottom: $padding;
.logo-cover{
position: absolute;
@@ -301,13 +307,12 @@
.btns{
padding-top: $padding * 2;
button{
background: $text-price;
background: $mian-color-deep;
border-radius: 0;
height: 90rpx;
line-height: 90rpx;
font-size: $title-size;
color: white;
font-weight: bold;
&::after{
border: none;
}
@@ -335,20 +340,19 @@
@extend .nowrap;
&.show{
color: white;
background-color: $text-price;
background-color: $mian-color-deep;
}
}
}
.btns{
padding-top: $padding * 2;
button{
background: $text-price;
background: $mian-color-deep;
border-radius: 0;
height: 90rpx;
line-height: 90rpx;
font-size: $title-size;
color: white;
font-weight: bold;
&::after{
border: none;
}

View File

@@ -274,11 +274,7 @@
break
case 2:
content = {
image: [{
showpath: '',
path : '',
title : ''
}]
image: []
}
break
case 3:
@@ -440,6 +436,7 @@
font-size: $title-size;
line-height: 50rpx;
height: 200rpx;
}
.module-imgs{
display: flex;

View File

@@ -57,7 +57,7 @@
this.$store.commit('setToken', res.token_type + ' ' + res.access_token)
if (!res.is_company) {
this.$Router.replace({
name: "Registered"
name: "Index"
})
return
}

View File

@@ -226,11 +226,19 @@
<!-- <view class="btns">
<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: '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: 'instrumentCustomer'})">成交客户</view>
<<<<<<< HEAD
<view class="item" @click="$Router.push({name: 'instrumentBasics'})">店员管理</view>
</view> -->
=======
<view class="item" @click="$Router.push({name: 'Personal'})">个人认证</view>
<view class="item" @click="$Router.push({name: 'companyApprove'})">企业认证</view>
<view class="item" @click="$Router.push({name: 'companyApprove', params: { form_type: 'put' }})">编辑企业认证</view>
<view class="item" @click="$Router.push({name: 'setting'})">设置中心</view>
</view>
>>>>>>> f02c1a75b3aa4cfdc5fdeec121af5e6a38f46834
</view>
</template>

View File

@@ -14,6 +14,9 @@ import store from '../store/index'
// })
const router = createRouter({
h5: {
paramsToQuery: true
},
platform: process.env.VUE_APP_PLATFORM,
routes: [...ROUTES]
})