更新开发文档,强调接口路径必须按使用方区分,禁止通用路径混用。新增小程序分享功能,统一使用推荐码,确保用户体验一致性。

This commit is contained in:
Alex-larget
2026-02-25 11:47:36 +08:00
parent 8e4d61e22b
commit 52c5a8abab
145 changed files with 20844 additions and 30 deletions

View File

@@ -454,11 +454,10 @@ Page({
})
},
// 分享到微信 - 自动带分享人ID
// 分享到微信 - 自动带分享人ID(统一使用 app.getMyReferralCode
onShareAppMessage() {
const { section, sectionId } = this.data
const userInfo = app.globalData.userInfo
const referralCode = userInfo?.referralCode || wx.getStorageSync('referralCode') || ''
const ref = app.getMyReferralCode()
// 分享标题优化
const shareTitle = section?.title
@@ -467,7 +466,7 @@ Page({
return {
title: shareTitle,
path: `/pages/read/read?id=${sectionId}${referralCode ? '&ref=' + referralCode : ''}`,
path: `/pages/read/read?id=${sectionId}${ref ? '&ref=' + ref : ''}`,
imageUrl: '/assets/share-cover.png' // 可配置分享封面图
}
},
@@ -475,12 +474,11 @@ Page({
// 分享到朋友圈
onShareTimeline() {
const { section, sectionId } = this.data
const userInfo = app.globalData.userInfo
const referralCode = userInfo?.referralCode || ''
const ref = app.getMyReferralCode()
return {
title: `${section?.title || 'Soul创业派对'} - 来自派对房的真实故事`,
query: `id=${sectionId}${referralCode ? '&ref=' + referralCode : ''}`
query: `id=${sectionId}${ref ? '&ref=' + ref : ''}`
}
},