国际化
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.enterusername')" v-model="user">
|
||||
</view>
|
||||
<div class="input-box">
|
||||
<input class="large-input" :password="!showPassword" placeholder="请输入密码" v-model="password" autocomplete=“off”>
|
||||
<input class="large-input" :password="!showPassword" :placeholder="$t('login.enterpassword')" 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="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>
|
||||
<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 class="zd-col-12 radio-label">{{$t('login.remember')}}</view>
|
||||
<view class="zd-col-4 setup-text" @tap="setup">{{$t('login.settings')}}</view>
|
||||
<view class="zd-col-8 setup-text" @tap="isUpdate">{{$t('login.upgrade')}}</view>
|
||||
</view>
|
||||
<button class="login-btn" :disabled="disabled" @tap="toLogin">确认登录</button>
|
||||
<button class="login-btn" :disabled="disabled" @tap="toLogin">{{$t('login.login')}}</button>
|
||||
<view v-if="version !== ''" class="version-name">v{{version}}</view>
|
||||
<Up-grade v-if="grade === true" @closeUpdate="closeUpdate" :androidUrl="androidUrl"></up-grade>
|
||||
</view>
|
||||
@@ -68,19 +68,7 @@
|
||||
},
|
||||
async toLogin() {
|
||||
this.disabled = true
|
||||
if (this.user === '') {
|
||||
uni.showToast({
|
||||
title: '用户名不能为空',
|
||||
icon: 'none'
|
||||
})
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
if (this.password === '') {
|
||||
uni.showToast({
|
||||
title: '密码不能为空',
|
||||
icon: 'none'
|
||||
})
|
||||
if (this.user === '' || this.password === '') {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user