Browse Source

首页跳转

dev
jiazhipeng 7 months ago
parent
commit
12594b1b47
  1. 57
      pages/index/index.vue

57
pages/index/index.vue

@ -12,7 +12,7 @@
<!-- 金刚区 --> <!-- 金刚区 -->
<view class="menu-box flex-between"> <view class="menu-box flex-between">
<view v-for="(item,index) in menuList" :key="index" @click="gotoPath(item.path)"> <view v-for="(item,index) in menuList" :key="index" @click="goPath(item)">
<image :src="item.img" mode="aspectFill"></image> <image :src="item.img" mode="aspectFill"></image>
<view>{{item.title}}</view> <view>{{item.title}}</view>
</view> </view>
@ -124,22 +124,26 @@
{ {
title: '景点门票', title: '景点门票',
img: 'https://static.ticket.sz-trip.com/changshu/images/index/jdmp.png', img: 'https://static.ticket.sz-trip.com/changshu/images/index/jdmp.png',
path: '' path: '',
url: 'https://test.m.cloud.sz-trip.com/AttractionsTickets'
}, },
{ {
title: '非遗手作', title: '非遗手作',
img: 'https://static.ticket.sz-trip.com/changshu/images/index/fysz.png', img: 'https://static.ticket.sz-trip.com/changshu/images/index/fysz.png',
path: '' path: '',
}, },
{ {
title: '文创特产', title: '文创特产',
img: 'https://static.ticket.sz-trip.com/changshu/images/index/wctc.png', img: 'https://static.ticket.sz-trip.com/changshu/images/index/wctc.png',
path: '' path: '',
url: 'https://test.m.cloud.sz-trip.com/CulturalCreation',
}, },
{ {
title: '酒店住宿', title: '酒店住宿',
img: 'https://static.ticket.sz-trip.com/changshu/images/index/jdzs.png', img: 'https://static.ticket.sz-trip.com/changshu/images/index/jdzs.png',
path: '' path: '',
url: 'https://test.m.cloud.sz-trip.com/nightMooring',
}, },
{ {
title: '电影购票', title: '电影购票',
@ -154,7 +158,7 @@
{ {
title: '一卡游玩', title: '一卡游玩',
img: 'https://static.ticket.sz-trip.com/changshu/images/index/ykyw.png', img: 'https://static.ticket.sz-trip.com/changshu/images/index/ykyw.png',
path: '' path: '',
}, },
{ {
title: '活动日历', title: '活动日历',
@ -164,7 +168,8 @@
{ {
title: '特色线路', title: '特色线路',
img: 'https://static.ticket.sz-trip.com/changshu/images/index/tsxl.png', img: 'https://static.ticket.sz-trip.com/changshu/images/index/tsxl.png',
path: '' path: '',
url: 'https://test.m.cloud.sz-trip.com/OneDayTravelNew',
}, },
{ {
title: '常熟周边', title: '常熟周边',
@ -181,7 +186,7 @@
list: [], list: [],
url: { url: {
jump_type:3, jump_type:3,
tdata: 'https://m.cloud.sz-trip.com/AttractionsTickets' tdata: 'https://test.m.cloud.sz-trip.com/AttractionsTickets'
} }
}, },
{ {
@ -191,7 +196,7 @@
list: [], list: [],
url: { url: {
jump_type:3, jump_type:3,
tdata: 'https://m.cloud.sz-trip.com/CulturalCreation' tdata: 'https://test.m.cloud.sz-trip.com/CulturalCreation'
} }
} }
], ],
@ -277,6 +282,20 @@
}, 500); }, 500);
}, },
methods: { methods: {
goPath (item) {
if (item.url) {
let isJDSZ = this.goJDSZMiniProgram(item.url)
if (isJDSZ) return
uni.navigateTo({
url: '/subPackages/webPage/webPage?url=' + item.url
});
}
if(item.path) {
this.gotoPath(item.path)
}
},
// banner // banner
// 234 // 234
gotoUrlNew(item) { gotoUrlNew(item) {
@ -336,19 +355,19 @@
url: '/pages/login/login?needAuth=1' url: '/pages/login/login?needAuth=1'
}) })
},200) },200)
return true return true
} }
uni.navigateTo({
url: '/subPackages/webPage/webPage?url=' + encodeURIComponent(`${tpage}?token=2d50b941-e204-4e5d-97c9-868430711459`)
});
// code // code
this.checkIsLoginJdsz().then(res => { // this.checkIsLoginJdsz().then(res => {
if(res) { // if(res) {
uni.navigateTo({ // uni.navigateTo({
url: '/subPackages/webPage/webPage?url=' + encodeURIComponent(`${tpage}?token=` + res + '&isKunshan=1') // url: '/subPackages/webPage/webPage?url=' + encodeURIComponent(`${tpage}?token=` + res)
}); // });
} // }
}) // })
return true return true
} }
return false return false

Loading…
Cancel
Save