|
|
@@ -3,8 +3,8 @@
|
|
|
<view class="content-box">
|
|
|
<view class="user-section">
|
|
|
<view class="avatar" @click="navTo('/pages/set/userinfo')">
|
|
|
- <image class="image" :src="userInfo.avatar|| urlFile+`/static/error/missing-face.png`"
|
|
|
- mode="scaleToFill"></image>
|
|
|
+ <image class="image" v-if="userInfo.avatar" :src="userInfo.avatar" mode="scaleToFill"></image>
|
|
|
+ <image class="image" v-else src="../../static/error/missing-face.png" mode="scaleToFill"></image>
|
|
|
</view>
|
|
|
<view class="flex-center phone">
|
|
|
{{userInfo.nickname || '游客'}}
|
|
|
@@ -27,8 +27,7 @@
|
|
|
</view>
|
|
|
|
|
|
<view class="cover-container">
|
|
|
-
|
|
|
- <view class="item-box">
|
|
|
+ <view class="item-box" v-if="userInfo.adminid">
|
|
|
<view class="box-title flex">
|
|
|
<view class="title"><text>配送员订单</text></view>
|
|
|
<view class="link flex" @click="navTo('/pages/user/admin/orderAdmin?state=0')"
|
|
|
@@ -43,8 +42,8 @@
|
|
|
<view class=" icon position-relative">
|
|
|
<image class="icon-img" src="../../static/icon/userorder1.png" mode="aspectFit">
|
|
|
</image>
|
|
|
- <view class="corner" v-if="userInfo.unpaid_count > 0">
|
|
|
- <text>{{ userInfo.unpaid_count }}</text>
|
|
|
+ <view class="corner" v-if="shopOrderDetail.unpaid_count > 0">
|
|
|
+ <text>{{ shopOrderDetail.unpaid_count }}</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
<text>待付款</text>
|
|
|
@@ -54,11 +53,11 @@
|
|
|
<view class="icon position-relative">
|
|
|
<image class="icon-img" src="../../static/icon/userorder2.png" mode="aspectFit">
|
|
|
</image>
|
|
|
- <view class="corner" v-if="userInfo.received_count > 0">
|
|
|
- <text>{{ userInfo.received_count }}</text>
|
|
|
+ <view class="corner" v-if="shopOrderDetail.unshipped_count > 0">
|
|
|
+ <text>{{ shopOrderDetail.unshipped_count }}</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <text>待核销</text>
|
|
|
+ <text>待发货</text>
|
|
|
</view>
|
|
|
<view class="order-item flex-line" @click="navTo('/pages/user/admin/orderAdmin?state=2')"
|
|
|
hover-class="common-hover" :hover-stay-time="50">
|
|
|
@@ -72,7 +71,7 @@
|
|
|
</view>
|
|
|
<view class="listBox">
|
|
|
<view class="list">
|
|
|
- <view class="flex listItem" @click="navTo('/pages/user_home/shareQrCode')">
|
|
|
+ <view v-if="userInfo.adminid" class="flex listItem" @click="navTo('/pages/user_home/shareQrCode')">
|
|
|
<view class="flex titleBox">
|
|
|
<image class="listIconImg" src="../../static/icon/usersm.png" mode="widthFix"></image>
|
|
|
<text class="title">扫码核销</text>
|
|
|
@@ -82,7 +81,7 @@
|
|
|
<image class="img" src="../../static/icon/next1.png" mode="widthFix"></image>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="flex listItem" @click="navTo('/pages/user/admin/useradmin')">
|
|
|
+ <view v-if="userInfo.adminid" class="flex listItem" @click="navTo('/pages/user/admin/useradmin')">
|
|
|
<view class="flex titleBox">
|
|
|
<image class="listIconImg" src="../../static/icon/useryh.png" mode="widthFix"></image>
|
|
|
<text class="title">用户管理</text>
|
|
|
@@ -92,7 +91,7 @@
|
|
|
<image class="img" src="../../static/icon/next1.png" mode="widthFix"></image>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="flex listItem" @click="navTo('/pages/user/admin/ktadmin')">
|
|
|
+ <view v-if="userInfo.adminid" class="flex listItem" @click="navTo('/pages/user/admin/ktadmin')">
|
|
|
<view class="flex titleBox">
|
|
|
<image class="listIconImg" src="../../static/icon/userkt.png" mode="widthFix"></image>
|
|
|
<text class="title">空桶管理</text>
|
|
|
@@ -174,6 +173,9 @@
|
|
|
import {
|
|
|
getUser
|
|
|
} from '@/api/user.js';
|
|
|
+ import {
|
|
|
+ adminStatistics
|
|
|
+ } from '@/api/water.js';
|
|
|
import {
|
|
|
articleList,
|
|
|
notify,
|
|
|
@@ -196,8 +198,8 @@
|
|
|
},
|
|
|
computed: {
|
|
|
...mapState('user', ['userInfo', 'orderInfo', 'hasLogin']),
|
|
|
+ ...mapState('shop', ['shopOrderDetail']),
|
|
|
...mapState(['baseURL', 'urlFile']),
|
|
|
- ...mapState(['fx']),
|
|
|
// 总消息条数
|
|
|
notic() {
|
|
|
return this.user.question_sum + this.user.notice_sum;
|
|
|
@@ -216,6 +218,7 @@
|
|
|
},
|
|
|
methods: {
|
|
|
...mapMutations('user', ['setUserInfo']),
|
|
|
+ ...mapMutations('shop', ['setShopOrder']),
|
|
|
qhx() {
|
|
|
let that = this
|
|
|
if (that.hxLoading) {
|
|
|
@@ -343,12 +346,23 @@
|
|
|
})
|
|
|
},
|
|
|
//#endif
|
|
|
+ // 获取订单信息
|
|
|
+ adminStatistics(){
|
|
|
+ adminStatistics({}).then((e) => {
|
|
|
+ this.setShopOrder(e.data)
|
|
|
+ }).catch((e) => {
|
|
|
+ console.log(e, 'sj');
|
|
|
+ })
|
|
|
+ },
|
|
|
// 获取用户数据
|
|
|
getUser() {
|
|
|
console.log('data')
|
|
|
const that = this;
|
|
|
getUser({}).then((e) => {
|
|
|
- this.setUserInfo(e.data)
|
|
|
+ that.setUserInfo(e.data)
|
|
|
+ if(e.data.adminid){
|
|
|
+ that.adminStatistics()
|
|
|
+ }
|
|
|
}).catch((e) => {
|
|
|
console.log(e, 'sj');
|
|
|
})
|