|
@@ -11,3 +11,20 @@ export function detail(pageId) {
|
|
|
pageId
|
|
|
})
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+export const wxLogin = async () => {
|
|
|
+ return new Promise((resolve, reject) => {
|
|
|
+ wx.login({
|
|
|
+ success: async (res) => {
|
|
|
+ console.log('code',res.code)
|
|
|
+ // let rs = await getOpenId(res.code)
|
|
|
+ // let openId = rs.data.openid
|
|
|
+ // let sessionKey = rs.data.sessionKey
|
|
|
+ // uni.setStorageSync('openId', openId)
|
|
|
+ // uni.setStorageSync('sessionKey', sessionKey)
|
|
|
+ // resolve(openId)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+}
|