184 lines
5.6 KiB
Vue
184 lines
5.6 KiB
Vue
<template>
|
|
<view style="padding: 0 30rpx;background-color: #ffffff;">
|
|
<view class="bg" @click="goNav('/pages/my/userinfo')" style="border-bottom: 1px #f7f7f7 solid;">
|
|
<view>个人信息</view>
|
|
<view class="flex align-center">
|
|
<view style="font-weight: 500;color: #999999;font-size: 28rpx;margin-right: 20rpx;">去上传</view>
|
|
<image src="../../static/images/my/right.png" style="width: 12rpx;height: 21rpx;"></image>
|
|
</view>
|
|
</view>
|
|
<view class="bg" @click="goRenZheng" style="border-bottom: 1px #f7f7f7 solid;">
|
|
<view>身份认证</view>
|
|
<view class="flex align-center">
|
|
<view style="font-weight: 500;color: #999999;font-size: 28rpx;margin-right: 20rpx;">去上传</view>
|
|
<image src="../../static/images/my/right.png" style="width: 12rpx;height: 21rpx;"></image>
|
|
</view>
|
|
</view>
|
|
<view class="bg" @click="goNav('/pages/my/userinfo')" style="border-bottom: 1px #f7f7f7 solid;">
|
|
<view>头像/相册</view>
|
|
<view class="flex align-center">
|
|
<view style="font-weight: 500;color: #999999;font-size: 28rpx;margin-right: 20rpx;">去上传</view>
|
|
<image src="../../static/images/my/right.png" style="width: 12rpx;height: 21rpx;"></image>
|
|
</view>
|
|
</view>
|
|
<view class="bg" @click="goRenZheng" style="border-bottom: 1px #f7f7f7 solid;">
|
|
<view>资质信息</view>
|
|
<view class="flex align-center">
|
|
<view style="font-weight: 500;color: #999999;font-size: 28rpx;margin-right: 20rpx;">去上传</view>
|
|
<image src="../../static/images/my/right.png" style="width: 12rpx;height: 21rpx;"></image>
|
|
</view>
|
|
</view>
|
|
<view class="bg" @click="show = true" :class="{'disabled-view': isDisabled}">
|
|
<view>出行方式</view>
|
|
<view class="flex align-center">
|
|
<view style="font-weight: 500;color: #999999;font-size: 28rpx;margin-right: 20rpx;" v-if="tripWay == 0">
|
|
去上传</view>
|
|
<view style="font-weight: 500;color: #999999;font-size: 28rpx;margin-right: 20rpx;" v-if="tripWay != 0">
|
|
<!-- {{tripWay == 1 ? '公交' ? tripWay == 2 : '出租'}} -->
|
|
<text v-if="tripWay == 1">公交</text>
|
|
<text v-if="tripWay == 3">免费</text>
|
|
<text v-if="tripWay == 2">出租 (免费出行{{tripWayNum}}公里)</text>
|
|
</view>
|
|
<image src="../../static/images/my/right.png" style="width: 12rpx;height: 21rpx;"></image>
|
|
</view>
|
|
</view>
|
|
<uActionSheet :list="cxList" @tripWayData="tripWayData" v-model="show" @click="cxCallback"></uActionSheet>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
import uActionSheet from '../../components/u-action-sheets.vue'
|
|
export default {
|
|
components:{uActionSheet},
|
|
data() {
|
|
return {
|
|
tripWayNum:'',
|
|
tripWay: 0,
|
|
show: false,
|
|
adjustWay: 2,
|
|
isDisabled: true,
|
|
renzheng: 0,
|
|
cxList: [{
|
|
text: '公交',
|
|
label: 1
|
|
},
|
|
{
|
|
text: '出租',
|
|
label: 2
|
|
},
|
|
{
|
|
text: '免费',
|
|
label: 3
|
|
}
|
|
]
|
|
}
|
|
},
|
|
onLoad() {
|
|
this.getUserInfo();
|
|
this.getArtificer();
|
|
},
|
|
methods: {
|
|
tripWayData(e){
|
|
this.tripWayNum=e;
|
|
},
|
|
//获取理疗师的信息
|
|
getArtificer() {
|
|
this.$Request.getT("/app/artificer/selectArtificer").then(res => {
|
|
if (res.code == 0) {
|
|
this.tripWay = res.data.tripWay ? res.data.tripWay : 0;
|
|
this.tripWayNum=res.data.tripWayNum;
|
|
this.adjustWay = res.data.adjustWay;
|
|
this.isDisabled = this.adjustWay==2 ? true : false;
|
|
}
|
|
});
|
|
},
|
|
cxCallback(index) {
|
|
this.setChuXing(index+1,this.tripWayNum)
|
|
},
|
|
setChuXing(tripWay,tripWayNum) {
|
|
this.$queue.showLoading('设置中...')
|
|
this.$Request.postT("/app/artificer/updateArtificerTripWay?tripWay=" + tripWay+'&tripWayNum='+tripWayNum).then(res => {
|
|
uni.hideLoading();
|
|
if (res.code == 0) {
|
|
this.$queue.showToast('设置成功!');
|
|
this.getArtificer();
|
|
}else{
|
|
this.$queue.showToast(res.msg);
|
|
}
|
|
});
|
|
},
|
|
goRenZheng() {
|
|
if (this.renzheng == 0) {
|
|
uni.navigateTo({
|
|
url: '/my/renzheng/index'
|
|
});
|
|
} else if (this.renzheng != 0) {
|
|
if(this.renzheng == 1){
|
|
this.$queue.showToast('实名认证系统审核中,请耐心等待');
|
|
}else{
|
|
uni.navigateTo({
|
|
url: '/my/renzheng/index'
|
|
});
|
|
}
|
|
}
|
|
},
|
|
getUserInfo() {
|
|
this.$Request.get("/app/user/selectUserById").then(res => {
|
|
if (res.code == 0) {
|
|
if (res.data.isAuthentication == 0 || res.data.isAuthentication == null) {
|
|
this.renzheng = 0
|
|
uni.setStorageSync("renzheng", this.renzheng)
|
|
} else if (res.data.isAuthentication == 1) {
|
|
this.renzheng = 1
|
|
uni.setStorageSync("renzheng", this.renzheng)
|
|
} else if (res.data.isAuthentication == 2) {
|
|
this.renzheng = 2
|
|
uni.setStorageSync("renzheng", this.renzheng)
|
|
} else if (res.data.isAuthentication == 3) {
|
|
this.renzheng = 3
|
|
uni.setStorageSync("renzheng", this.renzheng)
|
|
} else if (res.data.isAuthentication == 4) {
|
|
this.renzheng = 4
|
|
uni.setStorageSync("renzheng", this.renzheng)
|
|
} else if (res.data.isAuthentication == 5) {
|
|
this.renzheng = 5
|
|
uni.setStorageSync("renzheng", this.renzheng)
|
|
} else if (res.data.isAuthentication == 6) {
|
|
this.renzheng = 6
|
|
uni.setStorageSync("renzheng", this.renzheng)
|
|
}
|
|
|
|
}
|
|
});
|
|
},
|
|
goNav(e) {
|
|
uni.navigateTo({
|
|
url: e
|
|
})
|
|
},
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style>
|
|
page {
|
|
background: #F5F5F5;
|
|
}
|
|
|
|
.bg {
|
|
background: #FFFFFF;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding: 40rpx 0;
|
|
font-size: 29rpx;
|
|
font-weight: bold;
|
|
font-family: PingFang SC;
|
|
}
|
|
|
|
.disabled-view {
|
|
pointer-events: none; /* 禁止点击事件 */
|
|
opacity: 0.6; /* 改变透明度,表示禁用状态 */
|
|
}
|
|
</style>
|