优化首页逻辑以支持动态标题生成,提升用户体验。更新管理后台资源文件,替换旧的 JavaScript 和 CSS 文件,增强页面性能和样式一致性。同时,调整数据库结构以支持更细粒度的推送状态。
This commit is contained in:
@@ -348,7 +348,7 @@ Page({
|
||||
.replace(/\{\{prefix\}\}/g, prefix)
|
||||
.trim() || baseTitle
|
||||
} else if (prefix) {
|
||||
mainTitle = `${prefix} · ${nm}`
|
||||
mainTitle = baseTitle
|
||||
} else {
|
||||
mainTitle = `@${nm}`
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@ const soulBridge = require('../../utils/soulBridge.js')
|
||||
const { trackClick } = require('../../utils/trackClick')
|
||||
const { isSafeImageSrc } = require('../../utils/imageUrl.js')
|
||||
const { resolveAvatarWithMbti } = require('../../utils/mbtiAvatar.js')
|
||||
const mpPagePopups = require('../../utils/mpPagePopups.js')
|
||||
|
||||
Page({
|
||||
data: { statusBarHeight: 44, navBarTotalPx: 88, member: null, loading: true, isOwnProfile: false },
|
||||
@@ -31,15 +32,15 @@ Page({
|
||||
},
|
||||
|
||||
/**
|
||||
* 未登录解锁前:先展示后台可配的「链接 vs 解锁」说明,用户确认后再弹出登录引导(mpUi.memberDetailPage)
|
||||
* 未登录解锁前:先展示后台可配的「链接 vs 解锁」说明(mpUi.pagePopupItems:unlockIntroTitle / unlockIntroBody),兼容旧 memberDetailPage
|
||||
*/
|
||||
_showUnlockIntroThenLogin(afterConfirm) {
|
||||
const mp = app.globalData.configCache?.mpConfig?.mpUi?.memberDetailPage || {}
|
||||
const title = String(mp.unlockIntroTitle || '解锁与链接说明').trim() || '解锁与链接说明'
|
||||
const body = String(
|
||||
mp.unlockIntroBody ||
|
||||
'「链接」用于提交留资,由对方通过获客计划跟进;「解锁」用于复制手机/微信号后自行添加好友。\n\n请确认已了解后再登录。',
|
||||
).trim()
|
||||
const title =
|
||||
mpPagePopups.getMemberDetailContent(app, 'unlockIntroTitle') ||
|
||||
'解锁与链接说明'
|
||||
const body =
|
||||
mpPagePopups.getMemberDetailContent(app, 'unlockIntroBody') ||
|
||||
'「链接」用于提交留资,由对方通过获客计划跟进;「解锁」用于复制手机/微信号后自行添加好友。\n\n请确认已了解后再登录。'
|
||||
wx.showModal({
|
||||
title,
|
||||
content: body,
|
||||
|
||||
@@ -22,6 +22,7 @@ const { checkAndExecute } = require('../../utils/ruleEngine')
|
||||
const soulBridge = require('../../utils/soulBridge.js')
|
||||
|
||||
const app = getApp()
|
||||
const mpPagePopups = require('../../utils/mpPagePopups.js')
|
||||
|
||||
/** 阅读页解析正文用:人物字典 + #标签(与 /config/read-extras 一致) */
|
||||
function getContentParseConfig() {
|
||||
@@ -299,10 +300,17 @@ Page({
|
||||
const mp = (cfg && cfg.mpConfig) || {}
|
||||
const auditMode = !!mp.auditMode
|
||||
app.globalData.auditMode = auditMode
|
||||
const rp = (mp.mpUi && mp.mpUi.readPage) || {}
|
||||
const readBeforeLoginHint = String(rp.beforeLoginHint || '').trim()
|
||||
const readSinglePageTitle = String(rp.singlePageTitle || '解锁全文').trim() || '解锁全文'
|
||||
const readSinglePageHint = String(rp.singlePagePaywallHint || '').trim()
|
||||
const readBeforeLoginHint =
|
||||
mpPagePopups.getReadPageContent(app, 'beforeLoginHint') ||
|
||||
String((mp.mpUi && mp.mpUi.readPage && mp.mpUi.readPage.beforeLoginHint) || '').trim()
|
||||
let readSinglePageTitle =
|
||||
mpPagePopups.getReadPageContent(app, 'singlePageTitle') ||
|
||||
String((mp.mpUi && mp.mpUi.readPage && mp.mpUi.readPage.singlePageTitle) || '').trim() ||
|
||||
'解锁全文'
|
||||
readSinglePageTitle = readSinglePageTitle || '解锁全文'
|
||||
const readSinglePageHint =
|
||||
mpPagePopups.getReadPageContent(app, 'singlePagePaywallHint') ||
|
||||
String((mp.mpUi && mp.mpUi.readPage && mp.mpUi.readPage.singlePagePaywallHint) || '').trim()
|
||||
if (typeof this.setData === 'function') {
|
||||
this.setData({
|
||||
auditMode,
|
||||
|
||||
Reference in New Issue
Block a user