chore(多语言): 支持登录页面多语言
This commit is contained in:
@@ -16,5 +16,23 @@ export const lang = {
|
||||
registerTips: 'Users without an account',
|
||||
registerTips1: 'register',
|
||||
registerTips2: 'now',
|
||||
newUserRegister: 'New User Registration'
|
||||
newUserRegister: 'New User Registration',
|
||||
// login.vue page new translation items
|
||||
welcomeText: 'Hello,<br />Welcome to use',
|
||||
getDynacode: 'Get Dynamic Code',
|
||||
mobileInputPlaceholder: 'Please enter your mobile phone number',
|
||||
accountInputPlaceholder: 'Please enter account',
|
||||
passwordInputPlaceholder: 'Please enter password',
|
||||
forgetPasswordText: 'Forgot password?',
|
||||
dynacodeInputPlaceholder: 'Please enter dynamic code',
|
||||
loginButtonText: 'Login',
|
||||
registerAgreementText: 'If you are not registered, you will be automatically registered after login. Registration means you agree to',
|
||||
privacyPolicyText: '《Privacy Policy》',
|
||||
userServiceAgreementText: '《User Service Agreement》',
|
||||
agreeAgreementTip: 'Please read and agree to the agreement first',
|
||||
loginSuccessTip: 'Login successful',
|
||||
enterMobileTip: 'Please enter mobile phone number',
|
||||
enterCorrectMobileTip: 'Please enter correct mobile phone number',
|
||||
enterCaptchaTip: 'Please enter verification code',
|
||||
requestFailTip: 'request:fail'
|
||||
}
|
||||
@@ -16,5 +16,23 @@ export const lang = {
|
||||
registerTips: '没有账号的用户快来',
|
||||
registerTips1: '注册',
|
||||
registerTips2: '吧',
|
||||
newUserRegister: '新用户注册'
|
||||
newUserRegister: '新用户注册',
|
||||
// login.vue页面新增翻译项
|
||||
welcomeText: '您好,<br />欢迎使用',
|
||||
getDynacode: '获取动态码',
|
||||
mobileInputPlaceholder: '请输入您的手机号',
|
||||
accountInputPlaceholder: '请输入账号',
|
||||
passwordInputPlaceholder: '请输入密码',
|
||||
forgetPasswordText: '忘记密码?',
|
||||
dynacodeInputPlaceholder: '请输入动态码',
|
||||
loginButtonText: '登录',
|
||||
registerAgreementText: '若您未注册,则登录后将自动帮您注册。注册即视为同意',
|
||||
privacyPolicyText: '《隐私条款》',
|
||||
userServiceAgreementText: '《用户服务协议》',
|
||||
agreeAgreementTip: '请先阅读并同意协议',
|
||||
loginSuccessTip: '登录成功',
|
||||
enterMobileTip: '请输入手机号',
|
||||
enterCorrectMobileTip: '请输入正确的手机号',
|
||||
enterCaptchaTip: '请输入验证码',
|
||||
requestFailTip: 'request:fail'
|
||||
}
|
||||
|
||||
@@ -3,9 +3,7 @@
|
||||
<scroll-view scroll-y="false" class="container">
|
||||
<view class="header-wrap" :style="{backgroundImage: 'url('+$util.img('public/uniapp/member/head.png')+')'}">
|
||||
<view class="t-b">
|
||||
您好,
|
||||
<br />
|
||||
欢迎使用
|
||||
<div v-html="$lang('welcomeText')"></div>
|
||||
</view>
|
||||
</view>
|
||||
<view class="body-wrap">
|
||||
@@ -13,25 +11,25 @@
|
||||
<view class="input-wrap" v-show="loginMode == 'mobile'">
|
||||
<view class="content">
|
||||
<!-- <view class="area-code">+86</view> -->
|
||||
<input type="number" placeholder="请输入您的手机号" placeholder-class="input-placeholder" class="input" maxlength="11" v-model="formData.mobile" />
|
||||
<input type="number" :placeholder="$lang('mobileInputPlaceholder')" placeholder-class="input-placeholder" class="input" maxlength="11" v-model="formData.mobile" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="input-wrap" v-show="loginMode == 'account'">
|
||||
<view class="content">
|
||||
<input type="text" placeholder="请输入账号" placeholder-class="input-placeholder" class="input" v-model="formData.account" />
|
||||
<input type="text" :placeholder="$lang('accountInputPlaceholder')" placeholder-class="input-placeholder" class="input" v-model="formData.account" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="input-wrap" v-show="loginMode == 'account'">
|
||||
<view class="content">
|
||||
<input type="password" placeholder="请输入密码" placeholder-class="input-placeholder" class="input" v-model="formData.password" />
|
||||
<input type="password" :placeholder="$lang('passwordInputPlaceholder')" placeholder-class="input-placeholder" class="input" v-model="formData.password" />
|
||||
<view class="align-right" v-show="loginMode == 'account'">
|
||||
<text @click="forgetPassword">忘记密码?</text>
|
||||
<text @click="forgetPassword">{{ $lang('forgetPasswordText') }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="input-wrap" v-show="loginMode == 'mobile'">
|
||||
<view class="content">
|
||||
<input type="text" placeholder="请输入动态码" placeholder-class="input-placeholder" class="input" v-model="formData.dynacode" />
|
||||
<input type="text" :placeholder="$lang('dynacodeInputPlaceholder')" placeholder-class="input-placeholder" class="input" v-model="formData.dynacode" />
|
||||
<view class="dynacode" :class="dynacodeData.seconds == 120 ? 'color-base-text' : 'color-tip'"
|
||||
@click="sendMobileCode">{{ dynacodeData.codeText }}</view>
|
||||
</view>
|
||||
@@ -39,11 +37,11 @@
|
||||
</view>
|
||||
|
||||
<view class="btn_view">
|
||||
<button type="primary" @click="login" class="login-btn color-base-border color-base-bg" style="background: #2796f2 !important;border: none;">登录</button>
|
||||
<button type="primary" @click="login" class="login-btn color-base-border color-base-bg" style="background: #2796f2 !important;border: none;">{{ $lang('loginButtonText') }}</button>
|
||||
</view>
|
||||
<view class="regisiter-agreement" style="margin: 0 50rpx;padding-top: 40rpx;line-height: 1.5;display: flex;">
|
||||
<view style="" class="iconfont" :class=" isAgree ? 'icon-fuxuankuang1 color-base-text' : 'icon-fuxuankuang2' " @click="isAgree = !isAgree"></view>
|
||||
<view style="text-align: left;margin-left: 10rpx;padding-top: 2rpx;">若您未注册,则登录后将自动帮您注册。注册即视为同意 <text @click="tourl('/pages_tool/agreement/contenr?type=0')" style="color:#4395ff">《隐私条款》</text> <text @click="tourl('/pages_tool/agreement/contenr?type=1')" style="color:#4395ff">《用户服务协议》</text></view>
|
||||
<view style="text-align: left;margin-left: 10rpx;padding-top: 2rpx;">{{ $lang('registerAgreementText') }} <text @click="tourl('/pages_tool/agreement/contenr?type=0')" style="color:#4395ff">{{ $lang('privacyPolicyText') }}</text> <text @click="tourl('/pages_tool/agreement/contenr?type=1')" style="color:#4395ff">{{ $lang('userServiceAgreementText') }}</text></view>
|
||||
</view>
|
||||
</view>
|
||||
<loading-cover ref="loadingCover"></loading-cover>
|
||||
@@ -184,7 +182,7 @@
|
||||
login() {
|
||||
if (!this.isAgree) {
|
||||
this.$util.showToast({
|
||||
title: '请先阅读并同意协议'
|
||||
title: this.$lang('agreeAgreementTip')
|
||||
});
|
||||
return false;
|
||||
}
|
||||
@@ -223,7 +221,7 @@
|
||||
this.getMemberInfo(() => {
|
||||
if (can_receive_registergift == 1) {
|
||||
this.$util.showToast({
|
||||
title: '登录成功'
|
||||
title: this.$lang('loginSuccessTip')
|
||||
});
|
||||
let back = this.back ? this.back : '/pages/member/index';
|
||||
if(this.$refs.registerReward) this.$refs.registerReward.open(back);
|
||||
@@ -261,11 +259,11 @@
|
||||
rule = [{
|
||||
name: 'mobile',
|
||||
checkType: 'required',
|
||||
errorMsg: '请输入手机号'
|
||||
errorMsg: this.$lang('enterMobileTip')
|
||||
}, {
|
||||
name: 'mobile',
|
||||
checkType: 'phoneno',
|
||||
errorMsg: '请输入正确的手机号'
|
||||
errorMsg: this.$lang('enterCorrectMobileTip')
|
||||
}];
|
||||
if (this.captchaConfig == 1) {
|
||||
if (this.captcha.id != '') rule.push({
|
||||
@@ -360,8 +358,8 @@
|
||||
fail: res => {
|
||||
this.isSub = false;
|
||||
this.$util.showToast({
|
||||
title: 'request:fail'
|
||||
});
|
||||
title: this.$lang('requestFailTip')
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -389,7 +387,7 @@
|
||||
rule.push({
|
||||
name: 'captcha_code',
|
||||
checkType: 'required',
|
||||
errorMsg: '请输入验证码'
|
||||
errorMsg: this.$lang('enterCaptchaTip')
|
||||
});
|
||||
}
|
||||
var checkRes = validate.check(data, rule);
|
||||
|
||||
Reference in New Issue
Block a user