parent
e6e73c56a2
commit
bcd39f3295
@ -1,8 +0,0 @@ |
||||
/* 图片背景层 */ |
||||
.olive_pic{ width: 100%; height: 480rpx; -webkit-filter:blur(10rpx); filter:blur(10rpx);} |
||||
.zhe_olive{ height: 480rpx;position: absolute; top: 0; left: 0; width: 100%; z-index: 1;background: linear-gradient(top,rgba(0,185,206,.3),rgba(0,185,206,.0));text-indent: -99999px; } |
||||
/* 内容开始 */ |
||||
.olive_content{position:relative; z-index: 3;} |
||||
|
||||
|
||||
.actual_time{color: #fff; font-size: 64rpx; font-weight: bold; text-align: center; padding: 80rpx 0 40rpx 0} |
@ -1,79 +0,0 @@ |
||||
<template> |
||||
<view class="onlive_warp"> |
||||
<!-- 背景图片 --> |
||||
<view class="det_top"> |
||||
<image src="https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1570074462&di=acd63d1451d58f931855c2c5e3496dc7&imgtype=jpg&er=1&src=http%3A%2F%2Fimg2.template.cache.wps.cn%2Fwps%2Fcdnwps%2Fupload%2Fofficial%2Ftemplate%2F2012-12-13%2F50c9a0a419620.png" |
||||
mode="scaleToFill" class="olive_pic"></image> |
||||
</view> |
||||
<!-- 遮罩层-可不动 --> |
||||
<view class="zhe_olive">遮罩层</view> |
||||
|
||||
<!-- 内容开始 --> |
||||
<view class="olive_content"> |
||||
<view style="actual_time">11:58:36</view> |
||||
<view class="mmd_scol"> |
||||
<view class="scol_box_xcp"> |
||||
<scroll-view class="scol_ht_box" scroll-x="true" @scroll="scroll" scroll-left=""> |
||||
<view class="scol_unit" :style="'width:'+ widthrpx+'rpx;' "> |
||||
<!-- 开始循环 --> |
||||
<view class="video_unit"> |
||||
<video class="vr_pic" src=""></video> |
||||
<view class="xcp_t"><text class="ht_text">观走廊VR观走廊VR观走廊VR观走廊VR观走廊VR观走廊VR</text></view> |
||||
</view> |
||||
<view class="video_unit"> |
||||
<video class="vr_pic" src=""></video> |
||||
<view class="xcp_t"><text class="ht_text">观走廊VR观走廊VR观走廊VR观走廊VR观走廊VR观走廊VR</text></view> |
||||
</view> |
||||
<view class="video_unit"> |
||||
<video class="vr_pic" src=""></video> |
||||
<view class="xcp_t"><text class="ht_text">观走廊VR观走廊VR观走廊VR观走廊VR观走廊VR观走廊VR</text></view> |
||||
</view> |
||||
<view class="video_unit"> |
||||
<video class="vr_pic" src=""></video> |
||||
<view class="xcp_t"><text class="ht_text">观走廊VR观走廊VR观走廊VR观走廊VR观走廊VR观走廊VR</text></view> |
||||
</view> |
||||
<view class="video_unit"> |
||||
<video class="vr_pic" src=""></video> |
||||
<view class="xcp_t"><text class="ht_text">观走廊VR观走廊VR观走廊VR观走廊VR观走廊VR观走廊VR</text></view> |
||||
</view> |
||||
|
||||
|
||||
</view> |
||||
|
||||
|
||||
</scroll-view> |
||||
</view> |
||||
|
||||
|
||||
|
||||
</view> |
||||
<view> |
||||
|
||||
</view> |
||||
|
||||
</view> |
||||
|
||||
</view> |
||||
</template> |
||||
|
||||
<script> |
||||
export default { |
||||
data() { |
||||
return { |
||||
indicatorDots_spin: true, |
||||
autoplay_spin: true, |
||||
interval_spin: 2000, |
||||
duration_spin: 500 |
||||
} |
||||
}, |
||||
methods: { |
||||
|
||||
} |
||||
} |
||||
</script> |
||||
|
||||
<style> |
||||
@import "../../../static/css/common.css"; |
||||
@import "../../destination/destination.css"; |
||||
@import url("onlivedetial.css"); |
||||
</style> |
@ -1,18 +0,0 @@ |
||||
|
||||
.tye_line{ font-size: 28rpx; color:#999; padding:10rpx 0;} |
||||
|
||||
.anw_inf{font-size: 30rpx; color: #666; display: block; padding:30rpx 150rpx 30rpx 30rpx; border-bottom: 2rpx solid #eee; position: relative;} |
||||
.anw_inf:before{ content: ''; display: inline-block; width: 10rpx; height: 10rpx; background: #aaa; border-radius: 10rpx; position: absolute;left: 0; top:45rpx } |
||||
.anw_key{ color: #10c3b1;font-size: 30rpx; } |
||||
.tye_sch{ display: inline-block; padding-left: 15rpx;} |
||||
.tye_sch:before{ content: '/'; display: inline-block; width: 10rpx; height: 10rpx; /* background: #aaa; border-radius: 10rpx; vertical-align: middle;*/ margin-right: 10rpx;} |
||||
.tyesch_pic{ display: inline-block; width: 42rpx; height: 42rpx; position: relative; left: -15rpx; top:10rpx} |
||||
.searc_lst{ padding: 20rpx 0 80rpx 0;} |
||||
.after_type{ position: absolute; right:32rpx; top:30rpx; color: #999; font-size: 25rpx; z-index: 3;} |
||||
.ipt_sch{text-indent: 50rpx; height: 60rpx; box-shadow: rgba(0,0,0,.1) 0 0 35rpx; font-size: 28rpx; color: #333; position: relative; padding-right: 60rpx;} |
||||
|
||||
.seh_box{} |
||||
.sch_btn_suo{ height: 60rpx; line-height: 60rpx; text-align: center; font-size: 30rpx; color: #333; border:3rpx solid #eee; border-radius: 60rpx; } |
||||
.sous_k{width: 75%; position: relative;} |
||||
.sous_n{width: 20%; margin-left: 20rpx;} |
||||
.clear_pic{ position: absolute; right:8rpx; top:12rpx; display: block; width: 36rpx; height: 36rpx;} |
@ -1,232 +0,0 @@ |
||||
<template> |
||||
<view> |
||||
<view class="xa_sch_wp"> |
||||
<!-- 搜索框组件 --> |
||||
<view class="mode_com"> |
||||
<view class=" dly_flex_c seh_box"> |
||||
<view class="sous_k"> |
||||
<input class="ipt_sch" @confirm="search" placeholder="搜索景区/酒店/美食/攻略/线路" maxlength="16" :value="inputClearValue" @input="changeValue" /> |
||||
<image class="clear_pic" @click="clearIcon()" src="../../static/images/btn_clear.png"></image> |
||||
</view> |
||||
<view class="sous_n"><button @click="search" class="btn_com sch_btn_suo">搜索</button></view> |
||||
</view> |
||||
<view class="third_tips"> |
||||
<view v-for="(item,index) in searchKeywordsList" :key="index" @tap="searchFun(item.title,index)" :class="item.tapType">{{item.title}}</view> |
||||
<!-- <view class="reci_sch cur">白洋淀</view> |
||||
<view class="reci_sch">酒店住宿</view> |
||||
<view class="reci_sch">旅游攻略</view> |
||||
<view class="reci_sch">白洋淀</view> |
||||
<view class="reci_sch">酒店住宿</view> |
||||
<view class="reci_sch">旅游攻略</view> --> |
||||
</view> |
||||
</view> |
||||
</view> |
||||
<!-- 内容部分 --> |
||||
<view class="search_warp mode_com"> |
||||
|
||||
|
||||
<!-- 景区 --> |
||||
<view class="searc_lst"> |
||||
<!-- 一条信息 --> |
||||
<view class="anw_inf" v-for="(item, index) in searchList" :key="index" @click="gotoDetail(item.bcode, item.dataid + '&' + item.region)"> |
||||
<rich-text :nodes="item.title"></rich-text> |
||||
<text class="after_type" v-if="item.bcode == 3301">景区</text> |
||||
</view> |
||||
|
||||
<!-- 一条信息 --> |
||||
<!-- <view class="anw_inf"> |
||||
<view> |
||||
<text class="anw_key"><text class="anw_key">天桂山</text></text> |
||||
自然风 |
||||
<text class="anw_key">景区</text> |
||||
</view> |
||||
<text class="after_type">/ 酒店</text> |
||||
</view> --> |
||||
</view> |
||||
</view> |
||||
</view> |
||||
</template> |
||||
|
||||
<script> |
||||
export default { |
||||
data() { |
||||
return { |
||||
inputClearValue: '', |
||||
searchList: [], |
||||
searchKeywordsList:[], |
||||
netType:true |
||||
}; |
||||
}, |
||||
onLoad:function(){ |
||||
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.getSearchKeywords(); |
||||
}, |
||||
onShow:function(){ |
||||
this.getSearchKeywords(); |
||||
}, |
||||
methods: { |
||||
searchFun:function(title,index){ |
||||
for(var i = 0;i < this.searchKeywordsList.length;i++){ |
||||
if(i == index){ |
||||
this.searchKeywordsList[i].tapType = "reci_sch cur"; |
||||
}else{ |
||||
this.searchKeywordsList[i].tapType = "reci_sch"; |
||||
} |
||||
} |
||||
this.inputClearValue = title; |
||||
this.search(); |
||||
}, |
||||
getSearchKeywords:function(){ |
||||
var that = this; |
||||
this.searchKeywordsList = []; |
||||
var url = this.$config.getMessageInfoFormFilter_two; |
||||
var data = { |
||||
type: this.$param.keywordsType, |
||||
userkey:this.$param.userkey, |
||||
pageno:1, |
||||
pageSize: 10, |
||||
sort:2, |
||||
}; |
||||
this.$Request.post(url, data).then(res => { |
||||
for(var i = 0;i < res.data.length;i++){ |
||||
if(that.inputClearValue == res.data[i].title){ |
||||
var item = { |
||||
title:res.data[i].title, |
||||
tapType:'reci_sch cur' |
||||
} |
||||
}else{ |
||||
var item = { |
||||
title:res.data[i].title, |
||||
tapType:'reci_sch' |
||||
} |
||||
} |
||||
this.searchKeywordsList.push(item); |
||||
} |
||||
}) |
||||
}, |
||||
clearIcon: function() { |
||||
this.inputClearValue = ''; |
||||
}, |
||||
changeValue: function(event) { |
||||
this.inputClearValue = event.detail.value; |
||||
}, |
||||
gotoDetail: function(type, value) { |
||||
var data = value.split('&'); |
||||
switch (type) { |
||||
case '3301': |
||||
uni.navigateTo({ |
||||
url: '/pages/scenic/scenicdetial/scenicdetial?guid=' + data[0] |
||||
}); |
||||
break; |
||||
|
||||
} |
||||
}, |
||||
search: function() { |
||||
uni.showLoading({ |
||||
title: '加载中', |
||||
mask: true |
||||
}); |
||||
var content = this.inputClearValue; |
||||
if (content == null || content == '') { |
||||
uni.showToast({ |
||||
title: '请输入内容', |
||||
icon: 'none' |
||||
}); |
||||
return; |
||||
} |
||||
for(var i = 0;i < this.searchKeywordsList.length;i++){ |
||||
if(this.searchKeywordsList[i].title == content){ |
||||
this.searchKeywordsList[i].tapType = "reci_sch cur"; |
||||
}else{ |
||||
this.searchKeywordsList[i].tapType = "reci_sch"; |
||||
} |
||||
} |
||||
var data = { |
||||
search: content, |
||||
pageno: 1, |
||||
pagesize: 10, |
||||
userkey: this.$param.userkey |
||||
}; |
||||
this.$Request.post(this.$config.searchList, data).then(res => { |
||||
if (res.status == 200) { |
||||
var data = JSON.stringify(res.data.data); |
||||
var wordkey = []; |
||||
wordkey = res.data.wordkey.split('|'); |
||||
for (let i = 0; i < wordkey.length; i++) { |
||||
var subStr = new RegExp(wordkey[i], 'ig'); |
||||
data = data.replace(subStr, "<span style='color: rgb(22, 119, 255);font-size: 30rpx;'>" + wordkey[i] + '</span>'); |
||||
} |
||||
var list = JSON.parse(data); |
||||
this.searchList = list; |
||||
uni.hideLoading(); |
||||
return; |
||||
} |
||||
uni.showToast({ |
||||
title: '调用失败', |
||||
icon: 'none' |
||||
}); |
||||
uni.hideLoading(); |
||||
}); |
||||
} |
||||
}, |
||||
onLoad() {} |
||||
}; |
||||
</script> |
||||
|
||||
<style scoped> |
||||
@import url('../../static/css/common.css'); |
||||
|
||||
page { |
||||
background: #fff; |
||||
} |
||||
|
||||
/* @import url('search.css'); */ |
||||
|
||||
.anw_inf:after { |
||||
content: ''; |
||||
display: block; |
||||
width: 32rpx; |
||||
height: 32rpx; |
||||
background: url(../../static/images/icn_down_g.png) no-repeat; |
||||
background-size: 100%; |
||||
transform: rotate(-90deg); |
||||
position: absolute; |
||||
right: 0; |
||||
top: 32rpx; |
||||
} |
||||
|
||||
.ipt_sch:before { |
||||
content: ''; |
||||
width: 30rpx; |
||||
height: 30rpx; |
||||
background: #fff url(../../static/images/icon-search.png) no-repeat; |
||||
background-size: 100%; |
||||
position: absolute; |
||||
left: 10rpx; |
||||
top: 15rpx; |
||||
z-index: 4; |
||||
} |
||||
</style> |
@ -1,457 +0,0 @@ |
||||
<template> |
||||
<view> |
||||
<view class="box_1"> |
||||
<view class="an_box wc_sbox"> |
||||
<view class="dy_fx an_sch"> |
||||
<view class="fx_1"> |
||||
<input |
||||
@input="write" |
||||
type="text" |
||||
class="an_sch_ipt" |
||||
@confirm="confirm" |
||||
confirm-type="search" |
||||
placeholder-style="color:#999" |
||||
placeholder="搜索景区/酒店/美食/攻略" |
||||
/> |
||||
</view> |
||||
<view class="an_sch_img" @click="search()"><image src="../../../static/animg/icon-search.png" class="ac_size_1"></image></view> |
||||
</view> |
||||
|
||||
<view class="amt_30"> |
||||
<view class="search-container"> |
||||
<view class="search-tip-bar"> |
||||
<view @tap="changeRegionPanel" :class="[searchItemClass, selectedParam.hiddenRegionPanel ? 'active' : '']" data-type="hiddenRegionPanel"> |
||||
{{ regionname }} |
||||
</view> |
||||
|
||||
<view @tap="changePanel" :class="[searchItemClass, selectedParam.hiddenSortPanel ? 'active' : '']" data-type="hiddenSortPanel">智能排序</view> |
||||
</view> |
||||
</view> |
||||
</view> |
||||
</view> |
||||
</view> |
||||
<scroll-view @scroll="onReachScroll" @bindscrolltolower="lower" class="scroll-view" :scroll-top="topNum" scrollY="true"> |
||||
|
||||
|
||||
<view class="an_box_3"> |
||||
<view class="wc_tit_wp"> |
||||
<view class="an_t"><view class="an_t_1">精品推荐</view></view> |
||||
</view> |
||||
|
||||
<!-- --> |
||||
|
||||
|
||||
|
||||
<view v-if="!isData" class="data-is-bottom">{{ this.$param.pageMsg }}</view> |
||||
|
||||
<!-- 排序 --> |
||||
<!-- <view class="sort-page" :hidden="selectedParam.hiddenSortPanel"> |
||||
<view class="sort-group"> |
||||
<view @tap="selected" :class="[pageClass.sortItemClass,selectedParam.sortId==item.id?'sort-item-active':'']" |
||||
data-panel="hiddenSortPanel" data-type="sortId" :data-id="item.id" v-for="(item,index) in filter.sort" :key="index"> |
||||
{{item.name}} |
||||
</view> |
||||
</view> |
||||
</view> --> |
||||
<!-- 区域 --> |
||||
<!-- <view class="sort-page" :hidden="selectedParam.hiddenRegionPanel"> |
||||
<view class="sort-group wd_flt"> |
||||
<view @tap="regionSelected" :class="[pageClass2.sortItemClass,selectedParam.bm==item.bm?'sort-item-active2':'']" |
||||
data-panel="hiddenRegionPanel" :data-name="item.mc" data-type="bm" :data-id="item.bm" v-for="(item,index) in filter.regionList" |
||||
:key="index" hover-stay-time="400ms"> |
||||
<text>{{item.mc}}</text> |
||||
</view> |
||||
</view> |
||||
</view> --> |
||||
<!-- <view class="sort-page" :hidden="selectedParam.hiddenRegionPanel"> |
||||
<view class="sort-group"> |
||||
<view @tap="regionSelected" :class="[pageClass.sortItemClass,selectedParam.bm==item.bm?'sort-item-active':'']" |
||||
data-panel="hiddenRegionPanel" :data-name="item.title" data-type="bm" :data-id="item.bm" v-for="(item,index) in regionList" :key="index"> |
||||
{{item.title}} |
||||
</view> |
||||
</view> |
||||
</view> --> |
||||
<view class="sort-page" :hidden="selectedParam.hiddenSortPanel"> |
||||
<view class="sort-group"> |
||||
<view |
||||
@tap="selected" |
||||
:class="[pageClass.sortItemClass, selectedParam.sortId == item.id ? 'sort-item-active' : '']" |
||||
data-panel="hiddenSortPanel" |
||||
data-type="sortId" |
||||
:data-id="item.id" |
||||
v-for="(item, index) in filter.sort" |
||||
:key="index" |
||||
> |
||||
{{ item.name }} |
||||
</view> |
||||
</view> |
||||
</view> |
||||
<view class="sort-page" :hidden="selectedParam.hiddenRegionPanel"> |
||||
<view class="sort-group"> |
||||
<view |
||||
@tap="regionSelected" |
||||
:class="[pageClass.sortItemClass, selectedParam.bm == item.bm ? 'sort-item-active' : '']" |
||||
data-panel="hiddenRegionPanel" |
||||
:data-name="item.title" |
||||
data-type="bm" |
||||
:data-id="item.bm" |
||||
v-for="(item, index) in regionList" |
||||
:key="index" |
||||
> |
||||
{{ item.title }} |
||||
</view> |
||||
</view> |
||||
</view> |
||||
<!-- 分类 --> |
||||
<!-- <view class="filter-page" :hidden="selectedParam.hiddenAttributePanel"> |
||||
<view class="filter-box"> |
||||
<scroll-view scrollY class="filter-hd"> |
||||
<view @tap="parentLevel" :class="[pageClass.filterHdItemClass,parentLevelItem=='attribute_'+items.type?'filter-hd-item-active':'']" |
||||
:data-parentLevelItem="'attribute_'+items.type" v-for="(items,index) in filter.attribute" :key="index">{{items.name}}</view> |
||||
</scroll-view> |
||||
<scroll-view scrollY class="filter-bd"> |
||||
|
||||
<view class="filter-group" v-if="parentLevelItem=='attribute_'+items.type" v-for="(items,index) in filter.attribute" |
||||
:key="items.dicnum"> |
||||
<view @tap="childLevel" :class="[pageClass.filterBdItem,selectedFIlter['attribute_'+items.type]==0?'filter-bd-item-active':'']" |
||||
data-id="0" :data-type="'attribute_'+items.type">全 部</view> |
||||
<view @tap="childLevel" :class="[pageClass.filterBdItem,selectedFIlter['attribute_'+items.type]==item.dicnum?'filter-bd-item-active':'']" |
||||
:data-id="item.dicnum" :data-type="'attribute_'+items.type" v-for="(item,childIndex) in items.child" :key="childIndex">{{item.dicname}}</view> |
||||
|
||||
</view> |
||||
</scroll-view> |
||||
</view> |
||||
<view class="control-bar-block"> |
||||
<view @tap="resetFilter" class="control-back-btn">恢复默认</view> |
||||
<view @tap="confirmClick" class="control-confirm-btn">确定</view> |
||||
</view> |
||||
</view> --> |
||||
</view> |
||||
</scroll-view> |
||||
</view> |
||||
</template> |
||||
|
||||
<script> |
||||
import uniIcons from '@/components/uni-icons/uni-icons.vue'; |
||||
import uniNavBar from '@/components/uni-nav-bar/uni-nav-bar.vue'; |
||||
import uniSection from '@/components/uni-section/uni-section.vue'; |
||||
import uniStatusBar from '@/components/uni-status-bar/uni-status-bar.vue'; |
||||
export default { |
||||
components: { |
||||
uniIcons, |
||||
uniNavBar, |
||||
uniSection, |
||||
uniStatusBar |
||||
}, |
||||
data() { |
||||
return { |
||||
// 轮播图 |
||||
indicatorDots: true, |
||||
autoplay: true, |
||||
interval: 5000, |
||||
duration: 500, |
||||
|
||||
tabHeight: 350, |
||||
searchItemClass: 'search-tip-item', |
||||
pageClass: { |
||||
sortItemClass: 'sort-item', |
||||
filterHdItemClass: 'filter-hd-item', |
||||
filterBdItem: 'filter-bd-item' |
||||
}, |
||||
pageClass2: { |
||||
sortItemClass: 'sort-item2' |
||||
}, |
||||
priceSymbol: '', |
||||
destinationBak: 'all', |
||||
destination: 'all', |
||||
filter: { |
||||
sort: [], |
||||
attribute: [] |
||||
}, |
||||
regionList: [], |
||||
parentLevelItem: 'attribute_etype', |
||||
defaultFilter: {}, |
||||
latitude: 0, |
||||
longitude: 0, |
||||
selectedFIlterBak: { |
||||
price: 0 |
||||
}, |
||||
selectedFIlter: { |
||||
attribute_etype: 0 |
||||
}, |
||||
selectedParam: { |
||||
sortId: 3, |
||||
bm: '', |
||||
hiddenSortPanel: !0, |
||||
hiddenAttributePanel: !0, |
||||
hiddenRegionPanel: !0 |
||||
}, |
||||
param: { |
||||
page: 1, |
||||
noData: !1, |
||||
loading: !1, |
||||
finished: !1 |
||||
}, |
||||
shangjiaList: [], |
||||
topNum: 0, |
||||
rootPaht: this.$config.ROOTPATH, |
||||
selectcondition: { |
||||
bm: '', |
||||
sortId: 3, |
||||
type: '' |
||||
}, |
||||
regionname: '区域', |
||||
width: 280, |
||||
isData: true, |
||||
pageSize: 10, |
||||
searchTitle: '', |
||||
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(){ |
||||
uni.showToast({ |
||||
title:that.$param.netMsg, |
||||
icon:"none", |
||||
duration:2000 |
||||
}) |
||||
that.netType = false; |
||||
} |
||||
) |
||||
if(!that.netType){ |
||||
return; |
||||
} |
||||
this.$util.hideLoadingByTime(); |
||||
this.initData(); |
||||
this.get_attribute(); |
||||
var region = option.region; |
||||
if (region != null && region != '') { |
||||
this.selectcondition.bm = region; |
||||
this.get_data(); |
||||
} else { |
||||
this.getData(); |
||||
} |
||||
this.getRedisRegion() /* this.requestLocation(), this.get_data()*/; |
||||
that.$util.saveOperatorLog(that, 'FUN', '美食'); |
||||
}, |
||||
onShow() { |
||||
this.destinationBak != this.destination && (this.initData(), this.get_data()); |
||||
}, |
||||
methods: { |
||||
write: function(e) { |
||||
this.searchTitle = e.detail.value; |
||||
}, |
||||
search: function() { |
||||
this.initData(); |
||||
this.get_data(); |
||||
}, |
||||
back: function(e) { |
||||
uni.navigateBack({ |
||||
delta: 1 |
||||
}); |
||||
}, |
||||
confirm: function(e) { |
||||
this.searchTitle = e.detail.value; |
||||
this.initData(); |
||||
this.get_data(); |
||||
}, |
||||
getData: function() { |
||||
var that = this; |
||||
|
||||
that.get_data(); |
||||
|
||||
}, |
||||
initData: function() { |
||||
var param = {}; |
||||
param.page = 1; |
||||
param.noData = false; |
||||
param.finished = false; |
||||
this.isData = true; |
||||
this.param = param; |
||||
this.shangjiaList = []; |
||||
this.destinationBak = this.destination; |
||||
}, |
||||
selected: function(event) { |
||||
this.initData(); |
||||
var dataset = event.currentTarget.dataset; |
||||
var param = this.selectedParam; |
||||
|
||||
param[dataset.type] = dataset.id; |
||||
param.hiddenSortPanel = !0; |
||||
|
||||
//console.log(dataset.id); |
||||
this.selectedParam = param; |
||||
this.selectcondition.sortId = dataset.id; |
||||
this.get_data(); |
||||
}, |
||||
regionSelected: function(event) { |
||||
this.initData(); |
||||
var dataset = event.currentTarget.dataset; |
||||
var param = this.selectedParam; |
||||
|
||||
param[dataset.type] = dataset.id; |
||||
param.hiddenRegionPanel = !0; |
||||
|
||||
//console.log(dataset.id); |
||||
this.selectedParam = param; |
||||
this.selectcondition.bm = this.selectedParam.bm; |
||||
this.regionname = dataset.name; |
||||
this.get_data(); |
||||
}, |
||||
changePanel: function(event) { |
||||
var dataSet = event.currentTarget.dataset, |
||||
selectedParam = this.selectedParam; |
||||
'hiddenSortPanel' == dataSet.type ? (selectedParam.hiddenAttributePanel = !0) : (selectedParam.hiddenSortPanel = !0), |
||||
(selectedParam[dataSet.type] = !selectedParam[dataSet.type]), |
||||
(this.selectedParam = selectedParam); |
||||
}, |
||||
changeRegionPanel: function(event) { |
||||
var dataSet = event.currentTarget.dataset, |
||||
selectedParam = this.selectedParam; |
||||
if ('hiddenRegionPanel' == dataSet.type) { |
||||
selectedParam.hiddenAttributePanel = !0; |
||||
selectedParam.hiddenSortPanel = !0; |
||||
} else { |
||||
selectedParam.hiddenRegionPanel = !0; |
||||
} |
||||
(selectedParam[dataSet.type] = !selectedParam[dataSet.type]), (this.selectedParam = selectedParam); |
||||
}, |
||||
|
||||
resetFilter: function() { |
||||
this.selectedFIlter = this.defaultFilter; |
||||
}, |
||||
confirmClick: function() { |
||||
this.initData(); |
||||
//设置选中的筛选项 |
||||
var selectedParam = this.selectedParam; |
||||
(selectedParam.hiddenAttributePanel = true), (this.selectedFIlterBak = this.selectedFIlter); |
||||
this.parentLevelItem = 'attribute_etype'; |
||||
this.selectedParam = selectedParam; |
||||
|
||||
this.get_data(); |
||||
}, |
||||
parentLevel: function(t) { |
||||
var currentTarget = t.currentTarget.dataset; |
||||
//console.log("aaaaaaaaaaaaaaaaa"+a.parentlevelitem); |
||||
this.parentLevelItem = currentTarget.parentlevelitem; |
||||
}, |
||||
childLevel: function(t) { |
||||
var a = t.currentTarget.dataset, |
||||
e = this.selectedFIlter; |
||||
|
||||
this.selectedFIlterBak = e; |
||||
e[a.type] = a.id; |
||||
this.selectedFIlter = e; |
||||
this.selectcondition.type = a.id; |
||||
}, |
||||
getRedisRegion: function() { |
||||
var data = { |
||||
key: this.$param.userkey + '_mdd_list' |
||||
}; |
||||
this.$Request.post(this.$config.getRedisData, data).then(res => { |
||||
if (res.status == 200) { |
||||
this.regionList = res.data.mddList; |
||||
var all = { |
||||
bm: '', |
||||
title: '全部' |
||||
}; |
||||
this.regionList.unshift(all); |
||||
for (var i = 0; i < this.regionList.length; i++) { |
||||
if (this.regionList[i].bm == this.selectcondition.bm) { |
||||
this.regionname = this.regionList[i].title; |
||||
} |
||||
} |
||||
} else { |
||||
this.getRegion(); |
||||
} |
||||
}); |
||||
}, |
||||
getRegion: 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.regionList = res.data; |
||||
var all = { |
||||
bm: '', |
||||
title: '全部' |
||||
}; |
||||
this.regionList.unshift(all); |
||||
for (var i = 0; i < this.regionList.length; i++) { |
||||
if (this.regionList[i].bm == this.selectcondition.bm) { |
||||
this.regionname = this.regionList[i].title; |
||||
} |
||||
} |
||||
}); |
||||
}, |
||||
get_attribute: function() { |
||||
var that = this; |
||||
var url = this.$config.getCondition; |
||||
var data = { |
||||
type: 'food', |
||||
userkey: this.$param.userkey |
||||
}; |
||||
this.$Request.post(url, data).then(res => { |
||||
var flag = that.$util.isSuccess(res); |
||||
if (!flag) { |
||||
return; |
||||
} |
||||
this.filter = res.data; |
||||
}); |
||||
}, |
||||
onReachScroll: function(t) { |
||||
//console.log(t); |
||||
// t.detail.scrollTop > 100 ? this.floorstatus = true : this.floorstatus = false; |
||||
// var a = this.param; |
||||
// a.noData || a.finished || a.loading || this.get_data(); |
||||
}, |
||||
get_data: function() { |
||||
var that = this; |
||||
var url = this.$config.getMessageInfoFormFilter; |
||||
var data = { |
||||
type: this.$param.foodType, |
||||
userkey: this.$param.userkey, |
||||
pageSize: 100, |
||||
region: this.selectcondition.bm, |
||||
isrecommend: 'YES', |
||||
sort: '2', |
||||
title: this.searchTitle |
||||
}; |
||||
this.$Request.post(url, data).then(res => { |
||||
var flag = that.$util.isSuccess(res); |
||||
if (!flag) { |
||||
return; |
||||
} |
||||
var data = res.data; |
||||
for (let i = 0; i < data.length; i++) { |
||||
data[i].logo = that.$config.ROOTPATH + data[i].logo; |
||||
} |
||||
that.width = 'width:' + data.length * 90 + '%'; |
||||
}); |
||||
}, |
||||
|
||||
} |
||||
}; |
||||
</script> |
||||
|
||||
<style></style> |
Loading…
Reference in new issue