2026-01-21 15:49:12 +08:00
|
|
|
|
/**
|
2026-03-20 11:31:04 +08:00
|
|
|
|
* 卡若创业派对 - 首页
|
2026-01-21 15:49:12 +08:00
|
|
|
|
* 开发: 卡若
|
2026-02-24 14:35:58 +08:00
|
|
|
|
* 技术支持: 存客宝
|
2026-01-21 15:49:12 +08:00
|
|
|
|
*/
|
|
|
|
|
|
|
2026-01-14 12:50:00 +08:00
|
|
|
|
const app = getApp()
|
2026-03-17 18:22:06 +08:00
|
|
|
|
const { trackClick } = require('../../utils/trackClick')
|
2026-03-22 08:34:28 +08:00
|
|
|
|
const { cleanSingleLineField } = require('../../utils/contentParser')
|
2026-03-23 18:38:23 +08:00
|
|
|
|
const { navigateMpPath } = require('../../utils/mpNavigate.js')
|
2026-03-24 01:22:50 +08:00
|
|
|
|
const { isSafeImageSrc } = require('../../utils/imageUrl.js')
|
|
|
|
|
|
|
|
|
|
|
|
const DEFAULT_KARUO_LINK_AVATAR = '/assets/images/karuo-link-avatar.png'
|
|
|
|
|
|
const KARUO_USER_ID = 'ogpTW5Wbbo9DfSyB3-xCWN6EGc-g'
|
2026-03-22 08:34:28 +08:00
|
|
|
|
|
|
|
|
|
|
/** 与首页固定「卡若」获客位重复时从横滑列表剔除(含历史误写「卡路」) */
|
|
|
|
|
|
function isKaruoHostDuplicateName(displayName) {
|
|
|
|
|
|
const s = String(displayName || '').trim()
|
|
|
|
|
|
return s === '卡若' || s === '卡路'
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/** 超级个体无头像占位:仅展示中文首字,避免头像圆里出现英文字母 */
|
|
|
|
|
|
function superAvatarLetter(displayName) {
|
|
|
|
|
|
const s = String(displayName || '').trim()
|
|
|
|
|
|
if (!s) return '会'
|
|
|
|
|
|
const ch = s[0]
|
|
|
|
|
|
return /[\u4e00-\u9fff]/.test(ch) ? ch : '会'
|
|
|
|
|
|
}
|
2026-01-14 12:50:00 +08:00
|
|
|
|
|
|
|
|
|
|
Page({
|
|
|
|
|
|
data: {
|
2026-02-24 14:35:58 +08:00
|
|
|
|
// 系统信息
|
2026-01-21 15:49:12 +08:00
|
|
|
|
statusBarHeight: 44,
|
|
|
|
|
|
navBarHeight: 88,
|
2026-02-24 14:35:58 +08:00
|
|
|
|
|
|
|
|
|
|
// 用户信息
|
2026-01-21 15:49:12 +08:00
|
|
|
|
isLoggedIn: false,
|
|
|
|
|
|
hasFullBook: false,
|
2026-02-24 14:35:58 +08:00
|
|
|
|
readCount: 0,
|
|
|
|
|
|
|
|
|
|
|
|
// 书籍数据
|
2026-01-21 15:49:12 +08:00
|
|
|
|
totalSections: 62,
|
|
|
|
|
|
bookData: [],
|
2026-02-24 14:35:58 +08:00
|
|
|
|
|
|
|
|
|
|
// 推荐章节
|
|
|
|
|
|
featuredSections: [
|
|
|
|
|
|
{ id: '1.1', title: '荷包:电动车出租的被动收入模式', tag: '免费', tagClass: 'tag-free', part: '真实的人' },
|
|
|
|
|
|
{ id: '3.1', title: '3000万流水如何跑出来', tag: '热门', tagClass: 'tag-pink', part: '真实的行业' },
|
|
|
|
|
|
{ id: '8.1', title: '流量杠杆:抖音、Soul、飞书', tag: '推荐', tagClass: 'tag-purple', part: '真实的赚钱' }
|
|
|
|
|
|
],
|
|
|
|
|
|
|
2026-03-22 08:34:28 +08:00
|
|
|
|
// Banner 推荐(优先用 recommended API 第一条,回退 latest-chapters)
|
|
|
|
|
|
bannerSection: null,
|
2026-01-25 19:37:59 +08:00
|
|
|
|
latestLabel: '最新更新',
|
2026-02-24 14:35:58 +08:00
|
|
|
|
|
|
|
|
|
|
// 内容概览
|
|
|
|
|
|
partsList: [
|
|
|
|
|
|
{ id: 'part-1', number: '一', title: '真实的人', subtitle: '人与人之间的底层逻辑' },
|
|
|
|
|
|
{ id: 'part-2', number: '二', title: '真实的行业', subtitle: '电商、内容、传统行业解析' },
|
|
|
|
|
|
{ id: 'part-3', number: '三', title: '真实的错误', subtitle: '我和别人犯过的错' },
|
|
|
|
|
|
{ id: 'part-4', number: '四', title: '真实的赚钱', subtitle: '底层结构与真实案例' },
|
|
|
|
|
|
{ id: 'part-5', number: '五', title: '真实的社会', subtitle: '未来职业与商业生态' }
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
|
|
|
|
// 超级个体(VIP会员)
|
|
|
|
|
|
superMembers: [],
|
2026-02-27 14:22:58 +08:00
|
|
|
|
superMembersLoading: true,
|
2026-02-23 14:07:41 +08:00
|
|
|
|
|
2026-03-17 11:44:36 +08:00
|
|
|
|
// 最新新增章节(完整列表 + 展示列表,用于展开/折叠)
|
2026-02-24 14:35:58 +08:00
|
|
|
|
latestChapters: [],
|
2026-03-17 11:44:36 +08:00
|
|
|
|
displayLatestChapters: [],
|
2026-02-24 14:35:58 +08:00
|
|
|
|
|
2026-02-25 16:26:13 +08:00
|
|
|
|
// 篇章数(从 bookData 计算)
|
|
|
|
|
|
partCount: 0,
|
|
|
|
|
|
|
2026-02-24 14:35:58 +08:00
|
|
|
|
// 加载状态
|
2026-03-06 12:12:13 +08:00
|
|
|
|
loading: true,
|
|
|
|
|
|
|
|
|
|
|
|
// 链接卡若 - 留资弹窗
|
|
|
|
|
|
showLeadModal: false,
|
2026-03-17 11:44:36 +08:00
|
|
|
|
leadPhone: '',
|
2026-03-20 13:40:13 +08:00
|
|
|
|
showPrivacyModal: false,
|
2026-03-17 11:44:36 +08:00
|
|
|
|
|
|
|
|
|
|
// 展开状态(首页精选/最新)
|
|
|
|
|
|
featuredExpanded: false,
|
|
|
|
|
|
latestExpanded: false,
|
2026-03-22 08:34:28 +08:00
|
|
|
|
featuredSectionsFull: [], // 精选排行榜全量(最多 50),默认只展示前 3 条
|
2026-03-17 13:17:49 +08:00
|
|
|
|
|
|
|
|
|
|
// 功能配置(搜索开关)
|
2026-03-17 18:22:06 +08:00
|
|
|
|
searchEnabled: true,
|
|
|
|
|
|
|
|
|
|
|
|
// 审核模式:隐藏支付相关入口
|
2026-03-23 18:38:23 +08:00
|
|
|
|
auditMode: false,
|
|
|
|
|
|
|
|
|
|
|
|
// mp_config.mpUi.homePage(后台系统设置 mpUi)
|
|
|
|
|
|
mpUiLogoTitle: '卡若创业派对',
|
|
|
|
|
|
mpUiLogoSubtitle: '来自派对房的真实故事',
|
|
|
|
|
|
mpUiLinkKaruoText: '点击链接卡若',
|
2026-03-24 01:22:50 +08:00
|
|
|
|
/** 最终展示:后台 linkKaruoAvatar 或本包默认卡若照片 */
|
|
|
|
|
|
mpUiLinkKaruoDisplay: DEFAULT_KARUO_LINK_AVATAR,
|
2026-03-23 18:38:23 +08:00
|
|
|
|
mpUiSearchPlaceholder: '搜索章节标题或内容...',
|
|
|
|
|
|
mpUiBannerTag: '推荐',
|
|
|
|
|
|
mpUiBannerReadMore: '点击阅读',
|
|
|
|
|
|
mpUiSuperTitle: '超级个体',
|
|
|
|
|
|
mpUiPickTitle: '精选推荐',
|
|
|
|
|
|
mpUiLatestTitle: '最新新增'
|
2026-01-14 12:50:00 +08:00
|
|
|
|
},
|
|
|
|
|
|
|
2026-01-25 19:37:59 +08:00
|
|
|
|
onLoad(options) {
|
2026-02-24 14:35:58 +08:00
|
|
|
|
console.log('[Index] ===== onLoad 触发 =====')
|
|
|
|
|
|
|
|
|
|
|
|
// 获取系统信息
|
2026-01-21 15:49:12 +08:00
|
|
|
|
this.setData({
|
|
|
|
|
|
statusBarHeight: app.globalData.statusBarHeight,
|
|
|
|
|
|
navBarHeight: app.globalData.navBarHeight
|
2026-01-14 12:50:00 +08:00
|
|
|
|
})
|
2026-02-24 14:35:58 +08:00
|
|
|
|
|
|
|
|
|
|
// 处理分享参数(推荐码绑定)
|
2026-01-25 19:37:59 +08:00
|
|
|
|
if (options && options.ref) {
|
2026-02-24 14:35:58 +08:00
|
|
|
|
console.log('[Index] 检测到推荐码:', options.ref)
|
2026-01-25 19:37:59 +08:00
|
|
|
|
app.handleReferralCode({ query: options })
|
|
|
|
|
|
}
|
2026-02-24 14:35:58 +08:00
|
|
|
|
|
2026-02-27 14:22:58 +08:00
|
|
|
|
wx.showShareMenu({ withShareTimeline: true })
|
2026-03-17 13:17:49 +08:00
|
|
|
|
this.loadFeatureConfig()
|
2026-01-21 15:49:12 +08:00
|
|
|
|
this.initData()
|
2026-01-14 12:50:00 +08:00
|
|
|
|
},
|
|
|
|
|
|
|
2026-01-21 15:49:12 +08:00
|
|
|
|
onShow() {
|
2026-02-24 14:35:58 +08:00
|
|
|
|
console.log('[Index] onShow 触发')
|
2026-03-17 18:22:06 +08:00
|
|
|
|
this.setData({ auditMode: app.globalData.auditMode || false })
|
2026-03-23 18:38:23 +08:00
|
|
|
|
this._applyHomeMpUi()
|
2026-02-24 14:35:58 +08:00
|
|
|
|
|
|
|
|
|
|
// 设置TabBar选中状态
|
2026-01-21 15:49:12 +08:00
|
|
|
|
if (typeof this.getTabBar === 'function' && this.getTabBar()) {
|
2026-02-24 14:35:58 +08:00
|
|
|
|
const tabBar = this.getTabBar()
|
|
|
|
|
|
console.log('[Index] TabBar 组件:', tabBar ? '已找到' : '未找到')
|
|
|
|
|
|
|
|
|
|
|
|
// 主动触发配置加载
|
|
|
|
|
|
if (tabBar && tabBar.loadFeatureConfig) {
|
|
|
|
|
|
console.log('[Index] 主动调用 TabBar.loadFeatureConfig()')
|
|
|
|
|
|
tabBar.loadFeatureConfig()
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 更新选中状态
|
|
|
|
|
|
if (tabBar && tabBar.updateSelected) {
|
|
|
|
|
|
tabBar.updateSelected()
|
|
|
|
|
|
} else if (tabBar) {
|
|
|
|
|
|
tabBar.setData({ selected: 0 })
|
|
|
|
|
|
}
|
|
|
|
|
|
} else {
|
|
|
|
|
|
console.log('[Index] TabBar 组件未找到或 getTabBar 方法不存在')
|
2026-01-14 12:50:00 +08:00
|
|
|
|
}
|
2026-02-24 14:35:58 +08:00
|
|
|
|
|
|
|
|
|
|
// 更新用户状态
|
2026-01-21 15:49:12 +08:00
|
|
|
|
this.updateUserStatus()
|
2026-01-14 12:50:00 +08:00
|
|
|
|
},
|
|
|
|
|
|
|
2026-03-04 19:06:06 +08:00
|
|
|
|
// 初始化数据:首次进页面并行异步加载,加快首屏展示
|
|
|
|
|
|
initData() {
|
|
|
|
|
|
this.setData({ loading: false })
|
|
|
|
|
|
this.loadBookData()
|
2026-03-18 16:00:57 +08:00
|
|
|
|
this.loadFeaturedAndLatest()
|
2026-03-04 19:06:06 +08:00
|
|
|
|
this.loadSuperMembers()
|
2026-01-14 12:50:00 +08:00
|
|
|
|
},
|
|
|
|
|
|
|
2026-02-24 14:35:58 +08:00
|
|
|
|
async loadSuperMembers() {
|
2026-02-27 14:22:58 +08:00
|
|
|
|
this.setData({ superMembersLoading: true })
|
2026-02-23 14:07:41 +08:00
|
|
|
|
try {
|
2026-03-22 08:34:28 +08:00
|
|
|
|
// 仅走后端 VIP 列表排序(vip_sort、vip_activated_at),不在端上拼普通用户
|
|
|
|
|
|
const vipRes = await app.request({ url: '/api/miniprogram/vip/members?limit=24', silent: true }).catch(() => null)
|
2026-02-24 14:35:58 +08:00
|
|
|
|
let members = []
|
2026-03-18 16:00:57 +08:00
|
|
|
|
if (vipRes && vipRes.success && Array.isArray(vipRes.data) && vipRes.data.length > 0) {
|
2026-03-22 08:34:28 +08:00
|
|
|
|
members = vipRes.data.map(u => {
|
|
|
|
|
|
const raw = u.name || u.nickname || u.vipName || u.vip_name || '会员'
|
|
|
|
|
|
const name = cleanSingleLineField(raw) || '会员'
|
|
|
|
|
|
return {
|
|
|
|
|
|
id: u.id,
|
|
|
|
|
|
name,
|
|
|
|
|
|
avatar: u.avatar || '',
|
|
|
|
|
|
isVip: true,
|
|
|
|
|
|
avatarLetter: superAvatarLetter(name)
|
|
|
|
|
|
}
|
|
|
|
|
|
}).filter((m) => !isKaruoHostDuplicateName(m.name))
|
|
|
|
|
|
console.log('[Index] 超级个体(后端排序):', members.length, '人')
|
2026-02-23 14:07:41 +08:00
|
|
|
|
}
|
2026-02-27 14:22:58 +08:00
|
|
|
|
this.setData({ superMembers: members, superMembersLoading: false })
|
|
|
|
|
|
} catch (e) {
|
|
|
|
|
|
console.log('[Index] 加载超级个体失败:', e)
|
|
|
|
|
|
this.setData({ superMembersLoading: false })
|
|
|
|
|
|
}
|
2026-02-23 14:07:41 +08:00
|
|
|
|
},
|
|
|
|
|
|
|
2026-03-22 08:34:28 +08:00
|
|
|
|
// 精选推荐 + 最新更新 + 最新列表:顺序以后端为准(recommended=排行榜算法,latest=updated_at)
|
2026-03-18 16:00:57 +08:00
|
|
|
|
async loadFeaturedAndLatest() {
|
2026-02-23 14:07:41 +08:00
|
|
|
|
try {
|
2026-03-22 08:34:28 +08:00
|
|
|
|
const tagClassForTag = (tag) => (tag === '热门' ? 'tag-hot' : 'tag-rec')
|
|
|
|
|
|
const toSectionFromRanking = (s) => {
|
|
|
|
|
|
const tag = s.tag || '精选'
|
|
|
|
|
|
return {
|
|
|
|
|
|
id: s.id || s.section_id,
|
|
|
|
|
|
mid: s.mid ?? s.MID ?? 0,
|
|
|
|
|
|
title: s.section_title || s.sectionTitle || s.title || s.chapterTitle || '',
|
|
|
|
|
|
part: (s.part_title || s.partTitle || '').replace(/[_||]/g, ' ').trim(),
|
|
|
|
|
|
tag,
|
|
|
|
|
|
tagClass: tagClassForTag(tag)
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
const fallbackTags = ['热门', '推荐', '精选']
|
|
|
|
|
|
const toSectionFromHot = (s, i) => {
|
|
|
|
|
|
const tag = fallbackTags[i % 3]
|
|
|
|
|
|
return {
|
|
|
|
|
|
id: s.id || s.section_id,
|
|
|
|
|
|
mid: s.mid ?? s.MID ?? 0,
|
|
|
|
|
|
title: s.section_title || s.sectionTitle || s.title || s.chapterTitle || '',
|
|
|
|
|
|
part: (s.part_title || s.partTitle || '').replace(/[_||]/g, ' ').trim(),
|
|
|
|
|
|
tag,
|
|
|
|
|
|
tagClass: tagClassForTag(tag)
|
|
|
|
|
|
}
|
2026-03-18 16:00:57 +08:00
|
|
|
|
}
|
2026-02-28 15:16:23 +08:00
|
|
|
|
|
2026-03-18 16:00:57 +08:00
|
|
|
|
const [recRes, latestRes] = await Promise.all([
|
2026-03-22 08:34:28 +08:00
|
|
|
|
app.request({ url: '/api/miniprogram/book/recommended?limit=50', silent: true }).catch(() => null),
|
2026-03-18 16:00:57 +08:00
|
|
|
|
app.request({ url: '/api/miniprogram/book/latest-chapters', silent: true }).catch(() => null)
|
|
|
|
|
|
])
|
|
|
|
|
|
|
2026-03-22 08:34:28 +08:00
|
|
|
|
// 1. 精选推荐:一次拉全量(≤50),默认只显示 3 条;点列表下三角展开(与「最新新增」一致)
|
|
|
|
|
|
let featuredFull = []
|
2026-03-18 16:00:57 +08:00
|
|
|
|
if (recRes && recRes.success && Array.isArray(recRes.data) && recRes.data.length > 0) {
|
2026-03-22 08:34:28 +08:00
|
|
|
|
featuredFull = recRes.data.map((s) => toSectionFromRanking(s))
|
2026-03-18 16:00:57 +08:00
|
|
|
|
}
|
2026-03-22 08:34:28 +08:00
|
|
|
|
if (featuredFull.length === 0) {
|
2026-03-17 11:44:36 +08:00
|
|
|
|
try {
|
2026-03-22 08:34:28 +08:00
|
|
|
|
const hotRes = await app.request({ url: '/api/miniprogram/book/hot?limit=50', silent: true })
|
2026-03-17 11:44:36 +08:00
|
|
|
|
const hotList = (hotRes && hotRes.data) ? hotRes.data : []
|
2026-03-22 08:34:28 +08:00
|
|
|
|
if (hotList.length > 0) featuredFull = hotList.map((s, i) => toSectionFromHot(s, i))
|
2026-03-17 11:44:36 +08:00
|
|
|
|
} catch (e) { console.log('[Index] book/hot 兜底失败:', e) }
|
|
|
|
|
|
}
|
2026-03-22 08:34:28 +08:00
|
|
|
|
if (featuredFull.length > 0) {
|
|
|
|
|
|
this.setData({
|
|
|
|
|
|
featuredSectionsFull: featuredFull,
|
|
|
|
|
|
featuredSections: featuredFull.slice(0, 3),
|
|
|
|
|
|
featuredExpanded: false
|
|
|
|
|
|
})
|
|
|
|
|
|
} else {
|
|
|
|
|
|
this.setData({
|
|
|
|
|
|
featuredSectionsFull: [],
|
|
|
|
|
|
featuredSections: [],
|
|
|
|
|
|
featuredExpanded: false
|
|
|
|
|
|
})
|
|
|
|
|
|
}
|
2026-02-23 14:07:41 +08:00
|
|
|
|
|
2026-03-22 08:34:28 +08:00
|
|
|
|
// 2. Banner 推荐:优先取 recommended 第一条,回退 latest 第一条
|
2026-03-18 16:00:57 +08:00
|
|
|
|
const rawList = (latestRes && latestRes.data) ? latestRes.data : []
|
2026-03-22 08:34:28 +08:00
|
|
|
|
// 按更新时间倒序,最新在前(与后台展示一致)
|
|
|
|
|
|
const latestList = [...rawList].sort((a, b) => {
|
|
|
|
|
|
const ta = new Date(a.updatedAt || a.updated_at || 0).getTime()
|
|
|
|
|
|
const tb = new Date(b.updatedAt || b.updated_at || 0).getTime()
|
|
|
|
|
|
return tb - ta
|
|
|
|
|
|
})
|
|
|
|
|
|
if (featuredFull.length > 0) {
|
|
|
|
|
|
this.setData({ bannerSection: featuredFull[0] })
|
|
|
|
|
|
} else if (latestList.length > 0) {
|
2026-03-18 16:00:57 +08:00
|
|
|
|
const l = latestList[0]
|
|
|
|
|
|
this.setData({
|
2026-03-22 08:34:28 +08:00
|
|
|
|
bannerSection: {
|
2026-03-18 16:00:57 +08:00
|
|
|
|
id: l.id,
|
|
|
|
|
|
mid: l.mid ?? l.MID ?? 0,
|
|
|
|
|
|
title: l.section_title || l.sectionTitle || l.title || l.chapterTitle || '',
|
|
|
|
|
|
part: l.part_title || l.partTitle || ''
|
|
|
|
|
|
}
|
2026-02-24 14:35:58 +08:00
|
|
|
|
})
|
2026-01-25 19:37:59 +08:00
|
|
|
|
}
|
2026-03-18 16:00:57 +08:00
|
|
|
|
const latestChapters = latestList.slice(0, 20).map(c => {
|
|
|
|
|
|
const d = new Date(c.updatedAt || c.updated_at || Date.now())
|
|
|
|
|
|
const title = c.section_title || c.sectionTitle || c.title || c.chapterTitle || ''
|
|
|
|
|
|
return {
|
|
|
|
|
|
id: c.id,
|
|
|
|
|
|
mid: c.mid ?? c.MID ?? 0,
|
|
|
|
|
|
title,
|
|
|
|
|
|
desc: '',
|
|
|
|
|
|
price: c.price ?? 1,
|
|
|
|
|
|
dateStr: `${d.getMonth() + 1}/${d.getDate()}`
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
const display = this.data.latestExpanded ? latestChapters : latestChapters.slice(0, 5)
|
|
|
|
|
|
this.setData({ latestChapters, displayLatestChapters: display })
|
2026-02-21 20:44:38 +08:00
|
|
|
|
} catch (e) {
|
2026-02-28 15:16:23 +08:00
|
|
|
|
console.log('[Index] 从服务端加载推荐失败:', e)
|
2026-02-21 20:44:38 +08:00
|
|
|
|
}
|
2026-01-25 19:37:59 +08:00
|
|
|
|
},
|
|
|
|
|
|
|
2026-01-21 15:49:12 +08:00
|
|
|
|
async loadBookData() {
|
|
|
|
|
|
try {
|
2026-03-18 16:00:57 +08:00
|
|
|
|
const res = await app.request({ url: '/api/miniprogram/book/parts', silent: true })
|
|
|
|
|
|
if (res?.success) {
|
|
|
|
|
|
const total = res.totalSections ?? 0
|
|
|
|
|
|
const parts = res.parts || []
|
|
|
|
|
|
app.globalData.totalSections = total || 62
|
2026-02-23 14:07:41 +08:00
|
|
|
|
this.setData({
|
2026-03-18 16:00:57 +08:00
|
|
|
|
totalSections: app.globalData.totalSections,
|
|
|
|
|
|
partCount: parts.length || 5
|
2026-02-23 14:07:41 +08:00
|
|
|
|
})
|
2026-01-21 15:49:12 +08:00
|
|
|
|
}
|
2026-02-24 14:35:58 +08:00
|
|
|
|
} catch (e) {
|
2026-03-18 16:00:57 +08:00
|
|
|
|
this.setData({ totalSections: app.globalData.totalSections || 62, partCount: 5 })
|
2026-02-24 14:35:58 +08:00
|
|
|
|
}
|
2026-01-14 12:50:00 +08:00
|
|
|
|
},
|
|
|
|
|
|
|
2026-02-24 14:35:58 +08:00
|
|
|
|
// 更新用户状态(已读数 = 用户实际打开过的章节数,仅统计有权限阅读的)
|
2026-01-21 15:49:12 +08:00
|
|
|
|
updateUserStatus() {
|
|
|
|
|
|
const { isLoggedIn, hasFullBook, purchasedSections } = app.globalData
|
2026-02-24 14:35:58 +08:00
|
|
|
|
const readCount = Math.min(app.getReadCount(), this.data.totalSections || 62)
|
2026-01-21 15:49:12 +08:00
|
|
|
|
this.setData({
|
2026-02-24 14:35:58 +08:00
|
|
|
|
isLoggedIn,
|
|
|
|
|
|
hasFullBook,
|
|
|
|
|
|
readCount
|
2026-01-14 12:50:00 +08:00
|
|
|
|
})
|
|
|
|
|
|
},
|
|
|
|
|
|
|
2026-02-24 14:35:58 +08:00
|
|
|
|
// 跳转到目录
|
|
|
|
|
|
goToChapters() {
|
2026-03-17 18:22:06 +08:00
|
|
|
|
trackClick('home', 'nav_click', '阅读进度')
|
2026-02-24 14:35:58 +08:00
|
|
|
|
wx.switchTab({ url: '/pages/chapters/chapters' })
|
|
|
|
|
|
},
|
|
|
|
|
|
|
2026-03-23 18:38:23 +08:00
|
|
|
|
_applyHomeMpUi() {
|
|
|
|
|
|
const h = app.globalData.configCache?.mpConfig?.mpUi?.homePage || {}
|
2026-03-24 01:22:50 +08:00
|
|
|
|
let linkKaruoAvatar = String(h.linkKaruoAvatar || h.linkKaruoImage || '').trim()
|
|
|
|
|
|
if (linkKaruoAvatar && !isSafeImageSrc(linkKaruoAvatar)) linkKaruoAvatar = ''
|
2026-03-23 18:38:23 +08:00
|
|
|
|
this.setData({
|
|
|
|
|
|
mpUiLogoTitle: String(h.logoTitle || '卡若创业派对').trim() || '卡若创业派对',
|
|
|
|
|
|
mpUiLogoSubtitle: String(h.logoSubtitle || '来自派对房的真实故事').trim() || '来自派对房的真实故事',
|
|
|
|
|
|
mpUiLinkKaruoText: String(h.linkKaruoText || '点击链接卡若').trim() || '点击链接卡若',
|
2026-03-24 01:22:50 +08:00
|
|
|
|
mpUiLinkKaruoDisplay: linkKaruoAvatar || DEFAULT_KARUO_LINK_AVATAR,
|
2026-03-23 18:38:23 +08:00
|
|
|
|
mpUiSearchPlaceholder: String(h.searchPlaceholder || '搜索章节标题或内容...').trim() || '搜索章节标题或内容...',
|
|
|
|
|
|
mpUiBannerTag: String(h.bannerTag || '推荐').trim() || '推荐',
|
|
|
|
|
|
mpUiBannerReadMore: String(h.bannerReadMoreText || '点击阅读').trim() || '点击阅读',
|
|
|
|
|
|
mpUiSuperTitle: String(h.superSectionTitle || '超级个体').trim() || '超级个体',
|
|
|
|
|
|
mpUiPickTitle: String(h.pickSectionTitle || '精选推荐').trim() || '精选推荐',
|
|
|
|
|
|
mpUiLatestTitle: String(h.latestSectionTitle || '最新新增').trim() || '最新新增'
|
|
|
|
|
|
})
|
2026-03-24 01:22:50 +08:00
|
|
|
|
if (!linkKaruoAvatar) this._loadKaruoAvatarLazy()
|
2026-03-23 18:38:23 +08:00
|
|
|
|
},
|
|
|
|
|
|
|
2026-03-24 01:22:50 +08:00
|
|
|
|
_loadKaruoAvatarLazy() {
|
|
|
|
|
|
app.request({ url: `/api/miniprogram/user/profile?userId=${KARUO_USER_ID}`, silent: true, timeout: 3000 })
|
|
|
|
|
|
.then(res => {
|
|
|
|
|
|
if (res?.success && res.data?.avatar && isSafeImageSrc(res.data.avatar)) {
|
|
|
|
|
|
this.setData({ mpUiLinkKaruoDisplay: res.data.avatar })
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
.catch(() => {})
|
2026-03-23 18:38:23 +08:00
|
|
|
|
},
|
|
|
|
|
|
|
2026-03-17 13:17:49 +08:00
|
|
|
|
async loadFeatureConfig() {
|
|
|
|
|
|
try {
|
2026-03-17 18:22:06 +08:00
|
|
|
|
const hasCachedFeatures = app.globalData.features && typeof app.globalData.features.searchEnabled === 'boolean'
|
2026-03-24 01:22:50 +08:00
|
|
|
|
if (!hasCachedFeatures) {
|
|
|
|
|
|
const res = await app.getConfig()
|
|
|
|
|
|
const features = (res && res.features) || (res && res.data && res.data.features) || {}
|
|
|
|
|
|
const searchEnabled = features.searchEnabled !== false
|
|
|
|
|
|
if (!app.globalData.features) app.globalData.features = {}
|
|
|
|
|
|
app.globalData.features.searchEnabled = searchEnabled
|
|
|
|
|
|
if (typeof features.matchEnabled === 'boolean') app.globalData.features.matchEnabled = features.matchEnabled
|
|
|
|
|
|
if (typeof features.referralEnabled === 'boolean') app.globalData.features.referralEnabled = features.referralEnabled
|
|
|
|
|
|
const mp = (res && res.mpConfig) || {}
|
|
|
|
|
|
app.globalData.auditMode = !!mp.auditMode
|
2026-03-17 13:17:49 +08:00
|
|
|
|
}
|
2026-03-24 01:22:50 +08:00
|
|
|
|
await app.getAuditMode()
|
|
|
|
|
|
const searchEnabled = app.globalData.features?.searchEnabled !== false
|
|
|
|
|
|
this.setData({
|
|
|
|
|
|
searchEnabled,
|
|
|
|
|
|
auditMode: app.globalData.auditMode || false
|
|
|
|
|
|
})
|
2026-03-23 18:38:23 +08:00
|
|
|
|
this._applyHomeMpUi()
|
2026-03-17 13:17:49 +08:00
|
|
|
|
} catch (e) {
|
2026-03-24 01:22:50 +08:00
|
|
|
|
try {
|
|
|
|
|
|
await app.getAuditMode()
|
|
|
|
|
|
} catch (_) {}
|
|
|
|
|
|
this.setData({
|
|
|
|
|
|
searchEnabled: app.globalData.features?.searchEnabled !== false,
|
|
|
|
|
|
auditMode: app.globalData.auditMode || false
|
|
|
|
|
|
})
|
2026-03-23 18:38:23 +08:00
|
|
|
|
this._applyHomeMpUi()
|
2026-03-17 13:17:49 +08:00
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
|
2026-02-24 14:35:58 +08:00
|
|
|
|
// 跳转到搜索页
|
|
|
|
|
|
goToSearch() {
|
2026-03-17 13:17:49 +08:00
|
|
|
|
if (!this.data.searchEnabled) return
|
2026-03-17 18:22:06 +08:00
|
|
|
|
trackClick('home', 'nav_click', '搜索')
|
2026-02-24 14:35:58 +08:00
|
|
|
|
wx.navigateTo({ url: '/pages/search/search' })
|
|
|
|
|
|
},
|
|
|
|
|
|
|
2026-03-18 16:00:57 +08:00
|
|
|
|
// 跳转到阅读页(传 mid,与分享一致;无 mid 时传 id)
|
2026-01-21 15:49:12 +08:00
|
|
|
|
goToRead(e) {
|
|
|
|
|
|
const id = e.currentTarget.dataset.id
|
2026-03-18 16:00:57 +08:00
|
|
|
|
const mid = e.currentTarget.dataset.mid
|
2026-03-17 18:22:06 +08:00
|
|
|
|
trackClick('home', 'card_click', id || '章节')
|
2026-02-28 10:19:46 +08:00
|
|
|
|
const q = mid ? `mid=${mid}` : `id=${id}`
|
|
|
|
|
|
wx.navigateTo({ url: `/pages/read/read?${q}` })
|
2026-01-14 12:50:00 +08:00
|
|
|
|
},
|
|
|
|
|
|
|
2026-02-24 14:35:58 +08:00
|
|
|
|
// 跳转到匹配页
|
|
|
|
|
|
goToMatch() {
|
|
|
|
|
|
wx.switchTab({ url: '/pages/match/match' })
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
goToVip() {
|
2026-03-17 18:22:06 +08:00
|
|
|
|
trackClick('home', 'btn_click', '加入创业派对')
|
2026-02-24 14:35:58 +08:00
|
|
|
|
wx.navigateTo({ url: '/pages/vip/vip' })
|
|
|
|
|
|
},
|
|
|
|
|
|
|
2026-03-06 12:12:13 +08:00
|
|
|
|
async onLinkKaruo() {
|
2026-03-17 18:22:06 +08:00
|
|
|
|
trackClick('home', 'btn_click', '链接卡若')
|
2026-03-06 12:12:13 +08:00
|
|
|
|
const app = getApp()
|
|
|
|
|
|
if (!app.globalData.isLoggedIn || !app.globalData.userInfo) {
|
|
|
|
|
|
wx.showModal({
|
|
|
|
|
|
title: '提示',
|
|
|
|
|
|
content: '请先登录后再链接卡若',
|
|
|
|
|
|
confirmText: '去登录',
|
|
|
|
|
|
cancelText: '取消',
|
|
|
|
|
|
success: (res) => {
|
|
|
|
|
|
if (res.confirm) wx.switchTab({ url: '/pages/my/my' })
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
return
|
|
|
|
|
|
}
|
|
|
|
|
|
const userId = app.globalData.userInfo.id
|
|
|
|
|
|
let phone = (app.globalData.userInfo.phone || '').trim()
|
|
|
|
|
|
let wechatId = (app.globalData.userInfo.wechatId || app.globalData.userInfo.wechat_id || '').trim()
|
|
|
|
|
|
if (!phone && !wechatId) {
|
|
|
|
|
|
try {
|
|
|
|
|
|
const profileRes = await app.request({ url: `/api/miniprogram/user/profile?userId=${userId}`, silent: true })
|
|
|
|
|
|
if (profileRes?.success && profileRes.data) {
|
|
|
|
|
|
phone = (profileRes.data.phone || '').trim()
|
|
|
|
|
|
wechatId = (profileRes.data.wechatId || profileRes.data.wechat_id || '').trim()
|
|
|
|
|
|
}
|
|
|
|
|
|
} catch (e) {}
|
|
|
|
|
|
}
|
|
|
|
|
|
if (phone || wechatId) {
|
|
|
|
|
|
wx.showLoading({ title: '提交中...', mask: true })
|
|
|
|
|
|
try {
|
|
|
|
|
|
const res = await app.request({
|
2026-03-12 11:36:50 +08:00
|
|
|
|
url: '/api/miniprogram/ckb/index-lead',
|
2026-03-06 12:12:13 +08:00
|
|
|
|
method: 'POST',
|
|
|
|
|
|
data: {
|
|
|
|
|
|
userId,
|
|
|
|
|
|
phone: phone || undefined,
|
|
|
|
|
|
wechatId: wechatId || undefined,
|
|
|
|
|
|
name: (app.globalData.userInfo.nickname || '').trim() || undefined
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
wx.hideLoading()
|
|
|
|
|
|
if (res && res.success) {
|
2026-03-07 21:30:40 +08:00
|
|
|
|
wx.setStorageSync('lead_last_submit_ts', Date.now())
|
2026-03-06 12:12:13 +08:00
|
|
|
|
wx.showToast({ title: res.message || '提交成功', icon: 'success' })
|
|
|
|
|
|
} else {
|
|
|
|
|
|
wx.showToast({ title: (res && res.message) || '提交失败', icon: 'none' })
|
|
|
|
|
|
}
|
|
|
|
|
|
} catch (e) {
|
|
|
|
|
|
wx.hideLoading()
|
|
|
|
|
|
wx.showToast({ title: e.message || '提交失败', icon: 'none' })
|
|
|
|
|
|
}
|
|
|
|
|
|
return
|
|
|
|
|
|
}
|
|
|
|
|
|
this.setData({ showLeadModal: true, leadPhone: '' })
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
closeLeadModal() {
|
2026-03-20 13:40:13 +08:00
|
|
|
|
this.setData({ showLeadModal: false, leadPhone: '', showPrivacyModal: false })
|
2026-03-06 12:12:13 +08:00
|
|
|
|
},
|
|
|
|
|
|
|
2026-03-10 20:20:03 +08:00
|
|
|
|
// 阻止弹窗内部点击事件冒泡到遮罩层
|
|
|
|
|
|
stopPropagation() {},
|
|
|
|
|
|
|
2026-03-24 01:22:50 +08:00
|
|
|
|
preventMove() {},
|
|
|
|
|
|
|
|
|
|
|
|
onLeadPrivacyAuthorize() {
|
|
|
|
|
|
this.onAgreePrivacyForLead()
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
onDisagreePrivacyForLead() {
|
|
|
|
|
|
if (app._privacyResolve) {
|
|
|
|
|
|
try {
|
|
|
|
|
|
app._privacyResolve({ event: 'disagree' })
|
|
|
|
|
|
} catch (_) {}
|
|
|
|
|
|
app._privacyResolve = null
|
|
|
|
|
|
}
|
|
|
|
|
|
this.setData({ showPrivacyModal: false })
|
|
|
|
|
|
},
|
|
|
|
|
|
|
2026-03-06 12:12:13 +08:00
|
|
|
|
onLeadPhoneInput(e) {
|
|
|
|
|
|
this.setData({ leadPhone: (e.detail.value || '').trim() })
|
|
|
|
|
|
},
|
|
|
|
|
|
|
2026-03-20 13:40:13 +08:00
|
|
|
|
// 微信隐私协议同意(getPhoneNumber 需先同意)
|
|
|
|
|
|
onAgreePrivacyForLead() {
|
|
|
|
|
|
if (app._privacyResolve) {
|
|
|
|
|
|
app._privacyResolve({ buttonId: 'agree-privacy-btn', event: 'agree' })
|
|
|
|
|
|
app._privacyResolve = null
|
|
|
|
|
|
}
|
|
|
|
|
|
this.setData({ showPrivacyModal: false })
|
|
|
|
|
|
},
|
|
|
|
|
|
|
2026-03-11 14:49:45 +08:00
|
|
|
|
// 一键获取手机号(微信能力),成功后直接提交链接卡若
|
|
|
|
|
|
async onGetPhoneNumberForLead(e) {
|
|
|
|
|
|
if (e.detail.errMsg !== 'getPhoneNumber:ok') {
|
|
|
|
|
|
wx.showToast({ title: '未获取到手机号,请手动输入', icon: 'none' })
|
2026-03-06 12:12:13 +08:00
|
|
|
|
return
|
|
|
|
|
|
}
|
2026-03-11 14:49:45 +08:00
|
|
|
|
const code = e.detail.code
|
|
|
|
|
|
if (!code) {
|
|
|
|
|
|
wx.showToast({ title: '获取失败,请手动输入', icon: 'none' })
|
|
|
|
|
|
return
|
|
|
|
|
|
}
|
|
|
|
|
|
const app = getApp()
|
|
|
|
|
|
const userId = app.globalData.userInfo?.id
|
|
|
|
|
|
wx.showLoading({ title: '获取中...', mask: true })
|
|
|
|
|
|
try {
|
|
|
|
|
|
const res = await app.request({
|
|
|
|
|
|
url: '/api/miniprogram/phone',
|
|
|
|
|
|
method: 'POST',
|
|
|
|
|
|
data: { code, userId }
|
|
|
|
|
|
})
|
|
|
|
|
|
wx.hideLoading()
|
|
|
|
|
|
if (res && res.success && res.phoneNumber) {
|
|
|
|
|
|
await this._submitLeadWithPhone(res.phoneNumber)
|
|
|
|
|
|
} else {
|
|
|
|
|
|
wx.showToast({ title: '获取失败,请手动输入', icon: 'none' })
|
|
|
|
|
|
}
|
|
|
|
|
|
} catch (err) {
|
|
|
|
|
|
wx.hideLoading()
|
|
|
|
|
|
wx.showToast({ title: err.message || '获取失败,请手动输入', icon: 'none' })
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
// 内部:用手机号提交链接卡若(一键获取与手动输入共用)
|
|
|
|
|
|
async _submitLeadWithPhone(phone) {
|
|
|
|
|
|
const p = (phone || '').trim().replace(/\s/g, '')
|
|
|
|
|
|
if (!p || p.length < 11) {
|
2026-03-06 12:12:13 +08:00
|
|
|
|
wx.showToast({ title: '请输入正确的手机号', icon: 'none' })
|
|
|
|
|
|
return
|
|
|
|
|
|
}
|
|
|
|
|
|
const app = getApp()
|
|
|
|
|
|
const userId = app.globalData.userInfo?.id
|
|
|
|
|
|
wx.showLoading({ title: '提交中...', mask: true })
|
|
|
|
|
|
try {
|
|
|
|
|
|
const res = await app.request({
|
2026-03-12 11:36:50 +08:00
|
|
|
|
url: '/api/miniprogram/ckb/index-lead',
|
2026-03-06 12:12:13 +08:00
|
|
|
|
method: 'POST',
|
|
|
|
|
|
data: {
|
|
|
|
|
|
userId,
|
2026-03-11 14:49:45 +08:00
|
|
|
|
phone: p,
|
2026-03-12 11:36:50 +08:00
|
|
|
|
name: (app.globalData.userInfo?.nickname || '').trim() || undefined,
|
|
|
|
|
|
},
|
2026-03-06 12:12:13 +08:00
|
|
|
|
})
|
|
|
|
|
|
wx.hideLoading()
|
|
|
|
|
|
this.setData({ showLeadModal: false, leadPhone: '' })
|
|
|
|
|
|
if (res && res.success) {
|
2026-03-07 21:30:40 +08:00
|
|
|
|
wx.setStorageSync('lead_last_submit_ts', Date.now())
|
2026-03-12 11:36:50 +08:00
|
|
|
|
// 同步手机号到用户资料
|
2026-03-10 20:20:03 +08:00
|
|
|
|
try {
|
2026-03-12 11:36:50 +08:00
|
|
|
|
if (userId) {
|
2026-03-10 20:20:03 +08:00
|
|
|
|
await app.request({
|
|
|
|
|
|
url: '/api/miniprogram/user/profile',
|
|
|
|
|
|
method: 'POST',
|
2026-03-12 11:36:50 +08:00
|
|
|
|
data: { userId, phone: p },
|
2026-03-10 20:20:03 +08:00
|
|
|
|
})
|
|
|
|
|
|
if (app.globalData.userInfo) {
|
2026-03-11 14:49:45 +08:00
|
|
|
|
app.globalData.userInfo.phone = p
|
2026-03-10 20:20:03 +08:00
|
|
|
|
wx.setStorageSync('userInfo', app.globalData.userInfo)
|
|
|
|
|
|
}
|
2026-03-11 14:49:45 +08:00
|
|
|
|
wx.setStorageSync('user_phone', p)
|
2026-03-10 20:20:03 +08:00
|
|
|
|
}
|
|
|
|
|
|
} catch (e) {
|
|
|
|
|
|
console.log('[Index] 同步手机号到用户资料失败:', e && e.message)
|
|
|
|
|
|
}
|
2026-03-06 12:12:13 +08:00
|
|
|
|
wx.showToast({ title: res.message || '提交成功,卡若会尽快联系您', icon: 'success' })
|
|
|
|
|
|
} else {
|
|
|
|
|
|
wx.showToast({ title: (res && res.message) || '提交失败', icon: 'none' })
|
|
|
|
|
|
}
|
|
|
|
|
|
} catch (e) {
|
|
|
|
|
|
wx.hideLoading()
|
|
|
|
|
|
wx.showToast({ title: e.message || '提交失败', icon: 'none' })
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
|
2026-03-11 14:49:45 +08:00
|
|
|
|
async submitLead() {
|
|
|
|
|
|
const phone = (this.data.leadPhone || '').trim().replace(/\s/g, '')
|
|
|
|
|
|
if (!phone) {
|
|
|
|
|
|
wx.showToast({ title: '请输入手机号', icon: 'none' })
|
|
|
|
|
|
return
|
|
|
|
|
|
}
|
|
|
|
|
|
await this._submitLeadWithPhone(phone)
|
|
|
|
|
|
},
|
|
|
|
|
|
|
2026-02-24 14:35:58 +08:00
|
|
|
|
goToSuperList() {
|
|
|
|
|
|
wx.switchTab({ url: '/pages/match/match' })
|
|
|
|
|
|
},
|
|
|
|
|
|
|
2026-03-22 08:34:28 +08:00
|
|
|
|
// 精选推荐:列表下方小三角展开(数据已在 loadFeaturedAndLatest 一次拉齐)
|
|
|
|
|
|
expandFeaturedChapters() {
|
|
|
|
|
|
if (this.data.featuredExpanded) return
|
|
|
|
|
|
const full = this.data.featuredSectionsFull || []
|
|
|
|
|
|
if (full.length <= 3) return
|
|
|
|
|
|
trackClick('home', 'tab_click', '精选展开_底部三角')
|
|
|
|
|
|
this.setData({ featuredExpanded: true, featuredSections: full })
|
2026-03-17 11:44:36 +08:00
|
|
|
|
},
|
|
|
|
|
|
|
2026-03-22 08:34:28 +08:00
|
|
|
|
// 最新新增:列表下方小三角展开(无「收起」,展开后整页向下滚动查看)
|
|
|
|
|
|
expandLatestChapters() {
|
|
|
|
|
|
if (this.data.latestExpanded) return
|
|
|
|
|
|
trackClick('home', 'tab_click', '最新展开_底部三角')
|
|
|
|
|
|
const full = this.data.latestChapters || []
|
|
|
|
|
|
this.setData({
|
|
|
|
|
|
latestExpanded: true,
|
|
|
|
|
|
displayLatestChapters: full
|
|
|
|
|
|
})
|
2026-03-17 11:44:36 +08:00
|
|
|
|
},
|
|
|
|
|
|
|
2026-02-23 14:07:41 +08:00
|
|
|
|
goToMemberDetail(e) {
|
|
|
|
|
|
const id = e.currentTarget.dataset.id
|
2026-03-17 18:22:06 +08:00
|
|
|
|
trackClick('home', 'card_click', '超级个体_' + (id || ''))
|
2026-02-23 14:07:41 +08:00
|
|
|
|
wx.navigateTo({ url: `/pages/member-detail/member-detail?id=${id}` })
|
2026-01-14 12:50:00 +08:00
|
|
|
|
},
|
|
|
|
|
|
|
2026-02-24 14:35:58 +08:00
|
|
|
|
// 跳转到我的页面
|
|
|
|
|
|
goToMy() {
|
|
|
|
|
|
wx.switchTab({ url: '/pages/my/my' })
|
|
|
|
|
|
},
|
|
|
|
|
|
|
2026-03-04 19:06:06 +08:00
|
|
|
|
// 下拉刷新(等待各异步加载完成后再结束)
|
2026-01-21 15:49:12 +08:00
|
|
|
|
async onPullDownRefresh() {
|
2026-03-04 19:06:06 +08:00
|
|
|
|
await Promise.all([
|
|
|
|
|
|
this.loadBookData(),
|
2026-03-18 16:00:57 +08:00
|
|
|
|
this.loadFeaturedAndLatest(),
|
|
|
|
|
|
this.loadSuperMembers()
|
2026-03-04 19:06:06 +08:00
|
|
|
|
])
|
2026-01-21 15:49:12 +08:00
|
|
|
|
this.updateUserStatus()
|
|
|
|
|
|
wx.stopPullDownRefresh()
|
2026-02-25 11:47:36 +08:00
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
onShareAppMessage() {
|
|
|
|
|
|
const ref = app.getMyReferralCode()
|
|
|
|
|
|
return {
|
2026-03-20 11:31:04 +08:00
|
|
|
|
title: '卡若创业派对 - 真实商业故事',
|
2026-02-25 11:47:36 +08:00
|
|
|
|
path: ref ? `/pages/index/index?ref=${ref}` : '/pages/index/index'
|
|
|
|
|
|
}
|
2026-02-27 14:22:58 +08:00
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
onShareTimeline() {
|
|
|
|
|
|
const ref = app.getMyReferralCode()
|
2026-03-20 11:31:04 +08:00
|
|
|
|
return { title: '卡若创业派对 - 真实商业故事', query: ref ? `ref=${ref}` : '' }
|
2026-01-14 12:50:00 +08:00
|
|
|
|
}
|
|
|
|
|
|
})
|