personal.js
1.81 KB
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
var n = function(n) {
return n && n.__esModule ? n : {
default: n
};
}(require("../../../utils/restapi.js")), e = (require("../../../utils/util.js"),
require("../../../utils/filter.js")), t = getApp();
require("../index/restapi.js");
Page(e.identityFilter({
data: {
accountName: "",
phone: "",
merchantName: ""
},
logout: function() {
wx.showModal({
content: "退出登录后将不能使用嘀加智慧门店相关的小程序,确认退出?",
confirmText: "退出",
success: function(e) {
wx.getSetting({
success: function(e) {
wx.login({
success: function(e) {
t.globalData.code = e.code, n.default.logout(function(n) {
t.globalData.userInfo = null, console.log(n), wx.reLaunch({
url: "../../../pages/index/index"
});
});
}
});
}
});
}
});
},
onLoad: function(n) {
if (null != t.globalData.userInfo) {
var e = t.globalData.userInfo.merchant.shortName;
wx.setNavigationBarTitle({
title: e
});
}
},
onReady: function() {},
onLogin: function() {
var n = t.globalData.userInfo;
console.log(n), this.setData({
accountName: n.nickName,
merchantName: n.merchant.merchantName
});
},
onShow: function() {},
onHide: function() {},
onUnload: function() {},
onPullDownRefresh: function() {},
onReachBottom: function() {}
}));