百科新增loading
This commit is contained in:
parent
3def3bf68b
commit
37c8d6560f
|
@ -21,7 +21,6 @@ Component({
|
|||
},
|
||||
lifetimes: {
|
||||
attached() {
|
||||
console.log('----------=========')
|
||||
this.getData();
|
||||
}
|
||||
},
|
||||
|
@ -29,7 +28,7 @@ Component({
|
|||
* 组件的方法列表
|
||||
*/
|
||||
methods: {
|
||||
async getData() {
|
||||
async init() {
|
||||
const page = this.data.page;
|
||||
const id = this.id;
|
||||
const { code, data, message, total } = await getEncyclopediaList(id, page);
|
||||
|
@ -39,6 +38,11 @@ Component({
|
|||
}
|
||||
this.setData({ list: data, totalPage: Math.ceil(total / 20) });
|
||||
},
|
||||
async getData() {
|
||||
loadingFunc(async() => {
|
||||
await this.init();
|
||||
})
|
||||
},
|
||||
jumpToDetail(e) {
|
||||
console.log('e', e)
|
||||
wx.navigateTo({
|
||||
|
|
Loading…
Reference in New Issue
Block a user