From 03dafa19d8d602e6b4b3b70dd6dc0d6852884783 Mon Sep 17 00:00:00 2001 From: liudan <18634735655@163.com> Date: Fri, 19 May 2023 07:51:15 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/modules/base.js | 8 ++++++ manifest.json | 63 ++++++++++++++++++++++++--------------------- pages/login.vue | 6 ++++- siteinfo.js | 3 ++- 4 files changed, 48 insertions(+), 32 deletions(-) diff --git a/api/modules/base.js b/api/modules/base.js index 776053c..2a9eeb4 100644 --- a/api/modules/base.js +++ b/api/modules/base.js @@ -10,6 +10,14 @@ export default { appLogin(param) { return req.post("index/appLogin", param) }, + //短信登陆 + msgLogin(param) { + return req.post("index/msmLogin", param) + }, + //发送验证码 + setCode(param){ + return req.post("index/sendMsm", param) + }, // 登录协议 getLoginProtocol(param) { return req.post("index/getLoginProtocol", param) diff --git a/manifest.json b/manifest.json index 8a54dbd..c841eb5 100644 --- a/manifest.json +++ b/manifest.json @@ -34,36 +34,39 @@ "enable" : true } }, - // "h5" : { - // "title" : "", - // "domain" : "https://massage.cncnconnect.com/", - // "devServer" : { - // "https" : true - // }, - // "router" : { - // "base" : "/h5/" - // }, - // // "devServer" : { - // // "disableHostCheck" : true, - // // "proxy" : { - // // "/api" : { - // // "target" : "https://massage.cncnconnect.com", - // // "changeOrigin" : true, - // // "secure" : false, - // // "pathRewrite" : { - // // "^/api" : "" - // // } - // // } - // // } - // // }, - // "sdkConfigs" : { - // "maps" : { - // "qqmap" : { - // "key" : "4IJBZ-DLACP-3QBDS-LI4FT-U2MZZ-5KFFA" - // } - // } - // } - // }, + "h5" : { + "router" : { + "mode" : "hash" + }, + "title" : "", + "domain" : "https://massage.cncnconnect.com/", + "devServer" : { + "https" : true + }, + // "router" : { + // "base" : "/h5/" + // }, + "devServer" : { + // "disableHostCheck" : true, + "proxy" : { + "/api" : { + "target" : "https://xixi-api.njrenzhou.cn", + "changeOrigin" : true, + "secure" : false, + "pathRewrite" : { + "^/api" : "" + } + } + } + }, + "sdkConfigs" : { + "maps" : { + "qqmap" : { + "key" : "4IJBZ-DLACP-3QBDS-LI4FT-U2MZZ-5KFFA" + } + } + } + }, "app-plus" : { /* 5+App特有相关 */ "compatible" : { diff --git a/pages/login.vue b/pages/login.vue index b3cf473..7e577e6 100644 --- a/pages/login.vue +++ b/pages/login.vue @@ -223,7 +223,7 @@ codeChange(text) { this.tips = text; }, - getCode() { + async getCode() { var phoneReg = /(^1\d{10}$)|(^[0-9]\d{7}$)/; if(!phoneReg.test(this.phone)) { uni.$u.toast('请输入正确的手机号码'); @@ -234,6 +234,10 @@ uni.showLoading({ title: '正在获取验证码' }) + let res = await this.$api.base.setCode({ + phone:this.phone + }) + console.log(res,"999") setTimeout(() => { uni.hideLoading(); // 这里此提示会被this.start()方法中的提示覆盖 diff --git a/siteinfo.js b/siteinfo.js index 6d95e24..cac9f56 100644 --- a/siteinfo.js +++ b/siteinfo.js @@ -5,5 +5,6 @@ module.exports = { "version": "3.0", "gzh_appid": "wx290579913189dc88", // "siteroot": "https://anmo.soqq.com.cn/index.php", - "siteroot": "https://djdj.njrenzhou.cn/index.php" + // "siteroot": "https://djdj.njrenzhou.cn/index.php", + "siteroot": "https://xixi-api.njrenzhou.cn", };