From aec0c59b091fe4b3c001afeec2629a8983fcfb76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B9=98=E9=A3=8E?= Date: Mon, 27 Apr 2026 10:40:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=8A=E6=97=A5=E6=96=B0=E5=A2=9E=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=EF=BC=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- MBTI_wang | 1 + miniprogram/pages/gift-pay/detail.js | 17 ++++++++++++++-- miniprogram/pages/gift-pay/detail.wxml | 5 ++++- miniprogram/pages/gift-pay/list.js | 12 ++++++++++- .../pages/gift-pay/redemption-detail.js | 12 ++++++++++- miniprogram/pages/match/match.js | 5 +++++ .../pages/mentor-detail/mentor-detail.js | 19 +++++++++++++++++- .../pages/mentor-detail/mentor-detail.wxml | 4 ++-- miniprogram/pages/my/my.js | 10 ++++++++++ miniprogram/pages/my/my.wxml | 4 ++-- miniprogram/pages/purchases/purchases.js | 9 ++++++--- miniprogram/pages/read/read.js | 20 ++++++++++++++++++- miniprogram/pages/referral/referral.js | 12 +++++++++++ miniprogram/pages/wallet/wallet.js | 4 ++++ .../withdraw-records/withdraw-records.js | 17 +++++++++++++++- 15 files changed, 136 insertions(+), 15 deletions(-) create mode 160000 MBTI_wang diff --git a/MBTI_wang b/MBTI_wang new file mode 160000 index 00000000..513093a5 --- /dev/null +++ b/MBTI_wang @@ -0,0 +1 @@ +Subproject commit 513093a5e04121e537cca7301b9db7171abff50e diff --git a/miniprogram/pages/gift-pay/detail.js b/miniprogram/pages/gift-pay/detail.js index 9f25bf77..24b1264e 100644 --- a/miniprogram/pages/gift-pay/detail.js +++ b/miniprogram/pages/gift-pay/detail.js @@ -23,12 +23,21 @@ Page({ // 创建态 isCreateMode: false, giftQuantity: 1, - unitPrice: 0 + unitPrice: 0, + auditMode: false, }, - onLoad(options) { + onShow() { + this.setData({ auditMode: !!app.globalData.auditMode }) + }, + + async onLoad(options) { wx.showShareMenu({ menus: ['shareAppMessage', 'shareTimeline'] }) this.setData({ statusBarHeight: app.globalData.statusBarHeight || 44 }) + try { + await app.getAuditMode() + } catch (e) {} + this.setData({ auditMode: !!app.globalData.auditMode }) if (options?.ref || options?.referralCode) { app.handleReferralCode({ query: { ref: options.ref || options.referralCode } }) } @@ -112,6 +121,10 @@ Page({ // 发起人支付(改造后:我帮别人付款) async doInitiatorPay() { + if (app.globalData.auditMode) { + wx.showToast({ title: '审核中,暂不支持代付支付', icon: 'none' }) + return + } if (this.data.isSinglePageMode) { wx.showModal({ title: '朋友圈单页', diff --git a/miniprogram/pages/gift-pay/detail.wxml b/miniprogram/pages/gift-pay/detail.wxml index 2fde1afb..e8b83e43 100644 --- a/miniprogram/pages/gift-pay/detail.wxml +++ b/miniprogram/pages/gift-pay/detail.wxml @@ -114,8 +114,11 @@ 请点击底部「前往小程序」进入完整版后再操作 + + 审核中,暂不支持代付支付 + - diff --git a/miniprogram/pages/gift-pay/list.js b/miniprogram/pages/gift-pay/list.js index 0f6d3fe8..160f3967 100644 --- a/miniprogram/pages/gift-pay/list.js +++ b/miniprogram/pages/gift-pay/list.js @@ -10,11 +10,21 @@ Page({ loading: false }, - onLoad(options) { + async onLoad(options) { this.setData({ statusBarHeight: app.globalData.statusBarHeight || 44 }) if (options && (options.ref || options.referralCode)) { app.handleReferralCode({ query: { ref: options.ref || options.referralCode } }) } + try { + await app.getAuditMode() + } catch (e) {} + if (app.globalData.auditMode) { + wx.showToast({ title: '当前为体验版,暂无法访问', icon: 'none' }) + setTimeout(() => { + wx.navigateBack({ fail: () => wx.switchTab({ url: '/pages/index/index' }) }) + }, 400) + return + } this.loadData() }, diff --git a/miniprogram/pages/gift-pay/redemption-detail.js b/miniprogram/pages/gift-pay/redemption-detail.js index d362139b..3e8acfce 100644 --- a/miniprogram/pages/gift-pay/redemption-detail.js +++ b/miniprogram/pages/gift-pay/redemption-detail.js @@ -12,8 +12,18 @@ Page({ remaining: 0 }, - onLoad(options) { + async onLoad(options) { this.setData({ statusBarHeight: app.globalData.statusBarHeight || 44 }) + try { + await app.getAuditMode() + } catch (e) {} + if (app.globalData.auditMode) { + wx.showToast({ title: '当前为体验版,暂无法访问', icon: 'none' }) + setTimeout(() => { + wx.navigateBack({ fail: () => wx.switchTab({ url: '/pages/index/index' }) }) + }, 400) + return + } const requestSn = (options.requestSn || '').trim() if (!requestSn) { wx.showToast({ title: '链接无效', icon: 'none' }) diff --git a/miniprogram/pages/match/match.js b/miniprogram/pages/match/match.js index 30a34590..b1274930 100644 --- a/miniprogram/pages/match/match.js +++ b/miniprogram/pages/match/match.js @@ -721,6 +721,11 @@ Page({ // 购买匹配次数 async buyMatchCount() { this.setData({ showUnlockModal: false }) + + if (app.globalData.auditMode) { + wx.showToast({ title: '审核中,暂不支持购买', icon: 'none' }) + return + } try { const openId = await app.ensurePayOpenId() diff --git a/miniprogram/pages/mentor-detail/mentor-detail.js b/miniprogram/pages/mentor-detail/mentor-detail.js index 071ea155..fff68caa 100644 --- a/miniprogram/pages/mentor-detail/mentor-detail.js +++ b/miniprogram/pages/mentor-detail/mentor-detail.js @@ -15,13 +15,21 @@ Page({ selectedType: '', selectedAmount: 0, creating: false, + auditMode: false, }, onLoad(options) { - this.setData({ statusBarHeight: app.globalData.statusBarHeight || 44 }) + this.setData({ + statusBarHeight: app.globalData.statusBarHeight || 44, + auditMode: !!app.globalData.auditMode, + }) if (options.id) this.loadDetail(options.id) }, + onShow() { + this.setData({ auditMode: !!app.globalData.auditMode }) + }, + async loadDetail(id) { this.setData({ loading: true }) try { @@ -60,6 +68,10 @@ Page({ }, onContactTap() { + if (app.globalData.auditMode) { + wx.showToast({ title: '当前为体验版,暂无法支付', icon: 'none' }) + return + } if (!this.data.mentor || this.data.consultOptions.length === 0) { wx.showToast({ title: '暂无咨询项目', icon: 'none' }) return @@ -86,6 +98,11 @@ Page({ }, async onConfirmConsult() { + if (app.globalData.auditMode) { + wx.showToast({ title: '当前为体验版,暂无法支付', icon: 'none' }) + this.setData({ showConsultModal: false, creating: false }) + return + } const { mentor, selectedType } = this.data const userId = app.globalData.userInfo?.id if (!userId) { diff --git a/miniprogram/pages/mentor-detail/mentor-detail.wxml b/miniprogram/pages/mentor-detail/mentor-detail.wxml index d7c67051..833c6e40 100644 --- a/miniprogram/pages/mentor-detail/mentor-detail.wxml +++ b/miniprogram/pages/mentor-detail/mentor-detail.wxml @@ -33,7 +33,7 @@ {{mentor.offering}} - + 03收费标准 @@ -72,7 +72,7 @@ - + 联系导师 diff --git a/miniprogram/pages/my/my.js b/miniprogram/pages/my/my.js index 8189c144..b9bbda6c 100644 --- a/miniprogram/pages/my/my.js +++ b/miniprogram/pages/my/my.js @@ -943,6 +943,12 @@ Page({ this.showLogin() return } + + const auditBlockedIds = { giftPay: true, wallet: true, withdrawRecords: true } + if (app.globalData.auditMode && auditBlockedIds[id]) { + wx.showToast({ title: '当前为体验版,暂无法访问', icon: 'none' }) + return + } const routes = { orders: '/pages/purchases/purchases', @@ -1149,6 +1155,10 @@ Page({ }, async handleWithdraw() { + if (app.globalData.auditMode) { + wx.showToast({ title: '审核中,暂不支持提现', icon: 'none' }) + return + } if (!this.data.isLoggedIn) { this.showLogin(); return } const amount = parseFloat(this.data.pendingEarnings) if (isNaN(amount) || amount <= 0) { diff --git a/miniprogram/pages/my/my.wxml b/miniprogram/pages/my/my.wxml index 14f859eb..130a4803 100644 --- a/miniprogram/pages/my/my.wxml +++ b/miniprogram/pages/my/my.wxml @@ -101,12 +101,12 @@ 订单 我的订单 - + 代付 我的代付 - + {{walletBalanceText}} 我的余额 diff --git a/miniprogram/pages/purchases/purchases.js b/miniprogram/pages/purchases/purchases.js index 6555a2b1..441d9cd7 100644 --- a/miniprogram/pages/purchases/purchases.js +++ b/miniprogram/pages/purchases/purchases.js @@ -173,9 +173,12 @@ Page({ return } if (nav.kind === 'page' && nav.path) { - if (nav.path === '/pages/vip/vip' && app.globalData.auditMode) { - wx.showToast({ title: '当前为体验版,暂无法访问', icon: 'none' }) - return + if (app.globalData.auditMode) { + const block = { '/pages/vip/vip': true, '/pages/wallet/wallet': true, '/pages/gift-pay/list': true } + if (block[nav.path]) { + wx.showToast({ title: '当前为体验版,暂无法访问', icon: 'none' }) + return + } } wx.navigateTo({ url: nav.path }) return diff --git a/miniprogram/pages/read/read.js b/miniprogram/pages/read/read.js index f65ca150..0a27480f 100644 --- a/miniprogram/pages/read/read.js +++ b/miniprogram/pages/read/read.js @@ -460,10 +460,12 @@ Page({ onShow() { const sp = this._detectReadSinglePage() + const audit = app.globalData.auditMode || false this.setData({ - auditMode: app.globalData.auditMode || false, + auditMode: audit, readSinglePageMode: sp, ...(sp ? {} : { momentsPaywallExpanded: false, showMomentsLaunchGuideModal: false }), + ...(audit && this.data.showGiftModal ? { showGiftModal: false } : {}), }) this._refreshAccessOnShow() if (!sp) { @@ -1318,6 +1320,10 @@ Page({ // 代付分享:直接跳转代付页,在代付页输入数量并支付(简化流程) showGiftShareModal() { + if (app.globalData.auditMode) { + wx.showToast({ title: '审核中,暂不支持代付', icon: 'none' }) + return + } if (!app.globalData.userInfo?.id) { wx.showToast({ title: '请先登录', icon: 'none' }) return @@ -1350,6 +1356,10 @@ Page({ async confirmGiftPay() { if (this.data.giftPaying) return + if (app.globalData.auditMode) { + wx.showToast({ title: '审核中,暂不支持代付', icon: 'none' }) + return + } // 朋友圈单页模式禁止支付 try { const sys = wx.getSystemInfoSync() @@ -1721,6 +1731,14 @@ Page({ async processPayment(type, sectionId, amount) { console.log('[Pay] processPayment开始:', { type, sectionId, amount }) + if (app.globalData.auditMode) { + try { + wx.hideLoading() + } catch (e) {} + wx.showToast({ title: '审核中,暂不支持购买', icon: 'none' }) + return + } + if (this.data.readSinglePageMode || this._detectReadSinglePage()) { try { wx.hideLoading() diff --git a/miniprogram/pages/referral/referral.js b/miniprogram/pages/referral/referral.js index dff1cbc5..163f3814 100644 --- a/miniprogram/pages/referral/referral.js +++ b/miniprogram/pages/referral/referral.js @@ -648,6 +648,10 @@ Page({ // 提现 - 直接到微信零钱 async handleWithdraw() { trackClick('referral', 'btn_click', '申请提现') + if (app.globalData.auditMode) { + wx.showToast({ title: '审核中,暂不支持提现', icon: 'none' }) + return + } const availableEarnings = this.data.availableEarningsNum || 0 const minWithdrawAmount = this.data.minWithdrawAmount || 10 const hasWechatId = this.data.hasWechatId @@ -695,11 +699,19 @@ Page({ // 跳转提现记录页 goToWithdrawRecords() { trackClick('referral', 'nav_click', '提现记录') + if (app.globalData.auditMode) { + wx.showToast({ title: '当前为体验版,暂无法访问', icon: 'none' }) + return + } wx.navigateTo({ url: '/pages/withdraw-records/withdraw-records' }) }, // 执行提现(success:false 时 app.request 会 reject 并挂 e.response,需 catch 里处理 needBindWechat) async doWithdraw(amount) { + if (app.globalData.auditMode) { + wx.showToast({ title: '审核中,暂不支持提现', icon: 'none' }) + return + } wx.showLoading({ title: '提现中...' }) try { diff --git a/miniprogram/pages/wallet/wallet.js b/miniprogram/pages/wallet/wallet.js index c1c90d45..5ff8e43d 100644 --- a/miniprogram/pages/wallet/wallet.js +++ b/miniprogram/pages/wallet/wallet.js @@ -76,6 +76,10 @@ Page({ async handleRecharge() { trackClick('wallet', 'btn_click', '充值') + if (app.globalData.auditMode) { + wx.showToast({ title: '审核中,暂不支持充值', icon: 'none' }) + return + } if (!app.globalData.isLoggedIn || !app.globalData.userInfo) { wx.showToast({ title: '请先登录', icon: 'none' }) return diff --git a/miniprogram/pages/withdraw-records/withdraw-records.js b/miniprogram/pages/withdraw-records/withdraw-records.js index fa878d37..808d3a61 100644 --- a/miniprogram/pages/withdraw-records/withdraw-records.js +++ b/miniprogram/pages/withdraw-records/withdraw-records.js @@ -10,13 +10,24 @@ Page({ loading: true }, - onLoad() { + async onLoad() { wx.showShareMenu({ withShareTimeline: true }) this.setData({ statusBarHeight: app.globalData.statusBarHeight || 44 }) + try { + await app.getAuditMode() + } catch (e) {} + if (app.globalData.auditMode) { + wx.showToast({ title: '当前为体验版,暂无法访问', icon: 'none' }) + setTimeout(() => { + wx.navigateBack({ fail: () => wx.switchTab({ url: '/pages/my/my' }) }) + }, 400) + return + } this.loadRecords() }, onShow() { + if (app.globalData.auditMode) return this.loadRecords() }, @@ -73,6 +84,10 @@ Page({ }, async onReceiveTap(e) { + if (app.globalData.auditMode) { + wx.showToast({ title: '当前为体验版,暂无法操作', icon: 'none' }) + return + } const id = e.currentTarget.dataset.id if (!id) return wx.showLoading({ title: '加载中...' })