修改首页跳转

This commit is contained in:
2024-12-13 14:19:48 +08:00
parent d5aac20fd0
commit 3ff35d7eb6
2 changed files with 15 additions and 7 deletions

View File

@@ -6,10 +6,9 @@
{
"path": "pages/index/index",
"style": {
"navigationBarTitleText": "小剧场",
"navigationBarTitleText": "斯耀短剧",
"enablePullDownRefresh": true,
"navigationStyle": "custom"
}
},
{

View File

@@ -48,7 +48,7 @@
<swiper class="swipers-box" :indicator-dots="false" :autoplay="true" interval="5000"
duration="500" :circular="true">
<swiper-item class="swipers-box" v-for="(item,index) in swiperList" :key='index'
@tap="goPage(item.url)">
@tap="goPage(item)">
<image :src="item.imageUrl" mode="aspectFill" style="width: 100%;height:100%;"></image>
</swiper-item>
</swiper>
@@ -733,14 +733,23 @@
}
},
//轮播图跳转
goPage(url) {
goPage(item) {
let token = uni.getStorageSync('token')
const {url,jumpType}=item
if (token) {
if (url) {
if (url.indexOf('/pages/') !== -1 || url.indexOf('/me/') !== -1) {
uni.navigateTo({
url
});
if(jumpType==1){
console.log(url);
uni.navigateTo({
url
});
}else{
uni.navigateTo({
url: '/pages/index/webView?url=' + url
});
}
} else {
//#ifndef H5
uni.navigateTo({