This commit is contained in:
2024-08-22 12:53:28 +08:00
commit 1d65a849fd
360 changed files with 41757 additions and 0 deletions

View File

@@ -0,0 +1,39 @@
var o = getApp();
Page({
data: {},
onLoad: function(o) {},
getUserInfo: function(e) {
var n = this;
o.getUserInfo(e, function() {
n.onNavigateBack();
});
},
getUserProfile: function() {
console.log("getUserProfile");
var e = this;
try {
wx.getUserProfile({
lang: "zh_CN",
desc: "获取用户相关信息",
success: function(n) {
var t = n.userInfo;
console.log("用户同意了授权"), console.log("userInfo", t), o.getUserInfo(t, function() {
e.onNavigateBack(1);
});
},
fail: function() {
console.log("用户拒绝了授权");
}
});
} catch (e) {
console.log("error", e.message), "wx.getUserProfile is not a function" === e.message ? o.showError("wx.getUserProfile 接口无法使用,请升级到最新版微信") : o.showError(error.message);
}
},
onNotLogin: function() {
this.onNavigateBack();
},
onNavigateBack: function() {
wx.navigateBack();
}
});