<template>
	<view class="det_warp">
		<!-- 头部模糊部分 -->
		<view class="det_top">
			<image :src="toplogo" mode="scaleToFill" class="pic_swp_bg"></image>
		</view>
		<!-- 黑色遮罩 -->
		<view class="top_zhe"></view>


		<!-- 头部地址与天气 -->
		<view class="dly_flex mmd_top">
			<!-- 地址切换 -->
			<view class="half_unit agn_left mmd_dl">
				<text class="dl_3">{{cityName}}</text>
				<!--
				<view class="uni-list-cell-db">
					<picker @change="bindPickerChange" range-key="title" :value="index" :range="mudidiList">
						<view class="cur-input">{{mudidiList[index].title}}</view>
					</picker>
				</view>
				-->

			</view>
			<!-- 天气 -->
			<view class="half_unit agn_right mmd_dl mmd_whe">
				<image :src="weatherImgUrl" class="mmd_icon"></image>
				<text class="dl_2">{{weather}}</text>
				<view class="dl_1">{{tmpmin}}℃~{{tmpmax}}℃</view>

			</view>
		</view>
		<!-- 轮播图 -->
		<view class="mmd_scol">
			<view class="uni-margin-wrap">
				<swiper class="swiper_jqu" :indicator-dots="indicatorDots" :autoplay="autoplay" :interval="interval" :duration="duration">
					<swiper-item v-for="(item,index) in imgList" :key="index" :item-id="index" :data-year="index">
						<!-- <view class="swiper-item" :style="{ background: item.imgurl ? 'url(' + item.imgurl + ') center  no-repeat / cover':''}"></view> -->
						<view>
							<image :src="item.imgurl" mode="aspectFill" class="swiper_tup br_radius"></image>
						</view>
					</swiper-item>

				</swiper>
			</view>



		</view>
		<!-- 工具栏 -->
		<view class="mmd_line" style="padding-right: 0;">
			<scroll-view class="scroll-view_H" scroll-x="true" @scroll="scroll" scroll-left="">
				<view @click="goToPage('scenic')" class="scroll-view-item_H">
					<image class="tol_icn" src="/subPageB/static/img/menu_jq.png"></image>
					<text class="tol_txt">赏美景</text>
				</view>
				<view @click="goToPage('food')" class="scroll-view-item_H">
					<image class="tol_icn" src="/subPageB/static/img/menu_fod.png"></image>
					<text class="tol_txt">吃美食</text>
				</view>
				<view @click="goToPage('hotel')" class="scroll-view-item_H">
					<image class="tol_icn" src="/subPageB/static/img/menu_hel.png"></image>
					<text class="tol_txt">住酒店</text>
				</view>
				<view @click="goToPage('line')" class="scroll-view-item_H">
					<image class="tol_icn" src="/subPageB/static/img/menu_xl.png"></image>
					<text class="tol_txt">精品线路</text>
				</view>
				<view @click="goToPage('special')" class="scroll-view-item_H">
					<image class="tol_icn" src="/subPageB/static/img/menu_tc.png"></image>
					<text class="tol_txt">特产</text>
				</view>
				<view @click="goToPage('hotevent')" class="scroll-view-item_H">
					<image class="tol_icn" src="/subPageB/static/img/menu_hd.png"></image>
					<text class="tol_txt">活动</text>
				</view>

			</scroll-view>
		</view>
		<view class="shadow_fg"></view>
		<!-- 目的地指南 -->
		<view class="mode_com mdd_jj">
			<text class="tit_com">雄安概况</text>

			<view class="sce_jianj_dest">
				<!-- <view class="btn_shouq">查看更多
				<text class="btn_down_zhank"> <image src="/subPageA/images/icn_down_g.png" class="btn_zhank"></image> </text></view> -->
				<view @tap="changeShowType()" class="btn_shouq">{{showType}}
					<text class="btn_down_zhank">
						<image :src="showTypeUrl" class="btn_zhank"></image>
					</text></view>
				<view :class="showType == '展开'?'fod_det_inf h_define':'fod_det_inf'">
					<!-- class="h_define" 固定高度 -->
					<!-- 文本内容 -->
					<u-parse :content="msgDetail.content" :loading="loading" @preview="preview" @navigate="navigate" />
				</view>
			</view>
		</view>
		<!-- 地理气候指南 -->
		<view class="mode_com mdd_jj">
			<text class="tit_com">地理气候</text>

			<view class="sce_jianj_dest">
				<!-- <view class="btn_shouq">查看更多
				<text class="btn_down_zhank"> <image src="/subPageA/images/icn_down_g.png" class="btn_zhank"></image> </text></view> -->
				<view @tap="changeDiLiShowType()" class="btn_shouq">{{diLiShowType}}
					<text class="btn_down_zhank">
						<image :src="diLiShowTypeUrl" class="btn_zhank"></image>
					</text></view>
				<view :class="diLiShowType == '展开'?'fod_det_inf h_define':'fod_det_inf'">
					<!-- class="h_define" 固定高度 -->
					<!-- 文本内容 -->
					<u-parse :content="msgDetail.survey" :loading="loading" @preview="preview" @navigate="navigate" />
				</view>
			</view>
		</view>
		<!-- 生态自然 -->
		<view class="mode_com mdd_jj">
			<text class="tit_com">生态自然</text>

			<view class="sce_jianj_dest">
				<!-- <view class="btn_shouq">查看更多
				<text class="btn_down_zhank"> <image src="/subPageA/images/icn_down_g.png" class="btn_zhank"></image> </text></view> -->
				<view @tap="changeZiRanShowType()" class="btn_shouq">{{ziRanShowType}}
					<text class="btn_down_zhank">
						<image :src="ziRanShowTypeUrl" class="btn_zhank"></image>
					</text></view>
				<view :class="ziRanShowType == '展开'?'fod_det_inf h_define':'fod_det_inf'">
					<!-- class="h_define" 固定高度 -->
					<!-- 文本内容 -->
					<u-parse :content="msgDetail.regioncontent" :loading="loading" @preview="preview" @navigate="navigate" />
				</view>
			</view>
		</view>

		<!-- 热门景区 -->
		<view class="mode_com mdd_jj">
			<text class="tit_com">热门景区</text>
			</view>
			<view class="pd_scl_new">
			<view class="mmd_s_hot">
				<!-- <scroll-view class="scroll-view_s" scroll-x="true" @scroll="scroll" scroll-left="">
					<view @click="goToScenicDetail(item.guid)" class="scroll-view-item_s" v-for="(item,index) in scenicList" :key="index"
					 :item-id="index" :data-year="index">
						<image class="mmd_jq_pic" :src="item.slogo" mode="aspectFill"></image>
						<text class="mmd_s_txt">{{item.sname}}</text>
						<text class="mmd_s_adr">{{item.sname}}</text>
					</view>
				</scroll-view> -->
				<scroll-view class="scroll-view_s" scroll-x="true" @scroll="scroll" scroll-left="">
					<view class="yx_warp_3" :style="width"><!--width: 210%; 应改为动态计算得出 基数为70% *n-->
						<view class="dly_flex mud_hot_box">
							<!-- 此处循环 -->
							<view class="b_tol_ipt" @click="goToScenicDetail(item.guid)" v-for="(item,index) in scenicList" :key="index">
								<view class="scroll-view-item_s">
									<image class="mmd_jq_pic" :src="item.slogo"
									 mode="aspectFill"></image>
									<text class="mmd_s_txt">{{item.sname}}</text>
									<text class="mmd_s_adr">{{item.saddress}}</text>
								</view>
							</view>
							<view class="b_tol_ipt" v-if="scenicList == null || scenicList.length <= 0">
								<view v-if="scenicList != null && scenicList.length <= 0" style="text-align: left;color: gray;">暂无热门景区信息！</view>
							</view>
						</view>
					</view>
				</scroll-view>
			</view>
		</view>


		<!-- 旅发大会主题 -->
		<!-- <view class="mode_com mdd_jj" style="padding-left: 0; padding-right: 0;"> -->

		<!-- <view class="lfdh_bg">
				<text class="tit_com">旅发大会主题</text>
				<view class="lvdh_inf">
					<u-parse :content="msgDetail.regioncontent" :loading="loading" @preview="preview" @navigate="navigate" />
				</view> -->
		<!-- <view class="lfdh_link"><text>10秒速览0秒速览0秒速览0秒速览</text><text>10秒</text><text>10秒速览</text></view>
				<view class="lfdh_link"><text>10秒速览0秒速览0秒速览0秒速览</text><text>10秒速览</text><text>10秒速览</text></view> -->
		<!-- </view> -->
		<!-- </view> -->
		<!-- 视频播放 -->

		<view v-for="(item,index) in videoList" :key="index" :item-id="index" :data-year="index" class="video_mud">
			<view class="mode_com mdd_jj">
				<text class="tit_com">旅游宣传</text>
				<!--  -->
				<view class="tab_mmd">
					<!-- direction:设置全屏时视频的方向 有效值为 0（正常竖向）, 90（屏幕逆时针90度）, -90（屏幕顺时针90度） -->
					<video class="swiper_tup" :show-fullscreen-btn='false' :poster="item.imgurl" :direction="direction" :src="item.videourl"></video>
					<view class="mssj_tit control_1">{{item.title}}</view>
				</view>

			</view>
		</view>
		<!-- 视频播放结束 -->
		<!-- 玩转正定 -->
		<view class="mode_com mdd_jj">
			<text class="tit_com">玩转{{mudidiList[index].title}}</text>
			<view class="tab_mmd">
				<text @click="getScenicFoodSp('food')" :class="active == 1?'active':''">美食</text><text @click="getScenicFoodSp('special')"
				 :class="active == 2?'active':''">特产</text><text @click="getScenicFoodSp('hotel')" :class="active == 3?'active':''">酒店</text>
			</view>
			<view class="dly_flex sm_list">
				<view @click="goToDetail(item.guid)" class="half_unit sm_dany" v-for="(item,index) in ssaList"
				 :key="index" :item-id="index" :data-year="index">
					<image v-if="active == 1 || active == 2" :src="item.logo" class="sm_pic" mode="aspectFill"></image>
					<image v-if="active == 3" :src="item.hlogo" class="sm_pic" mode="aspectFill"></image>
					<view v-if="active == 1 || active == 2" class="bt_sm">{{item.title}}</view>
					<view v-if="active == 3" class="bt_sm">{{item.hname}}</view>
					<view v-if="active == 1 || active == 2" class="nr_sm">{{item.content}}</view>
					<view v-if="active == 3" class="nr_sm">{{item.haddress}}</view>
				</view>
				<view v-if="ssaList.length <= 0" style="text-align: left;color: gray;">暂无数据！</view>
			</view>
		</view>

		<!-- 精品线路 -->
		<view class="mode_com mdd_jj mmd_xlu_box">
			<text class="tit_com">精品线路</text>
			<view v-for="(item,index) in lineList" :key="index" :item-id="index" :data-year="index" class="jinp_xl">
				<view @click="goToLineDetail(item.guid)" class="xlu_fst" v-if="index == 0">
					<image class="mmd_xl_pic1" :src="item.llogo" mode="aspectFill"></image>
					<view class="mssj_tit">{{item.lname}}</view>
					<view class="mssj_adr">{{item.lspecial}}</view>
					<text class="xlu_day">{{item.playday}}天</text>
					<text class="xlu_bq">力荐热门！</text>
				</view>
				<view @click="goToLineDetail(item.guid)" class="fod_sp_box" v-if="index != 0">
					<view class="mssj_box">
						<text class="mssj_tit">{{item.lname}}</text>
						<text class="mssj_adr">{{item.lspecial}}</text>
					</view>
					<view class="msimg_wrp">
						<image :src="item.llogo" class="pic_xlu" mode="aspectFill"></image>
						<text class="xlu_day">{{item.playday}}天</text>
					</view>
				</view>
			</view>
			<view v-if="lineList.length <= 0" style="text-align: left;color: gray;">暂无数据！</view>
		</view>

		<!-- 攻略 -->
		<view class="mode_com mdd_jj">
			<text class="tit_com">景区旅游攻略</text>
			<view class="dly_flex sm_list mmd_glue" style="flex-direction: row;text-align: center;">
				<view @click="goToMethodDetail(item.guid)" class="glue_dany" v-for="(item,index) in methodList" :key="index"
				 :item-id="index" :data-year="index">
					<image :src="item.logo" class="glue_pic" mode="aspectFill"></image>
					<view class="bt_sm">{{item.title}}</view>
				</view>
				<view v-if="methodList.length <= 0" style="text-align: left;color: gray;">暂无数据！</view>
			</view>
		</view>
	</view>
</template>

<script>
	import uParse from '@/components/gaoyia-parse/parse.vue'
	export default {
		components: {
			uParse
		},
		data() {
			const currentDate = this.getDate({
				format: true
			})
			return {
				title: 'picker',
				mudidiList: [],
				index: 0,
				date: currentDate,
				time: '12:01',
				background: ['color1', 'color2', 'color3'],
				indicatorDots: true,
				autoplay: true,
				interval: 4000,
				duration: 500,
				guid: 0,
				region: "",
				scrollTop: 0,
				old: {
					scrollTop: 0
				},
				msgDetail: {},
				imgList: [],
				scenicList: [],
				active: 1,
				ssaList: [], //玩转正定中美食等三个分类公用
				lineList: [],
				methodList: [],
				weather: '',
				tmpmin: 0,
				tmpmax: 0,
				toplogo: "",
				weatherImgUrl: "",
				direction: "-90", //设置全屏时视频的方向 0:（正常竖向）, 90:（屏幕逆时针90度）, -90:（屏幕顺时针90度）
				videoList: [],
				showType:"展开",
				diLiShowType:"展开",
				ziRanShowType:"展开",
				showTypeUrl:"/subPageB/static/img/icn_down_g.png",
				diLiShowTypeUrl:"/subPageB/static/img/icn_down_g.png",
				ziRanShowTypeUrl:"/subPageB/static/img/icn_down_g.png",
				width:"width:70%",
				cityName:this.$param.cityName,
				netType:true
			}
		},
		onLoad: function(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(){
					uni.showToast({
						title:that.$param.netMsg,
						icon:"none",
						duration:2000
					})
					that.netType = false;
				}
			)
			if(!that.netType){
				return;
			}
			this.$util.hideLoadingByTime();
			this.getParam(function(guid,region){
				that.$util.saveOperatorLog(that,"MDD",guid);
				uni.showLoading({
					title: "加载中",
					mask: true
				})
				that.guid = guid;
				that.region = region;
				that.getRedisData();
				that.getMsgList(guid);
			},function(){
				uni.showToast({
					icon:"none",
					title:"系统异常"
				})
			})
		},
		onReady() {
			setTimeout(function() {
				uni.hideLoading();
			}, 500);
		},
		computed: {
			startDate() {
				return this.getDate('start');
			},
			endDate() {
				return this.getDate('end');
			}
		},
		methods: {
			getParam:function(successCallback,errorCallback){
				var that = this;
				var url = this.$config.getMessageInfoFormFilter;
				var data = {
					type: this.$param.mddType,
					userkey:this.$param.userkey,
					pageSize:1,
					sort: "2"
				};
				this.$Request.post(url, data).then(res => {
					var flag = that.$util.isSuccess(res);
					if(!flag){
						return;
					}
					var result = res.data[0];
					successCallback(result.guid,result.bm);
				})
			},
			bindPickerChange: function(e) {
				this.index = e.target.value
				var data = this.mudidiList[this.index];
				this.toplogo = this.$config.ROOTPATH + data.logo
				for (var i = 0; i < data.imagelist.length; i++) {
					var item = {
						imgurl: this.$config.ROOTPATH + data.imagelist[i]
					}
					this.imgList.push(item);
				}
				this.guid = data.guid
				this.region = data.bm;
				this.getRedisData();  //缓存
				this.getMsgList(data.guid); //缓存
				// this.getVideoUrl(data.bm);
			},
			bindDateChange: function(e) {
				this.date = e.target.value
			},
			bindTimeChange: function(e) {
				this.time = e.target.value
			},
			getRedisData:function(){
				var data = {
					"key": this.$param.userkey + "_mdd_"+this.region
				}
				this.$Request.post(this.$config.getRedisData, data).then(res => {
					if (res.status == 200) {
						//所有的数据
						var initData = res.data;
						//目的地详情
						this.msgDetail = initData.detailMessage;
						this.toplogo = this.$config.ROOTPATH + this.msgDetail.logo
						this.imgList = [];
						var imagesarr = this.msgDetail.imagelist;
						for (var i = 0; i < imagesarr.length; i++) {
							var item = {
								imgurl: this.$config.ROOTPATH + imagesarr[i]
							}
							this.imgList.push(item);
						}
						//热门景区
						var hotScenicList = initData.hotScenic;
						this.width = "width:"+ (hotScenicList.length * 70) + "%";
						for (let i = 0; i < hotScenicList.length; i++) {
							hotScenicList[i].slogo = this.$config.ROOTPATH + hotScenicList[i].slogo;
						}
						this.scenicList = hotScenicList;
						//美食
						var foodList = initData.wzFood;
						for (var i = 0; i < foodList.length; i++) {
							foodList[i].logo = this.$config.ROOTPATH + foodList[i].logo
						}
						this.ssaList = foodList;
						//精品线路
						var lineList = initData.lineList;
						for (var i = 0; i < lineList.length; i++) {
							lineList[i].llogo = this.$config.ROOTPATH + lineList[i].llogo
						}
						this.lineList = lineList;
						//攻略
						var methodList = initData.methodList;
						for (var i = 0; i < methodList.length; i++) {
							methodList[i].logo = this.$config.ROOTPATH + methodList[i].logo
						}
						this.methodList = methodList;
						//视频
						this.videoList = [];
						var videoList = initData.videoList;
						for (var i = 0; i < videoList.length; i++) {
							var item = {
								imgurl:this.$config.ROOTPATH + videoList[i].logo, //封面图暂无
								videourl:this.$config.ROOTPATH + videoList[i].videopath,
								guid:videoList[i].guid,
								title:videoList[i].title
							}
							this.videoList.push(item);
						}
						this.methodList = methodList;
						uni.hideLoading();
					}else{
						this.getMsgDetail(this.guid);
						this.getHotScenic();
						this.getScenicFoodSp('food')
						this.getFineLine();
						this.getMethodList();
						this.getVideoUrl(this.region);
					}
				})
			},
			getDate(type) {
				const date = new Date();
				let year = date.getFullYear();
				let month = date.getMonth() + 1;
				let day = date.getDate();

				if (type === 'start') {
					year = year - 60;
				} else if (type === 'end') {
					year = year + 2;
				}
				month = month > 9 ? month : '0' + month;;
				day = day > 9 ? day : '0' + day;
				return `${year}-${month}-${day}`;
			},
			changeIndicatorDots(e) {
				this.indicatorDots = !this.indicatorDots
			},
			changeAutoplay(e) {
				this.autoplay = !this.autoplay
			},
			intervalChange(e) {
				this.interval = e.target.value
			},
			durationChange(e) {
				this.duration = e.target.value
			},
			preview(src, e) {
				// do something
			},
			navigate(href, e) {
				// do something
			},
			scroll: function(e) {
				this.old.scrollTop = e.detail.scrollTop
			},
			getMsgList: function(guid) {
				var data = {
					key: this.$param.userkey + '_mdd_list'
				};
				this.$Request.post(this.$config.getRedisData, data).then(res => {
					if (res.status == 200) {
						this.mudidiList = res.data.mddList;
						for (var i = 0; i < this.mudidiList.length; i++) {
							if (this.mudidiList[i].guid == guid) {
								this.index = i;
								break;
							}
						}
					} else {
						this.getMddList();
					}
				});
			},
			getMddList: function(){
				var that = this;
				var url = this.$config.getMessageInfoFormFilter;
				var data = {
					type: this.$param.mddType,
					userkey:this.$param.userkey,
					pageSize:100,
					sort: "2"
				};
				this.$Request.post(url, data).then(res => {
					var flag = that.$util.isSuccess(res);
					if(!flag){
						return;
					}
					this.mudidiList = res.data;
					for (var i = 0; i < this.mudidiList.length; i++) {
						if (this.mudidiList[i].guid == this.guid) {
							this.index = i;
							break;
						}
					}
				})
			},
			getMsgDetail: function(guid) {
				var that = this;
				var data = {
					"userkey":this.$param.userkey,
					"type":this.$param.mddType,
					"guid":guid
				}
				this.$Request.post(this.$config.getMessgeInfoDetailFormId, data).then(res => {
					if(!that.$util.isSuccess(res)){
						return;
					}
					this.msgDetail = res.data;
					this.toplogo = this.$config.ROOTPATH + this.msgDetail.logo
					this.imgList = [];
					for (var i = 0; i < this.msgDetail.imagelist.length; i++) {
						var item = {
							imgurl: this.$config.ROOTPATH + this.msgDetail.imagelist[i]
						}
						this.imgList.push(item);
					}
					//uni.hideLoading();
				})
			},
			getHotScenic: function() {
				var that = this;
				var url = this.$config.getScenicListFormFilter;
				var data = {
					userkey:this.$param.userkey,
					sort: "2",
					pageno: "1",
					pageSize: "4",
					region: this.region
				};
				this.$Request.post(url, data).then(res => {
					var flag = that.$util.isSuccess(res);
					if(!flag){
						return;
					}
					var data = res.data;
					this.width = "width:"+ (data.length * 70) + "%";
					for (let i = 0; i < data.length; i++) {
						data[i].slogo = this.$config.ROOTPATH + data[i].slogo;
					}
					this.scenicList = data;
					//uni.hideLoading();
				})
			},
			goToPage: function(type) {
				if (type == 'scenic') {
					uni.navigateTo({
						url: "/subPageA/scenic/sceniclist/sceniclist?id=" + this.guid
					})
				} else if (type == 'food') {
					uni.navigateTo({
						url: "/subPageA/food/foodlist/foodlist?guid=" + this.guid +"&region=" + this.region
					})
				} else if (type == 'hotel') {
					//Android.gotoListView("HOTEL", this.region+"");
					uni.navigateTo({
						url: "/subPageA/hotel/hotellist/hotellist?region=" + this.region
					})
				} else if (type == 'line') {
					// Android.gotoListView("LINE", this.region+"");
					uni.navigateTo({
						url: "/pages/travelroute/travelroutelist/travelroutelist?region=" + this.region
					})
				} else if (type == 'special') {
					uni.navigateTo({
						url: "/subPageA/specialgood/specialgoodlist/specialgoodlist?guid=" + this.guid +"&region=" + this.region
					})
				} else if (type == 'hotevent') {
					// Android.gotoListView("HUODONG", this.region+"");
					uni.navigateTo({
						url: "/subPageA/hotevent/hoteventlist/hoteventlist?region=" + this.region
					})
				}
			},
			goToScenicDetail: function(guid) {
				//Android.gotoDetial("SCENIC", guid + "");
				uni.navigateTo({
					url: '/subPageA/scenic/scenicdetial/scenicdetial?guid=' + guid
				});
			},
			getScenicFoodSp: function(type) {
				var that = this;
				var url = "";
				var data = {
					"pageno": "1",
					"pageSize": "4",
					"userkey":this.$param.userkey,
					"region": this.region,
					"sort":2
				};
				if (type == 'food') {
					data["type"] = this.$param.foodType;
					url = this.$config.getMessageInfoFormFilter;
					this.active = 1;
				} else if (type == 'special') {
					this.active = 2;
					data["type"] = this.$param.specialgoodType;
					url = this.$config.getMessageInfoFormFilter;
				} else if (type == 'hotel') {
					data = {
						pagesize: "4",
						areacode: this.region,
						pageno: "1",
						timestamp: 0,
						sort: 2,
						userkey: this.$param.userkey
					};
					this.active = 3;
					url = this.$config.getHotelList;
				}
				this.$Request.post(url, data).then(res => {
					var flag = that.$util.isSuccess(res);
					if(!flag){
						return;
					}
					var data = res.data;
					for (var i = 0; i < data.length; i++) {
						if (type == 'hotel') {
							data[i].hlogo = this.$config.ROOTPATH + data[i].hlogo
						} else if (type == 'food' || type == 'special') {
							data[i].logo = this.$config.ROOTPATH + data[i].logo
						}
					}
					this.ssaList = data;
					// uni.hideLoading();
				})
			},
			getFineLine: function() {
				var that = this;
				var requestData = {
					userkey: that.$param.userkey,
					pageSize: 4,
					region: that.region,
					pageno: 1,
				};
				that.$Request.post(that.$config.getLineInfoFormFilterByPage, requestData).then(res => {
					var flag = that.$util.isSuccess(res);
					if (!flag) {
						return;
					}
					var data = res.data;
					for (var i = 0; i < data.length; i++) {
						data[i].llogo = this.$config.ROOTPATH + data[i].llogo
					}
					this.lineList = data;
					// uni.hideLoading();
				})
			},
			getMethodList: function() {
				var that = this;
				var url = this.$config.getMessageInfoFormFilter;
				var data = {
					type: this.$param.methodType,
					userkey:this.$param.userkey,
					pageSize:6,
					region:this.region
				};
				this.$Request.post(url, data).then(res => {
					var flag = that.$util.isSuccess(res);
					if(!flag){
						return;
					}
					var data = res.data;
					for (var i = 0; i < data.length; i++) {
						data[i].logo = this.$config.ROOTPATH + data[i].logo
					}
					this.methodList = data;
					// uni.hideLoading();
				})
			},
			goToDetail: function(id) {
				if (this.active == 1) {
					uni.navigateTo({
						url: "/subPageA/food/fooddetial/fooddetial?fid=" + id + "&fareacode=" + this.region
					})
				} else if (this.active == 2) {
					uni.navigateTo({
						url: "/subPageA/specialgood/specialgooddetail/specialgooddetail?id=" + id
					})
				} else if (this.active == 3) {
					uni.navigateTo({
						url: "/subPageA/hotel/hoteldetail/hoteldetail?id=" + id
					})
				}
			},
			goToLineDetail: function(guid) {
				//Android.gotoDetial("LINE", guid + "");
				uni.navigateTo({
					url: "/pages/travelroute/travelroutedetail/travelroutedetail?id=" + guid
				})
			},
			goToMethodDetail: function(guid) {
				//Android.gotoDetial("GONGLUE", guid + "");
				uni.navigateTo({
					url: "/subPageA/method/methoddetail/methoddetail?guid=" + guid
				})
			},
			getVideoUrl: function(qx) {
				var that = this;
				var url = this.$config.getMessageInfoFormFilter;
				var data = {
					type: this.$param.videoType,
					userkey:this.$param.userkey,
					pageSize:1,
					region:qx,
					sort:"2"
				};
				this.$Request.post(url, data).then(res => {
					var flag = that.$util.isSuccess(res);
					if(!flag){
						return;
					}
					this.videoList = [];
					var d = res.data;
					for (var i = 0; i < d.length; i++) {
						var item = {
							imgurl:this.$config.ROOTPATH + d[i].logo, //封面图暂无
							videourl:this.$config.ROOTPATH + d[i].videopath,
							guid:d[i].guid,
							title:d[i].title
						}
						this.videoList.push(item);
					}
					// uni.hideLoading();
				})
			},
			changeShowType:function(){
				if(this.showType == "展开"){
					this.showType = "收起";
					this.showTypeUrl = "/subPageB/static/img/icn_up_g.png";
				}else if(this.showType == "收起"){
					this.showType = "展开";
					this.showTypeUrl = "/subPageB/static/img/icn_down_g.png";
				}

			},
			changeDiLiShowType:function(){
				if(this.diLiShowType == "展开"){
					this.diLiShowType = "收起";
					this.diLiShowTypeUrl = "/subPageB/static/img/icn_up_g.png";
				}else if(this.diLiShowType == "收起"){
					this.diLiShowType = "展开";
					this.diLiShowTypeUrl = "/subPageB/static/img/icn_down_g.png";
				}


			},
			changeZiRanShowType:function(){
				if(this.ziRanShowType == "展开"){
					this.ziRanShowType = "收起";
					this.ziRanShowTypeUrl = "/subPageB/static/img/icn_up_g.png";
				}else if(this.ziRanShowType == "收起"){
					this.ziRanShowType = "展开";
					this.ziRanShowTypeUrl = "/subPageB/static/img/icn_down_g.png";
				}

			}
		}
	}
</script>

<style>
	@import "/static/css/common.css";
	@import "/subPageB/static/css/fooddetial.css";
	@import "/subPageB/cate/destination.css";




	.cur-input:after {
		content: '';
		display: inline-block;
		width: 36rpx;
		height: 36rpx;
		background: url(/subPageB/static/img/icn_down.png) no-repeat center;
		background-size: 100%;
		margin-left: 10rpx;
	}

	.mssj_jul:before {
		content: '';
		display: inline-block;
		width: 38rpx;
		height: 38rpx;
		background: url(/subPageB/static/img/icn_mi.png) no-repeat;
		background-size: 100%;
		margin-right: 5rpx;
		position: relative;
		top: 6rpx
	}

	.content {
		/* padding-left: 1.5em;
		padding-right: 1.5em;
		font-size: 35upx; */
	}
</style>
