页面开发
This commit is contained in:
69
pages/login/setup.vue
Normal file
69
pages/login/setup.vue
Normal file
@@ -0,0 +1,69 @@
|
||||
<template>
|
||||
<view class="zd_container">
|
||||
<nav-bar title="设置" :inner2="true" @goIn="goIn"></nav-bar>
|
||||
<view class="zd_content">
|
||||
<view class="zd_wrapper">
|
||||
<view class="setup-item">
|
||||
<view class="setup-label">服务地址</view>
|
||||
<input type="text" class="setup-input" placeholder="请输入服务器地址" v-model="addrip">
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row submit-bar">
|
||||
<button class="zd-col-24 button-primary" @click="_submit">确认</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
export default {
|
||||
components: {
|
||||
NavBar
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
addrip: this.$store.getters.baseUrl,
|
||||
acsip: this.$store.getters.acsUrl,
|
||||
setTime: this.$store.getters.setTime / 1000
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
goIn () {
|
||||
uni.redirectTo({
|
||||
url: '/pages/login/login'
|
||||
})
|
||||
},
|
||||
_submit () {
|
||||
if (this.addrip === '') {
|
||||
uni.showToast({
|
||||
title: '请填写LMS地址',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
// 存值
|
||||
this.$store.dispatch('setConfig',{baseUrl: this.addrip})
|
||||
uni.redirectTo({
|
||||
url: '/pages/login/login'
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="stylus">
|
||||
@import '../../common/style/mixin.styl';
|
||||
.setup-item
|
||||
width 100%
|
||||
margin-bottom 40rpx
|
||||
.setup-label
|
||||
_font(24rpx,40rpx,#000)
|
||||
.setup-input
|
||||
_wh(100%, 80rpx)
|
||||
background #fff
|
||||
_font(28rpx,80rpx,#323232)
|
||||
padding 0 28rpx
|
||||
border 2px solid #e9ecf3
|
||||
border-radius 12rpx
|
||||
</style>
|
||||
Reference in New Issue
Block a user