diff --git a/app.js b/app.js index c95d57e..81893c1 100644 --- a/app.js +++ b/app.js @@ -21,7 +21,7 @@ App({ unique_key: "wechatxcx" }).then(res => { let data = JSON.parse(res.data); - data.isTest = data.isTest72? true : false; + data.isTest = data.isTest73? true : false; this.globalData.configJson = data }).then(() => { // 获取ui配置文件 diff --git a/app.json b/app.json index 23d26ac..7de07ea 100644 --- a/app.json +++ b/app.json @@ -104,6 +104,7 @@ "pages/list/movieticket/list/seats/index", "pages/list/movieticket/list/cinema/index", "pages/list/movieticket/list/ticket/index", + "pages/list/movieticket/list/web/index", "pages/list/movieticket/list/info/index", "pages/list/theatre/index", "pages/list/card/index", diff --git a/pages/list/activitynew/index.js b/pages/list/activitynew/index.js index acb4921..604547e 100644 --- a/pages/list/activitynew/index.js +++ b/pages/list/activitynew/index.js @@ -335,6 +335,7 @@ Page({ url: '/pages/list/movieticket/list/info/index?id=' + item.third_id }) } else if (this.data.type == 4) { + return wx.navigateTo({ url: '/pages/list/movieticket/list/cinema/index?id=' + item.third_id }) diff --git a/pages/list/activitynew/index.wxml b/pages/list/activitynew/index.wxml index 9cb8dee..6cc988f 100644 --- a/pages/list/activitynew/index.wxml +++ b/pages/list/activitynew/index.wxml @@ -19,10 +19,6 @@ 全部 - - - 展览 - 景区 @@ -31,14 +27,19 @@ 演出 - 电影 + + + 展览 + + + 其他 @@ -106,7 +107,7 @@ - + {{item.title}} {{item.address}} diff --git a/pages/list/movieticket/list/cinema/index.js b/pages/list/movieticket/list/cinema/index.js index 072bcb5..c84d836 100644 --- a/pages/list/movieticket/list/cinema/index.js +++ b/pages/list/movieticket/list/cinema/index.js @@ -1,4 +1,5 @@ // pages/list/movieticket/list/cinema/index.js +let app = getApp() import commonApi from "../../../../../utils/https/common" import util from "../../../../../utils/util" Page({ @@ -13,7 +14,8 @@ Page({ dates:[], dateIndex:0, list:[], - name:"" + name:"", + invoiceId:null, }, /** @@ -97,6 +99,49 @@ Page({ 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 + + commonApi._post('Cinema/getProductAndSku',{ + show_id, + cinema_id, + }).then(res=>{ + this.setData({ + productInfo:res.data + }) + app.globalData.product ={ + product:this.data.productInfo, + info:{ + hallName:this.data.name, + show_date:info.show_date, + start_end_time:info.show_time, + movieName:this.data.movie[this.data.currentNum].title, + show_version:info.show_version, + selectSeatInfo:null, + schedule_id:info.schedule_id + } + } + wx.navigateTo({ + url:"/pages/list/movieticket/list/web/index?planData="+ JSON.stringify(planData), + }) + }) + // wx.navigateTo({ + // url: '/pages/list/movieticket/list/seats/index?show_id='+show_id+'&cinema_id='+cinema_id+'&schedule_id='+schedule_id+'&planData='+JSON.stringify(planData), + // }) + }, onChange:function(e){ console.log(e) this.setData({ @@ -140,7 +185,7 @@ Page({ * 生命周期函数--监听页面显示 */ onShow: function () { - + console.log(123123123213); }, /** diff --git a/pages/list/movieticket/list/cinema/index.wxml b/pages/list/movieticket/list/cinema/index.wxml index 8c03f56..a1a90d9 100644 --- a/pages/list/movieticket/list/cinema/index.wxml +++ b/pages/list/movieticket/list/cinema/index.wxml @@ -16,7 +16,7 @@ {{item.name}} - +
{{item.show_time}} {{item.close_time}}散场 @@ -25,11 +25,11 @@ {{item.show_version}} {{item.hall_name}} - {{item.price/100}} + {{item.price}} 购票 - +
暂无内容 diff --git a/pages/list/movieticket/list/seats/index.js b/pages/list/movieticket/list/seats/index.js index a44f10f..6e885ba 100644 --- a/pages/list/movieticket/list/seats/index.js +++ b/pages/list/movieticket/list/seats/index.js @@ -137,6 +137,7 @@ Page({ * 生命周期函数--监听页面加载 */ onLoad: function (options) { + console.log(options); this.setData({ options:options }) @@ -147,13 +148,16 @@ Page({ this.setData({ productInfo:res.data }) + wx.navigateTo({ + url:"/pages/list/movieticket/list/web/index?planData="+options.planData, + }) }) - let that = this; - let sys = wx.getSystemInfoSync() - that.setData({ - seatArea: sys.screenHeight - sys.statusBarHeight - (500 * sys.screenWidth / 750), - rpxToPx: sys.screenWidth / 750 - }); + // let that = this; + // let sys = wx.getSystemInfoSync() + // that.setData({ + // seatArea: sys.screenHeight - sys.statusBarHeight - (500 * sys.screenWidth / 750), + // rpxToPx: sys.screenWidth / 750 + // }); }, /** @@ -167,12 +171,12 @@ Page({ * 生命周期函数--监听页面显示 */ onShow: function () { - commonApi.user_post("Cinema/getLockSeatInfo",{ - schedule_id:this.data.options.schedule_id - }).then(res=>{ - console.log(res) - this.getInfo(); - }) + // commonApi.user_post("Cinema/getLockSeatInfo",{ + // schedule_id:this.data.options.schedule_id + // }).then(res=>{ + // console.log(res) + // this.getInfo(); + // }) //---这此替换成自己的接口请求成功后--end-- diff --git a/pages/list/movieticket/list/web/index.js b/pages/list/movieticket/list/web/index.js new file mode 100644 index 0000000..0dcf23c --- /dev/null +++ b/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 () { + + } +}) \ No newline at end of file diff --git a/pages/list/movieticket/list/web/index.json b/pages/list/movieticket/list/web/index.json new file mode 100644 index 0000000..8835af0 --- /dev/null +++ b/pages/list/movieticket/list/web/index.json @@ -0,0 +1,3 @@ +{ + "usingComponents": {} +} \ No newline at end of file diff --git a/pages/list/movieticket/list/web/index.wxml b/pages/list/movieticket/list/web/index.wxml new file mode 100644 index 0000000..5d9fd35 --- /dev/null +++ b/pages/list/movieticket/list/web/index.wxml @@ -0,0 +1,4 @@ + + + + diff --git a/pages/list/movieticket/list/web/index.wxss b/pages/list/movieticket/list/web/index.wxss new file mode 100644 index 0000000..3d9e18a --- /dev/null +++ b/pages/list/movieticket/list/web/index.wxss @@ -0,0 +1 @@ +/* pages/pbService/web/index.wxss */ \ No newline at end of file diff --git a/pages/list/techan/index.wxml b/pages/list/techan/index.wxml index 9d8e3df..5ba68e6 100644 --- a/pages/list/techan/index.wxml +++ b/pages/list/techan/index.wxml @@ -17,7 +17,7 @@ {{item}} - {{item.address}} + {{item.address}} {{(item.start_price/100)}}
diff --git a/pages/order/coupon/index.js b/pages/order/coupon/index.js index ac70388..1b7c0c3 100644 --- a/pages/order/coupon/index.js +++ b/pages/order/coupon/index.js @@ -71,7 +71,7 @@ Page({ * 生命周期函数--监听页面显示 */ onShow: function () { - + app.globalData.couponInfo = null; }, /** diff --git a/pages/order/hotel/index.wxml b/pages/order/hotel/index.wxml index 694fdbd..f59a916 100644 --- a/pages/order/hotel/index.wxml +++ b/pages/order/hotel/index.wxml @@ -68,7 +68,7 @@
- + diff --git a/pages/order/movie/index.js b/pages/order/movie/index.js index 21a32fc..f33494f 100644 --- a/pages/order/movie/index.js +++ b/pages/order/movie/index.js @@ -21,22 +21,19 @@ Page({ * 生命周期函数--监听页面加载 */ onLoad: function (options) { - let key = options.key; - if(!key){ - util.back() - return; - } + console.log(options.selectSeatInfo); this.setData({ prizeId:wx.getStorageSync('prizeId') }) let product = app.globalData.product,price=0; - product.info.selectSeatInfo.map(item=>{ - price = Number(item.price) + Number(price) + product.info.selectSeatInfo = JSON.parse(options.selectSeatInfo) + product.info.selectSeatInfo.seatPriceInfo.map(item=>{ + price =price + Number(item.split('-')[1]) }) + console.log(price); this.setData({ product:product, - key:key, - price:price + price:price*100 }) userApi.user_post("user/getMyInfo").then(res=>{ this.setData({ @@ -63,30 +60,30 @@ Page({ }) return; } - let product = this.data.product,seats_list=[],seats_ids=[]; - product.info.selectSeatInfo.map(item=>{ - seats_list.push(item.name); - seats_ids.push({ - ext_id:item.ext_id, - area:item.area || "", - flag:Number(item.flag) - }) - }) + let product = this.data.product + // product.info.selectSeatInfo.map(item=>{ + // seats_list.push(item.name); + // seats_ids.push({ + // ext_id:item.ext_id, + // area:item.area || "", + // flag:Number(item.flag) + // }) + // }) let product_list = [{ "type" : "movie",//电影,必填 "product_id": product.product.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, "use_date": product.info.show_date,//使用日期,Y-m-d日期格式字符串,必填 "use_time": product.info.start_end_time,//场次时间,直接传字符串,必填 "show_version": product.info.show_version,//场次版本,必填 "scene_id": product.product.scene_id,//场景id,我方系统的场景id,必填 "schedules_name": product.info.hallName,//放映厅名称,必填 - "seats_list": seats_list.join(","),//座位中文名称,多个座位逗号分隔,必填 - "key": this.data.key,//锁座返回的key,必填 + "seats_list": product.info.selectSeatInfo.seatInfo.join(","),//座位中文名称,多个座位逗号分隔,必填 + // "key": this.data.key,//锁座返回的key,必填 "schedules_id": product.info.schedule_id,//淘票票场次id,必填 - "seats_ids": seats_ids + "seats_ids": product.info.selectSeatInfo.seatPriceInfo }]; let data = { product_list:product_list, @@ -110,6 +107,7 @@ Page({ data:JSON.stringify(data) }).then(res=>{ console.log(res) + }) }, @@ -120,13 +118,14 @@ Page({ this.setData({ coupon:app.globalData.couponInfo }) + console.log(this.coupon); }, /** * 生命周期函数--监听页面隐藏 */ onHide: function () { - + app.globalData.couponInfo = null }, /** diff --git a/pages/order/orderList/index.js b/pages/order/orderList/index.js index 16f787c..220d57c 100644 --- a/pages/order/orderList/index.js +++ b/pages/order/orderList/index.js @@ -21,6 +21,7 @@ Page({ select_allowance: false, allowance_data: null, allowance_price: 0, + flag:null }, /** @@ -32,7 +33,9 @@ Page({ ticketList: app.globalData.list, kjId: app.globalData.kjId, gp_id: app.globalData.gp_id || app.globalData.team_id, + flag:options.flag }) + console.log(this.data.flag); console.log(app.globalData); let price = 0, sku_id = [] ,postFee= 0; app.globalData.postProduct.map(item => { diff --git a/pages/order/pay/index.js b/pages/order/pay/index.js index c99612d..7481d63 100644 --- a/pages/order/pay/index.js +++ b/pages/order/pay/index.js @@ -13,8 +13,11 @@ Page({ second:"00", minute:"00", payIndex:-1, - numIndex: 0, - showNumMask: false + numIndex:0, + showNumMask: false, + activePay:false,//是否活动支付 + SUBWALLET:false, + wxPay:false }, /** @@ -85,9 +88,24 @@ Page({ else { util.back() } - this.setData({ - info:res.data - }) + if (Object.keys(res.data.coupon_activity).length != 0) { + 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(); @@ -111,6 +129,28 @@ Page({ }) }, 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; if(this.data.payIndex==1) { this.setData({ diff --git a/pages/order/pay/index.wxml b/pages/order/pay/index.wxml index 44d2fb9..834cbb6 100644 --- a/pages/order/pay/index.wxml +++ b/pages/order/pay/index.wxml @@ -8,7 +8,25 @@ ¥{{info.paid_money/100}} - + + 支付方式: + + + 微信支付 + + + + + 数字人民币 + + + + + 君到苏州现已支持数字人民币支付,请至数字人民币app中绑定授权 + + + + 支付方式: diff --git a/pages/order/scene/index.js b/pages/order/scene/index.js index 2e38932..64ce73a 100644 --- a/pages/order/scene/index.js +++ b/pages/order/scene/index.js @@ -292,7 +292,7 @@ Page({ app.globalData.createDate.product_list.push(data.product_list[0]) } wx.redirectTo({ - url: '/pages/order/orderList/index' + url: '/pages/order/orderList/index?flag='+ this.data.flag }) }else{ commonApi.user_post(service, postData).then(res => { diff --git a/pages/pbService/web/index.js b/pages/pbService/web/index.js index 97bbea4..f5c5555 100644 --- a/pages/pbService/web/index.js +++ b/pages/pbService/web/index.js @@ -51,7 +51,6 @@ Page({ }) } }, - /** * 生命周期函数--监听页面初次渲染完成 */