登录、导航页

This commit is contained in:
2024-02-22 09:03:21 +08:00
parent 47aa1438c3
commit c9acd9b2ed
6 changed files with 399 additions and 202 deletions

View File

@@ -3,7 +3,7 @@
onLaunch: function() { onLaunch: function() {
// #ifdef APP-PLUS // #ifdef APP-PLUS
plus.screen.lockOrientation('portrait-primary'); plus.screen.lockOrientation('portrait-primary');
plus.navigator.setFullscreen(true); // plus.navigator.setFullscreen(true);
// #endif // #endif
}, },
onHide: function() { onHide: function() {

View File

@@ -1,10 +1,9 @@
page { page {
background-color: #f6f6f6 !important; background-color: #f2f5fa !important;
min-height: 100% !important; min-height: 100% !important;
height: 100% !important; height: 100% !important;
} }
uni-page-body { uni-page-body {
background-color: #f6f6f6 !important;
min-height: 100% !important; min-height: 100% !important;
height: 100% !important; height: 100% !important;
} }
@@ -44,6 +43,19 @@ uni-button:after {
color: #ff6a00; color: #ff6a00;
border: 1rpx solid #ff6a00; border: 1rpx solid #ff6a00;
} }
.icon_choosed {
position: absolute;
bottom: 0;
right: 0;
padding: 4rpx 10rpx;
line-height: 20rpx;
font-size: 20rpx;
color: #fff;
border: 1rpx solid #ff6a00;
background-color: #ff6a00;
border-top-left-radius: 10rpx;
border-bottom-right-radius: 10rpx;
}
.icon_back { .icon_back {
font-size: 52rpx; font-size: 52rpx;
line-height: 52rpx; line-height: 52rpx;
@@ -86,17 +98,36 @@ uni-button:after {
line-height: 48rpx; line-height: 48rpx;
} }
.cancel_icon::before { .cancel_icon::before {
content: "\e6dc"; content: "\e6db";
} }
.cancel_icon { .cancel_icon {
display: block; display: block;
width: 100rpx; width: 60rpx;
height: 100rpx; height: 60rpx;
font-size: 50rpx; font-size: 40rpx;
color: #fff; color: #000;
line-height: 100rpx; line-height: 60rpx;
text-align: center; text-align: center;
background-color: #E9B451; border: 1px solid #999;
border-radius: 50%;
transform: rotate(-90deg);
}
.icon_start_point {
width: 46rpx;
height: 46rpx;
font-size: 26rpx;
line-height: 46rpx;
background-color: #ff6a00;
color: #fff;
border-radius: 50%;
}
.icon_vdash_line {
width: 46rpx;
height: 26rpx;
font-size: 26rpx;
line-height: 26rpx;
text-align: center;
color: #ff6a00;
} }
/** 内容 */ /** 内容 */
@@ -105,17 +136,22 @@ uni-button:after {
height: 100%; height: 100%;
} }
.zd_content { .zd_content {
position: relative;
top: calc(var(--status-bar-height) + 72rpx);
width: 100%; width: 100%;
height: auto; height: auto;
padding: 92rpx 15rpx 82rpx 14rpx; padding: 20rpx 14rpx 140rpx 14rpx;
/* background: linear-gradient(to bottom, #ff6400 0%, #fee4d7 30%, #f6f6f6 100%) */
background-color: #f6f6f6;
} }
.zd_wrapper { .zd_wrapper {
width: 100%; width: 100%;
height: auto; height: auto;
background-color: #fff; background-color: #fff;
border-radius: 24rpx; border-radius: 24rpx;
padding: 14rpx; padding: 22rpx 14rpx;
margin-bottom: 20rpx; margin-bottom: 20rpx;
box-shadow: 0 4rpx 10rpx 2rpx rgba(0,0,0,.1);
} }
.filter_item { .filter_item {
display: flex; display: flex;
@@ -139,6 +175,7 @@ uni-button:after {
line-height: 80rpx; line-height: 80rpx;
font-size: 28rpx; font-size: 28rpx;
color: #323232; color: #323232;
font-weight: bold;
text-align:justify; text-align:justify;
text-align-last: justify; text-align-last: justify;
text-justify: inter-ideograph;/*兼容ie*/ text-justify: inter-ideograph;/*兼容ie*/
@@ -180,7 +217,6 @@ uni-button:after {
line-height: 30rpx; line-height: 30rpx;
font-size: 28rpx; font-size: 28rpx;
color: #606266; color: #606266;
margin-left: 10rpx;
} }
.filter_input { .filter_input {
width: 100%; width: 100%;
@@ -193,17 +229,6 @@ uni-button:after {
color: #606266; color: #606266;
border-radius: 10rpx; border-radius: 10rpx;
} }
.filter_textarea {
width: 100%;
height: 210rpx;
line-height: 70rpx;
border: 1px solid #dcdfe6;
background-color: #fff;
padding: 0 15rpx;
font-size: 28rpx;
color: #606266;
border-radius: 10rpx;
}
.filter_input_disabled { .filter_input_disabled {
background-color: #eee; background-color: #eee;
} }
@@ -258,7 +283,8 @@ uni-button:after {
background: #fff; background: #fff;
} }
.slide_new table tbody tr.checked td { .slide_new table tbody tr.checked td {
background-color: #fef6e4; background-color: #f2f2f2;
color: #000
} }
/** 提交栏 **/ /** 提交栏 **/
@@ -273,25 +299,97 @@ uni-button:after {
width: 100%; width: 100%;
z-index: 200; z-index: 200;
background-color: #fff; background-color: #fff;
padding-top: 10rpx; padding-top: 20rpx;
box-shadow: 0 0 20rpx 0 rgba(160,160,160,0.7);
}
.submit-bar_new {
display: flex;
justify-content: space-between;
align-items: center;
position: fixed;
bottom: 0;
left: 0;
width: 100%;
z-index: 200;
background-color: #fff;
padding: 14rpx;
box-shadow: 0 0 20rpx 0 rgba(160,160,160,0.7); box-shadow: 0 0 20rpx 0 rgba(160,160,160,0.7);
} }
.submit-button { .submit-button {
font-size: 30rpx; font-size: 34rpx;
line-height: 62rpx; line-height: 88rpx;
color: #ff6a00; color: #ff6a00;
text-align: center; text-align: center;
letter-spacing: 1rpx; letter-spacing: 1rpx;
padding: 0 22rpx; padding: 0 22rpx;
background-color: #fff; background-color: #fff;
border: 1px solid #ff6a00; border: 1px solid #ff6a00;
margin: 0 40rpx 10rpx 0; margin: 0 40rpx 20rpx 0;
border-radius: 30rpx; border-radius: 10rpx;
}
.submit-button_new {
/* width: 35%; */
font-size: 34rpx;
line-height: 88rpx;
color: #fff;
text-align: center;
letter-spacing: 1rpx;
padding: 0;
background-color: #ff6a00;
border-radius: 10rpx;
}
.submit-more {
width: 20%;
font-size: 34rpx;
line-height: 34rpx;
padding: 27rpx 10rpx;
color: #000;
text-align: center;
background-color: #fff
} }
.btn-disabled, .submit-button[disabled] { .btn-disabled, .submit-button[disabled] {
background-color: #c9c9c9; background-color: #c9c9c9 !important;
border: 1px solid #c9c9c9; border: 1px solid #c9c9c9 !important;
color: #fff; color: #fff !important;
}
.more_btns_wraper {
position: fixed;
bottom: 0;
left: 0;
width: 100%;
z-index: 201;
padding: 0 20rpx 20rpx;
transition: all .3s;
}
.more-button {
font-size: 34rpx;
line-height: 88rpx;
color: #ff6a00;
text-align: center;
border-radius: 0;
background-color: transparent;
}
.more_btns_items .btn-disabled, .more_btns_items .submit-button_new[disabled] {
color: #c9c9c9;
border: none;
}
.more-button:last-child {
border-bottom: none;
}
.more_btns_cancle {
margin-top: 20rpx;
width: 100%;
font-size: 34rpx;
line-height: 88rpx;
color: #000;
text-align: center;
background-color: #fff;
border-radius: 20rpx;
}
.more_btns_items{
width: 100%;
border-radius: 20rpx;
background-color: #fff;
} }
/** 下拉框 */ /** 下拉框 */
@@ -300,32 +398,28 @@ uni-button:after {
} }
/** 弹窗 */ /** 弹窗 */
.popshow {
transform: translateY(0);
}
.pophide {
transform: translateY(100%);
}
.msg_wrapper { .msg_wrapper {
position: fixed; position: fixed;
top: 0;
bottom: 0; bottom: 0;
left: 0; left: 0;
right: 0; width: 100%;
text-align: center; padding: 60rpx 28rpx;
z-index: 201;
display: flex;
justify-content: center;
align-items: center;
}
.msg_wrapper_1 {
text-align: left;
}
.msg_box {
width: 90%;
padding: 20rpx;
background-color: #fff; background-color: #fff;
border-radius: 4px; box-shadow: 0 -8px 16px 0 rgba(28,31,33,.1);
border: 1px solid #ebeef5; border-top-left-radius: 20rpx;
box-shadow: 0 2px 12px 0 rgb(0 0 0 / 10%); border-top-right-radius: 20rpx;
backface-visibility: hidden; z-index: 301;
transition: all .3s;
}
.msg_box {
width: 100%;
} }
.msg_mask { .msg_mask {
position: fixed; position: fixed;
top: 0; top: 0;
@@ -334,19 +428,29 @@ uni-button:after {
height: 100%; height: 100%;
opacity: .7; opacity: .7;
background: #000; background: #000;
z-index: 200; z-index: 300;
} }
.msg_btns { .msg_btns {
width: 100%; width: 100%;
max-width: 300px;
margin: 40rpx auto 0; margin: 40rpx auto 0;
display: flex;
justify-content: space-between;
align-items: center;
} }
.msg_btn { .msg_btn {
border-radius: 10rpx; font-size: 34rpx;
line-height: 78rpx;
color: #fff;
background-color: #ff6a00;
border: 1rpx solid #ff6a00;
border-radius: 44rpx;
box-shadow: 0 8rpx 18rpx 0 rgba(0,0,0,.2);
}
.msg_btn_cancle {
background-color: #fff;
border: 1rpx solid #ff6a00;
font-size: 34rpx;
line-height: 78rpx;
border-radius: 44rpx;
color: #000;
box-shadow: 0 8rpx 18rpx 0 rgba(0,0,0,.2);
} }
.msg_btn:disabled { .msg_btn:disabled {
background-color: #c9c9c9; background-color: #c9c9c9;
@@ -368,3 +472,41 @@ uni-button:after {
color: #8a8a8a; color: #8a8a8a;
border: 1px solid #ffffff; border: 1px solid #ffffff;
} }
.flow_wrapper {
width: 100%;
background-color: #fff;
border-radius: 24rpx;
padding: 22rpx 20rpx;
margin-bottom: 20rpx;
box-shadow: 0 4rpx 10rpx 2rpx rgba(0,0,0,.1);
}
.font-size-1 {
font-size: 30rpx;
line-height: 54rpx;
color: #ff6a00;
}
.font-size-2 {
font-size: 30rpx;
line-height: 54rpx;
color: #000;
}
.flow_start_item {
position: relative;
background-color: #f3f3f3;
border: 1rpx solid #f3f3f3;
border-radius: 10rpx;
}
.flow_start_item_checked {
position: relative;
background-color: #fff;
border: 1rpx solid #ff6a00;
}
.flow_icon_item_1 {
width: 46rpx;
height: 56rpx;
}
.flow_icon_item_2 {
width: 46rpx;
height: 26rpx;
}

View File

@@ -41,3 +41,102 @@ input[type="button"], input[type="submit"], input[type="search"], input[type="re
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
} }
.flexcol {
flex-direction: column;
}
.flexstart {
align-items: flex-start !important;
}
.jcflexstart {
justify-content: flex-start !important;
}
.zd-row {
display: flex;
justify-content: space-between;
align-items: center;
}
.zd-col-24 {
width: 100%;
}
.zd-col-23 {
width: 95.83333%
}
.zd-col-22 {
width: 91.66667%
}
.zd-col-21 {
width: 87.5%
}
.zd-col-20 {
width: 83.33333%
}
.zd-col-19 {
width: 79.16667%
}
.zd-col-18 {
width: 75%
}
.zd-col-17 {
width: 70.83333%
}
.zd-col-16 {
width: 66.66667%
}
.zd-col-15 {
width: 62.5%
}
.zd-col-14 {
width: 58.33333%
}
.zd-col-13 {
width: 54.16667%
}
.zd-col-12 {
width: 50%;
}
.zd-col-11 {
width: 45.83333%
}
.zd-col-10 {
width: 41.66667%
}
.zd-col-9 {
width: 37.5%
}
.zd-col-8 {
width: 33.33333%
}
.zd-col-7 {
width: 29.16667%
}
.zd-col-6 {
width: 25%
}
.zd-col-5 {
width: 20.83333%
}
.zd-col-4 {
width: 16.66667%
}
.zd-col-3 {
width: 12.5%
}
.zd-col-2 {
width: 8.33333%
}
.zd-col-1 {
width: 4.16667%
}
.mgb10 {
margin-bottom: 10rpx;
}
.pdl20 {
padding-left: 20rpx;
}
.pdr20 {
padding-right: 20rpx;
}
.pdr10 {
padding-right: 10rpx;
}

View File

@@ -131,8 +131,8 @@
], ],
"globalStyle": { "globalStyle": {
// "pageOrientation": "landscape", // "pageOrientation": "landscape",
"navigationBarTextStyle": "white", "navigationBarTextStyle": "black",
"navigationBarTitleText": "uni-app", "navigationBarTitleText": "",
"navigationBarBackgroundColor": "#d7592f", "navigationBarBackgroundColor": "#d7592f",
"backgroundColor": "#ffffff" "backgroundColor": "#ffffff"
}, },

View File

@@ -1,35 +1,31 @@
<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">{{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.icon + '.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>
@@ -39,59 +35,35 @@
data() { data() {
return { return {
userName: '', userName: '',
// menuList: [
// {menu_id: '1', icon: 'RF01', name: '设备点检', path: '/pages/modules/equip-inspection', sonTree: []},
// {menu_id: '2', icon: 'RF02', name: '设备操作', path: '/pages/modules/equip-operate', sonTree: []},
// {menu_id: '3', icon: 'RF03', name: '人工分拣', path: '', sonTree: [
// {menu_id: '1', name: '分拣排产', path: '/pages/modules/sort-schedue'},
// {menu_id: '2', name: '剩料入库', path: '/pages/modules/surplus-mater-instore'},
// {menu_id: '3', name: '托盘绑定', path: '/pages/modules/pallet-bind'},
// {menu_id: '4', name: '包装入库', path: '/pages/modules/package-instore'},
// ]},
// {menu_id: '4', icon: 'RF05', name: '人工组盘', path: '/pages/modules/man-group', sonTree: []},
// {menu_id: '5', icon: 'RF06', name: '混碾搬运', path: '/pages/modules/hunnian-carry', sonTree: []},
// {menu_id: '6', icon: 'RF07', name: '强制静置', path: '/pages/modules/forced-rest', sonTree: []}
// ],
menuList: [ menuList: [
{menu_id: '1', icon: 'RF06', name: '混碾搬运', path: '/pages/modules/hunnian-carry', sonTree: []}, {id: '1', name: '人工组盘', sonTree: [
{menu_id: '2', icon: 'RF07', name: '强制静置', path: '/pages/modules/forced-rest', sonTree: []}, {menu_id: '1', icon: 'RF01', name: '人工组盘', path: '/pages/manage/man-group-disk'}
{menu_id: '3', icon: 'RF01', name: '设备点检', path: '/pages/modules/equip-inspection', sonTree: []},
{menu_id: '4', icon: 'RF05', name: '人工组盘', path: '/pages/modules/man-group', sonTree: []},
{menu_id: '5', icon: 'RF09', name: '人工分拣', path: '', sonTree: [
{menu_id: '1', name: '分拣排产', path: '/pages/modules/sort-schedue'},
{menu_id: '2', name: '剩料入库', path: '/pages/modules/surplus-mater-instore'},
{menu_id: '3', name: '托盘绑定', path: '/pages/modules/pallet-bind'},
{menu_id: '4', name: '包装入库', path: '/pages/modules/package-instore'},
{menu_id: '5', name: '呼叫满料', path: '/pages/modules/call-full-mater'},
{menu_id: '6', name: '呼叫木盘', path: '/pages/modules/call-mupan'},
{menu_id: '7', name: '空盘入库', path: '/pages/modules/empty-instore'}
]}, ]},
{menu_id: '6', icon: 'RF10', name: '压机搬运', path: '/pages/modules/press-carry', sonTree: []}, {id: '2', name: '原材料库', sonTree: [
{menu_id: '7', icon: 'RF08', name: '货架盘点', path: '/pages/modules/shelf-check', sonTree: []}, {menu_id: '1', icon: 'RF02', name: '入库', path: '/pages/manage/in-storage'},
{menu_id: '8', icon: 'RF02', name: '混碾操作', path: '/pages/modules/hunnian-operate', sonTree: []} {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.$store.dispatch('setPublicObj', '')
if (this.$store.getters.userInfo) { if (this.$store.getters.userInfo) {
this.userName = JSON.parse(this.$store.getters.userInfo).username this.userName = JSON.parse(this.$store.getters.userInfo).username
} }
}, },
methods: { methods: {
toPage1 (e) { async _authority () {
if (e.sonTree.length > 0) { let res = await authority()
this.show = true this.menuList = [...res.sonTree]
this.secM = e.sonTree
} else {
let url = e.path
uni.redirectTo({
url: url
})
}
}, },
toPage2 (e) { toPage (e) {
let url = e.path let url = e.path
uni.redirectTo({ uni.redirectTo({
url: url url: url
@@ -109,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
@@ -131,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)
@@ -162,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>

View File

@@ -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>
@@ -18,14 +18,12 @@
<text class="setup-text" @tap="isUpdate">升级版本</text> <text class="setup-text" @tap="isUpdate">升级版本</text>
</view> </view>
<button class="login-btn" :disabled="disabled" @tap="toLogin">确认登录</button> <button class="login-btn" :disabled="disabled" @tap="toLogin">确认登录</button>
<!-- <button class="login-btn" @tap="test">打印</button> -->
<view v-if="version !== ''" class="version-name">v{{version}}</view> <view v-if="version !== ''" class="version-name">v{{version}}</view>
<Up-grade v-if="grade === true" @closeUpdate="closeUpdate" :androidUrl="androidUrl"></up-grade> <Up-grade v-if="grade === true" @closeUpdate="closeUpdate" :androidUrl="androidUrl"></up-grade>
</view> </view>
</template> </template>
<script> <script>
// import {getCLodop, getPrinterList} from "@/utils/CLodopfuncs.js"
import { RSAencrypt } from '@/utils/jsencrypt.js' import { RSAencrypt } from '@/utils/jsencrypt.js'
import {handLogin, pdaUpdate} from '@/utils/getData2.js' import {handLogin, pdaUpdate} from '@/utils/getData2.js'
import UpGrade from './upgrade.vue' import UpGrade from './upgrade.vue'
@@ -50,7 +48,7 @@
//#ifdef APP-PLUS //#ifdef APP-PLUS
// 获取本地应用资源版本号 // 获取本地应用资源版本号
plus.runtime.getProperty(plus.runtime.appid, (info) => { plus.runtime.getProperty(plus.runtime.appid, (info) => {
console.log(JSON.stringify(info)); // console.log(JSON.stringify(info));
this.version = info.version; this.version = info.version;
this.versionCode = info.versionCode ; this.versionCode = info.versionCode ;
}) })
@@ -60,18 +58,6 @@
isUpdate () { isUpdate () {
this._pdaUpdate() this._pdaUpdate()
}, },
// test() {
// let LODOP = getCLodop();
// // 更换为打印服务器ip 不需要加前缀
// LODOP.PRINT_INIT(null, "192.168.81.198");
// // 打印机序号 规则为打印服务器打印机列表倒数从0开始 -1为默认打印机
// LODOP.SET_PRINTER_INDEX(-1);
// // 设置打印纸大小
// LODOP.SET_PRINT_PAGESIZE(1, 800, 600, "");
// // 根据需求插入打印代码
// LODOP.PRINT(); // 打印
// // LODOP.PREVIEW()
// },
toSaveUser() { toSaveUser() {
this.saveUser = !this.saveUser this.saveUser = !this.saveUser
}, },
@@ -123,15 +109,17 @@
}, },
async _pdaUpdate () { async _pdaUpdate () {
let res = await pdaUpdate() let res = await pdaUpdate()
if (res.versionName === this.version) { // if (res.versionName === this.version) {
uni.showToast({ // uni.showToast({
title: '当前为最新版本', // title: '当前为最新版本',
icon: 'none' // icon: 'none'
}) // })
} else { // } else {
this.grade = true // this.grade = true
this.androidUrl = res.url // this.androidUrl = res.url
} // }
this.grade = true
this.androidUrl = res.url
}, },
closeUpdate () { closeUpdate () {
this.grade = false this.grade = false
@@ -143,11 +131,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: 190rpx
.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
@@ -181,7 +169,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-color: #fff
overflow: hidden
.version-name .version-name
width 100% width 100%
position: absolute position: absolute