From 4713116996586df14a22c4dba4bf892c3b9c5ffa Mon Sep 17 00:00:00 2001 From: qiaomu <3520484422@qq.com> Date: Thu, 28 Mar 2024 09:30:58 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=89=AB=E7=A0=81=E7=94=B3?= =?UTF-8?q?=E8=AF=B7=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/apply/index.js | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/pages/apply/index.js b/pages/apply/index.js index 94887df..f892a21 100644 --- a/pages/apply/index.js +++ b/pages/apply/index.js @@ -1,6 +1,6 @@ import { getTenementDetail } from "../../service/tenement"; import { userApply } from "../../service/user"; -import { alertInfo, alertSuccess } from "../../utils/index"; +import { alertInfo, alertSuccess, loadingFunc, wxLogin } from "../../utils/index"; import request from '../../utils/request' const { OK } = request; // pages/apply/index.js @@ -22,10 +22,10 @@ Page({ console.log('options', options) const querys = decodeURIComponent(options.scene) console.log('querys', querys) - const search = new URLSearchParams(querys) + // const search = new URLSearchParams(querys) // const { id } = querys; - // const id = querys.slice(querys.indexOf("=") + 1) - const id = seach.get('id') + const id = querys.slice(querys.indexOf("=") + 1) + // const id = seach.get('id') console.log('更换') console.log('id', id) // this.setData({ id, name }) @@ -52,8 +52,11 @@ Page({ }, async handleLogin(phoneCode) { const { id, nickName } = this.data; + console.log('准备开始') loadingFunc(async () => { + console.log('开始') const wxLoginCode = await wxLogin() + console.log('wxLoginCode', wxLoginCode) const result = await userApply({ code: wxLoginCode, phoneCode, id, name: nickName }) const { code, message, data } = result; if (code !== OK) { @@ -75,6 +78,7 @@ Page({ }, getPhoneNumber(e) { const { nickName } = this.data; + console.log('nickName', e, nickName) if (!nickName) { alertInfo("请填写你的名字") return; @@ -89,6 +93,7 @@ Page({ alertInfo("服务达到上限") return; default: + console.log("进入登录流程") this.handleLogin(phoneCode) return; }