diff --git a/bundle/combo/details.vue b/bundle/combo/details.vue index eb34bde..253f312 100644 --- a/bundle/combo/details.vue +++ b/bundle/combo/details.vue @@ -108,6 +108,15 @@ + + + + + + + 我已认真阅读并查看此协议《秀湖网球中心篮球馆会员卡服务协议》 + + 立即续费 @@ -210,6 +219,7 @@ export default { showBuyModal: false, // 会员购买弹窗 showSuccessModal: false, // 购买成功弹窗 showNoticeModal: false, // 注意事项弹窗 + yxChekced: false, selectedPlan: 1, // 选择的套餐 1-月卡 2-季卡 info: { order: { @@ -281,6 +291,13 @@ export default { handleSubmit() { let self = this; + if (!self.yxChekced) { + uni.showToast({ + title: '请认真阅读并查看协议', + icon: 'none' + }); + return false; + } if (self.info.order && self.info.order.id) { self.isRenewal = true; @@ -341,7 +358,6 @@ export default { return false; } - if (self.result.status == 1) { // 已经审核通过,弹出开通会员弹窗 self.showBuyModal = true; @@ -374,6 +390,7 @@ export default { confirmBuy() { let self = this + self.showBuyModal = false; self._post( 'order.group/submitGroupOrder', @@ -443,10 +460,46 @@ export default { }, openNoticeModal() { - uni.navigateTo({ - url: '/bundle/combo/desc' + uni.showLoading({ + 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() { @@ -1091,4 +1144,14 @@ page { height: 20rpx; margin-right: 6rpx; } + +.xy { + .active { + .card-checkout { + .iconfont { + color: #365A9A; + } + } + } +} \ No newline at end of file