Commit f37d7f22 authored by 黄奎's avatar 黄奎

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

parents e055acb7 c10cda23
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
</view> </view>
</view> </view>
<view class="dayBox"> <view class="dayBox">
<view class="day" v-for="(item,index) in space" v-bind:key="index+999"></view> <view class="day" v-for="(item,index) in space" v-bind:key="index"></view>
<view class="day" :class="[getDateStr(item.date)==getDateStr(dayActive.date)?'active':'']" v-for="(item,index) in dayList" v-bind:key="index" @tap="selectDate(item)"> <view class="day" :class="[getDateStr(item.date)==getDateStr(dayActive.date)?'active':'']" v-for="(item,index) in dayList" v-bind:key="index" @tap="selectDate(item)">
<view :class="[isToday(item.date)?'today':'']">{{isToday(item.date) ? "今天" : item.date.getDate()}}</view> <view :class="[isToday(item.date)?'today':'']">{{isToday(item.date) ? "今天" : item.date.getDate()}}</view>
<view class="calen-text-orange">{{item.price?'&yen;'+item.price:''}}</view> <view class="calen-text-orange">{{item.price?'&yen;'+item.price:''}}</view>
......
...@@ -42,14 +42,17 @@ ...@@ -42,14 +42,17 @@
</view> </view>
</view> </view>
</view> </view>
<auth v-if="showAuth" @changeuserinfo="reloadUserinfo" @gbAuth='goback'></auth>
</view> </view>
</template> </template>
<script> <script>
import zCalendar from './njzz-calendar/njzz-calendar.vue' import zCalendar from './njzz-calendar/njzz-calendar.vue'
import auth from "../../../components/auth/index.vue";
export default { export default {
components: { components: {
zCalendar zCalendar,
auth
}, },
props: { props: {
dateStr: { dateStr: {
...@@ -77,6 +80,8 @@ ...@@ -77,6 +80,8 @@
datePrice: [], datePrice: [],
price:"", price:"",
peopleNum:1, peopleNum:1,
showAuth:false,
u:{},
} }
}, },
watch: { watch: {
...@@ -85,7 +90,7 @@ ...@@ -85,7 +90,7 @@
let oldMonth = oldVal.split('-')[1] let oldMonth = oldVal.split('-')[1]
if(newMonth!=oldMonth&&oldMonth!=undefined){ if(newMonth!=oldMonth&&oldMonth!=undefined){
console.log(newMonth!=oldMonth) console.log(newMonth!=oldMonth)
this.getGoodsDateList() this.getGoodsDateList(val)
} }
}, },
...@@ -106,12 +111,10 @@ ...@@ -106,12 +111,10 @@
this.defaultSelect = this.dateStr; this.defaultSelect = this.dateStr;
}, },
methods: { methods: {
valChange(e) {
this.peopleNum=e.value
},
getGoodsDateList(date) { getGoodsDateList(date) {
let d = new Date();
let today = `${d.getFullYear()}-${d.getMonth()+1}-${d.getDate()}`
if(!data){
data=today
}
this.request2({ this.request2({
url: '/api/AppletDining/GetMonthTicketList', url: '/api/AppletDining/GetMonthTicketList',
data: { data: {
...@@ -144,23 +147,47 @@ ...@@ -144,23 +147,47 @@
}, },
changeMonth(nowMonth){ changeMonth(nowMonth){
let Month = nowMonth.year+'-'+nowMonth.month+'-01'; let Month = nowMonth.year+'-'+nowMonth.month+'-01';
this.getGoodsDateList(Month) this.getGoodsDateList(Month)
}, },
nextStep(){ nextStep(){
let data={ this.u = uni.getStorageSync("mall_UserInfo");
TicketId:this.TicketID, if (!this.u) {
TitekCounponId:this.TitekCounponId, this.u = {
Unit_Price:this.price, nickName: "未登录",
Date:this.defaultSelect, avatarUrl: ""
TicketName:this.TicketName, };
PeopleNumber:this.peopleNum, this.showAuth = true;
} else {
if(!this.price){
uni.showToast({
title: "请选择日期",
icon: "none",
});
return
}
let data={
TicketId:this.TicketID,
TitekCounponId:this.TitekCounponId,
Unit_Price:this.price,
Date:this.defaultSelect,
TicketName:this.TicketName,
PeopleNumber:this.peopleNum,
}
uni.navigateTo({
url: "/pages/ticketCoupons/fillOrder?data="+encodeURIComponent(JSON.stringify(data)),
});
} }
uni.navigateTo({
url: "/pages/ticketCoupons/fillOrder?data="+encodeURIComponent(JSON.stringify(data)), },
}); reloadUserinfo() {
} this.u = uni.getStorageSync("mall_UserInfo");
// this.getOrderStatus();
},
goback() {
uni.navigateBack()
},
} }
......
...@@ -24,10 +24,14 @@ ...@@ -24,10 +24,14 @@
<view class="name"> <view class="name">
{{details.Name}} {{details.Name}}
</view> </view>
<view class="score"> <view class="score-bg">
{{details.ScoreNum}} <image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/CustomizedCar/pingfen-bg.png" mode="aspectFit" class="pf-bg"></image>
<text <view class="score">
v-if="details.ScoreNum===1||details.ScoreNum===2||details.ScoreNum===3||details.ScoreNum===4||details.ScoreNum===5">.0</text> {{details.ScoreNum}}
<text
v-if="details.ScoreNum===1||details.ScoreNum===2||details.ScoreNum===3||details.ScoreNum===4||details.ScoreNum===5">.0</text>
</view>
</view> </view>
</view> </view>
<view class="info2"> <view class="info2">
...@@ -96,8 +100,14 @@ ...@@ -96,8 +100,14 @@
</view> </view>
<view> <view>
<view class="no-data" v-if="details.mealList.length==0">
<image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/CustomizedCar/no-data.png" mode="aspectFit" class="no-data-img"></image>
<view class="zhanwu">
暂无数据
</view>
</view>
<view v-for="(item,index) in details.mealList" :key="index" class="ticket-list-box" <view v-for="(item,index) in details.mealList" :key="index" class="ticket-list-box"
:class="{'last-item':index==details.mealList.length-1}"> :class="{'last-item':index==details.mealList.length-1}" v-if="details.mealList.length>0">
<view class="ticket-key"> <view class="ticket-key">
{{item.Key}} {{item.Key}}
</view> </view>
...@@ -198,7 +208,9 @@ ...@@ -198,7 +208,9 @@
return { return {
ID: 0, ID: 0,
Date: "", //日期 Date: "", //日期
details: {}, details: {
},
typeList: [{ typeList: [{
Id: 0, Id: 0,
Name: '视频' Name: '视频'
...@@ -264,7 +276,7 @@ ...@@ -264,7 +276,7 @@
confirm(e) { confirm(e) {
this.Date = e.fulldate this.Date = e.fulldate
this.calendar[0].date = e.fulldate this.calendar[0].date = e.fulldate
this.getDetail() this.getDetailByDate();
this.$forceUpdate() this.$forceUpdate()
}, },
openBuyNotice(item) { openBuyNotice(item) {
...@@ -280,15 +292,13 @@ ...@@ -280,15 +292,13 @@
this.showSubscribeTicketPop=true this.showSubscribeTicketPop=true
this.TicketID=item.Id this.TicketID=item.Id
this.TicketName=item.TicketSubName+item.TicketName this.TicketName=item.TicketSubName+item.TicketName
console.log(item)
}, },
//获取详情 //获取详情
getDetail() { getDetail() {
this.request2({ this.request2({
url: '/api/AppletDining/GetTicketCouponsDetails', url: '/api/AppletDining/GetTicketCouponsDetails',
data: { data: {
ID: this.ID, ID: this.ID
BuyDate: this.Date
} }
}, },
res => { res => {
...@@ -300,6 +310,22 @@ ...@@ -300,6 +310,22 @@
} }
); );
}, },
// 根据景点id与指定日期获取门票列表信息
getDetailByDate() {
this.request2({
url: '/api/AppletDining/GetTicketCouponsTicketList',
data: {
ID: this.ID,
BuyDate: this.Date
}
},
res => {
if (res.resultCode == 1) {
this.details.mealList = res.data;
}
}
);
},
changeHandler(i) { changeHandler(i) {
this.active = i; this.active = i;
}, },
...@@ -319,22 +345,6 @@ ...@@ -319,22 +345,6 @@
delta: 1, delta: 1,
}); });
}, },
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
}
},
goMap(name, lon, lat) { goMap(name, lon, lat) {
console.log(name, lon, lat) console.log(name, lon, lat)
...@@ -359,15 +369,34 @@ ...@@ -359,15 +369,34 @@
this.checkTicketNavIndex = i this.checkTicketNavIndex = i
if (i === 1) { if (i === 1) {
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.getDetail() this.getDetailByDate()
this.$forceUpdate() this.$forceUpdate()
} else if (i === 2) { } else if (i === 2) {
let d = new Date(); let d = new Date();
let tomorrow = `${d.getFullYear()}-${d.getMonth()+1}-${d.getDate()+1}` 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.Date = tomorrow this.Date = tomorrow
this.getDetail() this.getDetailByDate()
this.$forceUpdate() this.$forceUpdate()
} else if (i === 3) { } else if (i === 3) {
this.$refs.calendar.open() this.$refs.calendar.open()
...@@ -499,32 +528,65 @@ ...@@ -499,32 +528,65 @@
text-align: center; text-align: center;
font-size: 12rpx; font-size: 12rpx;
} }
.no-data{
.no-data-img{
width: 180rpx;
height: 240rpx;
margin-left: 50%;
transform: translateX(-50%);
}
.zhanwu{
text-align: center;
font-size: 28rpx;
font-family: PingFang SC;
font-weight: 500;
color: #999999;
margin-top: 20rpx;
}
}
.baseinfo { .baseinfo {
padding: 30rpx 45rpx; padding: 30rpx 45rpx;
.info1 { .info1 {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: flex-end;
.name { .name {
width: 575rpx;
font-size: 36rpx; font-size: 36rpx;
font-family: PingFang SC; font-family: PingFang SC;
font-weight: 800; font-weight: 800;
color: #111111; color: #111111;
line-height: 44rpx; line-height: 44rpx;
} }
.score-bg{
position: relative;
width: 65rpx;
height: 65rpx;
background-color: #FFFFFF;
.pf-bg{
width: 65rpx;
height: 65rpx;
position: absolute;
left: 0;
top: 0;
z-index: 1;
}
}
.score { .score {
width: 64rpx; width: 64rpx;
height: 54rpx; height: 54rpx;
background: linear-gradient(0deg, rgba(228, 177, 53, 0.72), rgba(223, 190, 110, 0)); // background: linear-gradient(0deg, rgba(228, 177, 53, 0.72), rgba(223, 190, 110, 0));
font-size: 32rpx; font-size: 32rpx;
font-family: PingFang SC; font-family: PingFang SC;
font-weight: 800; font-weight: 800;
color: #FFFFFF; color: #FFFFFF;
line-height: 44rpx; line-height: 44rpx;
position: absolute;
left: 8rpx;
top: 4rpx;
z-index: 2;
} }
} }
...@@ -827,11 +889,12 @@ ...@@ -827,11 +889,12 @@
.comment-box { .comment-box {
padding: 50rpx 45rpx; padding: 50rpx 45rpx;
.score-box { .score-box {
width: 235rpx; width: 235rpx;
display: flex; display: flex;
.score { .score {
font-size: 60rpx; font-size: 60rpx;
font-family: PingFang SC; font-family: PingFang SC;
......
...@@ -31,14 +31,14 @@ ...@@ -31,14 +31,14 @@
<view class="item-title"> <view class="item-title">
姓名 姓名
</view> </view>
<input class="input" type="text" placeholder="请输入真实姓名" v-model="Consignee" /> <input class="input" type="text" placeholder="请输入联系人姓名" v-model="Consignee" />
</view> </view>
<view class="item-box"> <view class="item-box">
<view class="item-title"> <view class="item-title">
手机号 手机号
</view> </view>
<input class="input" type="text" placeholder="请输入手机号" v-model="ConsigneeMobile" /> <input class="input" type="number" placeholder="请输入手机号" v-model="ConsigneeMobile" />
</view> </view>
<u-popup v-model="showAddGuset" mode="bottom" border-radius="40" :closeable="true"> <u-popup v-model="showAddGuset" mode="bottom" border-radius="40" :closeable="true">
<guest @confirm='changeGuest'></guest> <guest @confirm='changeGuest'></guest>
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
</view> </view>
<view class="right"> <view class="right">
<view class="mx"> <view class="mx">
明细 <!-- 明细 -->
</view> </view>
<view class="btn" @click="submitOrder"> <view class="btn" @click="submitOrder">
去支付 去支付
...@@ -81,13 +81,18 @@ ...@@ -81,13 +81,18 @@
Consignee:"", Consignee:"",
ConsigneeMobile:"", ConsigneeMobile:"",
BuyerMessage:"", BuyerMessage:"",
orderInfo:{}
} }
}, },
onLoad(options) { onLoad(options) {
let obj=JSON.parse(decodeURIComponent(options.data)) let obj=JSON.parse(decodeURIComponent(options.data))
this.ticketdData=obj this.ticketdData=obj
console.log(this.ticketdData)
this.Final_Price=this.ticketdData.PeopleNumber*this.ticketdData.Unit_Price
}, },
created() { created() {
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
title: "订单填写", title: "订单填写",
...@@ -106,6 +111,23 @@ ...@@ -106,6 +111,23 @@
this.Final_Price=this.ticketdData.PeopleNumber*this.ticketdData.Unit_Price this.Final_Price=this.ticketdData.PeopleNumber*this.ticketdData.Unit_Price
}, },
submitOrder(){ submitOrder(){
if(!this.Consignee){
uni.showToast({
title: "请输入联系人姓名",
icon: "none",
});
return
}
if(!this.ConsigneeMobile){
uni.showToast({
title: "请输入手机号",
icon: "none",
});
return
}
uni.showLoading({
title: '支付中...'
});
this.request2({ this.request2({
url: '/api/AppletDining/SetAppletTicketOrderInfo', url: '/api/AppletDining/SetAppletTicketOrderInfo',
data: { data: {
...@@ -118,10 +140,74 @@ ...@@ -118,10 +140,74 @@
}, },
res => { res => {
console.log(res) uni.hideLoading();
if(res.resultCode===1){
let that=this
uni.requestSubscribeMessage({
tmplIds: res.data.template_message_list,
complete(_res) {
that.queren(res.data.OrderId)
}
});
}
},
err=>{
uni.hideLoading();
} }
); );
} },
queren(OrderId){
let url='/api/WeChatPay/GetDmcPayInfo'
let GoodsName = this.ticketdData.TicketName
GoodsName = GoodsName.slice(0, 10)
this.request2({
url: url,
data: {
OrderId:OrderId,
GoodsName:GoodsName,
OrderPayType:1,
OpenId:uni.getStorageSync('mall_UserInfo').OpenId,
}
},
res => {
this.orderInfo = JSON.parse(res.data);
console.log(171,this.orderInfo)
this.Pay()
}
);
},
Pay(){
let that=this;
uni.requestPayment({
provider: 'wxpay',
timeStamp: this.orderInfo.timeStamp,
nonceStr: this.orderInfo.nonceStr,
package: this.orderInfo.package,
signType: this.orderInfo.signType,
paySign: this.orderInfo.sign,
success: function(res) {
console.log('success', res);
uni.showToast({
title: "支付成功"
})
setTimeout(()=>{
uni.redirectTo({
url: '/pages/jiuzhai/allorderList'
});
}, 100 )
},
fail: function(err) {
console.log('fail:', err);
uni.showToast({
title: "支付失败"
})
}
});
},
}, },
} }
......
...@@ -9,12 +9,12 @@ ...@@ -9,12 +9,12 @@
<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="orderOptions" @change="getList"> <u-dropdown-item v-model="msg.OrderBy" :title="optionsTitle[0]" :options="orderOptions" @change="getList" style="justify-content: center;">
</u-dropdown-item> </u-dropdown-item>
<!-- 景点类型 --> <!-- 景点类型 -->
<u-dropdown-item :title="optionsTitle[1]"> <u-dropdown-item :title="optionsTitle[1]" v-model="msg.FoodTypeIds" :options="classOptions" @change="getList">
<Cascade :dataList="typeList"></Cascade> <!-- <Cascade :dataList="typeList"></Cascade> -->
</u-dropdown-item> </u-dropdown-item>
<!-- 筛选 --> <!-- 筛选 -->
...@@ -111,7 +111,7 @@ ...@@ -111,7 +111,7 @@
pageIndex:1, pageIndex:1,
pageSize:10, pageSize:10,
Name:"", Name:"",
FoodTypeIds:"", FoodTypeIds:0,
IsFree:-1, IsFree:-1,
IsSameDayBuy:-1, IsSameDayBuy:-1,
IsWorryFreeRefund:-1, IsWorryFreeRefund:-1,
...@@ -138,6 +138,7 @@ ...@@ -138,6 +138,7 @@
value: 1, value: 1,
}, },
], ],
classOptions:[],
btnStyle:{ btnStyle:{
borderRadius: '16rpx', borderRadius: '16rpx',
color: '#111', color: '#111',
...@@ -233,7 +234,21 @@ ...@@ -233,7 +234,21 @@
} }
}, },
res => { res => {
this.typeList=res.data 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)
})
}
} }
); );
}, },
...@@ -249,7 +264,12 @@ ...@@ -249,7 +264,12 @@
item.ScenicSpotTag=item.ScenicSpotTag.split(',') item.ScenicSpotTag=item.ScenicSpotTag.split(',')
item.GeographicTag=item.GeographicTag.split(',') item.GeographicTag=item.GeographicTag.split(',')
}) })
this.dataList=res.data.pageData; 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) { if (this.page_count == 1) {
this.status = "nomore"; this.status = "nomore";
} }
...@@ -269,6 +289,10 @@ ...@@ -269,6 +289,10 @@
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
/deep/.u-flex{
justify-content: center;
}
.hotel-list { .hotel-list {
height: 100vh; height: 100vh;
} }
...@@ -370,7 +394,10 @@ ...@@ -370,7 +394,10 @@
width: 440rpx; width: 440rpx;
.ticket-name{ .ticket-name{
height: 70rpx; height: 70rpx;
line-height: 70rpx; line-height: 68rpx;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
// display: flex; // display: flex;
// align-items: center; // align-items: center;
// justify-content: center; // justify-content: center;
......
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