bug修改

This commit is contained in:
2024-03-18 15:14:55 +08:00
parent 7858a76e66
commit 96a53ff3c6
8 changed files with 60 additions and 31 deletions

View File

@@ -1,9 +1,11 @@
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 printUrl = 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,
printUrl: uni.getStorageSync('printUrl') || printUrl,
setTime: uni.getStorageSync('setTime') || 5000,
loginName: uni.getStorageSync('loginName') ? uni.getStorageSync('loginName') : '',
@@ -12,6 +14,7 @@ const state = {
}
const getters = {
baseUrl: state => state.baseUrl,
acsUrl: state => state.acsUrl,
printUrl: state => state.printUrl,
setTime: state => state.setTime,
loginName: state => state.loginName,
@@ -21,6 +24,7 @@ const getters = {
const actions = {
setConfig ({commit}, res) {
uni.setStorageSync('baseUrl', res.baseUrl)
uni.setStorageSync('acsUrl', res.acsUrl)
uni.setStorageSync('printUrl', res.printUrl)
uni.setStorageSync('setTime', res.setTime)
commit(types.COM_CONFIG, res)
@@ -50,6 +54,7 @@ const actions = {
const mutations = {
[types.COM_CONFIG] (state, res) {
state.baseUrl = res.baseUrl
state.acsUrl = res.acsUrl
state.printUrl = res.printUrl
state.setTime = res.setTime
},