From fc47a981f935a06ec43a2e1f4ecd34fce7e4c399 Mon Sep 17 00:00:00 2001 From: modendeveloper Date: Sat, 30 Nov 2024 12:20:20 +0800 Subject: [PATCH] =?UTF-8?q?Feat=EF=BC=9A=E5=8D=83=E5=8E=BF=E5=9F=8E?= =?UTF-8?q?=E5=B8=82=E5=88=86=E4=BA=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/qianxian.js | 5 +++++ pkg_product/views/famousQianxianShop.vue | 20 +++++++++++++++----- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/api/qianxian.js b/api/qianxian.js index bbe592d..8dab74b 100644 --- a/api/qianxian.js +++ b/api/qianxian.js @@ -94,3 +94,8 @@ export function getCountyFamousVillageDetail(id) { export function getCountyFamousVillageNews(param) { return request.get('/countyFamous/village/news', param, { login: true }) } + +// 获取千县分享图 +export function getShareImg(id) { + return request.get('/countyFamous/poster/' + id, {login: true}) +} diff --git a/pkg_product/views/famousQianxianShop.vue b/pkg_product/views/famousQianxianShop.vue index b2670cb..bdf94ca 100644 --- a/pkg_product/views/famousQianxianShop.vue +++ b/pkg_product/views/famousQianxianShop.vue @@ -93,9 +93,9 @@ {{ inn.shopIntro }} - + @@ -600,7 +600,7 @@ @@ -628,7 +628,8 @@ import { getCountyFamousIndustryProject, getCountyFamousInvestmentFile, getCountyFamousVillage, - getCountyFamousCityDetail + getCountyFamousCityDetail, + getShareImg } from '@/api/qianxian' import {formatDateTime} from '@/utils' import {getUrlParam} from '@/utils/common.js' @@ -953,7 +954,16 @@ export default { } }, changeShare() { - this.showShare = !this.showShare + uni.showLoading() + getShareImg(this.id).then(res => { + this.posterUrl = res.data + this.showShare = !this.showShare + }).finally(() => { + uni.hideLoading() + }) + }, + closeShare() { + this.showShare = false }, saveImg() { const _this = this