Commit ac1631f4 by 姜雷

添加消息订阅

parent eea65600
...@@ -100,6 +100,16 @@ Page({ ...@@ -100,6 +100,16 @@ Page({
if (this.validateLoginData()) { if (this.validateLoginData()) {
const { account, pwd } = this.data; const { account, pwd } = this.data;
console.log(account, pwd); console.log(account, pwd);
wx.requestSubscribeMessage({
tmplIds: ['WU2yMHKM_yNPLGHRsstggsDYnZhKoHIg4heM2fZkD5I'],
success(res) {
console.log('in success', res);
},
fail(res) {
console.log('in fail', res);
},
complete(res) {
console.log('in complete', res);
wx.login({ wx.login({
success: res => { success: res => {
if (res.code) { if (res.code) {
...@@ -172,6 +182,8 @@ Page({ ...@@ -172,6 +182,8 @@ Page({
} }
}, },
}); });
},
});
} }
// fetch() // fetch()
// wx.redirectTo({ // wx.redirectTo({
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment