Commit 8364803b authored by 罗超's avatar 罗超

Merge branch 'master' of http://gitlab.oytour.com/zk123/jz_travel

parents a0689155 cc65f190
...@@ -19,9 +19,21 @@ ...@@ -19,9 +19,21 @@
> >
<view class="tips" v-if="goodsInfo.showGoodsTag"><image :src="goodsInfo.goodsTagPicUrl" mode="widthFix" style="width: 100%;" /></view> <view class="tips" v-if="goodsInfo.showGoodsTag"><image :src="goodsInfo.goodsTagPicUrl" mode="widthFix" style="width: 100%;" /></view>
<view class="img-box"> <view class="img-box">
<image class="img-0" :mode="goodsInfo.fill == 1 ? 'aspectFill' : 'aspectFit'" :src="item.picUrl" /> <template v-if="item.imglist&&item.imglist.length==1">
<image class="img-1" :mode="goodsInfo.fill == 1 ? 'aspectFill' : 'aspectFit'" :src="item.picUrl" /> <image class="img-0" :mode="goodsInfo.fill == 1 ? 'aspectFill' : 'aspectFit'" :src="item.imglist[0]" />
<image class="img-2" :mode="goodsInfo.fill == 1 ? 'aspectFill' : 'aspectFit'" :src="item.picUrl" /> <image class="img-1" :mode="goodsInfo.fill == 1 ? 'aspectFill' : 'aspectFit'" :src="item.imglist[0]" />
<image class="img-2" :mode="goodsInfo.fill == 1 ? 'aspectFill' : 'aspectFit'" :src="item.imglist[0]" />
</template>
<template v-if="item.imglist&&item.imglist.length==2">
<image class="img-0" :mode="goodsInfo.fill == 1 ? 'aspectFill' : 'aspectFit'" :src="item.imglist[0]" />
<image class="img-1" :mode="goodsInfo.fill == 1 ? 'aspectFill' : 'aspectFit'" :src="item.imglist[1]" />
<image class="img-2" :mode="goodsInfo.fill == 1 ? 'aspectFill' : 'aspectFit'" :src="item.imglist[0]" />
</template>
<template v-if="item.imglist&&item.imglist.length>3">
<image class="img-0" :mode="goodsInfo.fill == 1 ? 'aspectFill' : 'aspectFit'" :src="item.imglist[0]" />
<image class="img-1" :mode="goodsInfo.fill == 1 ? 'aspectFill' : 'aspectFit'" :src="item.imglist[1]" />
<image class="img-2" :mode="goodsInfo.fill == 1 ? 'aspectFill' : 'aspectFit'" :src="item.imglist[2]" />
</template>
</view> </view>
<view class="good-info"> <view class="good-info">
<view class="good-name" v-if="goodsInfo.showGoodsName">{{ item.name }} </view> <view class="good-name" v-if="goodsInfo.showGoodsName">{{ item.name }} </view>
...@@ -223,7 +235,7 @@ export default { ...@@ -223,7 +235,7 @@ export default {
} }
.good-seven .good-info .good-name { .good-seven .good-info .good-name {
font-size: 30rpx; font-size: 30rpx;
height: 80rpx; max-height: 80rpx;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
display: -webkit-box; display: -webkit-box;
......
...@@ -542,6 +542,8 @@ ...@@ -542,6 +542,8 @@
"path":"allorderList"//统一订单 "path":"allorderList"//统一订单
},{ },{
"path":"allorderdetails"//统一订单详情 "path":"allorderdetails"//统一订单详情
},{
"path":"paysuccess"//支付成功页面
}] }]
}, },
//相亲分包 //相亲分包
......
...@@ -100,7 +100,7 @@ ...@@ -100,7 +100,7 @@
<template> <template>
<view class="quick-box" style="height:100vh;"> <view class="quick-box" style="height:100vh;">
<view class="guid-head"> <view class="guid-head">
<u-tabs name="Name" :list="headData" :is-scroll="true" :current="current" :bar-width="80" :font-size="28" <u-tabs name="Name" :list="headData" :is-scroll="true" :current="current" :font-size="28" height="100"
:active-color="mainColor" @change="getChild"></u-tabs> :active-color="mainColor" @change="getChild"></u-tabs>
</view> </view>
<u-empty v-if="dataList.length==0" text="暂无数据" mode="data"></u-empty> <u-empty v-if="dataList.length==0" text="暂无数据" mode="data"></u-empty>
......
...@@ -142,15 +142,11 @@ ...@@ -142,15 +142,11 @@
); );
}, },
unique(arr){//数组去重 unique(arr){//数组去重
var res = []; const res = new Map();
var obj = {}; return arr.filter(
for(var i=0; i<arr.length; i++){ (list) => !res.has(list.ti) && res.set(list.ti, 1)
if( !obj[arr[i]] ){ );
obj[arr[i]] = 1;
res.push(arr[i]);
}
}
return res;
}, },
onPageScroll(e) { onPageScroll(e) {
this.scrollTop = e.scrollTop; this.scrollTop = e.scrollTop;
......
...@@ -372,14 +372,15 @@ ...@@ -372,14 +372,15 @@
}) })
return return
} }
uni.showLoading({
title: '下单中...'
})
let that= this let that= this
uni.requestSubscribeMessage({ uni.requestSubscribeMessage({
tmplIds: that.details.template_message_list, tmplIds: that.details.template_message_list,
complete(_res) { complete(_res) {
console.log(_res) console.log(_res)
uni.showLoading({
title: '下单中...'
})
that.request2({ that.request2({
url: '/api/AppletCar/SetAppletCarOrderInfo', url: '/api/AppletCar/SetAppletCarOrderInfo',
data: that.addMsg data: that.addMsg
...@@ -433,22 +434,27 @@ ...@@ -433,22 +434,27 @@
uni.showToast({ uni.showToast({
title: "支付成功" title: "支付成功"
}) })
setTimeout(()=>{ // setTimeout(()=>{
uni.redirectTo({ // uni.redirectTo({
url: '/pages/jiuzhai/allorderList' // url: '/pages/jiuzhai/allorderList'
}); // });
}, 100 ) // }, 100 )
uni.redirectTo({
url: '/pages/jiuzhai/paysuccess?PreferPrice='+that.addMsg.Final_Price
});
}, },
fail: function(err) { fail: function(err) {
console.log('fail:', err); console.log('fail:', err);
uni.showToast({ uni.showToast({
title: "支付失败" title: "支付失败",
icon:'none'
}) })
setTimeout(()=>{ setTimeout(()=>{
uni.redirectTo({ uni.redirectTo({
url: '/pages/jiuzhai/allorderList' url: '/pages/jiuzhai/allorderList'
}); });
}, 100 ) }, 100 )
} }
}); });
}, },
......
...@@ -171,6 +171,12 @@ ...@@ -171,6 +171,12 @@
canlendar, canlendar,
hotelGood hotelGood
}, },
onLoad(options) {
if(options && options.Name){
this.searchObj.Name = options.Name
}
},
created() { created() {
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
title: "酒店", title: "酒店",
......
...@@ -158,14 +158,14 @@ ...@@ -158,14 +158,14 @@
出发时间:{{x.Date}} {{x.DepartureTime}} 出发时间:{{x.Date}} {{x.DepartureTime}}
</view> </view>
<view class="car-w"> <view class="car-w">
数:{{x.PeopleNumber+x.ChildNumber}}人 单价:¥{{x.Unit_Price.toFixed(2)}} 总数:{{x.PeopleNumber+x.ChildNumber}}人 单价:¥{{x.Unit_Price.toFixed(2)}}
</view> </view>
<view class="order_xu"></view> <view class="order_xu"></view>
</view> </view>
</view> </view>
<view style="font-size: 14px;color: #111111;margin-top: 10px;text-align: right;"> <view style="font-size: 14px;color: #111111;margin-top: 10px;text-align: right;">
应付:¥{{item.PreferPrice}} 金额:¥{{item.PreferPrice}}
</view> </view>
<view style="display: flex;justify-content: flex-end;margin-top: 5px;"> <view style="display: flex;justify-content: flex-end;margin-top: 5px;">
<view class="zailaiyidan" v-if="item.OrderStatus == 3 || item.OrderStatus == 4 || item.OrderStatus == 5" @click.stop="onemoreorder(item)"> <view class="zailaiyidan" v-if="item.OrderStatus == 3 || item.OrderStatus == 4 || item.OrderStatus == 5" @click.stop="onemoreorder(item)">
...@@ -387,13 +387,14 @@ ...@@ -387,13 +387,14 @@
that.showModal = false; that.showModal = false;
if(that.msg.OrderStatus==0){//判断在全部列表的时候 改变他的状态 if(that.msg.OrderStatus==0){//判断在全部列表的时候 改变他的状态
if(that.Cancelmsg.Type==1){ if(that.Cancelmsg.Type==1){//代付款的取消
uni.showToast({ uni.showToast({
title: res.message, title: res.message,
icon: 'none' icon: 'none'
}) })
that.g[index].OrderStatus = 4; that.g[that.index].OrderStatus = 4;
that.g[index].IsApplyForCancel = 1; that.g[that.index].OrderStatusName = '已取消';
that.g[that.index].IsApplyForCancel = 1;
}else{ }else{
uni.showToast({ uni.showToast({
title: "取消成功,请等待审核", title: "取消成功,请等待审核",
...@@ -401,8 +402,9 @@ ...@@ -401,8 +402,9 @@
icon: "none", icon: "none",
duration: 2000, duration: 2000,
}); });
that.g[index].OrderStatus = 5; that.g[that.index].OrderStatus = 5;
that.g[index].IsApplyForCancel = 1; that.g[that.index].OrderStatusName = '待处理';
that.g[that.index].IsApplyForCancel = 1;
} }
}else{//在待付款的页面时候的操作处理 }else{//在待付款的页面时候的操作处理
if (that.Cancelmsg.Type == 1) { if (that.Cancelmsg.Type == 1) {
...@@ -421,7 +423,7 @@ ...@@ -421,7 +423,7 @@
// that.msg.pageIndex = 1; // that.msg.pageIndex = 1;
// that.g = []; // that.g = [];
// that.init(); // that.init();
this.change(5) that.change(5)
} }
} }
...@@ -486,11 +488,11 @@ ...@@ -486,11 +488,11 @@
res => { res => {
let orderInfo = JSON.parse(res.data); let orderInfo = JSON.parse(res.data);
console.log(orderInfo) console.log(orderInfo)
this.Pay(orderInfo) this.Pay(orderInfo,data.PreferPrice)
} }
); );
}, },
Pay(orderInfo){ Pay(orderInfo,PreferPrice){
let that=this; let that=this;
uni.requestPayment({ uni.requestPayment({
provider: 'wxpay', provider: 'wxpay',
...@@ -504,17 +506,22 @@ ...@@ -504,17 +506,22 @@
uni.showToast({ uni.showToast({
title: "支付成功" title: "支付成功"
}) })
if(that.msg.OrderStatus==0){ // if(that.msg.OrderStatus==0){
that.g[that.payindex].OrderStatus = 2 // that.g[that.payindex].OrderStatus = 2;
}else{ // that.g[that.payindex].OrderStatusName = '待确认';
this.change(2)
} // }else{
// that.change(2)
// }
uni.redirectTo({
url: '/pages/jiuzhai/paysuccess?PreferPrice='+PreferPrice
});
}, },
fail: function(err) { fail: function(err) {
console.log('fail:', err); console.log('fail:', err);
uni.showToast({ uni.showToast({
title: "支付失败" title: "支付失败",
icon:'none'
}) })
} }
}); });
...@@ -522,11 +529,17 @@ ...@@ -522,11 +529,17 @@
onemoreorder(data){//再来一单的处理 onemoreorder(data){//再来一单的处理
if(data.OrderType==1){//酒店 if(data.OrderType==1){//酒店
uni.navigateTo({
url: '/pages/hotel/list?Name='+data.HotelList[0].HotelName,
})
}else if(data.OrderType==2){//餐厅 }else if(data.OrderType==2){//餐厅
uni.navigateTo({
url: '/pages/restaurant/list?Name='+data.DiningList[0].MealName,
})
}else if(data.OrderType==3){//门票 }else if(data.OrderType==3){//门票
uni.navigateTo({
url: '/pages/ticketCoupons/list?Name='+data.TicketList[0].TicketName,
})
}else if(data.OrderType==4){//车 }else if(data.OrderType==4){//车
let obj = { let obj = {
StartCityId:data.CarList[0].StartCityId, StartCityId:data.CarList[0].StartCityId,
......
...@@ -139,6 +139,20 @@ ...@@ -139,6 +139,20 @@
border-top: 1px solid #f5f5f5; border-top: 1px solid #f5f5f5;
background: #fff; background: #fff;
} }
.kefu{
display: flex;
flex-direction: column;
align-items: center;
margin-left: 5px;
}
.contButton {
width: 100%;
height: 100%;
position: absolute;
left: 0;
top: 0;
opacity: 0;
}
} }
</style> </style>
<template> <template>
...@@ -152,7 +166,14 @@ ...@@ -152,7 +166,14 @@
<view class="box-top2"> <view class="box-top2">
<view style="display: flex;align-items: center;justify-content: space-between;"> <view style="display: flex;align-items: center;justify-content: space-between;">
<span class='box-top2-text'>{{OrderInfo.OrderTypeName}}</span> <span class='box-top2-text'>{{OrderInfo.OrderTypeName}}</span>
<span class='box-top2-text' style='font-size: 12px;font-weight: normal;'>{{OrderInfo.OrderNo}}</span> <view style="display: flex;align-items: center;">
<span class='box-top2-text' style='font-size: 12px;font-weight: normal;'>{{OrderInfo.OrderNo}}</span>
<view style='margin-left: 5px;'>
<u-button size="mini" shape="circle" @click="paste(OrderInfo.OrderNo)">复制</u-button>
</view>
</view>
</view> </view>
<view class="order_xu"></view> <view class="order_xu"></view>
...@@ -295,6 +316,13 @@ ...@@ -295,6 +316,13 @@
</view> </view>
<view style='width: 100%;height: 80px;'></view> <view style='width: 100%;height: 80px;'></view>
<view class="btn-box" > <view class="btn-box" >
<view class="kefu" style="position: relative;" >
<u-icon name="service-o" color="#111" size="24rpx"></u-icon>
<span style='margin-left: 3px;'>客服</span>
<button open-type="contact" class="contButton" ></button>
</view>
<view class="item" v-if="OrderInfo.OrderStatus==1 "> <view class="item" v-if="OrderInfo.OrderStatus==1 ">
<u-button shape="circle" size="medium" @click.stop="queren(OrderInfo)" :custom-style="customStyle2" >待付款</u-button> <u-button shape="circle" size="medium" @click.stop="queren(OrderInfo)" :custom-style="customStyle2" >待付款</u-button>
</view> </view>
...@@ -302,7 +330,7 @@ ...@@ -302,7 +330,7 @@
<u-button shape="circle" size="medium" @click.stop="onemoreorder(OrderInfo)" :custom-style="customStyle2" >再来一单</u-button> <u-button shape="circle" size="medium" @click.stop="onemoreorder(OrderInfo)" :custom-style="customStyle2" >再来一单</u-button>
</view> </view>
<view @click.stop="getCancel(OrderInfo)" class="item" v-if="OrderInfo.IsApplyForCancel!=1 && (OrderInfo.OrderStatus==1||OrderInfo.OrderStatus==2 ||OrderInfo.OrderStatus==3)&& getquxiao(OrderInfo)"> <view @click.stop="getCancel(OrderInfo)" class="item" v-if="OrderInfo.IsApplyForCancel!=1 && (OrderInfo.OrderStatus==1||OrderInfo.OrderStatus==2 ||OrderInfo.OrderStatus==3)&& getquxiao(OrderInfo)">
<u-button shape="circle" size="medium" :custom-style="customStyle" @click="cancel">取消订单</u-button> <u-button shape="circle" size="medium" :custom-style="customStyle" >取消订单</u-button>
</view> </view>
<view class="item" style="line-height: 34px;font-size: 16px;color: gray;font-weight: 600;" v-if="OrderInfo.OrderStatus == 4"> <view class="item" style="line-height: 34px;font-size: 16px;color: gray;font-weight: 600;" v-if="OrderInfo.OrderStatus == 4">
...@@ -311,6 +339,8 @@ ...@@ -311,6 +339,8 @@
<view class="item" style="line-height: 34px;font-size: 16px;color: gray;font-weight: 600;" v-if="OrderInfo.OrderStatus == 5"> <view class="item" style="line-height: 34px;font-size: 16px;color: gray;font-weight: 600;" v-if="OrderInfo.OrderStatus == 5">
待处理 待处理
</view> </view>
</view> </view>
<u-popup v-model="showModal" mode="center" length="80%"> <u-popup v-model="showModal" mode="center" length="80%">
<view style='display: flex;flex-direction: column;align-items: center;background: #fff;'> <view style='display: flex;flex-direction: column;align-items: center;background: #fff;'>
...@@ -492,12 +522,16 @@ ...@@ -492,12 +522,16 @@
uni.showToast({ uni.showToast({
title: "支付成功" title: "支付成功"
}) })
that.getMyOrderInfo() // that.getMyOrderInfo()
uni.redirectTo({
url: '/pages/jiuzhai/paysuccess?PreferPrice='+that.OrderInfo.PreferPrice
});
}, },
fail: function(err) { fail: function(err) {
console.log('fail:', err); console.log('fail:', err);
uni.showToast({ uni.showToast({
title: "支付失败" title: "支付失败",
icon:'none'
}) })
} }
}); });
...@@ -529,11 +563,17 @@ ...@@ -529,11 +563,17 @@
onemoreorder(data){//再来一单的处理 onemoreorder(data){//再来一单的处理
if(data.OrderType==1){//酒店 if(data.OrderType==1){//酒店
uni.navigateTo({
url: '/pages/hotel/list?Name='+data.HotelList[0].HotelName,
})
}else if(data.OrderType==2){//餐厅 }else if(data.OrderType==2){//餐厅
uni.navigateTo({
url: '/pages/restaurant/list?Name='+data.DiningList[0].MealName,
})
}else if(data.OrderType==3){//门票 }else if(data.OrderType==3){//门票
uni.navigateTo({
url: '/pages/ticketCoupons/list?Name='+data.TicketList[0].TicketName,
})
}else if(data.OrderType==4){//车 }else if(data.OrderType==4){//车
let obj = { let obj = {
StartCityId:data.CarList[0].StartCityId, StartCityId:data.CarList[0].StartCityId,
...@@ -548,7 +588,12 @@ ...@@ -548,7 +588,12 @@
url: '/pages/guidecar/index?obj='+encodeURIComponent(JSON.stringify(obj)), url: '/pages/guidecar/index?obj='+encodeURIComponent(JSON.stringify(obj)),
}) })
} }
} },
paste(value) {
uni.setClipboardData({
data: value,
});
},
} }
} }
</script> </script>
......
...@@ -674,11 +674,15 @@ ...@@ -674,11 +674,15 @@
}, },
//获取数据 //获取数据
getList() { getList() {
console.log("this.msg", this.msg); uni.showLoading({
title:'加载中',
icon:'none'
})
this.apipost( this.apipost(
"b2b_get_GetB2BTravelPageList", "b2b_get_GetB2BTravelPageList",
this.msg, this.msg,
res => { res => {
uni.hideLoading();
if (res.resultCode == 1) { if (res.resultCode == 1) {
this.dataList = this.dataList.concat(res.data.pageData); this.dataList = this.dataList.concat(res.data.pageData);
this.page_count = res.data.pageCount; this.page_count = res.data.pageCount;
......
...@@ -245,7 +245,7 @@ ...@@ -245,7 +245,7 @@
BrandId: 0, BrandId: 0,
TradeWay: 0, TradeWay: 0,
PlatformOrder: '', PlatformOrder: '',
GuestNum: this.orderMsg.ManNum + this.orderMsg.ChirdNum, GuestNum: this.orderMsg.ManNum + this.orderMsg.ChirdNum+this.orderMsg.BabyNum,
IsChildrenTour: this.currentPriceInfo.isSupportChildren, IsChildrenTour: this.currentPriceInfo.isSupportChildren,
IsBirdDiscount: this.zaoniao > 0 ? 1 : 2, IsBirdDiscount: this.zaoniao > 0 ? 1 : 2,
PredictRoomNum: 1, PredictRoomNum: 1,
......
...@@ -108,7 +108,7 @@ ...@@ -108,7 +108,7 @@
</view> </view>
<view class="jz_SureCommodity"> <view class="jz_SureCommodity">
<view class="jz_OrderNum">下单时间</view> <view class="jz_OrderNum">下单时间</view>
<view class="jz_OrderBold">{{orderData.CreateDate}}</view> <view class="jz_OrderBold">{{orderData.CreateDateStr}}</view>
</view> </view>
<view class="jz_SureCommodity"> <view class="jz_SureCommodity">
<view class="jz_OrderNum">支付方式</view> <view class="jz_OrderNum">支付方式</view>
......
<template>
<view class="paySuccess">
<view style="background: #fff;">
<view class="img-box">
<img src="/static/images/icon/pay-success.png" class="img" />
</view>
<view class="title">订单支付成功</view>
<view class="price">实付 ¥{{PreferPrice}}</view>
<view class="btn-box">
<u-button style="display: inline-block;" shape="circle" :custom-style="customStyle" @click="goHome">返回首页</u-button>
<u-button shape="circle" style="margin-left: 60rpx; display: inline-block;" :custom-style="themCustomStyle"
@click.stop="redictToOrders">查看订单</u-button>
</view>
</view>
</view>
</template>
<script>
export default {
components: {
},
data() {
return {
customStyle: {
marginLeft: "20px",
padding: "0 30rpx",
},
themCustomStyle: {
marginLeft: "20px",
padding: "0 30rpx",
},
mainColor: "",
recommend: [],
payInfo: {},
showCoupons: false,
couponMessage: '',
PreferPrice:'',
};
},
onLoad(option) {
if (option.PreferPrice) {
this.PreferPrice = option.PreferPrice
}
uni.setNavigationBarTitle({
title: "支付成功",
});
this.mainColor = this.$uiConfig.mainColor;
this.themCustomStyle.color = this.mainColor;
this.themCustomStyle.borderColor = this.mainColor;
},
methods: {
redictToOrders() {
uni.redirectTo({
url: '/pages/jiuzhai/allorderList'
});
},
goHome() {
uni.reLaunch({
url: "/pages/index/index",
});
},
},
};
</script>
<style>
.paySuccess {
min-height: 100vh;
padding-bottom: 40rpx;
background: #f5f5f5;
}
.paySuccess .img-box {
display: flex;
align-items: center;
justify-content: center;
}
.paySuccess .img-box .img {
width: 256rpx;
height: 256rpx;
padding: 60rpx 0 0 0;
}
.paySuccess .title {
padding: 40rpx 0 20rpx 0;
font-size: 32rpx;
color: #000;
font-weight: 600;
text-align: center;
}
.paySuccess .price {
font-size: 30rpx;
color: gray;
padding-bottom: 60rpx;
text-align: center;
}
.paySuccess .btn-box {
padding-bottom: 60rpx;
text-align: center;
}
</style>
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
<view class="buy-content"></view> <view class="buy-content"></view>
<view class="buy-tips">在线订</view> <view class="buy-tips">在线订</view>
</view> </view>
<view class="buy disabled" v-if="data.RemainingInventory===0"> <view class="buy disabled" v-if="data.RemainingInventory<=0">
<view class="buy-content"></view> <view class="buy-content"></view>
<view class="buy-tips">已售罄</view> <view class="buy-tips">已售罄</view>
</view> </view>
......
...@@ -6,11 +6,11 @@ ...@@ -6,11 +6,11 @@
</div> </div>
<div class="right-slider"> <div class="right-slider">
<scroll-view scroll-y="true" style="height: 30vh;"> <scroll-view scroll-y="true" style="height: 30vh;">
<div class="item" :class="{'active':d[tid].Id==currentObj.Id}" @click="clickHandler(d[tid])"> <div class="item" :class="{'active':d[tid].ID==currentObj.ID}" @click="clickHandler(d[tid])">
<div class="left">不限</div> <div class="left">不限</div>
</div> </div>
<div class="item" :class="{'active':x.Id==currentObj.Id}" v-for="(x, index) in sd" :key="index" @click="clickHandler(x)"> <div class="item" :class="{'active':x.ID==currentObj.ID}" v-for="(x, index) in sd" :key="index" @click="clickHandler(x)">
<div class="left">{{ x.Name }}</div> <div class="left">{{ x.Name}}</div>
</div> </div>
</scroll-view> </scroll-view>
<view style="box-shadow: 0px -10px 30px 0px rgba(36, 36, 36, 0.06);margin-top:40rpx;display: flex;"> <view style="box-shadow: 0px -10px 30px 0px rgba(36, 36, 36, 0.06);margin-top:40rpx;display: flex;">
...@@ -32,56 +32,56 @@ ...@@ -32,56 +32,56 @@
d:{ d:{
type:Array, type:Array,
default:[{ default:[{
Id:1, ID:1,
Name:"川菜", Name:"川菜",
ChildList:[ ChildrenList:[
{ {
Id:2, ID:2,
Name:"中餐" Name:"中餐"
}, },
{ {
Id:3, ID:3,
Name:"汤锅" Name:"汤锅"
}, },
{ {
Id:4, ID:4,
Name:"干锅" Name:"干锅"
}, },
{ {
Id:5, ID:5,
Name:"火锅" Name:"火锅"
}, },
{ {
Id:6, ID:6,
Name:"蓉派川菜" Name:"蓉派川菜"
}, },
{ {
Id:7, ID:7,
Name:"渝派川菜" Name:"渝派川菜"
}, },
{ {
Id:8, ID:8,
Name:"盐帮菜" Name:"盐帮菜"
} }
] ]
},{ },{
Id:9, ID:9,
Name:"火锅", Name:"火锅",
ChildList:[ ChildrenList:[
{ {
Id:10, ID:10,
Name:"成都火锅" Name:"成都火锅"
}, },
{ {
Id:11, ID:11,
Name:"藏式火锅" Name:"藏式火锅"
}, },
{ {
Id:12, ID:12,
Name:"重庆火锅" Name:"重庆火锅"
}, },
{ {
Id:13, ID:13,
Name:"北京火锅" Name:"北京火锅"
} }
] ]
...@@ -90,7 +90,7 @@ ...@@ -90,7 +90,7 @@
current:{ current:{
type:Object, type:Object,
default:{ default:{
Id:-1, ID:-1,
active:0 active:0
} }
} }
...@@ -129,7 +129,7 @@ ...@@ -129,7 +129,7 @@
background:"#111" background:"#111"
}, },
currentObj:{ currentObj:{
Id:-1, ID:-1,
active:0 active:0
} }
}; };
...@@ -139,18 +139,19 @@ ...@@ -139,18 +139,19 @@
}, },
created() { created() {
this.mainColor = this.$uiConfig.mainColor; this.mainColor = this.$uiConfig.mainColor;
this.sd = this.d[this.tid].ChildList; this.sd = this.d[this.tid].ChildrenList;
}, },
methods: { methods: {
changeHandler(i) { changeHandler(i) {
this.tid = i; this.tid = i;
this.sd = this.d[this.tid].ChildList; this.sd = this.d[this.tid].ChildrenList;
}, },
clickHandler(item) { clickHandler(item) {
this.currentObj=item this.currentObj=item
this.currentObj.active=this.active this.currentObj.active=this.active
// let Id1 = this.d[this.tid].Id; console.log(this.currentObj)
// let Id2 = item.Id; // let Id1 = this.d[this.tid].ID;
// let Id2 = item.ID;
// let CategoryIds = Id2; // let CategoryIds = Id2;
// let IsEducation = uni.getStorageSync('basedata') ? // let IsEducation = uni.getStorageSync('basedata') ?
// (uni.getStorageSync('basedata').mall.setting.mallStyle.IsEducation ? uni.getStorageSync('basedata').mall.setting.mallStyle // (uni.getStorageSync('basedata').mall.setting.mallStyle.IsEducation ? uni.getStorageSync('basedata').mall.setting.mallStyle
...@@ -169,7 +170,7 @@ ...@@ -169,7 +170,7 @@
sendResult(t){ sendResult(t){
if(t==-1){ if(t==-1){
this.currentObj={ this.currentObj={
Id:-1, ID:-1,
active:0 active:0
} }
} }
......
...@@ -277,7 +277,7 @@ ...@@ -277,7 +277,7 @@
}, },
openPicture() { openPicture() {
uni.navigateTo({ uni.navigateTo({
url: "/pages/restaurant/picture" url: "/pages/restaurant/picture?id="+this.ID
}) })
}, },
openDescription() { openDescription() {
......
...@@ -2,23 +2,26 @@ ...@@ -2,23 +2,26 @@
<view class="hotel-list"> <view class="hotel-list">
<view class="search-box"> <view class="search-box">
<view style="width: 1px; flex: 1;"> <view style="width: 1px; flex: 1;">
<u-search placeholder="美食名称" v-model="msg.Name" input-align="left" <u-search placeholder="美食名称" v-model="msg.Name" input-align="left" text-color="#111"
text-color="#111" bg-color="rgba(0,0,0,0)" :show-action="false" clearabled @search="searchList" @clear="searchList"></u-search> bg-color="rgba(0,0,0,0)" :show-action="false" clearabled @search="searchList" @clear="searchList">
</u-search>
</view> </view>
</view> </view>
<view> <view>
<u-dropdown ref="uDropdown" @open="open" @close="close" active-color="#000" inactive-color="#444"> <u-dropdown ref="uDropdown" @open="open" @close="close" active-color="#000" inactive-color="#444">
<u-dropdown-item v-model="msg.OrderBy" :title="optionsTitle[0]" :options="options1" @change="getFoodList"> <u-dropdown-item v-model="msg.OrderBy" :title="optionsTitle[0]" :options="options1"
@change="getFoodList">
</u-dropdown-item> </u-dropdown-item>
<u-dropdown-item v-model="msg.FoodTypeIds" :title="optionsTitle[1]" @change="getFoodList"> <u-dropdown-item :title="optionsTitle[1]">
<view class="slot-content"> <view class="slot-content">
<restaurant-type @sure-type="sureType" :current="currentTypeObj"></restaurant-type> <restaurant-type @sure-type="sureType" :current="currentTypeObj" :d="foodType">
</restaurant-type>
</view> </view>
</u-dropdown-item> </u-dropdown-item>
<u-dropdown-item :title="optionsTitle[2]"> <u-dropdown-item :title="optionsTitle[2]">
<view class="slot-content" style="padding: 30rpx;background-color: #FFF;"> <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> <text style="font-size: 28rpx;color:#111;font-weight: 800;margin-right: 10rpx;">餐厅类型</text>
</view> </view>
<view class="hotel-rate-box"> <view class="hotel-rate-box">
...@@ -29,9 +32,12 @@ ...@@ -29,9 +32,12 @@
</view> </view>
<view class="hotel-rate-box"> <view class="hotel-rate-box">
<!-- <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 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 v-for="(x,i) in rates" class="hotel-rate" :class="{'active':msg.DiningPriceType===x.ID}" @click="setRestaurantPrice(x.ID)">{{x.Name}}</view> <view v-for="(x,i) in rates" class="hotel-rate"
:class="{'active':msg.DiningPriceType===x.ID}" @click="setRestaurantPrice(x.ID)">
{{x.Name}}</view>
</view> </view>
<view style="box-shadow: 0px -10px 30px 0px rgba(36, 36, 36, 0.06);margin-top:40rpx;display: flex;"> <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;"> <view style="flex:1;margin-right: 30rpx;">
<u-button :custom-style="btnStyle" @click="resetPrice">重置</u-button> <u-button :custom-style="btnStyle" @click="resetPrice">重置</u-button>
</view> </view>
...@@ -41,33 +47,22 @@ ...@@ -41,33 +47,22 @@
</view> </view>
</view> </view>
</u-dropdown-item> </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> </u-dropdown>
</view> </view>
<scroll-view :scroll-y="true" @scrolltolower="lower" :enable-back-to-top="true" :enable-flex="true" :scroll-top="scrollTop" <scroll-view :scroll-y="true" @scrolltolower="lower" :enable-back-to-top="true" :enable-flex="true"
@scroll="scroll" style="height: calc(100% - 168rpx); padding-bottom: 0px;"> :scroll-top="scrollTop" @scroll="scroll" style="height: calc(100% - 168rpx); padding-bottom: 0px;">
<view v-for="(item,index) in restaurantList" :key="index"> <view v-for="(item,index) in restaurantList" :key="index">
<restaurant-good :data="item" @confirm="confirm(item.ID)"></restaurant-good> <restaurant-good :data="item" @confirm="confirm(item.ID)"></restaurant-good>
</view> </view>
<u-loadmore <u-loadmore :status="status" :load-text="loadText" :font-size="24" :margin-top="20" :margin-bottom="20"
:status="status" bg-color="#FFF" />
:load-text="loadText"
:font-size="24"
:margin-top="20"
:margin-bottom="20"
bg-color="#FFF"
/>
</scroll-view> </scroll-view>
<!-- 加载中 --> <!-- 加载中 -->
<view class="loading" v-if="loading"> <view class="loading" v-if="loading">
<u-loading mode="flower" size="48"></u-loading> <u-loading mode="flower" size="48"></u-loading>
<Text style="color: #fff; margin-top: 10rpx;">加载中...</Text> <Text style="color: #fff; margin-top: 10rpx;">加载中...</Text>
</view> </view>
</view> </view>
</template> </template>
...@@ -79,40 +74,38 @@ ...@@ -79,40 +74,38 @@
export default { export default {
data() { data() {
return { return {
msg:{ msg: {
pageIndex:1, pageIndex: 1,
pageSize:10, pageSize: 10,
Name:"", Name: "",
OrderBy:0, OrderBy: 0,
FoodTypeIds:0, FoodTypeIds: 0,
DiningPriceType:0, DiningPriceType: 0,
}, },
page_count:1, page_count: 1,
status: "loadmore", status: "loadmore",
restaurantList:[],//餐厅列表 restaurantList: [], //餐厅列表
searchObj:{ searchObj: {
Name:"", Name: "",
OrderBy:0, OrderBy: 0,
rtype:-1, rtype: -1,
rateAndPrice:{ rateAndPrice: {
types:[-1], types: [-1],
priceText:"不限", priceText: "不限",
rate:[-1] rate: [-1]
} }
}, },
tempRateAndPrice:{ tempRateAndPrice: {
rate:[-1], rate: [-1],
types:[-1] types: [-1]
}, },
optionsTitle: [ optionsTitle: [
"推荐排序", "推荐排序",
"分类", "分类",
"筛选", "筛选",
"菜系"
], ],
rates: [],//价格列表 rates: [], //价格列表
options1: [ options1: [{
{
label: '不限', label: '不限',
value: 0, value: 0,
}, },
...@@ -124,10 +117,9 @@ ...@@ -124,10 +117,9 @@
label: '人均最低', label: '人均最低',
value: 2, value: 2,
}, },
], ],
options2: [ options2: [{
{
label: '不限', label: '不限',
value: -1, value: -1,
}, },
...@@ -152,21 +144,21 @@ ...@@ -152,21 +144,21 @@
value: 5, value: 5,
} }
], ],
classOptions:[], classOptions: [],
btnStyle:{ btnStyle: {
borderRadius: '16rpx', borderRadius: '16rpx',
color: '#111', color: '#111',
fontSize: '30rpx', fontSize: '30rpx',
width: '100%', width: '100%',
border:"1px solid #111", border: "1px solid #111",
background:"#FFF" background: "#FFF"
}, },
btnStyle2:{ btnStyle2: {
borderRadius: '16rpx', borderRadius: '16rpx',
color: '#fff', color: '#fff',
fontSize: '30rpx', fontSize: '30rpx',
width: '100%', width: '100%',
background:"#111" background: "#111"
}, },
loadText: { loadText: {
loadmore: "轻轻上拉,加载更多", loadmore: "轻轻上拉,加载更多",
...@@ -177,12 +169,13 @@ ...@@ -177,12 +169,13 @@
old: { old: {
scrollTop: 0, scrollTop: 0,
}, },
showLoading:false, showLoading: false,
status: "loadmore", status: "loadmore",
currentTypeObj:{ currentTypeObj: {
Id:-1, Id: -1,
active:0 active: 0
} },
foodType: [],
} }
}, },
components: { components: {
...@@ -190,13 +183,16 @@ ...@@ -190,13 +183,16 @@
restaurantGood, restaurantGood,
restaurantType restaurantType
}, },
created() { onLoad(options) {
if(options && options.Name){
this.msg.Name = options.Name
}
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
title: "美食", title: "美食",
}); });
let d1=new Date(); let d1 = new Date();
let d=new Date(); let d = new Date();
let d2=new Date(d.setDate(d.getDate()+1)) let d2 = new Date(d.setDate(d.getDate() + 1))
var obj = { var obj = {
start: `${d1.getFullYear()}-${d1.getMonth()+1}-${d1.getDate()}`, start: `${d1.getFullYear()}-${d1.getMonth()+1}-${d1.getDate()}`,
end: `${d2.getFullYear()}-${d2.getMonth()+1}-${d2.getDate()}`, end: `${d2.getFullYear()}-${d2.getMonth()+1}-${d2.getDate()}`,
...@@ -208,14 +204,18 @@ ...@@ -208,14 +204,18 @@
key: 'Time', key: 'Time',
data: JSON.stringify(obj) data: JSON.stringify(obj)
}) })
this.searchObj.date=obj this.searchObj.date = obj
this.getFoodType(); this.getFoodType();
this.getPriceEnum(); this.getPriceEnum();
this.getFoodList(); this.getFoodList();
},
created() {
}, },
methods: { methods: {
searchList(){ searchList() {
this.msg.pageIndex=1 this.msg.pageIndex = 1
this.getFoodList(); this.getFoodList();
}, },
scroll: function(e) { scroll: function(e) {
...@@ -228,16 +228,16 @@ ...@@ -228,16 +228,16 @@
}); });
}, },
lower(e) { lower(e) {
if (this.msg.pageIndex < this.page_count) { if (this.msg.pageIndex < this.page_count) {
this.msg.pageIndex++; this.msg.pageIndex++;
this.status = "loading"; this.status = "loading";
this.getFoodList(); this.getFoodList();
} else { } else {
this.status = "nomore"; this.status = "nomore";
} }
}, },
setRestaurantPrice(rateId){ setRestaurantPrice(rateId) {
this.msg.DiningPriceType=rateId this.msg.DiningPriceType = rateId
// if(rateId==-1){ // if(rateId==-1){
// this.tempRateAndPrice.rate=[-1] // this.tempRateAndPrice.rate=[-1]
// }else{ // }else{
...@@ -267,18 +267,18 @@ ...@@ -267,18 +267,18 @@
// } // }
// } // }
// }, // },
resetPrice(){ resetPrice() {
// this.optionsTitle[2]="筛选" // this.optionsTitle[2]="筛选"
// this.searchObj.rateAndPrice={ // this.searchObj.rateAndPrice={
// types:[-1], // types:[-1],
// priceText:"不限", // priceText:"不限",
// rate:[-1] // rate:[-1]
// } // }
this.msg.DiningPriceType=0 this.msg.DiningPriceType = 0
this.getFoodList(); this.getFoodList();
this.closeDropdown(); this.closeDropdown();
}, },
surePrice(){ surePrice() {
// let result="" // let result=""
// if(this.tempRateAndPrice.types.length>0){ // if(this.tempRateAndPrice.types.length>0){
// this.options2.forEach(x=>{ // this.options2.forEach(x=>{
...@@ -294,7 +294,7 @@ ...@@ -294,7 +294,7 @@
// } // }
// }) // })
// } // }
// result=result==""?"筛选":result // result=result==""?"筛选":result
// console.log(296,result) // console.log(296,result)
// this.optionsTitle[2]=result // this.optionsTitle[2]=result
...@@ -304,13 +304,10 @@ ...@@ -304,13 +304,10 @@
this.getFoodList(); this.getFoodList();
this.closeDropdown(); this.closeDropdown();
}, },
sureType(item){ sureType(item) {
console.log(item) this.msg.FoodTypeIds = item.ID;
// this.searchObj.rtype=item.Id this.getFoodList();
// this.optionsTitle[1]=item.Id==-1?'菜系':item.Name
this.closeDropdown(); this.closeDropdown();
// item.newTimespan=this.rand(1000,9999)
// this.currentTypeObj=item
}, },
// rangechange4(e){ // rangechange4(e){
// if(e.minValue==0){ // if(e.minValue==0){
...@@ -332,119 +329,81 @@ ...@@ -332,119 +329,81 @@
// 展开某个下来菜单时,先关闭原来的其他菜单的高亮 // 展开某个下来菜单时,先关闭原来的其他菜单的高亮
// 同时内部会自动给当前展开项进行高亮 // 同时内部会自动给当前展开项进行高亮
this.$refs.uDropdown.highlight(); this.$refs.uDropdown.highlight();
if(index==2){ if (index == 2) {
this.tempRateAndPrice=this.searchObj.rateAndPrice this.tempRateAndPrice = this.searchObj.rateAndPrice
}else if(index==1){ } else if (index == 1) {
this.currentTypeObj.newTimespan=this.rand(1000,9999) this.currentTypeObj.newTimespan = this.rand(1000, 9999)
this.$forceUpdate() this.$forceUpdate()
console.log(this.currentTypeObj.newTimespan) console.log(this.currentTypeObj.newTimespan)
} }
}, },
rand(min,max) { rand(min, max) {
return Math.floor(Math.random()*(max-min))+min; return Math.floor(Math.random() * (max - min)) + min;
}, },
close(index) { close(index) {
// 关闭的时候,给当前项加上高亮 // 关闭的时候,给当前项加上高亮
// 当然,您也可以通过监听dropdown-item的@change事件进行处理 // 当然,您也可以通过监听dropdown-item的@change事件进行处理
this.$refs.uDropdown.highlight(index); this.$refs.uDropdown.highlight(index);
}, },
change(index) {
// 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
// }
// })
// this.optionsTitle[1] = temp.label
// }else{
// this.optionsTitle[1] = "附近"
// }
},
// 获取餐食类型 // 获取餐食类型
getFoodType(){ getFoodType() {
this.request2({ this.request2({
url: '/api/AppletDining/GetFoodType', url: '/api/AppletDining/GetFoodType',
data: { data: {
ClassType:0 ClassType: 0
} }
}, },
res => { res => {
if(res.resultCode===1){ if (res.resultCode === 1) {
this.typeList=res.data this.foodType = res.data
this.classOptions=[{
label: "不限",
value: 0,
}]
res.data.map(i=>{
let obj={
label: i.Name,
value: i.ID,
}
this.classOptions.push(obj)
})
} }
} }
); );
}, },
// 获取餐食价格枚举 // 获取餐食价格枚举
getPriceEnum(){ getPriceEnum() {
this.request2({ this.request2({
url: '/api/AppletDining/GetDiningPriceType', url: '/api/AppletDining/GetDiningPriceType',
data: {} data: {}
}, },
res => { res => {
if(res.resultCode===1){ if (res.resultCode === 1) {
this.rates=res.data this.rates = res.data
} }
} }
); );
}, },
// 获取餐食列表 // 获取餐食列表
getFoodList(){ getFoodList() {
// this.msg.DiningPriceType=this.searchObj.rateAndPrice.join(",")
this.request2({ this.request2({
url: '/api/AppletDining/GetDiningPage', url: '/api/AppletDining/GetDiningPage',
data: this.msg data: this.msg
}, },
res => { res => {
if(res.resultCode===1){ if (res.resultCode === 1) {
this.page_count = res.data.pageCount; this.page_count = res.data.pageCount;
res.data.pageData.forEach(item=>{ res.data.pageData.forEach(item => {
item.FoodTag=item.FoodTag.split(',') item.FoodTag = item.FoodTag.split(',')
item.GeographicTag=item.GeographicTag.split(',') item.GeographicTag = item.GeographicTag.split(',')
}) })
if(this.msg.pageIndex==1){ if (this.msg.pageIndex == 1) {
this.restaurantList=res.data.pageData; this.restaurantList = res.data.pageData;
}else if(this.msg.pageIndex>1){ } else if (this.msg.pageIndex > 1) {
this.restaurantList=[...this.restaurantList,...res.data.pageData]; this.restaurantList = [...this.restaurantList, ...res.data.pageData];
} }
if (this.page_count == 1) { if (this.page_count == 1) {
this.status = "nomore"; this.status = "nomore";
} }
} }
} }
); );
}, },
confirm(id){ confirm(id) {
uni.navigateTo({ uni.navigateTo({
url:"/pages/restaurant/detail?id="+id url: "/pages/restaurant/detail?id=" + id
}) })
} }
}, },
...@@ -452,9 +411,10 @@ ...@@ -452,9 +411,10 @@
</script> </script>
<style scoped> <style scoped>
/deep/.u-flex{ /deep/.u-flex {
justify-content: center; justify-content: center;
} }
.hotel-list { .hotel-list {
height: 100vh; height: 100vh;
...@@ -486,12 +446,14 @@ ...@@ -486,12 +446,14 @@
border-right: 1px solid #E2E2E2; border-right: 1px solid #E2E2E2;
font-size: 24rpx; font-size: 24rpx;
} }
.hotel-rate-box{
.hotel-rate-box {
display: flex; display: flex;
align-items: center; align-items: center;
flex-wrap: wrap; flex-wrap: wrap;
} }
.hotel-rate{
.hotel-rate {
width: 215rpx; width: 215rpx;
height: 60rpx; height: 60rpx;
background: #ECF1F4; background: #ECF1F4;
...@@ -504,10 +466,12 @@ ...@@ -504,10 +466,12 @@
flex-shrink: 0; flex-shrink: 0;
margin-top: 29rpx; margin-top: 29rpx;
} }
.hotel-rate:last-child{
.hotel-rate:last-child {
margin-right: 0; margin-right: 0;
} }
.hotel-rate.active{
.hotel-rate.active {
background: #111111; background: #111111;
color: #FFFFFF; color: #FFFFFF;
} }
......
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
<view class="form-items"> <view class="form-items">
<view class="label">备注</view> <view class="label">备注</view>
<view class="val"> <view class="val">
<input type="number" v-model="order.BuyerMessage" placeholder="您的特殊要求,我们会尽量安排" /> <input type="text" v-model="order.BuyerMessage" placeholder="您的特殊要求,我们会尽量安排" />
</view> </view>
</view> </view>
</view> </view>
...@@ -228,7 +228,8 @@ ...@@ -228,7 +228,8 @@
fail: function(err) { fail: function(err) {
console.log('fail:', err); console.log('fail:', err);
uni.showToast({ uni.showToast({
title: "支付失败" title: "支付失败",
icon:'none'
}) })
} }
}); });
......
<template> <template>
<view> <view class="img-list">
<scroll-view scroll-y="true" class="hotel-pic"> <view class="img-navs">
<view class="content"> <view v-for="(item,index) in navList" :key="index" class="nav-btn" :class="{'check-nav':index===curNavIndex,'last-nav':index===navList.length-1}" @click="changeNav(index)">
<view class="left"> {{item.TagName||'其他'}}
<view v-for="(x,i) in jiList" :key="i" class="image-box" @click="previewImage(x.picUrl)"> </view>
<image :src="x.picUrl" mode="widthFix"></image> </view>
</view> <view class="img-list-box">
</view> <view v-for="(item,index) in dataList.TagPicList" :key="item.ID" class="img-list-item" :style="{'margin-right':index%2 ==0?'20rpx':0}">
<view class="right"> <view class="img-box" @click="previewImage(index,item.Path)" v-if="item.type==='image'">
<view v-for="(x,i) in ouList" :key="i" class="image-box" @click="previewImage(x.picUrl)"> <image :src="item.Path" mode="aspectFill" ></image>
<image :src="x.picUrl" mode="widthFix"></image> </view>
<view class="img-box" style="position: relative" v-if="item.type==='video'">
<video id="myVideo" :src="item.Path"
:controls='controls'
:show-center-play-btn='false'
:show-fullscreen-btn='false'
@fullscreenchange='videoControl'
object-fit ='fill'
></video>
<!-- 播放按钮 -->
<view @click="enlarge"
style="position: absolute;left: 50%;top: 50%;transform: translate(-50%,-50%);width: 98rpx;height: 98rpx;border-radius: 20rpx;background-color: rgba(255,255,255,.4);display: flex;align-items: center;justify-content: center;">
<image
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1616471847000_345.png"
style="width: 37rpx;height: 44rpx;"></image>
</view> </view>
</view> </view>
</view> </view>
</scroll-view> </view>
</view> </view>
</template> </template>
<script> <script>
export default { export default {
data() { data() {
return { return {
imageList:[ ID:0,
{ navList:[],
picUrl:"https://ak-d.tripcdn.com/images/200j13000000v60wjE77D_R_1080_808_R5_D.jpg", curNavIndex:0,
type:"酒店" dataList:[],
}, imgBaseUrl:"",
{ controls:false,//显示默认控件
picUrl:"https://ak-d.tripcdn.com/images/t1/hotel/533000/532930/3fcc6398b3c44c08bb1b57aef579793e_R_1080_808_R5_D.jpg", videoContext:""
type:"酒店" }
}, },
{ watch:{
picUrl:"https://ak-d.tripcdn.com/images/20010r000000hmqk32EF2_R_1080_808_R5_D.jpg", curNavIndex(val){
type:"酒店"
},
{
picUrl:"https://ak-d.tripcdn.com/images/200v0f0000007d6wgBCD6_R_1080_808_R5_D.jpg",
type:"酒店"
},
{
picUrl:"http://imgfile.oytour.com/Upload/DMC/202105251114114560000000058.png",
type:"酒店"
},
{
picUrl:"https://dimg07.c-ctrip.com/images/01066120008jk5bcc94AC_C_1600_1200.jpg",
type:"酒店"
},
{
picUrl:"https://ak-d.tripcdn.com/images/200j13000000v60wjE77D_R_1080_808_R5_D.jpg",
type:"酒店"
},
{
picUrl:"https://ak-d.tripcdn.com/images/t1/hotel/533000/532930/3fcc6398b3c44c08bb1b57aef579793e_R_1080_808_R5_D.jpg",
type:"酒店"
},
{
picUrl:"https://ak-d.tripcdn.com/images/20010r000000hmqk32EF2_R_1080_808_R5_D.jpg",
type:"酒店"
},
{
picUrl:"https://ak-d.tripcdn.com/images/200v0f0000007d6wgBCD6_R_1080_808_R5_D.jpg",
type:"酒店"
},
{
picUrl:"http://imgfile.oytour.com/Upload/DMC/202105251114114560000000058.png",
type:"酒店"
},
{
picUrl:"https://dimg07.c-ctrip.com/images/01066120008jk5bcc94AC_C_1600_1200.jpg",
type:"酒店"
},
{
picUrl:"https://ak-d.tripcdn.com/images/200j13000000v60wjE77D_R_1080_808_R5_D.jpg",
type:"酒店"
},
{
picUrl:"https://ak-d.tripcdn.com/images/t1/hotel/533000/532930/3fcc6398b3c44c08bb1b57aef579793e_R_1080_808_R5_D.jpg",
type:"酒店"
},
{
picUrl:"https://ak-d.tripcdn.com/images/20010r000000hmqk32EF2_R_1080_808_R5_D.jpg",
type:"酒店"
},
{
picUrl:"https://ak-d.tripcdn.com/images/200v0f0000007d6wgBCD6_R_1080_808_R5_D.jpg",
type:"酒店"
},
{
picUrl:"http://imgfile.oytour.com/Upload/DMC/202105251114114560000000058.png",
type:"酒店"
},
{
picUrl:"https://dimg07.c-ctrip.com/images/01066120008jk5bcc94AC_C_1600_1200.jpg",
type:"酒店"
},{
picUrl:"https://ak-d.tripcdn.com/images/200j13000000v60wjE77D_R_1080_808_R5_D.jpg",
type:"酒店"
},
{
picUrl:"https://ak-d.tripcdn.com/images/t1/hotel/533000/532930/3fcc6398b3c44c08bb1b57aef579793e_R_1080_808_R5_D.jpg",
type:"酒店"
},
{
picUrl:"https://ak-d.tripcdn.com/images/20010r000000hmqk32EF2_R_1080_808_R5_D.jpg",
type:"酒店"
},
{
picUrl:"https://ak-d.tripcdn.com/images/200v0f0000007d6wgBCD6_R_1080_808_R5_D.jpg",
type:"酒店"
},
{
picUrl:"http://imgfile.oytour.com/Upload/DMC/202105251114114560000000058.png",
type:"酒店"
},
{
picUrl:"https://dimg07.c-ctrip.com/images/01066120008jk5bcc94AC_C_1600_1200.jpg",
type:"酒店"
}
],
jiList:[],
ouList:[],
allImageSrc:[]
} }
}, },
created() { created() {
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
title: "酒店图片", title: "餐厅图片",
}); });
this.imageList.forEach((x,i)=>{
this.allImageSrc.push(x.picUrl)
if(i%2==0){
this.jiList.push(x)
}else{
this.ouList.push(x)
}
})
console.log(this.jiList,this.ouList)
}, },
mounted () { onLoad(options) {
if (options && options.id) {
this.ID = options.id
this.getDetail()
}
}, },
methods: { methods: {
previewImage(src) { //获取详情
getDetail(index=0) {
this.request2({
url: '/api/AppletDining/GetDiningDetails',
data: {
ID: this.ID
}
},
res => {
if (res.resultCode == 1) {
this.navList = res.data.AllPicList;
this.dataList=res.data.AllPicList[index]
this.dataList.TagPicList.forEach(item=>{
if(item.Path.indexOf('jpg')!==-1||item.Path.indexOf('png')!==-1||item.Path.indexOf('jpeg')!==-1){
item.type='image'
}else if(item.Path.indexOf('mp4')!==-1){
item.type='video'
}
})
console.log(this.dataList)
}
}
);
},
changeNav(index){
this.curNavIndex=index
this.dataList=this.navList[index]
this.dataList.TagPicList.forEach(item=>{
if(item.Path.indexOf('jpg')!==-1||item.Path.indexOf('png')!==-1||item.Path.indexOf('jpeg')!==-1){
item.type='image'
}else if(item.Path.indexOf('mp4')!==-1){
item.type='video'
}
})
},
//预览图片
previewImage(i,url) {
uni.previewImage({ uni.previewImage({
urls: this.allImageSrc, urls: [url],
current: src, current: i,
longPressActions: { longPressActions: {
itemList: ["发送给朋友", "保存图片", "收藏"], itemList: ["发送给朋友", "保存图片", "收藏"],
success: function(data) {}, success: function(data) {
console.log(data.errMsg);
},
fail: function(err) { fail: function(err) {
console.log(err.errMsg); console.log(err.errMsg);
}, },
}, },
}); });
} },
}, enlarge(file) {
// 全屏
this.videoContext = uni.createVideoContext('myVideo');
this.videoContext.requestFullScreen({
direction:0
})
},
videoControl(e){
// if(e.detail.fullScreen===false){
// this.videoContext.stop()
// this.controls=false
// }else{
// this.videoContext.play()
// this.controls=true
// }
console.log(e.detail)
},
}
} }
</script> </script>
<style> <style lang="scss" scoped>
.hotel-pic{ .img-list{
height: 100vh; .img-navs{
width: 100vw; display: flex;
} margin: 0 45rpx;
.hotel-pic .content{ padding: 20rpx 0;
display: flex; overflow-x: scroll;
align-items: flex-start; overflow-y: hidden;
padding: 44rpx; .nav-btn{
padding-top: 14rpx; // width: 230rpx;
} height: 60rpx;
.hotel-pic .content .left{ background-color: #FFFFFF;
flex:1; border: 1rpx solid #111111;
margin-right: 15rpx; border-radius: 20rpx;
} font-family: PingFang SC;
.hotel-pic .content .right{ font-weight: 500;
flex:1; text-align: center;
margin-left: 15rpx; line-height: 58rpx;
} padding: 0 20rpx;
.hotel-pic .content .image-box{ margin-right: 30rpx;
width:100%; white-space: nowrap;
margin-top: 30rpx; }
} .check-nav{
.hotel-pic .content .image-box image{ background-color: #111111;
width: 100%; color: #FFFFFF;
border-radius: 20rpx; }
.last-nav{
margin-right: 0 !important;
}
}
.img-list-box{
padding: 0 45rpx;
display: flex;
flex-wrap: wrap;
.img-list-item{
width: 315rpx;
margin-bottom: 20rpx;
.img-box{
width: 315rpx;
height: 315rpx;
background-color: #E7E7E7;
border-radius: 20rpx;
overflow: hidden;
image{
width: 100%;
height: 100%;
}
#myVideo{
width: 100%;
height: 100%;
}
}
}
}
} }
</style> </style>
...@@ -133,7 +133,6 @@ ...@@ -133,7 +133,6 @@
methods:{ methods:{
headItemTap(index,month){ headItemTap(index,month){
this.current = index this.current = index
console.log(month)
this.$emit('changeMonth',momth) this.$emit('changeMonth',momth)
}, },
getDefaultData(d){ //设置初始值 getDefaultData(d){ //设置初始值
...@@ -147,6 +146,7 @@ ...@@ -147,6 +146,7 @@
}else{ }else{
obj = false obj = false
} }
return obj; return obj;
}, },
isToday(date){ isToday(date){
...@@ -210,7 +210,22 @@ ...@@ -210,7 +210,22 @@
selectDate(data){ //选择日期 selectDate(data){ //选择日期
//多选模式请在这改造 //多选模式请在这改造
/* this.$set(this.dayActive,"date",date) */ /* this.$set(this.dayActive,"date",date) */
if(data.price){ console.log(data)
let resDay=Date.parse(data.date);
let now=new Date();
now.setHours(0);//设置小时
now.setMinutes(0);//设置分钟
now.setSeconds(0);//设置秒
now.setMilliseconds(0);//设置毫妙
let today= now.getTime();
if(resDay<today){
uni.showToast({
title: "不能选择今天以前的日期",
icon: "none",
});
return
}
if(data.price||data.price===0){
this.dayActive = { this.dayActive = {
date:data.date, date:data.date,
price:data.price price:data.price
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
<view class="subscribeTicket"> <view class="subscribeTicket">
<view class="title"> <view class="title">
选择日期和人数 选择日期和人数
<u-icon name="cross" size="28" class="close-icon" @click="close"></u-icon>
</view> </view>
<view> <view>
<z-calendar ref="calendar" :datePrice="datePrice" :curryear='curryear' :currmonth='currmonth' <z-calendar ref="calendar" :datePrice="datePrice" :curryear='curryear' :currmonth='currmonth'
...@@ -86,10 +87,10 @@ ...@@ -86,10 +87,10 @@
}, },
watch: { watch: {
dateStr(val, oldVal) { dateStr(val, oldVal) {
this.defaultSelect = val;
let newMonth = val.split('-')[1] let newMonth = val.split('-')[1]
let oldMonth = oldVal.split('-')[1] let oldMonth = oldVal.split('-')[1]
if(newMonth!=oldMonth&&oldMonth!=undefined){ if(newMonth!=oldMonth&&oldMonth!=undefined){
console.log(newMonth!=oldMonth)
this.getGoodsDateList(val) this.getGoodsDateList(val)
} }
...@@ -108,7 +109,7 @@ ...@@ -108,7 +109,7 @@
} }
this.curryear= year this.curryear= year
this.currmonth= month this.currmonth= month
this.defaultSelect = this.dateStr;
}, },
methods: { methods: {
valChange(e) { valChange(e) {
...@@ -138,6 +139,9 @@ ...@@ -138,6 +139,9 @@
datePrice.push(obj) datePrice.push(obj)
}) })
this.datePrice = datePrice this.datePrice = datePrice
let list = this.datePrice.filter(item=>item.date==this.dateStr);
this.price=list[0].price
console.log(144,list,this.datePrice,this.dateStr)
} }
); );
}, },
...@@ -189,7 +193,9 @@ ...@@ -189,7 +193,9 @@
goback() { goback() {
uni.navigateBack() uni.navigateBack()
}, },
close(){
this.$emit("close")
}
} }
} }
...@@ -208,6 +214,12 @@ ...@@ -208,6 +214,12 @@
font-weight: 500; font-weight: 500;
color: #111111; color: #111111;
margin-bottom: 10rpx; margin-bottom: 10rpx;
position: relative;
.close-icon{
position: absolute;
right: 30rpx;
top: 0;
}
} }
.chooseTicketAndNum{ .chooseTicketAndNum{
height: 335rpx; height: 335rpx;
......
...@@ -185,8 +185,8 @@ ...@@ -185,8 +185,8 @@
</view> </view>
<!-- 填写订单弹出层 --> <!-- 填写订单弹出层 -->
<view> <view>
<u-popup v-model="showSubscribeTicketPop" mode="bottom" border-radius="40" :closeable="true"> <u-popup v-model="showSubscribeTicketPop" mode="bottom" border-radius="40" :closeable="true" >
<subscribeTicket :dateStr="Date" :TicketID="TicketID" :TitekCounponId="ID" :TicketName="TicketName"></subscribeTicket> <subscribeTicket :dateStr="Date" :TicketID="TicketID" :TitekCounponId="ID" :TicketName="TicketName" @close="showSubscribeTicketPop=false"></subscribeTicket>
</u-popup> </u-popup>
</view> </view>
</view> </view>
...@@ -268,7 +268,16 @@ ...@@ -268,7 +268,16 @@
this.mainColor = this.$uiConfig.mainColor; this.mainColor = this.$uiConfig.mainColor;
let d = new Date(); let d = new Date();
let today = `${d.getFullYear()}-${d.getMonth()+1}-${d.getDate()}` let year=d.getFullYear();
let month=d.getMonth()+1;
if(month<10){
month='0'+month
}
let day=d.getDate();
if(day<10){
day='0'+day
}
let today = year+'-'+month+'-'+day
this.Date = today this.Date = today
this.calendar.date = today this.calendar.date = today
}, },
......
...@@ -91,8 +91,6 @@ ...@@ -91,8 +91,6 @@
this.Final_Price=this.ticketdData.PeopleNumber*this.ticketdData.Unit_Price this.Final_Price=this.ticketdData.PeopleNumber*this.ticketdData.Unit_Price
}, },
created() { created() {
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
title: "订单填写", title: "订单填写",
...@@ -143,8 +141,15 @@ ...@@ -143,8 +141,15 @@
uni.hideLoading(); uni.hideLoading();
if(res.resultCode===1){ if(res.resultCode===1){
let that=this let that=this
console.log(res.data.template_message_list)
uni.requestSubscribeMessage({ uni.requestSubscribeMessage({
tmplIds: res.data.template_message_list, tmplIds: res.data.template_message_list,
success:res=>{
console.log('订阅成功',res)
},
fail:err=>{
console.log('订阅失败',err)
},
complete(_res) { complete(_res) {
that.queren(res.data.OrderId) that.queren(res.data.OrderId)
} }
...@@ -180,7 +185,6 @@ ...@@ -180,7 +185,6 @@
}, },
Pay(){ Pay(){
let that=this; let that=this;
uni.requestPayment({ uni.requestPayment({
provider: 'wxpay', provider: 'wxpay',
timeStamp: this.orderInfo.timeStamp, timeStamp: this.orderInfo.timeStamp,
...@@ -195,16 +199,22 @@ ...@@ -195,16 +199,22 @@
}) })
setTimeout(()=>{ setTimeout(()=>{
uni.redirectTo({ uni.redirectTo({
url: '/pages/jiuzhai/allorderList' url: '/pages/jiuzhai/paysuccess?PreferPrice='+that.Final_Price
}); });
}, 100 ) }, 100 )
}, },
fail: function(err) { fail: function(err) {
console.log('fail:', err); console.log('fail:', err);
uni.showToast({ uni.showToast({
title: "支付失败" title: "支付失败",
icon:'none'
}) })
setTimeout(()=>{
uni.redirectTo({
url: '/pages/jiuzhai/allorderList'
});
}, 100 )
} }
}); });
}, },
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<view class="hotel-list"> <view class="hotel-list">
<view class="search-box"> <view class="search-box">
<view style="width: 1px; flex: 1;"> <view style="width: 1px; flex: 1;">
<u-search placeholder="目的地/景点/主题" v-model="msg.Name" input-align="left" :value="searchObj.searchKey" <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" @search="searchList" @clear="searchList"></u-search> text-color="#111" bg-color="rgba(0,0,0,0)" :show-action="false" @search="searchList" @clear="searchList"></u-search>
</view> </view>
</view> </view>
...@@ -154,12 +154,18 @@ ...@@ -154,12 +154,18 @@
} }
} }
}, },
created() { onLoad(options) {
if(options && options.Name){
this.msg.Name = options.Name
}
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
title: "门票", title: "门票",
}); });
this.getScenicType();// 获取景点类型 this.getScenicType();// 获取景点类型
this.getList();// 获取景点门票类型 this.getList();// 获取景点门票类型
},
created() {
}, },
methods: { methods: {
searchList(){ searchList(){
......
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