Commit 5ed10c4b by 姜雷

添加请求模版

parent 8a6b4fdb
......@@ -107,8 +107,22 @@ Page({
if (this.validateLoginData()) {
const { account, pwd } = this.data;
console.log(account, pwd);
systemFetch({
url: '/boss/login/init/data',
method: 'GET',
})
.then(res => {
console.log(res);
return res.templates;
})
.catch(err => {
return;
})
.then(ids => {
let tmplIds =
ids && ids.length ? ids.map(item => item.templateId) : [];
wx.requestSubscribeMessage({
tmplIds: ['WU2yMHKM_yNPLGHRsstggnnGIgcRgDEIaJQiWWNJ9ss'],
tmplIds: tmplIds,
success(res) {
console.log('in success', res);
},
......@@ -193,6 +207,10 @@ Page({
});
},
});
})
.catch(err => {
console.log(err);
});
}
// fetch()
// 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