diff --git a/common/js/config-external.js b/common/js/config-external.js index 555a704..3fd174e 100644 --- a/common/js/config-external.js +++ b/common/js/config-external.js @@ -110,7 +110,7 @@ class ConfigExternal { 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; return themeData; } catch (error) { diff --git a/store/index.js b/store/index.js index a148bb5..54de377 100644 --- a/store/index.js +++ b/store/index.js @@ -59,7 +59,7 @@ const store = new Vuex.Store({ cartNumber: 0, cartMoney: 0, cartChange: 0, - wechatConfigStatus:0, + wechatConfigStatus: 0, bottomNavHidden: false, // 底部导航是否隐藏,true:隐藏,false:显示 aiUnreadCount: 10, // AI未读消息数量 globalAIKefuConfig: null, // AI客服配置 @@ -80,8 +80,8 @@ const store = new Vuex.Store({ wap_valid_time: 0, }, copyright: null, - initStatus:false, - offlineWhiteList:['pages_order/payment','pages_order/list','pages_order/detail'],//线下支付白名单 + initStatus: false, + offlineWhiteList: ['pages_order/payment', 'pages_order/list', 'pages_order/detail'],//线下支付白名单 canReceiveRegistergiftInfo: { status: false, path: '' @@ -227,12 +227,12 @@ const store = new Vuex.Store({ setCartMoney(state, value) { state.cartMoney = value; }, - setInitStatus(state,value){ + setInitStatus(state, value) { state.initStatus = value }, - setWechatConfigStatus(state,value){ + setWechatConfigStatus(state, value) { state.wechatConfigStatus = value - }, + }, // 设置AI未读消息数量 setAiUnreadCount(state, value) { state.aiUnreadCount = value; @@ -252,7 +252,7 @@ const store = new Vuex.Store({ success: res => { var data = res.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); @@ -260,16 +260,16 @@ const store = new Vuex.Store({ this.commit('setAddonIsExist', data.addon_is_exist); this.commit('setDefaultImg', data.default_img); - + this.commit('setSiteInfo', data.site_info); this.commit('setServicerConfig', data.servicer); - + // 企业微信配置 if (data?.wxwork_config) { this.commit('setWxworkConfig', data.wxwork_config); } - + this.commit('setCopyright', data.copyright); this.commit('setMapConfig', data.map_config); @@ -277,11 +277,11 @@ const store = new Vuex.Store({ this.commit('setglobalAIKefuConfig', data.ai_agent_config); this.commit('setGlobalStoreConfig', data.store_config); - + //联系我们 - + this.commit('setShopInfo', data.shop_info); - this.commit('setWechatConfigStatus',data?.wechat_config_status); + this.commit('setWechatConfigStatus', data?.wechat_config_status); // 默认总店 if (data.store_info) { this.commit('setDefaultStoreInfo', data.store_info); @@ -290,7 +290,7 @@ const store = new Vuex.Store({ this.commit('setDefaultStoreInfo', null); this.commit('setGlobalStoreInfo', null); } - this.commit('setInitStatus',true) + this.commit('setInitStatus', true) resolve(data); } }