fenggu/pagesA/pages/auth/auth.js

17 lines
313 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: '/pages/index/index',
})
}
}
})
}
})