更新若干功能
This commit is contained in:
@@ -38,6 +38,7 @@ export const FALLBACK_LAYOUT = {
|
||||
product: { gallery: 'swiper', price: 'inline', action: 'fixed' },
|
||||
list: { style: 'card' },
|
||||
mine: { header: 'gradient', menu: 'list' },
|
||||
package: { list: 'card' },
|
||||
effect: {
|
||||
transition: 'fade',
|
||||
skeleton: 'shimmer',
|
||||
@@ -97,6 +98,8 @@ export function applyTheme(theme) {
|
||||
setCache(STORAGE_SCHEMES_KEY, theme.card_schemes || {})
|
||||
setCache(STORAGE_FEATURES_KEY, {
|
||||
package_enabled: !!(theme.features && theme.features.package_enabled),
|
||||
subscribe_pay_tpl: (theme.features && theme.features.subscribe_pay_tpl) || '',
|
||||
subscribe_ship_tpl: (theme.features && theme.features.subscribe_ship_tpl) || '',
|
||||
})
|
||||
applyVarsToDom(vars)
|
||||
}
|
||||
@@ -109,6 +112,7 @@ function mergeLayout(layout) {
|
||||
product: { ...FALLBACK_LAYOUT.product, ...(src.product || {}) },
|
||||
list: { ...FALLBACK_LAYOUT.list, ...(src.list || {}) },
|
||||
mine: { ...FALLBACK_LAYOUT.mine, ...(src.mine || {}) },
|
||||
package: { ...FALLBACK_LAYOUT.package, ...(src.package || {}) },
|
||||
effect: { ...FALLBACK_LAYOUT.effect, ...(src.effect || {}) },
|
||||
card_scheme: src.card_scheme || FALLBACK_LAYOUT.card_scheme,
|
||||
chrome: {
|
||||
@@ -163,6 +167,8 @@ export function getThemeFeatures() {
|
||||
const cached = getCache(STORAGE_FEATURES_KEY) || {}
|
||||
return {
|
||||
package_enabled: !!cached.package_enabled,
|
||||
subscribe_pay_tpl: cached.subscribe_pay_tpl || '',
|
||||
subscribe_ship_tpl: cached.subscribe_ship_tpl || '',
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user