|
@@ -4,39 +4,97 @@ Page({
|
|
|
data: {
|
|
|
isInit: false
|
|
|
},
|
|
|
- isOk() {
|
|
|
+ // isOk() {
|
|
|
+ // tool.isLogin().then(result => {
|
|
|
+ // this.setData({
|
|
|
+ // loginStatus: true
|
|
|
+ // })
|
|
|
+ // tool.isFinishInfo().then(result2 => {
|
|
|
+ // this.setData({
|
|
|
+ // infoStatus: true
|
|
|
+ // })
|
|
|
+ // tool.isFinishTargetInfo().then(redult3 => {
|
|
|
+ // this.setData({
|
|
|
+ // targetInfoStatus: true
|
|
|
+ // })
|
|
|
+ // }).catch(err => {
|
|
|
+ // this.setData({
|
|
|
+ // targetInfoStatus: false
|
|
|
+ // })
|
|
|
+ // })
|
|
|
+ // }).catch(err => {
|
|
|
+ // this.setData({
|
|
|
+ // infoStatus: false
|
|
|
+ // })
|
|
|
+ // })
|
|
|
+ // }).catch(err => {
|
|
|
+ // this.setData({
|
|
|
+ // loginStatus: false
|
|
|
+ // })
|
|
|
+ // })
|
|
|
+ // },
|
|
|
+ baoming() {
|
|
|
tool.isLogin().then(result => {
|
|
|
- console.log(result,'22222222222')
|
|
|
- this.setData({
|
|
|
- loginStatus: true
|
|
|
- })
|
|
|
tool.isFinishInfo().then(result2 => {
|
|
|
- this.setData({
|
|
|
- infoStatus: true
|
|
|
- })
|
|
|
tool.isFinishTargetInfo().then(redult3 => {
|
|
|
- this.setData({
|
|
|
- targetInfoStatus: true
|
|
|
+ wx.requestSubscribeMessage({
|
|
|
+ tmplIds: ['YNGZW3voCNtjvTkhi2xbbVinJkjFKcILEG7uFC_xz2Y'],
|
|
|
+ success: (res) => {
|
|
|
+ console.log(res,'订阅成功了')
|
|
|
+ wx.request({
|
|
|
+ url: app.globalData.publicUrl + '/wx/actives/' + this.data.openid + '/' + this.data.id + '/enter',
|
|
|
+ method: "get",
|
|
|
+ success: (res) => {
|
|
|
+ if (res.data.code == 0) {
|
|
|
+ wx.redirectTo({
|
|
|
+ url: '/pages/registrationSuccess/registrationSuccess',
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ fail: (res1) => {
|
|
|
+ console.log(res1, '订阅失败了')
|
|
|
+ wx.request({
|
|
|
+ url: app.globalData.publicUrl + '/wx/actives/' + this.data.openid + '/' + this.data.id + '/enter',
|
|
|
+ method: "get",
|
|
|
+ success: (res) => {
|
|
|
+ if (res.data.code == 0) {
|
|
|
+ wx.redirectTo({
|
|
|
+ url: '/pages/registrationSuccess/registrationSuccess',
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
})
|
|
|
}).catch(err => {
|
|
|
- this.setData({
|
|
|
- targetInfoStatus: false
|
|
|
- })
|
|
|
+ wx.showModal({
|
|
|
+ title: '您还未完善择偶信息',
|
|
|
+ showCancel: false,
|
|
|
+ success(res) {
|
|
|
+ if (res.confirm) {
|
|
|
+ wx.redirectTo({
|
|
|
+ url: '/pages/targetInfo/targetInfo',
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
})
|
|
|
}).catch(err => {
|
|
|
- this.setData({
|
|
|
- infoStatus: false
|
|
|
- })
|
|
|
+ wx.showModal({
|
|
|
+ title: '您还未完善个人信息',
|
|
|
+ showCancel: false,
|
|
|
+ success(res) {
|
|
|
+ if (res.confirm) {
|
|
|
+ wx.redirectTo({
|
|
|
+ url: '/pages/personInfo/personInfo',
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
})
|
|
|
}).catch(err => {
|
|
|
- console.log(err,'没登录')
|
|
|
- this.setData({
|
|
|
- loginStatus: false
|
|
|
- })
|
|
|
- })
|
|
|
- },
|
|
|
- baoming() {
|
|
|
- if (!this.data.loginStatus) {
|
|
|
wx.showModal({
|
|
|
title: '您还未登录',
|
|
|
showCancel: false,
|
|
@@ -48,70 +106,85 @@ Page({
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
- return false;
|
|
|
- }
|
|
|
- if (!this.data.infoStatus) {
|
|
|
- wx.showModal({
|
|
|
- title: '您还未完善个人信息',
|
|
|
- showCancel: false,
|
|
|
- success(res) {
|
|
|
- if (res.confirm) {
|
|
|
- wx.redirectTo({
|
|
|
- url: '/pages/personInfo/personInfo',
|
|
|
- })
|
|
|
- }
|
|
|
- }
|
|
|
- });
|
|
|
- return false;
|
|
|
- }
|
|
|
- if (!this.data.targetInfoStatus) {
|
|
|
- wx.showModal({
|
|
|
- title: '您还未完善择偶信息',
|
|
|
- showCancel: false,
|
|
|
- success(res) {
|
|
|
- if (res.confirm) {
|
|
|
- wx.redirectTo({
|
|
|
- url: '/pages/targetInfo/targetInfo',
|
|
|
- })
|
|
|
- }
|
|
|
- }
|
|
|
- });
|
|
|
- return false;
|
|
|
- }
|
|
|
- wx.requestSubscribeMessage({
|
|
|
- tmplIds: ['YNGZW3voCNtjvTkhi2xbbVinJkjFKcILEG7uFC_xz2Y'],
|
|
|
- // tmplIds: ['OfeVQOfrOQyOEb-ipTiw6MRJiXs9vlvhv3SVRtrTgKc'],
|
|
|
- success: (res) => {
|
|
|
- wx.request({
|
|
|
- url: app.globalData.publicUrl + '/wx/actives/' + this.data.openid + '/' + this.data.id + '/enter',
|
|
|
- method: "get",
|
|
|
- success: (res) => {
|
|
|
- if (res.data.code == 0) {
|
|
|
- wx.redirectTo({
|
|
|
- url: '/pages/registrationSuccess/registrationSuccess',
|
|
|
- })
|
|
|
- }
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
- fail: (res1) => {
|
|
|
- console.log(res1, '失败了')
|
|
|
- wx.request({
|
|
|
- url: app.globalData.publicUrl + '/wx/actives/' + this.data.openid + '/' + this.data.id + '/enter',
|
|
|
- method: "get",
|
|
|
- success: (res) => {
|
|
|
- if (res.data.code == 0) {
|
|
|
- wx.redirectTo({
|
|
|
- url: '/pages/registrationSuccess/registrationSuccess',
|
|
|
- })
|
|
|
- }
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
})
|
|
|
-
|
|
|
+ // if (!this.data.loginStatus) {
|
|
|
+ // wx.showModal({
|
|
|
+ // title: '您还未登录',
|
|
|
+ // showCancel: false,
|
|
|
+ // success(res) {
|
|
|
+ // if (res.confirm) {
|
|
|
+ // wx.redirectTo({
|
|
|
+ // url: '/pages/personal/personal',
|
|
|
+ // })
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // });
|
|
|
+ // return false;
|
|
|
+ // }
|
|
|
+ // if (!this.data.infoStatus) {
|
|
|
+ // wx.showModal({
|
|
|
+ // title: '您还未完善个人信息',
|
|
|
+ // showCancel: false,
|
|
|
+ // success(res) {
|
|
|
+ // if (res.confirm) {
|
|
|
+ // wx.redirectTo({
|
|
|
+ // url: '/pages/personInfo/personInfo',
|
|
|
+ // })
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // });
|
|
|
+ // return false;
|
|
|
+ // }
|
|
|
+ // if (!this.data.targetInfoStatus) {
|
|
|
+ // wx.showModal({
|
|
|
+ // title: '您还未完善择偶信息',
|
|
|
+ // showCancel: false,
|
|
|
+ // success(res) {
|
|
|
+ // if (res.confirm) {
|
|
|
+ // wx.redirectTo({
|
|
|
+ // url: '/pages/targetInfo/targetInfo',
|
|
|
+ // })
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // });
|
|
|
+ // return false;
|
|
|
+ // }
|
|
|
+ // wx.requestSubscribeMessage({
|
|
|
+ // tmplIds: ['YNGZW3voCNtjvTkhi2xbbVinJkjFKcILEG7uFC_xz2Y'],
|
|
|
+ // success: (res) => {
|
|
|
+ // wx.request({
|
|
|
+ // url: app.globalData.publicUrl + '/wx/actives/' + this.data.openid + '/' + this.data.id + '/enter',
|
|
|
+ // method: "get",
|
|
|
+ // success: (res) => {
|
|
|
+ // if (res.data.code == 0) {
|
|
|
+ // wx.redirectTo({
|
|
|
+ // url: '/pages/registrationSuccess/registrationSuccess',
|
|
|
+ // })
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ // },
|
|
|
+ // fail: (res1) => {
|
|
|
+ // console.log(res1, '失败了')
|
|
|
+ // wx.request({
|
|
|
+ // url: app.globalData.publicUrl + '/wx/actives/' + this.data.openid + '/' + this.data.id + '/enter',
|
|
|
+ // method: "get",
|
|
|
+ // success: (res) => {
|
|
|
+ // if (res.data.code == 0) {
|
|
|
+ // wx.redirectTo({
|
|
|
+ // url: '/pages/registrationSuccess/registrationSuccess',
|
|
|
+ // })
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ // }
|
|
|
+ // })
|
|
|
},
|
|
|
async onLoad(options) {
|
|
|
+ wx.showLoading({
|
|
|
+ title:'加载中',
|
|
|
+ mask:true
|
|
|
+ });
|
|
|
console.log(options)
|
|
|
tool.openidStatus().then(result => {
|
|
|
this.setData({
|
|
@@ -120,8 +193,9 @@ Page({
|
|
|
activeOpenid: options.openId,
|
|
|
isInit: true
|
|
|
})
|
|
|
- this.isOk();
|
|
|
+ // this.isOk();
|
|
|
this.getActivies(options.id);
|
|
|
+ wx.hideLoading();
|
|
|
})
|
|
|
},
|
|
|
getActivies(id2) {
|