From 862e624913a7b2704d04f3b52404a21d7ef67f5a Mon Sep 17 00:00:00 2001 From: modendeveloper Date: Sun, 24 Nov 2024 16:10:14 +0800 Subject: [PATCH] =?UTF-8?q?Fix=EF=BC=9A2630=20=E3=80=90=E5=95=86=E5=9F=8E?= =?UTF-8?q?=E5=B0=8F=E7=A8=8B=E5=BA=8F=E3=80=91=E5=9C=B0=E6=A0=87=E5=A5=BD?= =?UTF-8?q?=E7=89=A9=E5=A2=9E=E5=8A=A0=E5=88=86=E4=BA=AB=E6=8C=89=E9=92=AE?= =?UTF-8?q?=EF=BC=8C=E7=82=B9=E5=87=BB=E5=90=8E=E5=BC=B9=E5=87=BA=E5=88=86?= =?UTF-8?q?=E4=BA=AB=E5=9B=BE=E7=89=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/product.js | 4 + pages/home/components/shareImg.vue | 149 +++++++++++++++++++++++++++++ pages/home/landMark.vue | 25 ++++- 3 files changed, 176 insertions(+), 2 deletions(-) create mode 100644 pages/home/components/shareImg.vue 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 {