...
|
...
|
@@ -14,11 +14,17 @@ Page({ |
|
|
* 生命周期函数--监听页面加载
|
|
|
*/
|
|
|
onLoad: function (options) {
|
|
|
wx.showLoading({
|
|
|
title: '加载中',
|
|
|
})
|
|
|
let api = new NativeTestService();
|
|
|
this.setData({
|
|
|
api:api
|
|
|
})
|
|
|
this.data.api.getHomePageList({page: 1, limit: 20}).then(data => {
|
|
|
});
|
|
|
// () => {} 为 微信原生请求中的 complete
|
|
|
this.data.api.getHomePageList({page: 1, limit: 20}, () => {
|
|
|
wx.hideLoading();
|
|
|
}).then(data => {
|
|
|
console.log(data);
|
|
|
})
|
|
|
// GET({
|
...
|
...
|
|