修改公众号关注逻辑,增加电子围栏

This commit is contained in:
2025-11-25 13:24:35 +08:00
parent 26f5beb660
commit 4d78311aaf
10 changed files with 1315 additions and 1057 deletions

View File

@@ -326,33 +326,8 @@ const indexsRef = ref(null);
onShow(async () => {
try {
uni.getLocation({
type: 'wgs84',
success: async (res) => {
console.log('getLocation',res);
let successres = await APIgeocodelocation({
lng: res.longitude,
lat: res.latitude
});
if (successres) {
let datastorage = {
country: successres.addressComponent.country, // "中国"
province: successres.addressComponent.province, //province: "陕西省"
address: successres.addressComponent.city, //district: "西安市"
district: successres.addressComponent.district, //district: "未央区"
lng: res.longitude,
lat: res.latitude
};
uni.cache.set('getLocationstorage', datastorage);
// 登录
proxy.$isResolve();
}
},
fail(error) {
console.error('获取经纬度失败',error);
}
});
await storeuser.getLocation()
proxy.$isResolve();
const shopId=uni.cache.get('shopId')
if(shopId){
indexsRef.value.getVipConfig();

View File

@@ -1227,6 +1227,10 @@ const disablePayType = computed(() => {
arr.add("余额支付");
}
}
if (cartStore.orderCostSummary.orderOriginFinalPayAmount <= 0) {
arr.add("微信支付");
}
//充值并付款时只能微信支付
if (rechargeItem.value.id) {
arr.add("余额支付");

File diff suppressed because it is too large Load Diff

View File

@@ -250,7 +250,7 @@
></view>
</view>
<text class="num">{{ ifcartNumber(item) }}</text>
<view class="btn">
<view class="btn" >
<up-icon
name="plus-circle-fill"
color="#E9AB7A"
@@ -495,7 +495,7 @@
</view>
<text class="num">{{ ifcartNumber(item1) }}</text>
<view class="btn">
<view class="btn" >
<up-icon
name="plus-circle-fill"
color="#E9AB7A"
@@ -1674,15 +1674,33 @@ const isProductAvailable = async (sellDaysStr, startTimeStr, endTimeStr) => {
return isInRange;
};
// 单规格
const singleclick = async (item, i) => {
console.log("单规格商品点击事件:", item, i);
/**
* 判断商品是否可售
* @param {Object} item
*/
function juageProductAvailable(item) {
if (!isProductAvailable(item.days, item.startTime, item.endTime)) {
uni.showToast({
title: "不在可售时间内",
});
return false;
}
if(item.isStock&&item.stockNumber<item.suitNum){
uni.showToast({
title: "库存不足",
icon: "none",
});
return false;
}
return true
}
// 单规格
const singleclick = async (item, i) => {
console.log("单规格商品点击事件:", item, i);
if(!juageProductAvailable(item)){
return false;
}
// 判断购物车是否有该选中商品
let res = null;
try {
@@ -3055,7 +3073,7 @@ function toHistory() {
}
.shop_sku_box:last-child {
padding-bottom: 60rpx;
padding-bottom: 140rpx;
}
.shop_sku_box {