Browse Source

Merge branch 'master' of http://code.xmainc.com:3000/panyiping/jundaosuzhou_wechatxcx

# Conflicts:
#	app.js
master
chenkainan 3 years ago
parent
commit
8a87bb8336
  1. 4
      app.js
  2. 1
      app.json
  3. 4
      pages/component/TitleHeader.js
  4. 34
      pages/index/index.js
  5. 4
      pages/index/index.wxml
  6. 57
      pages/info/groupOrderInfo/index.js
  7. 97
      pages/info/sceneProductInfo/index.js
  8. 2
      pages/list/activitynew/index.js
  9. 24
      pages/list/activitynew/index.wxml
  10. 9
      pages/list/activitynew/index.wxss
  11. 49
      pages/list/movieticket/list/cinema/index.js
  12. 6
      pages/list/movieticket/list/cinema/index.wxml
  13. 2
      pages/list/movieticket/list/info/index.wxml
  14. 1
      pages/list/movieticket/list/info/index.wxss
  15. 28
      pages/list/movieticket/list/seats/index.js
  16. 46
      pages/list/movieticket/list/ticket/index.js
  17. 6
      pages/list/movieticket/list/ticket/index.wxml
  18. 79
      pages/list/movieticket/list/web/index.js
  19. 3
      pages/list/movieticket/list/web/index.json
  20. 4
      pages/list/movieticket/list/web/index.wxml
  21. 1
      pages/list/movieticket/list/web/index.wxss
  22. 1
      pages/list/museum/index.wxss
  23. 2
      pages/list/techan/index.wxml
  24. 2
      pages/order/coupon/index.js
  25. 2
      pages/order/coupon/index.wxml
  26. 2
      pages/order/hotel/index.wxml
  27. 54
      pages/order/movie/index.js
  28. 7
      pages/order/movie/index.wxml
  29. 1
      pages/order/movie/index.wxss
  30. 3
      pages/order/orderList/index.js
  31. 2
      pages/order/orderList/index.wxml
  32. 50
      pages/order/pay/index.js
  33. 20
      pages/order/pay/index.wxml
  34. 6
      pages/order/postOrder/index.js
  35. 16
      pages/order/scene/index.js
  36. 4
      pages/order/scene/index.wxml
  37. 1
      pages/pbService/web/index.js
  38. 20
      pages/user/cartlist/list.js
  39. 2
      pages/user/coupon/index.wxml

4
app.js

@ -31,6 +31,7 @@ App({
obj[item.id] = item.image obj[item.id] = item.image
}); });
this.globalData.configJson.indexSeason = obj this.globalData.configJson.indexSeason = obj
this.globalData.loadIndexSeason = true
}) })
}) })
@ -253,6 +254,7 @@ App({
prizeId: null, prizeId: null,
loginPageEvent: { loginPageEvent: {
"pages/list/message/index": 'message_login_' "pages/list/message/index": 'message_login_'
} },
loadIndexSeason:false
} }
}) })

1
app.json

@ -104,6 +104,7 @@
"pages/list/movieticket/list/seats/index", "pages/list/movieticket/list/seats/index",
"pages/list/movieticket/list/cinema/index", "pages/list/movieticket/list/cinema/index",
"pages/list/movieticket/list/ticket/index", "pages/list/movieticket/list/ticket/index",
"pages/list/movieticket/list/web/index",
"pages/list/movieticket/list/info/index", "pages/list/movieticket/list/info/index",
"pages/list/theatre/index", "pages/list/theatre/index",
"pages/list/card/index", "pages/list/card/index",

4
pages/component/TitleHeader.js

@ -83,6 +83,10 @@ Component({
wx.switchTab({ wx.switchTab({
url: '/pages/user/user' url: '/pages/user/user'
}) })
} else if (pages[pages.length-1].route.indexOf('pages/user/cartlist/list') != -1){
wx.switchTab({
url: '/pages/user/user'
})
} }

34
pages/index/index.js

@ -206,6 +206,16 @@ Page({
}) })
}, },
//获取季节配置
getIndexSeason(){
this.setData({
indexHot: app.globalData.configJson.indexHot,
isTest: app.globalData.configJson.isTest,
otherPlat: app.globalData.configJson.otherPlats,
indexSeason: app.globalData.configJson.indexSeason
})
this.getFourProduct()
},
//关闭弹窗广告 //关闭弹窗广告
closeAdv: function () { closeAdv: function () {
this.setData({ this.setData({
@ -735,20 +745,8 @@ Page({
return return
}, },
onReady: function () { onReady: function () {
if (app.globalData.configJson) {
this.setData({
indexHot: app.globalData.configJson.indexHot,
isTest: app.globalData.configJson.isTest,
otherPlat: app.globalData.configJson.otherPlats,
indexSeason: app.globalData.configJson.indexSeason
})
console.log(app.globalData.configJson)
this.getFourProduct()
} else {
setTimeout(() => {
this.onReady()
}, 300)
}
}, },
gotoOther: function (e) { gotoOther: function (e) {
let item = e.currentTarget.dataset.item; let item = e.currentTarget.dataset.item;
@ -772,6 +770,14 @@ Page({
util.pagePoint(e, type) util.pagePoint(e, type)
}, },
onShow: function () { onShow: function () {
if (app.globalData.loadIndexSeason) {
this.getIndexSeason()
} else {
setTimeout(() => {
this.getIndexSeason()
}, 500)
}
this.pagePoint({ this.pagePoint({
event: 'home_view' event: 'home_view'
}, 1) }, 1)

4
pages/index/index.wxml

@ -216,11 +216,11 @@
<image src="https://static.ticket.sz-trip.com/xcxImages/index/newpb5.png" mode="widthFix"></image> <image src="https://static.ticket.sz-trip.com/xcxImages/index/newpb5.png" mode="widthFix"></image>
<view>书香借阅</view> <view>书香借阅</view>
</view> </view>
<view bindtap="gotoPath" data-event="book_click" data-title="文化配送" data-path="/pages/culture/index" <!-- <view bindtap="gotoPath" data-event="book_click" data-title="文化配送" data-path="/pages/culture/index"
class="pbservice-item"> class="pbservice-item">
<image src="https://static.ticket.sz-trip.com/uploads/20220818/e02af6e8bf9170060ed7295d367d72c1.png" mode="widthFix"></image> <image src="https://static.ticket.sz-trip.com/uploads/20220818/e02af6e8bf9170060ed7295d367d72c1.png" mode="widthFix"></image>
<view>文化配送</view> <view>文化配送</view>
</view> </view> -->
<view bindtap="gotoUrl" data-event="cloud_click" data-title="云上观展" <view bindtap="gotoUrl" data-event="cloud_click" data-title="云上观展"
data-url="https://m.cloud.sz-trip.com/CloudPerform2022" class="pbservice-item"> data-url="https://m.cloud.sz-trip.com/CloudPerform2022" class="pbservice-item">
<image src="https://static.ticket.sz-trip.com/xcxImages/index/newpb13.png" mode="widthFix"></image> <image src="https://static.ticket.sz-trip.com/xcxImages/index/newpb13.png" mode="widthFix"></image>

57
pages/info/groupOrderInfo/index.js

@ -14,7 +14,8 @@ Page({
restTime:null, restTime:null,
countdown:0, countdown:0,
codeImg:null, codeImg:null,
showShareMask:false showShareMask:false,
from:null
}, },
/** /**
@ -22,25 +23,26 @@ Page({
*/ */
onLoad: function (options) { onLoad: function (options) {
this.setData({ this.setData({
id:options.id id:options.id,
from:options.from
}) })
// 获取二维码 // 获取二维码
commonApi.user_post("team_order/get_qrcode",{ // commonApi.user_post("team_order/get_qrcode",{
url:'https://m.cloud.sz-trip.com/TeamForm?team_id='+this.data.id // url:'https://m.cloud.sz-trip.com/TeamForm?team_id='+this.data.id
}).then(res=>{ // }).then(res=>{
this.setData({ // this.setData({
codeImg:res.data // codeImg:res.data
}) // })
}) // })
if(options.from=='order'){ // if(options.from=='order'){
wx.showModal({ // wx.showModal({
title:"提示", // title:"提示",
content:"团体预约发起后请前往个人中心团体预约订单中查看订单详情和组团详情。", // content:"团体预约发起后请前往个人中心团体预约订单中查看订单详情和组团详情。",
success:function(){ // success:function(){
} // }
}) // })
} // }
}, },
showShare(){ showShare(){
this.setData({ this.setData({
@ -107,7 +109,24 @@ Page({
} }
}) })
}, },
getQrcode(id){
commonApi.user_post("team_order/get_qrcode",{
url:'https://m.cloud.sz-trip.com/TeamForm?team_id='+id
}).then(res=>{
this.setData({
codeImg:res.data
})
})
if(this.data.from=='order'){
wx.showModal({
title:"提示",
content:"团体预约发起后请前往个人中心团体预约订单中查看订单详情和组团详情。",
success:function(){
}
})
}
},
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
*/ */
@ -123,6 +142,7 @@ Page({
order_id:this.data.id order_id:this.data.id
}).then(res=>{ }).then(res=>{
if(res.code==1){ if(res.code==1){
this.getQrcode(res.data.list.id)
res.data.list.order_info = res.data.list.order_info?JSON.parse(res.data.list.order_info):null; res.data.list.order_info = res.data.list.order_info?JSON.parse(res.data.list.order_info):null;
res.data.list.members.reverse() res.data.list.members.reverse()
this.setData({ this.setData({
@ -141,6 +161,7 @@ Page({
} }
}) })
}, },
setTime(){ setTime(){
if(this.data.countdown && this.data.countdown>0){ if(this.data.countdown && this.data.countdown>0){

97
pages/info/sceneProductInfo/index.js

@ -32,41 +32,7 @@ Page({
cartTop: 0, cartTop: 0,
top: 0, top: 0,
skuList: [], //立即预定的列表 skuList: [], //立即预定的列表
sku_ids: [ sku_ids: []
353954,
353950,
353949,
353951,
353947,
353953,
353685,
353684,
353952,
353686,
353948,
354730,
354409,
354359,
345343,
354756,
354385,
354360,
354361,
354362,
355466,
355465,
356230,
356223,
356207,
346648,
357518,
356233,
354381,
354384,
356324,
354737,
355467,
]
}, },
/** /**
@ -89,6 +55,7 @@ Page({
commonApi._post("scene/detail", { commonApi._post("scene/detail", {
id: options.id id: options.id
}).then(res => { }).then(res => {
let flag = false
if (!res.data) { if (!res.data) {
wx.showToast({ wx.showToast({
title: '产品已下架', title: '产品已下架',
@ -122,22 +89,58 @@ Page({
if (pItem) { if (pItem) {
res.data.product = [pItem]; res.data.product = [pItem];
} }
} else if (options.zhuanti_type) {
} else if (options.zhuanti_type == "yihuFree") { flag = true
commonApi._post("theme/getYihuFreeList", {
let skuArr = this.data.sku_ids zhuanti_type: options.zhuanti_type
let newArr = [] }).then(res1 => {
for (let i = 0; i < res.data.product.length; i++) { //3 let skuArr = res1.data.sku_ids
for (let j = 0; j < res.data.product[i].sku.length; j++) { //4 let newArr = []
for (let k = 0; k < skuArr.length; k++) { for (let i = 0; i < res.data.product.length; i++) { //3
if (res.data.product[i].sku[j].id == skuArr[k]) { for (let j = 0; j < res.data.product[i].sku.length; j++) { //4
newArr.push(res.data.product[i].sku[j]) for (let k = 0; k < skuArr.length; k++) {
if (res.data.product[i].sku[j].id == skuArr[k]) {
newArr.push(res.data.product[i].sku[j])
}
} }
} }
res.data.product[i].sku = newArr;
} }
res.data.product[i].sku = newArr; res.data.product.map(product => {
} product.sku.map(sku => {
sku.display_tags = (sku.display_tags ? sku.display_tags.split(",") : []).splice(0, 2);
})
})
this.setData({
info: res.data
})
var arr = []
res.data.product.forEach((item, index) => {
item.sku.forEach(itemB => {
itemB.proIndex = index
arr.push(itemB)
})
});
this.setData({
skuList: arr
})
util.pagePoint({
event: 'scene_view',
param: {
type: res.data.type,
id: res.data.id
}
}, 1)
this.BroswerRecord()
})
} }
console.log(res.data.product);
if (flag) {
return
}
// res.data.listimg = res.data.listimg?res.data.listimg.split(","):[]; // res.data.listimg = res.data.listimg?res.data.listimg.split(","):[];
res.data.product.map(product => { res.data.product.map(product => {
product.sku.map(sku => { product.sku.map(sku => {

2
pages/list/activitynew/index.js

@ -14,7 +14,7 @@ Page({
types: [null, 'show', 'exhibition', 'scene', 'movie', 'lecture', 'other'], types: [null, 'show', 'exhibition', 'scene', 'movie', 'lecture', 'other'],
weeks: [], weeks: [],
pageNo: 1, pageNo: 1,
sort: "", sort: "distance",
list: [], list: [],
date: null, date: null,
total: 1, total: 1,

24
pages/list/activitynew/index.wxml

@ -19,10 +19,6 @@
<image src="https://static.ticket.sz-trip.com/uploads/20230208/{{type==9?'b44d3101973581c7efe097df2119504d':'4bf0b55112e6607e62a6b3498757b86f'}}.png" mode="widthFix"></image> <image src="https://static.ticket.sz-trip.com/uploads/20230208/{{type==9?'b44d3101973581c7efe097df2119504d':'4bf0b55112e6607e62a6b3498757b86f'}}.png" mode="widthFix"></image>
<view style="{{type==9?'color: #0B898E':''}}">全部</view> <view style="{{type==9?'color: #0B898E':''}}">全部</view>
</view> </view>
<view class="type-item" bindtap="changeType" data-type="2">
<image src="https://static.ticket.sz-trip.com/xcxImages/activitynew/icon2{{type==2?'_active':''}}.png" mode="widthFix"></image>
<view style="{{type==2?'color:#C155E9':''}}">展览</view>
</view>
<view class="type-item" bindtap="changeType" data-type="3"> <view class="type-item" bindtap="changeType" data-type="3">
<image src="https://static.ticket.sz-trip.com/xcxImages/activitynew/icon3{{type==3?'_active':''}}.png" mode="widthFix"></image> <image src="https://static.ticket.sz-trip.com/xcxImages/activitynew/icon3{{type==3?'_active':''}}.png" mode="widthFix"></image>
<view style="{{type==3?'color:#358FE4':''}}">景区</view> <view style="{{type==3?'color:#358FE4':''}}">景区</view>
@ -31,14 +27,19 @@
<image src="https://static.ticket.sz-trip.com/xcxImages/activitynew/icon1{{type==1?'_active':''}}.png" mode="widthFix"></image> <image src="https://static.ticket.sz-trip.com/xcxImages/activitynew/icon1{{type==1?'_active':''}}.png" mode="widthFix"></image>
<view style="{{type==1?'color:#FFB423':''}}">演出</view> <view style="{{type==1?'color:#FFB423':''}}">演出</view>
</view> </view>
<!-- <view class="type-item" bindtap="changeType" data-type="5">
<image src="https://static.ticket.sz-trip.com/xcxImages/activitynew/icon5{{type==5?'_active':''}}.png" mode="widthFix"></image>
<view style="{{type==5?'color:#0B898E':''}}">讲座</view>
</view> -->
<view class="type-item" bindtap="changeType" data-type="4"> <view class="type-item" bindtap="changeType" data-type="4">
<image src="https://static.ticket.sz-trip.com/xcxImages/activitynew/icon4{{type==4?'_active':''}}.png" mode="widthFix"></image> <image src="https://static.ticket.sz-trip.com/xcxImages/activitynew/icon4{{type==4?'_active':''}}.png" mode="widthFix"></image>
<view style="{{type==4?'color:#63B71F':''}}">电影</view> <view style="{{type==4?'color:#63B71F':''}}">电影</view>
</view> </view>
<view class="type-item" bindtap="changeType" data-type="2">
<image src="https://static.ticket.sz-trip.com/xcxImages/activitynew/icon2{{type==2?'_active':''}}.png" mode="widthFix"></image>
<view style="{{type==2?'color:#C155E9':''}}">展览</view>
</view>
<!-- <view class="type-item" bindtap="changeType" data-type="5">
<image src="https://static.ticket.sz-trip.com/xcxImages/activitynew/icon5{{type==5?'_active':''}}.png" mode="widthFix"></image>
<view style="{{type==5?'color:#0B898E':''}}">讲座</view>
</view> -->
<view class="type-item" bindtap="changeType" data-type="6" style="margin-right:30rpx"> <view class="type-item" bindtap="changeType" data-type="6" style="margin-right:30rpx">
<image src="https://static.ticket.sz-trip.com/xcxImages/activitynew/icon6{{type==6?'_active':''}}.png" mode="widthFix"></image> <image src="https://static.ticket.sz-trip.com/xcxImages/activitynew/icon6{{type==6?'_active':''}}.png" mode="widthFix"></image>
<view style="{{type==6?'color:#54b9ed':''}}">其他</view> <view style="{{type==6?'color:#54b9ed':''}}">其他</view>
@ -95,15 +96,18 @@
<view wx:if="{{list.length>0 && type==4 && movieType!=2}}"> <view wx:if="{{list.length>0 && type==4 && movieType!=2}}">
<view bindtap="gotoDetail" data-item="{{item}}" class="activity-item activity-item-out" style="margin-top:0" wx:for="{{list}}"> <view bindtap="gotoDetail" data-item="{{item}}" class="activity-item activity-item-out" style="margin-top:0" wx:for="{{list}}">
<common-image width="180rpx" height='180rpx' src="{{item.headimg}}" mode="aspectFill"></common-image> <common-image width="180rpx" height='180rpx' src="{{item.headimg}}" mode="aspectFill"></common-image>
<view style="height:180rpx;margin:0;margin-left:20rpx;display:block" class="activity-info"> <view style="height:180rpx;margin:0;margin-left:20rpx;display:block;max-width:327rpx" class="activity-info">
<view class="activity-title textOver2" style="margin-bottom:20rpx">{{item.title}}</view> <view class="activity-title textOver2" style="margin-bottom:20rpx">{{item.title}}</view>
<view class="textOver" wx:if="{{item.director}}" style="margin-bottom:10rpx">导演:{{item.director}}</view> <view class="textOver" wx:if="{{item.director}}" style="margin-bottom:10rpx">导演:{{item.director}}</view>
<view class="textOver2" wx:if="{{item.leading_role}}">主演:{{item.leading_role}}</view> <view class="textOver2" wx:if="{{item.leading_role}}">主演:{{item.leading_role}}</view>
</view> </view>
<view class="btn">
{{movieType==1?'购买':'查看'}}
</view>
</view> </view>
</view> </view>
<view wx:if="{{list.length>0 && type==4 && movieType==2}}"> <view wx:if="{{list.length>0 && type==4 && movieType==2}}">
<view data-item="{{item}}" class="activity-item activity-item-out" style="margin-top:0;padding:10rpx 20rpx" wx:for="{{list}}"> <view bindtap="gotoDetail" data-item="{{item}}" class="activity-item activity-item-out" style="margin-top:0;padding:10rpx 20rpx" wx:for="{{list}}">
<view class="activity-info" style="height:160rpx;width:500rpx"> <view class="activity-info" style="height:160rpx;width:500rpx">
<view class="activity-title textOver2">{{item.title}}</view> <view class="activity-title textOver2">{{item.title}}</view>
<view class="textOver" wx:if="{{item.address}}">{{item.address}}</view> <view class="textOver" wx:if="{{item.address}}">{{item.address}}</view>

9
pages/list/activitynew/index.wxss

@ -290,4 +290,13 @@ background: rgba(11, 137, 142, .1);
.new-top-search-box { .new-top-search-box {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
}
.btn{
flex-shrink: 0;
color: #fff;
background: #f55;
font-size: 26rpx;
padding: 6rpx 20rpx;
border-radius: 40rpx;
margin-left: 10rpx;
} }

49
pages/list/movieticket/list/cinema/index.js

@ -1,4 +1,5 @@
// pages/list/movieticket/list/cinema/index.js // pages/list/movieticket/list/cinema/index.js
let app = getApp()
import commonApi from "../../../../../utils/https/common" import commonApi from "../../../../../utils/https/common"
import util from "../../../../../utils/util" import util from "../../../../../utils/util"
Page({ Page({
@ -13,7 +14,8 @@ Page({
dates:[], dates:[],
dateIndex:0, dateIndex:0,
list:[], list:[],
name:"" name:"",
invoiceId:null,
}, },
/** /**
@ -97,6 +99,49 @@ Page({
console.log(res) console.log(res)
}) })
}, },
selectMovieSeat(e){
let info = e.currentTarget.dataset.info
const areaInfo = JSON.parse(info.schedule_area).map(item => ({...item, price:item.areaPrice,areaId:item.seatAreaId}));
let planData = {
areaInfo,
fee:info.service_fee,
movieName: this.data.movie[this.data.currentNum].title,
planId : info.schedule_id,
planTime : info.show_time,
type:'WECHATXCX',
remake : ''
}
let show_id = info.show_id
let cinema_id = info.cinema_id
// let schedule_id = info.schedule_id
console.log(info);
commonApi._post('Cinema/getProductAndSku',{
show_id,
cinema_id,
}).then(res=>{
this.setData({
productInfo:res.data
})
app.globalData.product ={
product:this.data.productInfo,
info:{
hallName:info.hall_name,
cinemaName:this.data.name,
show_date:info.show_date,
show_time:info.show_time,
close_time:info.close_time,
movieName:this.data.movie[this.data.currentNum].title,
show_version:info.show_version,
selectSeatInfo:null,
schedule_id:info.schedule_id,
start_end_time:info.show_time
}
}
wx.navigateTo({
url:"/pages/list/movieticket/list/web/index?planData="+ JSON.stringify(planData),
})
})
},
onChange:function(e){ onChange:function(e){
console.log(e) console.log(e)
this.setData({ this.setData({
@ -140,7 +185,7 @@ Page({
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow: function () { onShow: function () {
console.log(123123123213);
}, },
/** /**

6
pages/list/movieticket/list/cinema/index.wxml

@ -16,7 +16,7 @@
<view class="dates-list"> <view class="dates-list">
<view class="date-item{{index==dateIndex?' active':''}}" bindtap="changeDate" data-index="{{index}}" wx:for="{{dates}}">{{item.name}}</view> <view class="date-item{{index==dateIndex?' active':''}}" bindtap="changeDate" data-index="{{index}}" wx:for="{{dates}}">{{item.name}}</view>
</view> </view>
<navigator url="../seats/index?show_id={{movie[currentNum].show_id}}&cinema_id={{id}}&schedule_id={{item.schedule_id}}" class="movie-item" wx:for="{{list}}"> <div class="movie-item" wx:for="{{list}}" data-info="{{item}}" bindtap="selectMovieSeat">
<view style="width:167rpx;flex-shrink:0"> <view style="width:167rpx;flex-shrink:0">
<view class="time">{{item.show_time}}</view> <view class="time">{{item.show_time}}</view>
<view>{{item.close_time}}散场</view> <view>{{item.close_time}}散场</view>
@ -25,11 +25,11 @@
<view class="type">{{item.show_version}}</view> <view class="type">{{item.show_version}}</view>
<view>{{item.hall_name}}</view> <view>{{item.hall_name}}</view>
</view> </view>
<view class="price"><text>¥</text>{{item.price/100}}</view> <view class="price"><text>¥</text>{{item.price}}<text style="font-size: 20rpx; color:#999 ;"> 起</text></view>
<view class="btn"> <view class="btn">
购票 购票
</view> </view>
</navigator> </div>
<view wx:if="{{list.length==0}}" class="common-empty" style="z-index:-1"> <view wx:if="{{list.length==0}}" class="common-empty" style="z-index:-1">
<image mode="widthFix" src="https://static.ticket.sz-trip.com/xcxImages/other/nodata.png"></image> <image mode="widthFix" src="https://static.ticket.sz-trip.com/xcxImages/other/nodata.png"></image>
<view>暂无内容</view> <view>暂无内容</view>

2
pages/list/movieticket/list/info/index.wxml

@ -25,5 +25,5 @@
</view> </view>
<view style="height:104rpx" wx:if="{{showFlag}}"></view> <view style="height:104rpx" wx:if="{{showFlag}}"></view>
<navigator wx:if="{{info && showFlag}}" url="../ticket/index?id={{info.third_id}}&title={{info.title}}" class="fixed-bottom"> <navigator wx:if="{{info && showFlag}}" url="../ticket/index?id={{info.third_id}}&title={{info.title}}" class="fixed-bottom">
<!-- <view class="order-btn">立即购票</view> --> <view class="order-btn">立即购票</view>
</navigator> </navigator>

1
pages/list/movieticket/list/info/index.wxss

@ -34,6 +34,7 @@
box-shadow: 0px 0px 20rpx 0px rgba(0, 0, 0, 0.06); box-shadow: 0px 0px 20rpx 0px rgba(0, 0, 0, 0.06);
border-radius: 27rpx 27rpx 0px 0px; border-radius: 27rpx 27rpx 0px 0px;
padding: 0 40rpx; padding: 0 40rpx;
padding-bottom: 60rpx;
} }
.content .title { .content .title {
font-size: 33rpx; font-size: 33rpx;

28
pages/list/movieticket/list/seats/index.js

@ -137,6 +137,7 @@ Page({
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad: function (options) { onLoad: function (options) {
console.log(options);
this.setData({ this.setData({
options:options options:options
}) })
@ -147,13 +148,16 @@ Page({
this.setData({ this.setData({
productInfo:res.data productInfo:res.data
}) })
wx.navigateTo({
url:"/pages/list/movieticket/list/web/index?planData="+options.planData,
})
}) })
let that = this; // let that = this;
let sys = wx.getSystemInfoSync() // let sys = wx.getSystemInfoSync()
that.setData({ // that.setData({
seatArea: sys.screenHeight - sys.statusBarHeight - (500 * sys.screenWidth / 750), // seatArea: sys.screenHeight - sys.statusBarHeight - (500 * sys.screenWidth / 750),
rpxToPx: sys.screenWidth / 750 // rpxToPx: sys.screenWidth / 750
}); // });
}, },
/** /**
@ -167,12 +171,12 @@ Page({
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow: function () { onShow: function () {
commonApi.user_post("Cinema/getLockSeatInfo",{ // commonApi.user_post("Cinema/getLockSeatInfo",{
schedule_id:this.data.options.schedule_id // schedule_id:this.data.options.schedule_id
}).then(res=>{ // }).then(res=>{
console.log(res) // console.log(res)
this.getInfo(); // this.getInfo();
}) // })
//---这此替换成自己的接口请求成功后--end-- //---这此替换成自己的接口请求成功后--end--

46
pages/list/movieticket/list/ticket/index.js

@ -1,4 +1,5 @@
// pages/list/movieticket/list/ticket/index.js // pages/list/movieticket/list/ticket/index.js
let app = getApp()
import commonApi from "../../../../../utils/https/common" import commonApi from "../../../../../utils/https/common"
import util from "../../../../../utils/util" import util from "../../../../../utils/util"
Page({ Page({
@ -159,7 +160,50 @@ Page({
console.log(res) console.log(res)
}) })
}, },
selectMovieSeat(e){
let info = e.currentTarget.dataset.info
let index = e.currentTarget.dataset.index
console.log(index);
console.log(info.schedules);
const areaInfo = JSON.parse(info.schedules[index].schedule_area).map(item => ({...item, price:item.areaPrice,areaId:item.seatAreaId}));
let planData = {
areaInfo,
fee:info.schedules[index].service_fee,
movieName: this.data.title,
planId : info.schedules[index].schedule_id,
planTime : info.schedules[index].show_time,
type:'WECHATXCX',
remake : ''
}
let show_id = info.schedules[index].show_id
let cinema_id = info.schedules[index].cinema_id
// let schedule_id = info.schedule_id
console.log(info);
commonApi._post('Cinema/getProductAndSku',{
show_id,
cinema_id,
}).then(res=>{
app.globalData.product ={
product:res.data,
info:{
hallName:info.schedules[index].hall_name,
cinemaName:info.title,
show_date:info.schedules[index].show_date,
show_time:info.schedules[index].show_time,
close_time:info.schedules[index].close_time,
movieName:this.data.title,
start_end_time:info.schedules[index].show_time,
show_version:info.schedules[index].show_version,
selectSeatInfo:null,
schedule_id:info.schedules[index].schedule_id
}
}
console.log(planData);
wx.navigateTo({
url:"/pages/list/movieticket/list/web/index?planData="+ JSON.stringify(planData),
})
})
},
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
*/ */

6
pages/list/movieticket/list/ticket/index.wxml

@ -32,11 +32,11 @@
<view class="ciname-distance" wx:if="{{item.distance}}">{{item.distanceText}}</view> <view class="ciname-distance" wx:if="{{item.distance}}">{{item.distanceText}}</view>
</view> </view>
<view class="tickets-list"> <view class="tickets-list">
<navigator url="../seats/index?schedule_id={{schedule.schedule_id}}&show_id={{schedule.show_id}}&cinema_id={{schedule.cinema_id}}" class="ticket-item" catchtap="pagePoint" data-event="movie_detail_click" wx:for="{{item.schedules}}" wx:for-item="schedule"> <view data-info="{{item}}" data-index="{{indexY}}" wx:for-index="indexY" class="ticket-item" data-event="movie_detail_click" wx:for="{{item.schedules}}" wx:for-item="schedule" bindtap="selectMovieSeat">
<view style="color:#000;font-size:33rpx">{{schedule.show_time}}</view> <view style="color:#000;font-size:33rpx">{{schedule.show_time}}</view>
<view style="margin:10rpx 0">{{schedule.show_version}}</view> <view style="margin:10rpx 0">{{schedule.show_version}}</view>
<view style="color:#D62828">¥{{schedule.price/100}}</view> <view style="color:#D62828">¥{{schedule.price}}</view>
</navigator> </view>
</view> </view>
</view> </view>
<view wx:if="{{list.length==0}}" class="common-empty" style="z-index:-1"> <view wx:if="{{list.length==0}}" class="common-empty" style="z-index:-1">

79
pages/list/movieticket/list/web/index.js

@ -0,0 +1,79 @@
// pages/pbService/web/index.js
let app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
webUrl:""
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.setData({
webUrl:'https://online.suiyuaninfo.com/?planData='+options.planData
})
console.log(this.data.webUrl);
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
handleGetMessage: function(e) {
console.log(e.target.data)
console.log(app.globalData.product);
return
app.globalData.product ={
product:this.data.productInfo,
info:{
hallName:this.data.hallName,
show_date:this.data.show_date,
start_end_time:this.data.start_end_time,
cinema_title:this.data.cinema_title,
movieName:this.data.movieName,
show_version:this.data.show_version,
selectSeatInfo:selectSeatInfo,
schedule_id:this.data.schedule_id
}
}
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
}
})

3
pages/list/movieticket/list/web/index.json

@ -0,0 +1,3 @@
{
"usingComponents": {}
}

4
pages/list/movieticket/list/web/index.wxml

@ -0,0 +1,4 @@
<!--pages/pbService/web/index.wxml-->
<view wx:if="{{webUrl}}">
<web-view bindmessage="handleGetMessage" src="{{webUrl}}"></web-view>
</view>

1
pages/list/movieticket/list/web/index.wxss

@ -0,0 +1 @@
/* pages/pbService/web/index.wxss */

1
pages/list/museum/index.wxss

@ -55,6 +55,7 @@ page {
} }
.info .address { .info .address {
margin-bottom: 15rpx; margin-bottom: 15rpx;
max-width: 320rpx;
} }
.info .com-flex { .info .com-flex {
width: 240rpx; width: 240rpx;

2
pages/list/techan/index.wxml

@ -17,7 +17,7 @@
<view class="supplier-tags"> <view class="supplier-tags">
<view class="supplier-tag textOver" wx:for="{{item.display_tags}}">{{item}}</view> <view class="supplier-tag textOver" wx:for="{{item.display_tags}}">{{item}}</view>
</view> </view>
<view class="supplier-address supplier-tags"><text class="iconfont icon-location"></text>{{item.address}}</view> <view class="supplier-address supplier-tags"><text class="iconfont icon-location"></text><text class="textOver">{{item.address}}</text></view>
</view> </view>
<view class="supplier-price"><text>¥</text><text>{{(item.start_price/100)}}</text><text>起</text></view> <view class="supplier-price"><text>¥</text><text>{{(item.start_price/100)}}</text><text>起</text></view>
</view> </view>

2
pages/order/coupon/index.js

@ -71,7 +71,7 @@ Page({
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow: function () { onShow: function () {
app.globalData.couponInfo = null;
}, },
/** /**

2
pages/order/coupon/index.wxml

@ -5,7 +5,7 @@
<view class="money">{{item.activity.money/100}}</view> <view class="money">{{item.activity.money/100}}</view>
<view class="coupon-info"> <view class="coupon-info">
<view>满{{item.activity.mini_money/100}}元可用</view> <view>满{{item.activity.mini_money/100}}元可用</view>
<view class="couon-date">{{item.activity.end_time}}到期</view> <view class="couon-date" wx:if="{{item.end_time}}">{{item.end_time}}到期</view>
</view> </view>
<view class="iconfont icon-{{item.selected?'gou':'quan'}}" bindtap="selectIt" data-index="{{index}}"></view> <view class="iconfont icon-{{item.selected?'gou':'quan'}}" bindtap="selectIt" data-index="{{index}}"></view>
</view> </view>

2
pages/order/hotel/index.wxml

@ -68,7 +68,7 @@
</view> </view>
</view> </view>
</view> </view>
<!-- <coupon id="coupon" money="{{CtripHotelCart.price_sum * (numberIndex+1)}}" sku="{{CtripHotelCart.id}}"></coupon> --> <coupon id="coupon" money="{{CtripHotelCart.price_sum * (numberIndex+1)}}" sku="{{CtripHotelCart.id}}"></coupon>
<!-- 支付按钮 --> <!-- 支付按钮 -->
<view style="height:{{100 }}rpx"></view> <view style="height:{{100 }}rpx"></view>
<view class="fixed-bottom"> <view class="fixed-bottom">

54
pages/order/movie/index.js

@ -14,29 +14,27 @@ Page({
product:null, product:null,
price:0, price:0,
coupon:null, coupon:null,
prizeId:null prizeId:null,
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad: function (options) { onLoad: function (options) {
let key = options.key; console.log(options);
if(!key){
util.back()
return;
}
this.setData({ this.setData({
prizeId:wx.getStorageSync('prizeId') prizeId:wx.getStorageSync('prizeId')
}) })
let product = app.globalData.product,price=0; let product = app.globalData.product,price=0;
product.info.selectSeatInfo.map(item=>{ product.info.selectSeatInfo = JSON.parse(options.selectSeatInfo)
price = Number(item.price) + Number(price) product.info.selectSeatInfo.seatPriceInfo.map(item=>{
}) price =price +Math.ceil(Number(item.split('-')[1])*1.006 * 100) / 100
})
console.log(product);
console.log(price);
this.setData({ this.setData({
product:product, product:product,
key:key, price:price*100
price:price
}) })
userApi.user_post("user/getMyInfo").then(res=>{ userApi.user_post("user/getMyInfo").then(res=>{
this.setData({ this.setData({
@ -63,30 +61,30 @@ Page({
}) })
return; return;
} }
let product = this.data.product,seats_list=[],seats_ids=[]; let product = this.data.product
product.info.selectSeatInfo.map(item=>{ // product.info.selectSeatInfo.map(item=>{
seats_list.push(item.name); // seats_list.push(item.name);
seats_ids.push({ // seats_ids.push({
ext_id:item.ext_id, // ext_id:item.ext_id,
area:item.area || "", // area:item.area || "",
flag:Number(item.flag) // flag:Number(item.flag)
}) // })
}) // })
let product_list = [{ let product_list = [{
"type" : "movie",//电影,必填 "type" : "movie",//电影,必填
"product_id": product.product.id, "product_id": product.product.id,
"sku_id": product.product.sku_info.id, "sku_id": product.product.sku_info.id,
"product_num": product.info.selectSeatInfo.length,//也就是锁定的座位数,必填 "product_num": product.info.selectSeatInfo.seatInfo.length,//也就是锁定的座位数,必填
"reserve_mobile": this.data.tel, "reserve_mobile": this.data.tel,
"use_date": product.info.show_date,//使用日期,Y-m-d日期格式字符串,必填 "use_date": product.info.show_date,//使用日期,Y-m-d日期格式字符串,必填
"use_time": product.info.start_end_time,//场次时间,直接传字符串,必填 "use_time": product.info.show_time+'-'+product.info.close_time,//场次时间,直接传字符串,必填
"show_version": product.info.show_version,//场次版本,必填 "show_version": product.info.show_version,//场次版本,必填
"scene_id": product.product.scene_id,//场景id,我方系统的场景id,必填 "scene_id": product.product.scene_id,//场景id,我方系统的场景id,必填
"schedules_name": product.info.hallName,//放映厅名称,必填 "schedules_name": product.info.hallName,//放映厅名称,必填
"seats_list": seats_list.join(","),//座位中文名称,多个座位逗号分隔,必填 "seats_list": product.info.selectSeatInfo.seatInfo.join(","),//座位中文名称,多个座位逗号分隔,必填
"key": this.data.key,//锁座返回的key,必填 // "key": this.data.key,//锁座返回的key,必填
"schedules_id": product.info.schedule_id,//淘票票场次id,必填 "schedules_id": product.info.schedule_id,//淘票票场次id,必填
"seats_ids": seats_ids "seats_ids": product.info.selectSeatInfo.seatPriceInfo
}]; }];
let data = { let data = {
product_list:product_list, product_list:product_list,
@ -110,6 +108,7 @@ Page({
data:JSON.stringify(data) data:JSON.stringify(data)
}).then(res=>{ }).then(res=>{
console.log(res) console.log(res)
}) })
}, },
@ -120,13 +119,14 @@ Page({
this.setData({ this.setData({
coupon:app.globalData.couponInfo coupon:app.globalData.couponInfo
}) })
console.log(this.coupon);
}, },
/** /**
* 生命周期函数--监听页面隐藏 * 生命周期函数--监听页面隐藏
*/ */
onHide: function () { onHide: function () {
app.globalData.couponInfo = null
}, },
/** /**

7
pages/order/movie/index.wxml

@ -5,9 +5,10 @@
<image src="{{product.product.headimg}}" mode="aspectFill"></image> <image src="{{product.product.headimg}}" mode="aspectFill"></image>
<view class="info"> <view class="info">
<view class="title">{{product.info.movieName}}</view> <view class="title">{{product.info.movieName}}</view>
<view>{{product.info.show_date}} {{product.info.start_end_time}}{{product.info.show_version}}</view> <view>{{product.info.show_date}} {{product.info.show_time}}-{{product.info.close_time}} {{'('+product.info.show_version+')'}}</view>
<view>{{product.info.cinema_title}}</view> <!-- <view>{{product.info.cinema_title}}</view> -->
<view>{{product.info.hallName}} <text wx:for="{{product.info.selectSeatInfo}}">{{item.name}}</text></view> <view>{{product.info.cinemaName}}</view>
<view>{{product.info.hallName}} <text wx:if="{{product.info.selectSeatInfo}}">{{product.info.selectSeatInfo.seatInfo}}</text></view>
</view> </view>
</view> </view>
<view class="tel-box"> <view class="tel-box">

1
pages/order/movie/index.wxss

@ -34,7 +34,6 @@ page {
font-size: 35rpx; font-size: 35rpx;
color: #000; color: #000;
font-weight: 500; font-weight: 500;
margin-bottom: 20rpx;
} }
.tel-box { .tel-box {
display: flex; display: flex;

3
pages/order/orderList/index.js

@ -21,6 +21,7 @@ Page({
select_allowance: false, select_allowance: false,
allowance_data: null, allowance_data: null,
allowance_price: 0, allowance_price: 0,
flag:null
}, },
/** /**
@ -32,7 +33,9 @@ Page({
ticketList: app.globalData.list, ticketList: app.globalData.list,
kjId: app.globalData.kjId, kjId: app.globalData.kjId,
gp_id: app.globalData.gp_id || app.globalData.team_id, gp_id: app.globalData.gp_id || app.globalData.team_id,
flag:options.flag
}) })
console.log(this.data.flag);
console.log(app.globalData); console.log(app.globalData);
let price = 0, sku_id = [] ,postFee= 0; let price = 0, sku_id = [] ,postFee= 0;
app.globalData.postProduct.map(item => { app.globalData.postProduct.map(item => {

2
pages/order/orderList/index.wxml

@ -52,7 +52,7 @@
<view style="flex-shrink:0">订单备注:</view> <view style="flex-shrink:0">订单备注:</view>
<input type="text" bindinput="inputRemark" data-index="{{index}}" placeholder="选填"></input> <input type="text" bindinput="inputRemark" data-index="{{index}}" placeholder="选填"></input>
</view> </view>
<coupon id="coupon" wx:if="{{!kjId && !gp_id && flag!='mix'}}" money="{{showPrice + postFee}}" sku="{{sku_id}}"></coupon> <coupon id="coupon" wx:if="{{!kjId && !gp_id}}" money="{{showPrice + postFee}}" sku="{{sku_id}}"></coupon>
<view class="fixed-bottom"> <view class="fixed-bottom">
<view class="fixed-price-box"> <view class="fixed-price-box">

50
pages/order/pay/index.js

@ -13,8 +13,11 @@ Page({
second:"00", second:"00",
minute:"00", minute:"00",
payIndex:-1, payIndex:-1,
numIndex: 0, numIndex:0,
showNumMask: false showNumMask: false,
activePay:false,//是否活动支付
SUBWALLET:false,
wxPay:false
}, },
/** /**
@ -85,9 +88,24 @@ Page({
else { else {
util.back() util.back()
} }
this.setData({ if (Object.keys(res.data.coupon_activity).length != 0) {
info:res.data this.setData({
}) info:res.data,
activePay: Object.keys(res.data.coupon_activity).length === 0 ?false:true,
SUBWALLET:res.data.coupon_activity.pay_type.includes('SUBWALLET') || !res.data.coupon_activity.pay_type,
wxPay:res.data.coupon_activity.pay_type.includes('WEIXIN') || !res.data.coupon_activity.pay_type,
payIndex:Object.keys(res.data.coupon_activity).length === 0 ?-1:0,
})
console.log(this.data.wxPay);
}else{
this.setData({
info:res.data,
})
}
console.log(this.data.ERMB);
}) })
this.checkPay(); this.checkPay();
@ -111,6 +129,28 @@ Page({
}) })
}, },
pay:function(){ pay:function(){
if (this.data.activePay) {
let flag = false
if (this.data.payList.length!=0 && !this.data.info.coupon_activity.pay_type.includes('SUBWALLET')) {
flag = true
}
if (this.data.activePay && flag && !this.data.wxPay) {
wx.showToast({
title: '暂无支付方式请前往其它端付款',
icon:'none'
})
return
}
console.log(this.data.payIndex);
if (this.data.payIndex===0) {
wx.showToast({
title: '请选择支付方式',
icon:'none'
})
return
}
}
let _this = this; let _this = this;
if(this.data.payIndex==1) { if(this.data.payIndex==1) {
this.setData({ this.setData({

20
pages/order/pay/index.wxml

@ -8,7 +8,25 @@
<view class="price">¥{{info.paid_money/100}}</view> <view class="price">¥{{info.paid_money/100}}</view>
</view> </view>
</view> </view>
<view class="pay-methods-box"> <view class="pay-methods-box" wx:if="{{activePay}}">
<view>支付方式:</view>
<view class="pay-method" bindtap="changePayMethod" data-index="-1" wx:if="{{wxPay}}">
<view class="iconfont icon-weixin1"></view>
<view class="method-name">微信支付</view>
<view class="iconfont {{payIndex==-1?'icon-iconfontoptionbutton':'icon-quan'}}"></view>
</view>
<view class="pay-method" wx:if="{{payList.length>0 && SUBWALLET}}" style="border-top:1rpx solid #ccc" bindtap="changePayMethod" data-index="1">
<image src="https://test.m.cloud.sz-trip.com/static/images/numLogo.png" mode="aspectFill"></image>
<view class="method-name">数字人民币</view>
<view class="iconfont {{payIndex==1?'icon-iconfontoptionbutton':'icon-quan'}}"></view>
</view>
<view class="pay-method" wx:else style="border-top:1rpx solid #ccc" data-index="1">
<image src="https://static.ticket.sz-trip.com/xcxImages/numLogo.png" mode="aspectFill"></image>
<view class="red-num">君到苏州现已支持数字人民币支付,请至数字人民币app中绑定授权</view>
</view>
</view>
<view class="pay-methods-box" wx:if="{{!activePay}}">
<view>支付方式:</view> <view>支付方式:</view>
<view class="pay-method" bindtap="changePayMethod" data-index="-1"> <view class="pay-method" bindtap="changePayMethod" data-index="-1">
<view class="iconfont icon-weixin1"></view> <view class="iconfont icon-weixin1"></view>

6
pages/order/postOrder/index.js

@ -22,6 +22,7 @@ Page({
allowance_price: 0, allowance_price: 0,
showAllowance: false, showAllowance: false,
flag:null, flag:null,
isCar:'single'
}, },
/** /**
@ -33,7 +34,8 @@ Page({
kjId: app.globalData.kjId, kjId: app.globalData.kjId,
gp_id: app.globalData.gp_id || app.globalData.team_id, gp_id: app.globalData.gp_id || app.globalData.team_id,
prizeId: wx.getStorageSync('prizeId'), prizeId: wx.getStorageSync('prizeId'),
flag:options.flag flag:options.flag,
isCar:options.isCar
}) })
let price = 0, sku_id = []; let price = 0, sku_id = [];
app.globalData.postProduct.map(item => { app.globalData.postProduct.map(item => {
@ -191,7 +193,7 @@ Page({
app.globalData.product = app.globalData.list[0] app.globalData.product = app.globalData.list[0]
} }
wx.redirectTo({ wx.redirectTo({
url: '/pages/order/scene/index?flag='+this.data.flag, url: '/pages/order/scene/index?flag='+this.data.flag+'&isCar='+this.data.isCar,
}) })
} }
}, },

16
pages/order/scene/index.js

@ -28,15 +28,16 @@ Page({
allowance_price: 0, allowance_price: 0,
pIndex: 0, pIndex: 0,
flag:null, flag:null,
ticket_type:1 ticket_type:1,
isCar:'single'
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad: function (options) { onLoad: function (options) {
console.log(app.globalData.product); console.log(app.globalData.product);
console.log(this.data.date); console.log(options.isCar);
this.setData({ this.setData({
product: app.globalData.product, product: app.globalData.product,
type: options.type, type: options.type,
@ -45,8 +46,9 @@ Page({
prizeId: wx.getStorageSync('prizeId'), prizeId: wx.getStorageSync('prizeId'),
flag:options.flag, flag:options.flag,
date:null, date:null,
ticket_type:app.globalData.product.sku.ticket_type || 1 ticket_type:app.globalData.product.sku.ticket_type || 1,
}) isCar:options.isCar
})
if (!app.globalData.product) { if (!app.globalData.product) {
util.back(); util.back();
return; return;
@ -285,7 +287,7 @@ Page({
app.globalData.index = app.globalData.index + 1 app.globalData.index = app.globalData.index + 1
app.globalData.product = app.globalData.list[app.globalData.index] app.globalData.product = app.globalData.list[app.globalData.index]
wx.redirectTo({ wx.redirectTo({
url: '/pages/order/scene/index?flag='+ this.data.flag, url: '/pages/order/scene/index?flag='+ this.data.flag+'&isCar='+this.data.isCar,
}) })
return return
}else{ }else{
@ -294,7 +296,7 @@ Page({
app.globalData.createDate.product_list.push(data.product_list[0]) app.globalData.createDate.product_list.push(data.product_list[0])
} }
wx.redirectTo({ wx.redirectTo({
url: '/pages/order/orderList/index' url: '/pages/order/orderList/index?flag='+ this.data.flag
}) })
}else{ }else{
commonApi.user_post(service, postData).then(res => { commonApi.user_post(service, postData).then(res => {

4
pages/order/scene/index.wxml

@ -34,8 +34,10 @@
</view> </view>
</view> </view>
</view> </view>
<coupon wx:if="{{!kjId && !gp_id && type!='activity' && product && product.isGroup!=1 && flag!='mix'}}" id="coupon"
<coupon wx:if="{{!kjId && !gp_id && type!='activity' && product && product.isGroup!=1 && isCar=='single'}}" id="coupon"
money="{{singlePrice * productNum}}" sku="{{product.sku.id}}"></coupon> money="{{singlePrice * productNum}}" sku="{{product.sku.id}}"></coupon>
<view class="box" wx:if="{{type!='activity' && product && product.isGroup!=1}}"> <view class="box" wx:if="{{type!='activity' && product && product.isGroup!=1}}">
<view class="box-title" wx:if="{{flag!='mix'}}"> <view class="box-title" wx:if="{{flag!='mix'}}">
<view style="flex-shrink:0">订单备注</view> <view style="flex-shrink:0">订单备注</view>

1
pages/pbService/web/index.js

@ -51,7 +51,6 @@ Page({
}) })
} }
}, },
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
*/ */

20
pages/user/cartlist/list.js

@ -20,7 +20,8 @@ Page({
allPrice: 0, allPrice: 0,
productType: '', productType: '',
manageFlag: false, manageFlag: false,
flag: false, //判断订单是否同时有商品和票 flag: false, //判断订单是否同时有商品和票
isCar:'single',//判断是否购物车
}, },
/** /**
@ -175,9 +176,20 @@ Page({
} }
if (product.length > 0 && product1.length > 0) { if (product.length > 0 && product1.length > 0) {
this.setData({ this.setData({
flag: 'mix' flag: 'mix',
isCar:'multiple'
}) })
} }
if ( product1.length > 1) {
this.setData({
isCar:'multiple'
})
}else{
this.setData({
isCar:'single'
})
}
console.log(product1);
app.globalData.postProduct = product; app.globalData.postProduct = product;
if (app.globalData.list) { if (app.globalData.list) {
app.globalData.product = app.globalData.list[app.globalData.index] app.globalData.product = app.globalData.list[app.globalData.index]
@ -189,7 +201,7 @@ Page({
}) })
} else { } else {
wx.navigateTo({ wx.navigateTo({
url: '/pages/order/scene/index', url: '/pages/order/scene/index?isCar=' + this.data.isCar,
}) })
} }
}, },

2
pages/user/coupon/index.wxml

@ -12,7 +12,7 @@
<view class="coupon-money">¥<text>{{item.activity.money/100}}</text></view> <view class="coupon-money">¥<text>{{item.activity.money/100}}</text></view>
</view> </view>
<view class="coupon-tip"><text>使用条件:</text>满{{item.activity.mini_money/100}}元</view> <view class="coupon-tip"><text>使用条件:</text>满{{item.activity.mini_money/100}}元</view>
<view class="coupon-tip"><text>有效期:</text>{{item.activity.end_time}}</view> <view class="coupon-tip"><text>有效期:</text>{{item.end_time}}</view>
<view class="coupon-tip"><text>优惠码:</text>{{item.key}}</view> <view class="coupon-tip"><text>优惠码:</text>{{item.key}}</view>
<view class="coupon-rule"> <view class="coupon-rule">
<view bindtap="showRule" data-item="{{item}}">使用规则 <text class="iconfont icon-xia"></text></view> <view bindtap="showRule" data-item="{{item}}">使用规则 <text class="iconfont icon-xia"></text></view>

Loading…
Cancel
Save