计算购物车钱之前
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
<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="shopInfo.isVip!=0"
|
||||
<image class="my_info_right_qr" @click="clickEvent" v-if="userInfo.isVip!=0"
|
||||
: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>
|
||||
@@ -21,11 +21,26 @@
|
||||
<view class="my_item my_assets">
|
||||
<view class="my_item_title">我的资产</view>
|
||||
<view class="my_assets_list">
|
||||
<view class="my_list_item" @click="clickTo(item,index)" v-for="(item,index) in myAssetsList"
|
||||
:key="index">
|
||||
<image class="my_list_item_icon" :src="item.icon" mode="aspectFill"></image>
|
||||
<view class="my_list_item_name">{{item.name}}</view>
|
||||
<view class="my_list_item_num">{{item.num || '**'}}</view>
|
||||
<view class="my_list_item">
|
||||
<image class="my_list_item_icon"
|
||||
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>
|
||||
<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>
|
||||
<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>
|
||||
</view>
|
||||
</view>
|
||||
@@ -33,8 +48,8 @@
|
||||
<view class="my_item my_fun">
|
||||
<view class="my_item_title">我的功能</view>
|
||||
<view class="my_fun_list">
|
||||
<view class="my_list_item" @click="clickTo(item,index)" v-for="(item,index) in myFunList"
|
||||
:key="index">
|
||||
<view class="my_list_item" v-for="(item,index) in myFunList" :key="index"
|
||||
@click="clickTo(item,index)">
|
||||
<view class="my_list_item_left">
|
||||
<image class="my_list_item_icon" :src="item.icon" mode="aspectFill"></image>
|
||||
<view class="my_list_item_name">{{item.name}}</view>
|
||||
@@ -63,28 +78,10 @@
|
||||
onReady,
|
||||
onShow
|
||||
} from '@dcloudio/uni-app'
|
||||
const myAssetsList = ref([
|
||||
[{
|
||||
name: "储值",
|
||||
type: "recharge",
|
||||
num: 0,
|
||||
icon: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/my/storedValue.png"
|
||||
},
|
||||
{
|
||||
name: "积分",
|
||||
type: "points",
|
||||
num: 0,
|
||||
icon: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/my/points.png"
|
||||
},
|
||||
{
|
||||
name: "优惠券",
|
||||
type: "my_coupon",
|
||||
num: 0,
|
||||
icon: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/my/coupon.png"
|
||||
},
|
||||
// { name: "权益卡", type: "", num: 0, icon: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/my/equityCard.png"}
|
||||
]
|
||||
])
|
||||
import {
|
||||
productStore
|
||||
} from '@/stores/user.js';
|
||||
const store = productStore();
|
||||
const myFunList = ref([{
|
||||
name: "我的优惠券",
|
||||
type: "my_coupon",
|
||||
@@ -108,15 +105,40 @@
|
||||
},
|
||||
// { name: "关于", type: "", icon: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/my/inRegard.png"},
|
||||
])
|
||||
const shopInfo = reactive({
|
||||
isVip: 0
|
||||
})
|
||||
const userInfo = reactive({
|
||||
nickName: '无名',
|
||||
headImg: 'https://czg-qr-order.oss-cn-beijing.aliyuncs.com/my/my_member.png'
|
||||
})
|
||||
const teblist = ref([])
|
||||
const shopExtend = ref(null)
|
||||
const userInfo = ref({
|
||||
headImg: '',
|
||||
nickName: '',
|
||||
isVip: '',
|
||||
assetsSummary: {
|
||||
amount: 0,
|
||||
couponNum: 0,
|
||||
points: 2
|
||||
}
|
||||
})
|
||||
const clickEvent = () => {
|
||||
if (uni.cache.get('shopId') && uni.cache.get('token')) {
|
||||
if (this.userInfo.isVip == 0) {
|
||||
uni.pro.navigateTo('member/memberdetails', {
|
||||
shopId: uni.cache.get('shopId')
|
||||
})
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: '/pages/pay_code/pay_code?userInfo=' + JSON.stringify(this.userInfo)
|
||||
})
|
||||
}
|
||||
} else {
|
||||
uni.pro.navigateTo('member/list', {
|
||||
type: 'user_payCode'
|
||||
})
|
||||
}
|
||||
}
|
||||
onShow(async () => {
|
||||
await store.actionsAPIuser()
|
||||
userInfo.value = uni.cache.get('userInfo')
|
||||
console.log(userInfo.value, 11)
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
Reference in New Issue
Block a user