节点中心

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

View File

@@ -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,24 +69,17 @@
} }
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({ uni.showModal({
title: '提示', title: '提示',
content: '您的身份认证已完成,是否立即激活钱包~', content: '个人认证信息已提交,请耐心等待审核',
confirmText: '立即激活', showCancel: false,
confirmColor: '#009B69', confirmColor: '#8b64fd',
cancelColor: '#666666', success: modalRes => {
cancelText: '稍后激活', this.$Router.back()
success: res=> {
if(res.confirm) {
uni.redirectTo({
url: '../wallet/mnemonic'
})
}
if(res.cancel) {
uni.navigateBack()
}
} }
}) })
}).catch(err => { }).catch(err => {
@@ -98,19 +90,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 +120,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 +154,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>

View File

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

View File

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

View File

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

View File

@@ -226,11 +226,19 @@
<!-- <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>
<<<<<<< HEAD
<view class="item" @click="$Router.push({name: 'instrumentBasics'})">店员管理</view> <view class="item" @click="$Router.push({name: 'instrumentBasics'})">店员管理</view>
</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> </view>
</template> </template>

View File

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