From ab13b914e618314cd26232b8e3d7a703ec08080c Mon Sep 17 00:00:00 2001 From: phmycqkit <656078035@qq.com> Date: Sat, 12 Oct 2024 22:02:56 +0800 Subject: [PATCH] ADD file via upload --- app.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 app.js diff --git a/app.js b/app.js new file mode 100644 index 0000000..1ed57c4 --- /dev/null +++ b/app.js @@ -0,0 +1,19 @@ +// app.js +App({ + onLaunch() { + // 展示本地存储能力 + const logs = wx.getStorageSync('logs') || [] + logs.unshift(Date.now()) + wx.setStorageSync('logs', logs) + + // 登录 + wx.login({ + success: res => { + // 发送 res.code 到后台换取 openId, sessionKey, unionId + } + }) + }, + globalData: { + userInfo: null + } +})