|
|
|
@ -1,17 +1,24 @@ |
|
|
|
|
<template> |
|
|
|
|
<view class="page"> |
|
|
|
|
<view > |
|
|
|
|
<u-navbar title="" :background="background"></u-navbar> |
|
|
|
|
</view> |
|
|
|
|
<view class="section_1"> |
|
|
|
|
<view class="box_1"> |
|
|
|
|
<image src="/static/default-logo.png" class="image_2"></image> |
|
|
|
|
<view class="group_1"> |
|
|
|
|
<view class="image-text_1"> |
|
|
|
|
<text lines="1" class="text-group_1">18034562920</text> |
|
|
|
|
<image src="/static/user/weChat.png" class="thumbnail_1"></image> |
|
|
|
|
<view class="image-text_1" v-if="isLogin"> |
|
|
|
|
<text lines="1" class="text-group_1">{{userInfo.nick_name}}</text> |
|
|
|
|
<image :src="userInfo.avatar_url" class="thumbnail_1"></image> |
|
|
|
|
</view> |
|
|
|
|
<view class="image-text_1" v-if="!isLogin" @click="goLogin"> |
|
|
|
|
未登录 |
|
|
|
|
</view> |
|
|
|
|
<view class="text-wrapper_1"> |
|
|
|
|
<text lines="1" class="text_1" v-if="userType==1">店长</text> |
|
|
|
|
<text lines="1" class="text_1" v-else-if="userType==2">Plus会员</text> |
|
|
|
|
<text lines="1" class="text_1" v-else-if="userType==3">分销</text> |
|
|
|
|
<view class="text-wrapper_1" v-if="isLogin"> |
|
|
|
|
<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> |
|
|
|
|
<text lines="1" class="text_1" v-else-if="userInfo.user_type==10">游客</text> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="group_2"> |
|
|
|
@ -22,7 +29,7 @@ |
|
|
|
|
<image src="/static/user/code.png" class="thumbnail_2"></image> |
|
|
|
|
<text lines="1" class="text_3">会员码</text> |
|
|
|
|
</view> |
|
|
|
|
<view class="group_5" v-if="userType!=2" @click="lookMemberCode('3')"> |
|
|
|
|
<view class="group_5" v-if="userInfo.user_type!=20&&userInfo.user_type!=10" @click="lookMemberCode('3')"> |
|
|
|
|
<image src="/static/user/code.png" class="thumbnail_3"></image> |
|
|
|
|
<text lines="1" class="text_4">分销码</text> |
|
|
|
|
</view> |
|
|
|
@ -48,7 +55,7 @@ |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
</view> --> |
|
|
|
|
<view class="newplus" v-if="userType!=3&&userType!=1"> |
|
|
|
|
<view class="newplus" v-if="userInfo.user_type!=30&&userInfo.user_type!=40"> |
|
|
|
|
<view class="memVip" @click="goMember"> |
|
|
|
|
<view class="vipLine"> |
|
|
|
|
<image src="/static/user/vip.png" mode="" class="vipIcon"></image> |
|
|
|
@ -72,7 +79,7 @@ |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="goodsManage" v-if="userType==1"> |
|
|
|
|
<view class="goodsManage" v-if="userInfo.user_type==40"> |
|
|
|
|
<view class="manageTitle"> |
|
|
|
|
<text lines="1" class="text_5 titleLeft">商品管理</text> |
|
|
|
|
<text lines="1" class="text_6 titleRight">查看全部</text> |
|
|
|
@ -80,7 +87,7 @@ |
|
|
|
|
src="https://lanhu.oss-cn-beijing.aliyuncs.com/FigmaDDSSlicePNG734520a67fe8e1d927b6d6e351bd2ade.png" |
|
|
|
|
class="thumbnail_4"></image> |
|
|
|
|
</view> |
|
|
|
|
<view class="grounding" v-if="userType==1"> |
|
|
|
|
<view class="grounding" v-if="userInfo.user_type==1"> |
|
|
|
|
<view class="image-text_2"> |
|
|
|
|
<image src="/static/user/shelf.png" class="label_1"></image> |
|
|
|
|
<view class="text-group_2"> |
|
|
|
@ -98,7 +105,7 @@ |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="userSell" v-if="userType==1"> |
|
|
|
|
<view class="userSell" v-if="userInfo.user_type==40"> |
|
|
|
|
<view class="sell"> |
|
|
|
|
会员分销 |
|
|
|
|
</view> |
|
|
|
@ -112,7 +119,7 @@ |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="coupon" v-if="userType!=1"> |
|
|
|
|
<view class="coupon" v-if="userInfo.user_type!=40"> |
|
|
|
|
<view class="walletList"> |
|
|
|
|
<view class="listItem"> |
|
|
|
|
<view class="num"> |
|
|
|
@ -208,7 +215,7 @@ |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="goodsManage" v-if="userType!=2"> |
|
|
|
|
<view class="goodsManage" v-if="userInfo.user_type!=20&&userInfo.user_type!=10"> |
|
|
|
|
<view class="manageTitle"> |
|
|
|
|
<text lines="1" class="text_5 titleLeft">分销订单</text> |
|
|
|
|
<text lines="1" class="text_6 titleRight">查看全部</text> |
|
|
|
@ -249,7 +256,7 @@ |
|
|
|
|
<view class="walletList"> |
|
|
|
|
<view class="listItem" @click="myWallet"> |
|
|
|
|
<view class="num"> |
|
|
|
|
235.00 |
|
|
|
|
{{userInfo.balance}} |
|
|
|
|
</view> |
|
|
|
|
<view class="info"> |
|
|
|
|
余额 |
|
|
|
@ -257,7 +264,7 @@ |
|
|
|
|
</view> |
|
|
|
|
<view class="listItem"> |
|
|
|
|
<view class="num"> |
|
|
|
|
2 |
|
|
|
|
{{userInfo.income}} |
|
|
|
|
</view> |
|
|
|
|
<view class="info"> |
|
|
|
|
收入 |
|
|
|
@ -265,7 +272,7 @@ |
|
|
|
|
</view> |
|
|
|
|
<view class="listItem"> |
|
|
|
|
<view class="num"> |
|
|
|
|
2 |
|
|
|
|
{{userInfo.finace_count}} |
|
|
|
|
</view> |
|
|
|
|
<view class="info"> |
|
|
|
|
提现记录 |
|
|
|
@ -278,25 +285,25 @@ |
|
|
|
|
我的服务 |
|
|
|
|
</view> |
|
|
|
|
<view class="serve"> |
|
|
|
|
<view class="serveIcon" v-if="userType==1" @click="goPage()"> |
|
|
|
|
<view class="serveIcon" v-if="userInfo.user_type==40" @click="goPage()"> |
|
|
|
|
<image src="/static/user/record.png" mode="" class="icons"></image> |
|
|
|
|
<view class="serveInfo"> |
|
|
|
|
发货记录 |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="serveIcon" v-if="userType==1" @click="goPage()"> |
|
|
|
|
<view class="serveIcon" v-if="userInfo.user_type==40" @click="goPage()"> |
|
|
|
|
<image src="/static/user/car.png" mode="" class="icons"></image> |
|
|
|
|
<view class="serveInfo"> |
|
|
|
|
物流查询 |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="serveIcon" v-if="userType==1"> |
|
|
|
|
<view class="serveIcon" v-if="userInfo.user_type==40"> |
|
|
|
|
<image src="/static/user/member.png" mode="" class="icons"></image> |
|
|
|
|
<view class="serveInfo"> |
|
|
|
|
会员价 |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="serveIcon" v-if="userType==1"> |
|
|
|
|
<view class="serveIcon" v-if="userInfo.user_type==40"> |
|
|
|
|
<image src="/static/user/retail.png" mode="" class="icons"></image> |
|
|
|
|
<view class="serveInfo"> |
|
|
|
|
分销价 |
|
|
|
@ -308,13 +315,13 @@ |
|
|
|
|
商家入驻 |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="serveIcon" v-if="userType==1"> |
|
|
|
|
<view class="serveIcon" v-if="userInfo.user_type==40"> |
|
|
|
|
<image src="/static/user/staff.png" mode="" class="icons"></image> |
|
|
|
|
<view class="serveInfo"> |
|
|
|
|
员工管理 |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="serveIcon" v-if="userType==1"> |
|
|
|
|
<view class="serveIcon" v-if="userInfo.user_type==40"> |
|
|
|
|
<image src="/static/user/setHome.png" mode="" class="icons"></image> |
|
|
|
|
<view class="serveInfo"> |
|
|
|
|
店铺设置 |
|
|
|
@ -329,14 +336,14 @@ |
|
|
|
|
<view class="serveIcon" @click="goPage('/pages/invite/index')"> |
|
|
|
|
<image src="/static/user/invite.png" mode="" class="icons"></image> |
|
|
|
|
<view class="serveInfo"> |
|
|
|
|
邀请会员 |
|
|
|
|
邀请朋友 |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="serveIcon"> |
|
|
|
|
<image src="/static/user/invites.png" mode="" class="icons"></image> |
|
|
|
|
<view class="serveInfo"> |
|
|
|
|
<text v-if="userType!=2">邀请分销</text> |
|
|
|
|
<text v-if="userType==2">加入分销</text> |
|
|
|
|
<text v-if="userInfo.user_type!=20&&userInfo.user_type!=10">邀请分销</text> |
|
|
|
|
<text v-if="userInfo.user_type==20||userInfo.user_type==10">加入分销</text> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="serveIcon"> |
|
|
|
@ -365,7 +372,7 @@ |
|
|
|
|
联系我们 |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="serveIcon" @click="goPage('/pages/help/index')"> |
|
|
|
|
<view class="serveIcon" @click="goPage('/pages/news1/help')"> |
|
|
|
|
<image src="/static/user/help.png" mode="" class="icons"></image> |
|
|
|
|
<view class="serveInfo"> |
|
|
|
|
帮助中心 |
|
|
|
@ -377,19 +384,19 @@ |
|
|
|
|
我要找货 |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="serveIcon"> |
|
|
|
|
<view class="serveIcon" v-if="userInfo.user_type!=10&&userInfo.user_type!=20"> |
|
|
|
|
<image src="/static/user/help.png" mode="" class="icons"></image> |
|
|
|
|
<view class="serveInfo"> |
|
|
|
|
数据统计 |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="serveIcon"> |
|
|
|
|
<view class="serveIcon" v-if="userInfo.user_type!=10&&userInfo.user_type!=20"> |
|
|
|
|
<image src="/static/user/help.png" mode="" class="icons"></image> |
|
|
|
|
<view class="serveInfo"> |
|
|
|
|
会员管理 |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="serveIcon"> |
|
|
|
|
<view class="serveIcon" @click="goPage('/pages/news1/jinqun')" v-if="userInfo.user_type!=10&&userInfo.user_type!=20"> |
|
|
|
|
<image src="/static/user/help.png" mode="" class="icons"></image> |
|
|
|
|
<view class="serveInfo"> |
|
|
|
|
进群有礼 |
|
|
|
@ -397,7 +404,7 @@ |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="goodsSuggest" v-if="userType!=1"> |
|
|
|
|
<view class="goodsSuggest" v-if="userInfo.user_type!=40"> |
|
|
|
|
<view class="line"> |
|
|
|
|
<image src="/static/user/left.png" mode=""></image> |
|
|
|
|
<text>专属推荐</text> |
|
|
|
@ -429,8 +436,8 @@ |
|
|
|
|
<view class="memberCode" v-if="memberCode" @click="memberCode=false"> |
|
|
|
|
<view class="codeMain"> |
|
|
|
|
<view class="myCode"> |
|
|
|
|
<text v-if="userType==2">我的专属会员识别码</text> |
|
|
|
|
<text v-if="userType==3">我的专属分销识别码</text> |
|
|
|
|
<text v-if="userInfo.user_type==20">我的专属会员识别码</text> |
|
|
|
|
<text v-if="userInfo.user_type==30">我的专属分销识别码</text> |
|
|
|
|
</view> |
|
|
|
|
<view class="codeImg"> |
|
|
|
|
<image src="" mode="" class="img"></image> |
|
|
|
@ -443,14 +450,64 @@ |
|
|
|
|
</view> |
|
|
|
|
</template> |
|
|
|
|
<script> |
|
|
|
|
import img from "@/static/member/head.png" |
|
|
|
|
import { |
|
|
|
|
checkLogin |
|
|
|
|
} from '@/core/app' |
|
|
|
|
import * as UserApi from '@/api/user' |
|
|
|
|
export default { |
|
|
|
|
data() { |
|
|
|
|
return { |
|
|
|
|
background: { |
|
|
|
|
background: 'url('+ img+') center top no-repeat', |
|
|
|
|
backgroundSize: '100% auto', |
|
|
|
|
}, |
|
|
|
|
userType: 2, |
|
|
|
|
memberCode: false, |
|
|
|
|
isLogin: false, |
|
|
|
|
userInfo: { |
|
|
|
|
user_type:40 |
|
|
|
|
}, |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
onShow(options) { |
|
|
|
|
this.onRefreshPage() |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
// 刷新页面 |
|
|
|
|
onRefreshPage() { |
|
|
|
|
this.isLogin = checkLogin() |
|
|
|
|
console.log(this.isLogin,'是否登录') |
|
|
|
|
// 获取页面数据 |
|
|
|
|
this.getUserInfo() |
|
|
|
|
}, |
|
|
|
|
// 获取当前用户信息 |
|
|
|
|
getUserInfo() { |
|
|
|
|
const that = this |
|
|
|
|
return new Promise((resolve, reject) => { |
|
|
|
|
!that.isLogin ? resolve(null) : UserApi.info({}, { |
|
|
|
|
load: that.isFirstload |
|
|
|
|
}) |
|
|
|
|
.then(result => { |
|
|
|
|
that.userInfo = result.data.userInfo |
|
|
|
|
resolve(that.userInfo) |
|
|
|
|
}) |
|
|
|
|
.catch(err => { |
|
|
|
|
if (err.result && err.result.status == 401) { |
|
|
|
|
that.isLogin = false |
|
|
|
|
resolve(null) |
|
|
|
|
} else { |
|
|
|
|
reject(err) |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
goLogin() { |
|
|
|
|
// 去登录 |
|
|
|
|
uni.navigateTo({ |
|
|
|
|
url: '/pages/login/index' |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
goMember() { |
|
|
|
|
uni.navigateTo({ |
|
|
|
|
url: '/pages/member/index' |
|
|
|
@ -488,9 +545,9 @@ |
|
|
|
|
url: '/pages/goods/detail' |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
goPage(url){ |
|
|
|
|
goPage(url) { |
|
|
|
|
uni.navigateTo({ |
|
|
|
|
url:url |
|
|
|
|
url: url |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
} |
|
|
|
@ -518,18 +575,13 @@ |
|
|
|
|
margin: -26rpx 0 0 -60rpx; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.image_1 { |
|
|
|
|
width: 158rpx; |
|
|
|
|
height: 56rpx; |
|
|
|
|
margin: 120rpx 0 0 626rpx; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.box_1 { |
|
|
|
|
width: 668rpx; |
|
|
|
|
height: 114rpx; |
|
|
|
|
flex-direction: row; |
|
|
|
|
display: flex; |
|
|
|
|
margin: 240rpx 0 0 108rpx; |
|
|
|
|
margin: 50rpx 0 0 108rpx; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.image_2 { |
|
|
|
@ -1194,7 +1246,7 @@ |
|
|
|
|
|
|
|
|
|
.myServe { |
|
|
|
|
width: 688rpx; |
|
|
|
|
height: 436rpx; |
|
|
|
|
// height: 436rpx; |
|
|
|
|
background: #FFFFFF; |
|
|
|
|
border-radius: 10rpx 10rpx 10rpx 10rpx; |
|
|
|
|
opacity: 1; |
|
|
|
|