Commit f37d7f22 authored by 黄奎's avatar 黄奎

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

parents e055acb7 c10cda23
......@@ -22,7 +22,7 @@
</view>
</view>
<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="[isToday(item.date)?'today':'']">{{isToday(item.date) ? "今天" : item.date.getDate()}}</view>
<view class="calen-text-orange">{{item.price?'&yen;'+item.price:''}}</view>
......
......@@ -42,14 +42,17 @@
</view>
</view>
</view>
<auth v-if="showAuth" @changeuserinfo="reloadUserinfo" @gbAuth='goback'></auth>
</view>
</template>
<script>
import zCalendar from './njzz-calendar/njzz-calendar.vue'
import auth from "../../../components/auth/index.vue";
export default {
components: {
zCalendar
zCalendar,
auth
},
props: {
dateStr: {
......@@ -77,6 +80,8 @@
datePrice: [],
price:"",
peopleNum:1,
showAuth:false,
u:{},
}
},
watch: {
......@@ -85,7 +90,7 @@
let oldMonth = oldVal.split('-')[1]
if(newMonth!=oldMonth&&oldMonth!=undefined){
console.log(newMonth!=oldMonth)
this.getGoodsDateList()
this.getGoodsDateList(val)
}
},
......@@ -106,12 +111,10 @@
this.defaultSelect = this.dateStr;
},
methods: {
valChange(e) {
this.peopleNum=e.value
},
getGoodsDateList(date) {
let d = new Date();
let today = `${d.getFullYear()}-${d.getMonth()+1}-${d.getDate()}`
if(!data){
data=today
}
this.request2({
url: '/api/AppletDining/GetMonthTicketList',
data: {
......@@ -144,23 +147,47 @@
},
changeMonth(nowMonth){
let Month = nowMonth.year+'-'+nowMonth.month+'-01';
this.getGoodsDateList(Month)
},
nextStep(){
let data={
TicketId:this.TicketID,
TitekCounponId:this.TitekCounponId,
Unit_Price:this.price,
Date:this.defaultSelect,
TicketName:this.TicketName,
PeopleNumber:this.peopleNum,
this.u = uni.getStorageSync("mall_UserInfo");
if (!this.u) {
this.u = {
nickName: "未登录",
avatarUrl: ""
};
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 @@
<view class="name">
{{details.Name}}
</view>
<view class="score">
{{details.ScoreNum}}
<text
v-if="details.ScoreNum===1||details.ScoreNum===2||details.ScoreNum===3||details.ScoreNum===4||details.ScoreNum===5">.0</text>
<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>
<view class="score">
{{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 class="info2">
......@@ -96,8 +100,14 @@
</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"
: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">
{{item.Key}}
</view>
......@@ -198,7 +208,9 @@
return {
ID: 0,
Date: "", //日期
details: {},
details: {
},
typeList: [{
Id: 0,
Name: '视频'
......@@ -264,7 +276,7 @@
confirm(e) {
this.Date = e.fulldate
this.calendar[0].date = e.fulldate
this.getDetail()
this.getDetailByDate();
this.$forceUpdate()
},
openBuyNotice(item) {
......@@ -280,15 +292,13 @@
this.showSubscribeTicketPop=true
this.TicketID=item.Id
this.TicketName=item.TicketSubName+item.TicketName
console.log(item)
},
//获取详情
getDetail() {
this.request2({
url: '/api/AppletDining/GetTicketCouponsDetails',
data: {
ID: this.ID,
BuyDate: this.Date
ID: this.ID
}
},
res => {
......@@ -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) {
this.active = i;
},
......@@ -319,22 +345,6 @@
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) {
console.log(name, lon, lat)
......@@ -359,15 +369,34 @@
this.checkTicketNavIndex = i
if (i === 1) {
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.getDetail()
this.getDetailByDate()
this.$forceUpdate()
} else if (i === 2) {
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.getDetail()
this.getDetailByDate()
this.$forceUpdate()
} else if (i === 3) {
this.$refs.calendar.open()
......@@ -499,32 +528,65 @@
text-align: center;
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 {
padding: 30rpx 45rpx;
.info1 {
display: flex;
justify-content: space-between;
align-items: center;
align-items: flex-end;
.name {
width: 575rpx;
font-size: 36rpx;
font-family: PingFang SC;
font-weight: 800;
color: #111111;
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 {
width: 64rpx;
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-family: PingFang SC;
font-weight: 800;
color: #FFFFFF;
line-height: 44rpx;
position: absolute;
left: 8rpx;
top: 4rpx;
z-index: 2;
}
}
......@@ -827,11 +889,12 @@
.comment-box {
padding: 50rpx 45rpx;
.score-box {
width: 235rpx;
display: flex;
.score {
font-size: 60rpx;
font-family: PingFang SC;
......
......@@ -31,14 +31,14 @@
<view class="item-title">
姓名
</view>
<input class="input" type="text" placeholder="请输入真实姓名" v-model="Consignee" />
<input class="input" type="text" placeholder="请输入联系人姓名" v-model="Consignee" />
</view>
<view class="item-box">
<view class="item-title">
手机号
</view>
<input class="input" type="text" placeholder="请输入手机号" v-model="ConsigneeMobile" />
<input class="input" type="number" placeholder="请输入手机号" v-model="ConsigneeMobile" />
</view>
<u-popup v-model="showAddGuset" mode="bottom" border-radius="40" :closeable="true">
<guest @confirm='changeGuest'></guest>
......@@ -54,7 +54,7 @@
</view>
<view class="right">
<view class="mx">
明细
<!-- 明细 -->
</view>
<view class="btn" @click="submitOrder">
去支付
......@@ -81,13 +81,18 @@
Consignee:"",
ConsigneeMobile:"",
BuyerMessage:"",
orderInfo:{}
}
},
onLoad(options) {
let obj=JSON.parse(decodeURIComponent(options.data))
this.ticketdData=obj
console.log(this.ticketdData)
this.Final_Price=this.ticketdData.PeopleNumber*this.ticketdData.Unit_Price
},
created() {
uni.setNavigationBarTitle({
title: "订单填写",
......@@ -106,6 +111,23 @@
this.Final_Price=this.ticketdData.PeopleNumber*this.ticketdData.Unit_Price
},
submitOrder(){
if(!this.Consignee){
uni.showToast({
title: "请输入联系人姓名",
icon: "none",
});
return
}
if(!this.ConsigneeMobile){
uni.showToast({
title: "请输入手机号",
icon: "none",
});
return
}
uni.showLoading({
title: '支付中...'
});
this.request2({
url: '/api/AppletDining/SetAppletTicketOrderInfo',
data: {
......@@ -118,10 +140,74 @@
},
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 @@
<view>
<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 :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>
<!-- 筛选 -->
......@@ -111,7 +111,7 @@
pageIndex:1,
pageSize:10,
Name:"",
FoodTypeIds:"",
FoodTypeIds:0,
IsFree:-1,
IsSameDayBuy:-1,
IsWorryFreeRefund:-1,
......@@ -138,6 +138,7 @@
value: 1,
},
],
classOptions:[],
btnStyle:{
borderRadius: '16rpx',
color: '#111',
......@@ -233,7 +234,21 @@
}
},
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 @@
item.ScenicSpotTag=item.ScenicSpotTag.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) {
this.status = "nomore";
}
......@@ -269,6 +289,10 @@
</script>
<style lang="scss" scoped>
/deep/.u-flex{
justify-content: center;
}
.hotel-list {
height: 100vh;
}
......@@ -370,7 +394,10 @@
width: 440rpx;
.ticket-name{
height: 70rpx;
line-height: 70rpx;
line-height: 68rpx;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
// display: flex;
// align-items: 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