Commit ff3907d8 authored by 罗超's avatar 罗超

1

parent 06d9c78f
<template>
<view class="package-good">
<view class="rm-left">
<image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1622459632000_216.png" mode="aspectFill">
<image :src="data.MealPic" mode="aspectFit">
</image>
</view>
<view class="rm-right">
<view class="package-name">海鲜团队用餐</view>
<view class="package-name">{{data.MealName}}</view>
<view class="f11">
<text class="king" style="margin-right: 14rpx;">6人起订</text>
<text>仅周五、周六可用,节假日可用</text>
<text class="king" style="margin-right: 14rpx;" v-if="data.MinBuyNum>0">{{data.MinBuyNum}}人起订</text>
<text><text v-for="(item,index) in data.UsageTimeList" :key="index">
{{item.Name}} <text v-if="index!=data.UsageTimeList.length-1"></text>
</text>可用,</text>
<text v-if="data.IsHoliday===1">节假日可用</text>
</view>
<viwe class="give f11">
提前1天预约
<text v-if="data.MakeDay===0">可预约当天</text>
<text v-if="data.MakeDay>0">提前{{data.MakeDay}}天预约</text>
</viwe>
<view class="price" style="margin-top:30rpx;">
<text class="f11" style="margin-right: 10rpx;"></text>
<text>889</text>
<text v-if="data.LPriceB">{{data.LPriceB}}</text>
<text v-if="!data.LPriceB">暂无报价</text>
</view>
</view>
<view class="rm-opera">
......@@ -23,12 +29,26 @@
<view class="buy-content"></view>
<view class="buy-tips">在线订</view>
</view>
<!-- <view class="buy disabled">
<view class="buy-content"></view>
<view class="buy-tips">已售罄</view>
</view> -->
</view>
</view>
</template>
<script>
export default {
props:{
data:{
type:Object,
dafault:{}
}
},
mounted() {
console.log(this.data)
},
methods: {
previewOrder(){
uni.navigateTo({
......
<template>
<view class="restaurant-list-item">
<view class="restaurant-list-item" @click="confirm">
<view class="img-box">
<image src="https://dimg04.c-ctrip.com/images/03551120008nt5eb8BB53_C_500_500_Q80.jpg" mode="aspectFill"></image>
<image :src="data.CoverImg" mode="aspectFill"></image>
</view>
<view class="restaurant-info">
<view class="restaurant-name">北京街头卤煮火烧</view>
<view class="restaurant-name">{{data.Name}}</view>
<view class="restaurant-start">
<view class="other-rate">
<text>老北京·地道</text>
<text>{{data.Feature}}</text>
<span class="line"></span>
</view>
</view>
<view class="localtion">环境内外装修以竹制品体现,夫妻肺片麻辣鲜香,口干嫩滑色泽红亮</view>
<view>
<u-tag text="川菜 " bg-color="#FFF" border-color="#DFBE6E" color="#DFBE6E" size="mini" style="margin-right: 20rpx;"></u-tag>
<u-tag text="沟口" bg-color="#FFF" border-color="#DFBE6E" color="#DFBE6E" size="mini"></u-tag>
<view class="localtion">{{data.Address}}</view>
<view style="display: flex;flex-wrap: wrap;">
<view v-for="(item,index) in data.FoodTag" :key="index">
<u-tag :text="item" bg-color="#FFF" border-color="#DFBE6E" color="#DFBE6E" size="mini" style="margin-right: 20rpx;" v-if="item"></u-tag>
</view>
<view v-for="(item,index) in data.GeographicTag" :key="index">
<u-tag :text="item" bg-color="#FFF" border-color="#DFBE6E" color="#DFBE6E" size="mini" style="margin-right: 20rpx;" v-if="item"></u-tag>
</view>
</view>
<view class="price">
<text></text>
<text class="money">200</text>
<text class="money">{{data.B2BPrice}}</text>
<text>/起</text>
</view>
</view>
......@@ -31,13 +36,25 @@
restaurantType:{
type:Number,
default:0
},
data:{
type:Object,
default:{}
}
},
created() {
console.log(this.data)
},
data() {
return {
// key: value
}
},
methods:{
confirm(){
this.$emit("confirm")
}
}
}
</script>
......@@ -58,6 +75,7 @@
}
.restaurant-list-item .img-box image{
width: 100%;
height: 100%;
}
.restaurant-list-item .restaurant-info{
width: 1px;
......
......@@ -61,12 +61,12 @@
]" :style="{ width: (dayWidth - 10) / 7 + 'px',borderRadius:line == end[0] && index == end[1]?'0px 6px 6px 0px':'',backgroundColor:line == end[0] && index == end[1]?'#111':'',color:line == end[0] && index == end[1]?'#FFFFFF':''}">
<view style="padding-top:2px;padding-bottom:2px;">{{ item }}</view>
<view class="select-style" v-if="line == start[0] && index == start[1]">入住</view>
<view class="select-style" v-if="line == end[0] && index == end[1]">离店</view>
<view style="font-size:12px;padding-bottom: 3px;" v-if="priceStauts.length > 0">
<view class="select-style" v-if="line == start[0] && index == start[1]">开始日期</view>
<view class="select-style" v-if="line == end[0] && index == end[1]">结束日期</view>
<!-- <view style="font-size:12px;padding-bottom: 3px;" v-if="priceStauts.length > 0">
<view v-if="priceStauts[line][index]>0">{{ priceStauts[line][index] }}</view>
<view v-if="priceStauts[line][index] <0">无房</view>
</view>
</view> -->
</view>
</view>
</view>
......@@ -74,7 +74,7 @@
<view class="submit">
<button class="sub-btn" :disabled="!isSub" @click="submit">
<text v-if="isSub">确定</text>
<text v-if="!isSub">请选择入住日期</text>
<text v-if="!isSub">请选择结束日期</text>
</button>
</view>
</scroll-view>
......
......@@ -14,26 +14,28 @@
<view @click="goback">
<u-icon name="arrow-left" size="44"></u-icon>
</view>
<view style="flex: 1;margin-left: 30rpx; text-align: left;">老兵烧烤-九寨特色</view>
<view style="flex: 1;margin-left: 30rpx; text-align: left;">{{details.Name}}</view>
</view>
<view class="restaurant-content">
<view class="restaurant-base">
<view class="head">
<view style="flex:1;">
<view class="restaurant-name">老兵烧烤-九寨特色</view>
<view class="restaurant-tag">
<u-tag style="margin-right: 22rpx;" text="小吃" mode="plain" border-color="#DFBE6E" color="#DFBE6E" size="mini"/>
<u-tag style="margin-right: 22rpx;" text="九寨特色" mode="plain" border-color="#DFBE6E" color="#DFBE6E" size="mini"/>
<u-tag style="margin-right: 22rpx;" text="米饭不给钱" mode="plain" border-color="#DFBE6E" color="#DFBE6E" size="mini"/>
<u-tag style="margin-right: 22rpx;" text="酒水免费" mode="plain" border-color="#DFBE6E" color="#DFBE6E" size="mini"/>
<view class="restaurant-name">{{details.Name}}</view>
<view class="restaurant-tag" style="display: flex;flex-wrap: wrap;">
<view v-for="(item,index) in details.FoodTag" :key="index">
<u-tag style="margin-right: 22rpx;" :text="item" mode="plain" border-color="#DFBE6E" color="#DFBE6E" size="mini" v-if="item"/>
</view>
<view v-for="(item,index) in details.GeographicTag" :key="index">
<u-tag style="margin-right: 22rpx;" :text="item" mode="plain" border-color="#DFBE6E" color="#DFBE6E" size="mini" v-if="item"/>
</view>
</view>
</view>
<!-- 关注 -->
<view class="op-box">
<image v-if="!islike"
<image v-if="details.FollowId===0"
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1622453740000_840.png"
@click="changeLike"></image>
<image v-if="islike"
<image v-if="details.FollowId>0"
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1622453740000_764.png"
@click="changeLike"></image>
</view>
......@@ -42,11 +44,11 @@
<view class="loc-left">
<view class="loc-name">
<u-icon name="clock" size="28" />
<text style="margin-left: 14rpx;">营业时间 11:30-12:30</text>
<u-tag style="margin-left: 22rpx;" text="营业中" bg-color="#DFBE6E" border-color="#DFBE6E" color="#ffffff"/>
<text style="margin-left: 14rpx;">营业时间 {{details.OpeningHours}}</text>
<u-tag style="margin-left: 22rpx;" text="营业中" bg-color="#DFBE6E" border-color="#DFBE6E" color="#ffffff" v-if="details.BusinessState===1"/>
</view>
<view class="loc-remark">
<view>无休息日,全年营业</view>
<!-- <view>无休息日,全年营业</view> -->
</view>
</view>
</view>
......@@ -54,15 +56,15 @@
<view class="loc-left">
<view class="loc-name">
<u-icon name="location" size="28" />
<text style="margin-left: 14rpx;">沟口 | 九寨沟风景区沟口</text>
<text style="margin-left: 14rpx;">{{details.Address}}</text>
</view>
<view class="loc-remark">
<view>距浦东国际机场14.5km,驾车约19min</view>
<view>距车站约1km,驾车约5min</view>
<view>{{details.ParkInfo}}</view>
<!-- <view>距车站约1km,驾车约5min</view> -->
</view>
</view>
<view class="loc-right">
<text style="margin-right: 20rpx;">地图详情</text>
<text style="margin-right: 20rpx;" @click="goMap(details.Address,details.Lng,details.Lat)">地图详情</text>
<u-icon name="arrow" size="20" />
</view>
</view>
......@@ -71,40 +73,30 @@
<view class="big-title" style="margin-top: 50rpx;">
<text>推荐菜品</text>
</view>
<view class="chooseDate" @click="chooseDate">
<text>选择日期</text>
<uni-calendar ref="calendar" :insert="true" :selected="calendar" @confirm="confirm"></uni-calendar>
</view>
<ul class="title-style-one hr">
<li>
<view class="item-title regular">鸡汤包饭</view>
</li>
<li>
<view class="item-title regular">土豆片</view>
</li>
<li>
<view class="item-title regular">鸡脚</view>
</li>
<li>
<view class="item-title regular">鸡汤包饭</view>
</li>
<li>
<view class="item-title regular">土豆片</view>
</li>
<li>
<view class="item-title regular">鸡脚</view>
<li v-for="(item,index) in details.FoodRecommendList" :key="index">
<view class="item-title regular">{{item.FoodName}}</view>
</li>
</ul>
<view class="big-title">
<text>优惠套餐</text>
</view>
<view class="restaurant-room">
<view class="room-list">
<package-good></package-good>
<package-good-test></package-good-test>
<view v-for="(item,index) in details.resultMealList" :key="index" class="room-list">
<package-good :data="item"></package-good>
<!-- <package-good-test></package-good-test> -->
</view>
</view>
</view>
<view class="empty-block"></view>
<!-- <view class="empty-block"></view> -->
<view class="detail-box">
<view class="flex">
<!-- <view class="flex">
<view class="big-title">
<text>发现周边</text>
</view>
......@@ -122,8 +114,8 @@
<near-good></near-good>
<near-good></near-good>
<near-good></near-good>
</view>
<view class="flex">
</view> -->
<!-- <view class="flex">
<view class="big-title">
<text>精选推荐</text>
</view>
......@@ -134,13 +126,17 @@
<view>
<recommed-restaurant></recommed-restaurant>
<recommed-restaurant></recommed-restaurant>
</view>
</view> -->
</view>
<view class="">
</view>
<!-- <u-popup v-model="showTimePopup" mode="bottom" border-radius="40" length="70%" :safe-area-inset-bottom="true" > -->
<!-- </u-popup> -->
</view>
</scroll-view>
<u-popup v-model="showTimePopup" mode="bottom" border-radius="20" length="85%" :safe-area-inset-bottom="true">
<canlendar @finish="chosenDateResult"></canlendar>
</u-popup>
</view>
</template>
......@@ -149,7 +145,7 @@
import packageGoodTest from './components/package-good2.vue';
import nearGood from './components/near-good.vue';
import recommedRestaurant from './components/recommed-restaurant.vue';
import canlendar from "./components/time/index.vue"
import uniCanlendar from "./components/uni-calendar/uni-calendar.vue"
export default {
data() {
return {
......@@ -166,7 +162,8 @@
picUrl: "https://ak-d.tripcdn.com/images/200v0f0000007d6wgBCD6_R_1080_808_R5_D.jpg"
}
],
id: 0,
ID: 0,
details:{},
typeList: [{
Id: 0,
Name: '视频'
......@@ -211,7 +208,11 @@
name: "优惠活动",
id: 5
}
]
],
calendar: [{
date: "",
info: ''
}],
}
},
components: {
......@@ -219,7 +220,7 @@
packageGoodTest,
nearGood,
recommedRestaurant,
canlendar
uniCanlendar
},
created() {
let d1 = new Date();
......@@ -239,10 +240,25 @@
data: JSON.stringify(obj)
})
this.searchObj.date = obj
// let d = new Date();
let nextDate = new Date(d.getTime() + 24*60*60*1000);
let year=nextDate.getFullYear();
let month=nextDate.getMonth()+1
if(month<10){
month='0'+month
}
let day=nextDate.getDate()
if(day<10){
day='0'+day
}
let tomorrow = year+'-'+month+'-'+day
this.calendar[0].date=tomorrow
},
onLoad(options) {
// this.id=options.id
// this.ProjectType=options.type
if (options && options.id) {
this.ID = options.id
this.getDetail()
}
let that = this
uni.getSystemInfo({
success(res) {
......@@ -256,13 +272,29 @@
this.mainColor = this.$uiConfig.mainColor;
},
methods: {
chooseDate(){
// this.showTimePopup=true
// this.$refs.calendar.open();
console.log(this.$refs,this)
},
confirm(e) {
this.Date = e.fulldate
this.calendar[0].date = e.fulldate
// this.getDetailByDate();
this.$forceUpdate()
},
// opencalendar(){
// this.$refs.calendar.open();
// },
goMap(name, lon, lat) {
let newLon=parseFloat(lon)
let newLat=parseFloat(lat)
wx.openLocation({
latitude:lat,
longitude:lon,
latitude:newLat,
longitude:newLon,
scale: 18,
name,
address:"武侯区科华中路 2 号",
// address:"武侯区科华中路 2 号",
success:(res)=>{
// console.log(res)
},
......@@ -282,12 +314,13 @@
})
},
chosenDateResult(obj) {
obj.startDay = this.formatMonthDay(obj.startDay)
obj.endDay = this.formatMonthDay(obj.endDay)
this.searchObj.date = obj
this.showTimePopup = false
},
// chosenDateResult(obj) {
// obj.startDay = this.formatMonthDay(obj.startDay)
// obj.endDay = this.formatMonthDay(obj.endDay)
// this.searchObj.date = obj
// this.showTimePopup = false
// },
formatMonthDay(str) {
let temp = str.split('-')
temp[0] = temp[0] > 9 ? temp[0] : "0" + temp[0]
......@@ -328,7 +361,19 @@
this.currentRoomType = i
},
changeLike() {
this.islike = !this.islike
this.request2({
url: '/api/AppletDining/GetFollowDining',
data: {
ID: this.details.FollowId,
SourceId:this.details.ID
}
},
res => {
if (res.resultCode == 1) {
this.getDetail()
}
}
);
},
previewImage(i) {
// uni.previewImage({
......@@ -372,11 +417,41 @@
changeHandler(i) {
this.active = i;
},
//获取详情
getDetail() {
this.request2({
url: '/api/AppletDining/GetDiningDetails',
data: {
ID: this.ID
}
},
res => {
if (res.resultCode == 1) {
res.data.FoodTag = res.data.FoodTag.split(',')
res.data.GeographicTag = res.data.GeographicTag.split(',')
this.details = res.data;
}
}
);
},
},
}
</script>
<style>
<style scoped>
.chooseDate{
/* width: 150px; */
/* display: inline-block; */
height: 60rpx;
background-color: #ECF1F4;
border-radius: 20rpx;
font-size: 24rpx;
font-family: PingFang SC;
font-weight: 500;
color: #111111;
line-height: 58rpx;
padding: 0 10rpx;
}
.restaurant-detail {
height: 100vh;
overflow: hidden;
......
......@@ -2,32 +2,30 @@
<view class="hotel-list">
<view class="search-box">
<view style="width: 1px; flex: 1;">
<u-search placeholder="美食名称" v-model="searchObj.searchKey" input-align="left" :value="searchObj.searchKey"
<u-search placeholder="美食名称" v-model="msg.Name" input-align="left"
text-color="#111" bg-color="rgba(0,0,0,0)" :show-action="false"></u-search>
</view>
</view>
<view>
<u-dropdown ref="uDropdown" @open="open" @close="close" active-color="#000" inactive-color="#444">
<u-dropdown-item v-model="searchObj.sort" :title="optionsTitle[0]" :options="options1" @change="change">
<u-dropdown-item v-model="msg.OrderBy" :title="optionsTitle[0]" :options="options1" @change="change">
</u-dropdown-item>
<u-dropdown-item :title="optionsTitle[1]" @change="change2">
<view class="slot-content">
<restaurant-type @sure-type="sureType" :current="currentTypeObj"></restaurant-type>
</view>
<u-dropdown-item v-model="msg.FoodTypeIds" :title="optionsTitle[1]" :options="classOptions">
</u-dropdown-item>
<u-dropdown-item :title="optionsTitle[2]">
<view class="slot-content" style="padding: 30rpx;background-color: #FFF;">
<view>
<!-- <view>
<text style="font-size: 28rpx;color:#111;font-weight: 800;margin-right: 10rpx;">餐厅类型</text>
</view>
<view class="hotel-rate-box">
<view v-for="(x,i) in options2" :key="i" class="hotel-rate" :class="{'active':tempRateAndPrice.types.indexOf(x.value)!=-1}" @click="setRestaurant(x.value)">{{x.label}}</view>
</view>
</view> -->
<view style="margin-top: 20rpx;">
<text style="font-size: 28rpx;color:#111;font-weight: 800;">价格</text>
</view>
<view class="hotel-rate-box">
<view v-for="(x,i) in rates" class="hotel-rate" :class="{'active':tempRateAndPrice.rate.indexOf(x.value)!=-1}" @click="setRestaurantPrice(x.value)">{{x.label}}</view>
<view v-for="(x,i) in rates" class="hotel-rate" :class="{'active':tempRateAndPrice.rate.indexOf(x.ID)!=-1}" @click="setRestaurantPrice(x.ID)">{{x.Name}}</view>
</view>
<view style="box-shadow: 0px -10px 30px 0px rgba(36, 36, 36, 0.06);margin-top:40rpx;display: flex;">
<view style="flex:1;margin-right: 30rpx;">
......@@ -39,18 +37,34 @@
</view>
</view>
</u-dropdown-item>
<!-- <u-dropdown-item :title="optionsTitle[3]" @change="change2">
<view class="slot-content">
<restaurant-type @sure-type="sureType" :current="currentTypeObj"></restaurant-type>
</view>
</u-dropdown-item> -->
</u-dropdown>
</view>
<scroll-view :scroll-y="true" @scrolltolower="lower" :enable-back-to-top="true" :enable-flex="true" :scroll-top="scrollTop"
@scroll="scroll" style="height: calc(100% - 168rpx); padding-bottom: 0px;">
<restaurant-good></restaurant-good>
<restaurant-good></restaurant-good>
<restaurant-good></restaurant-good>
<restaurant-good></restaurant-good>
<restaurant-good></restaurant-good>
<u-loadmore v-if="showLoading" :status="status" :load-text="loadText" :font-size="24" :margin-top="20"
:margin-bottom="20" bg-color="#F5F5F5" color="#111" />
<view v-for="(item,index) in restaurantList" :key="index">
<restaurant-good :data="item" @confirm="confirm(item.ID)"></restaurant-good>
</view>
<u-loadmore
:status="status"
:load-text="loadText"
:font-size="24"
:margin-top="20"
:margin-bottom="20"
bg-color="#FFF"
/>
</scroll-view>
<!-- 加载中 -->
<view class="loading" v-if="loading">
<u-loading mode="flower" size="48"></u-loading>
<Text style="color: #fff; margin-top: 10rpx;">加载中...</Text>
</view>
</view>
</template>
......@@ -61,9 +75,20 @@
export default {
data() {
return {
msg:{
pageIndex:1,
pageSize:10,
Name:"",
OrderBy:0,
FoodTypeIds:0,
DiningPriceType:-1,
},
page_count:1,
status: "loadmore",
restaurantList:[],//餐厅列表
searchObj:{
searchKey:"",
sort:1,
Name:"",
OrderBy:0,
rtype:-1,
rateAndPrice:{
types:[-1],
......@@ -77,52 +102,25 @@
},
optionsTitle: [
"推荐排序",
"菜系",
"筛选"
"分类",
"筛选",
"菜系"
],
rates: [
{
label:"不限",
value:-1
},
{
label:"50以下",
value:1
},
{
label:"50-100",
value:2
},
{
label:"100-150",
value:3
},
rates: [],//价格列表
options1: [
{
label:"150-200",
value:4
label: '不限',
value: 0,
},
{
label:"200以上",
value:5
}
],
options1: [
{
label: '推荐排序',
label: '人均最高',
value: 1,
},
{
label: '好评优先',
label: '人均最低',
value: 2,
},
{
label: '低价优先',
value: 3,
},
{
label: '高价优先',
value: 4,
}
],
options2: [
{
......@@ -150,6 +148,7 @@
value: 5,
}
],
classOptions:[],
btnStyle:{
borderRadius: '16rpx',
color: '#111',
......@@ -209,6 +208,9 @@
data: JSON.stringify(obj)
})
this.searchObj.date=obj
this.getFoodType();
this.getPriceEnum();
this.getFoodList();
},
methods: {
......@@ -222,15 +224,13 @@
});
},
lower(e) {
// TODO: 滚动到了底部,实现翻页加载
// if (this.msg.pageIndex < this.page_count) {
// this.status = "loading";
// this.msg.pageIndex++;
// this.init();
// } else {
// this.isover = true;
// this.status = "nomore";
// }
if (this.msg.pageIndex < this.page_count) {
this.msg.pageIndex++;
this.status = "loading";
this.getFoodList();
} else {
this.status = "nomore";
}
},
setRestaurantPrice(rateId){
if(rateId==-1){
......@@ -246,6 +246,7 @@
this.tempRateAndPrice.rate.splice(temp,1)
}
}
console.log(this.tempRateAndPrice.rate)
},
setRestaurant(typeId){
if(typeId==-1){
......@@ -340,34 +341,111 @@
this.$refs.uDropdown.highlight(index);
},
change(index) {
let temp = this.options1.find(x => {
if (x.value == index) {
return x
} else {
return false
}
})
this.optionsTitle[0] = temp.label
// let temp = this.options1.find(x => {
// if (x.ID == index) {
// return x
// } else {
// return false
// }
// })
// console.log(index,temp)
// this.optionsTitle[0] = temp.Name
},
change2(index){
if(index!=-1){
let temp = this.options2.find(x => {
if (x.value == index) {
return x
} else {
return false
// if(index!=-1){
// let temp = this.options2.find(x => {
// if (x.value == index) {
// return x
// } else {
// return false
// }
// })
// this.optionsTitle[1] = temp.label
// }else{
// this.optionsTitle[1] = "附近"
// }
},
// 获取餐食类型
getFoodType(){
this.request2({
url: '/api/AppletDining/GetFoodType',
data: {
ClassType:0
}
},
res => {
if(res.resultCode===1){
this.typeList=res.data
this.classOptions=[{
label: "不限",
value: 0,
}]
res.data.map(i=>{
let obj={
label: i.Name,
value: i.ID,
}
this.classOptions.push(obj)
})
}
})
this.optionsTitle[1] = temp.label
}else{
this.optionsTitle[1] = "附近"
}
}
);
},
// 获取餐食价格枚举
getPriceEnum(){
this.request2({
url: '/api/AppletDining/GetDiningPriceType',
data: {}
},
res => {
if(res.resultCode===1){
this.rates=res.data
}
}
);
},
// 获取餐食列表
getFoodList(){
// this.msg.DiningPriceType=this.searchObj.rateAndPrice.join(",")
this.request2({
url: '/api/AppletDining/GetDiningPage',
data: this.msg
},
res => {
if(res.resultCode===1){
this.page_count = res.data.pageCount;
res.data.pageData.forEach(item=>{
item.FoodTag=item.FoodTag.split(',')
item.GeographicTag=item.GeographicTag.split(',')
})
if(this.msg.pageIndex==1){
this.restaurantList=res.data.pageData;
}else if(this.msg.pageIndex>1){
this.restaurantList=[...this.restaurantList,...res.data.pageData];
}
if (this.page_count == 1) {
this.status = "nomore";
}
}
}
);
},
confirm(id){
uni.navigateTo({
url:"/pages/restaurant/detail?id="+id
})
}
},
}
</script>
<style>
<style scoped>
/deep/.u-flex{
justify-content: center;
}
.hotel-list {
height: 100vh;
......@@ -405,7 +483,7 @@
flex-wrap: wrap;
}
.hotel-rate{
width: 159rpx;
width: 215rpx;
height: 60rpx;
background: #ECF1F4;
border-radius: 10rpx;
......
......@@ -803,7 +803,7 @@
.tag-img {
width: 105rpx;
height: 32rpx;
background-color: #FFFFFF;
// background-color: #FFFFFF;
border-radius: 4rpx;
}
......
......@@ -3,7 +3,7 @@
<view class="search-box">
<view style="width: 1px; flex: 1;">
<u-search placeholder="目的地/景点/主题" v-model="msg.Name" input-align="left" :value="searchObj.searchKey"
text-color="#111" bg-color="rgba(0,0,0,0)" :show-action="false"></u-search>
text-color="#111" bg-color="rgba(0,0,0,0)" :show-action="false" @search="searchList" @clear="searchList"></u-search>
</view>
</view>
<view>
......@@ -97,10 +97,6 @@
</template>
<script>
// import rangeSlider from "./components/range-slider.vue"
// import canlendar from "./components/time/index.vue"
// import Cascade from "./components/cascade.vue"
export default {
data() {
......@@ -120,7 +116,6 @@
page_count:1,
loading: false,
status: "loadmore",
// count:0,
loadText: {
loadmore: "轻轻上拉,加载更多",
loading: "努力加载中",
......@@ -156,11 +151,6 @@
}
}
},
components: {
// rangeSlider,
// canlendar,
// Cascade
},
created() {
uni.setNavigationBarTitle({
title: "门票",
......@@ -169,9 +159,9 @@
this.getList();// 获取景点门票类型
},
methods: {
openBuyNotice(){
console.log(1,this.$refs.popup)
this.$refs.popup.open()
searchList(){
this.msg.pageIndex=1
this.getList()
},
lower(e) {
if (this.msg.pageIndex < this.page_count) {
......@@ -192,9 +182,6 @@
this.showTimePopup=false
},
chosenDate(){
// uni.navigateTo({
// url:"/pages/hotel/components/time/index"
// })
this.showTimePopup=true
},
//筛选重置
......@@ -235,7 +222,7 @@
},
res => {
if(res.resultCode===1){
this.typeList=res.data
// this.typeList=res.data
this.classOptions=[{
label: "不限",
value: 0,
......@@ -259,20 +246,23 @@
data: this.msg
},
res => {
this.page_count = res.data.pageCount;
res.data.pageData.forEach(item=>{
item.ScenicSpotTag=item.ScenicSpotTag.split(',')
item.GeographicTag=item.GeographicTag.split(',')
})
if(this.msg.pageIndex==1){
this.dataList=res.data.pageData;
}else if(this.msg.pageIndex>1){
this.dataList=[...this.dataList,...res.data.pageData];
if(res.resultCode===1){
this.page_count = res.data.pageCount;
res.data.pageData.forEach(item=>{
item.ScenicSpotTag=item.ScenicSpotTag.split(',')
item.GeographicTag=item.GeographicTag.split(',')
})
if(this.msg.pageIndex==1){
this.dataList=res.data.pageData;
}else if(this.msg.pageIndex>1){
this.dataList=[...this.dataList,...res.data.pageData];
}
if (this.page_count == 1) {
this.status = "nomore";
}
}
if (this.page_count == 1) {
this.status = "nomore";
}
}
);
},
......@@ -282,7 +272,6 @@
}else{
this.msg[field]=-1
}
console.log(this.msg)
}
},
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment