diff --git a/miniprogram/pages/my/my.js b/miniprogram/pages/my/my.js index b9bbda6c..01c46c33 100644 --- a/miniprogram/pages/my/my.js +++ b/miniprogram/pages/my/my.js @@ -944,7 +944,7 @@ Page({ return } - const auditBlockedIds = { giftPay: true, wallet: true, withdrawRecords: true } + const auditBlockedIds = { giftPay: true, wallet: true, withdrawRecords: true, superArticle: true } if (app.globalData.auditMode && auditBlockedIds[id]) { wx.showToast({ title: '当前为体验版,暂无法访问', icon: 'none' }) return diff --git a/miniprogram/pages/my/my.wxml b/miniprogram/pages/my/my.wxml index 130a4803..9ec30bff 100644 --- a/miniprogram/pages/my/my.wxml +++ b/miniprogram/pages/my/my.wxml @@ -95,7 +95,7 @@ 快捷入口 - + 订单 @@ -116,7 +116,7 @@ 客资 链接与轨迹 - + 发文 发布文章 diff --git a/miniprogram/pages/super-article-editor/super-article-editor.js b/miniprogram/pages/super-article-editor/super-article-editor.js index b24da970..4401b154 100644 --- a/miniprogram/pages/super-article-editor/super-article-editor.js +++ b/miniprogram/pages/super-article-editor/super-article-editor.js @@ -3,20 +3,41 @@ const app = getApp() Page({ data: { statusBarHeight: 44, + auditMode: false, title: '', content: '', saving: false, meNickname: '', }, + /** 遮挡层拦截滚动穿透 */ + preventMove() {}, + + syncAuditMode() { + const audit = !!app.globalData.auditMode + this.setData({ auditMode: audit }) + return audit + }, + onLoad() { this.setData({ statusBarHeight: app.globalData.statusBarHeight || 44, meNickname: String(app.globalData.userInfo?.nickname || '我').trim() || '我', }) + this.syncAuditMode() + try { + app.getAuditMode && app.getAuditMode().catch(() => {}) + } catch (_) {} this.ensureSuperIdentity() }, + onShow() { + this.syncAuditMode() + try { + app.getAuditMode && app.getAuditMode().catch(() => {}) + } catch (_) {} + }, + async ensureSuperIdentity() { const userId = app.globalData.userInfo?.id if (!app.globalData.isLoggedIn || !userId) { @@ -48,15 +69,18 @@ Page({ }, insertMentionSelf() { + if (this.data.auditMode) return const nick = this.data.meNickname || '我' this.setData({ content: `${this.data.content}@${nick} ` }) }, insertHashLink() { + if (this.data.auditMode) return this.setData({ content: `${this.data.content}#链接(https://)` }) }, async submitArticle() { + if (this.data.auditMode || app.globalData.auditMode) return if (this.data.saving) return const userId = app.globalData.userInfo?.id const title = String(this.data.title || '').trim() diff --git a/miniprogram/pages/super-article-editor/super-article-editor.wxml b/miniprogram/pages/super-article-editor/super-article-editor.wxml index ee8528d3..61b1ef7a 100644 --- a/miniprogram/pages/super-article-editor/super-article-editor.wxml +++ b/miniprogram/pages/super-article-editor/super-article-editor.wxml @@ -11,7 +11,7 @@ 标题 - + 正文 @@ -20,10 +20,14 @@ #超链接 -