add
This commit is contained in:
parent
26ada06159
commit
c53c0b8cc4
|
@ -115,7 +115,8 @@
|
|||
datas.value.cart_num = '';
|
||||
return;
|
||||
}
|
||||
emit('change', datas.value);
|
||||
datas.value.types = true
|
||||
emit('change', datas.value, );
|
||||
}
|
||||
|
||||
const subtotal = computed(() => {
|
||||
|
@ -124,11 +125,6 @@
|
|||
return Number(num * sell * 100 / 100).toFixed(2)
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
defineExpose({
|
||||
setData,
|
||||
// founcsFn
|
||||
|
|
|
@ -196,7 +196,12 @@
|
|||
lat: queryParams.latitude,
|
||||
long: queryParams.longitude
|
||||
}, ))
|
||||
},
|
||||
fail() {
|
||||
console.log("获取定位失败")
|
||||
getShopList();
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
@ -400,6 +400,8 @@
|
|||
}
|
||||
|
||||
const addCart = (product_id, cart_num) => { //加入购物车
|
||||
console.log("触发了加入购物车")
|
||||
|
||||
cartCreateApi({
|
||||
type: 1,
|
||||
cart_num: cart_num,
|
||||
|
@ -617,6 +619,7 @@
|
|||
};
|
||||
const changeGood = (data) => { // 确定选择商品重量
|
||||
showGoodPopup.value = false;
|
||||
if (!data.types) return
|
||||
if (!userStore.token) return uni.showModal({
|
||||
content: '您需要先登录才可使用该功能, 是否前去登录',
|
||||
success: (e) => {
|
||||
|
@ -633,6 +636,7 @@
|
|||
},
|
||||
});
|
||||
|
||||
console.log('data', data)
|
||||
addCart(data.product_id, data.cart_num);
|
||||
}
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
<template>
|
||||
<view style="flex-grow: 1;overflow-y: auto;">
|
||||
<view class="user-info"
|
||||
:style="{backgroundImage: userInfo.user_ship!=1?'url(https://lihai001.oss-cn-chengdu.aliyuncs.com/def/e3a7b202404261113002322.webp)':'url(https://lihai001.oss-cn-chengdu.aliyuncs.com/attach/514af20240702100300627.png)' }">
|
||||
:style="{backgroundImage: userInfo.user_ship!=1?'url(https://lihai001.oss-cn-chengdu.aliyuncs.com/def/e3a7b202404261113002322.webp)':'url(https://lihai001.oss-cn-chengdu.aliyuncs.com/attach/aace1202407021022357574.png)' }">
|
||||
<view class="u-card">
|
||||
<view style="display: flex;" @click="updataInfp">
|
||||
<up-image :src="userInfo.avatar" mode="aspectFill" width="112rpx" height="112rpx"
|
||||
|
@ -50,8 +50,6 @@
|
|||
<view class="to-vip-btn" @click="navgo('/pageQuota/vipUser/index')">
|
||||
会员报备
|
||||
</view>
|
||||
|
||||
|
||||
</view>
|
||||
<view class="balance" @click="navgo('/pageQuota/balanceDetail/index?type=2')">
|
||||
<view class="" style="font-size: 28rpx;transform: translateY(10rpx);">
|
||||
|
|
|
@ -395,7 +395,7 @@
|
|||
const shop_Info = ref({})
|
||||
const cartList = ref([]);
|
||||
const orderInfo = ref({});
|
||||
const checkOrder = () => {
|
||||
const checkOrder = (store_id) => {
|
||||
checkOrderApi({
|
||||
cart_id: cartStore.cartList,
|
||||
store_id: STORE_INFO.id || 0,
|
||||
|
@ -406,7 +406,7 @@
|
|||
shop_Info.value = res.data.shopInfo || {}
|
||||
checkInventoryApi({
|
||||
cart_id: cartStore.cartList,
|
||||
store_id: res.data.shopInfo.id
|
||||
store_id: store_id || res.data.shopInfo.id
|
||||
}).then(res => {
|
||||
reservation.value = res.data.reservation
|
||||
})
|
||||
|
@ -557,7 +557,12 @@
|
|||
location.long = res.longitude;
|
||||
uni.setStorageSync('location', JSON.stringify(location))
|
||||
checkOrder();
|
||||
}
|
||||
},
|
||||
fail() {
|
||||
uni.$u.toast('获取位置当前失败,为你推荐当前门店')
|
||||
checkOrder(STORE_INFO.id);
|
||||
},
|
||||
complete() {}
|
||||
})
|
||||
}
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue