|
|
|
@ -1,7 +1,7 @@ |
|
|
|
|
<template> |
|
|
|
|
<view> |
|
|
|
|
<view class="home_pic_static"> |
|
|
|
|
<view class="home_pic" style="z-index: 0;"> |
|
|
|
|
<view class="home_pic" style="z-index: 0"> |
|
|
|
|
<image :src="image3" mode="aspectFill" class="swp_1_img"></image> |
|
|
|
|
</view> |
|
|
|
|
<view class="home_pic"> |
|
|
|
@ -76,13 +76,8 @@ |
|
|
|
|
<image src="../../static/animg/ix_xxi.png" class="xi_icn"></image> |
|
|
|
|
</view> |
|
|
|
|
<view class="fx_1 aml_30 amr_30"> |
|
|
|
|
|
|
|
|
|
<swiper autoplay="true" class="ht_swp_xi" :duration="duration_hj" :indicator-dots="falseDots" |
|
|
|
|
:interval="interval_hj" :vertical="trueVcal"> |
|
|
|
|
|
|
|
|
|
<swiper-item class="word_1 xi_txt" v-for="(item,index) in zxList" :key="index" |
|
|
|
|
@tap="goToZixunDetail(item.guid)">{{item.title}}</swiper-item> |
|
|
|
|
|
|
|
|
|
<swiper autoplay="true" class="ht_swp_xi" :duration="duration_hj" :indicator-dots="falseDots" :interval="interval_hj" :vertical="trueVcal"> |
|
|
|
|
<swiper-item class="word_1 xi_txt" v-for="(item, index) in zxList" :key="index" @tap="goToZixunDetail(item.guid)">{{ item.title }}</swiper-item> |
|
|
|
|
</swiper> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
@ -100,8 +95,7 @@ |
|
|
|
|
<scroll-view class="anx_scl_1" scroll-x="true" @scroll="scroll" scroll-left="0"> |
|
|
|
|
<view class="scl_1_ut"> |
|
|
|
|
<view class="dy_fx"> |
|
|
|
|
<view class="fx_1 scl1_pic" v-for="(item, index) in scenicList" :key="index" |
|
|
|
|
@tap="goToDetail('scenic', item.guid)"> |
|
|
|
|
<view class="fx_1 scl1_pic" v-for="(item, index) in scenicList" :key="index" @tap="goToDetail('scenic', item.guid)"> |
|
|
|
|
<image :src="item.slogo" mode="aspectFill" class="scl_1_img"></image> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
@ -119,9 +113,8 @@ |
|
|
|
|
</view> |
|
|
|
|
<!-- 瀑布流 --> |
|
|
|
|
<view class="amt_30"> |
|
|
|
|
<view class="an_pbl dy_fx_row" style="flex-wrap: wrap;"> |
|
|
|
|
<view class="w_two" v-for="(item, index) in wcList" :key="index" |
|
|
|
|
@tap="goToDetail('wenchuang', item.guid)"> |
|
|
|
|
<view class="an_pbl dy_fx_row" style="flex-wrap: wrap"> |
|
|
|
|
<view class="w_two" v-for="(item, index) in wcList" :key="index" @tap="goToDetail('wenchuang', item.guid)"> |
|
|
|
|
<view class=""> |
|
|
|
|
<image :src="item.logo" mode="aspectFill" class="pbl_1_img"></image> |
|
|
|
|
</view> |
|
|
|
@ -140,14 +133,12 @@ |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="aml_30"> |
|
|
|
|
<scroll-view class="anx_scl_1" scroll-x="true" @scroll="scroll" scroll-left="0" |
|
|
|
|
style="height: 470rpx;"> |
|
|
|
|
<scroll-view class="anx_scl_1" scroll-x="true" @scroll="scroll" scroll-left="0" style="height: 470rpx"> |
|
|
|
|
<view class="scl_1_ut"> |
|
|
|
|
<view class="dy_fx"> |
|
|
|
|
<view class="fx_1 scl1_pic" v-for="(item, index) in videoList" :key="index"> |
|
|
|
|
<!-- :poster="item.imgurl" --> |
|
|
|
|
<video :show-fullscreen-btn='false' :id="'myVideo_' + index" @play="handle" |
|
|
|
|
:src="item.videourl" class="scl_2_img" controls="true"></video> |
|
|
|
|
<video :show-fullscreen-btn="false" :id="'myVideo_' + index" @play="handle" :src="item.videourl" class="scl_2_img" controls="true"></video> |
|
|
|
|
<view class="an_v_inf vdo_inf"> |
|
|
|
|
<view class="lst_tit word_1"> |
|
|
|
|
{{ item.title }} |
|
|
|
@ -170,18 +161,17 @@ |
|
|
|
|
</view> |
|
|
|
|
<view class="amt_30"> |
|
|
|
|
<view class="anx_ls_1" @click="goToDetail('line', lineOneList.guid)"> |
|
|
|
|
<image :src="lineOneList.llogo" mode="aspectFill" class="an_ls_img"></image> |
|
|
|
|
<image :src="lineOneList.logo" mode="aspectFill" class="an_ls_img"></image> |
|
|
|
|
<view class="anxls_t"> |
|
|
|
|
<view class="lst_tit word_1">{{ lineOneList.lname }}</view> |
|
|
|
|
<view class="lst_tit word_1">{{ lineOneList.title }}</view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="amt_30" v-for="(item, index) in lineList" :key="index" |
|
|
|
|
@click="goToDetail('line', item.guid)"> |
|
|
|
|
<view class="amt_30" v-for="(item, index) in hoteventList" :key="index" @click="goToDetail('line', item.guid)"> |
|
|
|
|
<view class="dy_fx ls_inf_box"> |
|
|
|
|
<image :src="item.llogo" mode="aspectFill" class="an_ls_img2"></image> |
|
|
|
|
<image :src="item.logo" mode="aspectFill" class="an_ls_img2"></image> |
|
|
|
|
<view class="fx_1 ls_txt"> |
|
|
|
|
<view class="lst_tit word_1">{{ item.lname }}</view> |
|
|
|
|
<view class="lsinf word_3">{{ item.lspecial }}</view> |
|
|
|
|
<view class="lst_tit word_1">{{ item.title }}</view> |
|
|
|
|
<view class="lsinf word_3">{{ item.jointime }}</view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
@ -193,427 +183,468 @@ |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
<script> |
|
|
|
|
export default { |
|
|
|
|
data() { |
|
|
|
|
return { |
|
|
|
|
trueVcal: true, |
|
|
|
|
falseDots: false, |
|
|
|
|
interval_hj: 4500, |
|
|
|
|
duration_hj: 1000, |
|
|
|
|
export default { |
|
|
|
|
data() { |
|
|
|
|
return { |
|
|
|
|
trueVcal: true, |
|
|
|
|
falseDots: false, |
|
|
|
|
interval_hj: 4500, |
|
|
|
|
duration_hj: 1000, |
|
|
|
|
|
|
|
|
|
indicatorDots: false, |
|
|
|
|
autoplay: true, |
|
|
|
|
interval: 5000, |
|
|
|
|
duration: 500, |
|
|
|
|
// |
|
|
|
|
current: 0, |
|
|
|
|
swiperCurrent: 0, |
|
|
|
|
indicatorDots: false, |
|
|
|
|
autoplay: true, |
|
|
|
|
interval: 5000, |
|
|
|
|
duration: 500, |
|
|
|
|
// |
|
|
|
|
current: 0, |
|
|
|
|
swiperCurrent: 0, |
|
|
|
|
|
|
|
|
|
video: null, |
|
|
|
|
indexNum: 0, |
|
|
|
|
old: { |
|
|
|
|
scrollTop: 0, |
|
|
|
|
markIndex: 0 |
|
|
|
|
}, |
|
|
|
|
scenicList: [], |
|
|
|
|
videoList: [], |
|
|
|
|
SJZObject: {}, |
|
|
|
|
wcList: [], |
|
|
|
|
yzOneList: {}, |
|
|
|
|
yzList: [], |
|
|
|
|
lineOneList: {}, |
|
|
|
|
lineList: [], |
|
|
|
|
lbtList: [], |
|
|
|
|
zxList: [], |
|
|
|
|
// 轮播图 |
|
|
|
|
image: '', |
|
|
|
|
image2: '', |
|
|
|
|
image3: '', |
|
|
|
|
j: 0, |
|
|
|
|
a: 0, |
|
|
|
|
b: 1, |
|
|
|
|
images: [], |
|
|
|
|
cla: 'swp_1_img dhua', |
|
|
|
|
cla2: 'swp_1_img dhua2', |
|
|
|
|
clas: ['swp_1_img dhua', 'swp_1_img dhua2'], |
|
|
|
|
netType: true |
|
|
|
|
}; |
|
|
|
|
}, |
|
|
|
|
onLoad(option) { |
|
|
|
|
var that = this; |
|
|
|
|
this.$util.getNetworkType( |
|
|
|
|
function(res) { |
|
|
|
|
if (res.networkType === 'none') { |
|
|
|
|
uni.showToast({ |
|
|
|
|
title: that.$param.netMsg, |
|
|
|
|
icon: "none", |
|
|
|
|
duration: 2000 |
|
|
|
|
}) |
|
|
|
|
that.netType = false; |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
function() { |
|
|
|
|
video: null, |
|
|
|
|
indexNum: 0, |
|
|
|
|
old: { |
|
|
|
|
scrollTop: 0, |
|
|
|
|
markIndex: 0 |
|
|
|
|
}, |
|
|
|
|
scenicList: [], |
|
|
|
|
videoList: [], |
|
|
|
|
SJZObject: {}, |
|
|
|
|
wcList: [], |
|
|
|
|
yzOneList: {}, |
|
|
|
|
yzList: [], |
|
|
|
|
lineOneList: {}, |
|
|
|
|
lineList: [], |
|
|
|
|
hoteventList:[], |
|
|
|
|
lbtList: [], |
|
|
|
|
zxList: [], |
|
|
|
|
// 轮播图 |
|
|
|
|
image: '', |
|
|
|
|
image2: '', |
|
|
|
|
image3: '', |
|
|
|
|
j: 0, |
|
|
|
|
a: 0, |
|
|
|
|
b: 1, |
|
|
|
|
images: [], |
|
|
|
|
cla: 'swp_1_img dhua', |
|
|
|
|
cla2: 'swp_1_img dhua2', |
|
|
|
|
clas: ['swp_1_img dhua', 'swp_1_img dhua2'], |
|
|
|
|
netType: true |
|
|
|
|
}; |
|
|
|
|
}, |
|
|
|
|
onLoad(option) { |
|
|
|
|
var that = this; |
|
|
|
|
this.$util.getNetworkType( |
|
|
|
|
function (res) { |
|
|
|
|
if (res.networkType === 'none') { |
|
|
|
|
uni.showToast({ |
|
|
|
|
title: that.$param.netMsg, |
|
|
|
|
icon: "none", |
|
|
|
|
icon: 'none', |
|
|
|
|
duration: 2000 |
|
|
|
|
}) |
|
|
|
|
}); |
|
|
|
|
that.netType = false; |
|
|
|
|
} |
|
|
|
|
) |
|
|
|
|
if (!that.netType) { |
|
|
|
|
return; |
|
|
|
|
}, |
|
|
|
|
function () { |
|
|
|
|
uni.showToast({ |
|
|
|
|
title: that.$param.netMsg, |
|
|
|
|
icon: 'none', |
|
|
|
|
duration: 2000 |
|
|
|
|
}); |
|
|
|
|
that.netType = false; |
|
|
|
|
} |
|
|
|
|
this.getRedisData(); |
|
|
|
|
this.getZiXunList(); |
|
|
|
|
let video = uni.createVideoContext('myVideo'); |
|
|
|
|
this.video = video; |
|
|
|
|
setInterval( |
|
|
|
|
function() { |
|
|
|
|
if (that.j % 2 == 0) { |
|
|
|
|
//这个为每次l轮换样式 |
|
|
|
|
that.cla = that.clas[1]; |
|
|
|
|
that.cla2 = that.clas[0]; |
|
|
|
|
|
|
|
|
|
that.a = that.a + 2; |
|
|
|
|
if (that.a == that.images.length) { |
|
|
|
|
that.a = 0; |
|
|
|
|
} else if (that.a > that.images.length) { |
|
|
|
|
that.a = that.a - that.images.length; |
|
|
|
|
} |
|
|
|
|
that.image = that.images[that.a]; |
|
|
|
|
} else { |
|
|
|
|
that.cla = that.clas[0]; |
|
|
|
|
that.cla2 = that.clas[1]; |
|
|
|
|
); |
|
|
|
|
if (!that.netType) { |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
this.getRedisData(); |
|
|
|
|
this.getZiXunList(); |
|
|
|
|
let video = uni.createVideoContext('myVideo'); |
|
|
|
|
this.video = video; |
|
|
|
|
setInterval( |
|
|
|
|
function () { |
|
|
|
|
if (that.j % 2 == 0) { |
|
|
|
|
//这个为每次l轮换样式 |
|
|
|
|
that.cla = that.clas[1]; |
|
|
|
|
that.cla2 = that.clas[0]; |
|
|
|
|
|
|
|
|
|
that.b = that.b + 2; |
|
|
|
|
if (that.b == that.images.length) { |
|
|
|
|
that.b = 0; |
|
|
|
|
} else if (that.b > that.images.length) { |
|
|
|
|
that.b = that.b - that.images.length; |
|
|
|
|
} |
|
|
|
|
that.image2 = that.images[that.b]; |
|
|
|
|
that.a = that.a + 2; |
|
|
|
|
if (that.a == that.images.length) { |
|
|
|
|
that.a = 0; |
|
|
|
|
} else if (that.a > that.images.length) { |
|
|
|
|
that.a = that.a - that.images.length; |
|
|
|
|
} |
|
|
|
|
that.j++; |
|
|
|
|
}, |
|
|
|
|
1000 * 10, |
|
|
|
|
that |
|
|
|
|
); |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
// |
|
|
|
|
changeSwiper(e) { |
|
|
|
|
this.swiperCurrent = e.detail.current; |
|
|
|
|
}, |
|
|
|
|
scroll: function(e) { |
|
|
|
|
this.old.scrollTop = e.detail.scrollTop; |
|
|
|
|
}, |
|
|
|
|
getRedisData: function(mescroll) { |
|
|
|
|
var data = { |
|
|
|
|
key: this.$param.userkey + '_index' |
|
|
|
|
}; |
|
|
|
|
this.$Request.post(this.$config.getRedisData, data).then(res => { |
|
|
|
|
console.log('ssss',res); |
|
|
|
|
if (res.status == 200) { |
|
|
|
|
//所有的数据 |
|
|
|
|
var initData = res.data; |
|
|
|
|
|
|
|
|
|
//轮播图 |
|
|
|
|
var lbtList = initData.lbtList; |
|
|
|
|
for (let i = 0; i < lbtList.length; i++) { |
|
|
|
|
lbtList[i].logo = this.$config.ROOTPATH + lbtList[i].logo; |
|
|
|
|
this.images[i] = lbtList[i].logo; |
|
|
|
|
} |
|
|
|
|
this.image = this.images[0]; |
|
|
|
|
this.image2 = this.images[1]; |
|
|
|
|
this.image3 = this.images[0]; |
|
|
|
|
//景区 |
|
|
|
|
var scenicList = initData.scenicList; |
|
|
|
|
var scLength = scenicList.length > 4 ? 4 : scenicList.length; |
|
|
|
|
var scdata = []; |
|
|
|
|
for (let i = 0; i < scLength; i++) { |
|
|
|
|
scenicList[i].slogo = this.$config.ROOTPATH + scenicList[i].slogo; |
|
|
|
|
scdata.push(scenicList[i]); |
|
|
|
|
} |
|
|
|
|
this.scenicList = scdata; |
|
|
|
|
//视频 |
|
|
|
|
var videoList = initData.videoList; |
|
|
|
|
var viLength = videoList.length > 4 ? 4 : videoList.length; |
|
|
|
|
for (var i = 0; i < viLength; i++) { |
|
|
|
|
var item = { |
|
|
|
|
imgurl: videoList[i].logo == '' ? '' : this.$config.ROOTPATH + videoList[i] |
|
|
|
|
.logo, |
|
|
|
|
videourl: this.$config.ROOTPATH + videoList[i].videopath, |
|
|
|
|
guid: videoList[i].guid, |
|
|
|
|
title: videoList[i].title, |
|
|
|
|
time: videoList[i].subtitle |
|
|
|
|
}; |
|
|
|
|
this.videoList.push(item); |
|
|
|
|
} |
|
|
|
|
this.indexNum = viLength; |
|
|
|
|
//文创 |
|
|
|
|
var wcList = initData.wcList; |
|
|
|
|
var wcLength = wcList.length > 4 ? 4 : wcList.length; |
|
|
|
|
for (var i = 0; i < wcLength; i++) { |
|
|
|
|
var item = { |
|
|
|
|
logo: this.$config.ROOTPATH + wcList[i].logo, |
|
|
|
|
guid: wcList[i].guid |
|
|
|
|
}; |
|
|
|
|
this.wcList.push(item); |
|
|
|
|
} |
|
|
|
|
that.image = that.images[that.a]; |
|
|
|
|
} else { |
|
|
|
|
that.cla = that.clas[0]; |
|
|
|
|
that.cla2 = that.clas[1]; |
|
|
|
|
|
|
|
|
|
//活动 |
|
|
|
|
var hoteventList = initData.hoteventList; |
|
|
|
|
for (var i = 0; i < hoteventList.length; i++) { |
|
|
|
|
hoteventList[i].logo = this.$config.ROOTPATH + hoteventList[i].logo; |
|
|
|
|
} |
|
|
|
|
this.hoteventList = hoteventList; |
|
|
|
|
//多彩邯郸 |
|
|
|
|
this.SJZObject = initData.duoCaiList[0]; |
|
|
|
|
} else { |
|
|
|
|
this.getImgList(); //轮播图 |
|
|
|
|
this.getScenicList(); //景区 |
|
|
|
|
this.getVideoData(); //视频 |
|
|
|
|
this.getDuoCaiSJZ(); //多彩 |
|
|
|
|
this.getWcList(); //文创 |
|
|
|
|
// this.getYzList(); //文物遗址 |
|
|
|
|
this.getLineList(); //线路 |
|
|
|
|
that.b = that.b + 2; |
|
|
|
|
if (that.b == that.images.length) { |
|
|
|
|
that.b = 0; |
|
|
|
|
} else if (that.b > that.images.length) { |
|
|
|
|
that.b = that.b - that.images.length; |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
that.image2 = that.images[that.b]; |
|
|
|
|
} |
|
|
|
|
that.j++; |
|
|
|
|
}, |
|
|
|
|
getImgList: function() { |
|
|
|
|
var data = { |
|
|
|
|
pageno: '1', |
|
|
|
|
pageSize: '5', |
|
|
|
|
sort: '2', |
|
|
|
|
type: this.$param.imgType, |
|
|
|
|
userkey: this.$param.userkey |
|
|
|
|
}; |
|
|
|
|
this.$Request.post(this.$config.getMessageInfoFormFilter, data).then(res => { |
|
|
|
|
var lbtList = res.data; |
|
|
|
|
for (var i = 0; i < lbtList.length; i++) { |
|
|
|
|
this.images[i] = this.$config.ROOTPATH + lbtList[i].logo; |
|
|
|
|
1000 * 10, |
|
|
|
|
that |
|
|
|
|
); |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
// |
|
|
|
|
changeSwiper(e) { |
|
|
|
|
this.swiperCurrent = e.detail.current; |
|
|
|
|
}, |
|
|
|
|
scroll: function (e) { |
|
|
|
|
this.old.scrollTop = e.detail.scrollTop; |
|
|
|
|
}, |
|
|
|
|
getRedisData: function (mescroll) { |
|
|
|
|
var data = { |
|
|
|
|
key: this.$param.userkey + '_index' |
|
|
|
|
}; |
|
|
|
|
this.$Request.post(this.$config.getRedisData, data).then((res) => { |
|
|
|
|
console.log('ssss', res); |
|
|
|
|
if (res.status == 200) { |
|
|
|
|
//所有的数据 |
|
|
|
|
var initData = res.data; |
|
|
|
|
|
|
|
|
|
//轮播图 |
|
|
|
|
var lbtList = initData.lbtList; |
|
|
|
|
for (let i = 0; i < lbtList.length; i++) { |
|
|
|
|
lbtList[i].logo = this.$config.ROOTPATH + lbtList[i].logo; |
|
|
|
|
this.images[i] = lbtList[i].logo; |
|
|
|
|
} |
|
|
|
|
this.image = this.images[0]; |
|
|
|
|
this.image2 = this.images[1]; |
|
|
|
|
this.image3 = this.images[0]; |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
getZiXunList: function() { |
|
|
|
|
var data = { |
|
|
|
|
pageno: '1', |
|
|
|
|
pageSize: '3', |
|
|
|
|
sort: '2', |
|
|
|
|
type: this.$param.zixunType, |
|
|
|
|
userkey: this.$param.userkey |
|
|
|
|
}; |
|
|
|
|
this.$Request.post(this.$config.getMessageInfoFormFilter, data).then(res => { |
|
|
|
|
this.zxList = res.data; |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
goToZixunDetail: function(guid) { |
|
|
|
|
uni.navigateTo({ |
|
|
|
|
url: '/pages/zixun/zixundetail/zixundetail?id=' + guid |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
handle: function(obj) { |
|
|
|
|
// 检测 this.video 的值 |
|
|
|
|
// 停止播放 |
|
|
|
|
let newVideo = uni.createVideoContext(obj.currentTarget.id); |
|
|
|
|
if (this.video !== newVideo) { |
|
|
|
|
newVideo.play(); |
|
|
|
|
this.video.pause(); |
|
|
|
|
} |
|
|
|
|
this.video = newVideo; |
|
|
|
|
}, |
|
|
|
|
getScenicList: function() { |
|
|
|
|
var data = { |
|
|
|
|
pageno: '1', |
|
|
|
|
pagesize: '4', |
|
|
|
|
sort: '2', |
|
|
|
|
timestamp: 0, |
|
|
|
|
areacode: this.$config.ARER_CODE, |
|
|
|
|
userkey: this.$param.userkey |
|
|
|
|
}; |
|
|
|
|
this.$Request.post(this.$config.getscenicList, data).then(res => { |
|
|
|
|
if (res.status == 500) { |
|
|
|
|
uni.showToast({ |
|
|
|
|
title: res.msg, |
|
|
|
|
duration: 2000 |
|
|
|
|
}); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
var data = res.data; |
|
|
|
|
for (let i = 0; i < data.length; i++) { |
|
|
|
|
data[i].slogo = this.$config.ROOTPATH + data[i].slogo; |
|
|
|
|
} |
|
|
|
|
this.scenicList = data; |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
getYzList: function() { |
|
|
|
|
var data = { |
|
|
|
|
pageno: '1', |
|
|
|
|
pageSize: '4', |
|
|
|
|
sort: '2', |
|
|
|
|
type: this.$param.yzType, |
|
|
|
|
userkey: this.$param.userkey |
|
|
|
|
}; |
|
|
|
|
this.$Request.post(this.$config.getMessageInfoFormFilter, data).then(res => { |
|
|
|
|
if (res.status == 500) { |
|
|
|
|
uni.showToast({ |
|
|
|
|
title: res.msg, |
|
|
|
|
duration: 2000 |
|
|
|
|
}); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
var data = res.data; |
|
|
|
|
var list = []; |
|
|
|
|
for (let i = 0; i < data.length; i++) { |
|
|
|
|
data[i].logo = this.$config.ROOTPATH + data[i].logo; |
|
|
|
|
if (i == 0) { |
|
|
|
|
this.yzOneList = data[i]; |
|
|
|
|
} else { |
|
|
|
|
list.push(data[i]); |
|
|
|
|
} |
|
|
|
|
//景区 |
|
|
|
|
var scenicList = initData.scenicList; |
|
|
|
|
var scLength = scenicList.length > 4 ? 4 : scenicList.length; |
|
|
|
|
var scdata = []; |
|
|
|
|
for (let i = 0; i < scLength; i++) { |
|
|
|
|
scenicList[i].slogo = this.$config.ROOTPATH + scenicList[i].slogo; |
|
|
|
|
scdata.push(scenicList[i]); |
|
|
|
|
} |
|
|
|
|
this.yzList = list; |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
getWcList: function() { |
|
|
|
|
this.onc = 'meishi'; |
|
|
|
|
var data = { |
|
|
|
|
pageno: '1', |
|
|
|
|
pageSize: '4', |
|
|
|
|
sort: '2', |
|
|
|
|
type: this.$param.wcType, |
|
|
|
|
userkey: this.$param.userkey |
|
|
|
|
}; |
|
|
|
|
this.$Request.post(this.$config.getMessageInfoFormFilter, data).then(res => { |
|
|
|
|
if (res.status == 500) { |
|
|
|
|
uni.showToast({ |
|
|
|
|
title: res.msg, |
|
|
|
|
duration: 2000 |
|
|
|
|
}); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
var data = res.data; |
|
|
|
|
for (let i = 0; i < data.length; i++) { |
|
|
|
|
data[i].logo = this.$config.ROOTPATH + data[i].logo; |
|
|
|
|
} |
|
|
|
|
this.wcList = data; |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
getDuoCaiSJZ: function() { |
|
|
|
|
var data = { |
|
|
|
|
pageno: '1', |
|
|
|
|
pageSize: '1', |
|
|
|
|
sort: '2', |
|
|
|
|
region: this.$config.ARER_CODE, |
|
|
|
|
type: this.$param.duoCaiType, |
|
|
|
|
userkey: this.$param.userkey |
|
|
|
|
}; |
|
|
|
|
this.$Request.post(this.$config.getMessageInfoFormFilter, data).then(res => { |
|
|
|
|
this.SJZObject = res.data[0]; |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
getVideoData: function() { |
|
|
|
|
var data = { |
|
|
|
|
pageno: '1', |
|
|
|
|
pageSize: '4', |
|
|
|
|
sort: '2', |
|
|
|
|
region: this.$config.ARER_CODE, |
|
|
|
|
type: this.$param.videoType, |
|
|
|
|
userkey: this.$param.userkey |
|
|
|
|
}; |
|
|
|
|
this.$Request.post(this.$config.getMessageInfoFormFilter, data).then(res => { |
|
|
|
|
var d = res.data; |
|
|
|
|
for (var i = 0; i < d.length; i++) { |
|
|
|
|
this.scenicList = scdata; |
|
|
|
|
//视频 |
|
|
|
|
var videoList = initData.videoList; |
|
|
|
|
var viLength = videoList.length > 4 ? 4 : videoList.length; |
|
|
|
|
for (var i = 0; i < viLength; i++) { |
|
|
|
|
var item = { |
|
|
|
|
imgurl: d[i].logo == '' ? '' : this.$config.ROOTPATH + d[i].logo, |
|
|
|
|
videourl: this.$config.ROOTPATH + d[i].videolist[0], |
|
|
|
|
guid: d[i].guid, |
|
|
|
|
time: d[i].subtitle |
|
|
|
|
imgurl: videoList[i].logo == '' ? '' : this.$config.ROOTPATH + videoList[i].logo, |
|
|
|
|
videourl: this.$config.ROOTPATH + videoList[i].videopath, |
|
|
|
|
guid: videoList[i].guid, |
|
|
|
|
title: videoList[i].title, |
|
|
|
|
time: videoList[i].subtitle |
|
|
|
|
}; |
|
|
|
|
this.videoList.push(item); |
|
|
|
|
} |
|
|
|
|
this.indexNum = d.length; |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
getLineList: function() { |
|
|
|
|
var data = { |
|
|
|
|
pageSize: 4, |
|
|
|
|
region: this.$config.ARER_CODE, |
|
|
|
|
pageno: 1, |
|
|
|
|
timestamp: 0, |
|
|
|
|
sort: '2', |
|
|
|
|
userkey: this.$param.userkey |
|
|
|
|
}; |
|
|
|
|
this.$Request.post(this.$config.getLineInfoFormFilterByPage, data).then(res => { |
|
|
|
|
var data = res.data; |
|
|
|
|
var list = []; |
|
|
|
|
for (var i = 0; i < data.length; i++) { |
|
|
|
|
data[i].llogo = this.$config.ROOTPATH + data[i].llogo; |
|
|
|
|
if (i == 0) { |
|
|
|
|
this.lineOneList = data[i]; |
|
|
|
|
} else { |
|
|
|
|
list.push(data[i]); |
|
|
|
|
} |
|
|
|
|
this.indexNum = viLength; |
|
|
|
|
//文创 |
|
|
|
|
var wcList = initData.wcList; |
|
|
|
|
var wcLength = wcList.length > 4 ? 4 : wcList.length; |
|
|
|
|
for (var i = 0; i < wcLength; i++) { |
|
|
|
|
var item = { |
|
|
|
|
logo: this.$config.ROOTPATH + wcList[i].logo, |
|
|
|
|
guid: wcList[i].guid |
|
|
|
|
}; |
|
|
|
|
this.wcList.push(item); |
|
|
|
|
} |
|
|
|
|
this.lineList = list; |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
goToPages: function(type) { |
|
|
|
|
var that = this; |
|
|
|
|
if (type == 'jingqu') { //景区概况 |
|
|
|
|
uni.switchTab({ |
|
|
|
|
url: '/pages/cate/destination' |
|
|
|
|
}); |
|
|
|
|
} else if (type == 'jingdian') { //景点鬼剑 |
|
|
|
|
uni.navigateTo({ |
|
|
|
|
url: '/pages/scenic/sceniclist/sceniclist' |
|
|
|
|
}); |
|
|
|
|
} else if (type == 'wenchuang') { //非遗文化 |
|
|
|
|
uni.navigateTo({ |
|
|
|
|
url: '/pages/feiyi/feiyilist/feiyilist' |
|
|
|
|
}); |
|
|
|
|
} else if (type == 'video') { //历史影像 |
|
|
|
|
uni.navigateTo({ |
|
|
|
|
url: '/pages/video/videolist/videolist' |
|
|
|
|
}); |
|
|
|
|
} else if (type == 'line') { //活动风采 |
|
|
|
|
uni.navigateTo({ |
|
|
|
|
url: '/pages/hotevent/hoteventlist/hoteventlist' |
|
|
|
|
}); |
|
|
|
|
}else if (type == 'quanjing') { //720全景 |
|
|
|
|
uni.navigateTo({ |
|
|
|
|
url: '/pages/quanjing/720All' |
|
|
|
|
}); |
|
|
|
|
}else if (type == 'traffic') { //交通指南 |
|
|
|
|
uni.navigateTo({ |
|
|
|
|
url: '/pages/traffic/outTraffic' |
|
|
|
|
|
|
|
|
|
//活动 |
|
|
|
|
var hoteventList = initData.hoteventList; |
|
|
|
|
for (var i = 0; i < hoteventList.length; i++) { |
|
|
|
|
hoteventList[i].logo = this.$config.ROOTPATH + hoteventList[i].logo; |
|
|
|
|
} |
|
|
|
|
this.lineOneList = hoteventList[0] |
|
|
|
|
this.hoteventList = hoteventList.splice(1,hoteventList.length-1); |
|
|
|
|
//多彩邯郸 |
|
|
|
|
this.SJZObject = initData.duoCaiList[0]; |
|
|
|
|
} else { |
|
|
|
|
this.getImgList(); //轮播图 |
|
|
|
|
this.getScenicList(); //景区 |
|
|
|
|
this.getVideoData(); //视频 |
|
|
|
|
this.getDuoCaiSJZ(); //多彩 |
|
|
|
|
this.getWcList(); //文创 |
|
|
|
|
// this.getYzList(); //文物遗址 |
|
|
|
|
this.getLineList(); //线路 |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
getImgList: function () { |
|
|
|
|
var data = { |
|
|
|
|
pageno: '1', |
|
|
|
|
pageSize: '5', |
|
|
|
|
sort: '2', |
|
|
|
|
type: this.$param.imgType, |
|
|
|
|
userkey: this.$param.userkey |
|
|
|
|
}; |
|
|
|
|
this.$Request.post(this.$config.getMessageInfoFormFilter, data).then((res) => { |
|
|
|
|
var lbtList = res.data; |
|
|
|
|
for (var i = 0; i < lbtList.length; i++) { |
|
|
|
|
this.images[i] = this.$config.ROOTPATH + lbtList[i].logo; |
|
|
|
|
} |
|
|
|
|
this.image = this.images[0]; |
|
|
|
|
this.image2 = this.images[1]; |
|
|
|
|
this.image3 = this.images[0]; |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
getZiXunList: function () { |
|
|
|
|
var data = { |
|
|
|
|
pageno: '1', |
|
|
|
|
pageSize: '3', |
|
|
|
|
sort: '2', |
|
|
|
|
type: this.$param.zixunType, |
|
|
|
|
userkey: this.$param.userkey |
|
|
|
|
}; |
|
|
|
|
this.$Request.post(this.$config.getMessageInfoFormFilter, data).then((res) => { |
|
|
|
|
this.zxList = res.data; |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
goToZixunDetail: function (guid) { |
|
|
|
|
uni.navigateTo({ |
|
|
|
|
url: '/pages/zixun/zixundetail/zixundetail?id=' + guid |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
handle: function (obj) { |
|
|
|
|
// 检测 this.video 的值 |
|
|
|
|
// 停止播放 |
|
|
|
|
let newVideo = uni.createVideoContext(obj.currentTarget.id); |
|
|
|
|
if (this.video !== newVideo) { |
|
|
|
|
newVideo.play(); |
|
|
|
|
this.video.pause(); |
|
|
|
|
} |
|
|
|
|
this.video = newVideo; |
|
|
|
|
}, |
|
|
|
|
getScenicList: function () { |
|
|
|
|
var data = { |
|
|
|
|
pageno: '1', |
|
|
|
|
pagesize: '4', |
|
|
|
|
sort: '2', |
|
|
|
|
timestamp: 0, |
|
|
|
|
areacode: this.$config.ARER_CODE, |
|
|
|
|
userkey: this.$param.userkey |
|
|
|
|
}; |
|
|
|
|
this.$Request.post(this.$config.getscenicList, data).then((res) => { |
|
|
|
|
if (res.status == 500) { |
|
|
|
|
uni.showToast({ |
|
|
|
|
title: res.msg, |
|
|
|
|
duration: 2000 |
|
|
|
|
}); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
goToDetail: function(type, guid, region) { |
|
|
|
|
if (type == 'scenic') { //景点推荐详情 |
|
|
|
|
uni.navigateTo({ |
|
|
|
|
url: '/pages/scenic/scenicdetial/scenicdetial?guid=' + guid |
|
|
|
|
var data = res.data; |
|
|
|
|
for (let i = 0; i < data.length; i++) { |
|
|
|
|
data[i].slogo = this.$config.ROOTPATH + data[i].slogo; |
|
|
|
|
} |
|
|
|
|
this.scenicList = data; |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
getYzList: function () { |
|
|
|
|
var data = { |
|
|
|
|
pageno: '1', |
|
|
|
|
pageSize: '4', |
|
|
|
|
sort: '2', |
|
|
|
|
type: this.$param.yzType, |
|
|
|
|
userkey: this.$param.userkey |
|
|
|
|
}; |
|
|
|
|
this.$Request.post(this.$config.getMessageInfoFormFilter, data).then((res) => { |
|
|
|
|
if (res.status == 500) { |
|
|
|
|
uni.showToast({ |
|
|
|
|
title: res.msg, |
|
|
|
|
duration: 2000 |
|
|
|
|
}); |
|
|
|
|
} else if (type == 'wenchuang') { |
|
|
|
|
uni.navigateTo({ |
|
|
|
|
url: "/pages/wenchuang/wendetail/wendetail?guid=" + guid |
|
|
|
|
}) |
|
|
|
|
} else if (type == 'line') { //活动风采详情 |
|
|
|
|
uni.navigateTo({ |
|
|
|
|
url: '/pages/hotevent/hoteventdetail/hoteventdetail?id=' + guid |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
var data = res.data; |
|
|
|
|
var list = []; |
|
|
|
|
for (let i = 0; i < data.length; i++) { |
|
|
|
|
data[i].logo = this.$config.ROOTPATH + data[i].logo; |
|
|
|
|
if (i == 0) { |
|
|
|
|
this.yzOneList = data[i]; |
|
|
|
|
} else { |
|
|
|
|
list.push(data[i]); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
this.yzList = list; |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
getWcList: function () { |
|
|
|
|
this.onc = 'meishi'; |
|
|
|
|
var data = { |
|
|
|
|
pageno: '1', |
|
|
|
|
pageSize: '4', |
|
|
|
|
sort: '2', |
|
|
|
|
type: this.$param.wcType, |
|
|
|
|
userkey: this.$param.userkey |
|
|
|
|
}; |
|
|
|
|
this.$Request.post(this.$config.getMessageInfoFormFilter, data).then((res) => { |
|
|
|
|
if (res.status == 500) { |
|
|
|
|
uni.showToast({ |
|
|
|
|
title: res.msg, |
|
|
|
|
duration: 2000 |
|
|
|
|
}); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var data = res.data; |
|
|
|
|
for (let i = 0; i < data.length; i++) { |
|
|
|
|
data[i].logo = this.$config.ROOTPATH + data[i].logo; |
|
|
|
|
} |
|
|
|
|
this.wcList = data; |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
getDuoCaiSJZ: function () { |
|
|
|
|
var data = { |
|
|
|
|
pageno: '1', |
|
|
|
|
pageSize: '1', |
|
|
|
|
sort: '2', |
|
|
|
|
region: this.$config.ARER_CODE, |
|
|
|
|
type: this.$param.duoCaiType, |
|
|
|
|
userkey: this.$param.userkey |
|
|
|
|
}; |
|
|
|
|
this.$Request.post(this.$config.getMessageInfoFormFilter, data).then((res) => { |
|
|
|
|
this.SJZObject = res.data[0]; |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
getVideoData: function () { |
|
|
|
|
var data = { |
|
|
|
|
pageno: '1', |
|
|
|
|
pageSize: '4', |
|
|
|
|
sort: '2', |
|
|
|
|
region: this.$config.ARER_CODE, |
|
|
|
|
type: this.$param.videoType, |
|
|
|
|
userkey: this.$param.userkey |
|
|
|
|
}; |
|
|
|
|
this.$Request.post(this.$config.getMessageInfoFormFilter, data).then((res) => { |
|
|
|
|
var d = res.data; |
|
|
|
|
for (var i = 0; i < d.length; i++) { |
|
|
|
|
var item = { |
|
|
|
|
imgurl: d[i].logo == '' ? '' : this.$config.ROOTPATH + d[i].logo, |
|
|
|
|
videourl: this.$config.ROOTPATH + d[i].videolist[0], |
|
|
|
|
guid: d[i].guid, |
|
|
|
|
time: d[i].subtitle |
|
|
|
|
}; |
|
|
|
|
this.videoList.push(item); |
|
|
|
|
} |
|
|
|
|
this.indexNum = d.length; |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
getLineList: function () { |
|
|
|
|
// var data = { |
|
|
|
|
// pageSize: 4, |
|
|
|
|
// region: this.$config.ARER_CODE, |
|
|
|
|
// pageno: 1, |
|
|
|
|
// timestamp: 0, |
|
|
|
|
// sort: '2', |
|
|
|
|
// userkey: this.$param.userkey |
|
|
|
|
// }; |
|
|
|
|
// this.$Request.post(this.$config.getLineInfoFormFilterByPage, data).then(res => { |
|
|
|
|
// var data = res.data; |
|
|
|
|
// var list = []; |
|
|
|
|
// for (var i = 0; i < data.length; i++) { |
|
|
|
|
// data[i].llogo = this.$config.ROOTPATH + data[i].llogo; |
|
|
|
|
// if (i == 0) { |
|
|
|
|
// this.lineOneList = data[i]; |
|
|
|
|
// } else { |
|
|
|
|
// list.push(data[i]); |
|
|
|
|
// } |
|
|
|
|
// } |
|
|
|
|
// this.lineList = list; |
|
|
|
|
// }); |
|
|
|
|
var that = this; |
|
|
|
|
var data = { |
|
|
|
|
key: this.$param.userkey + '_hotEvent_list' |
|
|
|
|
}; |
|
|
|
|
that.$Request.post(that.$config.getRedisData, data).then((res) => { |
|
|
|
|
var listDatas = that.listDatas, |
|
|
|
|
dataListLen = res.data.hoteventList.length, |
|
|
|
|
data = res.data.hoteventList; |
|
|
|
|
if ( |
|
|
|
|
(dataListLen == 10 ? (this.param.page += 1) : (this.param.page = 1 && 0 == dataListLen ? (this.param.noData = true) : (this.param.finished = true)), |
|
|
|
|
(this.param.loading = false), |
|
|
|
|
dataListLen > 0) |
|
|
|
|
) { |
|
|
|
|
for (var i = 0; i < dataListLen; i++) { |
|
|
|
|
var item = { |
|
|
|
|
id: data[i].guid, |
|
|
|
|
elogo: this.rootPaht + data[i].logo, |
|
|
|
|
ename: data[i].title, |
|
|
|
|
eventdate: data[i].jointime, |
|
|
|
|
eaddress: data[i].address, |
|
|
|
|
ephone: data[i][this.$param.hoteventPhoneKey], |
|
|
|
|
etype: data[i][this.$param.hoteventTypeKey].dicname, |
|
|
|
|
distance: this.$util.formatDistance(data[i].distance) |
|
|
|
|
}; |
|
|
|
|
this.listDatas.push(item); |
|
|
|
|
uni.hideLoading(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
goToPages: function (type) { |
|
|
|
|
var that = this; |
|
|
|
|
if (type == 'jingqu') { |
|
|
|
|
//景区概况 |
|
|
|
|
uni.switchTab({ |
|
|
|
|
url: '/pages/cate/destination' |
|
|
|
|
}); |
|
|
|
|
} else if (type == 'jingdian') { |
|
|
|
|
//景点鬼剑 |
|
|
|
|
uni.navigateTo({ |
|
|
|
|
url: '/pages/scenic/sceniclist/sceniclist' |
|
|
|
|
}); |
|
|
|
|
} else if (type == 'wenchuang') { |
|
|
|
|
//非遗文化 |
|
|
|
|
uni.navigateTo({ |
|
|
|
|
url: '/pages/feiyi/feiyilist/feiyilist' |
|
|
|
|
}); |
|
|
|
|
} else if (type == 'video') { |
|
|
|
|
//历史影像 |
|
|
|
|
uni.navigateTo({ |
|
|
|
|
url: '/pages/video/videolist/videolist' |
|
|
|
|
}); |
|
|
|
|
} else if (type == 'line') { |
|
|
|
|
//活动风采 |
|
|
|
|
uni.navigateToMiniProgram({ |
|
|
|
|
appId: 'wx91d27dbf599dff74', |
|
|
|
|
path: 'pages/shopx/pages/index/index?venderId=1000016826&originOpts=%5Bobject%20Object%5D&keywords=%25E8%25A1%25A1%25E6%25B0%25B4%25E8%2580%2581%25E7%2599%25BD%25E5%25B9%25B2%25E5%25AE%2598%25E6%2596%25B9%25E6%2597%2597%25E8%2588%25B0%25E5%25BA%2597%2520%25E4%25BA%25AC%25E4%25B8%259C%25E8%2587%25AA%25E8%2590%25A5&originUrl=%2Fpages%2Fshopx%2Fpages%2Findex%2Findex&shopName=%E8%A1%A1%E6%B0%B4%E8%80%81%E7%99%BD%E5%B9%B2%E4%BA%AC%E4%B8%9C%E8%87%AA%E8%90%A5%E5%AE%98%E6%96%B9%E6%97%97%E8%88%B0%E5%BA%97&skuId=100001725902&originParams=%5Bobject%20Object%5D&navStart=Wed%20Jul%2026%202023%2010%3A56%3A14%20GMT%2B0800%20(%E4%B8%AD%E5%9B%BD%E6%A0%87%E5%87%86%E6%97%B6%E9%97%B4)&referer=http%3A%2F%2Fwq.jd.com%2Fwxapp%2Fpages%2Fsearch%2Flist%2Flist&sceneId=1002', |
|
|
|
|
envVersion: 'release', |
|
|
|
|
success(res) { |
|
|
|
|
console.log("跳转成功"); |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
} else if (type == 'quanjing') { |
|
|
|
|
//720全景 |
|
|
|
|
uni.navigateTo({ |
|
|
|
|
url: '/pages/quanjing/720All' |
|
|
|
|
}); |
|
|
|
|
} else if (type == 'traffic') { |
|
|
|
|
//交通指南 |
|
|
|
|
uni.navigateTo({ |
|
|
|
|
url: '/pages/traffic/outTraffic' |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
goToDetail: function (type, guid, region) { |
|
|
|
|
if (type == 'scenic') { |
|
|
|
|
//景点推荐详情 |
|
|
|
|
uni.navigateTo({ |
|
|
|
|
url: '/pages/scenic/scenicdetial/scenicdetial?guid=' + guid |
|
|
|
|
}); |
|
|
|
|
} else if (type == 'wenchuang') { |
|
|
|
|
uni.navigateTo({ |
|
|
|
|
url: '/pages/wenchuang/wendetail/wendetail?guid=' + guid |
|
|
|
|
}); |
|
|
|
|
} else if (type == 'line') { |
|
|
|
|
//活动风采详情 |
|
|
|
|
uni.navigateTo({ |
|
|
|
|
url: '/pages/hotevent/hoteventdetail/hoteventdetail?id=' + guid |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
</script> |
|
|
|
|
<style></style> |
|
|
|
|
<style></style> |
|
|
|
|