| 
 | |
| 
 | |
| export default { | |
| 	state: { | |
| 		isTurntableShow:false, | |
| 		isShareShow:false, | |
|         configList : {}, | |
| 	}, | |
| 
 | |
| 	mutations: { | |
| 		mutationsTurntable(state,status) { | |
| 			state.isTurntableShow = status | |
| 		}, | |
| 		mutationsShareShow(state,status) { | |
| 			state.isShareShow = status | |
| 		}, | |
| 		initConfig(state){ | |
| 			console.log('initConfig 开始执行') | |
|              | |
|             import('@/common/api.js').then(api=>{ | |
|                 api.queryConfigList({}).then(res=>{ | |
|                     console.log('getConfig 请求成功:', res) | |
|                     uni.setStorageSync('configList', res.result) | |
|                      | |
|                         const configList = { | |
|                             ...state.configList, | |
|                         } | |
|                         if (res.code == 200) { | |
|                             res.result.forEach(n => { | |
|                                 configList[n.paramCode] = n.paramValueText ||  | |
|                                 n.paramValueTextarea || | |
|                                 n.paramValueImage  | |
|                             }); | |
|                         } | |
|                         state.configList = configList | |
|                         uni.$emit('initConfig', state.configList) | |
|                         console.log('配置初始化完成:', state.configList) | |
|                      | |
|                 }).catch(error=>{ | |
|                     console.error('getConfig 请求失败:', error) | |
|                 }) | |
|             }) | |
| 			 | |
| 		}, | |
| 	}, | |
| 
 | |
| 	actions: {} | |
| }
 |