杂务:整理文档并收口 YumiNail 修复

This commit is contained in:
xiaowang
2026-05-21 18:43:59 +08:00
parent 3797938616
commit 9227ec6175
362 changed files with 8358 additions and 19928 deletions
+14 -3
View File
@@ -1,6 +1,7 @@
const shopApi = require('../../api/shop')
const navigation = require('../../utils/navigation')
const { resolveImageList } = require('../../utils/file')
const theme = require('../../utils/theme')
const { getSignedUrl, resolveImageList } = require('../../utils/file')
const { DEFAULT_SHOP_IMAGE } = require('../../utils/config')
/**
@@ -8,7 +9,7 @@ const { DEFAULT_SHOP_IMAGE } = require('../../utils/config')
* Call guide: page data drives the WXML template, and each method is called by user events or lifecycle callbacks.
*/
Page({
data: {
data: Object.assign(theme.pageThemeData(getApp().globalData.shopTheme), {
loading: true,
loadError: '',
shopId: '',
@@ -16,7 +17,7 @@ Page({
shopInfo: null,
distanceText: '',
shopImages: []
},
}),
/**
* `onLoad` page method. Use this from WXML event bindings or lifecycle hooks.
@@ -56,6 +57,16 @@ Page({
try {
const shopInfo = await shopApi.getShopById(this.data.shopId)
const shopImages = await resolveImageList(shopInfo.imageFileIds || shopInfo.coverImageFileId, DEFAULT_SHOP_IMAGE)
const shopTheme = theme.resolveShopTheme(shopInfo)
this.setData(theme.pageThemeData(shopTheme))
if (shopTheme.backgroundImageFileId) {
try {
const backgroundImageUrl = await getSignedUrl(shopTheme.backgroundImageFileId)
if (backgroundImageUrl) {
this.setData(theme.pageThemeData(shopTheme, backgroundImageUrl))
}
} catch (error) {}
}
this.setData({
shopInfo,
shopImages,