Commit bfe59b18 authored by spc's avatar spc

fixed

parent 165a08ae
......@@ -68,9 +68,9 @@
<!-- 悬浮授权手机号模块 -->
<view class="auth-phone-module" v-if="!userStore.memberInfo?.mobile">
<image class="auth-phone-bg" :src="$baseUrl + 'homepage/Q3Res/accessBg.png'"></image>
<image class="auth-phone-bg" :src="$baseUrl + 'homepage/Q3Res/accessBg2.png'"></image>
<view class="auth-phone-btn-container">
<image class="auth-phone-btn" :src="$baseUrl + 'homepage/Q3Res/accessBtn.png'" @tap="handleAuthPhoneClick">
<image class="auth-phone-btn" :src="$baseUrl + 'homepage/Q3Res/accessBtn2.png'" @tap="handleAuthPhoneClick">
</image>
</view>
</view>
......
......@@ -218,7 +218,8 @@ export default {
activityId: '', // 活动ID
sessionKey: '', // 会话密钥
appGoodsId: '' // 应用商品ID
}
},
isSubmitting: false // 用于防连点
}
},
computed: {
......@@ -849,17 +850,28 @@ export default {
// 确认兑换
async confirmExchange() {
this.closeModal();
// 防连点检查
if (this.isSubmitting) return;
this.isSubmitting = true;
try {
this.closeModal();
// 非实物商品:直接下单
if (!this.isPhysicalGoods()) {
await this.exchangeGoods();
// 非实物商品:直接下单
if (!this.isPhysicalGoods()) {
await this.exchangeGoods();
}
} finally {
this.isSubmitting = false;
}
},
// 兑换商品(仅处理非实物商品)
async exchangeGoods() {
try {
// 防连点检查
if (this.isSubmitting) return;
this.isSubmitting = true;
uni.showLoading({
title: '兑换中...'
});
......@@ -880,6 +892,8 @@ export default {
title: error.message || '兑换失败,请重试',
icon: 'none'
});
} finally {
this.isSubmitting = false;
}
},
......@@ -1123,6 +1137,22 @@ export default {
min-height: 100vh;
background-color: #f5f5f5;
box-sizing: border-box;
overflow-x: hidden; /* 禁止横向滚动 */
position: relative;
}
/* 禁止整个页面横向滚动 */
page {
overflow-x: hidden;
width: 100%;
}
/* 确保所有内容区域都不会超出屏幕宽度 */
.content,
.goods-carousel,
.coupon-card {
max-width: 100%;
box-sizing: border-box;
}
/* 顶部导航栏 */
......
......@@ -150,7 +150,9 @@ export default {
homeStore: null,
// 弹窗状态
showConfirmModal: false,
showAddressModal: false
showAddressModal: false,
// 用于防连点
isSubmitting: false
}
},
onLoad(options) {
......@@ -395,12 +397,19 @@ export default {
// 确认兑换
async confirmExchange() {
// 将用户填写的订单备注赋值给remark字段
this.orderParams.remark = this.orderNotes;
// 添加订单来源子渠道
this.orderParams.orderSubSource = this.orderSubSource;
this.closeModal();
await this.createOrder();
// 防连点检查
if (this.isSubmitting) return;
this.isSubmitting = true;
try {
// 将用户填写的订单备注赋值给remark字段
this.orderParams.remark = this.orderNotes;
// 添加订单来源子渠道
this.orderParams.orderSubSource = this.orderSubSource;
this.closeModal();
await this.createOrder();
} finally {
this.isSubmitting = false;
}
},
// 判断是否为实物商品
......@@ -412,6 +421,10 @@ export default {
// 创建订单
async createOrder() {
try {
// 防连点检查
if (this.isSubmitting) return;
this.isSubmitting = true;
uni.showLoading({
title: '下单中...'
});
......@@ -433,6 +446,8 @@ export default {
console.error('下单失败:', error);
uni.hideLoading();
this.navigateToPayResult(false, null, error.message);
} finally {
this.isSubmitting = false;
}
},
......
......@@ -95,9 +95,9 @@
<!-- 添加宝宝信息模块 -->
<view class="add-baby-info-module"
v-if="cfgStatus.isRegister && (!babyInfo?.allBabyBaseInfo || babyInfo.allBabyBaseInfo.length === 0)">
<image class="add-baby-info-bg" :src="$baseUrl + 'homepage/Q3Res/addBabyInfoBg.png'"></image>
<image class="add-baby-info-bg" :src="$baseUrl + 'homepage/Q3Res/addBabyInfoBg2.png'"></image>
<view class="add-baby-info-btn-container">
<image class="add-baby-info-btn" :src="$baseUrl + 'homepage/Q3Res/addBabyInfoBtn.png'"
<image class="add-baby-info-btn" :src="$baseUrl + 'homepage/Q3Res/addBabyInfoBtn2.png'"
@tap="handleAddBabyInfoClick"></image>
</view>
</view>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment