杂务:整理文档并收口 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
+16 -3
View File
@@ -7,7 +7,8 @@ const wishlistApi = require('../../api/wishlist')
const actionGuard = require('../../utils/action-guard')
const auth = require('../../utils/auth')
const navigation = require('../../utils/navigation')
const { resolveImageList } = require('../../utils/file')
const theme = require('../../utils/theme')
const { getSignedUrl, resolveImageList } = require('../../utils/file')
const { DEFAULT_PRODUCT_IMAGE } = require('../../utils/config')
const { formatPrice, getProductTitle, splitCsv } = require('../../utils/format')
const { runWithLoading } = require('../../utils/loading')
@@ -83,7 +84,7 @@ function estimateEarliestBookable(businessHours) {
* 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: '',
productId: '',
@@ -97,7 +98,7 @@ Page({
isLiked: false,
artistCountText: '门店安排',
earliestBookableText: '以门店安排为准'
},
}),
/**
* `onLoad` page method. Use this from WXML event bindings or lifecycle hooks.
@@ -139,6 +140,18 @@ Page({
const product = await productApi.getProductById(productId)
const productImages = await resolveImageList(product.imageFileIds, DEFAULT_PRODUCT_IMAGE)
const shopInfo = product.shopId ? await shopApi.getShopById(product.shopId) : null
if (shopInfo) {
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) {}
}
}
const artistCount = typeof product.availableBookableArtistCount === 'number'
? product.availableBookableArtistCount
: splitCsv(product.bookableArtists).length