-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.js
39 lines (33 loc) · 948 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
36
37
38
39
App({
globalData:{
baikeId:'',
phoneHeight:'',
isRegister:false
},
onLaunch: function () {
var that = this
wx.getSystemInfo({ //获取机型高度
success: function (res) {
//console.log(res.windowHeight)
that.globalData.phoneHeight=res.windowHeight
}
})
wx.BaaS = requirePlugin('sdkPlugin')
//让插件帮助完成登录、支付等功能
wx.BaaS.wxExtend(wx.login,
wx.getUserInfo,
wx.requestPayment)
let clientID ='ae509f5119f4d6e79bf1'
wx.BaaS.init(clientID)
// wx.BaaS.auth.register({ username: 'ifanrx', password: 'ifanrx123' }).then(user => {
// console.log(user)
// }).catch(err => {
// // HError 对象
// })
// wx.BaaS.auth.login({ username: 'ifanrx', password: 'ifanrx123' }).then(user => {
// //console.log(user)
// }).catch(err => {
// // HError
// })
},
})