feat: refactor member to pay-per-use gravity purchase; mv webview to clipboard+browser
- member.vue: rewrite from subscription plans (free/growth/sprint) to H5-only pay-per-use gravity purchase with quantity selector + QR code - user.vue: gravity card replacing quota card, add share/contribute/H5-buy entry points, plus gravity acquisition modal (share/contribute/buy) - share.vue: layout fix (flex column), smarter copyLink with cached URL, WeChat timeline hint instead of open-type - share.controller.ts: add GET /:shareCode redirect route (IP record + 302) - interview.vue: guest mode fix, H5 buy modal, clipboard copy instead of webview for mini-program - App.vue: handleH5UrlParams for ?token=&buy=gravity auto-login - composables/useGravityPurchase.ts: reusable gravity purchase composable - remove webview.vue (no longer used), replace with clipboard+browser flow - AGENTS.md: sync all above changes, fix duplicate numbering
This commit is contained in:
@@ -6,8 +6,28 @@ onLaunch(() => {
|
||||
// #ifdef MP-WEIXIN
|
||||
initPrivacy()
|
||||
// #endif
|
||||
// #ifdef H5
|
||||
handleH5UrlParams()
|
||||
// #endif
|
||||
})
|
||||
|
||||
// #ifdef H5
|
||||
function handleH5UrlParams() {
|
||||
const params = new URLSearchParams(window.location.search)
|
||||
const token = params.get('token')
|
||||
const buy = params.get('buy')
|
||||
if (token) {
|
||||
uni.setStorageSync('token', token)
|
||||
}
|
||||
if (buy === 'gravity') {
|
||||
// 延迟等 app 初始化完成再跳转
|
||||
setTimeout(() => {
|
||||
uni.navigateTo({ url: '/pages/member/member' })
|
||||
}, 300)
|
||||
}
|
||||
}
|
||||
// #endif
|
||||
|
||||
// #ifdef MP-WEIXIN
|
||||
function initPrivacy() {
|
||||
if (wx.onNeedPrivacyAuthorization) {
|
||||
|
||||
Reference in New Issue
Block a user