qwewewe
This commit is contained in:
parent
42565511df
commit
3c82008e2e
@ -31,7 +31,6 @@ Page({
|
||||
*/
|
||||
onLoad(options) {
|
||||
const accountInfo = wx.getAccountInfoSync();
|
||||
console.log(accountInfo.miniProgram);
|
||||
this.setData({
|
||||
appid: accountInfo.miniProgram.appId,
|
||||
});
|
||||
@ -63,7 +62,6 @@ Page({
|
||||
page: that.data.page,
|
||||
page_size: that.data.page_size,
|
||||
}).then(res => {
|
||||
console.log('res', res);
|
||||
// generate stable ids across pages so we can prepend without collisions
|
||||
const base = (that.data.page - 1) * that.data.page_size;
|
||||
const list = res.list.map((item, index) => {
|
||||
@ -77,7 +75,6 @@ Page({
|
||||
// only auto-scroll if user is at bottom
|
||||
scrollToId: that.data.isAtBottom ? (list[list.length - 1] ? list[list.length - 1].id : '') : that.data.scrollToId
|
||||
});
|
||||
console.log('messages', list);
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
// 引入公共资源(原生小程序中需确保路径正确,若为工具类可直接 require,若为静态资源需用绝对路径)
|
||||
const common_vendor = require("../../common/vendor.js");
|
||||
const common_assets = require("../../common/assets.js");
|
||||
const request = require('../../api/request.js');
|
||||
|
||||
// 定义舞蹈列表数据(原生小程序用普通数组存储,无需 ref 响应式包装)
|
||||
const danceList = [
|
||||
@ -146,17 +147,23 @@ Page({
|
||||
});
|
||||
},
|
||||
handleContact() {
|
||||
wx.requestSubscribeMessage({
|
||||
tmplIds: ['9dCV3z7vRPBGm8iMtSXsD7ZVyUjld46w7HTH9zLnzWw'],
|
||||
success: (res) => {
|
||||
wx.navigateTo({
|
||||
url: `/pages/contact/index`
|
||||
});
|
||||
},
|
||||
fail: (err) => {
|
||||
console.log(err);
|
||||
}
|
||||
});
|
||||
|
||||
const accountInfo = wx.getAccountInfoSync();
|
||||
request('wechat/template', 'post', {
|
||||
app_id: accountInfo.miniProgram.appId
|
||||
}).then((res) => {
|
||||
// return
|
||||
wx.requestSubscribeMessage({
|
||||
tmplIds: [res.template_id],
|
||||
success: (res) => {
|
||||
wx.navigateTo({
|
||||
url: `/pages/contact/index`
|
||||
});
|
||||
},
|
||||
fail: (err) => {
|
||||
console.log(err);
|
||||
}
|
||||
});
|
||||
})
|
||||
|
||||
}
|
||||
});
|
||||
Loading…
x
Reference in New Issue
Block a user