Files
hht-tongbo/pages/home/home.vue

104 lines
2.5 KiB
Vue
Raw Normal View History

2022-10-10 10:19:18 +08:00
<template>
<view class="content">
<view class="header">首页</view>
<view class="userInfo-wrap">
<view class="userInfo">
<text class="p1">{{$store.getters.userName}}</text>
2022-10-12 17:12:45 +08:00
<text class="p2">欢迎进入铜箔手持系统</text>
2022-10-10 10:19:18 +08:00
</view>
<view class="exit" @tap="Quit">
<view class="icon-exit"></view>
<view class="exit-text">退出</view>
</view>
</view>
2022-10-11 17:03:44 +08:00
<view class="wrapper">
<view class="menu-wrap">
<view class="menu-item" v-for="(e, i) in menu" :key="i" @tap="toPage(e.url)">{{e.name}}</view>
</view>
2022-10-10 10:19:18 +08:00
</view>
</view>
</template>
<script>
2022-10-10 19:58:07 +08:00
import {handRequest} from '@/utils/api.js'
2022-10-10 10:19:18 +08:00
export default {
data() {
return {
2022-10-14 09:27:59 +08:00
menu: [{url: '/pages/ProductManage/SboProdProgress', name: '生箔生产进度'}, {url: '/pages/ProductManage/SboProcess', name: '生箔工序'}, {url: '/pages/ProductManage/BakeProcess', name: '烘烤工序'}, {url: '/pages/ProductManage/PointManage', name: '点位管理'}, {url: '/pages/ProductManage/EmptyPipeInStore', name: '空管入库'}, {url: '/pages/ProductManage/ZjCasing', name: '子卷套管'}, {url: '/pages/ProductManage/ZjDelivery', name: '子卷配送'}, {url: '/pages/ProductManage/ZjOutStore', name: '子卷出站'}]
2022-10-10 10:19:18 +08:00
};
},
2022-10-10 19:58:07 +08:00
mounted () {
2022-10-11 17:03:44 +08:00
// this._handRequest()
2022-10-10 19:58:07 +08:00
},
2022-10-10 10:19:18 +08:00
methods: {
2022-10-10 19:58:07 +08:00
async _handRequest () {
let res = await handRequest()
uni.showModal({
content: res.desc,
showCancel: false
})
},
2022-10-10 16:26:19 +08:00
toPage (url) {
uni.redirectTo({
url: url
2022-10-12 17:12:45 +08:00
})
},
Quit () {
this.$store.dispatch('delUserInfo')
2022-10-10 10:19:18 +08:00
uni.redirectTo({
url: '/pages/login/login'
2022-10-12 17:12:45 +08:00
})
2022-10-10 10:19:18 +08:00
}
}
}
</script>
<style lang="stylus">
@import '../../common/style/mixin.styl';
2022-10-11 17:03:44 +08:00
.content
padding-top 0
2022-10-10 10:19:18 +08:00
.header
height 86rpx
_font(36rpx,86rpx,#333,,center)
.userInfo-wrap
_fj()
_wh(100%,160rpx)
padding 0 30rpx
2022-10-12 17:12:45 +08:00
background-color $red
2022-10-10 10:19:18 +08:00
_bis('../../static/image/info_bg.png',auto,100%,right,bottom)
2022-10-11 17:03:44 +08:00
border-radius 12rpx
margin-bottom 20rpx
2022-10-10 10:19:18 +08:00
.userInfo
_fj(,flex-start,column)
.p1
2022-10-12 17:12:45 +08:00
_font(34rpx,1,#fff)
2022-10-10 10:19:18 +08:00
padding-bottom 18rpx
2022-10-12 17:12:45 +08:00
.p2
2022-10-10 10:19:18 +08:00
_font(26rpx,1,#fff)
.exit
_fj()
2022-10-12 17:12:45 +08:00
height 47rpx
padding 0 15rpx
border 1px solid #FF967C
2022-10-10 10:19:18 +08:00
border-radius 20rpx
.icon-exit
2022-10-12 17:12:45 +08:00
_wh(22rpx, 22rpx)
2022-10-10 10:19:18 +08:00
_bis('../../static/image/exit.png',22rpx)
2022-10-12 17:12:45 +08:00
.exit-text
2022-10-10 10:19:18 +08:00
_font(24rpx,47rpx,#fff,,right)
padding-left 10rpx
.menu-wrap
_fj(flex-start,flex-start,,wrap)
align-content: flex-start
.menu-item
_fj(center)
_wh(30%, 120rpx)
margin-bottom 40rpx
2022-10-12 17:12:45 +08:00
border 1px solid #e74f1a
2022-10-10 10:19:18 +08:00
border-radius 5px
_font(26rpx, 60rpx,#e74f1a,,center)
&:nth-child(3n+2)
margin-left 5%
margin-right 5%
</style>