功能:同步小程序流程

This commit is contained in:
xiaowang
2026-05-23 18:45:41 +08:00
parent 844516988b
commit 30ae763e18
117 changed files with 8823 additions and 76 deletions
+56
View File
@@ -1,9 +1,37 @@
/**
* Purpose: authApi supports index.js by holding or executing the auth api page or API role.
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
*/
const authApi = require('../../api/auth')
/**
* Purpose: shopApi supports index.js by holding or executing the shop api page or API role.
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
*/
const shopApi = require('../../api/shop')
/**
* Purpose: userApi supports index.js by holding or executing the user api page or API role.
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
*/
const userApi = require('../../api/user')
/**
* Purpose: authStore supports index.js by holding or executing the auth store page or API role.
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
*/
const authStore = require('../../utils/auth')
/**
* Purpose: actionGuard supports index.js by holding or executing the action guard page or API role.
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
*/
const actionGuard = require('../../utils/action-guard')
/**
* Purpose: navigation supports index.js by holding or executing the navigation page or API role.
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
*/
const navigation = require('../../utils/navigation')
/**
* Purpose: theme supports index.js by holding or executing the theme page or API role.
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
*/
const theme = require('../../utils/theme')
const { runWithLoading } = require('../../utils/loading')
const {
@@ -15,6 +43,10 @@ const {
resetKeyboardSafe
} = require('../../utils/keyboard-safe')
/**
* Purpose: phoneRegex supports index.js by holding or executing the phone regex page or API role.
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
*/
const phoneRegex = /^1[3-9]\d{9}$/
/**
@@ -124,6 +156,10 @@ Page({
detachKeyboardSafe(this)
},
/**
* Purpose: noop supports index.js by holding or executing the noop page or API role.
* Usage: import, call, read, or update this method from the owning page/module while preserving the surrounding loading and permission flow.
*/
noop() {},
/**
@@ -273,6 +309,10 @@ Page({
}
},
/**
* Purpose: buildAgreementPayload supports index.js by holding or executing the build agreement payload page or API role.
* Usage: import, call, read, or update this method from the owning page/module while preserving the surrounding loading and permission flow.
*/
buildAgreementPayload() {
const agreementVersions = {}
;(this.data.agreements || []).forEach((item) => {
@@ -287,6 +327,10 @@ Page({
}
},
/**
* Purpose: ensureAgreementAccepted supports index.js by holding or executing the ensure agreement accepted page or API role.
* Usage: import, call, read, or update this method from the owning page/module while preserving the surrounding loading and permission flow.
*/
ensureAgreementAccepted() {
if (!this.data.agreementAccepted) {
wx.showToast({
@@ -307,12 +351,20 @@ Page({
return true
},
/**
* Purpose: handleAgreementToggle supports index.js by holding or executing the handle agreement toggle page or API role.
* Usage: import, call, read, or update this method from the owning page/module while preserving the surrounding loading and permission flow.
*/
handleAgreementToggle() {
this.setData({
agreementAccepted: !this.data.agreementAccepted
})
},
/**
* Purpose: openAgreement supports index.js by holding or executing the open agreement page or API role.
* Usage: import, call, read, or update this method from the owning page/module while preserving the surrounding loading and permission flow.
*/
openAgreement(event) {
const type = event.currentTarget.dataset.type
const selectedAgreement = (this.data.agreements || []).find((item) => item.agreementType === type)
@@ -329,6 +381,10 @@ Page({
})
},
/**
* Purpose: closeAgreementModal supports index.js by holding or executing the close agreement modal page or API role.
* Usage: import, call, read, or update this method from the owning page/module while preserving the surrounding loading and permission flow.
*/
closeAgreementModal() {
this.setData({
agreementModalVisible: false,