Tasl:旅居分享

This commit is contained in:
linxi
2025-05-09 15:16:07 +08:00
parent 94efec7281
commit 25c2290564
2 changed files with 47 additions and 4 deletions
+5
View File
@@ -147,4 +147,9 @@ export function postJiaLouNewsView(data) {
// 旅居资讯点赞
export function postJiaLouNewsZan(data) {
return request.post('/countyFamous/news/zan', data, {login: true})
}
// 分享旅居
export function postJiaLouShare(id) {
return request.get('/countyFamous/sojourn/poster/' + id, {login: true})
}
+42 -4
View File
@@ -103,9 +103,9 @@
<view class="inn-signature">
{{ store.shopIntro }}
</view>
<!-- <view class="share-btn" @click="changeShare">
<view class="share-btn" @click="changeShare">
<image :src="webUrl + '/page/hotel/share.png'" class="img" />
</view> -->
</view>
</view>
<view v-if="store.name" class="map-wrapper">
<view class="map-cont">
@@ -307,6 +307,29 @@
</view>
</view>
</view>
<!-- 分享 -->
<u-popup
:show="showShare"
mode="center"
bgColor="transparent"
>
<view class="box-share">
<view class="box-img">
<image
:src="webUrl + '/20230608112219219303.png'"
class="icon"
@click="closeShare"
/>
<image :src="posterUrl" class="main-img" mode="widthFix" />
</view>
<image
:src="webUrl + '/20230608112210135038.png'"
mode="widthFix"
class="btn"
@click="saveImg"
/>
</view>
</u-popup>
</view>
</template>
@@ -316,7 +339,8 @@ import {
getJiaLouNews,
postJiaLouNewsView,
postJiaLouNewsZan,
postJiaLouZan
postJiaLouZan,
postJiaLouShare
} from '@/api/qianxian'
import imgBox from '@/components/imageTypeSet/imagebox.vue'
export default {
@@ -344,6 +368,7 @@ export default {
infoArray: [],
videoPlayers: [],
activeVideo: 'coverVideo',
showShare: false
}
},
onPageScroll(e) {
@@ -354,6 +379,18 @@ export default {
this.getFarmerData()
},
methods: {
changeShare() {
uni.showLoading()
postJiaLouShare(this.id).then(res => {
this.posterUrl = res.data
this.showShare = !this.showShare
}).finally(() => {
uni.hideLoading()
})
},
closeShare() {
this.showShare = false
},
goGoodsConByID(item) {
this.$yrouter.push({
path: '/pages/shop/GoodsCon/index',
@@ -511,6 +548,7 @@ export default {
</script>
<style lang="less" scoped>
@import "@/assets/css/store.less";
.btn {
.img {
display: block;
@@ -806,7 +844,7 @@ export default {
position: relative;
z-index: 2;
height: 200rpx;
margin: 20rpx 0 0 0;
margin: 40rpx 0 0 0;
overflow: hidden;
.map-cont {
position: absolute;