今日新增修改:
This commit is contained in:
1
MBTI_wang
Submodule
1
MBTI_wang
Submodule
Submodule MBTI_wang added at 513093a5e0
@@ -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: '朋友圈单页',
|
||||
|
||||
@@ -114,8 +114,11 @@
|
||||
<view wx:if="{{isSinglePageMode}}" class="footer-tip-single">
|
||||
<text>请点击底部「前往小程序」进入完整版后再操作</text>
|
||||
</view>
|
||||
<view wx:elif="{{auditMode && (isCreateMode || (isInitiator && detail.action === 'pay'))}}" class="footer-tip-single">
|
||||
<text>审核中,暂不支持代付支付</text>
|
||||
</view>
|
||||
<!-- 发起人 创建态 或 action=pay:去支付 -->
|
||||
<button wx:elif="{{(isCreateMode || (isInitiator && detail.action === 'pay'))}}" class="footer-btn pay-btn" bindtap="doInitiatorPay" disabled="{{paying}}">
|
||||
<button wx:elif="{{!auditMode && (isCreateMode || (isInitiator && detail.action === 'pay'))}}" class="footer-btn pay-btn" bindtap="doInitiatorPay" disabled="{{paying}}">
|
||||
<image class="btn-icon" src="/assets/icons/wallet.svg" mode="aspectFit"/>
|
||||
<text>{{paying ? '支付中...' : (isCreateMode ? '去支付' : '立即支付')}}</text>
|
||||
</button>
|
||||
|
||||
@@ -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()
|
||||
},
|
||||
|
||||
|
||||
@@ -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' })
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
<text class="block-text">{{mentor.offering}}</text>
|
||||
</view>
|
||||
|
||||
<view class="block" wx:if="{{mentor.priceSingle || mentor.priceHalfYear || mentor.priceYear}}">
|
||||
<view class="block" wx:if="{{(mentor.priceSingle || mentor.priceHalfYear || mentor.priceYear) && !auditMode}}">
|
||||
<view class="block-header"><text class="block-num">03</text><text class="block-title">收费标准</text></view>
|
||||
<view class="price-table">
|
||||
<view class="price-thead">
|
||||
@@ -72,7 +72,7 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="bottom-btn-area">
|
||||
<view class="bottom-btn-area" wx:if="{{!auditMode}}">
|
||||
<view class="contact-btn" bindtap="onContactTap">
|
||||
<icon name="message-circle" size="40" color="#00CED1" customClass="contact-icon"></icon>
|
||||
<text>联系导师</text>
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -101,12 +101,12 @@
|
||||
<text class="stat-num">订单</text>
|
||||
<text class="stat-label">我的订单</text>
|
||||
</view>
|
||||
<view class="stat-box" bindtap="handleMenuTap" data-id="giftPay">
|
||||
<view class="stat-box" wx:if="{{!auditMode}}" bindtap="handleMenuTap" data-id="giftPay">
|
||||
<image class="stat-icon-img" src="/assets/icons/share-teal.svg" mode="aspectFit"/>
|
||||
<text class="stat-num">代付</text>
|
||||
<text class="stat-label">我的代付</text>
|
||||
</view>
|
||||
<view class="stat-box" bindtap="handleMenuTap" data-id="wallet">
|
||||
<view class="stat-box" wx:if="{{!auditMode}}" bindtap="handleMenuTap" data-id="wallet">
|
||||
<image class="stat-icon-img" src="/assets/icons/wallet-teal.svg" mode="aspectFit"/>
|
||||
<text class="stat-num">{{walletBalanceText}}</text>
|
||||
<text class="stat-label">我的余额</text>
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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: '加载中...' })
|
||||
|
||||
Reference in New Issue
Block a user