From f7aa204aa8d20b090d7943969ddeb9871a1fad76 Mon Sep 17 00:00:00 2001
From: zhangwei <1504152376@qq.com>
Date: 星期四, 12 九月 2024 17:28:06 +0800
Subject: [PATCH] -

---
 src/pages/wallet/index.vue |   28 ++++++++++++++--------------
 1 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/src/pages/wallet/index.vue b/src/pages/wallet/index.vue
index 968d9c2..bc927a9 100644
--- a/src/pages/wallet/index.vue
+++ b/src/pages/wallet/index.vue
@@ -10,8 +10,8 @@
 						<text class="chuany-font50 fs-weight__500">{{balance}}</text>
 					</view>
 					<view class="right">
-						<up-button type="warning" size="small" shape="circle" @click="goMoney"
-							:text="identity=='enterprise'?'鍏呭��':'鎻愮幇'"></up-button>
+						<up-button type="warning" size="small" shape="circle" @click="goMoney" v-if="identity!=='enterprise'"
+							text="鎻愮幇"></up-button>
 					</view>
 				</view>
 			</view>
@@ -20,7 +20,7 @@
 				<view class="tool_wrap">
 					<view class="tool_title chuany-flex chuany-justify-between">
 						<view class="title">
-							<text>鏀跺叆鏄庣粏</text>
+							<text>宸ヨ祫鏄庣粏</text>
 						</view>
 						<view class="chuany-flex title_right" @click="toIncome">
 							<text class="c-m-r-10">鍏ㄩ儴</text>
@@ -59,19 +59,19 @@
 		},
 		onLoad() {
 			let that = this
-			this.userInfo = this.$db.get('userInfo') ? JSON.parse(this.$db.get('userInfo')) : {}
+			this.userInfo = this.$db.get('userInfo') || {}
 			uni.getStorage({
 				key: 'identity',
 				success: function(res) {
 					that.identity = res.data
 					if (res.data == 'worker') {
-						that.balance = that.$common.moneySub(that.userInfo.userWorker.tiXianZonge, that
-							.userInfo.userWorker.yiTiXianJine)
+						if (that.userInfo.userWorker) {
+							that.balance = that.$common.moneySub(that.userInfo.userWorker.tiXianZonge, that.userInfo.userWorker.yiTiXianJine)
+						}
 					} else {
-						console.log(that.identity, that.userInfo.userWorker.tiXianZonge,
-							'userInfo.userWorker.tiXianZonge');
-						that.balance = that.userInfo.userCompany.chongZhiYue ? that.userInfo.userCompany
-							.chongZhiYue : '0.00'
+						if (that.userInfo.userCompany) {
+							that.balance = that.userInfo.userCompany.chongZhiYue ? that.userInfo.userCompany.chongZhiYue : '0.00'
+						}
 					}
 				}
 			});
@@ -95,9 +95,9 @@
 			},
 			goMoney() {
 				if (this.identity == 'enterprise') {
-					uni.navigateTo({
-						url: '/pages/wallet/withdrawal'
-					})
+					// uni.navigateTo({
+					// 	url: '/pages/wallet/withdrawal'
+					// })
 				} else {
 					uni.navigateTo({
 						url: '/pages/wallet/recharge'
@@ -142,7 +142,7 @@
 		}
 	}
 
-	@import './mine.scss';
+	// @import './mine.scss';
 
 	.money_bag {
 		background: #fff;

--
Gitblit v1.9.1