Browse Source

剧场演出

master
jiazhipeng 1 year ago
parent
commit
0e3da4f466
  1. 2
      app.json
  2. 154
      pages/component/calendarTheatre/index.js
  3. 4
      pages/component/calendarTheatre/index.json
  4. 20
      pages/component/calendarTheatre/index.wxml
  5. 116
      pages/component/calendarTheatre/index.wxss
  6. 2
      pages/index/index.js
  7. 66
      pages/info/showInfo/index.js
  8. 26
      pages/info/showInfo/index.wxml
  9. 9
      pages/info/showInfo/index.wxss
  10. 10
      pages/list/theatre/index.js
  11. 14
      pages/list/theatre/index.wxml
  12. 1
      pages/list/theatre/index.wxss
  13. 2
      pages/order/components/contact/index.wxss
  14. 333
      pages/order/show/index.js
  15. 3
      pages/order/show/index.json
  16. 49
      pages/order/show/index.wxml
  17. 38
      pages/order/show/index.wxss
  18. 708
      pages/order/showOrderNew/index.js
  19. 10
      pages/order/showOrderNew/index.json
  20. 116
      pages/order/showOrderNew/index.wxml
  21. 457
      pages/order/showOrderNew/index.wxss
  22. 381
      pages/user/order/showOrderInfo/index.js
  23. 7
      pages/user/order/showOrderInfo/index.json
  24. 144
      pages/user/order/showOrderInfo/index.wxml
  25. 354
      pages/user/order/showOrderInfo/index.wxss
  26. 56
      project.private.config.json
  27. 8
      utils/util.js

2
app.json

@ -185,6 +185,8 @@
"pages/user/personalInfo/index", "pages/user/personalInfo/index",
"pages/info/luggageInfo/index", "pages/info/luggageInfo/index",
"pages/order/WineSceneOrder/index", "pages/order/WineSceneOrder/index",
"pages/order/showOrderNew/index",
"pages/user/order/showOrderInfo/index",
"pages/user/suggest/suggest" "pages/user/suggest/suggest"
], ],
"subpackages": [ "subpackages": [

154
pages/component/calendarTheatre/index.js

@ -0,0 +1,154 @@
// pages/component/myCalendar/index.js
import util from "../../../utils/util"
let app = getApp()
Component({
/**
* 组件的属性列表
*/
options: {
styleIsolation: 'apply-shared',
addGlobalClass: true
},
properties: {
datelist:{
type:Array,
value:[]
},
activeDay:{
type:String,
value:''
}
},
/**
* 组件的初始数据
*/
data: {
year: 0,
month: 0,
date: ['日', '一', '二', '三', '四', '五', '六'],
dateArr: [],
isToday: 0,
isTodayWeek: false,
todayIndex: 0,
isKj:null,
isGp:null
},
lifetimes: {
attached: function() {
let now = new Date();
let year = now.getFullYear();
let month = now.getMonth() + 1;
this.dateInit();
this.setData({
year: year,
month: month,
isToday: '' + year + month + now.getDate(),
isKj:app.globalData.kjId,
isGp:app.globalData.gp_id || app.globalData.team_id
})
let dates={}
this.properties.datelist.map(item=>{
dates[item.date] = item
})
console.log(dates)
this.setData({
dates:dates
})
}
},
/**
* 组件的方法列表
*/
methods: {
dateInit: function (setYear, setMonth) {
//全部时间的月份都是按0~11基准,显示月份才+1
let dateArr = []; //需要遍历的日历数组数据
let arrLen = 0; //dateArr的数组长度
let now = setYear ? new Date(setYear, setMonth) : new Date();
let year = setYear || now.getFullYear();
let nextYear = 0;
let month = setMonth || now.getMonth(); //没有+1方便后面计算当月总天数
let nextMonth = (month + 1) > 11 ? 1 : (month + 1);
let startWeek = new Date(year + '/' + (month + 1) + '/' + 1).getDay(); //目标月1号对应的星期
let dayNums = new Date(year, nextMonth, 0).getDate(); //获取目标月有多少天
let obj = {};
let num = 0;
if (month + 1 > 11) {
nextYear = year + 1;
dayNums = new Date(nextYear, nextMonth, 0).getDate();
}
arrLen = startWeek + dayNums;
for (let i = 0; i < arrLen; i++) {
if (i >= startWeek) {
num = i - startWeek + 1;
let date =util.formatDate(new Date(year +'/' + (month + 1) +'/' + num));
obj = {
isToday: '' + year + (month + 1) + num,
dateNum: num,
weight: 5,
date:date
}
} else {
obj = {};
}
dateArr[i] = obj;
}
// dateArr.map(monthDate=>{
// console.log(monthDate)
// })
this.setData({
dateArr: dateArr
})
let nowDate = new Date();
let nowYear = nowDate.getFullYear();
let nowMonth = nowDate.getMonth() + 1;
let nowWeek = nowDate.getDay();
let getYear = setYear || nowYear;
let getMonth = setMonth >= 0 ? (setMonth + 1) : nowMonth;
if (nowYear == getYear && nowMonth == getMonth) {
this.setData({
isTodayWeek: true,
todayIndex: nowWeek
})
} else {
this.setData({
isTodayWeek: false,
todayIndex: -1
})
}
},
lastMonth: function () {
//全部时间的月份都是按0~11基准,显示月份才+1
let year = this.data.month - 2 < 0 ? this.data.year - 1 : this.data.year;
let month = this.data.month - 2 < 0 ? 11 : this.data.month - 2;
this.setData({
year: year,
month: (month + 1)
})
this.dateInit(year, month);
},
nextMonth: function () {
//全部时间的月份都是按0~11基准,显示月份才+1
let year = this.data.month > 11 ? this.data.year + 1 : this.data.year;
let month = this.data.month > 11 ? 0 : this.data.month;
this.setData({
year: year,
month: (month + 1)
})
this.dateInit(year, month);
},
onTapDay:function(e){
let date = e.currentTarget.dataset.date;
console.log(date)
if (date) {
console.log('trigger')
this.triggerEvent("onTapDay",date)
}
},
}
})

4
pages/component/calendarTheatre/index.json

@ -0,0 +1,4 @@
{
"component": true,
"usingComponents": {}
}

20
pages/component/calendarTheatre/index.wxml

@ -0,0 +1,20 @@
<wxs src="../../../utils/filter.wxs" module="tool" />
<view class='wrap'>
<view>
<view class='date-show'>
<view class="iconfont icon-you-copy lt-arrow" bindtap='lastMonth'></view>
{{year}}年{{month}}月
<view class="iconfont icon-you rt-arrow" bindtap='nextMonth'></view>
</view>
</view>
<view class='header'>
<view wx:for='{{date}}' class='{{(index == todayIndex) && isTodayWeek ? "weekMark" : ""}}'>{{item}}<view></view></view>
</view>
<view class='date-box'>
<view bindtap="onTapDay" wx:for='{{dateArr}}' class='{{activeDay == item.date ? "nowDay" : ""}}' data-date='{{dates[item.date]}}' style="flex-direction:column">
<view class="date-head{{dates[item.date]?'':' disable'}}" >
<view>{{item.dateNum}}</view>
</view>
</view>
</view>
</view>

116
pages/component/calendarTheatre/index.wxss

@ -0,0 +1,116 @@
.date-show{
position: relative;
width: 250rpx;
font-family: PingFang-SC-Regular;
font-size: 40rpx;
color: #282828;
text-align: center;
margin: 30rpx auto;
}
.lt-arrow,.rt-arrow{
position: absolute;
top: 1rpx;
width: 60rpx;
line-height: 60rpx;
padding-right: 0.6rem;
}
.lt-arrow image,.rt-arrow image{
width: 40rpx;
height: 40rpx;
}
.lt-arrow{
left: -110rpx;
/* transform: rotate(180deg); */
}
.rt-arrow{
right: -100rpx;
}
.header{
font-size: 0;
padding: 0 24rpx;
}
.header>view{
display: inline-block;
width: 14.285%;
color: #333;
font-size: 30rpx;
text-align: center;
border-bottom: 1px solid #D0D0D0;
padding: 39rpx 0;
}
.weekMark{
position: relative;
}
.weekMark view{
position: absolute;
bottom: 0;
left: 0;
width: 100%;
/* border-bottom: 1px solid #22A7F6; */
}
.date-box{
font-size: 0;
padding: 10rpx 0;
}
.date-box>view{
position: relative;
width: 14.285%;
color: #020202;
font-size: 40rpx;
text-align: center;
vertical-align: middle;
height: 90rpx;
display: inline-flex;
align-items: center;
justify-content: center;
}
.date-head{
/* height: 60rpx; */
/* line-height: 60rpx; */
font-size: 26rpx;
}
.date-head.disable {
color: #999;
}
.date-tip {
font-size: 24rpx;
line-height: 26rpx;
color: #D62828;
}
.date-tip.disable {
color: #999;
}
.nowDay .date-head{
width: 60rpx;
line-height: 60rpx;
border-radius: 50%;
text-align: center;
color: #fff;
background-color: #0B898E;
margin: 0 auto;
}
.date-weight{
font-size: 22rpx;
padding: 15rpx 0;
}
.nowDay .date-weight{
color: #0B898E;
}
.one{
position: absolute;
bottom: 0;
right: 5rpx;
width: 20rpx;
height: 20rpx;
border-radius: 50%;
background-color: red;
}
.two{
position: absolute;
bottom: 30rpx;
right: 5rpx;
width: 20rpx;
height: 20rpx;
border-radius: 50%;
background-color: blue;
}

2
pages/index/index.js

@ -67,6 +67,8 @@ Page({
videoPlay: false, videoPlay: false,
}, },
onLoad: function(options) { onLoad: function(options) {
wx.getLocation({type: 'gcj02'})
console.log('options',options) console.log('options',options)
// 相城小程序跳转获取用户信息 // 相城小程序跳转获取用户信息
if(options && options.szxcCode) { if(options && options.szxcCode) {

66
pages/info/showInfo/index.js

@ -37,7 +37,10 @@ Page({
showQrCode: false, showQrCode: false,
wxqrcode: null, wxqrcode: null,
showDetail: false showDetail: false,
lat:120,
lng:31,
distance: 0
}, },
/** /**
@ -54,12 +57,12 @@ Page({
id: options.id id: options.id
}) })
// 获取购物车按钮的位置 // 获取购物车按钮的位置
wx.createSelectorQuery().select('#cart').boundingClientRect(function (res) { // wx.createSelectorQuery().select('#cart').boundingClientRect(function (res) {
console.log(res) // console.log(res)
that.setData({ // that.setData({
cartTop: res.top // cartTop: res.top
}) // })
}).exec() // }).exec()
if (options.retailId) { if (options.retailId) {
this.setData({ this.setData({
@ -75,6 +78,16 @@ Page({
res.data.sku = [sku]; res.data.sku = [sku];
} }
res.data.flag = res.data.sku.find(item => item.flag == 'on') ? res.data.flag : 0 res.data.flag = res.data.sku.find(item => item.flag == 'on') ? res.data.flag : 0
// 解析 service_desc service_images
try {
let service_desc = JSON.parse(res.data.service_desc)
let service_images = (res.data.service_images ? res.data.service_images.split(",") : [])
service_desc.forEach((v,index)=>{
v.image = 'https://static.ticket.sz-trip.com'+service_images[index]
})
res.data.serviceData = service_desc
} catch(e) {}
let resData = res.data let resData = res.data
this.setData({ this.setData({
info: resData, info: resData,
@ -82,26 +95,53 @@ Page({
iShop: res.data.supplier_id ? true : false iShop: res.data.supplier_id ? true : false
}) })
this.getDistance()
this.BroswerRecord() this.BroswerRecord()
}) })
// 推荐 // 推荐
commonApi._post("search/product_recommend", { commonApi._post("search/product_recommend", {
offset: 0, offset: 0,
limit: 6, limit: 3,
rand: true, rand: true,
type: 'post', type: 'show',
product_ids:options.id, product_ids:options.id,
}).then(res => { }).then(res => {
try { try {
this.setData({ this.setData({
tjList: res.data.list tjList: res.data.list.slice(0,3)
}) })
} catch (error) { } catch (error) {
console.log(error); console.log(error);
} }
}) })
}, },
// 获取距离
getDistance () {
let that = this
wx.getLocation({
type: 'gcj02',
success: function (res) {
that.setData({lat: res.latitude,lon: res.longitude})
commonApi.user_post("scene/calculate_distance", {
lat1: res.latitude,
lng1:res.longitude,
lat2:that.data.info.scene_lat,
lng2:that.data.info.scene_lon
}).then(res => {
console.log(res)
if (res&&res.data && res.data.distance) {
that.setData({
distance: res.data.distance
})
}
})
}
})
},
changeAllowance: function () { changeAllowance: function () {
this.setData({ this.setData({
showAllowance: !this.data.showAllowance showAllowance: !this.data.showAllowance
@ -259,9 +299,9 @@ Page({
// }) // })
// return; // return;
// } // }
app.globalData.couponInfo = null; // app.globalData.couponInfo = null;
app.globalData.product = this.data.info; // app.globalData.productShow = this.data.info;
app.globalData.retailId = this.data.retailId; // app.globalData.retailId = this.data.retailId;
wx.navigateTo({ wx.navigateTo({
url: '/pages/order/show/index?id='+this.data.id, url: '/pages/order/show/index?id='+this.data.id,

26
pages/info/showInfo/index.wxml

@ -13,7 +13,7 @@
<view class="tag textOver" wx:for="{{info.display_tags}}">{{item}}<view class="line"></view> <view class="tag textOver" wx:for="{{info.display_tags}}">{{item}}<view class="line"></view>
</view> </view>
</view> </view>
<view class="subtitle">演出时间:<text wx:for="{{info.sku[0].sku_model.next_show_date}}">{{item}}</text></view> <view class="subtitle">演出时间:<text>{{info.subtitle}}</text></view>
<view class="bottom-price"> <view class="bottom-price">
<view class="tags-price"> <view class="tags-price">
@ -33,16 +33,16 @@
</view> </view>
<view style="text-align: center;"> <view style="text-align: center;">
<image src="https://static.ticket.sz-trip.com/uploads/20241119/a98e35f23497c1a8ddf7c7769fbd4fd1.png"></image> <image src="https://static.ticket.sz-trip.com/uploads/20241119/a98e35f23497c1a8ddf7c7769fbd4fd1.png"></image>
<view style="padding-top: 14rpx;">25.5km</view> <view style="padding-top: 14rpx;" wx:if="{{distance}}">{{distance}}km</view>
</view> </view>
</view> </view>
</view> </view>
<view class="show-tip"> <view class="show-tip" wx:if="{{info.serviceData.length>0}}">
<view class="com-flex"><image src="https://static.ticket.sz-trip.com/uploads/20241119/a98e35f23497c1a8ddf7c7769fbd4fd1.png"></image>不支持退款</view> <view class="com-flex" wx:for="{{info.serviceData}}">
<view class="com-flex">不支持退款</view> <image src="{{item.image}}"></image>
{{item.info}}
<view class="com-flex">不支持退款</view> </view>
</view> </view>
@ -64,11 +64,11 @@
<view class="info-title">演出详情</view> <view class="info-title">演出详情</view>
<view class="{{showDetail?'':'max-details'}}"> <view class="{{showDetail?'':'max-details'}}">
<rich-text class="details" nodes="{{tool.formateRichText(info.content)}}"></rich-text> <rich-text class="details" nodes="{{tool.formateRichText(info.content)}}"></rich-text>
<view wx:if="{{!showDetail}}" class="white-placholder">123</view> <view wx:if="{{!showDetail}}" class="white-placholder"></view>
</view> </view>
<view class="show-btn"> <view class="show-btn">
<view bindtap="changeShowDetail" data-flag="{{true}}">展开全部</view> <view wx:if="{{!showDetail}}" bindtap="changeShowDetail" data-flag="{{true}}">展开全部</view>
<view bindtap="changeShowDetail" data-flag="{{false}}">收起</view> <view wx:if="{{showDetail}}" bindtap="changeShowDetail" data-flag="{{false}}">收起</view>
</view> </view>
</view> </view>
<view class="info-box" id="box2"> <view class="info-box" id="box2">
@ -77,7 +77,7 @@
</view> </view>
<view class="info-box info-box-line" > <view class="info-box info-box-line" >
<view class="info-title">观看提示</view> <view class="info-title">观看提示</view>
<rich-text class="details" nodes="{{tool.formateRichText(info.book_info)}}"></rich-text> <rich-text class="details" nodes="{{tool.formateRichText(info.expense_info)}}"></rich-text>
</view> </view>
<view class="info-box" id="box3"> <view class="info-box" id="box3">
@ -133,10 +133,10 @@
</view> </view>
</view> </view>
<!-- 购物车悬浮框 --> <!-- 购物车悬浮框 -->
<navigator url="/pages/user/cartlist/list" catchtap="pagePoint" data-event='product_cart_click' class="cart-box" id="cart"> <!-- <navigator url="/pages/user/cartlist/list" catchtap="pagePoint" data-event='product_cart_click' class="cart-box" id="cart">
<image src="https://sz-qd.oss-cn-hangzhou.aliyuncs.com/xcxImages/info/cart.png" mode="widthFix"></image> <image src="https://sz-qd.oss-cn-hangzhou.aliyuncs.com/xcxImages/info/cart.png" mode="widthFix"></image>
<view class="cart-num">{{cartCount}}</view> <view class="cart-num">{{cartCount}}</view>
</navigator> </navigator> -->
<view class="mask" wx:if="{{skuFlag}}"> <view class="mask" wx:if="{{skuFlag}}">

9
pages/info/showInfo/index.wxss

@ -129,13 +129,12 @@ justify-content: space-between;
margin-top: 27rpx; margin-top: 27rpx;
width: 100%; width: 100%;
box-sizing: border-box; box-sizing: border-box;
height: 80rpx;
background: #E6F3F3; background: #E6F3F3;
border-radius: 13rpx; border-radius: 13rpx;
padding: 0 26rpx; padding: 24rpx 5rpx;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; /* justify-content: space-between; */
font-weight: 500; font-weight: 500;
@ -146,7 +145,8 @@ justify-content: space-between;
.show-tip image{ .show-tip image{
width: 26rpx; width: 26rpx;
height: 26rpx; height: 26rpx;
margin-right: 12rpx; margin:0 12rpx 0 20rpx;
flex-shrink: 0;
} }
.scroll-all-box { .scroll-all-box {
@ -231,7 +231,6 @@ justify-content: space-between;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: flex-end; justify-content: flex-end;
padding-right: 70rpx;
} }
.show-btn view{ .show-btn view{
width: 158rpx; width: 158rpx;

10
pages/list/theatre/index.js

@ -9,7 +9,7 @@ Page({
*/ */
data: { data: {
list:[], list:[],
tagList: [], // 父标签6 tagList: [], // 父标签278
total:1, total:1,
type:278, type:278,
sort:["","weight","distance","weight","price"], sort:["","weight","distance","weight","price"],
@ -28,7 +28,7 @@ Page({
withShareTicket: true, withShareTicket: true,
menus: ['shareAppMessage', 'shareTimeline'] menus: ['shareAppMessage', 'shareTimeline']
}) })
// this.getTags() this.getTags()
this.getList(); this.getList();
}, },
search:function(e){ search:function(e){
@ -106,10 +106,10 @@ Page({
// 获取子标签 // 获取子标签
getTags () { getTags () {
commonApi._post("",{ commonApi._post("product/tag_list",{
tag_id:"278", pid:"278",
}).then(res=>{ }).then(res=>{
let resData = res.data.list || [] let resData = res.data || []
this.setData({ this.setData({
tagList:resData tagList:resData
}) })

14
pages/list/theatre/index.wxml

@ -5,12 +5,10 @@
<image class="heaimg" src="https://static.ticket.sz-trip.com/uploads/20241118/5540525af7880d15a3899f56f9000237.png" mode="widthFix"></image> <image class="heaimg" src="https://static.ticket.sz-trip.com/uploads/20241118/5540525af7880d15a3899f56f9000237.png" mode="widthFix"></image>
<view class="sale-types no-scrollbar"> <view class="sale-types no-scrollbar">
<view class="sale-type{{type==278?' active':''}}" bindtap="changeType" data-type="1">全部</view> <view class="sale-type{{type==278?' active':''}}" bindtap="changeType" data-type="278">全部</view>
<view class="sale-type{{type==2?' active':''}}" bindtap="changeType" data-type="2">距离最近</view> <view wx:for="{{tagList}}" wx:key="id" class="sale-type{{type==item.id?' active':''}}"
<view class="sale-type{{type==3?' active':''}}" bindtap="changeType" data-type="3">销量最高</view> bindtap="changeType" data-type="{{item.id}}">{{item.name}}</view>
<view class="sale-type{{type==4?' active':''}}" bindtap="changeType" data-type="4">价格最低</view>
<view class="sale-type{{type==3?' active':''}}" bindtap="changeType" data-type="3">销量最高</view>
<view class="sale-type{{type==4?' active':''}}" bindtap="changeType" data-type="4">价格最低</view>
</view> </view>
</view> </view>
@ -21,8 +19,8 @@
<image src="{{item.headimg}}" mode="aspectFill"></image> <image src="{{item.headimg}}" mode="aspectFill"></image>
<view class="info"> <view class="info">
<view class="textOver2 title">{{item.title}}</view> <view class="textOver2 title">{{item.title}}</view>
<view class="textOver subtitle">{{"开放时间"}}</view> <view class="textOver subtitle">{{item.subtitle}}</view>
<view class="textOver subtitle">{{"地址"}}</view> <view class="textOver subtitle">{{item.address}}</view>
<view class="tags textOver"> <view class="tags textOver">
<view class="price"><text>¥</text><text>{{item.price?item.price/100:0}}</text><text>起</text></view> <view class="price"><text>¥</text><text>{{item.price?item.price/100:0}}</text><text>起</text></view>
</view> </view>

1
pages/list/theatre/index.wxss

@ -1,6 +1,7 @@
/* pages/list/theatre/index.wxss */ /* pages/list/theatre/index.wxss */
page{ page{
background: white; background: white;
padding-bottom: 20rpx;
} }
.my-header-search{ .my-header-search{

2
pages/order/components/contact/index.wxss

@ -41,7 +41,7 @@
margin-bottom: 20rpx; margin-bottom: 20rpx;
} }
.contact-item .contact-other text { .contact-item .contact-other text {
margin-right: 57rpx; margin-right: 20rpx;
} }
.contact-item .icon-bianji1 { .contact-item .icon-bianji1 {
color: #666666; color: #666666;

333
pages/order/show/index.js

@ -8,125 +8,270 @@ Page({
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
dateArr: [ productId: null,
{date: '2024-11-19', price: 7000}, dateArr: [],
{date: '2024-11-20', price: 7000}, times:[],
{date: '2024-11-21', price: 7000}, skuArr: [],
],
times:[
{sale_date: "2024-11-19", stock_number: 0, start_time: "07:30", end_time: "08:30"},
{sale_date: "2024-11-19", stock_number: 2, start_time: "07:30", end_time: "08:30"},
{sale_date: "2024-11-19", stock_number: 2, start_time: "07:30", end_time: "08:30"},
{sale_date: "2024-11-19", stock_number: 2, start_time: "07:30", end_time: "08:30"},
{sale_date: "2024-11-19", stock_number: 2, start_time: "07:30", end_time: "08:30"},
{sale_date: "2024-11-19", stock_number: 2, start_time: "07:30", end_time: "08:30"},
],
product:null, product:null,
dateindex:-1, dateindex:-1,
timeindex:-1, timeindex:-1,
sku_id: null, skuindex: -1,
producNum: 1,
selectSku: {price:0},
activeDate: {date: ''},
noStock: false,
cartTop: 0, cartTop: 0,
cartImgInfo: null, cartImgInfo: null,
cartCount: 0, cartCount: 0,
// 日历
showMoreDateFlag: false,
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad: function (options) { onLoad: function (options) {
let that = this let that = this
let product = app.globalData.product,start_date = util.formatDate(new Date()); let id = options.id
this.setData({ this.setData({
product:product productId: id
}) })
let end_date = util.formatDate(new Date(new Date(start_date.replace(/-/g,'/')).getTime() + 30 * 24 * 60 * 60 * 1000)); // let product = app.globalData.product
commonApi.user_post("product/product_date_price",{ // console.log(product)
sku_id:1208, // this.setData({
start_date:start_date, // product:product,
end_date:end_date // })
}).then(res=>{
this.getProductDetail()
// this.setData({
// times:res.data, },
// dateindex:dateindex,
// timeindex:timeindex // 获取商品详情
// }) getProductDetail () {
console.log(res) commonApi._post("product/get_product_detail", {
id: this.data.productId
// 获取购物车按钮的位置 }).then(res => {
wx.createSelectorQuery().select('#cart').boundingClientRect(function (res) { res.data.flag = res.data.sku.find(item => item.flag == 'on') ? res.data.flag : 0
console.log(res) let resData = res.data
that.setData({ this.setData({
cartTop: res.top product: resData,
}) })
}).exec()
})
this.initDate() this.initDate()
}, })
},
getDay: function (date) { getDay: function (date) {
let d = new Date(date.replace(/-/g, '/')).getDay(); let d = new Date(date.replace(/-/g, '/')).getDay();
let days = ["周日", "周一", "周二", "周三", "周四", "周五", "周六"]; let days = ["周日", "周一", "周二", "周三", "周四", "周五", "周六"];
return days[d]; return days[d];
}, },
// 初始化日期
initDate () {
let date = this.data.dateArr
date.forEach(v=>{
v.short_date = v.date.split("-").splice(1, 2).join("-")
})
this.setData({dateArr: date})
this.initTime()
},
// 时间处理 showMoreDate: function () {
initTime () { this.setData({
let times = this.data.times showMoreDateFlag: true
times.forEach(v=>{ })
v.week = this.getDay(v.sale_date) },
}) hideCalendar: function () {
this.setData({times: times}) this.setData({
}, showMoreDateFlag: false
})
},
// 选择日期 // 修改日期
changeDate:function(e){ onTapDay: function (e) {
let dateindex = e.currentTarget.dataset.date console.log(e.detail)
// todo获取时间 let date = e.detail.date
this.setData({ let index = this.data.dateArr.findIndex(v=>v.date==date)
dateindex: dateindex
})
}, let param = {currentTarget: {dataset: {date: index}}}
if (index>=0) {
this.changeDate(param)
this.hideCalendar()
}
},
// 初始化日期
initDate () {
// 设置90天日期
let dateArr = []
let now = new Date().getTime()
for(let i=0 ;i<=90;i++) {
let date = now+i*24*60*60*1000
dateArr.push({date: util.formatDate(new Date(date))})
}
selectTime:function(e){ dateArr.forEach(v=>{
let dateindex = e.currentTarget.dataset.dateindex,times = this.data.times,timeindex=e.currentTarget.dataset.timeindex; v.short_date = v.date.split("-").splice(1, 2).join("-")
if(times[dateindex].screen[timeindex].is_ticket==1){ })
this.setData({ this.setData({dateArr: dateArr})
timeindex:timeindex, // 默认选中第一天
dateindex:dateindex let param = {currentTarget: {dataset: {date: 0}}}
}) this.changeDate(param)
} },
},
// 选择日期
changeDate:function(e){
let _this = this
let dateindex = e.currentTarget.dataset.date
let date = this.data.dateArr[dateindex]
let activeDate = {date: date.date}
// 获取时间
commonApi.user_post("product/get_time_slots", {
product_id: _this.data.product.id,
date: date.date
}).then(res => {
console.log(res)
let week = _this.getDay(res.data.date)
let times = res.data.time_slots
times.forEach(v=>{
v.sale_date = res.data.date
v.week = week
})
console.log(times)
let timeindex = times.findIndex(v=>v.total_stock>0 && v.skus.some(x=>x.stock_number>0))
this.setData({
dateindex: dateindex,
activeDate:activeDate,
times: times,
timeindex: -1,
skuindex: -1,
selectSku: {price:0}
})
if (timeindex>=0) {
let param = {currentTarget: {dataset: {date: timeindex}}}
this.changeTime(param)
}
this.judgeNoStock()
})
minus: function () {
if (this.data.producNum == 1) return; },
// 选择时间
changeTime:function(e){
console.log(e.currentTarget.dataset)
let dateindex = e.currentTarget.dataset.date;
let time = this.data.times[dateindex]
let skuArr = time.skus || []
console.log(time)
if (time.total_stock<=0) { return}
//给sku设置余票
this.setData({ this.setData({
producNum: this.data.producNum - 1 timeindex: dateindex,
skuArr: skuArr,
skuindex: -1,
selectSku: {price:0}
}) })
let trueSkuIndex = skuArr.findIndex(v=>v.stock_number>0)
if (trueSkuIndex>=0) {
let param = {currentTarget: {dataset: {date: trueSkuIndex}}}
this.changeSku(param)
}
}, },
add: function () {
// 选择sku
changeSku:function(e){
console.log(e.currentTarget.dataset)
let dateindex = e.currentTarget.dataset.date;
let sku = this.data.skuArr[dateindex]
if (sku.stock_number<=0) { return }
this.setData({ this.setData({
producNum: this.data.producNum + 1 skuindex: dateindex,
selectSku: sku
}) })
}, },
next:function(){
judgeNoStock () {
}, let times = this.data.times
let data = times.length<=0 || times.every(v=>v.total_stock<=0)
this.setData({
noStock: data
})
},
showOrder:function(){
let date = this.data.dateArr[this.data.dateindex]
if (!date) {
wx.showToast({title: '请选择日期',icon: "none"});
return
}
date.week = this.getDay(date.date)
let time = this.data.times[this.data.timeindex]
if (!time) {
wx.showToast({title: '请选择场次',icon: "none"});
return
}
if (this.data.skuindex<0) {
wx.showToast({title: '请选择票档',icon: "none"});
return
}
let product = this.data.product
console.log(product)
let skuSelect = this.data.skuArr[this.data.skuindex]
let sku = this.data.product.sku.find(v=>v.id == skuSelect.id)
sku = JSON.parse(JSON.stringify(sku))
sku.display_tags = sku.display_tags?sku.display_tags.split(","):[];
// commonApi.user_post("/product/checkStock", {
// sku_id: sku.id
// }).then(res => {
// if (res && res.code != 1) {
// wx.showModal({
// title: "温馨提示",
// content: '商品已经被抢光啦~要不要瞧瞧别的~',
// showCancel: false
// })
// return;
// } else {
app.globalData.postProduct = []
app.globalData.list = []
app.globalData.listName = null
if (product.flag==0 || sku.flag=='off') return;
// if (e.currentTarget.dataset.disable === 1) return;
// util.pagePoint({
// event: 'scene_order',
// param: {
// type: this.data.info.type,
// id: this.data.info.id
// }
// }, 1)
// wx.setStorageSync('login_from', 'scene_order_login')
// wx.setStorageSync('order_from', 'scene_order_submit')
app.globalData.couponInfo = null;
// app.globalData.retailId = this.data.retailId;
app.globalData.product = {
product: product,
sku: sku
}
date.price = skuSelect.price
app.globalData.product.date = date
app.globalData.product.time = time
app.globalData.product.price = skuSelect.price
app.globalData.product.productNum = 1
console.log(app.globalData.product)
app.globalData.index = 0
wx.navigateTo({
url: '/pages/order/showOrderNew/index',
})
// }
// })
},
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
*/ */
@ -138,7 +283,7 @@ Page({
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow: function () { onShow: function () {
this.getCartNum() // this.getCartNum()
}, },
// 获取购物车数量 // 获取购物车数量

3
pages/order/show/index.json

@ -1,5 +1,6 @@
{ {
"usingComponents": { "usingComponents": {
"title":"/pages/component/TitleHeader" "title":"/pages/component/TitleHeader",
"calendar":"/pages/component/calendarTheatre/index"
} }
} }

49
pages/order/show/index.wxml

@ -1,4 +1,5 @@
<!--pages/order/show/index.wxml--> <!--pages/order/show/index.wxml-->
<wxs src="../../../utils/filter.wxs" module="tool" />
<title title="选择票档"></title> <title title="选择票档"></title>
<view class="order-top" wx:if="{{product}}"> <view class="order-top" wx:if="{{product}}">
<view class="order-name">{{product.title}}</view> <view class="order-name">{{product.title}}</view>
@ -10,53 +11,71 @@
<view class="tag {{dateindex==0?'active':''}}" bindtap="changeDate" data-date="0">今天 {{dateArr[0].short_date}}</view> <view class="tag {{dateindex==0?'active':''}}" bindtap="changeDate" data-date="0">今天 {{dateArr[0].short_date}}</view>
<view class="tag {{dateindex==1?'active':''}}" bindtap="changeDate" data-date="1">明天 {{dateArr[1].short_date}}</view> <view class="tag {{dateindex==1?'active':''}}" bindtap="changeDate" data-date="1">明天 {{dateArr[1].short_date}}</view>
<view class="tag {{dateindex==2?'active':''}}" bindtap="changeDate" data-date="2">后天 {{dateArr[2].short_date}}</view> <view class="tag {{dateindex==2?'active':''}}" bindtap="changeDate" data-date="2">后天 {{dateArr[2].short_date}}</view>
<view class="tag">更多</view> <view class="tag {{dateindex>2?'active':''}}" bindtap="showMoreDate">{{dateindex>2?dateArr[dateindex].short_date:'更多'}}</view>
</view> </view>
</view> </view>
<view class="box-content"> <view class="box-content" wx:if="{{dateindex>=0}}">
<view class="box-title">场次</view> <view class="box-title">场次</view>
<view class="flex-wrap flex-between">
<view wx:for="{{times}}" date-item="{{item}}" class="tag {{dateindex==key?'active':''}} {{item.stock_number<=0?'disabled':''}}"
bindtap="changeTime" data-date="{{key}}"> <view wx:if="{{noStock}}">
<image class="no-data" src="https://static.ticket.sz-trip.com/uploads/20241129/894f45acb51cffcdddd5a2ddd695660b.png"></image>
<view style="text-align: center;color: #666;padding-top: 40rpx;">暂无场次</view>
</view>
<view class="flex-wrap flex-between" wx:else>
<view wx:for="{{times}}" wx:key="index" date-item="{{item}}"
class="tag {{timeindex==index?'active':''}} {{item.total_stock<=0?'disabled':''}}"
bindtap="changeTime" data-date="{{index}}">
{{item.sale_date}} {{item.week}} {{item.start_time}} {{item.sale_date}} {{item.week}} {{item.start_time}}
</view> </view>
</view> </view>
</view> </view>
<view class="box-content"> <view class="box-content" wx:if="{{timeindex>=0}}">
<view class="box-title">票档</view> <view class="box-title">票档</view>
<view class="sku-box"> <view class="sku-box">
<view wx:for="{{times}}" date-item="{{item}}" class="tag {{dateindex==key?'active':''}} {{item.stock_number<=0?'disabled':''}}" <view wx:for="{{skuArr}}" wx:key="index" date-item="{{item}}"
bindtap="changeSku" data-date="{{key}}"> class="tag {{skuindex==index?'active':''}} {{item.stock_number<=0?'disabled':''}}"
{{item.sale_date}} {{item.week}} {{item.start_time}} bindtap="changeSku" data-date="{{index}}">
{{item.sku_name}} ¥{{item.price/100}}
</view> </view>
</view> </view>
</view> </view>
<view class="number-box box-content"> <!-- <view class="number-box box-content">
<text>数量</text> <text>数量</text>
<view class="iconfont icon-sami-select" bindtap="minus"></view> <view class="iconfont icon-sami-select" bindtap="minus"></view>
<view class="number">{{producNum}}</view> <view class="number">{{producNum}}</view>
<view class="iconfont icon-add-select add" bindtap="add"></view> <view class="iconfont icon-add-select add" bindtap="add"></view>
</view> </view> -->
</view> </view>
<view style="height:138rpx"></view> <view style="height:138rpx"></view>
<view class="fixed-bottom"> <view class="fixed-bottom">
<view>总价:<text class="bottom-price">¥560.00</text></view> <view>单价:<text class="bottom-price">¥{{selectSku.price/100}}</text></view>
<view class="btns"> <view class="btns">
<view class="btn" bindtap="showCart">加入购物车</view> <!-- <view class="btn" bindtap="showCart">加入购物车</view> -->
<view class="btn" bindtap="showOrder" >立即购买</view> <view class="btn" bindtap="showOrder" >立即购买</view>
</view> </view>
</view> </view>
<!-- 购物车悬浮框 --> <!-- 购物车悬浮框 -->
<navigator url="/pages/user/cartlist/list" catchtap="pagePoint" data-event='product_cart_click' class="cart-box" id="cart"> <!-- <navigator url="/pages/user/cartlist/list" catchtap="pagePoint" data-event='product_cart_click' class="cart-box" id="cart">
<image src="https://sz-qd.oss-cn-hangzhou.aliyuncs.com/xcxImages/info/cart.png" mode="widthFix"></image> <image src="https://sz-qd.oss-cn-hangzhou.aliyuncs.com/xcxImages/info/cart.png" mode="widthFix"></image>
<view class="cart-num">{{cartCount}}</view> <view class="cart-num">{{cartCount}}</view>
</navigator> </navigator> -->
<!-- 日历选择 -->
<view class="mask" wx:if="{{showMoreDateFlag}}" style="z-index:101">
<view class="mask-bg" bindtap="hideCalendar"></view>
<view class="calendar-content">
<calendar activeDay="{{activeDate.date}}" id="calendar" datelist="{{dateArr}}" calendarConfig="{{calendarConfig}}"
bind:afterCalendarRender="calendarReady" bind:onTapDay="onTapDay" bind:afterTapDay="afterTapDay"></calendar>
</view>
</view>

38
pages/order/show/index.wxss

@ -10,6 +10,7 @@ page {
font-weight: bold; font-weight: bold;
font-size: 32rpx; font-size: 32rpx;
color: #111111; color: #111111;
box-sizing: border-box;
} }
.box { .box {
@ -46,11 +47,9 @@ page {
width: fit-content; width: fit-content;
} }
.tag{ .tag{
padding: 0rpx 19rpx; padding: 15rpx 19rpx;
border: 1px solid #999999; border: 1px solid #999999;
height: 67rpx; text-align: left;
line-height: 67rpx;
text-align: center;
border-radius: 13rpx; border-radius: 13rpx;
font-family: PingFang SC; font-family: PingFang SC;
font-weight: bold; font-weight: bold;
@ -180,18 +179,20 @@ page {
height: 73rpx; height: 73rpx;
line-height: 73rpx; line-height: 73rpx;
background: #D62828; background: #D62828;
border-radius: 39rpx;
color: white;
} }
.btns .btn:nth-child(1) { /* .btns .btn:nth-child(1) {
border-radius: 39rpx 0 0 39rpx; border-radius: 39rpx 0 0 39rpx;
background: white; background: white;
} } */
.btns .btn:nth-child(2) { /* .btns .btn:nth-child(2) {
border-radius: 0 39rpx 39rpx 0; border-radius: 0 39rpx 39rpx 0;
color: white; color: white;
} } */
.btns .btn.disable { .btns .btn.disable {
background: #ccc; background: #ccc;
@ -200,4 +201,25 @@ page {
.bottom-price{ .bottom-price{
color: #D62828; color: #D62828;
font-size: 36rpx; font-size: 36rpx;
}
.calendar-content {
background: white;
position: absolute;
left: 0;
right: 0;
bottom: 0;
padding-bottom: 50rpx;
}
.short-date {
font-weight: 500;
font-size: 27rpx;
color: #000000;
}
.no-data{
width: 353.33rpx;
height: 129.33rpx;
display: block;
margin: 198rpx auto 0;
} }

708
pages/order/showOrderNew/index.js

@ -0,0 +1,708 @@
// pages/order/scene/index.js
let app = getApp()
import util from "../../../utils/util"
import commonApi from "../../../utils/https/common"
Page({
/**
* 页面的初始数据
*/
data: {
product:null,
productNum: 1,
linkmanList: [],
date: "",
time: "",
remark: "",
singlePrice: 0,
type: null,
coupon:null,
isLogin: false,
kjId: null,
gp_id: null,
groupName: "",
prizeId: null,
select_allowance: false,
showAllowance: false,
allowance_data: null,
allowance_price: 0,
pIndex: 0,
flag:null,
ticket_type:1,
isCar:'single',
showMask: false,
price:0,
is_need_idcard:1,
is_authentication:1, // 是否实名,0否1是,默认实名
phone:'', //不实名时传的手机号
is_real_name:1, // 是否是一证一票,0否1是,
status:false,
date: "",
time: "",
ydxz:false, //预定须知弹框
bookingInfo: null,
bookingInfoTitle: "",
showDate:false,
showDate2:false,
showYhq:null,
couponFlag:false,
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.setData({
product: app.globalData.product,
type: options.type,
kjId: app.globalData.kjId,
gp_id: app.globalData.gp_id || app.globalData.team_id,
prizeId: wx.getStorageSync('prizeId'),
flag:options.flag,
date:null,
ticket_type:app.globalData.product.sku.ticket_type || 1,
isCar:options.isCar,
is_need_idcard:app.globalData.product.sku.sku_model.is_need_idcard,
is_authentication:app.globalData.product.sku.sku_model.is_authentication,
is_real_name:app.globalData.product.sku.sku_model.is_real_name,
date: app.globalData.product.date,
time: app.globalData.product.time || {},
showYhq:app.globalData.listName?false:true
})
console.log('-------',this.data.product.sku.sku_model);
// // debugger
console.log('-------',app.globalData.product.sku.sku_model.is_need_idcard);
console.log('---是否实名----',app.globalData.product.sku.sku_model.is_authentication);
console.log('---一证一票----',app.globalData.product.sku.sku_model.is_real_name);
// console.log(app.globalData.list, app.globalData.index,'list---index')
if (!app.globalData.product) {
util.back();
return;
}
if (!app.globalData.product.time) {
app.globalData.product.time = {}
}
if (app.globalData.product.productNum) {
this.setData({
productNum: app.globalData.product.productNum < 1 ? 1 : app.globalData.product.productNum
})
}else{
this.setData({
productNum: app.globalData.product.num == null ? 1 : app.globalData.product.num
})
}
this.setData({
product: app.globalData.product,
singlePrice: app.globalData.product.date?app.globalData.product.date.price :(this.data.gp_id ? app.globalData.product.sku.event_price : app.globalData.product.sku.price)
// singlePrice: this.data.gp_id ? app.globalData.product.sku.event_price : app.globalData.product.sku.price
})
// console.log(this.data.singlePrice);
this.getNewCoupon()
// this.showAllPrice()
// console.log('********',this.data.product);
if (!this.data.kjId && !this.data.gp_id && this.data.product.isGroup != 1 && this.data.type!='museum') {
this.couponCom = this.selectAllComponents("#coupon")[0];
}
},
// next: function () {
// this.setData({
// showMask:true
// })
// },
// changeDate() {
// this.setData({
// showDate: true,
// })
// },
hideDate: function () {
this.setData({
showDate: false
})
},
showBookingInfo: function (e) {
this.setData({
bookingInfo: this.data.product.sku.sku_model,
bookingInfoTitle: this.data.product.sku.sku_name
})
util.pagePoint({
event: "scene_notice",
param: {
type: this.data.product.type,
id: this.data.product.id
}
}, 1)
},
closeMask: function () {
this.setData({
bookingInfo: null
})
},
showAllPrice:function () {
// console.log('detail',app.globalData.product);
// console.log('singlePrice',this.data.singlePrice);
// console.log('productNum',this.data.productNum);
console.log('couponInfo',app.globalData.couponInfo);
if (this.data.ticket_type != 1) {
// this.setData({
// singlePrice:app.globalData.product.product.price
// })
let price
if (this.data.coupon) {
console.log(app.globalData.couponInfo,this.data.coupon);
if (this.data.coupon.activity.discount_type == 'pricebreak') {
price = this.data.singlePrice * this.data.productNum - this.data.coupon.activity.money
} else {
price =(this.data.singlePrice * this.data.productNum * this.data.coupon.activity.fold)/ 10
}
} else {
price = this.data.singlePrice * this.data.productNum
}
if (price >0) {
this.setData({
price:price/100
})
}else {
this.setData({
price:0
})
}
// console.log(this.data.singlePrice);
}else {
let price
if (this.data.coupon) {
if (this.data.coupon.activity.discount_type == 'pricebreak') {
price = this.data.singlePrice * this.data.productNum - this.data.coupon.activity.money
} else {
price =(this.data.singlePrice * this.data.productNum * this.data.coupon.activity.fold)/ 10
}
} else {
price = this.data.singlePrice * this.data.productNum
}
if (price >0) {
this.setData({
price:price/100
})
}else {
this.setData({
price:0
})
}
}
},
cancel: function () {
this.setData({
showMask:false
})
},
changeGroupName: function (e) {
this.setData({
groupName: e.detail.value
})
},
setLinkman: function (e) {
if (e.detail.phone || e.detail.phone=='') {
this.setData({
phone:e.detail.phone
})
}else {
console.log(e);
let linkmanList = e.detail;
if (this.data.productNum != linkmanList.length && this.data.coupon) {
wx.showToast({
title: '订单价格发生变化,请重新选择优惠券',
icon: 'none'
})
}
this.setData({
// productNum: productNum,
linkmanList: linkmanList
})
console.log(this.data.linkmanList);
// this.changePrice()
this.totalPrice(this.data.singlePrice)
}
},
add: function () {
if (this.data.productNum==undefined) {
wx.showToast({
title: '请先添加出行人',
icon: 'none'
})
return
}
if (this.data.product.sku.sku_model.traveller_limit_num != 0 && this.data.productNum == this.data.product.sku.sku_model.traveller_limit_num) {
wx.showToast({
title: '本产品单笔限购' + this.data.product.sku.sku_model.traveller_limit_num + "份",
icon: 'none'
})
return;
}
this.setData({
productNum: this.data.productNum + 1
})
this.data.product.num = this.data.productNum
// this.changePrice()
// this.showAllPrice()
this.totalPrice(this.data.singlePrice)
},
minus: function () {
if (this.data.productNum==undefined) {
wx.showToast({
title: '请先添加出行人',
icon: 'none'
})
return
}
if (this.data.productNum == 1) return;
if (this.data.coupon) {
wx.showToast({
title: '订单价格发生变化,请重新选择优惠券',
icon: 'none'
})
}
if (!this.data.kjId && !this.data.gp_id && this.data.product.isGroup != 1 && !this.data.flag && this.data.type!='museum') {
// this.couponCom.setNullCoupon()
}
app.globalData.couponInfo = null;
console.log(this.data.couponFlag);
this.setData({
productNum: (this.data.productNum - 1),
coupon: null,
couponFlag:true
})
this.data.product.num = this.data.productNum
// this.changePrice()
// this.showAllPrice()
this.totalPrice(this.data.singlePrice)
},
totalPrice(price) {
let allPrice
if (this.data.coupon) {
if (this.data.coupon.activity.discount_type == 'pricebreak') {
allPrice = this.data.singlePrice * this.data.productNum - this.data.coupon.activity.money
} else {
allPrice =(this.data.singlePrice * this.data.productNum * this.data.coupon.activity.fold)/ 10
}
} else {
allPrice = this.data.singlePrice * this.data.productNum
}
// allPrice = price * this.data.productNum - (this.data.coupon?this.data.coupon.activity.money:0)
if (allPrice >0) {
this.setData({
price:allPrice/100,
singlePrice:price
})
}else {
this.setData({
price:0,
singlePrice:price
})
}
console.log('singlePrice',this.data.singlePrice);
},
changeDate: function (e) {
console.log('打印',e);
this.setData({
showDate:true
})
// debugger
// this.showAllPrice()
this.totalPrice(e.detail.price)
if (e.detail.price != this.data.singlePrice && this.data.coupon) {
wx.showToast({
title: '订单价格发生变化,请重新选择优惠券',
icon: 'none'
})
this.setData({
coupon: null,
singlePrice:e.detail.price
})
if (!this.data.kjId && !this.data.gp_id && this.data.product.isGroup != 1 && this.data.type!='museum') {
this.couponCom.setNullCoupon()
}
app.globalData.couponInfo = null;
}
app.globalData.product.changeFlag = true
this.setData({
date: e.detail,
singlePrice: this.data.gp_id ? this.data.product.sku.event_price : e.detail.price,
showDate2:true
})
// this.changePrice()
},
changeTime: function (e) {
this.setData({
time: e.detail
})
},
changeAllowance: function () {
this.setData({
showAllowance: !this.data.showAllowance
})
},
phoneInput:function(e){
this.setData({
phone: e.detail.value
})
},
/**
* 补贴价
*/
changePrice: function () {
let product = this.data.product, price = product.sku.price;
if (this.data.allowance_data && this.data.select_allowance && this.data.allowance_price) {
let spread_price = Number(this.data.allowance_data.discount_limit_price - this.data.allowance_data.user_used_price);
price -= this.data.allowance_price < spread_price ? this.data.allowance_price : spread_price
}
this.setData({
singlePrice: app.globalData.kjId ? 0 : price
})
},
changed() {
app.globalData.product.date = this.data.date
app.globalData.product.time = this.data.time
app.globalData.product.changeFlag = true
this.hideDate()
},
order:function() {
let linkmanList = this.data.linkmanList, productNum = this.data.productNum, date = this.data.date, time = this.data.time, remark = this.data.remark, product = this.data.product;
let linkmanIds = [];
if (linkmanList.length==0 && this.data.is_authentication == 1) {
wx.showToast({
title: '请选择出行人',
icon: 'none'
})
return
}
if (this.data.is_authentication == 1) {
linkmanList.map(item => {
linkmanIds.push(item.id)
})
}
if (this.data.is_authentication == 0) { //是否实名:0否1是
if (this.data.phone == '') {
wx.showToast({
title: '请填写手机号',
icon: 'none'
})
return
}
}
// 判断时间日期
if (!date && this.data.ticket_type == 1) {
wx.showToast({
title: '请选择使用日期',
icon: 'none'
})
return
}
if (!time && date && date.is_time_stock == true) {
wx.showToast({
title: '请选择使用时间',
icon: 'none'
})
return
}
let data = {
coupon_id: this.data.coupon ? this.data.coupon.id : null,
source: "WECHATXCX",
product_list: [{
type: product.product.type,
product_id: product.product.id,
sku_id: (date && date.sku_id) ? date.sku_id : product.sku.id,
start_time: time.start_time,
end_time: time.end_time,
use_date: date ? date.date : '',
visitors: linkmanIds.join(","),
remark: remark,
product_num: app.globalData.product.isGroup == 1 ? 1 : productNum,
phone:this.data.phone,// 不实名的时候传的手机号参数
}],
originate_order_id: this.data.kjId,
gp_id: app.globalData.gp_id,
team_id: app.globalData.team_id,
linkmanList:this.data.is_authentication == 1?this.data.linkmanList:[]
}
if (app.globalData.from) {
data.system_name = app.globalData.from;
}
if (app.globalData.retailId) {
data.commission_code = app.globalData.retailId;
app.globalData.retailId = null;
}
if (app.globalData.category_id) {
data.category_id = app.globalData.category_id;
}
if (this.data.prizeId) {
data.lottery_id = this.data.prizeId
}
console.log(data)
let service = 'order/create', postData = {
data: JSON.stringify(data)
}
if (app.globalData.product.isGroup == 1) {
service = "team_order/appoint"
postData.member_num = this.data.productNum
postData.team_name = this.data.groupName
postData.type = 1;
}
if(app.globalData.list){
app.globalData.list[app.globalData.index] = this.data.product
// app.globalData.list[app.globalData.index].linkmanList = this.data.linkmanList
if (app.globalData.list[app.globalData.index].sku.sku_model.is_authentication == 0) {
app.globalData.list[app.globalData.index].phone = this.data.phone
app.globalData.list[app.globalData.index].linkmanList = []
}else {
app.globalData.list[app.globalData.index].linkmanList = this.data.linkmanList
}
}
// app.globalData.linkmanList = this.data.linkmanList
app.globalData.ticketPrice += (this.data.singlePrice * this.data.productNum - (this.data.coupon?this.data.coupon.activity.money:0))/100;
console.log(app.globalData);
if(app.globalData.list && app.globalData.list.length > app.globalData.index + 1 &&this.data.type!='museum'){
if(app.globalData.createDate){
app.globalData.createDate.product_list.push(data.product_list[0])
}else{
app.globalData.createDate = data
}
console.log(app.globalData.createDate);
app.globalData.index = app.globalData.index + 1
app.globalData.product = app.globalData.list[app.globalData.index]
wx.redirectTo({
url: '/pages/order/scene/index?flag='+ this.data.flag+'&isCar='+this.data.isCar,
})
return
}else{
if(app.globalData.list && app.globalData.list.length > 1 || app.globalData.postProduct.length>0){
if(app.globalData.createDate){
app.globalData.createDate.product_list.push(data.product_list[0])
}
wx.redirectTo({
url: '/pages/order/orderList/index?flag='+ this.data.flag
})
}else{
commonApi.user_post(service, postData).then(res => {
if (app.globalData.kjId) {
this.setData({
kjId: null
});
app.globalData.kjId = null;
}
if (app.globalData.gp_id) {
this.setData({
gp_id: null
});
app.globalData.gp_id = null;
}
if (res.code == 1 && app.globalData.product.isGroup == 1) {
// 团购跳转到团购详情
wx.navigateTo({
url: '/pages/info/groupOrderInfo/index?id=' + res.data.order_id + '&from=order'
})
}
})
}
}
},
next: function () {
console.log(this.data)
let linkmanList = this.data.linkmanList, productNum = this.data.productNum, date = this.data.date, time = this.data.time, remark = this.data.remark, product = this.data.product;
let linkmanIds = [];
if (!date && this.data.ticket_type == 1) {
wx.showToast({
title: '请选择使用日期',
icon: 'none'
})
return
}
if (linkmanList.length!=productNum && this.data.is_authentication == 1 && this.data.is_real_name == 1) {
wx.showToast({
title: '购票数量要和出行人数量一致',
icon: 'none'
})
return
}
if (!util.isTel(this.data.phone) &&this.data.is_authentication == 0) {
wx.showToast({
title: '请输入正确的手机号',
icon: 'none'
})
return
}
if (!time && date && date.is_time_stock == true) {
wx.showToast({
title: '请选择使用时间',
icon: 'none'
})
return
}
if (app.globalData.product.isGroup == 1 && !this.data.groupName) {
wx.showToast({
title: '请输入团队主体名称',
icon: 'none'
})
return;
}
this.setData({
showMask:true
})
},
// 活动预约
activityOrder: function () {
if (this.data.linkmanList && this.data.linkmanList.length > 0) {
commonApi.user_post("pbservice/Culture/booking", {
id: this.data.product.product.id,
name: this.data.linkmanList[0].name,
card_number: this.data.linkmanList[0].id_number,
tel: this.data.linkmanList[0].tel
}).then(res => {
if (res.code == 1) {
wx.showToast({
title: '预约成功',
icon: 'success'
})
setTimeout(() => {
wx.navigateBack()
}, 1000)
return;
}
})
}
else {
wx.showToast({
title: '请选择出行人',
icon: 'none'
})
return;
}
},
/**
* 选择补贴
*/
selectAllowance: function () {
this.setData({
select_allowance: !this.data.select_allowance
})
this.changePrice()
},
//获取最高优惠券
getNewCoupon(e){
this.setData({
coupon:e.detail
})
this.showAllPrice()
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
// this.setData({
// productNum:1
// })
// app.globalData.productNum =1
if(app.globalData.list && app.globalData.list.length != 0 && this.data.type!='museum'){
app.globalData.product = app.globalData.list[app.globalData.index]
}
if (!this.data.isLogin) {
commonApi.user_post("token/check").then(res => {
if (res.code == 1) {
this.setData({
isLogin: true
})
}
})
}
// this.setData({
// coupon: app.globalData.couponInfo
// })
// 获取补贴
// if (this.data.product) {
// commonApi.user_post("product/getProductAllowancePrice", {
// product_code: this.data.product.product.product_code
// }).then(resTwo => {
// if (resTwo && resTwo.code == 1) {
// this.setData({
// allowance_data: resTwo.data
// })
// let spread_price = Number(this.data.allowance_data.discount_limit_price - this.data.allowance_data.user_used_price)
// let sInfo = this.data.product.sku
// if (spread_price > 0) {
// if (spread_price < this.data.allowance_data.discount_rate / 100 * sInfo.price) {
// this.setData({
// allowance_price: spread_price
// })
// } else {
// this.setData({
// allowance_price: this.data.allowance_data.discount_rate / 100 * sInfo.price
// })
// }
// this.changePrice()
// } else {
// this.setData({
// allowance_price: 0
// })
// }
// }
// })
// }
// console.log('-----',app.globalData.product.sku.price);
// app.globalData.product = delete(app.globalData.product.detail)
// this.showAllPrice()
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
this.setData({
couponFlag:false
})
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
this.setData({
kjId: null,
gp_id: null
});
app.globalData.kjId = null;
app.globalData.gp_id = null;
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
}
})

10
pages/order/showOrderNew/index.json

@ -0,0 +1,10 @@
{
"usingComponents": {
"title":"/pages/component/TitleHeader",
"date1":"../components/date/index",
"contact":"../components/contact/index",
"coupon":"../components/coupon/index",
"notice":"/pages/component/notice/notice",
"date":"/pages/order/components/date"
}
}

116
pages/order/showOrderNew/index.wxml

@ -0,0 +1,116 @@
<!--pages/order/scene/index.wxml-->
<view class="{{product && product.isGroup==1?'group-order':''}}">
<title title="提交订单"></title>
<view class="box" style="padding: 42rpx 21rpx 45rpx 19rpx;display: flex;justify-content: space-between;align-items: center;">
<view style="width: 550rpx;">
<view style="font-weight: bold;font-size: 36rpx;color: #000000;margin-bottom: 27rpx;" class="textOver2">
{{product.product.title}}
</view>
<view style="font-weight: 500;font-size: 27rpx;color: #333;padding-left: 2rpx;">
场次: {{date.date}} {{date.week}} {{time.start_time}}
</view>
</view>
<!-- <view class="change-date" bindtap="changeDate" wx:if="{{ticket_type!= 2}}">
修改 >
</view> -->
</view>
<view class="box">
<view class="box-title">
<view class="textOver" style="flex:1;font-size:36rpx;font-weight: bold;">{{product && product.isGroup!=1?product.sku.sku_name:'预约人数'}}</view>
<view class="s-price">
{{product.sku.price/100}}
</view>
<image wx:if="{{!kjId && !gp_id && type!='activity' && productNum==1}}" bindtap="minus" style="width: 46rpx;height: 46rpx;" src="https://static.ticket.sz-trip.com/uploads/20240725/d2dce6169a5e8332ccd54579afddf8bc.png" mode=""/>
<image wx:if="{{!kjId && !gp_id && type!='activity' && productNum>1}}" bindtap="minus" style="width: 46rpx;height: 46rpx;" src="https://static.ticket.sz-trip.com/uploads/20240725/d8699afa39e73bcc7f50ed617c93bb54.png" mode=""/>
<view class="number-box">{{productNum}}</view>
<image wx:if="{{!kjId && !gp_id && type!='activity'}}" bindtap="add" style="width: 46rpx;height: 46rpx;" src="https://static.ticket.sz-trip.com/uploads/20240725/cdb68a174f17b7036374580a8aa46641.png" mode=""/>
<!-- <view class="iconfont icon-add-select" wx:if="{{!kjId && !gp_id && type!='activity'}}" bindtap="add"></view> -->
</view>
<view class="text1">
<text wx:for="{{product.sku.display_tags}}">
{{item}}<text style="margin:0 8rpx;" wx:if="{{index+1<=product.sku.display_tags.length}}">|</text>
</text>
<text bindtap="showBookingInfo" wx:if="{{product.sku.sku_model.bookinfo}}">预订须知 ></text>
</view>
</view>
<contact wx:if="{{isLogin}}" type="{{type}}" bind:setLinkman="setLinkman" productNum="{{productNum}}" is_authentication="{{is_authentication}}" is_real_name="{{is_real_name}}"></contact>
<!-- <view class="box" style="margin-top: -30rpx;border-top: 1px solid #CCCCCC;" wx:if="{{is_authentication}}">
<view class="box-title">
<view style="flex-shrink:0">联系手机</view>
<input bindinput="phoneInput" type="number" value="{{phone}}" class="weui-input" placeholder="请输入手机号" />
</view>
</view> -->
<coupon bind:getNewCoupon = 'getNewCoupon' wx:if="{{!kjId && !gp_id && type!='activity' && product && product.isGroup!=1 && isCar=='single' && type!='museum' && showYhq}}" id="coupon"
money="{{singlePrice * productNum}}" sku="{{product.sku.id}}" couponFlag="{{couponFlag}}"></coupon>
<view style="{{type=='museum' || type=='activity'?'height:138rpx':'height:113rpx'}}"></view>
<view class="fixed-bottom">
<view class="fixed-price-box" wx:if="{{kjId || prizeId}}"><text>合计:</text><text class="price">¥0</text></view>
<view class="fixed-price-box" wx:else><text>合计:</text>
<text class="price">¥{{price}}</text>
</view>
<view class="fixed-btn" bindtap="order">去支付</view>
</view>
<view class="mask" style="align-items:flex-end" wx:if="{{showMask}}">
<view class="mask-bg" bindtap="cancel"></view>
<view class="mask-content1">
<view class="dialog-top">
<view class="scene-title">{{product.product.title}}-{{product.sku.sku_name}}</view>
<view class="people-message">出行人信息</view>
<view style="max-height:430rpx;overflow: scroll;" wx:if="{{is_authentication=='1'}}">
<view class="people" wx:for="{{linkmanList}}">
<view class="flex">
<view>姓名:</view>
<view style="color: #333;">{{item.name}}</view>
</view>
<view class="flex" style="margin: 19.33rpx 0;">
<view>证件号:</view>
<view style="color: #333;">{{item.id_number}}</view>
</view>
<view class="flex">
<view>手机号:</view>
<view style="color: #333;">{{item.tel}}</view>
</view>
</view>
</view>
<view wx:else>
<view class="flex" style="margin: 10rpx 0 30rpx;">
<view>手机号:</view>
<view style="color: #333;">{{phone}}</view>
</view>
</view>
</view>
<view class="bottom-btn">
<view class="cancle" bindtap="cancel">取消</view>
<view class="confirm" bindtap="order">无问题,下一步</view>
</view>
</view>
</view>
<notice bookingInfo="{{bookingInfo}}" skuName="{{bookingInfoTitle}}" wx:if="{{bookingInfo}}" bind:close="closeMask">
</notice>
<!-- 日期弹框 -->
<view class="mask" wx:if="{{showDate}}">
<view class="mask-bg" bindtap="hideDate"></view>
<view class="mask-content2">
<view class="iconfont icon-close" bindtap="hideDate"></view>
<date wx:if="{{showDate2}}" bind:onChangeDate="changeDate" bind:onChangeTime="changeTime" product="{{product}}"></date>
<view class="bottom-box">
<view>
合计: <text class="totalPrice">{{price}}</text>
</view>
<view class="next" bindtap="changed" data-sku="{{sku}}" data-product="{{item}}">
<!-- <view class="next" bindtap="order" data-sku="{{sku}}" data-product="{{item}}"> -->
确定
</view>
</view>
</view>
</view>
</view>

457
pages/order/showOrderNew/index.wxss

@ -0,0 +1,457 @@
/* pages/.wxss */
page {
background: #f6f6f6;
}
.group-order {
background: #fff;
}
.product-info {
padding: 20rpx 47rpx;
border-bottom: 1rpx solid #ccc;
}
.product-title {
font-size: 33rpx;
color: #000;
font-weight: 500;
}
.product-price {
color: #D62828;
font-size: 27rpx;
}
.group-order .box-title {
margin: 0;
}
.group-order .box,
.group-order .date-box {
border-bottom: 1rpx solid #D8D8D8;
border-radius: 0;
margin: 0 25rpx;
}
.group-order .dates-boxes {
border-top: none;
padding-top: 0;
}
.group-order .date-time.disable {
background: #CCCCCC;
color: #fff;
}
.box {
margin: 30rpx 25rpx;
background: white;
border-radius: 9rpx;
}
.box-title {
height:108rpx;
margin: 0 20rpx;
font-size: 31rpx;
color: #000;
font-weight: 500;
display: flex;
align-items: center;
}
.dates-boxes {
display: flex;
align-items: center;
padding: 31rpx 21rpx;
/* border-top: 1rpx solid #ccc; */
}
.date-item {
width: 120rpx;
height: 133rpx;
border-radius: 10rpx;
/* border: 1rpx solid #333; */
text-align: center;
font-size: 27rpx;
color: #000;
margin-right: 20rpx;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
background: #F5F5F5;
flex-shrink: 0;
}
.date-item.active {
border-color: #0B898E;
color: #fff;
background: #0B898E;
}
.date-item.disable {
border-color: #CCCCCC;
color: #999;
}
.date-item .price {
font-size: 25rpx;
color: #D62828;
}
.date-item.active .price {
color: #fff;
}
.date-item.active view {
color: #fff;
}
.date-item.disable .price {
color: #999;
}
.date-item.disable .short-date {
color: #999;
}
.more-item {
/* width: 99rpx;
margin-right: 0; */
position: absolute;
right: 0;
text-align: center;
padding: 0 26rpx 0 24rpx;
display: flex;
font-weight: 400;
font-size: 27rpx;
color: #0B898E;
align-items: center;
}
.date-times {
display: flex;
justify-content: space-between;
align-items: center;
margin: 0 21rpx;
padding-top: 34rpx;
padding-bottom: 10rpx;
/* border-top: 1rpx dashed #ccc; */
flex-wrap: wrap;
}
.date-time {
width: 315rpx;
line-height: 58rpx;
/* border: 1px solid #333; */
border-radius: 10rpx;
text-align: center;
font-size: 25rpx;
flex-shrink: 0;
margin-bottom: 24rpx;
color: #000;
background-color: #F5F5F5;
}
.date-time.disable {
/* border-color: #ccc;
color: #666666; */
background: #F5F5F5;
font-weight: 400;
font-size: 25rpx;
color: #999999;
}
.short-date {
font-weight: 500;
font-size: 27rpx;
color: #000000;
}
.date-time.active {
border-color: #0B898E;
background: #0B898E;
color: #fff;
}
.box-title .iconfont {
font-size: 28rpx;
flex-shrink: 0;
}
.number-box {
font-size: 29rpx;
font-weight: 500;
color: #000;
flex-shrink: 0;
/* width: 67rpx; */
line-height: 49rpx;
/* background: #F0F0F0; */
border-radius: 7rpx;
text-align: center;
margin: 0 20rpx;
}
.fixed-bottom {
position: fixed;
left: 0;
right: 0;
bottom: 0;
height: 113rpx;
display: flex;
align-items: center;
justify-content: space-between;
background: white;
z-index: 1;
box-shadow: 0px 0px 16rpx 0px rgba(6, 0, 1, 0.1);
}
.yuyue-box {
height: 138rpx;
justify-content: center;
}
.fixed-btn {
line-height: 80rpx;
width: 250rpx;
height: 80rpx;
background: #D62828;
border-radius: 40rpx;
margin-right: 50rpx;
font-family: PingFang SC;
font-weight: bold;
font-size: 32rpx;
color: #FFFFFF;
text-align: center;
}
.fixed-price-box {
margin-left: 25rpx;
flex-shrink: 0;
font-size: 29rpx;
color: #333;
font-weight: 500;
}
.fixed-price-box .price {
color: #D62828;
font-size: 36rpx;
margin-left: 10rpx;
}
.allowance {
justify-content: space-between;
}
.allowance>view:nth-child(2) {
display: flex;
align-items: center;
}
.allowance image {
width: 40rpx;
height: 40rpx;
margin-left: 10rpx;
}
.allowance .border {
width: 30rpx;
height: 30rpx;
border-radius: 50%;
border: 4rpx solid #0B98BE;
margin-left: 10rpx;
}
.coupon-btn {
width: 138rpx;
line-height: 56rpx;
border: 1px solid #333333;
border-radius: 29rpx;
text-align: center;
font-size: 28rpx;
color: #000;
}
.box-title input {
flex: 1;
display: block;
font-size: 32rpx;
color: #000;
margin-left: 42rpx;
font-weight: 500;
text-align: left;
}
.yuyue-btn {
width: 657rpx;
line-height: 78rpx;
border-radius: 39rpx;
}
.group-order .yuyue-box {
height: 100rpx;
}
.group-order .yuyue-btn {
width: 100%;
/* height: 100%; */
line-height: 100rpx;
border-radius: 0;
}
.mask-allowance .mask-content {
margin: auto;
top: initial;
bottom: initial;
padding: 20rpx;
}
.mask-allowance .mask-content .rule-title {
text-align: center;
margin-bottom: 20rpx;
}
.dialog-top {
color: #999;
font-weight: 500;
padding: 40rpx 33.33rpx 0;
}
.scene-title {
font-size: 35rpx;
font-weight: bold;
color: #333;
margin-bottom: 32.67rpx;
}
.people-message {
margin-bottom: 26.67rpx;
/* padding-bottom: 26.67rpx; */
/* border-bottom: 1px solid #F0F0F0; */
font-weight: bold;
font-size: 32rpx;
}
.people {
border-top: 1rpx solid #F0F0F0;
padding: 26.67rpx 0 24rpx;
}
.flex {
display: flex;
}
.bottom-btn {
display: flex;
border-top: 1rpx solid #F0F0F0;
height: 96rpx;
/* padding: 32.67rpx 0; */
}
.cancle {
width: 50%;
color: #999;
text-align: center;
line-height: 96rpx;
}
.confirm {
width: 50%;
text-align: center;
color: #D62828;
line-height: 96rpx;
border-left: 1rpx solid #F0F0F0;
}
.mask-content1 {
max-height: 710rpx;
position: relative;
z-index: 1;
width: 80%;
background: white;
border-radius: 12rpx;
/* margin-bottom: 45%; */
overflow-y: auto;
margin: auto;
}
.change-date {
font-weight: 500;
font-size: 27rpx;
color: #0B898E;
}
.text1 {
margin-left: 21rpx;
font-weight: 400;
font-size: 23rpx;
color: #0B898E;
margin-bottom: 21rpx;
display: flex;
align-items: flex-end;
padding-bottom: 40rpx;
}
.text2 {
margin-left: 22rpx;
font-weight: 400;
font-size: 23rpx;
color: #666666;
padding-bottom: 41rpx;
}
.mask-content2 {
position: absolute;
left: 0;
right: 0;
bottom: 0;
width: 100%;
background: white;
border-radius: 12rpx;
overflow-y: auto;
height: 1100rpx;
}
.bottom-box {
height: 133rpx;
background: #FFFFFF;
box-shadow: 0rpx -3rpx 8rpx 0rpx rgba(71,71,71,0.1);
padding: 0 50rpx;
display: flex;
justify-content: space-between;
align-items: center;
position: absolute;
left: 0;
right: 0;
bottom: 0;
}
.totalPrice {
font-family: PingFang SC;
font-weight: 500;
font-size: 48rpx;
color: #D62828;
}
.totalPrice::before {
content: "¥";
font-size: 24rpx;
}
.next {
width: 250rpx;
height: 80rpx;
background: #D62828;
border-radius: 40rpx;
font-family: PingFang;
font-weight: bold;
font-size: 32rpx;
color: #FFFFFF;
text-align: center;
line-height: 80rpx;
}
.icon-close {
position: absolute;
top: 30rpx;
right: 30rpx;
}
.s-price {
font-weight: 500;
font-size: 36rpx;
color: #D62828;
margin-right: 17rpx;
}
.s-price::before {
content: "¥";
font-size: 24rpx;
}

381
pages/user/order/showOrderInfo/index.js

@ -0,0 +1,381 @@
// pages/user/order/sceneOrderInfo/index.js
import commonApi from "../../../../utils/https/common"
import userApi from "../../../../utils/https/user"
import QRCode from '../../../../utils/weapp-qrcode.js'
import util from '../../../../utils/util'
let app = getApp(),timer
Page({
/**
* 页面的初始数据
*/
data: {
id:null,
info:null,
orderState:app.globalData.orderState,
productState:app.globalData.productState,
product_model:null,
isRefund:false,
feeInfoFlag:false,
codeIndex:0,
codeImgs:[],
minute:0,
second:0,
cardTypes:{},
cxr1:false,
cxr1Text:'更多',
sysm:false,
sysmText:'更多',
sysm2:false,
sysm2Text:'更多',
imgLen:[],
ids:[]
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.setData({
id:options.id
})
userApi.user_post("user/getCardTypeList").then(res=>{
let cardTypes = {};
res.data.map(item=>{
cardTypes[item.type]=item.title;
})
this.setData({
cardTypes:cardTypes
})
})
},
copy:function(){
wx.setClipboardData({
data: this.data.codeImgs[this.data.codeIndex].code,
success: function (res) {
wx.showToast({
title: '复制成功',
icon:'success'
})
}
})
},
getCodeImg:function(){
let that = this,sys =wx.getSystemInfoSync(),radio = sys.screenWidth / 750,qrcode=this.data.info.order_product_list[0].qrcode,codeImgs=[],codeId=0,arr = [];
this.data.info.order_product_list.forEach(qrcode=>{
qrcode.qrcode.map((item,index)=>{
console.log(qrcode.is_force_display_code);
item.is_force_display_code = qrcode.is_force_display_code
console.log(item.is_force_display_code);
arr.push(index)
this.setData({
imgLen:arr
})
if(item.use_url&&item.use_code){
codeImgs.push({img:item.use_url,code:item.use_code,text:item.use_code_display_text,state:item.stateText,is_force_display_code:item.is_force_display_code,flag:item.state});
// if(codeImgs.length==qrcode.qrcode.length){
// that.setData({
// codeImgs:codeImgs
// })
// }
that.setData({
codeImgs:codeImgs
})
}
else {
console.log(item);
new QRCode('damocode'+codeId,{
text: item.use_code,
width: 300 * radio,
height: 300 * radio,
padding:10, // 生成二维码四周自动留边宽度,不传入默认为0
correctLevel: QRCode.CorrectLevel.H, // 二维码可辨识度
callback: (res) => {
console.log(res);
codeImgs.push({img:res.path,code:item.use_code,text:item.use_code_display_text,state:item.stateText,is_force_display_code:item.is_force_display_code,flag:item.state});
that.setData({
codeImgs:codeImgs
})
}
})
console.log(this.data.codeImgs);
codeId = codeId + 1
}
})
})
console.log(this.data.imgLen);
console.log(this.data.codeImgs);
},
prevCodeImg:function(){
let qrcode=this.data.info.order_product_list[0].qrcode,codeIndex = this.data.codeIndex;
if(codeIndex==0){
this.setData({
codeIndex:qrcode.length-1
})
}
else {
this.setData({
codeIndex:codeIndex-1
})
}
},
nextCodeImg:function(){
console.log(this.data.codeImgs);
let qrcode=this.data.codeImgs,codeIndex = this.data.codeIndex;
codeIndex = codeIndex + 1;
if(codeIndex==qrcode.length){
codeIndex = 0;
}
this.setData({
codeIndex:codeIndex
})
},
showFeeInfo:function(){
this.setData({
feeInfoFlag:!this.data.feeInfoFlag
})
},
close:function(){
let _this = this,info = _this.data.info;
wx.showModal({
title:'提示',
content:"确定取消吗",
success:function(res){
if(res.confirm){
commonApi.user_post("order/close",{
order_id:info.order_id
}).then(res=>{
if(res.code==1){
wx.showToast({
title: '取消成功',
icon:'success'
})
info.state = "CLOSED";
info.order_product_list.map(item=>{
item.state='CLOSED'
})
_this.setData({
info:info
})
}
})
}
}
})
},
refund:function(){
let _this = this,info = _this.data.info;
wx.showModal({
title:'提示',
content:"确定取消吗",
success:function(res){
if(res.confirm){
commonApi.user_post("order/refund",{
order_id:info.order_id
}).then(res=>{
if(res.code==1){
wx.showToast({
title: '取消成功',
icon:'success'
})
info.state = "WAIT_REFUND";
info.order_product_list.map(item=>{
item.state='WAIT_REFUND'
})
_this.setData({
info:info
})
}
})
}
}
})
},
daojishi:function(time){
let now = new Date().getTime();
if(now>time){
clearTimeout(timer);
timer = null;
util.back();
return;
}
let times = time - now,minute = Math.floor(times / (60 * 1000)),second = Math.round((times - minute * 60 * 1000) / 1000);
this.setData({
minute:util.formatNumber(minute),
second:util.formatNumber(second)
})
timer = setTimeout(()=>{
this.daojishi(time);
},1000)
},
// 查看苏康码
gotoSku:function(){
commonApi.user_post("pbservice/Ztfw/sukangCode").then(res=>{
console.log(res)
app.globalData.weburl = res.data.url;
wx.navigateTo({
url: '/pages/pbService/web/index'
})
return;
})
},
goDetail(e){
console.log(e.currentTarget.dataset);
let item = e.currentTarget.dataset.set
if (item.is_package) {
wx.navigateTo({
url:"/pages/info/postProductInfo/index?id="+item.product_id
})
return
}
if (item.product_model=='ticket') {
wx.navigateTo({
url:"/pages/info/sceneProductInfo/index?id="+item.scene_id
})
}else if (item.product_model=='post') {
wx.navigateTo({
url:"/pages/info/postProductInfo/index?id="+item.product_id
})
} else if (item.product_model == 'show') {
wx.navigateTo({
url:"/pages/info/showInfo/index?id="+item.product_id
})
}
},
showMsg(e){
console.log(e.currentTarget.dataset);
let msg = e.currentTarget.dataset.msg
switch (msg) {
case 'cxr1':
this.setData({
cxr1:!this.data.cxr1,
cxr1Text:this.data.cxr1?'更多':'收起',
})
break;
case 'sysm1':
this.setData({
sysm:!this.data.sysm,
sysmText:this.data.sysm?'更多':'收起',
})
break;
case 'sysm2':
this.setData({
sysm2:!this.data.sysm2,
sysm2Text:this.data.sysm2?'更多':'收起',
})
break;
default:
break;
}
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
commonApi.user_post("order/query",{
order_id:this.data.id
}).then(res=>{
if(res.data.create_time && res.data.auto_close_time && res.data.state=='UNPAID'){
let time = (new Date(res.data.create_time.replace(/-/g,'/')).getTime() + Number(res.data.auto_close_time) * 1000);
this.daojishi(time);
}
let proId = []
res.data.order_product_list.forEach(item => {
proId.push(item.product_id)
})
let state = ""
res.data.order_product_list.map(order=>{
order.qrcode.map(item=>{
item.stateText = app.globalData.codeState[item.state];
})
order.contacts_info = order.contacts_info?JSON.parse(order.contacts_info):[];
state = state + order.state;
})
this.setData({
isRefund:state.indexOf("REFUND")!=-1,
info:res.data,
product_model:"ticket"||res.data.order_product_list[0].product_model,
ids: proId.join(",")
})
console.log(res.data);
// debugger
console.log('ids',this.data.ids);
this.getCodeImg()
// 获取行程规划
let that = this;
wx.getLocation({
type: 'gcj02',
success: function (r) {
let ajaxes=[];
res.data.order_product_list.map(item=>{
ajaxes.push(commonApi.user_post("order/tripplan",{
point_type:"gd",
child_order_id:item.child_order_id,
lon:r.longitude,
lat:r.latitude
}))
})
Promise.all(ajaxes).then(r=>{
console.log(r)
let orderInfo = that.data.info;
r.map((item,index)=>{
if(item && item.data && item.data.url){
orderInfo.order_product_list[index].btnUrl = item.data.url;
}
})
that.setData({
info:orderInfo
})
})
}
})
})
},
// 行程规划
leadRoad:function(e){
let url = e.currentTarget.dataset.url;
app.globalData.weburl = url;
wx.navigateTo({
url: '/pages/pbService/web/index'
})
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
clearTimeout(timer)
timer = null
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
}
})

7
pages/user/order/showOrderInfo/index.json

@ -0,0 +1,7 @@
{
"usingComponents": {
"title":"/pages/component/TitleHeader",
"sptj":"/pages/component/proRec/proRec",
"advBox":"/pages/component/orderAdv/orderAdv"
}
}

144
pages/user/order/showOrderInfo/index.wxml

@ -0,0 +1,144 @@
<!--pages/user/order/sceneOrderInfo/index.wxml-->
<wxs src="../../../../utils/filter.wxs" module="tool" />
<title title="订单详情"></title>
<view class="top-bg"></view>
<canvas wx:for="{{imgLen}}" class="code-img" style="position:absolute;z-index:-1;" canvas-id="damocode{{index}}"></canvas>
<view class="state-text" wx:if="{{info}}">{{info.state_text}}</view>
<view class="code-box box" wx:if="{{info && codeImgs.length>0}}">
<view bindtap="prevCodeImg" class="iconfont icon-you-copy"></view>
<view wx:for="{{codeImgs}}" wx:if="{{index==codeIndex}}" style="position: relative;">
<image src="{{item.img}}" mode="widthFix" style="width:300rpx;"></image>
<!-- 代表核销后是否继续展示二维码(0否1是) -->
<view class="text-shadow" wx:if="{{item.is_force_display_code != 1 && item.flag != 0}}">
<view class="text-shadow-state">
{{item.state}}
</view>
</view>
</view>
<view bindtap="nextCodeImg" class="iconfont icon-you"></view>
<view class="code-text">{{codeImgs[codeIndex].text}}:{{codeImgs[codeIndex].code}} <view class="copy-box" bindtap="copy">复制</view></view>
<view class="code-state">{{codeImgs[codeIndex].state}} {{codeIndex+1}}/{{codeImgs.length}}</view>
</view>
<view wx:if="{{info && codeImgs.length>0}}">
<advBox ids="{{ ids }}"></advBox>
</view>
<sptj ids="{{ ids }}"></sptj>
<!-- 景点订单详情需要这个 -->
<view class="box">
<view class="scene-box">
<view class="scene-box-left">
<view wx:if="{{info.state=='UNPAID'}}">库存有限,请尽快完成付款</view>
<view wx:if="{{info.state=='CLOSED' || info.state=='REFUND'}}">您的订单已取消,您可以通过苏州文旅总入口再次预订</view>
<view wx:if="{{info.order_product_list[0].state=='WAIT_USE'}}">预定已成功,祝您出游愉快</view>
<view>订单号:{{info.order_id}}</view>
<view>下单时间:{{info.create_time}}</view>
</view>
<view class="scene-box-right">
<view class="price">¥{{info.paid_money/100}}</view>
<view bindtap="showFeeInfo">费用明细</view>
</view>
</view>
<view class="scene-btns" wx:if="{{info.state!='CLOSED'}}">
<view class="scene-rest-time" wx:if="{{info.state=='UNPAID'}}">剩余时间:00:{{minute}}:{{second}}</view>
<view wx:if="{{info.state!='UNPAID'}}">
<navigator wx:if="{{info.order_product_list[0].is_package}}" url="/pages/info/postProductInfo/index?id={{info.order_product_list[0].product_id}}" class="btn">再次购买</navigator>
<navigator wx:else url="/pages/info/showInfo/index?id={{info.order_product_list[0].product_id}}" class="btn">再次购买</navigator>
</view>
<!-- <view bindtap="leadRoad" data-url="{{info.order_product_list[0].btnUrl}}" class="btn" wx:if="{{info.state!='UNPAID' && !isRefund}}">行程规划</view> -->
<navigator url="../refundInfo/index?id={{info.order_id}}" class="scene-btn" wx:if="{{isRefund}}">退款详情</navigator>
<view class="scene-btn" wx:if="{{info.state=='PAID'}}" bindtap="refund">取消预订</view>
<view class="scene-btn" wx:if="{{info.state=='UNPAID'}}" bindtap="close">取消预订</view>
<navigator url="/pages/order/comment/index?id={{info.order_id}}&proId={{info.order_product_list[0].product_id}}" class="scene-btn active1" wx:if="{{info.state=='WAIT_COMMENT'}}">去评价</navigator>
<navigator url="/pages/order/pay/index?id={{id}}" class="btn active" wx:if="{{info.state=='UNPAID'}}">立即支付</navigator>
</view>
</view>
<!--景点订单详情需要这个 -->
<view class="box" wx:for="{{info.order_product_list}}" wx:for-index='index'>
<view class="scene-box" style="align-items:center">
<view class="scene-box-left" style="width:630rpx">
<view class="box-title" bindtap="goDetail" data-set='{{item}}'>
<view class="title-content">{{item.product_title}}</view>
<view class="iconfont icon-you"></view>
</view>
<view class="detail-item">
<text>{{item.sku_name}}</text>
<text>x{{item.product_num}}</text>
</view>
<view class="childStatus" style="text-align: left;font-size: 30rpx; font-weight:bold;padding-bottom: 30rpx;color: #0b898e">
{{ item.state_text }}
</view>
<view class="row" wx:if="{{ !item.order_advance.id}}">
<view>场次:</view>
<view>{{item.use_date}} <text style="padding-left: 20rpx;" wx:if="{{item.start_time && item.end_time}}">{{ item.start_time }}-{{ item.end_time }}</text> </view>
</view>
<view class="row" wx:if="{{ item.order_advance.id}}">
<view>使用日期:</view>
<view>{{ item.order_advance.start_time }}-{{ item.order_advance.end_time }}</view>
</view>
<view >
<view class="box-title tflex">
<view>出行人信息</view>
<view bindtap="showMsg" data-msg="cxr1" style="color: rgb(49, 154, 158);">{{cxr1Text}}</view>
</view>
<view wx:if="{{item.sku_model.is_authentication == 0}}">
<view class="detail-item">
<text>手机号: {{item.phone}}</text>
</view>
</view>
<view wx:else>
<view wx:if="{{cxr1}}" wx:for="{{item.contacts_info}}">
<view class="line" wx:if="{{index!=0}}"></view>
<view class="detail-item">
<text>姓名: {{item.name}}</text>
<!-- <text>¥168</text> -->
</view>
<view class="detail-item">
<text>{{cardTypes[item.idcard_type]}}:{{item.id_number}}</text>
<!-- <text>-¥10</te、xt> -->
</view>
<view class="detail-item">
<text>手机号: {{item.tel}}</text>
<!-- <text>-¥10</text> -->
</view>
</view>
</view>
</view>
<view >
<view class="box-title tflex">
<view>使用说明</view>
<view bindtap="showMsg" data-msg="sysm1" style="color: rgb(49, 154, 158);">{{sysmText}}</view>
</view>
<rich-text wx:if="{{sysm}}" class="detail-item" style="display:block" nodes="{{tool.formateRichText(item.sku_model.bookinfo)}}"></rich-text>
</view>
<view wx:if="{{item.product_model=='post'}}">
<view class="box-title tflex">
<view>使用说明</view>
<view bindtap="showMsg" data-msg="sysm2" style="color: rgb(49, 154, 158);">{{sysm2Text}}</view>
</view>
<rich-text wx:if="{{sysm2}}" class="detail-item" style="display:block" nodes="{{tool.formateRichText(item.sku_model.bookinfo)}}"></rich-text>
</view>
</view>
</view>
</view>
<navigator wx:if="{{info && info.state!='CLOSED'}}" url="/pages/user/service/index" class="bottom-btn">
<image src="https://static.ticket.sz-trip.com/xcxImages/index/service.png" mode="widthFix"></image>联系客服
</navigator>
<view class="mask" wx:if="{{feeInfoFlag}}">
<view class="mask-bg" bindtap="showFeeInfo"></view>
<view class="mask-content">
<view class="mask-title">费用明细</view>
<view class="iconfont icon-close" bindtap="showFeeInfo"></view>
<view class="mask-item"><text>商品总价</text><text>¥{{info.total_money/100}}</text></view>
<view class="mask-item"><text>优惠券抵扣</text><text>-¥{{info.preference_money/100}}</text></view>
<view class="mask-item"><text>订单实付</text><text>¥{{info.paid_money/100}}</text></view>
</view>
</view>

354
pages/user/order/showOrderInfo/index.wxss

@ -0,0 +1,354 @@
/* pages/user/order/sceneOrderInfo/index.wxss */
.top-bg {
position: absolute;
left: 0;
right: 0;
height: 280rpx;
background: linear-gradient(180deg, #0B898E, #0B898E, rgba(237, 237, 237, 0));
z-index: -1;
}
page {
background: #f6f6f6;
}
.state-text {
margin: 20rpx 30rpx;
line-height: 100rpx;
color: #fff;
font-size: 48rpx;
}
.box {
padding: 20rpx;
background: white;
border-radius: 20rpx;
margin: 20rpx 30rpx;
}
.product-info {
display: flex;
justify-content: space-between;
color: #333;
font-size: 24rpx;
padding-bottom: 20rpx;
border-bottom: 1rpx solid #d8d8d8;
margin-bottom: 10rpx;
}
.product-info image {
width: 140rpx;
height: 140rpx;
border-radius: 10rpx;
flex-shrink: 0;
}
.title-box {
flex: 1;
margin: 0 20rpx;
}
.title-box .title {
font-size: 30rpx;
width: 100%;
margin-bottom: 10rpx;
}
.title-box .subtitle {
color: #888888;
font-size: 26rpx;
}
.price-box-tip {
text-align: right;
}
.detail-item {
display: flex;
justify-content: space-between;
align-items: center;
min-height: 45rpx;
color: #000;
font-size: 30rpx;
padding-bottom:30rpx ;
}
.all-total-item {
font-weight: bold;
height: 70rpx;
border-bottom: 1rpx solid #d8d8d8;
}
.all-total-item .price {
color: #D62828;
font-size: 36rpx;
}
.all-total-item .price::before {
content: "¥";
font-size: 26rpx;
}
.btns {
display: flex;
justify-content: flex-end;
align-items: center;
height: 103rpx;
font-size: 26rpx;
}
.btn {
width: 160rpx;
line-height: 60rpx;
background: #fff;
text-align: center;
box-sizing: border-box;
border: 1rpx solid #d8d8d8;
border-radius: 30rpx;
text-align: center;
margin-left: 20rpx;
}
.btn.active {
color: #fff;
background: #FC9132;
border-color: #FC9132;
}
.box-title {
font-size: 30rpx;
font-weight: bold;
margin-bottom: 10rpx;
display: flex;
text-align: center;
justify-content: space-between;
}
.box-title.tflex{
display: flex;
align-items: center;
justify-content: space-between;
}
.title-content{
overflow-x: hidden;
overflow-y: inherit;
text-overflow: ellipsis;
white-space: nowrap;
}
.scene-box {
display: flex;
justify-content: space-between;
}
.scene-box-left {
width: 400rpx;
font-size: 26rpx;
color: #333;
}
.scene-box-right {
flex-shrink: 0;
font-size: 24rpx;
color: #999;
text-align: right;
}
.scene-box-right .price {
color: #D62828;
font-size: 36rpx;
font-weight: bold;
}
.scene-btns {
display: flex;
justify-content: flex-end;
align-items: center;
font-size: 26rpx;
color: #333;
text-align: center;
margin-top: 50rpx;
}
.scene-btn {
width: 160rpx;
line-height: 60rpx;
box-sizing: border-box;
border: 1rpx solid #d8d8d8;
border-radius: 30rpx;
margin-left: 20rpx;
flex-shrink: 0;
}
.scene-rest-time {
flex: 1;
text-align: left;
font-size: 26rpx;
font-weight: bold;
}
.scene-btn.active {
color: #fff;
background: #FC9132;
border-color: #FC9132;
}
.scene-btn.active1 {
background: #0B898E;
border-color: #0B898E;
color: #fff;
}
.bottom-btn {
display: flex;
width: 360rpx;
height: 80rpx;
background: #FFFFFF;
border-radius: 40rpx;
justify-content: center;
align-items: center;
font-size: 30rpx;
color: #333;
font-weight: 500;
margin: 20rpx auto;
}
.bottom-btn image {
width: 40rpx;
margin-right: 10rpx;
}
.line {
margin: 10rpx 0;
height: 1rpx;
background: #d8d8d8;
}
.mask-title {
text-align: center;
padding-top: 30rpx;
margin-bottom: 60rpx;
font-weight: 500;
}
.mask-item {
margin: 0 40rpx;
margin-bottom: 60rpx;
display: flex;
justify-content: space-between;
font-size: 30rpx;
color: #333;
}
.icon-close {
position: absolute;
right: 20rpx;
top: 30rpx;
}
.code-box {
text-align: center;
height: 440rpx;
position: relative;
}
.code-box .iconfont {
position: absolute;
color: #0B898E;
font-size: 30rpx;
line-height: 50rpx;
width: 50rpx;
left: 40rpx;
text-align: center;
margin-top: 125rpx;
}
.code-box .iconfont.icon-you {
left: auto;
right: 40rpx;
top: 20rpx;
}
.code-img {
width: 300rpx;
height: 300rpx;
display: block;
margin: 0 auto;
position: absolute;
left: -1000rpx;
top: -400rpx;
}
.code-state {
font-size: 26rpx;
color: #333;
margin-bottom: 30rpx;
}
.code-text {
color: #0B898E;
font-size: 30rpx;
font-weight: 500;
margin: 25rpx;
display: flex;
justify-content: center;
}
.code-btn {
width: 220rpx;
line-height: 60rpx;
background: #FFFFFF;
border: 1rpx solid #D8D8D8;
border-radius: 30rpx;
box-sizing: border-box;
font-size: 26rpx;
color: #333;
margin: 0 auto;
}
.hotel-tel-box {
line-height: 80rpx;
border-top: 1rpx solid #D8D8D8;
color: #0B898E;
font-size: 26rpx;
margin-top: 20rpx;
}
.hotel-tel-box .iconfont {
margin-right: 20rpx;
font-size: 34rpx;
}
.hotel-tips {
display: flex;
align-items: center;
font-size: 24rpx;
color: #999;
}
.hotel-tips .hotel-days-num {
width: 70rpx;
font-size: 20rpx;
line-height: 30rpx;
border: 1rpx solid #0B898E;
border-radius: 15rpx;
text-align: center;
color: #0B898E;
margin: 0 20rpx;
text-align: center;
box-sizing: border-box;
}
.hotel-tips .hotel-date {
font-size: 26rpx;
color: #333;
margin-right: 6rpx;
}
.hotel-tip {
font-size: 24rpx;
color: #999;
margin-top: 30rpx;
}
.row{
display: flex;
align-items: center;
justify-content:space-between;
padding-bottom: 30rpx;
}
.showmsg{
display: none;
}
.btn{
float: right;
}
.text-shadow {
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
margin: auto;
text-align: center;
background: rgba(0, 0, 0, .3);
width: 300rpx;
height: 300rpx;
/*border-radius: .3rem;*/
display: flex;
align-items: center;
justify-content: center;
z-index: 10;
}
.text-shadow-state {
width: 200rpx;
height: 200rpx;
line-height: 200rpx;
background: #FFFFFF;
border-radius: 50%;
color: #0B898E;
}
.copy-box {
width: 73rpx;
line-height: 35rpx;
border-radius: 7rpx;
border: 1rpx solid #09898C;
margin-left: 15rpx;
text-align: center;
font-weight: 500;
font-size: 23rpx;
color: #0E8790;
}

56
project.private.config.json

@ -7,15 +7,15 @@
"miniprogram": { "miniprogram": {
"list": [ "list": [
{ {
"name": "pages/user/bindtel/index", "name": "pages/info/showInfo/index",
"pathName": "pages/user/bindtel/index", "pathName": "pages/info/showInfo/index",
"query": "regToken=123456", "query": "id=13170",
"launchMode": "default", "launchMode": "default",
"scene": null "scene": null
}, },
{ {
"name": "subPackages/index/index", "name": "pages/order/showOrderNew/index",
"pathName": "subPackages/index/index", "pathName": "pages/order/showOrderNew/index",
"query": "", "query": "",
"launchMode": "default", "launchMode": "default",
"scene": null "scene": null
@ -27,25 +27,12 @@
"launchMode": "default", "launchMode": "default",
"scene": null "scene": null
}, },
{
"name": "pages/info/postProductInfo/index",
"pathName": "subPackages/index/index",
"query": "",
"launchMode": "default",
"scene": null
},
{ {
"name": "景点购物车5447", "name": "景点购物车5447",
"pathName": "pages/info/sceneProductInfoNew/index", "pathName": "pages/info/sceneProductInfoNew/index",
"query": "id=5447", "query": "id=5447",
"scene": null "scene": null
}, },
{
"name": "测试支付",
"pathName": "pages/order/pay/index",
"query": "id=35532207011748334675",
"scene": null
},
{ {
"name": "pages/group/info/index", "name": "pages/group/info/index",
"pathName": "pages/group/info/index", "pathName": "pages/group/info/index",
@ -58,38 +45,12 @@
"query": "", "query": "",
"scene": null "scene": null
}, },
{
"name": "测试美团酒店详情",
"pathName": "pages/info/hotelProductInfo/index",
"query": "id=5974",
"scene": null
},
{ {
"name": "pages/order/joinOrder/index", "name": "pages/order/joinOrder/index",
"pathName": "pages/order/joinOrder/index", "pathName": "pages/order/joinOrder/index",
"query": "oid=59532109231539023692&id=336&uid=24", "query": "oid=59532109231539023692&id=336&uid=24",
"scene": null "scene": null
}, },
{
"name": "pages/order/orderList/index",
"pathName": "pages/order/orderList/index",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "团体预约场馆",
"pathName": "pages/pbService/group/index",
"query": "",
"scene": null
},
{
"name": "",
"pathName": "pages/supplier/index",
"query": "",
"launchMode": "default",
"scene": null
},
{ {
"name": "", "name": "",
"pathName": "pages/order/payresult/index", "pathName": "pages/order/payresult/index",
@ -103,13 +64,6 @@
"query": "id=82342309051435565877", "query": "id=82342309051435565877",
"launchMode": "default", "launchMode": "default",
"scene": null "scene": null
},
{
"name": "",
"pathName": "pages/user/order/activityOrderInfo/index",
"query": "",
"launchMode": "default",
"scene": null
} }
] ]
} }

8
utils/util.js

@ -392,12 +392,18 @@ const gotoOrder = function(item){
}) })
return; return;
} }
if(item.order_product_list[0].product_model=='movie' || item.order_product_list[0].product_model=='show'){ if(item.order_product_list[0].product_model=='movie'){
wx.navigateTo({ wx.navigateTo({
url: '/pages/user/order/movieOrderInfo/index?id='+item.order_id, url: '/pages/user/order/movieOrderInfo/index?id='+item.order_id,
}) })
return; return;
} }
if (item.order_product_list[0].product_model=='show') {
wx.navigateTo({
url: '/pages/user/order/showOrderInfo/index?id='+item.order_id,
})
return;
}
if(item.order_product_list[0].product_model=='post'){ if(item.order_product_list[0].product_model=='post'){
wx.navigateTo({ wx.navigateTo({
url: '/pages/user/order/postOrderInfo/index?id='+item.order_id, url: '/pages/user/order/postOrderInfo/index?id='+item.order_id,

Loading…
Cancel
Save