From 7e9d26af0f0114b7977919124d99c176df5fb551 Mon Sep 17 00:00:00 2001 From: "453530270@qq.com" Date: Tue, 31 Oct 2023 13:56:28 +0800 Subject: [PATCH] =?UTF-8?q?=E7=99=BB=E5=BD=95=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/app.js | 10 -- pages/login/loginsms.vue | 7 +- pages/login/smscode.vue | 216 +++++++++++++++++++++++---------------- 3 files changed, 132 insertions(+), 101 deletions(-) diff --git a/core/app.js b/core/app.js index da1d417..c0422d8 100644 --- a/core/app.js +++ b/core/app.js @@ -220,13 +220,3 @@ export const tohex=(str)=>{ } return hexStr; } - -function aesEncrypt(text, key) { - var encrypted = CryptoJS.AES.encrypt(text, key); - return encrypted.toString(); -} - -function aesDecrypt(text, key) { - var decrypted = CryptoJS.AES.decrypt(text, key); - return decrypted.toString(CryptoJS.enc.Utf8); -} \ No newline at end of file diff --git a/pages/login/loginsms.vue b/pages/login/loginsms.vue index d342954..0fc85c2 100644 --- a/pages/login/loginsms.vue +++ b/pages/login/loginsms.vue @@ -73,9 +73,8 @@ import store from '@/store' const app = this if (!app.isLoading && app.formValidationMobile(app.mobile)) { //app.submitLogin() - console.log(this.$tohex("sss")) // 调整到验证码 - // app.$navTo("pages/login/smscode?rt="+app.mobile) + app.$navTo("pages/login/smscode?rt="+app.mobile) } }, @@ -85,6 +84,10 @@ import store from '@/store' this.$toast('手机号不能为空') return false } + if(!Verify.isMobile(str)){ + this.$toast("输入的手机号码格式不对") + return false + } return true }, diff --git a/pages/login/smscode.vue b/pages/login/smscode.vue index 8d6e941..c7fe555 100644 --- a/pages/login/smscode.vue +++ b/pages/login/smscode.vue @@ -1,5 +1,6 @@