|
|
@@ -12,11 +12,12 @@
|
|
|
<view class="portrait-box"><image class="portrait" :src="userInfo.avatar || '/static/error/missing-face.png'"></image></view>
|
|
|
<view class="info-box">
|
|
|
<view class="username">{{ userInfo.nickname || '游客' }}</view>
|
|
|
- <view class="font-size-sm" v-if="userInfo.uid">{{ userInfo.uid }}</view>
|
|
|
+ <view class="font-size-sm" v-if="userInfo.uid">邀请码:{{ userInfo.uid }}<text v-if="userInfo.level == 1" style="color: #5dbc7c;margin-left: 10rpx;">会员</text><text v-if="userInfo.level == 2" style="color: #dab176;margin-left: 10rpx;">副店长</text><text v-if="userInfo.level == 3" style="color: #dab176;margin-left: 10rpx;">店长</text></view>
|
|
|
+ <view class="font-size-sm" style="color: #5dbc7c;" v-if="userInfo.level == 1 && userInfo.service == 0">{{'会员股权:' + userInfo.vip.stock_rights + ' 消费股权:' + userInfo.vip.consume_rights}}</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="config">
|
|
|
- <text class="setting " @click="navTo('/pages/userinfo/userinfo')"><image src="../../static/user/set.png" mode=""></image></text>
|
|
|
+ <view class="setting " @click="navTo('/pages/userinfo/userinfo')"><image src="../../static/user/set.png" mode=""></image></view>
|
|
|
设置
|
|
|
</view>
|
|
|
</view>
|
|
|
@@ -24,27 +25,18 @@
|
|
|
</view>
|
|
|
<view class="item-box">
|
|
|
<image class="arc" src="/static/img/arc.png"></image>
|
|
|
- <view class="mendian">
|
|
|
- <view class="mendian-lift" v-if="userInfo.level != 0">
|
|
|
+ <view class="mendian" v-if="userInfo.level == 1 && userInfo.service == 0">
|
|
|
+ <view class="mendian-lift">
|
|
|
<view class="img"><image src="../../static/img/mendian01.png" mode=""></image></view>
|
|
|
<text class="null-mendian">{{ userInfo.store_name}}</text>
|
|
|
</view>
|
|
|
- <view class="mendian-lift" v-else>
|
|
|
- <view class="img"><image src="../../static/img/mendian02.png" mode=""></image></view>
|
|
|
- <text class="null-mendian">无绑定门店</text>
|
|
|
- </view>
|
|
|
- <view class="mendian-lift" v-if="userInfo.level != 0">
|
|
|
- <!-- <text class="duihuan">{{userInfo.vip.}}</text> -->
|
|
|
- <view>会员码:<image src="../../static/icon/hyewm.png" mode="" class="hym"></image></view>
|
|
|
- </view>
|
|
|
- <view class="mendian-right" @click="go()" v-else>
|
|
|
- <text class="duihuan">兑换会员卡</text>
|
|
|
- <text class="iconfont iconenter"></text>
|
|
|
+ <view class="mendian-lift" @click="openhym">
|
|
|
+ NO:{{userInfo.vip.card_no}}<image src="../../static/icon/hym.png" mode="" class="hym" >
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="my-order">
|
|
|
<view class="box-title flex borde-b">
|
|
|
- <view class="title" @click="go"><text>我的订单</text></view>
|
|
|
+ <view class="title"><text>我的订单</text></view>
|
|
|
<view class="link" @click="navTo('/pages/order/order?state=5')" hover-class="common-hover"><text class="iconfont iconenter"></text></view>
|
|
|
</view>
|
|
|
<view class="order-section">
|
|
|
@@ -83,7 +75,7 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<!-- <view class="cover-container"> -->
|
|
|
- <view class="vip" @click="navTo('/pages/wallet/openMember')" v-if="userInfo.level < 3"><image src="../../static/user/upgrade.png" mode=""></image></view>
|
|
|
+ <view class="vip" @click="navTo('/pages/wallet/openMember')" v-if="userInfo.level == 0"><image src="../../static/user/upgrade.png" mode=""></image></view>
|
|
|
|
|
|
<!-- 订单 -->
|
|
|
|
|
|
@@ -93,10 +85,10 @@
|
|
|
<view class=" icon position-relative"><image class="icon-img" src="../../static/user/balance.png" mode="aspectFit"></image></view>
|
|
|
<text>我的余额</text>
|
|
|
</view>
|
|
|
- <view class="order-item" @click="navTo('/pages/award/award')" hover-class="common-hover" :hover-stay-time="50">
|
|
|
+ <!-- <view class="order-item" @click="navTo('/pages/award/award')" hover-class="common-hover" :hover-stay-time="50">
|
|
|
<view class=" icon position-relative"><image class="icon-img" src="../../static/user/commission.png" mode="aspectFit"></image></view>
|
|
|
<text>我的佣金</text>
|
|
|
- </view>
|
|
|
+ </view> -->
|
|
|
<view class="order-item" @click="navTo('/pages/coupon/consumer')" hover-class="common-hover" :hover-stay-time="50">
|
|
|
<view class=" icon position-relative"><image class="icon-img" src="../../static/user/coupon.png" mode="aspectFit"></image></view>
|
|
|
<text>我的消费券</text>
|
|
|
@@ -107,6 +99,8 @@
|
|
|
<uni-list>
|
|
|
<uni-list-item v-if="isShowIllegality" title="我的推广" @click="navTo('/pages/myteam/myteam')" thumb="/static/user/tuiguang.png"></uni-list-item>
|
|
|
<uni-list-item title="邀请海报" @click="navTo('/pages/shareQrCode/index')" thumb="/static/user/haibao.png"></uni-list-item>
|
|
|
+ <uni-list-item title="兑换会员卡" @click="go" thumb="/static/icon/czhy.png"></uni-list-item>
|
|
|
+ <!-- <uni-list-item title="兑换会员卡" @click="go" thumb="/static/icon/czhy.png"></uni-list-item> -->
|
|
|
<uni-list-item title="我的收藏" @click="navTo('/pages/favorites/favorites')" thumb="/static/user/collect.png"></uni-list-item>
|
|
|
<uni-list-item title="收货地址" @click="navTo('/pages/address/address')" thumb="/static/user/address.png"></uni-list-item>
|
|
|
<uni-list-item title="商家入口" @click="navTo('/pages/merchant/merchant')" thumb="/static/user/shopping.png" v-if="userInfo.service == 1"></uni-list-item>
|
|
|
@@ -114,6 +108,22 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<!-- </scroll-view> -->
|
|
|
+ <uni-popup ref="hympop" type="center">
|
|
|
+ <view class="hym-wrap">
|
|
|
+ <view class="hym-tit">
|
|
|
+ 我的会员码
|
|
|
+ </view>
|
|
|
+ <view class="hym-val">
|
|
|
+ <tki-qrcode :key="hym" cid="tki-qrcode-canvas" ref="qrcode"
|
|
|
+ :val="hym" :size="300" unit="upx" background="#ffffff"
|
|
|
+ foreground="#333333" pdground="#333333" icon="" :iconSize="0" :lv="3" :onval="true"
|
|
|
+ :loadMake="true" :usingComponents="true" />
|
|
|
+ </view>
|
|
|
+ <view class="hym-num">
|
|
|
+ 会员编号:{{hym}}
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </uni-popup>
|
|
|
<uni-popup ref="popup" type="center">
|
|
|
<view class="popup-box">
|
|
|
<view class="img">
|
|
|
@@ -150,6 +160,7 @@ import uniList from '@/components/uni-list/uni-list.vue';
|
|
|
import uniListItem from '@/components/uni-list-item/uni-list-item.vue';
|
|
|
import { orderData, orderVerific } from '@/api/user.js';
|
|
|
import { getUserInfo } from '@/api/login.js';
|
|
|
+import tkiQrcodes from '@/components/tki-qrcode/tki-qrcode.vue';
|
|
|
let startY = 0,
|
|
|
moveY = 0,
|
|
|
pageAtTop = true;
|
|
|
@@ -157,10 +168,12 @@ export default {
|
|
|
components: {
|
|
|
uniList,
|
|
|
uniListItem,
|
|
|
- uniPopup
|
|
|
+ uniPopup,
|
|
|
+ tkiQrcodes
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ hym: '',//会员编号
|
|
|
coverTransform: 'translateY(0px)',
|
|
|
coverTransition: '0s',
|
|
|
moving: false,
|
|
|
@@ -178,7 +191,28 @@ export default {
|
|
|
pwd: '',
|
|
|
storeInfo: {
|
|
|
name: ''
|
|
|
- }
|
|
|
+ },
|
|
|
+ qrsize: 80, // 二维码大小
|
|
|
+ cid: 'tki-qrcode-canvas', //canvasId,页面存在多个二维码组件时需设置不同的ID
|
|
|
+ size: 500, //生成的二维码大小
|
|
|
+ unit: 'upx', //大小单位尺寸
|
|
|
+ // show: true,//默认使用组件中的image标签显示二维码
|
|
|
+ val: '', //要生成的内容
|
|
|
+ background: '#ffffff', //二维码背景色
|
|
|
+ foreground: '#333333', //二维码前景色
|
|
|
+ pdground: '#333333', //二维码角标色
|
|
|
+ icon: '', //二维码图标URL(必须是本地图片,网络图需要先下载至本地)
|
|
|
+ iconSize: 40, //二维码图标大小
|
|
|
+ lv: 3, //容错级别
|
|
|
+ onval: true, //监听val值变化自动重新生成二维码
|
|
|
+ loadMake: false, //组件初始化完成后自动生成二维码,val需要有值
|
|
|
+ usingComponents: false, //是否使用了自定义组件模式(主要是为了修复非自定义组件模式时 v-if 无法生成二维码的问题)
|
|
|
+ showLoading: true, //是否显示loading
|
|
|
+ loadingText: '二维码生成中', //loading文字
|
|
|
+ src: '', // 二维码生成后的图片地址或base64
|
|
|
+ ratio: 1, //页面比例用于计算
|
|
|
+ ctxSrc: '', //要显示的图片
|
|
|
+ loading: true, //是否载入图片中
|
|
|
};
|
|
|
},
|
|
|
onShow() {
|
|
|
@@ -214,6 +248,12 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
...mapMutations('user', ['setUserInfo', 'setOrderInfo']),
|
|
|
+ // 打开会员码
|
|
|
+ openhym() {
|
|
|
+ this.hym = this.userInfo.vip.card_no
|
|
|
+ this.$refs.hympop.open()
|
|
|
+
|
|
|
+ },
|
|
|
// 加载初始数据
|
|
|
loadBaseData() {
|
|
|
let obj = this;
|
|
|
@@ -620,6 +660,7 @@ export default {
|
|
|
display: flex;
|
|
|
justify-content: space-between;
|
|
|
align-items: center;
|
|
|
+ margin-bottom: 20rpx;
|
|
|
.mendian-lift {
|
|
|
display: flex;
|
|
|
.null-mendian {
|
|
|
@@ -629,6 +670,7 @@ export default {
|
|
|
.hym {
|
|
|
width: 40rpx;
|
|
|
height: 40rpx;
|
|
|
+ margin-left: 10rpx;
|
|
|
}
|
|
|
.img {
|
|
|
margin: 0 10rpx 0;
|
|
|
@@ -652,8 +694,12 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
.my-order {
|
|
|
- padding: 0 20rpx;
|
|
|
+ width: 680rpx;
|
|
|
+ margin: auto;
|
|
|
+ // margin-top: 10rpx;
|
|
|
+ // padding: 0 20rpx;
|
|
|
border-radius: 20rpx;
|
|
|
+ box-shadow: 0px 0px 5px rgba(0,0,0,0.2);
|
|
|
}
|
|
|
.box-title {
|
|
|
line-height: 1;
|
|
|
@@ -858,4 +904,26 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+.hym-wrap {
|
|
|
+ width: 500rpx;
|
|
|
+ height: 500rpx;
|
|
|
+ background-color: #fff;
|
|
|
+ text-align: center;
|
|
|
+ border-radius: 20rpx;
|
|
|
+ .hym-tit {
|
|
|
+ color: $base-color;
|
|
|
+ padding: 20rpx 0;
|
|
|
+ font-size: 48rpx;
|
|
|
+ }
|
|
|
+ .hym-val {
|
|
|
+ width: 300rpx;
|
|
|
+ height: 300rpx;
|
|
|
+ margin: auto;
|
|
|
+ }
|
|
|
+ .hym-num {
|
|
|
+ font-size: 28rpx;
|
|
|
+ font-weight: bold;
|
|
|
+ padding-top: 20rpx;
|
|
|
+ }
|
|
|
+}
|
|
|
</style>
|