同步数据

This commit is contained in:
乘风
2026-04-02 19:20:19 +08:00
parent 76965adb23
commit 9ec4e0f9bd
903 changed files with 130902 additions and 15896 deletions

View File

@@ -22,17 +22,19 @@ class ChapterAccessManager {
*/
async fetchLatestConfig() {
try {
const res = await app.request({ url: '/api/miniprogram/config', silent: true, timeout: 3000 })
if (res.success && res.prices) {
const res = await app.getConfig()
if (res && res.success && res.prices) {
return {
prices: res.prices || { section: 1, fullbook: 9.9 }
prices: res.prices || { section: 1, fullbook: 9.9 },
shareRate: res.shareRate != null ? res.shareRate : 90
}
}
} catch (e) {
console.warn('[AccessManager] 获取配置失败,使用默认配置:', e)
}
return {
prices: { section: 1, fullbook: 9.9 }
prices: { section: 1, fullbook: 9.9 },
shareRate: 90
}
}