From c36b804d504636fbb49467a2d9a9a3d20016dcba Mon Sep 17 00:00:00 2001 From: Xc Date: Mon, 25 Apr 2022 20:40:49 +0800 Subject: [PATCH] =?UTF-8?q?login=E7=9A=84=E4=B8=80=E5=B0=8F=E4=BA=9B?= =?UTF-8?q?=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- wechatMp/pages/token/login/index.ts | 13 ++++++++----- wechatMp/pages/token/login/index.wxml | 13 +++++++++---- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/wechatMp/pages/token/login/index.ts b/wechatMp/pages/token/login/index.ts index 09e86de89..a1637d53b 100644 --- a/wechatMp/pages/token/login/index.ts +++ b/wechatMp/pages/token/login/index.ts @@ -9,8 +9,9 @@ OakPage({ level: 1, }, isList: true, - formData: (tokenList) => { - if (tokenList.length > 0) { + formData: (tokenList, features) => { + const tokenValue = features.token.getToken(); + if (tokenValue) { return { loggedIn: true, }; @@ -20,12 +21,14 @@ OakPage({ } }, }, { - properties: { - depth: Number, - }, methods: { async onLoginClicked(options: WechatMiniprogram.Touch) { const code = await wx.login(); + console.log(code); + }, + + onReturnClicked() { + wx.navigateBack(); } } }); \ No newline at end of file diff --git a/wechatMp/pages/token/login/index.wxml b/wechatMp/pages/token/login/index.wxml index 47af48e3a..dd712c04a 100644 --- a/wechatMp/pages/token/login/index.wxml +++ b/wechatMp/pages/token/login/index.wxml @@ -1,8 +1,13 @@ - - - {{item.name}} + + + - + + + + + + \ No newline at end of file