Compare commits

..

No commits in common. "3c82008e2e13e27278ec95e209bc83fadb1d7ef0" and "0ee66f13383fd906c707fc7c7563ba85e6e4ae96" have entirely different histories.

2 changed files with 15 additions and 19 deletions

View File

@ -31,6 +31,7 @@ Page({
*/
onLoad(options) {
const accountInfo = wx.getAccountInfoSync();
console.log(accountInfo.miniProgram);
this.setData({
appid: accountInfo.miniProgram.appId,
});
@ -62,6 +63,7 @@ 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) => {
@ -75,6 +77,7 @@ 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);
})
},

View File

@ -1,7 +1,6 @@
// 引入公共资源(原生小程序中需确保路径正确,若为工具类可直接 require若为静态资源需用绝对路径
const common_vendor = require("../../common/vendor.js");
const common_assets = require("../../common/assets.js");
const request = require('../../api/request.js');
// 定义舞蹈列表数据(原生小程序用普通数组存储,无需 ref 响应式包装)
const danceList = [
@ -147,23 +146,17 @@ Page({
});
},
handleContact() {
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);
}
});
})
wx.requestSubscribeMessage({
tmplIds: ['9dCV3z7vRPBGm8iMtSXsD7ZVyUjld46w7HTH9zLnzWw'],
success: (res) => {
wx.navigateTo({
url: `/pages/contact/index`
});
},
fail: (err) => {
console.log(err);
}
});
}
});