init
This commit is contained in:
91
pages/home/home.vue
Normal file
91
pages/home/home.vue
Normal file
@@ -0,0 +1,91 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<view class="header">首页</view>
|
||||
<view class="userInfo-wrap">
|
||||
<view class="userInfo">
|
||||
<text class="p1">{{$store.getters.userName}}</text>
|
||||
<text class="p2">欢迎进入扬州晶澳手持系统!</text>
|
||||
</view>
|
||||
<view class="exit" @tap="Quit">
|
||||
<view class="icon-exit"></view>
|
||||
<view class="exit-text">退出</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="menu-wrap">
|
||||
<view class="menu-item" v-for="(e, i) in menu" :key="i" @tap="toPage(e.url)">{{e.name}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
menu: [{url: '/pages/task/painttask', name: '任务生成'}, {url: '/pages/task/sitemanage', name: '站点管理'}, {url: '/pages/task/pointrelease', name: '点位取放货确认'}, {url: '/pages/task/taskmanage', name: '任务管理'}, {url: '/pages/task/zlmanage', name: '指令管理'}]
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
toPage (url) {
|
||||
this.$router.push(url)
|
||||
uni.redirectTo({
|
||||
url: url
|
||||
})
|
||||
},
|
||||
Quit () {
|
||||
this.$store.dispatch('setSignOut')
|
||||
uni.redirectTo({
|
||||
url: '/pages/login/login'
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="stylus">
|
||||
@import '../../common/style/mixin.styl';
|
||||
.header
|
||||
height 86rpx
|
||||
_font(36rpx,86rpx,#333,,center)
|
||||
.userInfo-wrap
|
||||
_fj()
|
||||
_wh(100%,160rpx)
|
||||
padding 0 30rpx
|
||||
background-color $red
|
||||
_bis('../../static/image/info_bg.png',auto,100%,right,bottom)
|
||||
border-radius: 4px
|
||||
.userInfo
|
||||
_fj(,flex-start,column)
|
||||
.p1
|
||||
_font(34rpx,1,#fff)
|
||||
padding-bottom 18rpx
|
||||
.p2
|
||||
_font(26rpx,1,#fff)
|
||||
.exit
|
||||
_fj()
|
||||
height 47rpx
|
||||
padding 0 15rpx
|
||||
border 1px solid #FF967C
|
||||
border-radius 20rpx
|
||||
.icon-exit
|
||||
_wh(22rpx, 22rpx)
|
||||
_bis('../../static/image/exit.png',22rpx)
|
||||
.exit-text
|
||||
_font(24rpx,47rpx,#fff,,right)
|
||||
padding-left 10rpx
|
||||
.menu-wrap
|
||||
_wh(100%, calc(100% - 246rpx))
|
||||
overflow-y scroll
|
||||
padding-top 60rpx
|
||||
_fj(flex-start,flex-start,,wrap)
|
||||
align-content: flex-start
|
||||
.menu-item
|
||||
_fj(center)
|
||||
_wh(30%, 120rpx)
|
||||
margin-bottom 40rpx
|
||||
border 1px solid #e74f1a
|
||||
border-radius 5px
|
||||
_font(26rpx, 60rpx,#e74f1a,,center)
|
||||
&:nth-child(3n+2)
|
||||
margin-left 5%
|
||||
margin-right 5%
|
||||
</style>
|
||||
Reference in New Issue
Block a user