diff --git a/api/product.js b/api/product.js index d2bab44..1268d51 100644 --- a/api/product.js +++ b/api/product.js @@ -155,4 +155,8 @@ export function hadLike(data) { export function hadView(data) { return request.post('/landmarkGoods/news/view', data, {login: false}) +} + +export function getShareImg(id) { + return request.get('/landmarkGoods/poster/' + id, {}, {login: false}) } \ No newline at end of file diff --git a/pages/home/components/shareImg.vue b/pages/home/components/shareImg.vue new file mode 100644 index 0000000..dbd42b9 --- /dev/null +++ b/pages/home/components/shareImg.vue @@ -0,0 +1,149 @@ + + + + + diff --git a/pages/home/landMark.vue b/pages/home/landMark.vue index 46a4489..cb0199e 100644 --- a/pages/home/landMark.vue +++ b/pages/home/landMark.vue @@ -28,6 +28,7 @@ class="img-map" /> + 分享给好友 @@ -71,6 +72,7 @@ v-else :show-avatar="false" /> + @@ -85,13 +87,15 @@ import { pageListenMixins } from '@/mixins/pageListenMixins' import projects from './components/projects.vue' import culture from "./components/culture.vue" import information from "./components/information.vue" +import shareImg from "./components/shareImg.vue" export default { name: 'LandMarkPage', components: { goods, projects, culture, - information + information, + shareImg }, mixins: [pageListenMixins], data() { @@ -112,7 +116,8 @@ export default { mapData: null, goods: [], isCompleteLoadGood: false, - pageKeyId: Object.freeze('landmarkGoodsIndex') + pageKeyId: Object.freeze('landmarkGoodsIndex'), + posterImageStatus: false } }, computed: { @@ -134,6 +139,9 @@ export default { this.fetchGoods() }, methods: { + toShare() { + this.$refs.shareImg.savePosterPath(this.landmarkDataId) + }, handleTab(value) { this.actived = value }, @@ -181,6 +189,19 @@ export default {