购物车,订单,霸王餐

This commit is contained in:
wwz
2025-03-20 18:33:21 +08:00
parent 9da31e2faa
commit 5b8100aa64
16 changed files with 1382 additions and 1224 deletions

View File

@@ -146,7 +146,9 @@
}
// 去使用优惠券
const navigatorGo = (item) => {}
const navigatorGo = (item) => {
uni.pro.switchTab('index/index')
}
const getCouponList = async () => {
let res = await APIcouponfindByUserId({

View File

@@ -93,7 +93,7 @@
res = await APIshopUserpointsRecord({
page: formData.form.page,
size: formData.form.size,
status: formData.status
status: formData.form.status
})
}
if (res.totalPage == 0 || res.totalPage == 1 && res.totalRow <= 10) {
@@ -188,7 +188,7 @@
align-items: center;
color: #333;
margin-top: -60rpx;
padding: 0 120rpx;
// padding: 0 120rpx;
font-size: 28rpx;
.fonts {

View File

@@ -110,7 +110,6 @@
import {
APIuseractivate,
APIusershopInfodetail,
APIshopUserInfo
} from '@/common/api/member.js'
@@ -250,7 +249,7 @@
uni.pro.navigateTo(item.url, {
shopId: infoForn.shopId,
type: item.name == '明细' ? 1 : 2,
shopInfo: JSON.stringify(infoForn.userInfo.shopInfo)
shopInfo: JSON.stringify(infoForn.userInfo)
})
// uni.navigateTo({
@@ -320,7 +319,7 @@
});
return false;
}
console.log({
await store.actionspayltPayVip({
shopId: infoForn.shopId,
activateId: infoForn.id,
shopUserId: infoForn.userInfo.id,
@@ -328,15 +327,6 @@
returnUrl: '', //跳转地址
buyerRemark: ''
})
let res = await store.actionspayltPayVip({
shopId: infoForn.shopId,
activateId: infoForn.id,
shopUserId: infoForn.userInfo.id,
amount: infoForn.amount, //金额
returnUrl: '', //跳转地址
buyerRemark: ''
})
console.log(res)
}
@@ -377,11 +367,6 @@
uni.cache.set('shopId', options.shopId, 30)
infoForn.shopId = options.shopId ? options.shopId : uni.cache.get('shopId')
}
// let resone = await APIusershopInfodetail({
// shopId: infoForn.shopId
// })
// infoForn.shopUserInfo = resone.shopInfo
asyncshopUserInfo()
if (options.type == 'detail') {
detailtype.value = 'detail'

View File

@@ -101,7 +101,6 @@
onMounted
} from 'vue'
import {
APIusershopInfodetail,
APIshopUserInfo
} from '@/common/api/member.js'
@@ -135,7 +134,7 @@
uni.pro.navigateTo('user/member/billDetails', {
shopId: shopUserInfo.shopId,
type: type,
shopInfo: JSON.stringify(shopUserInfo.shopInfo)
shopInfo: JSON.stringify(shopUserInfo)
})
} else if (type == 3) {
uni.pro.navigateTo('user/coupon', {
@@ -183,11 +182,6 @@
if (pageParams.shopId) {
shopUserInfo.shopId = pageParams.shopId
uni.cache.set('shopId', pageParams.shopId, 30)
// let res = await APIusershopInfodetail({
// shopId: pageParams.shopId
// })
// 根据传的shopInfo来返回上面的值
// shopUserInfo.shopExtend = res.shopExtend.member_bg
asyncshopUserInfo()
}

View File

@@ -32,7 +32,7 @@
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.accountPoints ||'0'}}</view>
<view class="my_list_item_num">{{userInfo.accountPoints ||userInfo.points}}</view>
</view>
<view class="my_list_item">
<image class="my_list_item_icon"
@@ -131,10 +131,17 @@
// 我的资产
const Myassets = () => {
uni.pro.navigateTo('user/member/memberdetails', {
shopId: uni.cache.get('shopId'),
type: 'index'
})
if (uni.cache.get('shopId')) {
uni.pro.navigateTo('user/member/memberdetails', {
shopId: uni.cache.get('shopId'),
type: 'index'
})
} else {
uni.pro.navigateTo('user/member/list', {
shopId: uni.cache.get('shopId'),
type: 'index'
})
}
}
const clickTo = (item, index) => {
@@ -191,13 +198,12 @@
onShow(async () => {
await store.actionsAPIuser()
let res = uni.cache.get('orderVIP')
if (uni.cache.get('shopId')) {
Object.assign(userInfo, res)
Object.assign(userInfo, uni.cache.get('orderVIP'))
} else {
Object.assign(userInfo, {
...res,
...res.assetsSummary
...uni.cache.get('userInfo'),
...uni.cache.get('userInfo').assetsSummary
})
}
})