fix(theme): 修复主题加载错误

This commit is contained in:
2025-12-30 10:59:23 +08:00
parent 26f8537d24
commit 3fec0470cf
2 changed files with 15 additions and 15 deletions

View File

@@ -110,7 +110,7 @@ class ConfigExternal {
try { try {
// 动态加载主题配置 // 动态加载主题配置
const themeData = require(`@/common/js/style_color.js`)[theme]; const themeData = require(`@/common/js/style_color.js`)['default'][theme];
this.loadedConfigs[`theme_${theme}`] = themeData; this.loadedConfigs[`theme_${theme}`] = themeData;
return themeData; return themeData;
} catch (error) { } catch (error) {

View File

@@ -59,7 +59,7 @@ const store = new Vuex.Store({
cartNumber: 0, cartNumber: 0,
cartMoney: 0, cartMoney: 0,
cartChange: 0, cartChange: 0,
wechatConfigStatus:0, wechatConfigStatus: 0,
bottomNavHidden: false, // 底部导航是否隐藏true隐藏false显示 bottomNavHidden: false, // 底部导航是否隐藏true隐藏false显示
aiUnreadCount: 10, // AI未读消息数量 aiUnreadCount: 10, // AI未读消息数量
globalAIKefuConfig: null, // AI客服配置 globalAIKefuConfig: null, // AI客服配置
@@ -80,8 +80,8 @@ const store = new Vuex.Store({
wap_valid_time: 0, wap_valid_time: 0,
}, },
copyright: null, copyright: null,
initStatus:false, initStatus: false,
offlineWhiteList:['pages_order/payment','pages_order/list','pages_order/detail'],//线下支付白名单 offlineWhiteList: ['pages_order/payment', 'pages_order/list', 'pages_order/detail'],//线下支付白名单
canReceiveRegistergiftInfo: { canReceiveRegistergiftInfo: {
status: false, status: false,
path: '' path: ''
@@ -227,12 +227,12 @@ const store = new Vuex.Store({
setCartMoney(state, value) { setCartMoney(state, value) {
state.cartMoney = value; state.cartMoney = value;
}, },
setInitStatus(state,value){ setInitStatus(state, value) {
state.initStatus = value state.initStatus = value
}, },
setWechatConfigStatus(state,value){ setWechatConfigStatus(state, value) {
state.wechatConfigStatus = value state.wechatConfigStatus = value
}, },
// 设置AI未读消息数量 // 设置AI未读消息数量
setAiUnreadCount(state, value) { setAiUnreadCount(state, value) {
state.aiUnreadCount = value; state.aiUnreadCount = value;
@@ -252,7 +252,7 @@ const store = new Vuex.Store({
success: res => { success: res => {
var data = res.data; var data = res.data;
if (data) { if (data) {
this.commit('setThemeStyle', configExternal.loadThemeSync(data.style_theme.name)); this.commit('setThemeStyle', configExternal.loadThemeSync(data.style_theme?.name));
// 底部导航 // 底部导航
this.commit('setTabBarList', data.diy_bottom_nav); this.commit('setTabBarList', data.diy_bottom_nav);
@@ -260,16 +260,16 @@ const store = new Vuex.Store({
this.commit('setAddonIsExist', data.addon_is_exist); this.commit('setAddonIsExist', data.addon_is_exist);
this.commit('setDefaultImg', data.default_img); this.commit('setDefaultImg', data.default_img);
this.commit('setSiteInfo', data.site_info); this.commit('setSiteInfo', data.site_info);
this.commit('setServicerConfig', data.servicer); this.commit('setServicerConfig', data.servicer);
// 企业微信配置 // 企业微信配置
if (data?.wxwork_config) { if (data?.wxwork_config) {
this.commit('setWxworkConfig', data.wxwork_config); this.commit('setWxworkConfig', data.wxwork_config);
} }
this.commit('setCopyright', data.copyright); this.commit('setCopyright', data.copyright);
this.commit('setMapConfig', data.map_config); this.commit('setMapConfig', data.map_config);
@@ -277,11 +277,11 @@ const store = new Vuex.Store({
this.commit('setglobalAIKefuConfig', data.ai_agent_config); this.commit('setglobalAIKefuConfig', data.ai_agent_config);
this.commit('setGlobalStoreConfig', data.store_config); this.commit('setGlobalStoreConfig', data.store_config);
//联系我们 //联系我们
this.commit('setShopInfo', data.shop_info); this.commit('setShopInfo', data.shop_info);
this.commit('setWechatConfigStatus',data?.wechat_config_status); this.commit('setWechatConfigStatus', data?.wechat_config_status);
// 默认总店 // 默认总店
if (data.store_info) { if (data.store_info) {
this.commit('setDefaultStoreInfo', data.store_info); this.commit('setDefaultStoreInfo', data.store_info);
@@ -290,7 +290,7 @@ const store = new Vuex.Store({
this.commit('setDefaultStoreInfo', null); this.commit('setDefaultStoreInfo', null);
this.commit('setGlobalStoreInfo', null); this.commit('setGlobalStoreInfo', null);
} }
this.commit('setInitStatus',true) this.commit('setInitStatus', true)
resolve(data); resolve(data);
} }
} }