17 lines
309 B
JavaScript
17 lines
309 B
JavaScript
|
var app = getApp();
|
||
|
Page({
|
||
|
data: {
|
||
|
canIUse: wx.canIUse('button.open-type.getUserInfo')
|
||
|
},
|
||
|
onAuth() {
|
||
|
wx.getSetting({
|
||
|
success: (res) => {
|
||
|
if (res.authSetting['scope.userInfo']) {
|
||
|
wx.reLaunch({
|
||
|
url: '../index/index',
|
||
|
})
|
||
|
}
|
||
|
}
|
||
|
})
|
||
|
}
|
||
|
})
|