|
|
@ -2,9 +2,9 @@ |
|
|
<view class="page1"> |
|
|
<view class="page1"> |
|
|
<view>22222222</view> |
|
|
<view>22222222</view> |
|
|
<view style="margin-top: 100px;" @click="navigatorTo('merchant')">商家入驻</view> |
|
|
<view style="margin-top: 100px;" @click="navigatorTo('merchant')">商家入驻</view> |
|
|
<view style="margin-top: 100px;" @click="navigatorTo('merchantCenter')">商家中心</view> |
|
|
<view style="margin-top: 100px;" @click="navigatorTo('merchantCenter')">商家中心-{{shopCounts}}</view> |
|
|
<view style="margin-top: 100px;" @click="navigatorTo('jianzhizhuce')">兼职注册</view> |
|
|
<view style="margin-top: 100px;" @click="navigatorTo('jianzhizhuce')">兼职注册</view> |
|
|
<view style="margin-top: 100px;" v-if="worker" @click="navigatorTo('jianzhizhuye')">兼职主页</view> |
|
|
<view style="margin-top: 100px;" v-if="worker" @click="navigatorTo('jianzhizhuye')">兼职主页-{{workerCounts}}</view> |
|
|
<!-- 未注册兼职弹窗 --> |
|
|
<!-- 未注册兼职弹窗 --> |
|
|
<uni-popup ref="jianzhiPopup" background-color="rgba(2, 171, 255, 1)" borderRadius="40px 40px 40px 40px"> |
|
|
<uni-popup ref="jianzhiPopup" background-color="rgba(2, 171, 255, 1)" borderRadius="40px 40px 40px 40px"> |
|
|
<view class="jianzhi-content" @tap="navigatorTo('partTimeReg')"> |
|
|
<view class="jianzhi-content" @tap="navigatorTo('partTimeReg')"> |
|
|
@ -33,6 +33,8 @@ |
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
|
schoolShop:[], |
|
|
schoolShop:[], |
|
|
|
|
|
workerCounts:0, |
|
|
|
|
|
shopCounts:0, |
|
|
worker:uni.getStorageSync('worker') |
|
|
worker:uni.getStorageSync('worker') |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
@ -46,6 +48,55 @@ |
|
|
init(){ |
|
|
init(){ |
|
|
console.log("我的初始化") |
|
|
console.log("我的初始化") |
|
|
this.schoolShop = uni.getStorageSync('schoolShop') |
|
|
this.schoolShop = uni.getStorageSync('schoolShop') |
|
|
|
|
|
this.worker = uni.getStorageSync('worker') |
|
|
|
|
|
let shopId = uni.getStorageSync('shopId') |
|
|
|
|
|
let worker = uni.getStorageSync('worker') |
|
|
|
|
|
this.workerCounts = 0 |
|
|
|
|
|
this.shopCounts = 0 |
|
|
|
|
|
if(worker){ |
|
|
|
|
|
this.tui.request("/mall/delivery/countOrderByStatus", "POST", {workerId:uni.getStorageSync('worker').workerId,regionId:JSON.parse(uni.getStorageSync('area')).id}, false, true).then((res) => { |
|
|
|
|
|
if (res.code == 200) { |
|
|
|
|
|
if(res.result != null){ |
|
|
|
|
|
for(let i = 0;i<res.result.length;i++){ |
|
|
|
|
|
if(res.result[i].status == 3){ |
|
|
|
|
|
this.workerCounts = Number(res.result[i].orderCount) |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
that.$forceUpdate(); |
|
|
|
|
|
} else { |
|
|
|
|
|
that.tui.toast(res.message); |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
uni.hideLoading(); |
|
|
|
|
|
}).catch((res) => {}); |
|
|
|
|
|
} |
|
|
|
|
|
if(shopId){ |
|
|
|
|
|
this.tui.request("/mall/order/countByShop/"+uni.getStorageSync('shopId'), "GET", {}, false, true).then((res) => { |
|
|
|
|
|
if (res.code == 200) { |
|
|
|
|
|
this.shopData = res.result |
|
|
|
|
|
for(let i=0;i<this.shopData.orderStatusCount.length;i++){ |
|
|
|
|
|
if(this.shopData.orderStatusCount[i].counttype){ |
|
|
|
|
|
if(this.shopData.orderStatusCount[i].counttype == 'daisong'){ |
|
|
|
|
|
this.shopCounts += Number(this.shopData.orderStatusCount[i].count) |
|
|
|
|
|
}else if(this.shopData.orderStatusCount[i].counttype == 'daiqu'){ |
|
|
|
|
|
this.shopCounts += Number(this.shopData.orderStatusCount[i].count) |
|
|
|
|
|
}else if(this.shopData.orderStatusCount[i].counttype == 'daixiaofei'){ |
|
|
|
|
|
this.shopCounts += Number(this.shopData.orderStatusCount[i].count) |
|
|
|
|
|
}else if(this.shopData.orderStatusCount[i].counttype == 'daichucan'){ |
|
|
|
|
|
this.shopCounts += Number(this.shopData.orderStatusCount[i].count) |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
this.shopCounts += Number(this.shopData.pendingBadReviewCount) |
|
|
|
|
|
this.shopCounts += Number(this.shopData.refundCount) |
|
|
|
|
|
that.$forceUpdate(); |
|
|
|
|
|
} else { |
|
|
|
|
|
this.tui.toast(res.message) |
|
|
|
|
|
} |
|
|
|
|
|
uni.hideLoading() |
|
|
|
|
|
}).catch((res) => {}) |
|
|
|
|
|
} |
|
|
}, |
|
|
}, |
|
|
clickShop(item){ |
|
|
clickShop(item){ |
|
|
uni.setStorageSync('shopId',item.id) |
|
|
uni.setStorageSync('shopId',item.id) |
|
|
@ -115,7 +166,7 @@ |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
}else if(e=='jianzhizhuye'){ |
|
|
}else if(e=='jianzhizhuye'){ |
|
|
url = '/package2/partTimeJob/partTimeJobCenter' |
|
|
url = '/package2/partTimeJob/partTimeJobCenter?type=worker' |
|
|
} |
|
|
} |
|
|
uni.navigateTo({ |
|
|
uni.navigateTo({ |
|
|
url: url |
|
|
url: url |
|
|
|