|
|
|
@ -4,6 +4,7 @@ |
|
|
|
<view style="margin-top: 80px;" @click="navigatorTo('merchantCenter')">商家中心-{{shopCounts}}</view> |
|
|
|
<view style="margin-top: 80px;" @click="navigatorTo('jianzhizhuce')">兼职注册</view> |
|
|
|
<view style="margin-top: 80px;" v-if="worker" @click="navigatorTo('jianzhizhuye')">兼职主页-{{workerCounts}}</view> |
|
|
|
<view style="margin-top: 80px;" @click="navigatorTo('qianbao')">钱包余额-{{balance}}</view> |
|
|
|
<!-- 未注册兼职弹窗 --> |
|
|
|
<uni-popup ref="jianzhiPopup" background-color="rgba(2, 171, 255, 1)" borderRadius="40px 40px 40px 40px"> |
|
|
|
<view class="jianzhi-content" @tap="navigatorTo('partTimeReg')"> |
|
|
|
@ -34,6 +35,7 @@ |
|
|
|
schoolShop:[], |
|
|
|
workerCounts:0, |
|
|
|
shopCounts:0, |
|
|
|
balance:0, |
|
|
|
worker:uni.getStorageSync('worker') |
|
|
|
} |
|
|
|
}, |
|
|
|
@ -59,6 +61,28 @@ |
|
|
|
if(shopId){ |
|
|
|
this.shopCounts = uni.getStorageSync('shopCounts') |
|
|
|
} |
|
|
|
this.balance = 0 |
|
|
|
this.tui.request("/worker/getAllDepo/", "GET", {userId:uni.getStorageSync('id')}, false, true).then((res) => { |
|
|
|
if (res.code == 200) { |
|
|
|
if(res.result.user){ |
|
|
|
this.balance += Number(res.result.user.depoBal) |
|
|
|
} |
|
|
|
if(res.result.worker){ |
|
|
|
this.balance += Number(res.result.worker.depoBal) |
|
|
|
this.balance += Number(res.result.worker.depoBalRel) |
|
|
|
} |
|
|
|
if(res.result.shop){ |
|
|
|
for(let i = 0; i < res.result.shop.length;i++){ |
|
|
|
this.balance += Number(res.result.shop[i].balance) |
|
|
|
} |
|
|
|
} |
|
|
|
this.balance = this.balance.toFixed(2) |
|
|
|
that.$forceUpdate(); |
|
|
|
} else { |
|
|
|
this.tui.toast(res.message) |
|
|
|
} |
|
|
|
uni.hideLoading() |
|
|
|
}).catch((res) => {}) |
|
|
|
}, |
|
|
|
clickShop(item){ |
|
|
|
uni.setStorageSync('shopId',item.id) |
|
|
|
|