45 lines
1.1 KiB
JavaScript
45 lines
1.1 KiB
JavaScript
var e = getApp();
|
|
|
|
Page({
|
|
data: {
|
|
token: e.globalData.token,
|
|
sourceUrl: e.baseUrls.sourceUrl,
|
|
userIcon: "",
|
|
name: "",
|
|
isChecked: !1
|
|
},
|
|
getIsCheckedIn: function() {
|
|
var n = this;
|
|
e.restAjax.get(e.restAjax.path(e.apis.isCheckedIn, [ e.baseUrls.requestUrl, wx.getStorageSync("curCommunityId") ]), {}, {
|
|
headers: {
|
|
token: e.globalData.token
|
|
}
|
|
}, function(e, t) {
|
|
"yes" == t && n.setData({
|
|
isChecked: !0
|
|
});
|
|
}, function(e, n) {
|
|
console.log(n);
|
|
});
|
|
},
|
|
doCheckIn: function() {
|
|
wx.navigateTo({
|
|
url: "./checkInDetail"
|
|
});
|
|
},
|
|
onLoad: function(e) {
|
|
this.setData({
|
|
userIcon: wx.getStorageSync("userIcon"),
|
|
name: wx.getStorageSync("name")
|
|
});
|
|
},
|
|
onReady: function() {},
|
|
onShow: function() {
|
|
this.getIsCheckedIn();
|
|
},
|
|
onHide: function() {},
|
|
onUnload: function() {},
|
|
onPullDownRefresh: function() {},
|
|
onReachBottom: function() {},
|
|
onShareAppMessage: function() {}
|
|
}); |