Browse Source

鸡头米专题

master
jiazhipeng 2 months ago
parent
commit
e2fe10fd79
  1. 6
      pages.json
  2. 3
      pages/index/index.vue
  3. 2
      subPackages/activity/agriculturalProd.vue
  4. 218
      subPackages/activity/jitoumi.vue
  5. 16
      subPackages/food/detail.vue

6
pages.json

@ -331,6 +331,12 @@
"style": {
"navigationBarTitleText" : ""
}
},
{
"path": "activity/jitoumi",
"style": {
"navigationBarTitleText" : "水八仙之首—苏州芡实 (鸡头米)"
}
}
]
}],

3
pages/index/index.vue

@ -31,7 +31,6 @@
</view>
<!-- 小轮播 -->
<!-- 2025-8-13 固定一个打开村咖地图 -->
<swiper class="small-banner" :circular="true" :interval="6000" style="margin-top: 27rpx;"
:duration="800" :indicator-dots="false" :autoplay="true" v-if="smallBanner && smallBanner.length > 0">
<swiper-item v-for="(item, index) in smallBanner" :key="index" @click.stop="gotoBannerDetail(item)">
@ -203,6 +202,8 @@
},
// 广
gotoBannerDetail(item) {
if (this.SHFlag) { return }
// 1 2 3 4
switch (item.jump_type){

2
subPackages/activity/agriculturalProd.vue

@ -16,7 +16,7 @@
<image class="adv-image" mode="aspectFill" @click="gotoPath('/subPackages/activity/agriculturalProdNH')"
src="https://static.ticket.sz-trip.com/uploads/20250815/3786f50e9baa674b850df7383fa6ed88.png"></image>
<image class="title-image" style="margin-bottom: 30rpx;" src="https://static.ticket.sz-trip.com/uploads/20250815/f6265c71d82564b08a4610822d90159b.png"></image>
<image class="title-image" style="margin-bottom: 30rpx;" src="https://static.ticket.sz-trip.com/uploads/20250821/e45546af63bafab92ac2e8783d7b079c.png"></image>
<view class="row-product" v-for="(item,index) in list.slice(0,viewNum)"
:key="index" @click="gotoDetailByType(item)">

218
subPackages/activity/jitoumi.vue

@ -0,0 +1,218 @@
<template>
<view class="bg">
<image v-if="headImg" :src="showImg(headImg)" class="topImg" mode="widthFix"></image>
<view class="main-container">
<image class="title-image" src="https://static.ticket.sz-trip.com/uploads/20250822/a7ab5b85fcc1085c14f4a2ec23f0692f.png"></image>
<image class="adv-image" mode="aspectFill" @click="gotoPath('/subPackages/activity/agriculturalProdNH')"
src="https://static.ticket.sz-trip.com/uploads/20250822/2393a3923a07f2f1112ad0210f37021d.png"></image>
<image class="title-image" style="margin-bottom: 38rpx;width: 100%;height: 3rpx;"
src="https://static.ticket.sz-trip.com/uploads/20250822/321e0c681ddbcc6853d6312eb69742c9.png"></image>
<view class="row-product" v-for="(item,index) in list.slice(0,viewNum)"
:key="index" @click="gotoDetailByType(item)">
<image class="img" :src="showImg(item.headimg)" mode="aspectFill"></image>
<view class="content flex-column">
<view class="title text-overflowRows">{{item.title}}</view>
<view class="tags" v-if="item.display_tags">
<view class="tag" v-for="(tag,tagI) in item.display_tags.split(',')" :key="tagI">{{tag}}</view>
</view>
<view class="flex-between">
<view class="price">{{item.price/100}}</view>
<view class="btn">立即购买</view>
</view>
</view>
</view>
<view class="view-more" v-if="list.length>0&&viewNum<=5" @click="viewNum=999">查看更多</view>
<image class="bottom-img" src="https://static.ticket.sz-trip.com/uploads/20250822/19236de541dc0d75e4e23be36ba98a45.png"></image>
<image @click="returnTop" v-show="showGoTop" class="back-img" src="https://static.ticket.sz-trip.com/uploads/20250822/ebc1045d4519507258b9aff74d004b36.png"></image>
</view>
</view>
</template>
<script>
export default {
data() {
return {
list: [],
viewNum: 5,
headImg: '',
showGoTop: false,
}
},
onLoad(option) {
},
onReady() {
this.getHeadImg(2390)
this.getGoods()
},
methods: {
getHeadImg (id) {
this.Post({id},'/api/multimedia/detail').then(res => {
this.headImg = res.data.head_img
uni.setNavigationBarTitle({
title:res.data.title
})
});
},
//
getGoods() {
this.Post({
tag_id: 100,
offset: 0,
limit: 999,
},'/api/product/get_product_by_tag_subject').then(res => {
if (res.data.length < this.viewNum) {
this.viewNum = 999
}
this.list = res.data.list
})
},
viewDetail(item) {
this.gotoDetailByType(item)
},
returnTop(){
uni.pageScrollTo({
scrollTop: 0,
duration: 200,
})
},
},
onPageScroll(res) {
this.showGoTop = res.scrollTop > 200 ? true : false;
}
}
</script>
<style lang="scss" scoped>
.bg {
width: 750rpx;
min-height: 100vh;
background: #FFE9CD;
padding-bottom: 60rpx;
}
.topImg {
width: 100%;
}
.main-container{
width: 100%;
padding: 0 26rpx;
.title-image{
width: 494.67rpx;
height: 36rpx;
margin: 0 auto;
display: block;
}
.adv-image{
margin: 31rpx 0 40rpx;
width: 100%;
height: 200rpx;
}
}
.row-product{
width: 100%;
height: 227rpx;
background: #FFFFFF;
border-radius: 8rpx;
padding: 6rpx;
display: flex;
margin-bottom: 22rpx;
.img{
width: 213rpx;
height: 100%;
border-radius: 7rpx;
flex-shrink: 0;
}
.content{
width: 100rpx;
flex: 1;
justify-content: space-between;
padding: 6rpx 0 6rpx 22rpx;
}
.price{
font-weight: bold;
font-size: 40rpx;
color: #F13E35;
&::before{
content: "¥";
font-size: 24rpx;
}
&::after{
content: "起";
font-size: 24rpx;
}
}
.btn{
width: 164rpx;
height: 50rpx;
background: #FF9838;
border-radius: 25rpx;
font-weight: bold;
font-size: 27rpx;
color: #FFFFFF;
line-height: 50rpx;
text-align: center;
}
}
.title{
font-weight: bold;
font-size: 29rpx;
color: #000000;
}
.tags{
width: 100%;
display: flex;
overflow: hidden;
.tag{
font-weight: 500;
font-size: 24rpx;
height: 38rpx;
line-height: 38rpx;
color: #682809;
padding: 0rpx 6rpx;
border-radius: 5rpx;
border: 1px solid #682809;
margin-right: 13rpx;
}
}
.view-more{
// border: 1px solid #4C9BB4;
line-height: 53rpx;
font-weight: 500;
font-size: 25rpx;
color: #682809;
text-align: center;
margin: 32rpx auto 50rpx;
width: 253rpx;
height: 53rpx;
background: #FFFFFF;
border-radius: 27rpx;
}
.bottom-img{
width: 174.67rpx;
height: 78rpx;
margin: 74rpx auto 0;
display: block;
}
.back-img{
position: fixed;
width: 66rpx;
height: 66rpx;
bottom: 66rpx;
right: 26rpx;
}
</style>

16
subPackages/food/detail.vue

@ -236,7 +236,7 @@
},
goMap () {
if (!this.info.lat || !this.info.lon) {
if (!this.info.scene_lat || !this.info.scene_lon) {
uni.showToast({
title: '暂未配置地理位置',
icon: 'none'
@ -245,13 +245,13 @@
}
uni.openLocation({
latitude: Number(this.info.lat),
longitude: Number(this.info.lon),
name: this.info.title,
address: this.info.address,
success: function () {
console.log('success');
}
latitude: Number(this.info.scene_lat),
longitude: Number(this.info.scene_lon),
name: this.info.scene_name,
address: this.info.scene_address,
// success: function () {
// console.log('success');
// }
});
},

Loading…
Cancel
Save