|
|
|
@ -12,11 +12,11 @@ |
|
|
|
|
<view class="image-text_1" v-if="!isLogin" @click="goLogin()"> |
|
|
|
|
未登录 |
|
|
|
|
</view> |
|
|
|
|
<view v-else class="image-text_1"> |
|
|
|
|
<button class="avatar-wrapper" v-else @click="onChooseAvatar"> |
|
|
|
|
<text lines="1" class="text-group_1">{{userInfo.nick_name}}</text> |
|
|
|
|
<image :src="$picUrl+'/static/user/weChat.png'" class="thumbnail_1"></image> |
|
|
|
|
</view> |
|
|
|
|
<view class="text-wrapper_1" v-if="isLogin"> |
|
|
|
|
</button> |
|
|
|
|
<view class="text-wrapper_1" v-if="isLogin" @click="wechatLogin"> |
|
|
|
|
<text lines="1" class="text_1" v-if="userInfo.user_type==40">店长</text> |
|
|
|
|
<text lines="1" class="text_1" v-else-if="userInfo.user_type==30">分销</text> |
|
|
|
|
<text lines="1" class="text_1" v-else-if="userInfo.user_type==20">Plus会员</text> |
|
|
|
@ -35,7 +35,7 @@ |
|
|
|
|
<text lines="1" class="text_3">会员码</text> |
|
|
|
|
</view> |
|
|
|
|
<!-- 、 --> |
|
|
|
|
<view class="group_5" @click="lookMemberCode('3')" v-if="userInfo.user_type == 30"> |
|
|
|
|
<view class="group_5" @click="lookMemberCode('3')" v-if="userInfo.user_type == 30"> |
|
|
|
|
<image :src="$picUrl+'/static/user/code.png'" class="thumbnail_3"></image> |
|
|
|
|
<text lines="1" class="text_4">分销码</text> |
|
|
|
|
</view> |
|
|
|
@ -170,8 +170,7 @@ |
|
|
|
|
<view class="goodsManage"> |
|
|
|
|
<view class="manageTitle"> |
|
|
|
|
<text lines="1" class="text_5 titleLeft">商品订单</text> |
|
|
|
|
<text lines="1" class="text_6 titleRight" |
|
|
|
|
@click="goGoodsOrder('all')">查看全部</text> |
|
|
|
|
<text lines="1" class="text_6 titleRight" @click="goGoodsOrder('all')">查看全部</text> |
|
|
|
|
<u-icon style="margin-left: 5rpx; color: #909090; margin-top: -5rpx;" name="arrow-right"></u-icon> |
|
|
|
|
</view> |
|
|
|
|
<view class="grounding goodsOrder"> |
|
|
|
@ -535,10 +534,10 @@ |
|
|
|
|
<text |
|
|
|
|
style="color: #949494;font-size: 22rpx;text-decoration: line-through;">¥{{item.line_price_max}}</text> |
|
|
|
|
</view> |
|
|
|
|
<view class="comment"> |
|
|
|
|
<!-- <view class="comment"> |
|
|
|
|
<text>{{item.goods_sales}}条评论</text> |
|
|
|
|
<text style="margin-left:20rpx;">{{item.remaizhishu}}%好评率</text> |
|
|
|
|
</view> |
|
|
|
|
</view> --> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
@ -611,9 +610,20 @@ |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
goShopOrderList(){ |
|
|
|
|
onChooseAvatar(e) { |
|
|
|
|
uni.getUserProfile({ |
|
|
|
|
desc: 'Wexin', // 这个参数是必须的 |
|
|
|
|
success: res => { |
|
|
|
|
let rawData = JSON.parse(res.rawData) |
|
|
|
|
this.userInfo.avatar_url = rawData.avatarUrl; |
|
|
|
|
this.userInfo.nick_name = rawData.nickName; |
|
|
|
|
console.log("用户信息", JSON.parse(res.rawData)) |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
goShopOrderList() { |
|
|
|
|
uni.navigateTo({ |
|
|
|
|
url:'/pages/news3/shopOrder?delivery_type=10' |
|
|
|
|
url: '/pages/news3/shopOrder?delivery_type=10' |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
goDealer(type) { |
|
|
|
@ -657,19 +667,19 @@ |
|
|
|
|
}) |
|
|
|
|
.then(result => { |
|
|
|
|
let data = result.data.userInfo |
|
|
|
|
console.log("data.user_id",data.user_id) |
|
|
|
|
console.log("data.user_id", data.user_id) |
|
|
|
|
// data.qrcode = createQrCodeImg(data.user_id.toString(), { |
|
|
|
|
// 'size': 500 |
|
|
|
|
// }); |
|
|
|
|
console.log(data) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
that.userInfo = data |
|
|
|
|
that.getOrderInfo(); |
|
|
|
|
that.getActionCountsInfo(); |
|
|
|
|
uni.setStorageSync('userInfo', that.userInfo) |
|
|
|
|
if(data.user_type == 20){ |
|
|
|
|
if (data.user_type == 20) { |
|
|
|
|
that.getMembershipInviteQrcode() |
|
|
|
|
}else if(data.user_type == 30){ |
|
|
|
|
} else if (data.user_type == 30) { |
|
|
|
|
that.getDealerInviteQrcode() |
|
|
|
|
} |
|
|
|
|
// that.getMembershipInviteQrcode() |
|
|
|
@ -845,7 +855,7 @@ |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
this.lookMemberType = val; |
|
|
|
|
this.qrcode = val ==2?this.inviteQrcode:this.dealerInviteQrcode; |
|
|
|
|
this.qrcode = val == 2 ? this.inviteQrcode : this.dealerInviteQrcode; |
|
|
|
|
this.memberCode = true; |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
@ -867,7 +877,7 @@ |
|
|
|
|
// 我的订单 |
|
|
|
|
if (this.userInfo.user_type == 40) { |
|
|
|
|
uni.navigateTo({ |
|
|
|
|
url: '/pages/news3/shopOrder?dataType='+val |
|
|
|
|
url: '/pages/news3/shopOrder?dataType=' + val |
|
|
|
|
}) |
|
|
|
|
} else { |
|
|
|
|
uni.navigateTo({ |
|
|
|
@ -1080,8 +1090,20 @@ |
|
|
|
|
align-items: center; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.avatar-wrapper { |
|
|
|
|
width: 286rpx; |
|
|
|
|
height: 50rpx; |
|
|
|
|
margin-left: 2rpx; |
|
|
|
|
display: flex; |
|
|
|
|
align-items: center; |
|
|
|
|
background: none; |
|
|
|
|
padding: 0; |
|
|
|
|
margin: 0; |
|
|
|
|
border: none; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.text-group_1 { |
|
|
|
|
width: 232rpx; |
|
|
|
|
// width: 232rpx; |
|
|
|
|
height: 50rpx; |
|
|
|
|
overflow-wrap: break-word; |
|
|
|
|
color: rgba(0, 0, 0, 1); |
|
|
|
|