init
This commit is contained in:
81
pages/login/setup.vue
Normal file
81
pages/login/setup.vue
Normal file
@@ -0,0 +1,81 @@
|
||||
<template>
|
||||
<view class="zd_container">
|
||||
<nav-bar title="设置" :inner2="true" @goIn="goIn" :show1="false"></nav-bar>
|
||||
<view class="zd_content">
|
||||
<view class="zd_wrapper">
|
||||
<view class="input-wrap">
|
||||
<view class="input-label">服务器地址</view>
|
||||
<input type="text" class="setup-input" placeholder="请输入服务器地址" v-model="addrip">
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="zd_wrapper">
|
||||
<view class="input-wrap">
|
||||
<view class="input-label">刷新时间(s)</view>
|
||||
<input type="text" class="setup-input" placeholder="请输入刷新时间" v-model="setTime">
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
<view class="submit-bar">
|
||||
<button class="submit-button" @click="_submit">确认</button>
|
||||
<button class="submit-button" @click="_virtualprintType">查询</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
export default {
|
||||
components: {
|
||||
NavBar
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
addrip: this.$store.getters.baseUrl,
|
||||
setTime: this.$store.getters.setTime / 1000
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
goIn () {
|
||||
uni.redirectTo({
|
||||
url: '/pages/login/login'
|
||||
})
|
||||
},
|
||||
_submit () {
|
||||
if (this.addrip === '') {
|
||||
uni.showToast({
|
||||
title: '服务器地址',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
// if (this.setTime === '') {
|
||||
// uni.showToast({
|
||||
// title: '请填写刷新时间',
|
||||
// icon: 'none'
|
||||
// })
|
||||
// return
|
||||
// }
|
||||
// 存值
|
||||
this.$store.dispatch('setConfig',{baseUrl: this.addrip, setTime: this.setTime * 1000})
|
||||
uni.redirectTo({
|
||||
url: '/pages/login/login'
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="stylus">
|
||||
@import '../../common/style/mixin.styl';
|
||||
.input-wrap
|
||||
width 100%
|
||||
_fj()
|
||||
.input-label
|
||||
wh(200rpx, 58rpx)
|
||||
_font(28rpx,58rpx,#464646)
|
||||
.setup-input
|
||||
_wh(calc(100% - 200rpx), 58rpx)
|
||||
background #fff
|
||||
_font(28rpx,58rpx,#323232)
|
||||
padding 0 10rpx
|
||||
</style>
|
||||
Reference in New Issue
Block a user