Commit 77ce9168 authored by 罗超's avatar 罗超

1

parent 24aceba2
...@@ -200,7 +200,8 @@ ...@@ -200,7 +200,8 @@
date: "", date: "",
info: '' info: ''
}], }],
Date: "" Date: "",
up:""
} }
}, },
components: { components: {
...@@ -365,6 +366,9 @@ ...@@ -365,6 +366,9 @@
}, },
//获取详情 //获取详情
getDetail() { getDetail() {
uni.showLoading({
title: '加载中...'
});
this.request2({ this.request2({
url: '/api/AppletDining/GetDiningDetails', url: '/api/AppletDining/GetDiningDetails',
data: { data: {
...@@ -372,6 +376,7 @@ ...@@ -372,6 +376,7 @@
} }
}, },
res => { res => {
uni.hideLoading();
if (res.resultCode == 1) { if (res.resultCode == 1) {
res.data.FoodTag = res.data.FoodTag.split(',') res.data.FoodTag = res.data.FoodTag.split(',')
res.data.GeographicTag = res.data.GeographicTag.split(',') res.data.GeographicTag = res.data.GeographicTag.split(',')
...@@ -385,6 +390,9 @@ ...@@ -385,6 +390,9 @@
this.imgsList.push(obj) this.imgsList.push(obj)
}) })
} }
},
err=>{
uni.hideLoading();
} }
); );
}, },
......
...@@ -175,6 +175,12 @@ ...@@ -175,6 +175,12 @@
uni.requestSubscribeMessage({ uni.requestSubscribeMessage({
tmplIds: res.data.template_message_list, tmplIds: res.data.template_message_list,
complete(_res) { complete(_res) {
if(data.Final_Price===0){
uni.redirectTo({
url: '/pages/jiuzhai/allorderList'
});
return
}
that.queren(res.data.OrderId) that.queren(res.data.OrderId)
} }
}); });
......
<template> <template>
<view style="height: 100vh; overflow: hidden;width:100vw;"> <view style="height: 100vh; overflow: hidden;width:100vw;">
<scroll-view scroll-y="true" style="width: 100%;height: 100%;" @scroll="scroll"> <scroll-view scroll-y="true" style="width: 100%;height: 100%;" @scroll="scroll">
<view style="height: 500rpx;position: relative;z-index: 1;background-color: #E7E7E7;" :style="{'opacity':(100-boxOption)+'%'}"> <view style="height: 500rpx;position: relative;z-index: 1;background-color: #E7E7E7;"
:style="{'opacity':(100-boxOption)+'%'}">
<view @click="goback" :style="[titleStyle,{opacity:'100% !important'}]" <view @click="goback" :style="[titleStyle,{opacity:'100% !important'}]"
style="position: fixed;top: 0;left: 0;z-index: 9; padding-left: 6rpx;"> style="position: fixed;top: 0;left: 0;z-index: 9; padding-left: 6rpx;">
<u-icon name="arrow-left" size="44" color="#000" style="margin-top: 22rpx;"></u-icon> <u-icon name="arrow-left" size="44" color="#000" style="margin-top: 22rpx;"></u-icon>
...@@ -13,7 +14,9 @@ ...@@ -13,7 +14,9 @@
<view @click="goback"> <view @click="goback">
<u-icon name="arrow-left" size="44"></u-icon> <u-icon name="arrow-left" size="44"></u-icon>
</view> </view>
<view style="flex: 1;margin-left: 30rpx; text-align: left;'background-color':'#000';white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">{{details.Name}} <view
style="flex: 1;margin-left: 30rpx; text-align: left;'background-color':'#000';white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
{{details.Name}}
</view> </view>
</view> </view>
<view style="position: relative;z-index: 2;"> <view style="position: relative;z-index: 2;">
...@@ -25,13 +28,15 @@ ...@@ -25,13 +28,15 @@
{{details.Name}} {{details.Name}}
</view> </view>
<view class="score-bg"> <view class="score-bg">
<image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/CustomizedCar/pingfen-bg.png" mode="aspectFit" class="pf-bg"></image> <image
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/CustomizedCar/pingfen-bg.png"
mode="aspectFit" class="pf-bg"></image>
<view class="score"> <view class="score">
{{details.ScoreNum}} {{details.ScoreNum}}
<text <text
v-if="details.ScoreNum===1||details.ScoreNum===2||details.ScoreNum===3||details.ScoreNum===4||details.ScoreNum===5">.0</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>
<view class="info2"> <view class="info2">
...@@ -101,13 +106,16 @@ ...@@ -101,13 +106,16 @@
</view> </view>
<view> <view>
<view class="no-data" v-if="details.mealList.length===0"> <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> <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 class="zhanwu">
暂无数据 暂无数据
</view> </view>
</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}" v-if="details.mealList.length>0"> :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>
...@@ -119,9 +127,9 @@ ...@@ -119,9 +127,9 @@
{{_item.TicketName}} {{_item.TicketName}}
</view> </view>
<view class="price"> <view class="price">
<text class="price-pre"></text>{{$utils.getretailer()==true? _item.HPriceB:_item.HPriceC}} <text
<text class="price-pre"></text>{{$utils.getretailer()==true? _item.HPriceB:_item.HPriceC}}
class="price-nex"></text> <text class="price-nex"></text>
</view> </view>
<view class="tag"> <view class="tag">
<image class="tag-img" <image class="tag-img"
...@@ -186,7 +194,9 @@ ...@@ -186,7 +194,9 @@
<!-- 填写订单弹出层 --> <!-- 填写订单弹出层 -->
<view> <view>
<u-popup v-model="showSubscribeTicketPop" mode="bottom" border-radius="40"> <u-popup v-model="showSubscribeTicketPop" mode="bottom" border-radius="40">
<subscribeTicket :dateStr="Date" :TicketID="TicketID" :TitekCounponId="ID" :TicketName="TicketName" @close="showSubscribeTicketPop=false" :TicketImg="details.AllPicList[0].TagPicList[0].Path" :msgPath="msgPath"></subscribeTicket> <subscribeTicket :dateStr="Date" :TicketID="TicketID" :TitekCounponId="ID"
:TicketName="TicketName" @close="showSubscribeTicketPop=false"
:TicketImg="details.AllPicList[0].TagPicList[0].Path" :msgPath="msgPath"></subscribeTicket>
</u-popup> </u-popup>
</view> </view>
</view> </view>
...@@ -224,60 +234,61 @@ ...@@ -224,60 +234,61 @@
}], //日历高亮 }], //日历高亮
showPop: false, showPop: false,
curTicketData: {}, curTicketData: {},
showSubscribeTicketPop: false,//订单弹出层 showSubscribeTicketPop: false, //订单弹出层
TicketID:0,//门票id TicketID: 0, //门票id
TicketName:"", TicketName: "",
otherDate:"其他日期", otherDate: "其他日期",
msgPath:"" msgPath: "",
up: ""
} }
}, },
onShareTimeline() { onShareTimeline() {
// setTimeout(() => { // setTimeout(() => {
// console.log("分享朋友圈调用"); // console.log("分享朋友圈调用");
// this.getReceive(); // this.getReceive();
// }, 2500); // }, 2500);
let uid = uni.getStorageSync("mall_UserInfo") let uid = uni.getStorageSync("mall_UserInfo") ? uni.getStorageSync("mall_UserInfo").UserId : 0;
? uni.getStorageSync("mall_UserInfo").UserId if (uid == 0) {
: 0; uid = uni.getStorageSync("pid") ? uni.getStorageSync("pid").pid : 0
if(uid==0){ }
uid = uni.getStorageSync("pid")?uni.getStorageSync("pid").pid:0 let SmallShopId = uni.getStorageSync("mall_UserInfo") ?
} uni.getStorageSync("mall_UserInfo").SmallShopId :
let SmallShopId = uni.getStorageSync("mall_UserInfo") 0;
? uni.getStorageSync("mall_UserInfo").SmallShopId if (SmallShopId == 0) { //如果微店id为0 去找所属微店id
: 0; SmallShopId = uni.getStorageSync("mall_UserInfo") ?
if(SmallShopId == 0){//如果微店id为0 去找所属微店id uni.getStorageSync("mall_UserInfo").UserSmallShopId : 0;
SmallShopId = uni.getStorageSync("mall_UserInfo") }
? uni.getStorageSync("mall_UserInfo").UserSmallShopId let title = this.details.Name ? this.details.Name : '门票';
: 0; let imageUrl = this.details.AllPicList[0].TagPicList[0].Path ? this.details.AllPicList[0].TagPicList[0].Path :
} '';
let title =this.details.Name?this.details.Name:'门票'; let id = this.ID;
let imageUrl =this.details.AllPicList[0].TagPicList[0].Path?this.details.AllPicList[0].TagPicList[0].Path:''; return {
let id = this.ID; title: title,
return { query: "id=" + this.id + "&user_id=" + uid + "&SmallShopId=" + SmallShopId + "&Up=" + this.Up,
title: title, imageUrl: imageUrl,
query: "id=" + this.id + "&user_id=" + uid+ "&SmallShopId=" + SmallShopId+ "&Up=" + this.Up, };
imageUrl: imageUrl,
};
}, },
onShareAppMessage(res) { onShareAppMessage(res) {
// setTimeout(() => { // setTimeout(() => {
// console.log("分享好友调用"); // console.log("分享好友调用");
// this.getReceive(); // this.getReceive();
// }, 2500); // }, 2500);
let u = uni.getStorageSync("mall_UserInfo"); let u = uni.getStorageSync("mall_UserInfo");
let uid = u.UserId ? u.UserId : 0; let uid = u.UserId ? u.UserId : 0;
if(uid==0){ if (uid == 0) {
uid = uni.getStorageSync("pid")?uni.getStorageSync("pid").pid:0 uid = uni.getStorageSync("pid") ? uni.getStorageSync("pid").pid : 0
} }
let SmallShopId = u.SmallShopId ? u.SmallShopId : 0; let SmallShopId = u.SmallShopId ? u.SmallShopId : 0;
if(SmallShopId == 0){//如果微店id为0 去找所属微店id if (SmallShopId == 0) { //如果微店id为0 去找所属微店id
SmallShopId = u.UserSmallShopId? u.UserSmallShopId:0 SmallShopId = u.UserSmallShopId ? u.UserSmallShopId : 0
} }
return { return {
title:this.details.Name?this.details.Name:'门票', title: this.details.Name ? this.details.Name : '门票',
path: "/pages/index/index?id=" + this.ID + "&user_id=" + uid+ "&SmallShopId=" + SmallShopId+ "&Up=" + this.Up+'&JumpType=15', path: "/pages/index/index?id=" + this.ID + "&user_id=" + uid + "&SmallShopId=" + SmallShopId + "&Up=" +
imageUrl:this.details.AllPicList[0].TagPicList[0].Path?this.details.AllPicList[0].TagPicList[0].Path:'' this.Up + '&JumpType=15',
}; imageUrl: this.details.AllPicList[0].TagPicList[0].Path ? this.details.AllPicList[0].TagPicList[0].Path :
''
};
}, },
onLoad(options) { onLoad(options) {
let that = this let that = this
...@@ -285,7 +296,7 @@ ...@@ -285,7 +296,7 @@
this.ID = options.id this.ID = options.id
this.getDetail() this.getDetail()
} }
this.msgPath="/pages/ticketCoupons/detail?id="+options.id this.msgPath = "/pages/ticketCoupons/detail?id=" + options.id
uni.getSystemInfo({ uni.getSystemInfo({
success(res) { success(res) {
that.titleStyle = { that.titleStyle = {
...@@ -307,27 +318,27 @@ ...@@ -307,27 +318,27 @@
this.mainColor = this.$uiConfig.mainColor; this.mainColor = this.$uiConfig.mainColor;
let d = new Date(); let d = new Date();
let year=d.getFullYear(); let year = d.getFullYear();
let month=d.getMonth()+1; let month = d.getMonth() + 1;
if(month<10){ if (month < 10) {
month='0'+month month = '0' + month
} }
let day=d.getDate(); let day = d.getDate();
if(day<10){ if (day < 10) {
day='0'+day day = '0' + day
} }
let today = year+'-'+month+'-'+day let today = year + '-' + month + '-' + day
this.Date = today this.Date = today
this.calendar.date = today this.calendar.date = today
}, },
methods: { methods: {
//选择其他日期门票 //选择其他日期门票
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.otherDate=e.fulldate this.otherDate = e.fulldate
this.getDetailByDate(); this.getDetailByDate();
this.$forceUpdate() this.$forceUpdate()
}, },
...@@ -340,13 +351,16 @@ ...@@ -340,13 +351,16 @@
url: url + "?id=" + this.ID, url: url + "?id=" + this.ID,
}) })
}, },
chooseSubscribeTicket(item){ chooseSubscribeTicket(item) {
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
}, },
//获取详情 //获取详情
getDetail() { getDetail() {
uni.showLoading({
title: '加载中...'
});
this.request2({ this.request2({
url: '/api/AppletDining/GetTicketCouponsDetails', url: '/api/AppletDining/GetTicketCouponsDetails',
data: { data: {
...@@ -354,11 +368,15 @@ ...@@ -354,11 +368,15 @@
} }
}, },
res => { res => {
uni.hideLoading();
if (res.resultCode == 1) { if (res.resultCode == 1) {
res.data.ScenicSpotTag = res.data.ScenicSpotTag.split(',') res.data.ScenicSpotTag = res.data.ScenicSpotTag.split(',')
res.data.GeographicTag = res.data.GeographicTag.split(',') res.data.GeographicTag = res.data.GeographicTag.split(',')
this.details = res.data; this.details = res.data;
} }
},
err=>{
uni.hideLoading();
} }
); );
}, },
...@@ -381,7 +399,7 @@ ...@@ -381,7 +399,7 @@
changeHandler(i) { changeHandler(i) {
this.active = i; this.active = i;
}, },
scroll(e) { scroll(e) {
this.titleStyle.opacity = ((e.detail.scrollTop - 100) < 0 ? 0 : Math.floor(e.detail.scrollTop - 100)) + this.titleStyle.opacity = ((e.detail.scrollTop - 100) < 0 ? 0 : Math.floor(e.detail.scrollTop - 100)) +
"%"; "%";
...@@ -420,32 +438,32 @@ ...@@ -420,32 +438,32 @@
this.checkTicketNavIndex = i this.checkTicketNavIndex = i
if (i === 1) { if (i === 1) {
let d = new Date(); let d = new Date();
let year=d.getFullYear(); let year = d.getFullYear();
let month=d.getMonth()+1 let month = d.getMonth() + 1
if(month<10){ if (month < 10) {
month='0'+month month = '0' + month
} }
let day=d.getDate() let day = d.getDate()
if(day<10){ if (day < 10) {
day='0'+day day = '0' + day
} }
let today = year+'-'+month+'-'+day let today = year + '-' + month + '-' + day
this.Date = today this.Date = today
this.getDetailByDate() this.getDetailByDate()
this.$forceUpdate() this.$forceUpdate()
} else if (i === 2) { } else if (i === 2) {
let d = new Date(); let d = new Date();
let nextDate = new Date(d.getTime() + 24*60*60*1000); let nextDate = new Date(d.getTime() + 24 * 60 * 60 * 1000);
let year=nextDate.getFullYear(); let year = nextDate.getFullYear();
let month=nextDate.getMonth()+1 let month = nextDate.getMonth() + 1
if(month<10){ if (month < 10) {
month='0'+month month = '0' + month
} }
let day=nextDate.getDate() let day = nextDate.getDate()
if(day<10){ if (day < 10) {
day='0'+day day = '0' + day
} }
let tomorrow = year+'-'+month+'-'+day let tomorrow = year + '-' + month + '-' + day
this.Date = tomorrow this.Date = tomorrow
this.getDetailByDate() this.getDetailByDate()
this.$forceUpdate() this.$forceUpdate()
...@@ -454,9 +472,9 @@ ...@@ -454,9 +472,9 @@
} }
}, },
successBuyNotice(){ successBuyNotice() {
this.showPop=false this.showPop = false
this.showSubscribeTicketPop=true this.showSubscribeTicketPop = true
} }
} }
...@@ -579,14 +597,16 @@ ...@@ -579,14 +597,16 @@
text-align: center; text-align: center;
font-size: 12rpx; font-size: 12rpx;
} }
.no-data{
.no-data-img{ .no-data {
.no-data-img {
width: 180rpx; width: 180rpx;
height: 240rpx; height: 240rpx;
margin-left: 50%; margin-left: 50%;
transform: translateX(-50%); transform: translateX(-50%);
} }
.zhanwu{
.zhanwu {
text-align: center; text-align: center;
font-size: 28rpx; font-size: 28rpx;
font-family: PingFang SC; font-family: PingFang SC;
...@@ -595,6 +615,7 @@ ...@@ -595,6 +615,7 @@
margin-top: 20rpx; margin-top: 20rpx;
} }
} }
.baseinfo { .baseinfo {
padding: 30rpx 45rpx; padding: 30rpx 45rpx;
...@@ -611,20 +632,23 @@ ...@@ -611,20 +632,23 @@
color: #111111; color: #111111;
line-height: 44rpx; line-height: 44rpx;
} }
.score-bg{
.score-bg {
position: relative; position: relative;
width: 65rpx; width: 65rpx;
height: 65rpx; height: 65rpx;
background-color: #FFFFFF; background-color: #FFFFFF;
.pf-bg{
.pf-bg {
width: 65rpx; width: 65rpx;
height: 65rpx; height: 65rpx;
position: absolute; position: absolute;
left: 0; left: 0;
top: 0; top: 0;
z-index: 1; z-index: 1;
} }
} }
.score { .score {
width: 64rpx; width: 64rpx;
height: 54rpx; height: 54rpx;
...@@ -941,12 +965,12 @@ ...@@ -941,12 +965,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;
......
...@@ -87,7 +87,6 @@ ...@@ -87,7 +87,6 @@
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 this.Final_Price=this.ticketdData.PeopleNumber*this.ticketdData.Unit_Price
}, },
...@@ -151,6 +150,12 @@ ...@@ -151,6 +150,12 @@
console.log('订阅失败',err) console.log('订阅失败',err)
}, },
complete(_res) { complete(_res) {
if(that.Final_Price===0){
uni.redirectTo({
url: '/pages/jiuzhai/allorderList'
});
return
}
that.queren(res.data.OrderId) that.queren(res.data.OrderId)
} }
}); });
......
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