会员列表,详情,充值,订单列表
This commit is contained in:
@@ -9,10 +9,10 @@
|
||||
<image class="my_info_left_head" :src="userInfo.headImg" mode="aspectFill"></image>
|
||||
<view class="name">{{userInfo.nickName || '无'}}</view>
|
||||
</view>
|
||||
<image class="my_info_right_qr" @click="clickEvent" v-if="userInfo.isVip!=0"
|
||||
<image class="my_info_right_qr" @click="clickEvent" v-if="userInfo.isVip == 1"
|
||||
:src="'https://czg-qr-order.oss-cn-beijing.aliyuncs.com/my/my_qRcode.png'" mode="aspectFill">
|
||||
</image>
|
||||
<view class="my_info_right" @click="clickEvent" v-else>
|
||||
<view class="my_info_right" @click="clickEvent" v-if="userInfo.isVip == 0">
|
||||
<text>免费入会</text>
|
||||
</view>
|
||||
</view>
|
||||
@@ -26,21 +26,21 @@
|
||||
src="https://czg-qr-order.oss-cn-beijing.aliyuncs.com/my/storedValue.png" mode="aspectFill">
|
||||
</image>
|
||||
<view class="my_list_item_name">储值</view>
|
||||
<view class="my_list_item_num">{{userInfo.assetsSummary.amount || '0'}}</view>
|
||||
<view class="my_list_item_num">{{userInfo.amount || '0'}}</view>
|
||||
</view>
|
||||
<view class="my_list_item">
|
||||
<image class="my_list_item_icon"
|
||||
src="https://czg-qr-order.oss-cn-beijing.aliyuncs.com/my/points.png">
|
||||
</image>
|
||||
<view class="my_list_item_name">积分</view>
|
||||
<view class="my_list_item_num">{{userInfo.assetsSummary.couponNum ||'0'}}</view>
|
||||
<view class="my_list_item_num">{{userInfo.couponNum ||'0'}}</view>
|
||||
</view>
|
||||
<view class="my_list_item">
|
||||
<image class="my_list_item_icon"
|
||||
src="https://czg-qr-order.oss-cn-beijing.aliyuncs.com/my/coupon.png">
|
||||
</image>
|
||||
<view class="my_list_item_name">优惠券</view>
|
||||
<view class="my_list_item_num">{{userInfo.assetsSummary.points ||'0'}}</view>
|
||||
<view class="my_list_item_num">{{userInfo.points ||'0'}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -95,7 +95,7 @@
|
||||
// { name: "收货地址", type: "", icon: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/my/my_address.png"},
|
||||
{
|
||||
name: "个人资料",
|
||||
type: "my_info",
|
||||
type: "myself",
|
||||
icon: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/my/personal.png"
|
||||
},
|
||||
{
|
||||
@@ -107,25 +107,16 @@
|
||||
])
|
||||
const teblist = ref([])
|
||||
const shopExtend = ref(null)
|
||||
const userInfo = ref({
|
||||
headImg: '',
|
||||
nickName: '',
|
||||
isVip: '',
|
||||
assetsSummary: {
|
||||
amount: 0,
|
||||
couponNum: 0,
|
||||
points: 2
|
||||
}
|
||||
})
|
||||
const userInfo = reactive({})
|
||||
const clickEvent = () => {
|
||||
if (uni.cache.get('shopId') && uni.cache.get('token')) {
|
||||
if (this.userInfo.isVip == 0) {
|
||||
uni.pro.navigateTo('member/memberdetails', {
|
||||
if (userInfo.isVip == 0) {
|
||||
uni.pro.navigateTo('user/member/memberdetails', {
|
||||
shopId: uni.cache.get('shopId')
|
||||
})
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: '/pages/pay_code/pay_code?userInfo=' + JSON.stringify(this.userInfo)
|
||||
url: '/pages/user/member/qrcode?userInfo=' + JSON.stringify(userInfo)
|
||||
})
|
||||
}
|
||||
} else {
|
||||
@@ -134,10 +125,72 @@
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
const clickTo = (item, index) => {
|
||||
console.log(item, index)
|
||||
let shopId = null;
|
||||
switch (item.type) {
|
||||
case 'my_order':
|
||||
uni.pro.switchTab('order/index')
|
||||
break
|
||||
case 'my_member':
|
||||
uni.pro.navigateTo('user/member/list')
|
||||
break
|
||||
case 'recharge':
|
||||
if (uni.cache.get('shopId') && uni.cache.get('token')) {
|
||||
uni.pro.navigateTo('member/index', {
|
||||
shopId: uni.cache.get('shopId'),
|
||||
type: 'index',
|
||||
})
|
||||
} else {
|
||||
uni.pro.navigateTo('member/list', {
|
||||
type: 'user_recharge'
|
||||
})
|
||||
}
|
||||
break
|
||||
case 'points': //积分
|
||||
if (uni.cache.get('shopId') && uni.cache.get('token')) {
|
||||
uni.pro.navigateTo('/pagesPoints/index/index', {
|
||||
shopId: uni.cache.get('shopId'),
|
||||
type: 'user',
|
||||
})
|
||||
} else {
|
||||
uni.pro.navigateTo('member/list', {
|
||||
type: 'user_points'
|
||||
})
|
||||
}
|
||||
break;
|
||||
case 'my_coupon': //优惠券
|
||||
uni.pro.navigateTo('user/coupon', {
|
||||
shopId: uni.cache.get('shopId') || ''
|
||||
})
|
||||
break;
|
||||
case 'myself': //内部页面
|
||||
uni.pro.navigateTo('user/myself')
|
||||
break;
|
||||
case 'scan_applet':
|
||||
uni.navigateToMiniProgram(JSON.parse(item.value))
|
||||
break
|
||||
case 'absolute': //外链url
|
||||
uni.navigateTo({
|
||||
url: `/pages/webview/webview?url=${item.menuUrl}`
|
||||
});
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
onShow(async () => {
|
||||
await store.actionsAPIuser()
|
||||
userInfo.value = uni.cache.get('userInfo')
|
||||
console.log(userInfo.value, 11)
|
||||
let res = uni.cache.get('userInfo')
|
||||
if (uni.cache.get('shopId')) {
|
||||
Object.assign(userInfo, res)
|
||||
} else {
|
||||
Object.assign(userInfo, {
|
||||
...res,
|
||||
...res.assetsSummary
|
||||
})
|
||||
}
|
||||
console.log(userInfo, 11)
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user