|
|
@ -4,6 +4,8 @@ const app = getApp<IAppOption>(); |
|
|
|
|
|
|
|
|
|
|
|
Page({ |
|
|
|
Page({ |
|
|
|
data: { |
|
|
|
data: { |
|
|
|
|
|
|
|
Timestamp: '', |
|
|
|
|
|
|
|
|
|
|
|
popupShow: false, |
|
|
|
popupShow: false, |
|
|
|
popupType: 'popup1', // 绑定医生弹窗
|
|
|
|
popupType: 'popup1', // 绑定医生弹窗
|
|
|
|
// popupType: 'popup2', // 去关注弹窗
|
|
|
|
// popupType: 'popup2', // 去关注弹窗
|
|
|
@ -59,6 +61,10 @@ Page({ |
|
|
|
}); |
|
|
|
}); |
|
|
|
}, |
|
|
|
}, |
|
|
|
handleWebview() { |
|
|
|
handleWebview() { |
|
|
|
|
|
|
|
// wx.showToast({
|
|
|
|
|
|
|
|
// title: '访问路径:公众号“TED关爱中心”底部菜单栏',
|
|
|
|
|
|
|
|
// icon: 'none',
|
|
|
|
|
|
|
|
// });
|
|
|
|
const encodeUrl = encodeURIComponent('https://dct.meddb.cn'); |
|
|
|
const encodeUrl = encodeURIComponent('https://dct.meddb.cn'); |
|
|
|
wx.navigateTo({ |
|
|
|
wx.navigateTo({ |
|
|
|
url: `/pages/webview/index?url=${encodeUrl}`, |
|
|
|
url: `/pages/webview/index?url=${encodeUrl}`, |
|
|
@ -70,6 +76,9 @@ Page({ |
|
|
|
url: '?r=xd/doctor/index/get-latest-mini-msg', |
|
|
|
url: '?r=xd/doctor/index/get-latest-mini-msg', |
|
|
|
data: {}, |
|
|
|
data: {}, |
|
|
|
}).then((res) => { |
|
|
|
}).then((res) => { |
|
|
|
|
|
|
|
if (res.list.length) { |
|
|
|
|
|
|
|
app.mpBehavior({ PositionId: '4', OperateType: '4', OperateId: res.list[0].Id }); |
|
|
|
|
|
|
|
} |
|
|
|
this.setData({ |
|
|
|
this.setData({ |
|
|
|
notice: res.list.map((item) => { |
|
|
|
notice: res.list.map((item) => { |
|
|
|
item.year = dayjs(item.PublishDate).format('YYYY'); |
|
|
|
item.year = dayjs(item.PublishDate).format('YYYY'); |
|
|
@ -98,12 +107,16 @@ Page({ |
|
|
|
}); |
|
|
|
}); |
|
|
|
}, |
|
|
|
}, |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
this.handleNotice(); |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
handleSwiperChange(e) { |
|
|
|
handleSwiperChange(e) { |
|
|
|
const current = e.detail.current; |
|
|
|
const current = e.detail.current; |
|
|
|
const { Id } = this.data.notice[current]; |
|
|
|
const { Id } = this.data.notice[current] || {}; |
|
|
|
app.mpBehavior({ PositionId: '4', OperateType: '4', OperateId: Id }); |
|
|
|
if (Id) { |
|
|
|
|
|
|
|
app.mpBehavior({ PositionId: '4', OperateType: '4', OperateId: Id }); |
|
|
|
|
|
|
|
} |
|
|
|
this.setData({ |
|
|
|
this.setData({ |
|
|
|
current: e.detail.current, |
|
|
|
current: e.detail.current, |
|
|
|
}); |
|
|
|
}); |
|
|
@ -124,6 +137,7 @@ Page({ |
|
|
|
handleBanner(e) { |
|
|
|
handleBanner(e) { |
|
|
|
const { index } = e.currentTarget.dataset; |
|
|
|
const { index } = e.currentTarget.dataset; |
|
|
|
const { LinkUrl } = this.data.bannerList[index]; |
|
|
|
const { LinkUrl } = this.data.bannerList[index]; |
|
|
|
|
|
|
|
if (!LinkUrl) return; |
|
|
|
wx.navigateTo({ |
|
|
|
wx.navigateTo({ |
|
|
|
url: LinkUrl, |
|
|
|
url: LinkUrl, |
|
|
|
fail() { |
|
|
|
fail() { |
|
|
@ -228,7 +242,9 @@ Page({ |
|
|
|
imageUrl: CoverImgUrl, |
|
|
|
imageUrl: CoverImgUrl, |
|
|
|
}; |
|
|
|
}; |
|
|
|
} |
|
|
|
} |
|
|
|
return {}; |
|
|
|
return { |
|
|
|
|
|
|
|
imageUrl: `${app.globalData.imageUrl}share.png?t=${this.data.Timestamp}`, |
|
|
|
|
|
|
|
}; |
|
|
|
}, |
|
|
|
}, |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|