开通套餐之前,需要阅读服务协议

This commit is contained in:
wangxiaowei
2026-05-08 10:41:14 +08:00
parent d897df444b
commit aed08c445e

View File

@ -108,6 +108,15 @@
<!-- Bottom Button --> <!-- Bottom Button -->
<view class="bottom-bar"> <view class="bottom-bar">
<view class="xy" style="margin-bottom: 32rpx;display: flex; align-items: center;" @click="yxChekced = !yxChekced">
<view style="margin-right: 10rpx;" :class="yxChekced ? 'active' : ''">
<view class="icon-box d-c-c card-checkout"><span class="icon iconfont icon-xuanze" :style="{ fontSize: '46rpx', color: yxChekced ? '#365A9A' : '#DCDCDC' }"></span>
</view>
</view>
<view style="font-size: 30rpx; color: #666;">
我已认真阅读并查看此协议<text style="color: #FF5951;" @click.stop="openNoticeModal">秀湖网球中心篮球馆会员卡服务协议</text>
</view>
</view>
<!-- 两个按钮并排显示的情况 --> <!-- 两个按钮并排显示的情况 -->
<view class="btn-group" v-if="result && result.status == 1 && id == result.group_id && info.order && info.order.id"> <view class="btn-group" v-if="result && result.status == 1 && id == result.group_id && info.order && info.order.id">
<view class="btn-submit btn-half" @click="handleSubmit">立即续费</view> <view class="btn-submit btn-half" @click="handleSubmit">立即续费</view>
@ -210,6 +219,7 @@ export default {
showBuyModal: false, // 会员购买弹窗 showBuyModal: false, // 会员购买弹窗
showSuccessModal: false, // 购买成功弹窗 showSuccessModal: false, // 购买成功弹窗
showNoticeModal: false, // 注意事项弹窗 showNoticeModal: false, // 注意事项弹窗
yxChekced: false,
selectedPlan: 1, // 选择的套餐 1-月卡 2-季卡 selectedPlan: 1, // 选择的套餐 1-月卡 2-季卡
info: { info: {
order: { order: {
@ -281,6 +291,13 @@ export default {
handleSubmit() { handleSubmit() {
let self = this; let self = this;
if (!self.yxChekced) {
uni.showToast({
title: '请认真阅读并查看协议',
icon: 'none'
});
return false;
}
if (self.info.order && self.info.order.id) { if (self.info.order && self.info.order.id) {
self.isRenewal = true; self.isRenewal = true;
@ -341,7 +358,6 @@ export default {
return false; return false;
} }
if (self.result.status == 1) { if (self.result.status == 1) {
// 已经审核通过,弹出开通会员弹窗 // 已经审核通过,弹出开通会员弹窗
self.showBuyModal = true; self.showBuyModal = true;
@ -374,6 +390,7 @@ export default {
confirmBuy() { confirmBuy() {
let self = this let self = this
self.showBuyModal = false; self.showBuyModal = false;
self._post( self._post(
'order.group/submitGroupOrder', 'order.group/submitGroupOrder',
@ -443,10 +460,46 @@ export default {
}, },
openNoticeModal() { openNoticeModal() {
uni.navigateTo({ uni.showLoading({
url: '/bundle/combo/desc' title: '加载中'
});
// 1. 协议文件地址(可替换为实际后端返回的 word 文件 url
const url = 'https://xh.stnav.com/xhlqfwxy.docx';
// 2. 下载 word 文件
uni.downloadFile({
url,
success: (res) => {
if (res.statusCode === 200) {
// 3. 预览 word 文件
uni.openDocument({
filePath: res.tempFilePath,
fileType: 'doc',
success: () => {
// 预览成功
uni.hideLoading();
},
fail: (err) => {
uni.hideLoading();
setTimeout(() => {
uni.showToast({ title: '无法预览文件', icon: 'none' });
}, 1000);
}
});
} else {
uni.hideLoading();
// setTimeout(() => {
// uni.showToast({ title: '下载失败', icon: 'none' });
// }, 1000);
}
},
fail: () => {
uni.hideLoading();
// setTimeout(() => {
// uni.showToast({ title: '下载失败', icon: 'none' });
// }, 1000);
}
}); });
// this.showNoticeModal = true;
}, },
closeNoticeModal() { closeNoticeModal() {
@ -1091,4 +1144,14 @@ page {
height: 20rpx; height: 20rpx;
margin-right: 6rpx; margin-right: 6rpx;
} }
.xy {
.active {
.card-checkout {
.iconfont {
color: #365A9A;
}
}
}
}
</style> </style>