// module/article/components/waterfall-card/waterfall-card.ts // import { HOST } from "../../../../app.config"; import { Get } from "../../../../lib/request/method"; Component({ properties: { item: { type: Object, value: {} }, index: { type: Number, value: 0 }, replace: { type: Boolean, value: false }, }, data: {}, methods: { async toInfoPage(event: WechatMiniprogram.TouchEvent) { const id = event.currentTarget.id; // const url = `https://${HOST}/admin/editor/preview.html?popularScienceArticleId=${id}`; try { const res = await Get(`/psarticle/clickPsarticle`, { params: { popularScienceArticleId: id }, }); const url = res?.data; const item = { url, }; wx.navigateTo({ url: `/module/article/pages/science-info/science-info`, }).then((res) => { res.eventChannel.emit("load", item); }); } catch (error) { console.log(error); } }, }, });