...
|
...
|
@@ -37,6 +37,8 @@ Page(extend({},Toast,{ |
|
|
isLogin: false,
|
|
|
userInfo: {},
|
|
|
hasUnionID: '',
|
|
|
isShowPopup: false,
|
|
|
registerTips: '欢迎加入Yoho!Family!',
|
|
|
|
|
|
ticketData: [],
|
|
|
onActivityList: [],//正在进行的活动
|
...
|
...
|
@@ -267,12 +269,22 @@ Page(extend({},Toast,{ |
|
|
|
|
|
} else {
|
|
|
if (result.is_register){
|
|
|
that.showZanToast({ title: '欢迎加入Yoho!Family!',success:function(){
|
|
|
let uid = app.globalData.userInfo.uid > 0 ? app.globalData.userInfo.uid : 0;
|
|
|
app.updateUid(uid)
|
|
|
that.setData({ uid });
|
|
|
that.showUserInfo();
|
|
|
}},1500);
|
|
|
let uid = app.globalData.userInfo.uid > 0 ? app.globalData.userInfo.uid : 0;
|
|
|
that.setData({
|
|
|
uid,
|
|
|
isShowPopup: true,
|
|
|
});
|
|
|
|
|
|
// that.showZanToast({ title: '欢迎加入Yoho!Family!',success:function(){
|
|
|
// let uid = app.globalData.userInfo.uid > 0 ? app.globalData.userInfo.uid : 0;
|
|
|
// app.updateUid(uid)
|
|
|
// that.setData({ uid });
|
|
|
// getUnionID(app.getWechatThirdSession(), function (response) {
|
|
|
// if (response.succeed === true) {
|
|
|
// that.showUserInfo();
|
|
|
// }
|
|
|
// })
|
|
|
// }}, 2000);
|
|
|
} else {
|
|
|
let uid = app.globalData.userInfo.uid > 0 ? app.globalData.userInfo.uid : 0;
|
|
|
app.updateUid(uid)
|
...
|
...
|
@@ -288,6 +300,21 @@ Page(extend({},Toast,{ |
|
|
}
|
|
|
},
|
|
|
|
|
|
//注册后上传并获取用户信息
|
|
|
registerToGetUserInfo(e) {
|
|
|
let that = this;
|
|
|
decodeUnionId(app.getWechatThirdSession(),e.detail, function (response){
|
|
|
if (response.isHaveUnionID){
|
|
|
that.setData({
|
|
|
hasUnionID: true,
|
|
|
isLogin:true
|
|
|
});
|
|
|
} else {
|
|
|
// console.log("没有获取到unionid");
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
|
|
|
loginAndRegisterTapped:function() {
|
|
|
// console.log("loginAndRegisterTapped");
|
|
|
let that = this;
|
...
|
...
|
|