红绿项目
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

49 lines
1.1 KiB

import Vue from 'vue'
import Vuex from 'vuex'
Vue.use(Vuex)
const store = new Vuex.Store({
state: {
// 从本地缓存中同步获取指定 key 对应的内容。
ticket: uni.getStorageSync('ticket') || '',
account: uni.getStorageSync('account') || '',
password: uni.getStorageSync('password') || '',
siteInfo: {
'id': '',
'userId': '',
'siteName': '',
'siteLogo': '',
'siteDomain': '',
'shortDomain': '',
'adminDomain': '',
'siteEmail': '',
'siteTelephone': '',
'siteMobile': '',
'siteWhatsapp': '',
'siteTelegram': '',
'corpName': '',
'corpAddress': '',
'status': '',
'serviceTime': '',
'countryCode': '',
'addTime': null,
'currencyCode': '',
'currencySymbol': '',
'areaCode': '',
'timeZone': null
}
},
mutations: {
setTicket: (state, ticket) => {
const obj = state
obj.ticket = ticket
},
setSiteInfo: (state, siteInfo) => {
const obj = state
obj.siteInfo = siteInfo
}
}
})
export default store