chore:改了store/index.js

This commit is contained in:
2026-01-31 09:20:31 +08:00
parent e4dfd0ae11
commit fe9303bf4c

View File

@@ -65,6 +65,7 @@ const store = new Vuex.Store({
bottomNavHidden: false, // 底部导航是否隐藏true隐藏false显示 bottomNavHidden: false, // 底部导航是否隐藏true隐藏false显示
aiUnreadCount: 10, // AI未读消息数量 aiUnreadCount: 10, // AI未读消息数量
globalAIKefuConfig: null, // AI客服配置 globalAIKefuConfig: null, // AI客服配置
customerServiceType: 'ai',
globalStoreConfig: null, // 门店配置 globalStoreConfig: null, // 门店配置
globalStoreInfo: null, // 门店信息 globalStoreInfo: null, // 门店信息
defaultStoreInfo: null, // 默认门店 defaultStoreInfo: null, // 默认门店
@@ -159,6 +160,9 @@ const store = new Vuex.Store({
state.globalAIKefuConfig = value; state.globalAIKefuConfig = value;
uni.setStorageSync('globalAIKefuConfig', value); // 初始化数据调用 uni.setStorageSync('globalAIKefuConfig', value); // 初始化数据调用
}, },
setCustomerServiceType(state, type) {
state.customerServiceType = type;
},
setGlobalStoreConfig(state, value) { setGlobalStoreConfig(state, value) {
state.globalStoreConfig = value; state.globalStoreConfig = value;
uni.setStorageSync('globalStoreConfig', value); // 初始化数据调用 uni.setStorageSync('globalStoreConfig', value); // 初始化数据调用
@@ -412,7 +416,7 @@ const store = new Vuex.Store({
}, },
// 生成主题颜色CSS变量 // 生成主题颜色CSS变量
themeColorSet() { themeColorSet() {
// console.log('样式颜色设置...'); console.log('样式颜色设置...');
let theme = this.state.themeStyle; let theme = this.state.themeStyle;
if (!theme?.main_color || !theme?.aux_color) return; if (!theme?.main_color || !theme?.aux_color) return;
try { try {
@@ -436,7 +440,7 @@ const store = new Vuex.Store({
} catch (e) { } catch (e) {
console.error('设置主题颜色失败', e); console.error('设置主题颜色失败', e);
} }
// console.log('themeColor => ', this.state.themeColor); console.log('themeColor => ', this.state.themeColor);
} }
} }
}) })