sadjv3_jishi/pages/my/user.vue

184 lines
5.6 KiB
Vue
Raw Normal View History

2024-06-05 19:14:51 +08:00
<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>
2025-03-17 09:48:26 +08:00
<view class="bg" @click="show = true" :class="{'disabled-view': isDisabled}">
2024-06-05 19:14:51 +08:00
<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>
2024-06-26 16:58:53 +08:00
<text v-if="tripWay == 2">出租 (免费出行{{tripWayNum}}公里)</text>
2024-06-05 19:14:51 +08:00
</view>
<image src="../../static/images/my/right.png" style="width: 12rpx;height: 21rpx;"></image>
</view>
</view>
2024-07-11 17:24:37 +08:00
<uActionSheet :list="cxList" @tripWayData="tripWayData" v-model="show" @click="cxCallback"></uActionSheet>
2024-06-05 19:14:51 +08:00
</view>
</template>
<script>
2024-07-11 17:24:37 +08:00
import uActionSheet from '../../components/u-action-sheets.vue'
2024-06-05 19:14:51 +08:00
export default {
2024-07-11 17:24:37 +08:00
components:{uActionSheet},
2024-06-05 19:14:51 +08:00
data() {
return {
2024-06-26 16:58:53 +08:00
tripWayNum:'',
2024-06-05 19:14:51 +08:00
tripWay: 0,
show: false,
2025-03-17 09:48:26 +08:00
adjustWay: 2,
isDisabled: true,
2024-06-05 19:14:51 +08:00
renzheng: 0,
cxList: [{
text: '公交',
label: 1
},
{
text: '出租',
label: 2
},
{
text: '免费',
label: 3
}
]
}
},
2024-08-22 09:10:38 +08:00
onLoad() {
2024-06-05 19:14:51 +08:00
this.getUserInfo();
this.getArtificer();
},
methods: {
2024-07-11 17:24:37 +08:00
tripWayData(e){
this.tripWayNum=e;
},
2024-06-05 19:14:51 +08:00
//获取理疗师的信息
getArtificer() {
this.$Request.getT("/app/artificer/selectArtificer").then(res => {
if (res.code == 0) {
this.tripWay = res.data.tripWay ? res.data.tripWay : 0;
2025-03-17 09:48:26 +08:00
this.tripWayNum=res.data.tripWayNum;
this.adjustWay = res.data.adjustWay;
this.isDisabled = this.adjustWay==2 ? true : false;
2024-06-05 19:14:51 +08:00
}
});
},
cxCallback(index) {
2024-07-11 17:24:37 +08:00
this.setChuXing(index+1,this.tripWayNum)
2024-06-05 19:14:51 +08:00
},
2024-06-26 16:58:53 +08:00
setChuXing(tripWay,tripWayNum) {
2024-06-05 19:14:51 +08:00
this.$queue.showLoading('设置中...')
2024-06-26 16:58:53 +08:00
this.$Request.postT("/app/artificer/updateArtificerTripWay?tripWay=" + tripWay+'&tripWayNum='+tripWayNum).then(res => {
2024-06-05 19:14:51 +08:00
uni.hideLoading();
if (res.code == 0) {
this.$queue.showToast('设置成功!');
this.getArtificer();
}else{
this.$queue.showToast(res.msg);
}
});
},
goRenZheng() {
if (this.renzheng == 0) {
uni.navigateTo({
2024-08-14 16:38:29 +08:00
url: '/my/renzheng/index'
2024-06-05 19:14:51 +08:00
});
} 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;
}
2025-03-17 09:48:26 +08:00
.disabled-view {
pointer-events: none; /* 禁止点击事件 */
opacity: 0.6; /* 改变透明度,表示禁用状态 */
}
2024-06-05 19:14:51 +08:00
</style>