From 6bcda7adb9b9ed1f65af8dccc0fd99facf26f9fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8C=83=E9=B9=8F?= Date: Mon, 26 Aug 2024 17:33:53 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E6=88=90=E7=99=BB=E5=BD=95=E6=B3=A8?= =?UTF-8?q?=E5=86=8C=E4=B8=8E=E5=88=87=E6=8D=A2=E8=B4=A6=E5=8F=B7=E7=9B=B8?= =?UTF-8?q?=E5=85=B3=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/user.js | 18 +++++++ config/env.js | 2 +- manifest.json | 2 +- pages/home/home.vue | 79 +++++++++++++++++++++++---- pages/lockDetail/lockDetail.vue | 14 ++--- pages/mine/mine.vue | 94 +++++++++++++++++++++++++++++++-- stores/user.js | 46 +++++++++++----- 7 files changed, 219 insertions(+), 36 deletions(-) diff --git a/api/user.js b/api/user.js index 2c2d68d..81e7b8f 100644 --- a/api/user.js +++ b/api/user.js @@ -55,3 +55,21 @@ export function getEmailCodeRequest(data) { data }) } + +// 登录 +export function loginRequest(data) { + return request({ + url: '/wechat/mini/login', + method: 'POST', + data + }) +} + +// 注册 +export function phoneLoginRequest(data) { + return request({ + url: '/wechat/mini/phone/login ', + method: 'POST', + data + }) +} diff --git a/config/env.js b/config/env.js index e30867e..d42cdfb 100644 --- a/config/env.js +++ b/config/env.js @@ -22,4 +22,4 @@ const PROD = { } // 更换环境的时候 切换导出就行 -export default PRE +export default DEV diff --git a/manifest.json b/manifest.json index 35562d9..66d0780 100644 --- a/manifest.json +++ b/manifest.json @@ -7,7 +7,7 @@ "transformPx" : false, /* 小程序特有相关 */ "mp-weixin" : { - "appid" : "wx9829a39e65550757", + "appid" : "wx10c16cfd90808097", "setting" : { "urlCheck" : true, "minified" : true diff --git a/pages/home/home.vue b/pages/home/home.vue index 261ca59..47186cb 100644 --- a/pages/home/home.vue +++ b/pages/home/home.vue @@ -50,15 +50,18 @@ class="button-add" @click="toSearchDevice"> - + +