-
Notifications
You must be signed in to change notification settings - Fork 2
/
app.js
35 lines (32 loc) · 913 Bytes
/
app.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// app.js
// 源码引入方式,方便调试
import Bmob from 'utils/hydrogen-js-sdk/src/lib/app.js'
// Bmob.initialize('bc7814ffb203da9f', '123456');
Bmob.initialize('fda2aa4220549f74', '8f7jh2529a18d30q');
App({
onLaunch: function () {
// const query = Bmob.Query('_User')
// query.find().then(res => {
// console.log(res)
// })
// 一键登录
// Bmob.User.auth().then(res => {
// console.log(res);
// console.log('一键登录成功')
// var userData = {
// nickName: res.nickName,
// objectId: res.objectId,
// openid: res.openid,
// userPic: res.userPic,
// username: res.username
// };
// wx.setStorageSync('userData', userData);
// wx.setStorageSync('openid', res.authData.weapp.openid)
// }).catch(err => {
// console.log(err);
// })
},
globalData: {
userInfo: null
}
})