Files
screen-shangdianke-uni/pages/index.vue
2024-08-26 09:56:43 +08:00

65 lines
1.2 KiB
Vue

<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>