任务管理
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
import * as types from '../types'
|
||||
|
||||
const baseUrl = process.env.NODE_ENV === 'development' ? 'http://10.1.3.90:8010' : 'http://10.1.3.90:8010'
|
||||
const acsUrl = process.env.NODE_ENV === 'development' ? 'http://10.1.3.90:8010' : 'http://10.1.3.90:8010'
|
||||
const state = {
|
||||
baseUrl: uni.getStorageSync('baseUrl') || baseUrl,
|
||||
acsUrl: uni.getStorageSync('acsUrl') || acsUrl,
|
||||
setTime: uni.getStorageSync('setTime') || 5000,
|
||||
setPrintName: uni.getStorageSync('setPrintName') || '',
|
||||
loginName: uni.getStorageSync('loginName') ? uni.getStorageSync('loginName') : '',
|
||||
@@ -11,6 +13,7 @@ const state = {
|
||||
}
|
||||
const getters = {
|
||||
baseUrl: state => state.baseUrl,
|
||||
acsUrl: state => state.acsUrl,
|
||||
setTime: state => state.setTime,
|
||||
setPrintName: state => state.setPrintName,
|
||||
loginName: state => state.loginName,
|
||||
@@ -20,6 +23,7 @@ const getters = {
|
||||
const actions = {
|
||||
setConfig ({commit}, res) {
|
||||
uni.setStorageSync('baseUrl', res.baseUrl)
|
||||
uni.setStorageSync('acsUrl', res.acsUrl)
|
||||
uni.setStorageSync('setTime', res.setTime)
|
||||
uni.setStorageSync('setPrintName', res.setPrintName)
|
||||
commit(types.COM_CONFIG, res)
|
||||
@@ -49,6 +53,7 @@ const actions = {
|
||||
const mutations = {
|
||||
[types.COM_CONFIG] (state, res) {
|
||||
state.baseUrl = res.baseUrl
|
||||
state.acsUrl = res.acsUrl
|
||||
state.setTime = res.setTime
|
||||
state.setPrintName = res.setPrintName
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user