From 44daeb43fecda93c1a6a1f0e37ad420291f29b0d Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期四, 17 七月 2025 12:06:59 +0800
Subject: [PATCH] 前端
---
small-program/pages/mine/mine.vue | 105 ++++++++++++++++++++++++++++++++++++++++++++--------
1 files changed, 89 insertions(+), 16 deletions(-)
diff --git a/small-program/pages/mine/mine.vue b/small-program/pages/mine/mine.vue
index 3f16ee3..e243b6b 100644
--- a/small-program/pages/mine/mine.vue
+++ b/small-program/pages/mine/mine.vue
@@ -7,44 +7,66 @@
</view>
<view class="info">
<view class="info-box">
- <view class="info-box-head">
+ <view class="info-box-head" @click="jump(isLogin?1:0)">
<view class="info-box-head-image">
- <image src="/static/logo.png" mode="widthFix"></image>
+ <image v-if="userInfo.fullCoverImage&&userInfo.fullCoverImage !=''" :src="userInfo.fullCoverImage" mode="widthFix"></image>
+ <image v-else src="/static/logo.png" mode="widthFix"></image>
</view>
- <view class="info-box-head-info">
- <view class="info-box-head-info-name">鏉ㄥ┓鐟�</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-type">
<view class="info-box-head-info-type-val">鐢ㄥ伐鍙戝竷鏂�</view>
<view class="info-box-head-info-type-wz">鍒囨崲</view>
+ </view>
+ </view>
+ <view class="info-box-head-info" v-else>
+ <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>
<view class="info-box-label">璐︽埛浣欓</view>
<view class="info-box-price">
- <text>楼1000.00</text>
+ <text>锟{isLogin?(userInfo.amount || 0) :0.00}}</text>
<view class="info-box-price-btn" @click="jumpTX">鍘绘彁鐜�</view>
</view>
</view>
</view>
<view class="statistics">
- <view class="statistics-box">
- <view class="statistics-item">
- <text>248</text>
+ <view class="statistics-box" v-if="!isLogin || userInfo.useIdentity !=1">
+ <view class="statistics-item" >
+ <text>{{isLogin?(userInfo.userCenterVO.releaseTaskTotal||0):'-'}}</text>
<text>鎬诲彂鍗曟暟</text>
</view>
<view class="statistics-x"></view>
<view class="statistics-item">
- <text>1</text>
+ <text>{{isLogin?(userInfo.userCenterVO.waitReceiveTotal||0):'-'}}</text>
<text>寰呮帴鍗�</text>
</view>
<view class="statistics-item">
- <text>2</text>
+ <text>{{isLogin?(userInfo.userCenterVO.doingTotal||0):'-'}}</text>
<text>杩涜涓�</text>
</view>
<view class="statistics-item">
- <text>2</text>
+ <text>{{isLogin?(userInfo.userCenterVO.waitCommentTotal||0):'-'}}</text>
<text>寰呰瘎浠�</text>
</view>
+ </view>
+ <view class="statistics-box" v-else>
+ <view class="statistics-item" >
+ <text>{{isLogin?(userInfo.userCenterVO.receiveTotal||0):'-'}}</text>
+ <text>宸叉帴鍗�</text>
+ </view>
+ <view class="statistics-x"></view>
+ <view class="statistics-item">
+ <text>{{isLogin?(userInfo.userCenterVO.taskingTotal||0):'-'}}</text>
+ <text>杩涜涓�</text>
+ </view>
+ <view class="statistics-item">
+ <text>{{isLogin?(userInfo.userCenterVO.doneTotal||0):'-'}}</text>
+ <text>宸插畬鎴�</text>
+ </view>
</view>
</view>
<view class="guanggao">
@@ -71,21 +93,21 @@
<text>鏀惰垂鏍囧噯</text>
<u-icon name="arrow-right" color="#111111" size="18"></u-icon>
</view>
- <view class="list-hz-item">
+ <view class="list-hz-item" @click="jump(2)">
<text>宸ヤ汉璧氶挶</text>
<view class="list-hz-item-r">
<text>鍙帴鐢ㄥ伐璁㈠崟</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="jump(3)">
<text>鍙告満璧氶挶</text>
<view class="list-hz-item-r">
<text>鍙帴鐢ㄥ伐璁㈠崟</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="jump(4)">
<text>鎴戣兘渚涢</text>
<view class="list-hz-item-r">
<text>鍙帴鐢ㄥ伐璁㈠崟</text>
@@ -106,18 +128,69 @@
import { mapState } from 'vuex'
export default {
computed: {
- ...mapState(['navHeight', 'statusbarHeight'])
+ ...mapState(['navHeight', 'statusbarHeight','userInfo','token','openid'])
},
data() {
return {
- value: false
+ value: false,
+ isLogin:false
+ }
+ },
+ onShow(options){
+ this.isLogin=false
+ if(this.token &&this.token!='' && this.userInfo && JSON.stringify(this.userInfo) != '{}'){
+ this.isLogin=true
+ this.getUserInfo()
}
},
methods: {
+ getUserInfo() {
+ var that = this;
+ this.$u.api.getMemberInfo({}).then(res =>{
+ if (res.code ===200) {
+ that.$store.commit('setUserInfo', res.data)
+ that.$isResolve()
+ }else{
+ that.$store.commit('setToken','')
+ that.$store.commit('setUserInfo',{})
+ that.$isResolve()
+ }
+ })
+ },
jumpTX() {
uni.navigateTo({
url: '/pages/withdrawal/withdrawal'
})
+ },
+ jump(type) {
+ switch(type) {
+ case 1:
+ uni.navigateTo({
+ url: '/pages/set-up/set-up'
+ })
+ break;
+ case 2:
+ uni.navigateTo({
+ url: '/pages/employment-certification/employment-certification'
+ })
+ break;
+ case 3:
+ uni.navigateTo({
+ url: '/pages/freight-certification/freight-certification'
+ })
+ break;
+ case 4:
+ uni.navigateTo({
+ url: '/pages/catering-certification/catering-certification'
+ })
+
+ break;
+ case 5:
+ uni.navigateTo({
+ url: '/pages/login/login'
+ })
+ break;
+ }
}
}
}
--
Gitblit v1.9.3