From a1c569d40b5d1d6571a197467a41fd3421c393ce Mon Sep 17 00:00:00 2001
From: doum <doum>
Date: 星期一, 15 九月 2025 09:10:49 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
small-program/pages/mine/mine.vue | 260 ++++++++++++++++++++++++++++++++++++++++++---------
1 files changed, 213 insertions(+), 47 deletions(-)
diff --git a/small-program/pages/mine/mine.vue b/small-program/pages/mine/mine.vue
index e243b6b..7cf91be 100644
--- a/small-program/pages/mine/mine.vue
+++ b/small-program/pages/mine/mine.vue
@@ -7,63 +7,68 @@
</view>
<view class="info">
<view class="info-box">
- <view class="info-box-head" @click="jump(isLogin?1:0)">
- <view class="info-box-head-image">
+ <view class="info-box-head" >
+ <view class="info-box-head-image" @click="jump(isLogin?1:5)">
<image v-if="userInfo.fullCoverImage&&userInfo.fullCoverImage !=''" :src="userInfo.fullCoverImage" mode="widthFix"></image>
- <image v-else src="/static/logo.png" mode="widthFix"></image>
+ <image v-else src="/static/icon/img@2x.png" mode="widthFix"></image>
</view>
<view class="info-box-head-info" v-if="isLogin">
- <view class="info-box-head-info-name">{{userInfo.nickName||'鍖垮悕'}}</view>
+ <view class="info-box-head-info-name" @click="jump(1)">{{userInfo.nickName||'鍖垮悕'}}</view>
<view class="info-box-head-info-type">
- <view class="info-box-head-info-type-val">鐢ㄥ伐鍙戝竷鏂�</view>
- <view class="info-box-head-info-type-wz">鍒囨崲</view>
+ <view class="info-box-head-info-type-val1" v-if="userInfo.useIdentity==1">鐢ㄥ伐鎺ュ崟鏂�</view>
+ <view class="info-box-head-info-type-val" v-else>鐢ㄥ伐鍙戝竷鏂�</view>
+ <!-- <view class="info-box-head-info-type-wz" @click="editUseIdentity">鍒囨崲</view> -->
</view>
</view>
- <view class="info-box-head-info" v-else>
+ <view class="info-box-head-info" v-else @click="jump(5)">
<view class="info-box-head-info-name">鐐瑰嚮鐧诲綍</view>
<view class="info-box-head-info-type">
<view class="info-box-head-info-type-wz">寰俊鎺堟潈鐧诲綍</view>
</view>
</view>
+ <view class="info-box-head-qiehuan" @click="editUseIdentity">
+ <image src="/static/icon/ic_change@2x.png" mode="widthFix"></image>
+ <text>鍒囨崲韬唤</text>
+ </view>
</view>
<view class="info-box-label">璐︽埛浣欓</view>
<view class="info-box-price">
- <text>锟{isLogin?(userInfo.amount || 0) :0.00}}</text>
- <view class="info-box-price-btn" @click="jumpTX">鍘绘彁鐜�</view>
+ <text>锟{isLogin?((userInfo.amount|| 0)/100).toFixed(2) :0.00}}</text>
+ <view class="info-box-price-btn" @click="jump(isLogin?6:5)">鍘绘彁鐜�</view>
</view>
</view>
</view>
<view class="statistics">
<view class="statistics-box" v-if="!isLogin || userInfo.useIdentity !=1">
- <view class="statistics-item" >
+ <view class="statistics-item" @click="jumpOrderList('0')" >
<text>{{isLogin?(userInfo.userCenterVO.releaseTaskTotal||0):'-'}}</text>
<text>鎬诲彂鍗曟暟</text>
</view>
<view class="statistics-x"></view>
- <view class="statistics-item">
- <text>{{isLogin?(userInfo.userCenterVO.waitReceiveTotal||0):'-'}}</text>
+ <view class="statistics-item" @click="jumpOrderList('1')" >
+ <text class="redtxt">{{isLogin?(userInfo.userCenterVO.waitReceiveTotal||0):'-'}}</text>
<text>寰呮帴鍗�</text>
</view>
- <view class="statistics-item">
+ <view class="statistics-item" @click="jumpOrderList('2')" >
<text>{{isLogin?(userInfo.userCenterVO.doingTotal||0):'-'}}</text>
<text>杩涜涓�</text>
</view>
- <view class="statistics-item">
+ <view class="statistics-item" @click="jumpOrderList('3')" >
<text>{{isLogin?(userInfo.userCenterVO.waitCommentTotal||0):'-'}}</text>
<text>寰呰瘎浠�</text>
</view>
</view>
<view class="statistics-box" v-else>
- <view class="statistics-item" >
+ <view class="statistics-item" @click="jumpOrderList('4')" >
<text>{{isLogin?(userInfo.userCenterVO.receiveTotal||0):'-'}}</text>
<text>宸叉帴鍗�</text>
</view>
<view class="statistics-x"></view>
- <view class="statistics-item">
+ <view class="statistics-item" @click="jumpOrderList('5')">
<text>{{isLogin?(userInfo.userCenterVO.taskingTotal||0):'-'}}</text>
<text>杩涜涓�</text>
</view>
- <view class="statistics-item">
+ <view class="statistics-item" @click="jumpOrderList('6')">
<text>{{isLogin?(userInfo.userCenterVO.doneTotal||0):'-'}}</text>
<text>宸插畬鎴�</text>
</view>
@@ -72,53 +77,65 @@
<view class="guanggao">
<view class="guanggao-image">
<image src="/static/image/share@2x.png" mode="widthFix"></image>
+ <button mode="widthFix"class='sharebtn' open-type="share"></button>
</view>
</view>
- <view class="paidan">
+ <view class="paidan" v-if="isLogin && userInfo.useIdentity ==1">
<view class="paidan-box">
<view class="paidan-label">鎺ュ彈绯荤粺鑷姩娲惧崟</view>
<view class="paidan-right">
<text>鍏抽棴</text>
- <u-switch activeColor="#00BC12" v-model="value"></u-switch>
+ <u-switch activeColor="#00BC12" @change="updateMemberInfo" v-model="autoReceiveStatus"></u-switch>
</view>
</view>
</view>
<view class="list">
<view class="list-hz">
- <view class="list-hz-item">
+ <view class="list-hz-item"@click="jumpService(1)">
<text>鏈嶅姟浠嬬粛</text>
- <u-icon name="arrow-right" color="#111111" size="18"></u-icon>
+ <u-icon name="arrow-right" color="#111111" size="18"></u-icon>
</view>
- <view class="list-hz-item">
+ <view class="list-hz-item" @click="jumpService(2)">
<text>鏀惰垂鏍囧噯</text>
<u-icon name="arrow-right" color="#111111" size="18"></u-icon>
</view>
- <view class="list-hz-item" @click="jump(2)">
+ <view class="list-hz-item" @click="jump(isLogin?2:5)">
<text>宸ヤ汉璧氶挶</text>
<view class="list-hz-item-r">
- <text>鍙帴鐢ㄥ伐璁㈠崟</text>
+ <text v-if="userInfo.workerIdentity === 2">宸茶璇�</text>
+ <text class="orangetxt" v-else-if="userInfo.workerIdentity === 1">璁よ瘉涓�</text>
+ <text class="redtxt" v-else-if="userInfo.workerIdentity === 3">璁よ瘉澶辫触</text>
+ <text v-else>鍙帴鐢ㄥ伐璁㈠崟</text>
<u-icon name="arrow-right" color="#111111" size="18"></u-icon>
</view>
</view>
- <view class="list-hz-item" @click="jump(3)">
+ <view class="list-hz-item" @click="jump(isLogin?3:5)">
<text>鍙告満璧氶挶</text>
<view class="list-hz-item-r">
- <text>鍙帴鐢ㄥ伐璁㈠崟</text>
+ <text v-if="userInfo.driverIdentity === 2">宸茶璇�</text>
+ <text class="orangetxt" v-else-if="userInfo.driverIdentity === 1">璁よ瘉涓�</text>
+ <text class="redtxt" v-else-if="userInfo.driverIdentity === 3">璁よ瘉澶辫触</text>
+ <text v-else>鍙帴杩愯揣璁㈠崟</text>
<u-icon name="arrow-right" color="#111111" size="18"></u-icon>
</view>
</view>
- <view class="list-hz-item" @click="jump(4)">
+ <view class="list-hz-item" @click="jump(isLogin?4:5)">
<text>鎴戣兘渚涢</text>
<view class="list-hz-item-r">
- <text>鍙帴鐢ㄥ伐璁㈠崟</text>
+ <text v-if="userInfo.chefIdentity === 2">宸茶璇�</text>
+ <text class="orangetxt" v-else-if="userInfo.chefIdentity === 1">璁よ瘉涓�</text>
+ <text class="redtxt" v-else-if="userInfo.chefIdentity === 3">璁よ瘉澶辫触</text>
+ <text v-else>鍙帴鐢ㄩ璁㈠崟</text>
<u-icon name="arrow-right" color="#111111" size="18"></u-icon>
</view>
</view>
- <view class="list-hz-item">
+ <view class="list-hz-item" @click="jumpService(3)">
<text>鍏充簬鎴戜滑</text>
<u-icon name="arrow-right" color="#111111" size="18"></u-icon>
</view>
</view>
+ <view class="setup-sub" v-if="isLogin" @click="logOffDo">閫�鍑虹櫥褰�</view>
+ <view class="setup-sub" v-if="!isLogin" @click="jump(5)">鍘荤櫥褰�</view>
</view>
</view>
</view>
@@ -132,22 +149,37 @@
},
data() {
return {
- value: false,
- isLogin:false
+ changing:false,
+ changing1:false,
+ autoReceiveStatus: false,
+ isLogin:false,
+ useIdentity:0
}
},
onShow(options){
this.isLogin=false
+ this.autoReceiveStatus=false;
+ this.useIdentity =0
+
if(this.token &&this.token!='' && this.userInfo && JSON.stringify(this.userInfo) != '{}'){
this.isLogin=true
this.getUserInfo()
+ this.autoReceiveStatus = this.userInfo.autoReceiveStatus === 1
+ this.useIdentity = this.userInfo.useIdentity
}
},
methods: {
+ jumpOrderList(flag){
+ const app = getApp();
+ app.globalData.orderStatus = flag;
+ uni.switchTab({
+ url: '/pages/demand-hall/demand-hall'
+ })
+ },
getUserInfo() {
var that = this;
this.$u.api.getMemberInfo({}).then(res =>{
- if (res.code ===200) {
+ if (res&&res.code ===200) {
that.$store.commit('setUserInfo', res.data)
that.$isResolve()
}else{
@@ -157,41 +189,111 @@
}
})
},
- jumpTX() {
+ jumpService(flag) {
uni.navigateTo({
- url: '/pages/withdrawal/withdrawal'
+ url: '/pages/rich-text-page/rich-text-page?flag='+flag
})
},
jump(type) {
switch(type) {
case 1:
uni.navigateTo({
- url: '/pages/set-up/set-up'
+ url: '/packageA/pages/set-up/set-up'
})
break;
case 2:
- uni.navigateTo({
- url: '/pages/employment-certification/employment-certification'
- })
+ if(!this.userInfo.workerIdentity ||this.userInfo.workerIdentity ==0){
+ uni.navigateTo({
+ url: '/packageA/pages/employment-certification/employment-certification?flag=0'
+ })
+ }else{
+ uni.navigateTo({
+ url: '/packageA/pages/certification-results/certification-results?flag=0'
+ })
+ }
+ break;
break;
case 3:
- uni.navigateTo({
- url: '/pages/freight-certification/freight-certification'
- })
+ if(!this.userInfo.driverIdentity ||this.userInfo.driverIdentity ==0){
+ uni.navigateTo({
+ url: '/packageA/pages/employment-certification/employment-certification?flag=1'
+ })
+ }else{
+ uni.navigateTo({
+ url: '/packageA/pages/certification-results/certification-results?flag=1'
+ })
+ }
break;
case 4:
- uni.navigateTo({
- url: '/pages/catering-certification/catering-certification'
- })
-
+ if(!this.userInfo.chefIdentity ||this.userInfo.chefIdentity ==0){
+ uni.navigateTo({
+ url: '/packageA/pages/employment-certification/employment-certification?flag=2'
+ })
+ }else{
+ uni.navigateTo({
+ url: '/packageA/pages/certification-results/certification-results?flag=2'
+ })
+ }
break;
case 5:
uni.navigateTo({
url: '/pages/login/login'
})
break;
+ case 6:
+ uni.navigateTo({
+ url: '/packageA/pages/withdrawal/withdrawal'
+ })
+ break;
+ case 7:
+ uni.navigateTo({
+ url: '/packageA/pages/certification-results/certification-results'
+ })
+ break;
}
- }
+ },
+ logOffDo() {
+ var that = this
+ this.$u.api.logOff({}).then(res =>{
+ //閫�鍑虹櫥褰曟垚鍔�
+ that.isLogin =false
+ that.$store.commit("empty")
+ })
+ } ,
+ editUseIdentity() {
+ if(this.changing1){
+ return
+ }
+ this.changing1 = true
+ var that = this
+ var param ={useIdentity:this.userInfo.useIdentity==1?0:1}
+ that.$u.api.editUseIdentity(param)
+ .then(res =>{
+ console.log(222,res)
+ if(res.code ===200){
+ that.userInfo.useIdentity = param.useIdentity
+ that.$store.commit('setUserInfo', that.userInfo)
+ uni.$emit('refresh')
+ }
+ }).finally(() => {
+ that.changing1 = false
+ })
+ } ,
+ updateMemberInfo(e) {
+ if(this.changing){
+ return
+ }
+ this.changing = true
+ var that = this
+ var param ={ autoReceiveStatus:that.autoReceiveStatus?1:0}
+ this.$u.api.editMemberInfo(param).then(res =>{
+ if(res.code ===200){
+ that.userInfo.autoReceiveStatus = param.autoReceiveStatus
+ }
+ }).finally(() => {
+ that.changing = false
+ })
+ }
}
}
</script>
@@ -212,6 +314,7 @@
.list {
width: 100%;
padding: 0 30rpx;
+ padding-bottom: 30px;
box-sizing: border-box;
.list-hz {
width: 100%;
@@ -283,6 +386,20 @@
image {
width: 100%;
height: 100%;
+ z-index: 999;
+ }
+ .sharebtn{
+ position: relative;
+ top: -150rpx;
+ left: 0;
+ outline:none;
+ padding:0px;
+ cursor: pointer;
+ border: none;
+ opacity: 0;
+ width: 100%;
+ height: 100%;
+ z-index: 1000;
}
}
}
@@ -372,7 +489,6 @@
width: 100%;
height: 108rpx;
display: flex;
- align-items: center;
margin-bottom: 30rpx;
.info-box-head-image {
width: 108rpx;
@@ -386,6 +502,20 @@
margin-right: 24rpx;
image {
width: 100%;
+ }
+ }
+ .info-box-head-qiehuan {
+ flex-shrink: 0;
+ display: flex;
+ image {
+ width: 32rpx;
+ height: 32rpx;
+ margin-right: 10rpx;
+ }
+ text {
+ font-weight: 400;
+ font-size: 28rpx;
+ color: #00BC12;
}
}
.info-box-head-info {
@@ -414,6 +544,19 @@
font-size: 24rpx;
color: #FF7200;
border: 2rpx solid #FD9E24;
+ margin-right: 20rpx;
+ }
+ .info-box-head-info-type-val1 {
+ width: 144rpx;
+ height: 42rpx;
+ line-height: 42rpx;
+ text-align: center;
+ background: rgba(91,190,56,0.06);
+ border-radius: 8rpx;
+ font-weight: 400;
+ font-size: 24rpx;
+ color: #00BC12;
+ border: 2rpx solid #00BC12;
margin-right: 20rpx;
}
.info-box-head-info-type-wz {
@@ -450,4 +593,27 @@
}
}
}
+ .setup-sub {
+ width: 100%;
+ height: 88rpx;
+ line-height: 88rpx;
+ text-align: center;
+ box-shadow: 0rpx 8rpx 12rpx 0rpx rgba(91,190,56,0.16);
+ border-radius: 44rpx;
+ font-weight: 500;
+ font-size: 32rpx;
+ color: #5BBE38;
+ margin-top: 80rpx;
+ border: 1rpx solid #15CF52;
+ bottom: 50px;
+ }
+ .bluetxt{
+ color:blue !important ;
+ }
+ .redtxt{
+ color:#FF0000 !important ;
+ }
+ .orangetxt{
+ color: #FF7200 !important ;
+ }
</style>
--
Gitblit v1.9.3