封装看板跳转页面
This commit is contained in:
64
pages/index.vue
Normal file
64
pages/index.vue
Normal file
@@ -0,0 +1,64 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<view class="content">
|
||||
<view class="zd-row">
|
||||
<view class="zd-col-6 label">地址</view>
|
||||
<view class="zd-col-17"><input type="text" class="inputStyle" v-model="val"></view>
|
||||
</view>
|
||||
<button class="button" @tap="toConfig">配置</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
val: this.$store.getters.baseUrl
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
toConfig () {
|
||||
let obj = {
|
||||
baseUrl: this.val
|
||||
}
|
||||
this.$store.dispatch('setConfig', obj)
|
||||
let url = '/pages/home' + '?url=' + this.val
|
||||
uni.redirectTo({
|
||||
url: url
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
@import '../common/style/mixin.styl';
|
||||
.container
|
||||
display flex
|
||||
flex-direction column
|
||||
justify-content center
|
||||
align-items center
|
||||
width 100%
|
||||
height 100%
|
||||
.content
|
||||
display flex
|
||||
flex-direction column
|
||||
justify-content center
|
||||
width 500px
|
||||
height 100%
|
||||
.label
|
||||
_font(16px, 40px, #fff,,)
|
||||
.inputStyle
|
||||
height 40px
|
||||
_font(16px, 40px, #606266,,)
|
||||
padding 0 15px
|
||||
border none
|
||||
background-color #ffffff
|
||||
.button
|
||||
_wh(100%, 40px)
|
||||
_font(18px, 40px, #fff,,center)
|
||||
margin 30px 0 10px 0
|
||||
background-color #2778f3
|
||||
border-radius 3px
|
||||
</style>
|
||||
Reference in New Issue
Block a user