登录、主页
This commit is contained in:
@@ -1,51 +1,61 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="zd_content">
|
<view class="home_wraper">
|
||||||
<view class="header">首页</view>
|
<view class="zd_content">
|
||||||
<view class="userInfo-wrap">
|
<view class="header">首页</view>
|
||||||
<view class="userInfo">
|
<view class="userInfo-wrap">
|
||||||
<text class="p1">{{$store.getters.userName}}</text>
|
<view class="userInfo">
|
||||||
<text class="p2">欢迎进入铜箔手持系统!</text>
|
<text v-if="userName !== ''" class="p1">{{userName}}</text>
|
||||||
</view>
|
<text class="p2">欢迎进入上电科上海航天自动化物流系统!</text>
|
||||||
<view class="exit" @tap="Quit">
|
</view>
|
||||||
<view class="icon-exit"></view>
|
<view class="exit" @tap="Quit">
|
||||||
<view class="exit-text">退出</view>
|
<view class="icon-exit"></view>
|
||||||
</view>
|
<view class="exit-text">退出</view>
|
||||||
</view>
|
|
||||||
<view class="zd_wrapper">
|
|
||||||
<view class="menu-wrap">
|
|
||||||
<view class="menu-item" v-for="(e, i) in menuList" :key="i" @tap="toPage1(e)">
|
|
||||||
<image class="menu-img" :src="require('../../static/image/menu/' + e.path + '.png')" alt="">
|
|
||||||
<view class="menu-name">{{e.name}}</view>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
<view class="zd_home_wrapper">
|
||||||
<view v-if="show === true" class="sec_menu_wraper">
|
<view class="menus_wrap" v-for="(e, i) in menuList" :key="e.id">
|
||||||
<view class="sec_menu_w">
|
<view class="fir_menu_wrap">
|
||||||
<view class="menu-item" v-for="(e, i) in secM" :key="i" @click="toPage2(e)">
|
<view class="fir_menu_tip"></view>
|
||||||
<view class="sec_menu-col_inner">
|
<view class="fir_menu_title">{{e.name}}</view>
|
||||||
<view class="menu-name menu-name_inner">{{e.name}}</view>
|
</view>
|
||||||
|
<view class="sec_menu_wrap">
|
||||||
|
<view class="sec_menu-item" v-for="(el, i) in e.sonTree" :key="el.menu_id" @tap="toPage(el)">
|
||||||
|
<image class="menu-img" :src="require('../../static/image/menu/' + el.icon + '.png')" alt="">
|
||||||
|
<view class="menu-name">{{el.name}}</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="cancel">
|
|
||||||
<view class="iconfont cancel_icon" @tap="show = false"></view>
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {authority} from '@/utils/getData2.js'
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
menuList: [],
|
userName: '',
|
||||||
|
menuList: [
|
||||||
|
{id: '1', name: '人工组盘', sonTree: [
|
||||||
|
{menu_id: '1', icon: 'RF01', name: '人工组盘', path: '/pages/manage/man-group-disk'}
|
||||||
|
]},
|
||||||
|
{id: '2', name: '原材料库', sonTree: [
|
||||||
|
{menu_id: '1', icon: 'RF02', name: '入库', path: '/pages/manage/in-storage'},
|
||||||
|
{menu_id: '2', icon: 'RF03', name: '出库', path: '/pages/manage/out-storage'}
|
||||||
|
]},
|
||||||
|
{id: '3', name: '任务流转', sonTree: [
|
||||||
|
{menu_id: '1', icon: 'RF04', name: '任务流转', path: '/pages/manage/task-flow'}
|
||||||
|
]}
|
||||||
|
],
|
||||||
show: false,
|
show: false,
|
||||||
secM: []
|
secM: []
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created () {
|
created () {
|
||||||
this._authority()
|
this.$store.dispatch('setPublicObj', '')
|
||||||
|
if (this.$store.getters.userInfo) {
|
||||||
|
this.userName = JSON.parse(this.$store.getters.userInfo).username
|
||||||
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async _authority () {
|
async _authority () {
|
||||||
@@ -53,13 +63,7 @@
|
|||||||
this.menuList = [...res.sonTree]
|
this.menuList = [...res.sonTree]
|
||||||
|
|
||||||
},
|
},
|
||||||
toPage1 (e) {
|
toPage (e) {
|
||||||
if (e.sonTree.length > 0) {
|
|
||||||
this.show = true
|
|
||||||
this.secM = e.sonTree
|
|
||||||
}
|
|
||||||
},
|
|
||||||
toPage2 (e) {
|
|
||||||
let url = e.path
|
let url = e.path
|
||||||
uni.redirectTo({
|
uni.redirectTo({
|
||||||
url: url
|
url: url
|
||||||
@@ -77,19 +81,32 @@
|
|||||||
|
|
||||||
<style lang="stylus">
|
<style lang="stylus">
|
||||||
@import '../../common/style/mixin.styl';
|
@import '../../common/style/mixin.styl';
|
||||||
|
.home_wraper
|
||||||
|
_wh(100%, 100%)
|
||||||
|
overflow hidden
|
||||||
.zd_content
|
.zd_content
|
||||||
padding-top 0
|
padding 0 24rpx
|
||||||
|
height 100%
|
||||||
|
top 0
|
||||||
|
padding-top calc(var(--status-bar-height) + 86rpx)
|
||||||
|
background linear-gradient(to bottom, #fae2ca 0%, #fff5ea 20%, #fdfdfd 100%)
|
||||||
.header
|
.header
|
||||||
height 86rpx
|
position fixed
|
||||||
|
left 0
|
||||||
|
top 0
|
||||||
|
padding-top var(--status-bar-height)
|
||||||
|
z-index 100
|
||||||
|
_wh(100%, calc(var(--status-bar-height) + 86rpx))
|
||||||
|
background-color #f8e6db
|
||||||
_font(36rpx,86rpx,#333,,center)
|
_font(36rpx,86rpx,#333,,center)
|
||||||
.userInfo-wrap
|
.userInfo-wrap
|
||||||
_fj()
|
_fj()
|
||||||
_wh(100%,160rpx)
|
_wh(100%,190rpx)
|
||||||
padding 0 30rpx
|
padding 0 30rpx
|
||||||
background-color $red
|
background-color $red
|
||||||
_bis('../../static/image/info_bg.png',auto,100%,right,bottom)
|
_bis('../../static/image/info_bg.png',auto,100%,right,bottom)
|
||||||
border-radius 12rpx
|
border-radius 12rpx
|
||||||
margin-bottom 20rpx
|
margin-bottom 24rpx
|
||||||
.userInfo
|
.userInfo
|
||||||
_fj(,flex-start,column)
|
_fj(,flex-start,column)
|
||||||
.p1
|
.p1
|
||||||
@@ -99,20 +116,35 @@
|
|||||||
_font(26rpx,1,#fff)
|
_font(26rpx,1,#fff)
|
||||||
.exit
|
.exit
|
||||||
_fj()
|
_fj()
|
||||||
height 47rpx
|
height 50rpx
|
||||||
padding 0 15rpx
|
padding 0 20rpx
|
||||||
border 1px solid #FF967C
|
border 1px solid #FF967C
|
||||||
border-radius 20rpx
|
border-radius 20rpx
|
||||||
.icon-exit
|
.icon-exit
|
||||||
_wh(22rpx, 22rpx)
|
_wh(22rpx, 22rpx)
|
||||||
_bis('../../static/image/exit.png',22rpx)
|
_bis('../../static/image/exit.png',22rpx)
|
||||||
.exit-text
|
.exit-text
|
||||||
_font(24rpx,47rpx,#fff,,right)
|
_font(32rpx,50rpx,#fff,,right)
|
||||||
padding-left 10rpx
|
padding-left 10rpx
|
||||||
.menu-wrap
|
.zd_home_wrapper
|
||||||
|
_wh(100%, calc(100% - 238rpx))
|
||||||
|
margin-bottom 24rpx
|
||||||
|
overflow-y scroll
|
||||||
|
.menus_wrap
|
||||||
|
width 100%
|
||||||
|
background-color #fff
|
||||||
|
border-radius: 12rpx;
|
||||||
|
padding: 14rpx;
|
||||||
|
margin-bottom 24rpx
|
||||||
|
box-shadow: 0 4rpx 10rpx 4rpx rgba(0,0,0,.1);
|
||||||
|
.fir_menu_wrap
|
||||||
|
_wh(100%, 68rpx)
|
||||||
|
.fir_menu_title
|
||||||
|
_font(36rpx, 68rpx, #333, bold,)
|
||||||
|
.sec_menu_wrap
|
||||||
_fj(flex-start,flex-start,,wrap)
|
_fj(flex-start,flex-start,,wrap)
|
||||||
align-content: flex-start
|
align-content: flex-start
|
||||||
.menu-item
|
.sec_menu-item
|
||||||
_fj()
|
_fj()
|
||||||
flex-direction column
|
flex-direction column
|
||||||
_wh(30%, auto)
|
_wh(30%, auto)
|
||||||
@@ -130,41 +162,4 @@
|
|||||||
margin 0 auto 0.2rpx
|
margin 0 auto 0.2rpx
|
||||||
.menu-name
|
.menu-name
|
||||||
_font(28rpx, 38rpx, #444,,center)
|
_font(28rpx, 38rpx, #444,,center)
|
||||||
.sec_menu_wraper
|
|
||||||
position fixed
|
|
||||||
top 0
|
|
||||||
left 0
|
|
||||||
_wh(100%, 100%)
|
|
||||||
background-color rgba(0, 0, 0, .9)
|
|
||||||
z-index 2017
|
|
||||||
flex-direction column
|
|
||||||
.sec_menu_w
|
|
||||||
_fj()
|
|
||||||
_wh(100%, calc(100% - 100rpx))
|
|
||||||
padding 0 24rpx
|
|
||||||
flex-wrap wrap
|
|
||||||
align-content center
|
|
||||||
&::after
|
|
||||||
content ''
|
|
||||||
display block
|
|
||||||
_wh(30%,0)
|
|
||||||
.sec_menu-col
|
|
||||||
background-color transparent
|
|
||||||
border none
|
|
||||||
height auto
|
|
||||||
.sec_menu-col_inner
|
|
||||||
_fj(center)
|
|
||||||
_wh(160rpx, 160rpx)
|
|
||||||
border-radius 50%
|
|
||||||
background-color $yellow
|
|
||||||
margin 0 auto
|
|
||||||
.menu-name_inner
|
|
||||||
color #fff
|
|
||||||
padding 0 20rpx
|
|
||||||
.cancel
|
|
||||||
_wh(100%, 100rpx)
|
|
||||||
padding 0 24rpx
|
|
||||||
overflow hidden
|
|
||||||
background-color rgba(255, 255, 255, .3)
|
|
||||||
box-shadow 0 1rpx 4rpx 0 rgba(160,160,160,0.9)
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="zd_content bg">
|
<view class="zd_content bg">
|
||||||
<view class="p1">欢迎来到</view>
|
<view class="p1">欢迎来到</view>
|
||||||
<view class="p2">海亮铜箔手持系统!</view>
|
<view class="p2">上电科上海航天自动化物流系统!</view>
|
||||||
<view class="input-box">
|
<view class="input-box">
|
||||||
<input class="large-input" type="text" placeholder="请输入用户名" v-model="user">
|
<input class="large-input" type="text" placeholder="请输入用户名" v-model="user">
|
||||||
</view>
|
</view>
|
||||||
@@ -145,11 +145,11 @@
|
|||||||
<style lang="stylus" scoped>
|
<style lang="stylus" scoped>
|
||||||
@import '../../common/style/mixin.styl';
|
@import '../../common/style/mixin.styl';
|
||||||
.p1
|
.p1
|
||||||
_font(60rpx,75rpx,#444)
|
_font(40rpx,75rpx,#444,666)
|
||||||
padding-top: 90rpx
|
padding-top: 90rpx
|
||||||
.p2
|
.p2
|
||||||
_font(50rpx,1,#444)
|
_font(46rpx,1,#444,600)
|
||||||
padding: 40rpx 0 25rpx
|
padding: 10rpx 0 55rpx 0
|
||||||
.input-box
|
.input-box
|
||||||
_fj()
|
_fj()
|
||||||
margin-top 68rpx
|
margin-top 68rpx
|
||||||
@@ -183,7 +183,12 @@
|
|||||||
background-color $red
|
background-color $red
|
||||||
.zd_content
|
.zd_content
|
||||||
position: relative
|
position: relative
|
||||||
|
top 0
|
||||||
height: 100%
|
height: 100%
|
||||||
|
padding-left 40rpx
|
||||||
|
padding-right 40rpx
|
||||||
|
background linear-gradient(to bottom, #f8e6db 0%, #f6f6f6 30%, #f6f6f6 100%)
|
||||||
|
overflow: hidden
|
||||||
.version-name
|
.version-name
|
||||||
width 100%
|
width 100%
|
||||||
position: absolute
|
position: absolute
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
<view class="content-header"></view>
|
<view class="content-header"></view>
|
||||||
<view class="content-body">
|
<view class="content-body">
|
||||||
<view class="title">
|
<view class="title">
|
||||||
<text>海亮铜箔又有新版本了,升级到最新版本,享受更丰富、稳定、快速的功能和体验!</text>
|
<text>上电科上海航天自动化物流系统又有新版本了,升级到最新版本,享受更丰富、稳定、快速的功能和体验!</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="footer flex-center">
|
<view class="footer flex-center">
|
||||||
<template>
|
<template>
|
||||||
|
|||||||
Reference in New Issue
Block a user