From 59e1cc837d5e89111a010728dbf71efb739acd1b Mon Sep 17 00:00:00 2001 From: iotcat Date: Sun, 6 Sep 2020 11:01:50 +0800 Subject: [PATCH] shorten --- js/login.js | 16 ++++++++++------ js/update.js | 16 ++++++++++------ login.html | 4 ++-- update.html | 2 +- 4 files changed, 23 insertions(+), 15 deletions(-) diff --git a/js/login.js b/js/login.js index b9964a5..6c1fac1 100644 --- a/js/login.js +++ b/js/login.js @@ -125,17 +125,21 @@ $(function(){ if(page.tran.getLang() == 'zh') $('.num-err').removeClass('hide').find("em").text('请输入手机号'); else - $('.num-err').removeClass('hide').find("em").text('Please input your phone number!'); + $('.num-err').removeClass('hide').find("em").text('Empty phone'); return false; } var param = /^1[34578]\d{9}$/; if (!param.test(phone)) { // globalTip({'msg':'手机号不合法,请重新输入','setTime':3}); $('.num-err').removeClass('hide'); - if(page.tran.getLang() == 'zh') - $('.num-err').text('请输入中国大陆11位手机号'); - else - $('.num-err').text('Only support the phone number in Mainland China'); + if(page.tran.getLang() == 'zh'){ + $('.num-err').text('手机号不正确'); + tips.warning({message: '仅支持中国大陆11位手机号!'}); + } + else{ + $('.num-err').text('Illegal Phone'); + tips.warning({message: 'Only support the phone number in Mainland China!'}); + } return false; } @@ -151,7 +155,7 @@ $(function(){ if(page.tran.getLang() == 'zh') $('.error').removeClass('hide').text('请输入验证码'); else - $('.error').removeClass('hide').text('Please input the code you received.'); + $('.error').removeClass('hide').text('Input code received.'); return false; } else if(pCode.length ==6){ $('.error').addClass('hide'); diff --git a/js/update.js b/js/update.js index 604b4cd..3dea9e8 100644 --- a/js/update.js +++ b/js/update.js @@ -134,16 +134,20 @@ $(function(){ if(page.tran.getLang() == 'zh') $('.num-err').removeClass('hide').find("em").text('请输入手机号'); else - $('.num-err').removeClass('hide').find("em").text('Please input your phone number!'); + $('.num-err').removeClass('hide').find("em").text('Empty phone'); return false; } var param = /^1[34578]\d{9}$/; if (!param.test(phone)) { // globalTip({'msg':'手机号不合法,请重新输入','setTime':3}); - if(page.tran.getLang() == 'zh') - $('.num-err').text('请输入中国大陆11位手机号'); - else - $('.num-err').text('Only support the phone number in Mainland China'); + if(page.tran.getLang() == 'zh'){ + $('.num-err').text('手机号不正确'); + tips.warning({message: '仅支持中国大陆11位手机号!'}); + } + else{ + $('.num-err').text('Illegal Phone'); + tips.warning({message: 'Only support the phone number in Mainland China!'}); + } return false; } @@ -159,7 +163,7 @@ $(function(){ if(page.tran.getLang() == 'zh') $('.error').removeClass('hide').text('请输入验证码'); else - $('.error').removeClass('hide').text('Please input the code you received.'); + $('.error').removeClass('hide').text('Input code received.'); return false; } else if(pCode.length ==6){ $('.error').addClass('hide'); diff --git a/login.html b/login.html index 0e53db9..0d16b6a 100644 --- a/login.html +++ b/login.html @@ -57,8 +57,8 @@
-

我已阅读并接受 《Ushio用户协议说明》I had read and accepted the 《Ushio Service Agreement》

-