dingdong-master/pages/my/master-settled-info.vue

120 lines
4.1 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<template>
<view>
<!-- 顶部操作条 -->
<cu-custom :bgColor="'bg-main-color'" :isBack="true">
<block slot="backText">返回</block>
<block slot="content">师傅入驻信息</block>
</cu-custom>
<view v-if="curUserInfo.status === 1" class="margin bg-white padding">
<view class="margin-bottom-sm">账户未审核,请填写入驻信息</view>
<button class="cu-btn bg-main-color shadow-blur" @click="navigate2ApplySettled">填写入驻信息</button>
</view>
<view v-else class="margin bg-white">
<view class="padding">
<view class="text-black text-bold">服务区域:</view>
<view v-for="(item,index) in servAreas">
<text>{{strReplace(item.mergerName, "-", ",")}}</text>
<!-- <text v-if="index !== servAreas.length - 1"></text> -->
</view>
</view>
<view class="padding">
<view class="text-black text-bold">服务技能:</view>
<view v-for="(item,index) in servSkills">
<text>{{item.goodsCategoryName}}</text>
<!-- <text v-if="index !== servSkills.length - 1"></text> -->
</view>
</view>
<view class="padding">
<view class="text-black text-bold">特殊技能:</view>
<view class="solid margin-top-sm padding-sm" v-for="(item,index) in servSpecialSkills">
<view class="margin-bottom-xs">类目:{{item.specialSkillName}}</view>
<view class="margin-bottom-xs">是否危险技能:{{item.dangerous === 0 ? '否' : '是'}}</view>
<view class="margin-bottom-xs">
<view class="margin-bottom-xs">技能证书:</view>
<image style="width: 200px; height: 200px; background-color: #eeeeee;" mode="aspectFit"
:src="item.credential" :data-url="item.credential" @click="viewImage($event, [item.credential])"></image>
</view>
<view v-if="item.dangerous == 1" class="margin-bottom-xs">
<view class="margin-bottom-xs">保险证明:</view>
<image style="width: 200px; height: 200px; background-color: #eeeeee;" mode="aspectFit"
:src="item.insurance" :data-url="item.insurance" @click="viewImage($event, [item.insurance])"></image>
</view>
<view>保险生效时期:{{item.insuranceStart}} ~ {{item.insuranceEnd}}</view>
</view>
</view>
<view class="padding">
<text class="text-black text-bold">审核状态:</text>
<text v-if="curUserInfo.status === 0" class="text-green">审核通过</text>
<text v-else-if="curUserInfo.status === 3" class="text-yellow">审核中</text>
<text v-else-if="curUserInfo.status === 4" class="text-red">审核未通过</text>
<button class="cu-btn bg-main-color margin-left-sm shadow-blur" v-if="curUserInfo.status === 4" @click="navigate2ApplySettled">重新填写入驻信息</button>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
curUserInfo: {},
servAreas: [],
servSkills: [],
servSpecialSkills: []
}
},
// onLoad() {
// this.loadData();
// },
onShow() {
this.loadData();
},
methods: {
async loadData() {
this.curUserInfo = await this.$request.getCurUserNoCache();
this.loadServAreas();
this.loadServSkills();
this.loadSpecialSkills();
},
async loadServAreas() {
let res = await this.$request.getWorkerArea({
workerId: this.curUserInfo.workerId
});
this.servAreas = res.data;
},
async loadServSkills() {
let res = await this.$request.getWorkerGoodsCategory({
workerId: this.curUserInfo.workerId
});
this.servSkills = res.data;
},
async loadSpecialSkills() {
let res = await this.$request.getWorkerSpecialSkill({
workerId: this.curUserInfo.workerId
});
this.servSpecialSkills = res.data;
},
viewImage(e, imgList) {
uni.previewImage({
urls: imgList,
current: e.currentTarget.dataset.url
});
},
navigate2ApplySettled() {
uni.navigateTo({
url: '/pages/my/master-occupancy'
})
},
strReplace(wholeStr, newStr, oldStr) {
if (wholeStr && wholeStr.length > 0) {
wholeStr = wholeStr.replaceAll(oldStr, newStr);
}
return wholeStr;
}
},
}
</script>
<style>
</style>