|
|
@ -1,11 +1,26 @@ |
|
|
|
<template> |
|
|
|
<template> |
|
|
|
<view class="user"> |
|
|
|
<view class="user"> |
|
|
|
<view v-if="$store.getters.token || userInfo.uid"> |
|
|
|
<view v-if="$store.getters.token || userInfo.uid"> |
|
|
|
<view class="getUserBaseData header bg-color-red acea-row row-between-wrapper" v-if="!userInfo.avatar && !userInfo.nickname"> |
|
|
|
<view |
|
|
|
<button class="userDataBtn" v-if="canIUseGetUserProfile" @tap="getUserInfoProfile">授权并查看用户信息</button> |
|
|
|
class="getUserBaseData header bg-color-red acea-row row-between-wrapper" |
|
|
|
<button class="userDataBtn" v-else @getuserinfo="getUserInfo" open-type="getUserInfo">授权并查看用户信息</button> |
|
|
|
v-if="!userInfo.avatar && !userInfo.nickname" |
|
|
|
</view> |
|
|
|
> |
|
|
|
<view class="header bg-color-red acea-row row-between-wrapper" v-else> |
|
|
|
<button |
|
|
|
|
|
|
|
class="userDataBtn" |
|
|
|
|
|
|
|
v-if="canIUseGetUserProfile" |
|
|
|
|
|
|
|
@tap="getUserInfoProfile" |
|
|
|
|
|
|
|
>授权并查看用户信息</button> |
|
|
|
|
|
|
|
<button |
|
|
|
|
|
|
|
class="userDataBtn" |
|
|
|
|
|
|
|
v-else |
|
|
|
|
|
|
|
@getuserinfo="getUserInfo" |
|
|
|
|
|
|
|
open-type="getUserInfo" |
|
|
|
|
|
|
|
>授权并查看用户信息</button> |
|
|
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
<view |
|
|
|
|
|
|
|
class="header bg-color-red acea-row row-between-wrapper" |
|
|
|
|
|
|
|
v-else |
|
|
|
|
|
|
|
> |
|
|
|
<view class="picTxt acea-row row-between-wrapper"> |
|
|
|
<view class="picTxt acea-row row-between-wrapper"> |
|
|
|
<view class="pictrue"> |
|
|
|
<view class="pictrue"> |
|
|
|
<image :src="userInfo.avatar" /> |
|
|
|
<image :src="userInfo.avatar" /> |
|
|
@ -13,12 +28,19 @@ |
|
|
|
<view class="text"> |
|
|
|
<view class="text"> |
|
|
|
<view class="acea-row row-middle"> |
|
|
|
<view class="acea-row row-middle"> |
|
|
|
<view class="name line1">{{ userInfo.nickname }}</view> |
|
|
|
<view class="name line1">{{ userInfo.nickname }}</view> |
|
|
|
<view class="member acea-row row-middle" v-if="userInfo.vip"> |
|
|
|
<view |
|
|
|
|
|
|
|
class="member acea-row row-middle" |
|
|
|
|
|
|
|
v-if="userInfo.vip" |
|
|
|
|
|
|
|
> |
|
|
|
<image :src="userInfo.vipIcon" /> |
|
|
|
<image :src="userInfo.vipIcon" /> |
|
|
|
<text>{{ userInfo.vipName }}</text> |
|
|
|
<text>{{ userInfo.vipName }}</text> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view @click="goPersonalData()" class="id" v-if="userInfo.phone"> |
|
|
|
<view |
|
|
|
|
|
|
|
@click="goPersonalData()" |
|
|
|
|
|
|
|
class="id" |
|
|
|
|
|
|
|
v-if="userInfo.phone" |
|
|
|
|
|
|
|
> |
|
|
|
<text>ID:{{ userInfo.uid || 0 }}</text> |
|
|
|
<text>ID:{{ userInfo.uid || 0 }}</text> |
|
|
|
<text class="iconfont icon-bianji1"></text> |
|
|
|
<text class="iconfont icon-bianji1"></text> |
|
|
|
</view> |
|
|
|
</view> |
|
|
@ -35,23 +57,40 @@ |
|
|
|
<!-- #endif --> |
|
|
|
<!-- #endif --> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<text class="iconfont icon-shezhi" @click="goPersonalData()"></text> |
|
|
|
<text |
|
|
|
|
|
|
|
class="iconfont icon-shezhi" |
|
|
|
|
|
|
|
@click="goPersonalData()" |
|
|
|
|
|
|
|
></text> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="wrapper"> |
|
|
|
<view class="wrapper"> |
|
|
|
<view class="nav acea-row row-middle"> |
|
|
|
<view class="nav acea-row row-middle"> |
|
|
|
<view @click="goUserAccount()" class="item"> |
|
|
|
<view |
|
|
|
|
|
|
|
@click="goUserAccount()" |
|
|
|
|
|
|
|
class="item" |
|
|
|
|
|
|
|
> |
|
|
|
<text>我的余额</text> |
|
|
|
<text>我的余额</text> |
|
|
|
<text class="num">{{ userInfo.nowMoney || 0 }}</text> |
|
|
|
<text class="num">{{ userInfo.nowMoney || 0 }}</text> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view @click="goUserPromotion()" class="item" v-if="userInfo.isPromoter === 1 || userInfo.statu === 2"> |
|
|
|
<view |
|
|
|
|
|
|
|
@click="goUserPromotion()" |
|
|
|
|
|
|
|
class="item" |
|
|
|
|
|
|
|
v-if="userInfo.isPromoter === 1 || userInfo.statu === 2" |
|
|
|
|
|
|
|
> |
|
|
|
<text>当前佣金</text> |
|
|
|
<text>当前佣金</text> |
|
|
|
<text class="num">{{ userInfo.brokeragePrice || 0 }}</text> |
|
|
|
<text class="num">{{ userInfo.brokeragePrice || 0 }}</text> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view @click="goIntegral()" class="item" v-else> |
|
|
|
<view |
|
|
|
|
|
|
|
@click="goIntegral()" |
|
|
|
|
|
|
|
class="item" |
|
|
|
|
|
|
|
v-else |
|
|
|
|
|
|
|
> |
|
|
|
<text>当前积分</text> |
|
|
|
<text>当前积分</text> |
|
|
|
<text class="num">{{ userInfo.integral || 0 }}</text> |
|
|
|
<text class="num">{{ userInfo.integral || 0 }}</text> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view @click="goUserCoupon()" class="item"> |
|
|
|
<view |
|
|
|
|
|
|
|
@click="goUserCoupon()" |
|
|
|
|
|
|
|
class="item" |
|
|
|
|
|
|
|
> |
|
|
|
<text>优惠券</text> |
|
|
|
<text>优惠券</text> |
|
|
|
<text class="num">{{ userInfo.couponCount || 0 }}</text> |
|
|
|
<text class="num">{{ userInfo.couponCount || 0 }}</text> |
|
|
|
</view> |
|
|
|
</view> |
|
|
@ -59,44 +98,80 @@ |
|
|
|
<view class="myOrder"> |
|
|
|
<view class="myOrder"> |
|
|
|
<view class="title acea-row row-between-wrapper"> |
|
|
|
<view class="title acea-row row-between-wrapper"> |
|
|
|
<text>我的订单</text> |
|
|
|
<text>我的订单</text> |
|
|
|
<text @click="goMyOrder()" class="allOrder"> |
|
|
|
<text |
|
|
|
|
|
|
|
@click="goMyOrder()" |
|
|
|
|
|
|
|
class="allOrder" |
|
|
|
|
|
|
|
> |
|
|
|
<text>全部订单</text> |
|
|
|
<text>全部订单</text> |
|
|
|
<text class="iconfont icon-jiantou"></text> |
|
|
|
<text class="iconfont icon-jiantou"></text> |
|
|
|
</text> |
|
|
|
</text> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="orderState acea-row row-middle" v-if="userInfo.orderStatusNum !== undefined || userInfo.orderStatusNum !== null"> |
|
|
|
<view |
|
|
|
<view @click="goMyOrder(0)" class="item"> |
|
|
|
class="orderState acea-row row-middle" |
|
|
|
|
|
|
|
v-if="userInfo.orderStatusNum !== undefined || userInfo.orderStatusNum !== null" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<view |
|
|
|
|
|
|
|
@click="goMyOrder(0)" |
|
|
|
|
|
|
|
class="item" |
|
|
|
|
|
|
|
> |
|
|
|
<view class="pictrue"> |
|
|
|
<view class="pictrue"> |
|
|
|
<image :src="`${$VUE_APP_RESOURCES_URL}/images/dfk.png`" /> |
|
|
|
<image :src="`${$VUE_APP_RESOURCES_URL}/images/dfk.png`" /> |
|
|
|
<text class="order-status-num" v-if="userInfo.orderStatusNum.unpaidCount > 0">{{ userInfo.orderStatusNum.unpaidCount }}</text> |
|
|
|
<text |
|
|
|
|
|
|
|
class="order-status-num" |
|
|
|
|
|
|
|
v-if="userInfo.orderStatusNum.unpaidCount > 0" |
|
|
|
|
|
|
|
>{{ userInfo.orderStatusNum.unpaidCount }}</text> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view>待付款</view> |
|
|
|
<view>待付款</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view @click="goMyOrder(1)" class="item"> |
|
|
|
<view |
|
|
|
|
|
|
|
@click="goMyOrder(1)" |
|
|
|
|
|
|
|
class="item" |
|
|
|
|
|
|
|
> |
|
|
|
<view class="pictrue"> |
|
|
|
<view class="pictrue"> |
|
|
|
<image :src="`${$VUE_APP_RESOURCES_URL}/images/dfh.png`" /> |
|
|
|
<image :src="`${$VUE_APP_RESOURCES_URL}/images/dfh.png`" /> |
|
|
|
<text class="order-status-num" v-if="userInfo.orderStatusNum.unshippedCount > 0">{{ userInfo.orderStatusNum.unshippedCount }}</text> |
|
|
|
<text |
|
|
|
|
|
|
|
class="order-status-num" |
|
|
|
|
|
|
|
v-if="userInfo.orderStatusNum.unshippedCount > 0" |
|
|
|
|
|
|
|
>{{ userInfo.orderStatusNum.unshippedCount }}</text> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view>待发货</view> |
|
|
|
<view>待发货</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view @click="goMyOrder(2)" class="item"> |
|
|
|
<view |
|
|
|
|
|
|
|
@click="goMyOrder(2)" |
|
|
|
|
|
|
|
class="item" |
|
|
|
|
|
|
|
> |
|
|
|
<view class="pictrue"> |
|
|
|
<view class="pictrue"> |
|
|
|
<image :src="`${$VUE_APP_RESOURCES_URL}/images/dsh.png`" /> |
|
|
|
<image :src="`${$VUE_APP_RESOURCES_URL}/images/dsh.png`" /> |
|
|
|
<text class="order-status-num" v-if="userInfo.orderStatusNum.receivedCount > 0">{{ userInfo.orderStatusNum.receivedCount }}</text> |
|
|
|
<text |
|
|
|
|
|
|
|
class="order-status-num" |
|
|
|
|
|
|
|
v-if="userInfo.orderStatusNum.receivedCount > 0" |
|
|
|
|
|
|
|
>{{ userInfo.orderStatusNum.receivedCount }}</text> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<text>待收货</text> |
|
|
|
<text>待收货</text> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view @click="goMyOrder(3)" class="item"> |
|
|
|
<view |
|
|
|
|
|
|
|
@click="goMyOrder(3)" |
|
|
|
|
|
|
|
class="item" |
|
|
|
|
|
|
|
> |
|
|
|
<view class="pictrue"> |
|
|
|
<view class="pictrue"> |
|
|
|
<image :src="`${$VUE_APP_RESOURCES_URL}/images/dpj.png`" /> |
|
|
|
<image :src="`${$VUE_APP_RESOURCES_URL}/images/dpj.png`" /> |
|
|
|
<text class="order-status-num" v-if="userInfo.orderStatusNum.evaluatedCount > 0">{{ userInfo.orderStatusNum.evaluatedCount }}</text> |
|
|
|
<text |
|
|
|
|
|
|
|
class="order-status-num" |
|
|
|
|
|
|
|
v-if="userInfo.orderStatusNum.evaluatedCount > 0" |
|
|
|
|
|
|
|
>{{ userInfo.orderStatusNum.evaluatedCount }}</text> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<text>待评价</text> |
|
|
|
<text>待评价</text> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view @click="goReturnList()" class="item"> |
|
|
|
<view |
|
|
|
|
|
|
|
@click="goReturnList()" |
|
|
|
|
|
|
|
class="item" |
|
|
|
|
|
|
|
> |
|
|
|
<view class="pictrue"> |
|
|
|
<view class="pictrue"> |
|
|
|
<image :src="`${$VUE_APP_RESOURCES_URL}/images/sh.png`" /> |
|
|
|
<image :src="`${$VUE_APP_RESOURCES_URL}/images/sh.png`" /> |
|
|
|
<text class="order-status-num" v-if="userInfo.orderStatusNum.refundCount > 0">{{ userInfo.orderStatusNum.refundCount }}</text> |
|
|
|
<text |
|
|
|
|
|
|
|
class="order-status-num" |
|
|
|
|
|
|
|
v-if="userInfo.orderStatusNum.refundCount > 0" |
|
|
|
|
|
|
|
>{{ userInfo.orderStatusNum.refundCount }}</text> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<text>售后/退款</text> |
|
|
|
<text>售后/退款</text> |
|
|
|
</view> |
|
|
|
</view> |
|
|
@ -105,7 +180,11 @@ |
|
|
|
<view class="myService"> |
|
|
|
<view class="myService"> |
|
|
|
<view class="serviceList acea-row row-middle"> |
|
|
|
<view class="serviceList acea-row row-middle"> |
|
|
|
<template v-for="(item, MyMenusIndex) in MyMenus"> |
|
|
|
<template v-for="(item, MyMenusIndex) in MyMenus"> |
|
|
|
<view class="item" :key="MyMenusIndex" @click="goPages(MyMenusIndex)"> |
|
|
|
<view |
|
|
|
|
|
|
|
class="item" |
|
|
|
|
|
|
|
:key="MyMenusIndex" |
|
|
|
|
|
|
|
@click="goPages(MyMenusIndex)" |
|
|
|
|
|
|
|
> |
|
|
|
<view class="pictrue"> |
|
|
|
<view class="pictrue"> |
|
|
|
<image :src="item.pic" /> |
|
|
|
<image :src="item.pic" /> |
|
|
|
</view> |
|
|
|
</view> |
|
|
@ -127,7 +206,10 @@ |
|
|
|
:login_type="userInfo.login_type" |
|
|
|
:login_type="userInfo.login_type" |
|
|
|
></SwitchWindow>--> |
|
|
|
></SwitchWindow>--> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<Authorization v-else /> |
|
|
|
<Authorization |
|
|
|
|
|
|
|
v-else |
|
|
|
|
|
|
|
ref="authorization" |
|
|
|
|
|
|
|
/> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
<script> |
|
|
|
<script> |
|
|
@ -147,7 +229,7 @@ export default { |
|
|
|
Authorization, |
|
|
|
Authorization, |
|
|
|
}, |
|
|
|
}, |
|
|
|
props: {}, |
|
|
|
props: {}, |
|
|
|
data: function() { |
|
|
|
data: function () { |
|
|
|
return { |
|
|
|
return { |
|
|
|
canIUseGetUserProfile: false, |
|
|
|
canIUseGetUserProfile: false, |
|
|
|
MyMenus: [], |
|
|
|
MyMenus: [], |
|
|
@ -160,6 +242,9 @@ export default { |
|
|
|
if (wx.getUserProfile) { |
|
|
|
if (wx.getUserProfile) { |
|
|
|
this.canIUseGetUserProfile = true |
|
|
|
this.canIUseGetUserProfile = true |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if (!this.$store.getters.token && !this.userInfo.uid) { |
|
|
|
|
|
|
|
this.$refs.authorization.getLoginCode() |
|
|
|
|
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
methods: { |
|
|
|
...mapMutations(['updateAuthorizationPage']), |
|
|
|
...mapMutations(['updateAuthorizationPage']), |
|
|
@ -428,6 +513,7 @@ export default { |
|
|
|
color: rgba(255, 255, 255, 1); |
|
|
|
color: rgba(255, 255, 255, 1); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.footer-line-height { |
|
|
|
.footer-line-height { |
|
|
|
height: 1 * 100rpx; |
|
|
|
height: 1 * 100rpx; |
|
|
|
} |
|
|
|
} |
|
|
|