|
@ -6,87 +6,103 @@ |
|
|
@leftClick="$utils.navigateBack" |
|
|
@leftClick="$utils.navigateBack" |
|
|
bgColor="#E3441A" color="#fff" /> |
|
|
bgColor="#E3441A" color="#fff" /> |
|
|
|
|
|
|
|
|
<!-- 头部 --> |
|
|
|
|
|
<view class="head"> |
|
|
|
|
|
<view class="headImage"> |
|
|
|
|
|
<image :src="userInfo.headImage" mode="aspectFill"></image> |
|
|
|
|
|
|
|
|
<!-- 未登录状态 --> |
|
|
|
|
|
<view class="not-login" v-if="!isLogin"> |
|
|
|
|
|
<view class="head-bg"> |
|
|
|
|
|
<view class="login-info"> |
|
|
|
|
|
<view class="avatar"> |
|
|
|
|
|
<image src="/static/image/center/head-img.png" mode="aspectFill"></image> |
|
|
|
|
|
</view> |
|
|
|
|
|
<view class="login-tips">登录后查看个人信息</view> |
|
|
|
|
|
<view class="login-btn" @click="$utils.toLogin">立即登录</view> |
|
|
|
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
<view class="user-info"> |
|
|
|
|
|
<view class="user-base-info"> |
|
|
|
|
|
<view class="user-base-top"> |
|
|
|
|
|
<view class="user-name">{{ userInfo.nickName}}</view> |
|
|
|
|
|
<view class="member-level"> |
|
|
|
|
|
<image v-if="userInfo.role == 1" :src="configList.vip_money_one" mode="aspectFill" class="level"> |
|
|
|
|
|
</image> |
|
|
|
|
|
<image v-if="userInfo.role == 2" :src="configList.vip_money_two" mode="aspectFill" |
|
|
|
|
|
class="level"> |
|
|
|
|
|
</image> |
|
|
|
|
|
<image v-if="userInfo.role == 3" :src="configList.vip_money_three" |
|
|
|
|
|
mode="aspectFill" class="level"> |
|
|
|
|
|
</image> |
|
|
|
|
|
</view> |
|
|
|
|
|
<view class="user-tag"> |
|
|
|
|
|
{{ userRole[userInfo.isPay] }} |
|
|
|
|
|
|
|
|
<!-- 已登录状态 --> |
|
|
|
|
|
<template v-if="isLogin"> |
|
|
|
|
|
<!-- 头部 --> |
|
|
|
|
|
<view class="head"> |
|
|
|
|
|
<view class="headImage"> |
|
|
|
|
|
<image :src="userInfo.headImage" mode="aspectFill"></image> |
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
<view class="user-info"> |
|
|
|
|
|
<view class="user-base-info"> |
|
|
|
|
|
<view class="user-base-top"> |
|
|
|
|
|
<view class="user-name">{{ userInfo.nickName}}</view> |
|
|
|
|
|
<view class="member-level"> |
|
|
|
|
|
<image v-if="userInfo.role == 1" :src="configList.vip_money_one" mode="aspectFill" class="level"> |
|
|
|
|
|
</image> |
|
|
|
|
|
<image v-if="userInfo.role == 2" :src="configList.vip_money_two" mode="aspectFill" |
|
|
|
|
|
class="level"> |
|
|
|
|
|
</image> |
|
|
|
|
|
<image v-if="userInfo.role == 3" :src="configList.vip_money_three" |
|
|
|
|
|
mode="aspectFill" class="level"> |
|
|
|
|
|
</image> |
|
|
|
|
|
</view> |
|
|
|
|
|
<view class="user-tag"> |
|
|
|
|
|
{{ userRole[userInfo.isPay] }} |
|
|
|
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
<view class="edit-user" |
|
|
|
|
|
@click="$utils.navigateTo('/pages_order/mine/updateUser?back=true')"> |
|
|
|
|
|
<image src="@/static/image/center/edit-icon.png" mode="aspectFill" class="edit-icon"></image> |
|
|
|
|
|
<view class="edit-btn"> |
|
|
|
|
|
修改资料 |
|
|
|
|
|
|
|
|
<view class="edit-user" |
|
|
|
|
|
@click="$utils.navigateTo('/pages_order/mine/updateUser?back=true')"> |
|
|
|
|
|
<image src="@/static/image/center/edit-icon.png" mode="aspectFill" class="edit-icon"></image> |
|
|
|
|
|
<view class="edit-btn"> |
|
|
|
|
|
修改资料 |
|
|
|
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
<view class="user-phone"> |
|
|
|
|
|
手机号:{{ userInfo.phone }} |
|
|
|
|
|
|
|
|
<view class="user-phone"> |
|
|
|
|
|
手机号:{{ userInfo.phone }} |
|
|
|
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
<!-- 会员卡片 --> |
|
|
|
|
|
<view @click="$utils.navigateTo({url : '/pages_order/mine/memberCenter' })" |
|
|
|
|
|
v-if="userInfo.role != 0" |
|
|
|
|
|
class="earnings"> |
|
|
|
|
|
<view v-if="index == userInfo.role" v-for="(item,index) in vipList" :key="item.id" class="member-item"> |
|
|
|
|
|
<image :src="item.headImage" mode="aspectFill" class="member-image"></image> |
|
|
|
|
|
|
|
|
|
|
|
<view class="member-info"> |
|
|
|
|
|
<view class="profile-photo"> |
|
|
|
|
|
<image :src="userInfo.headImage" mode="aspectFill" class="pro-img"></image> |
|
|
|
|
|
<view class="open-status"> |
|
|
|
|
|
开通时间:{{ riceInfo.openTime }} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 会员卡片 --> |
|
|
|
|
|
<view @click="$utils.navigateTo({url : '/pages_order/mine/memberCenter' })" |
|
|
|
|
|
v-if="userInfo.role != 0" |
|
|
|
|
|
class="earnings"> |
|
|
|
|
|
<view v-if="index == userInfo.role" v-for="(item,index) in vipList" :key="item.id" class="member-item"> |
|
|
|
|
|
<image :src="item.headImage" mode="aspectFill" class="member-image"></image> |
|
|
|
|
|
|
|
|
|
|
|
<view class="member-info"> |
|
|
|
|
|
<view class="profile-photo"> |
|
|
|
|
|
<image :src="userInfo.headImage" mode="aspectFill" class="pro-img"></image> |
|
|
|
|
|
<view class="open-status"> |
|
|
|
|
|
开通时间:{{ riceInfo.openTime }} |
|
|
|
|
|
</view> |
|
|
|
|
|
</view> |
|
|
|
|
|
<view class="open"> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
<view class="open"> |
|
|
|
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
<!-- 佣金数据 --> |
|
|
|
|
|
<view class="brokerage-data" |
|
|
|
|
|
:class="{'brokerage-data-mt' : !userInfo.role}"> |
|
|
|
|
|
<view class="brokerage" @click="$utils.navigateTo('/pages_order/mine/runningWater')"> |
|
|
|
|
|
<image :src="configList.money_image" mode="aspectFill" class="brokerage-img"></image> |
|
|
|
|
|
|
|
|
<!-- 佣金数据 --> |
|
|
|
|
|
<view class="brokerage-data" |
|
|
|
|
|
:class="{'brokerage-data-mt' : !userInfo.role}"> |
|
|
|
|
|
<view class="brokerage" @click="$utils.navigateTo('/pages_order/mine/runningWater')"> |
|
|
|
|
|
<image :src="configList.money_image" mode="aspectFill" class="brokerage-img"></image> |
|
|
|
|
|
|
|
|
<div class="main"> |
|
|
|
|
|
<div class="title">我的佣金</div> |
|
|
|
|
|
<div class="money">¥{{ riceInfo.balance|| 0 }}</div> |
|
|
|
|
|
</div> |
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
<div class="main"> |
|
|
|
|
|
<div class="title">我的佣金</div> |
|
|
|
|
|
<div class="money">¥{{ riceInfo.balance|| 0 }}</div> |
|
|
|
|
|
</div> |
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
<view class="balance" @click="$utils.navigateTo('/pages_order/mine/withdraw')"> |
|
|
|
|
|
<image :src="configList.price_image" mode="aspectFill" class="balance-img"></image> |
|
|
|
|
|
|
|
|
<view class="balance" @click="$utils.navigateTo('/pages_order/mine/withdraw')"> |
|
|
|
|
|
<image :src="configList.price_image" mode="aspectFill" class="balance-img"></image> |
|
|
|
|
|
|
|
|
<div class="main"> |
|
|
|
|
|
<div class="title">我的余额</div> |
|
|
|
|
|
<div class="money">¥{{ riceInfo.canWithdraw || 0 }}</div> |
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
<div class="main"> |
|
|
|
|
|
<div class="title">我的余额</div> |
|
|
|
|
|
<div class="money">¥{{ riceInfo.canWithdraw || 0 }}</div> |
|
|
|
|
|
</div> |
|
|
|
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
<!-- 我的服务 --> |
|
|
<!-- 我的服务 --> |
|
|
<view class="myServer"> |
|
|
<view class="myServer"> |
|
@ -95,11 +111,11 @@ |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
<view class="box"> |
|
|
<view class="box"> |
|
|
<view class="boxs" @click="$utils.navigateTo('/pages/index/order?type=0')"> |
|
|
|
|
|
|
|
|
<view class="boxs" @click="handleItemClick('/pages/index/order?type=0')"> |
|
|
<image src="@/static/image/center/1.png" mode="aspectFill" /> |
|
|
<image src="@/static/image/center/1.png" mode="aspectFill" /> |
|
|
<view class="title">我的订单</view> |
|
|
<view class="title">我的订单</view> |
|
|
</view> |
|
|
</view> |
|
|
<view class="boxs" @click="$utils.navigateTo('/pages_order/mine/partner')"> |
|
|
|
|
|
|
|
|
<view class="boxs" @click="handleItemClick('/pages_order/mine/partner')"> |
|
|
<image src="@/static/image/center/2.png" mode="aspectFill" /> |
|
|
<image src="@/static/image/center/2.png" mode="aspectFill" /> |
|
|
<view class="title">我的团队</view> |
|
|
<view class="title">我的团队</view> |
|
|
</view> |
|
|
</view> |
|
@ -107,7 +123,7 @@ |
|
|
<image src="@/static/image/center/3.png" mode="aspectFill" /> |
|
|
<image src="@/static/image/center/3.png" mode="aspectFill" /> |
|
|
<view class="title">联系客服</view> |
|
|
<view class="title">联系客服</view> |
|
|
</view> |
|
|
</view> |
|
|
<view class="boxs" @click="$utils.navigateTo('/pages_order/mine/promotion')"> |
|
|
|
|
|
|
|
|
<view class="boxs" @click="handleItemClick('/pages_order/mine/promotion')"> |
|
|
<image src="@/static/image/center/4.png" mode="aspectFill" /> |
|
|
<image src="@/static/image/center/4.png" mode="aspectFill" /> |
|
|
<view class="title">邀请好友</view> |
|
|
<view class="title">邀请好友</view> |
|
|
</view> |
|
|
</view> |
|
@ -122,7 +138,7 @@ |
|
|
<image src="@/static/image/center/6.png" mode="aspectFill" /> |
|
|
<image src="@/static/image/center/6.png" mode="aspectFill" /> |
|
|
<view class="title">会员权益</view> |
|
|
<view class="title">会员权益</view> |
|
|
</view> |
|
|
</view> |
|
|
<view class="boxs" @click="$utils.navigateTo('/pages_order/mine/coupon')"> |
|
|
|
|
|
|
|
|
<view class="boxs" @click="handleItemClick('/pages_order/mine/coupon')"> |
|
|
<image src="@/static/image/center/7.png" mode="aspectFill" /> |
|
|
<image src="@/static/image/center/7.png" mode="aspectFill" /> |
|
|
<view class="title">优惠券</view> |
|
|
<view class="title">优惠券</view> |
|
|
</view> |
|
|
</view> |
|
@ -133,17 +149,17 @@ |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
<view class="box"> |
|
|
<view class="box"> |
|
|
<view class="boxs" @click="$utils.navigateTo('/pages_order/mine/address')"> |
|
|
|
|
|
|
|
|
<view class="boxs" @click="handleItemClick('/pages_order/mine/address')"> |
|
|
<image src="@/static/image/center/address.png" mode="aspectFill" /> |
|
|
<image src="@/static/image/center/address.png" mode="aspectFill" /> |
|
|
<view class="title">我的地址</view> |
|
|
<view class="title">我的地址</view> |
|
|
</view> |
|
|
</view> |
|
|
<view class="boxs" @click="$utils.navigateTo('/pages_order/order/giftList')"> |
|
|
|
|
|
|
|
|
<view class="boxs" @click="handleItemClick('/pages_order/order/giftList')"> |
|
|
<image src="@/static/image/center/9.png" mode="aspectFill" /> |
|
|
<image src="@/static/image/center/9.png" mode="aspectFill" /> |
|
|
<view class="title">礼包列表</view> |
|
|
<view class="title">礼包列表</view> |
|
|
</view> |
|
|
</view> |
|
|
<view class="boxs" @click="logout"> |
|
|
|
|
|
<image src="@/static/image/center/logout.png" mode="aspectFill" /> |
|
|
|
|
|
<view class="title">退出登录</view> |
|
|
|
|
|
|
|
|
<view class="boxs" @click="isLogin ? logout() : toLogin()"> |
|
|
|
|
|
<image :src="isLogin ? '/static/image/center/logout.png' : '/static/image/center/logout.png'" mode="aspectFill" /> |
|
|
|
|
|
<view class="title">{{ isLogin ? '退出登录' : '立即登录' }}</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
@ -197,6 +213,7 @@ |
|
|
}, |
|
|
}, |
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
|
|
|
|
isLogin: false, |
|
|
vipType: ['普通会员', '黄金会员', '渠道商'], |
|
|
vipType: ['普通会员', '黄金会员', '渠道商'], |
|
|
vipImage: ['vip_vip', 'vip_user', 'vip_shop'], |
|
|
vipImage: ['vip_vip', 'vip_user', 'vip_shop'], |
|
|
vipList: [], |
|
|
vipList: [], |
|
@ -207,11 +224,45 @@ |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
onShow() { |
|
|
onShow() { |
|
|
this.$store.commit('getUserInfo') |
|
|
|
|
|
this.$store.commit('getRiceInfo') |
|
|
|
|
|
this.getMemberCardData(); |
|
|
|
|
|
|
|
|
this.checkLogin() |
|
|
|
|
|
if (this.isLogin) { |
|
|
|
|
|
this.$store.commit('getUserInfo') |
|
|
|
|
|
this.$store.commit('getRiceInfo') |
|
|
|
|
|
this.getMemberCardData() |
|
|
|
|
|
} |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
|
|
|
// 检查是否登录 |
|
|
|
|
|
checkLogin() { |
|
|
|
|
|
const token = uni.getStorageSync('token') |
|
|
|
|
|
this.isLogin = !!token |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// 跳转登录页 |
|
|
|
|
|
toLogin() { |
|
|
|
|
|
uni.navigateTo({ |
|
|
|
|
|
url: '/pages/login/login' |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// 处理需要登录的功能点击 |
|
|
|
|
|
handleItemClick(url) { |
|
|
|
|
|
if (this.isLogin) { |
|
|
|
|
|
this.$utils.navigateTo(url) |
|
|
|
|
|
} else { |
|
|
|
|
|
uni.showModal({ |
|
|
|
|
|
title: '提示', |
|
|
|
|
|
content: '请先登录', |
|
|
|
|
|
confirmText: '去登录', |
|
|
|
|
|
success: (res) => { |
|
|
|
|
|
if (res.confirm) { |
|
|
|
|
|
this.toLogin() |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
clickNo() { |
|
|
clickNo() { |
|
|
uni.showModal({ |
|
|
uni.showModal({ |
|
|
title: '暂未开放', |
|
|
title: '暂未开放', |
|
@ -248,6 +299,52 @@ |
|
|
<style scoped lang="scss"> |
|
|
<style scoped lang="scss"> |
|
|
.page { |
|
|
.page { |
|
|
|
|
|
|
|
|
|
|
|
// 未登录样式 |
|
|
|
|
|
.not-login { |
|
|
|
|
|
.head-bg { |
|
|
|
|
|
padding: 60rpx 20rpx 120rpx 20rpx; |
|
|
|
|
|
background: $uni-color; |
|
|
|
|
|
|
|
|
|
|
|
.login-info { |
|
|
|
|
|
display: flex; |
|
|
|
|
|
flex-direction: column; |
|
|
|
|
|
align-items: center; |
|
|
|
|
|
|
|
|
|
|
|
.avatar { |
|
|
|
|
|
width: 130rpx; |
|
|
|
|
|
height: 130rpx; |
|
|
|
|
|
background-image: url(/static/image/center/head-img.png); |
|
|
|
|
|
background-repeat: no-repeat; |
|
|
|
|
|
background-position: 50%, 50%; |
|
|
|
|
|
background-size: 100%; |
|
|
|
|
|
overflow: hidden; |
|
|
|
|
|
border-radius: 50%; |
|
|
|
|
|
margin-bottom: 20rpx; |
|
|
|
|
|
|
|
|
|
|
|
image { |
|
|
|
|
|
width: 100%; |
|
|
|
|
|
height: 100%; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.login-tips { |
|
|
|
|
|
color: white; |
|
|
|
|
|
font-size: 32rpx; |
|
|
|
|
|
margin-bottom: 30rpx; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.login-btn { |
|
|
|
|
|
background-color: #fff; |
|
|
|
|
|
color: $uni-color; |
|
|
|
|
|
padding: 15rpx 80rpx; |
|
|
|
|
|
border-radius: 40rpx; |
|
|
|
|
|
font-size: 30rpx; |
|
|
|
|
|
font-weight: bold; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
// 头部 |
|
|
// 头部 |
|
|
.head { |
|
|
.head { |
|
|
display: flex; |
|
|
display: flex; |
|
@ -584,4 +681,4 @@ |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
</style> |
|
|
|
|
|
|
|
|
</style> |