miniprogram: 用永平版本替换(含超级个体、会员详情、提现等)

- 来源: 一场soul的创业实验-永平/soul/miniprogram
- 新增: addresses/agreement/privacy/withdraw-records 等页面
- 新增: components/icon, utils/chapterAccessManager, readingTracker
- 删除: 上传脚本、部署说明等冗余文件
- 同步永平最新结构和功能

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
卡若
2026-02-24 14:35:58 +08:00
parent b038a042c2
commit e5e6ffd7b1
99 changed files with 8370 additions and 3550 deletions

View File

@@ -83,7 +83,12 @@ Page({
onShow() {
if (typeof this.getTabBar === 'function' && this.getTabBar()) {
this.getTabBar().setData({ selected: 2 })
const tabBar = this.getTabBar()
if (tabBar.updateSelected) {
tabBar.updateSelected()
} else {
tabBar.setData({ selected: 2 })
}
}
this.initUserStatus()
},
@@ -91,7 +96,7 @@ Page({
// 加载匹配配置
async loadMatchConfig() {
try {
const res = await app.request('/api/match/config', {
const res = await app.request({ url: '/api/match/config', silent: true, method: 'GET',
method: 'GET'
})
@@ -316,7 +321,7 @@ Page({
// 从数据库获取真实用户匹配
let matchedUser = null
try {
const res = await app.request('/api/match/users', {
const res = await app.request({ url: '/api/match/users', silent: true,
method: 'POST',
data: {
matchType: this.data.selectedType,
@@ -400,7 +405,7 @@ Page({
// 上报匹配行为
async reportMatch(matchedUser) {
try {
await app.request('/api/ckb/match', {
await app.request({ url: '/api/ckb/match', silent: true,
method: 'POST',
data: {
matchType: this.data.selectedType,
@@ -514,7 +519,7 @@ Page({
this.setData({ isJoining: true, joinError: '' })
try {
const res = await app.request('/api/ckb/join', {
const res = await app.request('/api/miniprogram/ckb/join', {
method: 'POST',
data: {
type: joinType,
@@ -586,6 +591,8 @@ Page({
return
}
// 邀请码:与章节支付一致,写入订单便于分销归属与对账
const referralCode = wx.getStorageSync('referral_code') || ''
// 调用支付接口购买匹配次数
const res = await app.request('/api/miniprogram/pay', {
method: 'POST',
@@ -595,7 +602,8 @@ Page({
productId: 'match_1',
amount: 1,
description: '匹配次数x1',
userId: app.globalData.userInfo?.id || ''
userId: app.globalData.userInfo?.id || '',
referralCode: referralCode || undefined
}
})