fenggu/pagesA/pages/auth/auth.js

17 lines
313 B
JavaScript
Raw Normal View History

var app = getApp();
Page({
data: {
canIUse: wx.canIUse('button.open-type.getUserInfo')
},
onAuth() {
wx.getSetting({
success: (res) => {
if (res.authSetting['scope.userInfo']) {
wx.reLaunch({
2021-12-15 05:38:09 +00:00
url: '/pages/index/index',
})
}
}
})
}
})