登录、导航页

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

@@ -1,7 +1,7 @@
<template>
<view class="zd_content bg">
<view class="p1">欢迎来到</view>
<view class="p2">瑞泰马钢手持系统</view>
<view class="p2">信丰天能手持系统</view>
<view class="input-box">
<input class="large-input" type="text" placeholder="请输入用户名" v-model="user">
</view>
@@ -18,14 +18,12 @@
<text class="setup-text" @tap="isUpdate">升级版本</text>
</view>
<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>
<Up-grade v-if="grade === true" @closeUpdate="closeUpdate" :androidUrl="androidUrl"></up-grade>
</view>
</template>
<script>
// import {getCLodop, getPrinterList} from "@/utils/CLodopfuncs.js"
import { RSAencrypt } from '@/utils/jsencrypt.js'
import {handLogin, pdaUpdate} from '@/utils/getData2.js'
import UpGrade from './upgrade.vue'
@@ -50,7 +48,7 @@
//#ifdef APP-PLUS
// 获取本地应用资源版本号
plus.runtime.getProperty(plus.runtime.appid, (info) => {
console.log(JSON.stringify(info));
// console.log(JSON.stringify(info));
this.version = info.version;
this.versionCode = info.versionCode ;
})
@@ -60,18 +58,6 @@
isUpdate () {
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() {
this.saveUser = !this.saveUser
},
@@ -123,15 +109,17 @@
},
async _pdaUpdate () {
let res = await pdaUpdate()
if (res.versionName === this.version) {
uni.showToast({
title: '当前为最新版本',
icon: 'none'
})
} else {
this.grade = true
this.androidUrl = res.url
}
// if (res.versionName === this.version) {
// uni.showToast({
// title: '当前为最新版本',
// icon: 'none'
// })
// } else {
// this.grade = true
// this.androidUrl = res.url
// }
this.grade = true
this.androidUrl = res.url
},
closeUpdate () {
this.grade = false
@@ -143,11 +131,11 @@
<style lang="stylus" scoped>
@import '../../common/style/mixin.styl';
.p1
_font(60rpx,75rpx,#444)
padding-top: 90rpx
_font(40rpx,75rpx,#444,666)
padding-top: 190rpx
.p2
_font(50rpx,1,#444)
padding: 40rpx 0 25rpx
_font(46rpx,1,#444,600)
padding: 10rpx 0 55rpx 0
.input-box
_fj()
margin-top 68rpx
@@ -181,7 +169,12 @@
background-color $red
.zd_content
position: relative
top 0
height: 100%
padding-left 40rpx
padding-right 40rpx
background-color: #fff
overflow: hidden
.version-name
width 100%
position: absolute