初始化代码

This commit is contained in:
2025-12-22 17:13:05 +08:00
parent ed0de08e3a
commit 1f7e9d401b
2947 changed files with 526137 additions and 0 deletions

View File

@@ -0,0 +1,57 @@
import $api from "@/api/index.js"
export default {
state: {
//主题颜色
configInfo: {
id: 0,
navBarHeight: uni.getSystemInfoSync().statusBarHeight * 1 + 44,
isIos: uni.getSystemInfoSync().system.includes('iOS'),
canIUseGetUserProfile: uni.getUserProfile ? true : false,
primaryColor: '#39b54a',
subColor: '#F3A664',
refund_img: 'https://lbqny.migugu.com/paotui/errand.png',
curSysHeight: '',
tabbarHeight: '',
expressList: [{
id: 1,
title: '同城配送'
}, {
id: 2,
title: '中通快递'
}, {
id: 3,
title: '圆通快递'
}, {
id: 4,
title: '申通快递'
}, {
id: 5,
title: '韵达快递'
}]
}
},
mutations: {
updateConfigItem(state, item) {
let {
key,
val
} = item
state[key] = val
},
},
actions: {
// 获取基本配置
async getConfigInfo({
commit,
state
}, param) {
let config = await $api.base.configInfo()
let data = Object.assign(state.configInfo, config)
commit('updateConfigItem', {
key: 'configInfo',
val: data
})
},
}
}