刷新时间
This commit is contained in:
@@ -33,8 +33,8 @@
|
|||||||
<button v-show="showBtn1" class="iconfont login_icon delete_icon" @click="clearData(1)"></button>
|
<button v-show="showBtn1" class="iconfont login_icon delete_icon" @click="clearData(1)"></button>
|
||||||
</div>
|
</div>
|
||||||
<div class="inputOuter">
|
<div class="inputOuter">
|
||||||
<!-- <input type="text" placeholder="图片域名地址" class="inputStyle" v-model="imgBaseUrl">
|
<input type="number" placeholder="刷新时间(秒)" class="inputStyle" v-model="setTime">
|
||||||
<button v-show="showBtn2" class="iconfont login_icon delete_icon" @click="clearData(2)"></button> -->
|
<button v-show="showBtn2" class="iconfont login_icon delete_icon" @click="clearData(2)"></button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="submit">
|
<div class="submit">
|
||||||
@@ -57,6 +57,7 @@ export default {
|
|||||||
password: '',
|
password: '',
|
||||||
baseUrl: this.$store.getters.baseUrl,
|
baseUrl: this.$store.getters.baseUrl,
|
||||||
imgBaseUrl: this.$store.getters.imgBaseUrl,
|
imgBaseUrl: this.$store.getters.imgBaseUrl,
|
||||||
|
setTime: this.$store.getters.setTime / 1000,
|
||||||
inputType: 'password',
|
inputType: 'password',
|
||||||
eyeOpen: true,
|
eyeOpen: true,
|
||||||
drift: 0,
|
drift: 0,
|
||||||
@@ -71,7 +72,7 @@ export default {
|
|||||||
return this.baseUrl !== ''
|
return this.baseUrl !== ''
|
||||||
},
|
},
|
||||||
showBtn2 () {
|
showBtn2 () {
|
||||||
return this.imgBaseUrl !== ''
|
return this.setTime !== ''
|
||||||
},
|
},
|
||||||
showBtn3 () {
|
showBtn3 () {
|
||||||
return this.loginname !== ''
|
return this.loginname !== ''
|
||||||
@@ -126,7 +127,7 @@ export default {
|
|||||||
this.baseUrl = ''
|
this.baseUrl = ''
|
||||||
break
|
break
|
||||||
case 2:
|
case 2:
|
||||||
this.imgBaseUrl = ''
|
this.setTime = ''
|
||||||
break
|
break
|
||||||
case 3:
|
case 3:
|
||||||
this.loginname = ''
|
this.loginname = ''
|
||||||
@@ -144,7 +145,7 @@ export default {
|
|||||||
_config () {
|
_config () {
|
||||||
let obj = {
|
let obj = {
|
||||||
baseUrl: this.baseUrl,
|
baseUrl: this.baseUrl,
|
||||||
imgBaseUrl: this.imgBaseUrl
|
setTime: this.setTime * 1000
|
||||||
}
|
}
|
||||||
this.$store.dispatch('setConfig', obj)
|
this.$store.dispatch('setConfig', obj)
|
||||||
this._tabChange(0)
|
this._tabChange(0)
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ const baseUrl = process.env.NODE_ENV === 'development' ? 'http://192.168.81.155:
|
|||||||
const imgBaseUrl = process.env.NODE_ENV === 'development' ? 'http://192.168.81.100/' : 'http://192.168.46.5/'
|
const imgBaseUrl = process.env.NODE_ENV === 'development' ? 'http://192.168.81.100/' : 'http://192.168.46.5/'
|
||||||
const state = {
|
const state = {
|
||||||
baseUrl: getStore('baseUrl') || baseUrl,
|
baseUrl: getStore('baseUrl') || baseUrl,
|
||||||
|
setTime: getStore('setTime') || 5000,
|
||||||
imgBaseUrl: getStore('imgBaseUrl') || imgBaseUrl,
|
imgBaseUrl: getStore('imgBaseUrl') || imgBaseUrl,
|
||||||
lockTime: getStore('lockTime') || 0,
|
lockTime: getStore('lockTime') || 0,
|
||||||
loading: false,
|
loading: false,
|
||||||
@@ -18,6 +19,7 @@ const state = {
|
|||||||
|
|
||||||
const getters = {
|
const getters = {
|
||||||
baseUrl: state => state.baseUrl,
|
baseUrl: state => state.baseUrl,
|
||||||
|
setTime: state => state.setTime,
|
||||||
imgBaseUrl: state => state.imgBaseUrl,
|
imgBaseUrl: state => state.imgBaseUrl,
|
||||||
lockTime: state => state.lockTime,
|
lockTime: state => state.lockTime,
|
||||||
loading: state => state.loading,
|
loading: state => state.loading,
|
||||||
@@ -28,6 +30,7 @@ const getters = {
|
|||||||
const actions = {
|
const actions = {
|
||||||
setConfig ({commit}, res) {
|
setConfig ({commit}, res) {
|
||||||
setStore('baseUrl', res.baseUrl)
|
setStore('baseUrl', res.baseUrl)
|
||||||
|
setStore('setTime', res.setTime)
|
||||||
setStore('imgBaseUrl', res.imgBaseUrl)
|
setStore('imgBaseUrl', res.imgBaseUrl)
|
||||||
setStore('lockTime', res.lockTime)
|
setStore('lockTime', res.lockTime)
|
||||||
commit(types.COM_CONFIG, res)
|
commit(types.COM_CONFIG, res)
|
||||||
@@ -58,6 +61,7 @@ const actions = {
|
|||||||
const mutations = {
|
const mutations = {
|
||||||
[types.COM_CONFIG] (state, res) {
|
[types.COM_CONFIG] (state, res) {
|
||||||
state.baseUrl = res.baseUrl
|
state.baseUrl = res.baseUrl
|
||||||
|
state.setTime = res.setTime
|
||||||
state.imgBaseUrl = res.imgBaseUrl
|
state.imgBaseUrl = res.imgBaseUrl
|
||||||
state.lockTime = res.lockTime
|
state.lockTime = res.lockTime
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user