diff --git a/src/pages/index/index.vue b/src/pages/index/index.vue index f0defcf..038e443 100644 --- a/src/pages/index/index.vue +++ b/src/pages/index/index.vue @@ -10,6 +10,20 @@ onLoad(() => { // .then(res=>{ // console.log('stadiumFind', res); // }) + tt.login({ + success() { + tt.showToast({ + title: "登录成功", + icon: "success", + }); + }, + fail() { + tt.showToast({ + title: "登录失败", + icon: "fail", + }); + }, + }); }); diff --git a/src/pages/member/index.vue b/src/pages/member/index.vue index 42256f4..23fc46c 100644 --- a/src/pages/member/index.vue +++ b/src/pages/member/index.vue @@ -16,16 +16,44 @@ function toLogin(){ routeTo('/subpackage/authorize/pages/index'); } +function handleError(e) { + console.warn(e) + console.log(`${e.detail.errNo}: ${e.detail.errMsg}`); +} + +function login() { + tt.login({ + success() { + tt.showToast({ + title: '登录成功', + icon: 'success', + }); + }, + fail() { + tt.showToast({ + title: '登录失败', + icon: 'fail', + }); + }, + }); + } +