完善套餐购买、人脸拍照功能

This commit is contained in:
wangxiaowei
2026-04-11 18:33:23 +08:00
parent 2a95c0e176
commit be1ce34a74
6 changed files with 390 additions and 27 deletions

View File

@ -81,7 +81,8 @@
<!-- Bottom Button -->
<view class="bottom-bar">
<view class="btn-submit" @click="handleSubmit">立即开通</view>
<view class="btn-submit" @click="hanldeTakePhoto" v-if="info.order.end_time && id == info.order.group_id">录入人脸</view>
<view class="btn-submit" @click="handleSubmit" v-else>立即开通</view>
</view>
<!-- 完善信息提示弹窗 -->
@ -125,9 +126,8 @@
</view>
<view class="buy-modal-tips">
提示文字在此处显示提示文字在此处显示提示文字在此处显示提示文字在此处显示提示文字在此处显示
开通成功之后需要录入人脸信息
</view>
<view class="buy-modal-btn" @click="confirmBuy">立即开通</view>
</view>
</view>
@ -162,6 +162,7 @@ export default {
selectedPlan: 1, // 选择的套餐 1-月卡 2-季卡
info: {
order: {
id: 0,
group_id: 0, // 套餐ID
end_time: '', // 会员到期时间
},
@ -204,20 +205,22 @@ export default {
let self = this;
// 判断之前是否开通过任意一张会员卡,如果开通过且没有过期,提示"您已购买过套餐卡,无需重复购买"
if (self.info.order.end_time) {
if (self.info.order?.end_time) {
uni.showToast({ title: '您已购买过套餐卡,无需重复购买', icon: 'none' });
return false;
}
//TODO 如果信息审核没有通过uni.showToast提示"信息审核没通过,请耐心等待"
// 成人卡不需要提交资料
if (self.id == 2) {
self.showBuyModal = true;
} else {
// if (self.id == 2) {
// self.showBuyModal = true;
// } else {
// 其他卡需要先判断是否提交过资料,如果没有提交过资料,弹出提示完善信息的弹窗;如果提交过资料,根据审核状态提示不同的消息或者弹窗
self._post(
'ground.group/getGroupData',
null,
result => {
console.log("🚀 ~ result.data:", result.data)
if (!result.data) {
// 没有填写过信息,弹出完善信息提示弹窗
self.showInfoModal = true;
@ -225,23 +228,32 @@ export default {
}
if (result.data.status == 0) {
uni.showToast({ title: '信息审核中,请耐心等待', icon: 'none' });
setTimeout(() => {
uni.showToast({ title: '信息审核中,请耐心等待', icon: 'none' });
}, 100);
return false;
}
if (result.data.status == 2) {
uni.showToast({ title: '审核失败,请重新提交', icon: 'none' });
setTimeout(() => {
uni.showToast({ title: '审核失败,请重新提交', icon: 'none' });
}, 100);
// 没有填写过信息,弹出完善信息提示弹窗
self.showInfoModal = true;
return false;
}
if (result.data.status == 1) {
// 已经审核通过,弹出开通会员弹窗
self.showBuyModal = true;
return false;
}
},
false,
() => {
}
);
}
// }
},
closeInfoModal() {
this.showInfoModal = false;
@ -291,6 +303,7 @@ export default {
success: res => {
uni.hideLoading();
setTimeout(() => {
self.handleGetDetails();
self.showSuccessModal = true;
}, 1000);
},
@ -317,6 +330,15 @@ export default {
},
closeSuccessModal() {
this.showSuccessModal = false;
uni.navigateTo({
url: '/bundle/combo/face-list?id=' + this.id + '&order_id=' + this.info.order.id
});
},
hanldeTakePhoto() {
uni.navigateTo({
url: '/bundle/combo/face-list?id=' + this.id + '&order_id=' + this.info.order.id
});
}
}
}
@ -390,8 +412,6 @@ page {
display: flex;
justify-content: flex-end;
align-items: center;
}
}