Browse Source

预约修改

master
nige 3 years ago
parent
commit
5764db5d84
  1. 2
      app.js
  2. 1
      pages/info/museumInfo/index.js
  3. 1
      pages/info/sceneProductInfo/index.js
  4. 12
      pages/order/scene/index.js
  5. 4
      pages/order/scene/index.wxml

2
app.js

@ -21,7 +21,7 @@ App({
unique_key: "wechatxcx"
}).then(res => {
let data = JSON.parse(res.data);
data.isTest = data.isTest67? true : false;
data.isTest = data.isTest68? true : false;
this.globalData.configJson = data
}).then(() => {
// 获取ui配置文件

1
pages/info/museumInfo/index.js

@ -451,6 +451,7 @@ Page({
isGroup: this.data.isGroup,
isTeam: this.data.info.team_order && this.data.isGroup?1:0
}
app.globalData.index = 0
wx.navigateTo({
url: '/pages/order/scene/index?type=museum'
})

1
pages/info/sceneProductInfo/index.js

@ -352,6 +352,7 @@ Page({
...sku,
...product
}
app.globalData.index = 0
wx.navigateTo({
url: '/pages/order/scene/index',
})

12
pages/order/scene/index.js

@ -8,7 +8,7 @@ Page({
* 页面的初始数据
*/
data: {
product: app.globalData.product,
product:null,
productNum: 1,
linkmanList: [],
date: "",
@ -35,12 +35,16 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
console.log(app.globalData.product);
console.log(this.data.date);
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
})
if (!app.globalData.product) {
@ -60,6 +64,7 @@ Page({
product: app.globalData.product,
singlePrice: this.data.gp_id ? app.globalData.product.sku.event_price : app.globalData.product.sku.price
})
console.log(this.data.product);
if (!this.data.kjId && !this.data.gp_id && this.data.product.isGroup != 1) {
this.couponCom = this.selectAllComponents("#coupon")[0];
}
@ -269,7 +274,7 @@ Page({
}
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){
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{
@ -364,8 +369,7 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow: function () {
if(app.globalData.list && app.globalData.list.length != 0){
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) {

4
pages/order/scene/index.wxml

@ -1,11 +1,11 @@
<!--pages/order/scene/index.wxml-->
<view class="{{product && product.isGroup==1?'group-order':''}}">
<view class="{{product && product.isGroup==1?'group-order':''}}">
<title title="订单填写"></title>
<view class="product-info" wx:if="{{product}}">
<view class="product-title">{{product.product.title + product.isGroup==1?'(团体预约)':product.sku.sku_name}}</view>
<view class="product-price" wx:if="{{type=='museum' || type=='activity'}}">免费</view>
</view>
<date wx:if="{{isLogin && type!='activity' && ticket_type == 1}}" bind:onChangeDate="changeDate" bind:onChangeTime="changeTime"
<date wx:if="{{isLogin && type!='activity' && ticket_type == 1}}" bind:onChangeDate="changeDate" bind:onChangeTime="changeTime"
product="{{product}}"></date>
<view class="box" wx:if="{{product && product.isGroup==1}}">
<view class="box-title">

Loading…
Cancel
Save