23 lines
299 B
JavaScript
23 lines
299 B
JavaScript
// index.js
|
|
// 获取应用实例
|
|
const { index, util} = getApp().globalData
|
|
|
|
Page({
|
|
data: {
|
|
list: {}
|
|
},
|
|
|
|
onLoad() {
|
|
util.test();
|
|
this.getHome();
|
|
|
|
},
|
|
async getHome() {
|
|
let res = await index.home();
|
|
this.setData({
|
|
list: res
|
|
})
|
|
console.log(res);
|
|
}
|
|
})
|