home
This commit is contained in:
@@ -1,23 +1,23 @@
|
||||
<template>
|
||||
<view class="zd_content bg">
|
||||
<view class="p1">欢迎来到</view>
|
||||
<view class="p2">海亮铜箔手持系统!</view>
|
||||
<view class="p1">{{$t('login.text1')}}</view>
|
||||
<view class="p2">{{$t('login.text2')}}</view>
|
||||
<view class="input-box">
|
||||
<input class="large-input" type="text" placeholder="请输入用户名" v-model="user">
|
||||
<input class="large-input" type="text" :placeholder="$t('login.username')" v-model="user">
|
||||
</view>
|
||||
<div class="input-box">
|
||||
<input class="large-input" :password="!showPassword" placeholder="请输入密码" v-model="password">
|
||||
<input class="large-input" :password="!showPassword" :placeholder="$t('login.password')" v-model="password">
|
||||
<span class="iconfont icon_eye_close" :class="[showPassword ? 'icon_eye_active' : '']" @tap="changePassword"></span>
|
||||
</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>
|
||||
<text class="radio-label">{{$t('login.remember')}}</text>
|
||||
</view>
|
||||
<text class="setup-text" @tap="setup">设置</text>
|
||||
<text class="setup-text" @tap="isUpdate">升级版本</text>
|
||||
<text class="setup-text" @tap="setup">{{$t('login.settings')}}</text>
|
||||
<text class="setup-text" @tap="isUpdate">{{$t('login.upgrade')}}</text>
|
||||
</view>
|
||||
<button class="login-btn" :disabled="disabled" @tap="toLogin">确认登录</button>
|
||||
<button class="login-btn" :disabled="disabled" @tap="toLogin">{{$t('login.login')}}</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>
|
||||
@@ -50,7 +50,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 ;
|
||||
})
|
||||
@@ -84,23 +84,23 @@
|
||||
})
|
||||
},
|
||||
async toLogin() {
|
||||
// uni.redirectTo({
|
||||
// url: '/pages/home/home'
|
||||
// })
|
||||
uni.redirectTo({
|
||||
url: '/pages/home/home'
|
||||
})
|
||||
this.disabled = true
|
||||
if (this.user === '') {
|
||||
uni.showToast({
|
||||
title: '用户名不能为空',
|
||||
icon: 'none'
|
||||
})
|
||||
// uni.showToast({
|
||||
// title: '用户名不能为空',
|
||||
// icon: 'none'
|
||||
// })
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
if (this.password === '') {
|
||||
uni.showToast({
|
||||
title: '密码不能为空',
|
||||
icon: 'none'
|
||||
})
|
||||
// uni.showToast({
|
||||
// title: '密码不能为空',
|
||||
// icon: 'none'
|
||||
// })
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
@@ -145,11 +145,11 @@
|
||||
<style lang="stylus" scoped>
|
||||
@import '../../common/style/mixin.styl';
|
||||
.p1
|
||||
_font(60rpx,75rpx,#444)
|
||||
_font(40rpx,75rpx,#444,666)
|
||||
padding-top: 90rpx
|
||||
.p2
|
||||
_font(50rpx,1,#444)
|
||||
padding: 40rpx 0 25rpx
|
||||
_font(52rpx,1,#444,600)
|
||||
padding: 10rpx 0 55rpx 0
|
||||
.input-box
|
||||
_fj()
|
||||
margin-top 68rpx
|
||||
@@ -171,21 +171,24 @@
|
||||
_font(28rpx, 28rpx,#333)
|
||||
padding-left: 10rpx
|
||||
.setup-text
|
||||
_font(28rpx, 28rpx,$red3,,right)
|
||||
_font(28rpx, 28rpx,$red,,right)
|
||||
padding-left 25rpx
|
||||
.bg
|
||||
background-color: #fff;
|
||||
padding-left: 30rpx;
|
||||
padding-right: 30rpx;
|
||||
_bis('../../static/image/login_bg.png', 100%,,bottom)
|
||||
.login-btn
|
||||
width 100%
|
||||
border-radius 46rpx
|
||||
_font(36rpx,92rpx,#fff,,center)
|
||||
background linear-gradient(45deg, $red1, $red2)
|
||||
background-color $red
|
||||
.zd_content
|
||||
position: relative
|
||||
top 0
|
||||
height: 100%
|
||||
padding-left 40rpx
|
||||
padding-right 40rpx
|
||||
background linear-gradient(to bottom, #f8e6db 0%, #f6f6f6 30%, #f6f6f6 100%)
|
||||
overflow: hidden
|
||||
.version-name
|
||||
width 100%
|
||||
position: absolute
|
||||
|
||||
Reference in New Issue
Block a user