| | |
| | | // components/detailFooter/index.js |
| | | import { getContentShareImg } from '../../api/index' |
| | | Component({ |
| | | /** |
| | | * 组件的属性列表 |
| | | */ |
| | | properties: { |
| | | |
| | | info: Object, |
| | | path: String, |
| | | }, |
| | | |
| | | /** |
| | |
| | | }) |
| | | }, |
| | | methods: { |
| | | handleEnjoy() { |
| | | const { info } = this.data |
| | | this.triggerEvent('enjoy', { |
| | | type: 'enjoy', flag: !info.isEnjoy |
| | | }) |
| | | }, |
| | | handleCollec() { |
| | | const { info } = this.data |
| | | this.triggerEvent('enjoy', { |
| | | type: 'collec', flag: !info.isCollection |
| | | }) |
| | | }, |
| | | handleDown() { |
| | | const { info, path } = this.data |
| | | getContentShareImg({ |
| | | articleId: info.id, |
| | | type: '1', |
| | | pageUrl: path, |
| | | imgurl: info.coverImage, |
| | | |
| | | }) |
| | | }, |
| | | openShare() { |
| | | console.log('点击打开'); |
| | | this.setData({ showShare: true }) |