4个页面
This commit is contained in:
@@ -6,26 +6,24 @@
|
||||
<input class="large-input" type="text" placeholder="请输入用户名" v-model="user">
|
||||
</view>
|
||||
<div class="input-box">
|
||||
<input class="large-input" :password="!showPassword" placeholder="请输入密码" v-model="password">
|
||||
<span class="iconfont icon_eye_close" :class="[showPassword ? 'icon_eye_active' : '']" @tap="changePassword"></span>
|
||||
<input class="large-input" :password="!showPassword" placeholder="请输入密码" v-model="password" autocomplete=“off”>
|
||||
<uni-icons :type="showPassword ? 'eye-filled' : 'eye'" size="20" :color="showPassword ? '#ff6a00' : '#999'" @tap="showPassword = !showPassword"></uni-icons>
|
||||
</div>
|
||||
<view class="radio-box">
|
||||
<view class="radio-wrap">
|
||||
<span class="iconfont icon_unchecked" :class="{'icon_checked': saveUser}" @tap="toSaveUser"></span>
|
||||
<text class="radio-label">记住用户名</text>
|
||||
<view class="zd-row radio-box">
|
||||
<view class="zd-col-2 zd-row jccenter radio-icon-wrap" :class="{'radio-icon-wrap_checked': saveUser}" @tap="toSaveUser">
|
||||
<uni-icons type="checkmarkempty" size="14" :color="saveUser ? '#ff6a00' : '#fff'"></uni-icons>
|
||||
</view>
|
||||
<text class="setup-text" @tap="setup">设置</text>
|
||||
<text class="setup-text" @tap="isUpdate">升级版本</text>
|
||||
<view class="zd-col-13 radio-label">记住用户名</view>
|
||||
<view class="zd-col-4 setup-text" @tap="setup">设置</view>
|
||||
<view class="zd-col-5 setup-text" @tap="isUpdate">升级版本</view>
|
||||
</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,24 +58,9 @@
|
||||
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
|
||||
},
|
||||
changePassword() {
|
||||
this.showPassword = !this.showPassword
|
||||
},
|
||||
setup () {
|
||||
uni.redirectTo({
|
||||
url: '/pages/login/setup'
|
||||
@@ -123,15 +106,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,34 +128,34 @@
|
||||
<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(44rpx,1,#444,600)
|
||||
padding: 10rpx 0 55rpx 0
|
||||
.input-box
|
||||
_fj()
|
||||
margin-top 68rpx
|
||||
height 75rpx
|
||||
border-bottom 1rpx solid #e2e2e2
|
||||
.large-input
|
||||
_wh(calc(100% - 40rpx), 74rpx)
|
||||
_wh(calc(100% - 100rpx), 74rpx)
|
||||
_font(32rpx,74rpx,#999)
|
||||
padding-left 10rpx
|
||||
.radio-box
|
||||
_fj()
|
||||
margin: 25rpx 0 70rpx 0
|
||||
height: 34rpx
|
||||
.radio-wrap
|
||||
_fj(flex-start)
|
||||
height: 34rpx
|
||||
flex: 2
|
||||
margin 25rpx 0 70rpx 0
|
||||
.radio-icon-wrap
|
||||
_wh(34rpx, 34rpx)
|
||||
border 1rpx solid #999
|
||||
border-radius 4rpx
|
||||
text-align center
|
||||
line-height 40rpx
|
||||
.radio-icon-wrap_checked
|
||||
border-color $red
|
||||
.radio-label
|
||||
_font(28rpx, 28rpx,#333)
|
||||
padding-left: 10rpx
|
||||
.setup-text
|
||||
_font(28rpx, 28rpx,$red,,right)
|
||||
padding-left 25rpx
|
||||
.bg
|
||||
background-color: #fff;
|
||||
_bis('../../static/image/login_bg.png', 100%,,bottom)
|
||||
@@ -181,7 +166,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
|
||||
|
||||
Reference in New Issue
Block a user