Browse Source

bug处理

master
kola-web 7 days ago
parent
commit
04e7e2af93
  1. 13
      src/pages/home/index.ts
  2. 2
      src/pages/home/index.wxml

13
src/pages/home/index.ts

@ -111,14 +111,11 @@ Page({
}, },
}); });
}, },
getList(newPage = 1) { getList() {
wx.ajax({ wx.ajax({
method: 'GET', method: 'GET',
url: '?r=xd/doctor/index/get-latest-material', url: '?r=xd/doctor/index/get-latest-material',
data: { data: {},
page: newPage,
count: 3,
},
}).then((res) => { }).then((res) => {
res.list.forEach((item) => { res.list.forEach((item) => {
item.PublishTime = dayjs(item.PublishTime).format('YYYY-MM-DD'); item.PublishTime = dayjs(item.PublishTime).format('YYYY-MM-DD');
@ -135,12 +132,6 @@ Page({
}); });
}); });
}, },
onReachBottom() {
const { page, pages } = this.data.pagination;
if (pages > page) {
this.getList(page + 1);
}
},
handleDetail(e: any) { handleDetail(e: any) {
const { id } = e.currentTarget.dataset; const { id } = e.currentTarget.dataset;
wx.navigateTo({ wx.navigateTo({

2
src/pages/home/index.wxml

@ -141,7 +141,7 @@
<swiper <swiper
class="swiper" class="swiper"
autoplay autoplay
indicator-dots indicator-dots="{{bannerList.length > 1}}"
indicator-color="rgba(231, 234, 236, 1)" indicator-color="rgba(231, 234, 236, 1)"
indicator-active-color="rgba(195, 148, 255, 1)" indicator-active-color="rgba(195, 148, 255, 1)"
> >

Loading…
Cancel
Save