重构项目文件夹目录

This commit is contained in:
2026-06-15 15:53:55 +08:00
parent 8093e07190
commit 7cbe5b3de5
1098 changed files with 34 additions and 4441 deletions
+40
View File
@@ -0,0 +1,40 @@
const userApi = require('../../api/user')
const navigation = require('../../utils/navigation')
const theme = require('../../utils/theme')
Page({
data: Object.assign(theme.pageThemeData(getApp().globalData.shopTheme), {
loading: false,
contact: null
}),
onShow() {
this.loadContact()
},
handleBack() {
navigation.goBack('/pages/profile/index')
},
async loadContact() {
this.setData({ loading: true })
try {
const contact = await userApi.getPlatformContact()
this.setData({ contact })
} catch (error) {
this.setData({ contact: null })
} finally {
this.setData({ loading: false })
}
},
openRoute(event) {
const route = event.currentTarget.dataset.route
const pureRoute = String(route || '').split('?')[0]
if (navigation.isTabPage(pureRoute)) {
navigation.switchTab(pureRoute)
return
}
navigation.navigate(route)
}
})