|
|
@ -27,8 +27,8 @@ |
|
|
|
</view> |
|
|
|
<view class="menu-right flex-around"> |
|
|
|
<swiper class="menu-right" :circular="true" :interval="6000" |
|
|
|
:duration="800" :indicator-dots="false" :autoplay="true" v-if="topBanner"> |
|
|
|
<swiper-item v-for="(item, index) in topBanner" :key="index" @click.stop="gotoUrlNew(item)"> |
|
|
|
:duration="800" :indicator-dots="false" :autoplay="true" v-if="smallBanner"> |
|
|
|
<swiper-item v-for="(item, index) in smallBanner" :key="index" @click.stop="gotoUrlNew(item)"> |
|
|
|
<image class="menu-right" :src="showImg(item.head_img)" mode="aspectFill" lazy-load="true"></image> |
|
|
|
</swiper-item> |
|
|
|
</swiper> |
|
|
@ -38,10 +38,11 @@ |
|
|
|
<!-- 非遗手札 --> |
|
|
|
<view class="title-box flex-between"> |
|
|
|
<image src="https://static.ticket.sz-trip.com/cgc/images/index/title1.png" mode=""></image> |
|
|
|
<image src="https://static.ticket.sz-trip.com/cgc/images/index/more.png" mode=""></image> |
|
|
|
<image src="https://static.ticket.sz-trip.com/cgc/images/index/more.png" mode="" @click="gotoPath('/subPackages/letter/index')"></image> |
|
|
|
</view> |
|
|
|
<view class="handwritten-box flex-between"> |
|
|
|
<image :src="showImg(item.head_img)" mode="aspectFill" v-for="(item,index) in handwrittenList" :key="index"></image> |
|
|
|
<image :src="showImg(item.image)" mode="aspectFill" v-for="(item,index) in handwrittenList" :key="index" |
|
|
|
@click="gotoPath('/subPackages/letter/detail?id='+item.id)"></image> |
|
|
|
</view> |
|
|
|
|
|
|
|
<!-- 非遗时光 --> |
|
|
@ -49,7 +50,7 @@ |
|
|
|
<image src="https://static.ticket.sz-trip.com/cgc/images/index/title2.png" mode=""></image> |
|
|
|
<image src="https://static.ticket.sz-trip.com/cgc/images/index/more.png" mode="" @click="gotoPath('/subPackages/shiguang/index')"></image> |
|
|
|
</view> |
|
|
|
<view class="time-box" style="background-image: url('https://static.ticket.sz-trip.com/uploads/20230920/7cdb05709d09cc2c86ea5671bd657c85.jpg')"> |
|
|
|
<view class="time-box" :style="{backgroundImage: 'url('+showImg(shiguang.image)+')'}" @click="gotoVideo(shiguang)"> |
|
|
|
<image src="https://static.ticket.sz-trip.com/cgc/images/index/play.png" class="play"></image> |
|
|
|
</view> |
|
|
|
|
|
|
@ -69,7 +70,7 @@ |
|
|
|
<view class="hot-content"> |
|
|
|
<view class="title text-overflowRows">{{item.title || item.name}}</view> |
|
|
|
<view class="subtitle" v-if="hotIndex"> |
|
|
|
<image :src="item.src" mode="aspectFill"></image> |
|
|
|
<image src="https://static.ticket.sz-trip.com/tongli/images/index/user.png" mode="aspectFill"></image> |
|
|
|
{{item.author}} |
|
|
|
</view> |
|
|
|
</view> |
|
|
@ -83,14 +84,8 @@ |
|
|
|
export default { |
|
|
|
data() { |
|
|
|
return { |
|
|
|
topBanner: [ |
|
|
|
{ |
|
|
|
head_img: 'https://static.ticket.sz-trip.com/uploads/20230920/7cdb05709d09cc2c86ea5671bd657c85.jpg' |
|
|
|
}, |
|
|
|
{ |
|
|
|
head_img: 'https://changshu.js-dyyj.com/uploads/20250418/8a7631a1955ca05e619c0a25ad5ac1d1.jpg' |
|
|
|
} |
|
|
|
], |
|
|
|
topBanner: [], |
|
|
|
smallBanner: [], |
|
|
|
menuList: [ |
|
|
|
{ |
|
|
|
path: '' |
|
|
@ -111,12 +106,8 @@ |
|
|
|
path: '' |
|
|
|
} |
|
|
|
], |
|
|
|
handwrittenList: [ |
|
|
|
{head_img: 'https://static.ticket.sz-trip.com/uploads/20230920/7cdb05709d09cc2c86ea5671bd657c85.jpg'}, |
|
|
|
{head_img: 'https://static.ticket.sz-trip.com/uploads/20230920/7cdb05709d09cc2c86ea5671bd657c85.jpg'}, |
|
|
|
{head_img: 'https://static.ticket.sz-trip.com/uploads/20230920/7cdb05709d09cc2c86ea5671bd657c85.jpg'}, |
|
|
|
{head_img: 'https://static.ticket.sz-trip.com/uploads/20230920/7cdb05709d09cc2c86ea5671bd657c85.jpg'}, |
|
|
|
], |
|
|
|
handwrittenList: [], |
|
|
|
shiguang: {}, |
|
|
|
hotType: [ |
|
|
|
{ |
|
|
|
title: '好物推荐', |
|
|
@ -142,7 +133,7 @@ |
|
|
|
this.getLocation() |
|
|
|
} |
|
|
|
|
|
|
|
this.topBanner() |
|
|
|
this.getList() |
|
|
|
this.changeType(0) |
|
|
|
}, |
|
|
|
onReachBottom() { |
|
|
@ -151,16 +142,84 @@ |
|
|
|
}, 1000); |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
getBanner() { |
|
|
|
getList() { |
|
|
|
// 大轮播 |
|
|
|
// this.Post({ |
|
|
|
// type_id: 3, |
|
|
|
// position: 6, |
|
|
|
// }, '/api/adv/getAdv').then(res => { |
|
|
|
// if (res.data) { |
|
|
|
// // this.topBanner = res.data; |
|
|
|
// } |
|
|
|
// }); |
|
|
|
this.Post({ |
|
|
|
type_id: 3, |
|
|
|
position: 1, |
|
|
|
}, '/api/adv/getAdv').then(res => { |
|
|
|
if(res.data) { |
|
|
|
this.topBanner = res.data; |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
// 小轮播 |
|
|
|
this.Post({ |
|
|
|
type_id: 3, |
|
|
|
position: 2, |
|
|
|
}, '/api/adv/getAdv').then(res => { |
|
|
|
if(res.data) { |
|
|
|
this.smallBanner = res.data; |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
// 非遗手札 |
|
|
|
this.Post({ |
|
|
|
type_id: 1, |
|
|
|
offset: 0, |
|
|
|
limit: 4 |
|
|
|
}, '/api/article/getArticleByType').then(res => { |
|
|
|
if(res.data) { |
|
|
|
this.handwrittenList = res.data |
|
|
|
} |
|
|
|
}) |
|
|
|
|
|
|
|
// 非遗拾光 |
|
|
|
this.Post({ |
|
|
|
type_id: 2, |
|
|
|
offset: 0, |
|
|
|
limit: 1 |
|
|
|
}, '/api/article/getArticleByType').then(res => { |
|
|
|
if(res.data) { |
|
|
|
this.shiguang = res.data[0] |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 2是各种详情页,3是列表专题页面,4是小程序 |
|
|
|
gotoUrlNew(item) { |
|
|
|
console.log(item); |
|
|
|
let that = this; |
|
|
|
let url = ''; |
|
|
|
switch (item.jump_type) { |
|
|
|
case 0: |
|
|
|
break; |
|
|
|
case 2: |
|
|
|
uni.navigateTo({ |
|
|
|
url: item.tdata |
|
|
|
}); |
|
|
|
break; |
|
|
|
case 3: |
|
|
|
uni.navigateTo({ |
|
|
|
url: '/subPackages/webPage/webPage?url=' + item.tdata |
|
|
|
}); |
|
|
|
break; |
|
|
|
case 4: |
|
|
|
uni.navigateToMiniProgram({ |
|
|
|
appId: item.tdata.appid, // 此为appid |
|
|
|
path: item.tdata.page, // 此为首页路径 |
|
|
|
envVersion: 'release', |
|
|
|
success: res => { |
|
|
|
// 打开成功 |
|
|
|
console.log('打开成功', res); |
|
|
|
}, |
|
|
|
fail: err => { |
|
|
|
console.log(err); |
|
|
|
} |
|
|
|
}); |
|
|
|
break; |
|
|
|
default: |
|
|
|
break; |
|
|
|
} |
|
|
|
}, |
|
|
|
// 瀑布流 |
|
|
|
getColumnItems(columnIndex) { |
|
|
@ -188,9 +247,9 @@ |
|
|
|
this.getHotList() |
|
|
|
}, |
|
|
|
getHotList() { |
|
|
|
if(this.typeIndex == 1) { |
|
|
|
if(this.hotIndex == 1) { |
|
|
|
this.Post({ |
|
|
|
type_id: this.hotType[this.hotIndex].id, |
|
|
|
type_id: 3, |
|
|
|
offset: this.hotList.length, |
|
|
|
limit: this.limit |
|
|
|
},'/api/Article/getArticleByType').then(res => { |
|
|
@ -212,12 +271,15 @@ |
|
|
|
}) |
|
|
|
} |
|
|
|
}, |
|
|
|
gotoHotDetail(item) { |
|
|
|
if(this.typeIndex == 1) { |
|
|
|
// 视频 |
|
|
|
gotoVideo(item) { |
|
|
|
uni.navigateTo({ |
|
|
|
url: '/subPackages/video/video?item=' + encodeURIComponent(JSON.stringify(item)) |
|
|
|
}) |
|
|
|
}, |
|
|
|
gotoHotDetail(item) { |
|
|
|
if(this.hotIndex == 1) { |
|
|
|
// 视频 |
|
|
|
this.gotoVideo(item) |
|
|
|
}else { |
|
|
|
|
|
|
|
} |
|
|
@ -439,7 +501,6 @@ |
|
|
|
width: 48rpx; |
|
|
|
height: 48rpx; |
|
|
|
border-radius: 50%; |
|
|
|
border: 1rpx solid #000000; |
|
|
|
display: block; |
|
|
|
margin-right: 15rpx; |
|
|
|
} |
|
|
|