137 lines
4.5 KiB
Vue
137 lines
4.5 KiB
Vue
<template>
|
|
<view class="content w-100 h-100">
|
|
<HeaderTop page_title='认证'></HeaderTop>
|
|
<view class=" list">
|
|
<view class="padding-30 x-bg-white d-flex j-sb">
|
|
<view class="d-flex">
|
|
<view class="font-weight font_28">当前企业信息</view>
|
|
<!-- <view class="margin-zy20 bg_F2F2F2" style="border-radius: 50upx; padding:2upx 14upx;">未认证</view> -->
|
|
<!-- <view class="margin-zy20 x-text-white" style="border-radius: 50upx; padding:2upx 14upx; background-color: #edca4a;">待审核</view>
|
|
<view class="margin-zy20 x-text-white" style="border-radius: 50upx; padding:2upx 14upx; background-color: #008be6;">已认证</view> -->
|
|
|
|
|
|
<view v-if="authStatus != 'auditing' && authStatus != 'waiting' && authStatus != 'finish'" class="margin-zy20 bg_F2F2F2" style="border-radius: 50upx; padding:2upx 14upx;">未认证</view>
|
|
<view v-if="authStatus == 'waiting'" class="margin-zy20 x-text-white" style="border-radius: 50upx; padding:2upx 14upx;background-color: #FF0000;">未通过</view>
|
|
<view v-if="authStatus == 'auditing'" class="margin-zy20 x-text-white" style="border-radius: 50upx; padding:2upx 14upx; background-color: #edca4a;">待审核</view>
|
|
<view v-if="authStatus == 'finish'" class="margin-zy20 x-text-white" style="border-radius: 50upx; padding:2upx 14upx; background-color: #008be6;">已认证</view>
|
|
</view>
|
|
<view v-if="authStatus != 'auditing' && authStatus != 'waiting' && authStatus != 'finish'" class="x-text-159 text-right lookAll" @tap='to_auth()'>去认证</view>
|
|
<view v-if="authStatus == 'waiting' || authStatus == 'finish'" class="x-text-159 text-right lookAll" @tap='to_auth()'>重新认证</view>
|
|
</view>
|
|
<view class="line bg_F2F2F2 w-100" style="height:10upx;" v-if="authStatus == 'auditing' || authStatus == 'waiting' || authStatus == 'finish'"></view>
|
|
<view class="x-bg-white padding-30" v-if="authStatus == 'auditing' || authStatus == 'waiting'|| authStatus == 'finish'">
|
|
|
|
<view class="d-flex">
|
|
<view>企业名称</view>
|
|
|
|
<view class="margin-zy20">{{info.name}}</view>
|
|
</view>
|
|
<view class="d-flex">
|
|
<view>企业地址</view>
|
|
<view class="margin-zy20">{{regionsName}} {{info.business_address}}</view>
|
|
|
|
</view>
|
|
</view>
|
|
<view class="line bg_F2F2F2 w-100" style="height:10upx;" v-if="authStatus == 'auditing' || authStatus == 'waiting' || authStatus == 'finish'"></view>
|
|
<view v-if="authStatus == 'auditing' || authStatus == 'waiting' || authStatus == 'finish'">
|
|
<view class="padding-30 x-bg-white j-sb d-flex">
|
|
<view class="font-weight font_28">资质图片</view>
|
|
<view class="x-text-159 lookAll" @tap='look_all()'>查看全部></view>
|
|
</view>
|
|
|
|
|
|
<view class="imgBox d-flex j-sb padding-zy30">
|
|
<view class="x_textCenter margin-shu20" v-for="(item,index) of subTypeInfo" :key='index' v-if="item.path[0] || item.image">
|
|
<img :src="item.path[0]?item.path[0]:item.image" alt="" class='img'>
|
|
<view>{{item.name}}</view>
|
|
</view>
|
|
</view>
|
|
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
import HeaderTop from '../../components/HeaderTop/HeaderTop.vue'
|
|
import authentication from '../../utils/models/auth.js'
|
|
export default {
|
|
data() {
|
|
return {
|
|
info: {},
|
|
regionsName: '',
|
|
subTypeInfo: [],
|
|
authStatus: 'authBaisc',
|
|
}
|
|
},
|
|
comments: {
|
|
HeaderTop
|
|
},
|
|
methods: {
|
|
// look_all
|
|
look_all() {
|
|
uni.navigateTo({
|
|
url: './look_Authentication'
|
|
})
|
|
},
|
|
// 去认证
|
|
to_auth() {
|
|
uni.navigateTo({
|
|
url: './baisc'
|
|
})
|
|
},
|
|
async checkAuth() {
|
|
let data = await authentication.checkAuth()
|
|
this.authStatus = data.data
|
|
if(this.authStatus == 'auditing' || this.authStatus == 'waiting' || this.authStatus == 'finish'){
|
|
this.viewBaisc()
|
|
this.viewCertificate()
|
|
}
|
|
this.handleError(data, res => {
|
|
|
|
})
|
|
},
|
|
async viewBaisc() {
|
|
let data = await authentication.viewBaisc()
|
|
console.log(data)
|
|
this.info = data.data
|
|
if (this.info) {
|
|
this.regionsName = this.info.area_name.map(item => item.area_name).join(' ')
|
|
}
|
|
this.handleError(data, res => {
|
|
|
|
})
|
|
},
|
|
async viewCertificate() {
|
|
let data = await authentication.viewCertificate()
|
|
this.subTypeInfo = data.data
|
|
this.handleError(data, res => {
|
|
|
|
})
|
|
}
|
|
},
|
|
onShow() {
|
|
this.checkAuth()
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss">
|
|
.list {
|
|
.imgBox {
|
|
flex-wrap: wrap;
|
|
|
|
.img {
|
|
height: 208upx;
|
|
width: 327upx;
|
|
}
|
|
}
|
|
|
|
.lookAll {
|
|
border: 2upx solid #EB5159;
|
|
border-radius: 50upx;
|
|
padding: 2upx 14upx;
|
|
}
|
|
}
|
|
</style>
|