171 lines
4.8 KiB
Vue
171 lines
4.8 KiB
Vue
<template>
|
|
<view class="content">
|
|
<HeaderTop page_title='认证'></HeaderTop>
|
|
<!-- <view class="b_header bg-linear-gradient x-text-white d-flex j-sb a-center padding-zy30" style="height:144upx; line-height: 184upx; padding-top:46upx;">
|
|
<image src="../../static/my/left.png" mode="" class="goback" @click="before()" style="height:30upx; width:18upx;"></image>
|
|
<view class="" style="font-size: 32upx;">认证</view>
|
|
<view v-if="is_edit ? false : true" class="" style="font-size: 32upx;" @click="edit()">修改</view>
|
|
<view v-if="is_edit ? true : false" class="" style="font-size: 32upx;" @click="edit()">取消</view>
|
|
</view> -->
|
|
<view class="progress bg-linear-gradient w-100">
|
|
<uni-steps :options="[{title: '基本信息'}, {title: '资质图片'}, {title: '税务信息'}]" :active=list_index active-color='#FFFFFF'></uni-steps>
|
|
</view>
|
|
<!-- 占位 -->
|
|
<!-- <view class="place"></view> -->
|
|
<!-- 认证界面 -->
|
|
<view class="list">
|
|
<view class="mt-3 scope" v-for="(item,index) of subTypeInfo" :key='index'>
|
|
<view class="d-flex padding-zy30">
|
|
<text class="text-danger ml-2 mr-1" v-if="item.required">*</text>
|
|
<card :headTitle="item.name" :headBorderBottom="false"></card>
|
|
</view>
|
|
|
|
<view class="tui-box-upload d-flex w-100 padding-zy30" style="display: inline-block;">
|
|
<tui-upload :limit="1" :fileKey="item.value" :value="item.path" :fileKeyName="'app'" @complete="result" @remove="remove" style="display: inline-block; float: left;height:200upx; width:300upx;"></tui-upload>
|
|
<view v-if="item.required && item.image" style="float: right;">
|
|
<image :src="item.image" mode="" class="eg_img" style="" @tap='look_img(item.image)'></image>
|
|
</view>
|
|
</view>
|
|
<!-- <view v-if="item.required && item.image">
|
|
<image :src="item.image" mode="" class="eg_img" style=""></image>
|
|
</view> -->
|
|
</view>
|
|
</view>
|
|
|
|
|
|
<view class="x_public_box x-text-white x-bg-159 margin-shu20 editBtn w-90" style="line-height: 80upx;" @click="next()">下一步</view>
|
|
<!-- 按钮 -->
|
|
<!-- <view class="d-flex bottom-0 right-0 w-100 " >
|
|
<view class="flex-1 main-bg-color text-white font-md py-2 text-center btn3"
|
|
hover-class="main-bg-hover-color" @click="before()">上一步</view>
|
|
<view class="flex-1 bg-danger text-white font-md py-2 text-center btn3"
|
|
hover-class="main-bg-hover-color" @click="next()">{{is_edit ? '立即提交':'下一页'}}</view>
|
|
</view> -->
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
import authentication from '../../utils/models/auth.js'
|
|
import tuiUpload from '@/components/tui-upload/tui-upload'
|
|
import tui from '@/components/tui-upload/tui'
|
|
import PublicTop from '../../components/HeaderTop/PublicTop.vue'
|
|
import card from "@/components/common/card_.vue"
|
|
import HeaderTop from '../../components/HeaderTop/HeaderTop.vue'
|
|
export default {
|
|
components: {
|
|
PublicTop,
|
|
card,
|
|
tuiUpload,
|
|
tui,
|
|
HeaderTop
|
|
},
|
|
data() {
|
|
return {
|
|
list_index:1,
|
|
is_show:true,
|
|
business_license:[],//资质url
|
|
sub_type:'', //企业类型
|
|
imageData: [],
|
|
showRigth: false,
|
|
subTypeInfo:[]
|
|
}
|
|
},
|
|
onLoad(option) {
|
|
|
|
},
|
|
methods: {
|
|
// 查看图片
|
|
look_img(path){
|
|
let arr = []
|
|
arr.push(path)
|
|
if (!path) return;
|
|
uni.previewImage({
|
|
loop: true,
|
|
urls: arr
|
|
})
|
|
},
|
|
result: function(e) {
|
|
this.is_show = false
|
|
if(e.status == 1){
|
|
this.subTypeInfo.forEach(item => {
|
|
if(item.value == e.key ){
|
|
item.path[0] = e.pathArr[0]
|
|
return
|
|
}
|
|
})
|
|
}
|
|
// console.log(this.subTypeInfo)
|
|
},
|
|
remove: function(e) {
|
|
//移除图片
|
|
this.subTypeInfo.forEach(item => {
|
|
if(item.value == e.key ){
|
|
item.path = []
|
|
return
|
|
}
|
|
})
|
|
},
|
|
async viewCertificate() {
|
|
let data = await authentication.viewCertificate()
|
|
this.subTypeInfo = data.data
|
|
this.handleError(data, res => {
|
|
|
|
})
|
|
},
|
|
async next() {
|
|
let parames = {
|
|
sub_type:this.sub_type,
|
|
role_type:'buyer'
|
|
}
|
|
for (let i = 0; i < this.subTypeInfo.length; i++) {
|
|
if(this.subTypeInfo[i].path){
|
|
parames[this.subTypeInfo[i].value] = this.subTypeInfo[i].path[0]
|
|
}
|
|
}
|
|
let data = await authentication.authCertificate(parames)
|
|
uni.navigateTo({
|
|
url: '../auth/bank'
|
|
})
|
|
this.handleError(data, res => {
|
|
})
|
|
},
|
|
},
|
|
onShow() {
|
|
if(this.is_show){
|
|
this.viewCertificate()
|
|
}
|
|
},
|
|
created() {
|
|
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss">
|
|
.content{
|
|
background-color:#F2F2F2;
|
|
.b_header {
|
|
padding-top: 60upx;
|
|
width: 100%;
|
|
z-index: 1000;
|
|
font-size: 32upx;
|
|
}
|
|
}
|
|
.progress{
|
|
color:#FFFFFF;
|
|
padding-top: 30px;
|
|
height:200upx;
|
|
|
|
}
|
|
.eg_img{
|
|
height: 200upx;
|
|
/* width:150upx; */
|
|
width: 300upx;
|
|
margin-bottom:20upx;
|
|
}
|
|
.list{
|
|
height:calc(100% - 240upx);
|
|
overflow-y: auto;
|
|
}
|
|
</style>
|