Browse Source

团队预约改了部分样式

团队预约改了部分样式
master
xuetaotao 5 years ago
parent
commit
9e625fd8b1
  1. 4
      pages/index/index.wxml
  2. 3
      pages/info/museumInfo/index.js
  3. 43
      pages/info/museumInfo/index.wxml
  4. 79
      pages/info/museumInfo/index.wxss
  5. 187
      pages/order/components/date/index.js
  6. 2
      pages/order/components/date/index.wxml
  7. 2
      pages/pbService/group/index.wxml
  8. 4
      project.private.config.json

4
pages/index/index.wxml

@ -241,9 +241,9 @@
<image src="https://static.ticket.sz-trip.com/xcxImages/index/newpb6.png" mode="widthFix"></image> <image src="https://static.ticket.sz-trip.com/xcxImages/index/newpb6.png" mode="widthFix"></image>
<view>博物馆查询</view> <view>博物馆查询</view>
</view> </view>
<view bindtap="gotoPath" data-title="团预约" data-path="/pages/pbService/group/index" class="pbservice-item"> <view bindtap="gotoPath" data-title="团预约" data-path="/pages/pbService/group/index" class="pbservice-item">
<image src="https://static.ticket.sz-trip.com/xcxImages/index/newpb9.png" mode="widthFix"></image> <image src="https://static.ticket.sz-trip.com/xcxImages/index/newpb9.png" mode="widthFix"></image>
<view>团预约</view> <view>团预约</view>
</view> </view>
<view bindtap="gotoPath" data-title="精彩回顾" data-path="/pages/pbService/activity/index" class="pbservice-item"> <view bindtap="gotoPath" data-title="精彩回顾" data-path="/pages/pbService/activity/index" class="pbservice-item">

3
pages/info/museumInfo/index.js

@ -409,7 +409,8 @@ Page({
sku: this.data.info.product_venue.sku[0], sku: this.data.info.product_venue.sku[0],
infoDate: this.data.date, infoDate: this.data.date,
infoTime: this.data.time, infoTime: this.data.time,
isGroup: this.data.isGroup isGroup: this.data.isGroup,
isTeam: this.data.info.team_order
} }
wx.navigateTo({ wx.navigateTo({
url: '/pages/order/scene/index?type=museum' url: '/pages/order/scene/index?type=museum'

43
pages/info/museumInfo/index.wxml

@ -1,20 +1,28 @@
<!--pages/info/museumInfo/index.wxml--> <!--pages/info/museumInfo/index.wxml-->
<wxs src="../../../utils/filter.wxs" module="tool" /> <wxs src="../../../utils/filter.wxs" module="tool" />
<title title="场馆详情"></title> <title title="场馆团体预约" wx:if="{{info.team_order}}"></title>
<title title="场馆详情" wx:else></title>
<view class="iconfont icon-fenxiang" bindtap="share"></view> <view class="iconfont icon-fenxiang" bindtap="share"></view>
<swiper class="swiper" indicator-dots="{{true}}" wx:if="{{info}}" <swiper class="swiper" indicator-dots="{{true}}" wx:if="{{info}}" autoplay="{{true}}" interval="{{2000}}"
autoplay="{{true}}" interval="{{2000}}" duration="{{300}}"> duration="{{300}}">
<block wx:for="{{info.listimg}}" wx:key="*this"> <block wx:for="{{info.listimg}}" wx:key="*this">
<swiper-item> <swiper-item>
<image src="{{item}}" mode="aspectFill"></image> <image src="{{item}}" mode="aspectFill"></image>
</swiper-item> </swiper-item>
</block> </block>
<view class="title" wx:if="{{info && info.team_order}}">{{info.title}}(团体预约)</view>
</swiper> </swiper>
<view class="info" wx:if="{{info}}"> <!-- 普通详情样式 -->
<view class="info" wx:if="{{info && !info.team_order}}">
<view class="title">{{info.title}}</view> <view class="title">{{info.title}}</view>
<view class="location"><text class="iconfont icon-location"></text>{{info.address}}</view> <view class="location"><text class="iconfont icon-location"></text>{{info.address}}</view>
<view class="location" style="margin-bottom:0"><text class="iconfont icon-dianhua2"></text>{{info.tel}}</view> <view class="location" style="margin-bottom:0"><text class="iconfont icon-dianhua2"></text>{{info.tel}}</view>
</view> </view>
<!-- 团体预约的详情样式 -->
<view class="team_info" wx:if="{{info && info.team_order}}">
<view class="location"><text class="iconfont icon-location"></text>{{info.address}}</view>
<view class="location" style="margin-bottom:0"><text class="iconfont icon-dianhua2"></text>{{info.tel}}</view>
</view>
<view class="menu-box{{fixed?' menu-fixed':''}}" style="top:{{top}}px" wx:if="{{isGroup!=1}}"> <view class="menu-box{{fixed?' menu-fixed':''}}" style="top:{{top}}px" wx:if="{{isGroup!=1}}">
<view class="menu-item{{type==1?' active':''}}" bindtap="changeType" data-type="1">场馆介绍</view> <view class="menu-item{{type==1?' active':''}}" bindtap="changeType" data-type="1">场馆介绍</view>
<view class="menu-item{{type==2?' active':''}}" bindtap="changeType" data-type="2">场馆活动</view> <view class="menu-item{{type==2?' active':''}}" bindtap="changeType" data-type="2">场馆活动</view>
@ -22,7 +30,8 @@
<view style="height:102rpx;" wx:if="{{fixed}}"></view> <view style="height:102rpx;" wx:if="{{fixed}}"></view>
<view id="content"> <view id="content">
<view wx:if="{{type==1}}"> <view wx:if="{{type==1}}">
<date wx:if="{{isLogin && product && product.sku && product.product}}" bind:onChangeDate="changeDate" bind:onChangeTime="changeTime" product="{{product}}"></date> <date wx:if="{{isLogin && product && product.sku && product.product}}" bind:onChangeDate="changeDate"
bind:onChangeTime="changeTime" product="{{product}}" isTeam="{{info.team_order}}"></date>
<view class="detail-title">预订须知</view> <view class="detail-title">预订须知</view>
<rich-text wx:if="{{info}}" class="detail" nodes="{{tool.formateRichText(info.book_info)}}"></rich-text> <rich-text wx:if="{{info}}" class="detail" nodes="{{tool.formateRichText(info.book_info)}}"></rich-text>
<view class="detail-title">场馆介绍</view> <view class="detail-title">场馆介绍</view>
@ -43,12 +52,13 @@
</navigator> </navigator>
<view style="font-size:26rpx;text-align:center;line-height:200rpx;" wx:if="{{actList.length==0}}">暂无活动</view> <view style="font-size:26rpx;text-align:center;line-height:200rpx;" wx:if="{{actList.length==0}}">暂无活动</view>
</view> </view>
<view style="height:104rpx" wx:if="{{info.product_venue && info.product_venue.sku && info.product_venue.sku.length>0}}"></view> <view style="height:104rpx"
wx:if="{{info.product_venue && info.product_venue.sku && info.product_venue.sku.length>0}}"></view>
</view> </view>
<view class="fixed-btn" wx:if="{{info.product_venue && info.product_venue.sku && info.product_venue.sku.length>0}}"> <view class="fixed-btn" wx:if="{{info.product_venue && info.product_venue.sku && info.product_venue.sku.length>0}}">
<view bindtap="order" class="btn">参观预约</view> <view bindtap="order" class="btn {{info && info.team_order ? 'team' : ''}}">参观预约</view>
</view> </view>
<view style="position:absolute;right:0;left:-10000rpx;top:-200rpx;"> <view style="position:absolute;right:0;left:-10000rpx;top:-200rpx;z-index:-1">
<canvas canvas-id='imageCanvas' class='imageCanvas' style="width:551rpx;height:643rpx;" disable-scroll='true'> <canvas canvas-id='imageCanvas' class='imageCanvas' style="width:551rpx;height:643rpx;" disable-scroll='true'>
</canvas> </canvas>
<canvas class="canvasCode" style="opacity:0;width:500px;height:500px" canvas-id="myQrcode"></canvas> <canvas class="canvasCode" style="opacity:0;width:500px;height:500px" canvas-id="myQrcode"></canvas>
@ -59,15 +69,22 @@
<image class="share-img" src="{{shareImg}}" mode="widthFix"></image> <image class="share-img" src="{{shareImg}}" mode="widthFix"></image>
<view class="share-tips"> <view class="share-tips">
<view style="position:relative"> <view style="position:relative">
<image class="img" src="https://sz-qd.oss-cn-hangzhou.aliyuncs.com/xcxImages/info/img.png" mode="widthFix"></image> <image class="img" src="https://sz-qd.oss-cn-hangzhou.aliyuncs.com/xcxImages/info/img.png" mode="widthFix">
</image>
<view>保存图片到相册</view> <view>保存图片到相册</view>
<view class="tipimg"><image src="https://sz-qd.oss-cn-hangzhou.aliyuncs.com/xcxImages/info/ok.png" mode="widthFix"></image></view> <view class="tipimg">
<image src="https://sz-qd.oss-cn-hangzhou.aliyuncs.com/xcxImages/info/ok.png" mode="widthFix"></image>
</view>
</view> </view>
<image style="width:36rpx" src="https://sz-qd.oss-cn-hangzhou.aliyuncs.com/xcxImages/info/arrow2.png" mode="widthFix"></image> <image style="width:36rpx" src="https://sz-qd.oss-cn-hangzhou.aliyuncs.com/xcxImages/info/arrow2.png"
mode="widthFix"></image>
<view style="position:relative"> <view style="position:relative">
<image class="img" src="https://sz-qd.oss-cn-hangzhou.aliyuncs.com/xcxImages/info/code.png" mode="widthFix"></image> <image class="img" src="https://sz-qd.oss-cn-hangzhou.aliyuncs.com/xcxImages/info/code.png" mode="widthFix">
</image>
<view>微信识别二维码</view> <view>微信识别二维码</view>
<view class="tipimg"><image src="https://sz-qd.oss-cn-hangzhou.aliyuncs.com/xcxImages/info/ok1.png" mode="widthFix"></image></view> <view class="tipimg">
<image src="https://sz-qd.oss-cn-hangzhou.aliyuncs.com/xcxImages/info/ok1.png" mode="widthFix"></image>
</view>
</view> </view>
</view> </view>
<view class="save-btn" bindtap="save">保存到相册</view> <view class="save-btn" bindtap="save">保存到相册</view>

79
pages/info/museumInfo/index.wxss

@ -1,9 +1,23 @@
/* pages/info/museumInfo/index.wxss */ /* pages/info/museumInfo/index.wxss */
.swiper,.swiper image { .swiper,
.swiper image {
width: 100%; width: 100%;
height: 330rpx; height: 330rpx;
display: block; display: block;
} }
.swiper {
position: relative;
}
.swiper .title {
position: absolute;
left: 30rpx;
bottom: 20rpx;
box-sizing: border-box;
color: #FFFFFF;
}
.info { .info {
margin: 0 25rpx; margin: 0 25rpx;
margin-top: -30rpx; margin-top: -30rpx;
@ -14,20 +28,24 @@
border-radius: 13rpx; border-radius: 13rpx;
padding: 30rpx; padding: 30rpx;
} }
.info .title { .info .title {
font-size: 31rpx; font-size: 31rpx;
color: #000; color: #000;
margin-bottom: 20rpx; margin-bottom: 20rpx;
} }
.info .location { .info .location {
color: #999999; color: #999999;
font-size: 24rpx; font-size: 24rpx;
margin-bottom: 20rpx; margin-bottom: 20rpx;
} }
.info .location .iconfont { .info .location .iconfont {
margin-right: 10rpx; margin-right: 10rpx;
font-size: 26rpx; font-size: 26rpx;
} }
.detail-title { .detail-title {
font-weight: 500; font-weight: 500;
font-size: 35rpx; font-size: 35rpx;
@ -35,10 +53,12 @@
margin: 26rpx; margin: 26rpx;
margin-top: 45rpx; margin-top: 45rpx;
} }
.detail { .detail {
display: block; display: block;
padding: 26rpx; padding: 26rpx;
} }
.fixed-btn { .fixed-btn {
position: fixed; position: fixed;
left: 0; left: 0;
@ -51,6 +71,7 @@
align-items: center; align-items: center;
justify-content: center; justify-content: center;
} }
.fixed-btn .btn { .fixed-btn .btn {
width: 391rpx; width: 391rpx;
line-height: 73rpx; line-height: 73rpx;
@ -61,6 +82,16 @@
font-size: 31rpx; font-size: 31rpx;
font-weight: 500; font-weight: 500;
} }
.fixed-btn .btn.team {
width: 100%;
box-sizing: border-box;
height: 100%;
line-height: 104rpx;
background-color: #0B898E;
border-radius: 0;
}
.menu-box { .menu-box {
display: flex; display: flex;
align-items: center; align-items: center;
@ -68,28 +99,32 @@
height: 100rpx; height: 100rpx;
border-bottom: 1rpx solid #CCCCCC; border-bottom: 1rpx solid #CCCCCC;
} }
.menu-item { .menu-item {
font-size: 35rpx; font-size: 35rpx;
line-height: 100rpx; line-height: 100rpx;
position: relative; position: relative;
} }
.menu-item.active { .menu-item.active {
font-size: 37rpx; font-size: 37rpx;
font-weight: bold; font-weight: bold;
} }
.menu-item.active::after { .menu-item.active::after {
content:"!"; content: "!";
font-size: 0; font-size: 0;
display: block; display: block;
position: absolute; position: absolute;
width: 66rpx; width: 66rpx;
height: 7rpx; height: 7rpx;
background: #0B898E; background: #0B898E;
border-radius: 3rpx; border-radius: 3rpx;
left: 50%; left: 50%;
margin-left: -33rpx; margin-left: -33rpx;
top: 93rpx; top: 93rpx;
} }
.activity-item { .activity-item {
display: flex; display: flex;
background: #F4F4F4; background: #F4F4F4;
@ -101,6 +136,7 @@
position: relative; position: relative;
justify-content: space-between; justify-content: space-between;
} }
.end-box { .end-box {
position: absolute; position: absolute;
right: 22rpx; right: 22rpx;
@ -114,16 +150,19 @@
color: #fff; color: #fff;
font-size: 36rpx; font-size: 36rpx;
} }
.activity-item .textOver2 { .activity-item .textOver2 {
font-size: 31rpx; font-size: 31rpx;
color: #333; color: #333;
} }
.activity-info { .activity-info {
display: flex; display: flex;
height: 193rpx; height: 193rpx;
flex-direction: column; flex-direction: column;
justify-content: space-between; justify-content: space-between;
} }
.activity-item image { .activity-item image {
flex-shrink: 0; flex-shrink: 0;
display: block; display: block;
@ -131,13 +170,15 @@
height: 193rpx; height: 193rpx;
margin-left: 15rpx; margin-left: 15rpx;
} }
.activity-info .textOver { .activity-info .textOver {
margin-bottom: 10rpx; margin-bottom: 10rpx;
} }
.menu-fixed { .menu-fixed {
position: fixed; position: fixed;
left: 0; left: 0;
background:white; background: white;
right: 0; right: 0;
} }
@ -148,6 +189,7 @@
bottom: 0; bottom: 0;
width: 100%; width: 100%;
} }
.mask-content .icon-close { .mask-content .icon-close {
position: absolute; position: absolute;
right: 40rpx; right: 40rpx;
@ -163,10 +205,12 @@
align-items: center; align-items: center;
justify-content: center; justify-content: center;
} }
.share-img { .share-img {
display: block; display: block;
width: 551rpx; width: 551rpx;
} }
.share-tips { .share-tips {
width: 426rpx; width: 426rpx;
height: 150rpx; height: 150rpx;
@ -182,12 +226,14 @@
text-align: center; text-align: center;
line-height: 40rpx; line-height: 40rpx;
} }
.share-tips .img { .share-tips .img {
display: block; display: block;
width: 55rpx; width: 55rpx;
margin: 0 auto; margin: 0 auto;
margin-bottom: 4rpx; margin-bottom: 4rpx;
} }
.tipimg { .tipimg {
position: absolute; position: absolute;
left: 50%; left: 50%;
@ -201,11 +247,13 @@
justify-content: center; justify-content: center;
top: 34rpx; top: 34rpx;
} }
.tipimg image { .tipimg image {
width: 21rpx; width: 21rpx;
display: block; display: block;
} }
.save-btn { .save-btn {
width: 403rpx; width: 403rpx;
line-height: 77rpx; line-height: 77rpx;
@ -216,4 +264,25 @@
font-size: 31rpx; font-size: 31rpx;
font-weight: 500; font-weight: 500;
margin-top: 50rpx; margin-top: 50rpx;
}
.team_info {
position: relative;
z-index: 1;
background: #FFFFFF;
box-shadow: 0px 0px 16rpx 0px rgba(6, 0, 1, 0.1);
border-radius: 13rpx;
padding: 30rpx;
}
.team_info .location {
color: #666666;
font-size: 24rpx;
margin-bottom: 20rpx;
}
.team_info .location .iconfont {
margin-right: 10rpx;
font-size: 26rpx;
color: #0B898E;
} }

187
pages/order/components/date/index.js

@ -11,9 +11,14 @@ Component({
addGlobalClass: true addGlobalClass: true
}, },
properties: { properties: {
product:{ product: {
type:Object, type: Object,
default:{} default: {}
},
// 是否是团体预约的场馆
isTeam: {
type: Number,
default: 0
} }
}, },
@ -21,97 +26,97 @@ Component({
* 组件的初始数据 * 组件的初始数据
*/ */
data: { data: {
threeDays:[], threeDays: [],
activeDate:"", activeDate: "",
datelist:[], datelist: [],
showMoreDateFlag:false, showMoreDateFlag: false,
moreFlag:true, moreFlag: true,
timelist:[], timelist: [],
timeIndex:0, timeIndex: 0,
isSzMuseum:false, isSzMuseum: false,
kjIdCom:null, kjIdCom: null,
gpIdCom:null gpIdCom: null
}, },
lifetimes: { lifetimes: {
attached: function() { attached: function () {
this.setData({ this.setData({
kjIdCom:app.globalData.kjId, kjIdCom: app.globalData.kjId,
gpIdCom:app.globalData.gp_id || app.globalData.team_id gpIdCom: app.globalData.gp_id || app.globalData.team_id
}) })
// 在组件实例进入页面节点树时执行 // 在组件实例进入页面节点树时执行
let product = app.globalData.product,today = util.formatDate(new Date()),end_date = util.formatDate(new Date(new Date().getTime() + 60 * 24 * 60 * 60 * 1000)); let product = app.globalData.product, today = util.formatDate(new Date()), end_date = util.formatDate(new Date(new Date().getTime() + 60 * 24 * 60 * 60 * 1000));
if(product.product.title.indexOf("苏州博物馆")!=-1){ if (product.product.title.indexOf("苏州博物馆") != -1) {
this.setData({ this.setData({
isSzMuseum:true isSzMuseum: true
}) })
} }
commonApi.user_post("token/check").then(res=>{ commonApi.user_post("token/check").then(res => {
if(res.code==1){ if (res.code == 1) {
// 获取价格日历 // 获取价格日历
commonApi.user_post("product/product_date_price",{ commonApi.user_post("product/product_date_price", {
start_date:today, start_date: today,
end_date:end_date, end_date: end_date,
sku_id:product.sku.id sku_id: product.sku.id
}).then(res=>{ }).then(res => {
// 如果之前已经在详情页面选择了日期的话 默认日期不能是第一个有库存的日期了 // 如果之前已经在详情页面选择了日期的话 默认日期不能是第一个有库存的日期了
if(app.globalData.product.infoDate){ if (app.globalData.product.infoDate) {
let dateIndex = res.data.slice(0,3).findIndex(item=>item.date==app.globalData.product.infoDate.date) let dateIndex = res.data.slice(0, 3).findIndex(item => item.date == app.globalData.product.infoDate.date)
// if(!app.globalData.product.infoDate.short_date){ // if(!app.globalData.product.infoDate.short_date){
// app.globalData.product.infoDate.short_date = app.globalData.product.infoDate.date.split("-").splice(1,2).join("-") // app.globalData.product.infoDate.short_date = app.globalData.product.infoDate.date.split("-").splice(1,2).join("-")
// } // }
this.setData({ this.setData({
activeDate:app.globalData.product.infoDate, activeDate: app.globalData.product.infoDate,
moreFlag:dateIndex!=-1 moreFlag: dateIndex != -1
}) })
this.getTimeStock() this.getTimeStock()
this.triggerEvent("onChangeDate",app.globalData.product.infoDate) this.triggerEvent("onChangeDate", app.globalData.product.infoDate)
} }
else { else {
for(let i=0;i<res.data.length;i++){ for (let i = 0; i < res.data.length; i++) {
if(res.data[i].stock>0){ if (res.data[i].stock > 0) {
res.data[i].short_date = res.data[i].date.split("-").splice(1,2).join("-") res.data[i].short_date = res.data[i].date.split("-").splice(1, 2).join("-")
this.setData({ this.setData({
activeDate:res.data[i] activeDate: res.data[i]
}) })
this.getTimeStock() this.getTimeStock()
this.triggerEvent("onChangeDate",this.data.activeDate) this.triggerEvent("onChangeDate", this.data.activeDate)
break; break;
} }
} }
} }
if(this.data.gpIdCom){ if (this.data.gpIdCom) {
// 拼团的话 价格日历无效 所有价格都是sku里面的event_price // 拼团的话 价格日历无效 所有价格都是sku里面的event_price
res.data.map(item=>{ res.data.map(item => {
item.price = product.sku.event_price item.price = product.sku.event_price
}) })
} }
this.setData({ this.setData({
datelist:res.data datelist: res.data
}) })
this.setData({ this.setData({
threeDays:res.data.slice(0,3) threeDays: res.data.slice(0, 3)
}) })
let index = this.data.threeDays.findIndex(item=>item.date==this.data.activeDate.date) let index = this.data.threeDays.findIndex(item => item.date == this.data.activeDate.date)
this.setData({ this.setData({
moreFlag:index!=-1 moreFlag: index != -1
}) })
console.log(res) console.log(res)
}) })
} }
}) })
}, },
detached: function() { detached: function () {
// 在组件实例被从页面节点树移除时执行 // 在组件实例被从页面节点树移除时执行
}, },
}, },
pageLifetimes:{ pageLifetimes: {
show:function(){ show: function () {
this.setData({ this.setData({
kjIdCom:app.globalData.kjId, kjIdCom: app.globalData.kjId,
gpIdCom:app.globalData.gp_id || app.globalData.team_id gpIdCom: app.globalData.gp_id || app.globalData.team_id
}) })
} }
}, },
@ -119,82 +124,82 @@ Component({
* 组件的方法列表 * 组件的方法列表
*/ */
methods: { methods: {
showMoreDate:function(){ showMoreDate: function () {
this.setData({ this.setData({
showMoreDateFlag:true showMoreDateFlag: true
}) })
}, },
hideCalendar:function(){ hideCalendar: function () {
this.setData({ this.setData({
showMoreDateFlag:false showMoreDateFlag: false
}) })
}, },
changeDate:function(e){ changeDate: function (e) {
let date = e.currentTarget.dataset.date; let date = e.currentTarget.dataset.date;
if(date.stock<=0) return; if (date.stock <= 0) return;
if(date.stock==null) return; if (date.stock == null) return;
if(date.price==null) return; if (date.price == null) return;
this.setData({ this.setData({
activeDate:date, activeDate: date,
moreFlag:true moreFlag: true
}) })
this.triggerEvent("onChangeDate",this.data.activeDate) this.triggerEvent("onChangeDate", this.data.activeDate)
this.getTimeStock() this.getTimeStock()
}, },
// 修改日期 // 修改日期
onTapDay:function(e){ onTapDay: function (e) {
let threeDays = this.data.threeDays,flag=false; let threeDays = this.data.threeDays, flag = false;
threeDays.map(item=>{ threeDays.map(item => {
if(item.date==e.detail.date){ if (item.date == e.detail.date) {
flag = true flag = true
} }
}) })
e.detail.short_date = e.detail.date.substr(5,5); e.detail.short_date = e.detail.date.substr(5, 5);
this.setData({ this.setData({
activeDate:e.detail, activeDate: e.detail,
showMoreDateFlag:false, showMoreDateFlag: false,
moreFlag:flag moreFlag: flag
}) })
this.triggerEvent("onChangeDate",this.data.activeDate) this.triggerEvent("onChangeDate", this.data.activeDate)
this.getTimeStock() this.getTimeStock()
}, },
getTimeStock:function(){ getTimeStock: function () {
if(this.data.activeDate.is_time_stock!=true) return; if (this.data.activeDate.is_time_stock != true) return;
commonApi.user_post("product/product_timestock_price",{ commonApi.user_post("product/product_timestock_price", {
date:this.data.activeDate.date, date: this.data.activeDate.date,
sku_id:this.data.activeDate.sku_id?this.data.activeDate.sku_id:app.globalData.product.sku.id sku_id: this.data.activeDate.sku_id ? this.data.activeDate.sku_id : app.globalData.product.sku.id
}).then(res=>{ }).then(res => {
let timeIndex = -1; let timeIndex = -1;
if(app.globalData.product.infoTime){ if (app.globalData.product.infoTime) {
this.triggerEvent("onChangeTime",app.globalData.product.infoTime); this.triggerEvent("onChangeTime", app.globalData.product.infoTime);
timeIndex = res.data.findIndex(item=>item.start_time==app.globalData.product.infoTime.start_time) timeIndex = res.data.findIndex(item => item.start_time == app.globalData.product.infoTime.start_time)
this.setData({ this.setData({
timelist:res.data, timelist: res.data,
timeIndex:timeIndex timeIndex: timeIndex
}) })
return; return;
} }
for(let i=0;i<res.data.length;i++){ for (let i = 0; i < res.data.length; i++) {
if(res.data[i].stock_number>0){ if (res.data[i].stock_number > 0) {
timeIndex = i; timeIndex = i;
break; break;
} }
} }
this.setData({ this.setData({
timelist:res.data, timelist: res.data,
timeIndex:timeIndex timeIndex: timeIndex
}) })
this.triggerEvent("onChangeTime",this.data.timelist[this.data.timeIndex]) this.triggerEvent("onChangeTime", this.data.timelist[this.data.timeIndex])
}) })
}, },
selectTime:function(e){ selectTime: function (e) {
if(this.data.timelist[e.currentTarget.dataset.index].stock_number!=0){ if (this.data.timelist[e.currentTarget.dataset.index].stock_number != 0) {
this.setData({ this.setData({
timeIndex:e.currentTarget.dataset.index timeIndex: e.currentTarget.dataset.index
}) })
this.triggerEvent("onChangeTime",this.data.timelist[this.data.timeIndex]) this.triggerEvent("onChangeTime", this.data.timelist[this.data.timeIndex])
} }
} }
} }
}) })

2
pages/order/components/date/index.wxml

@ -4,7 +4,7 @@
<view class="dates-boxes"> <view class="dates-boxes">
<view bindtap="changeDate" data-date="{{item}}" class="date-item{{activeDate.date==item.date?' active':''}}{{(item.stock<=0 || item.stock==null || item.price==null)?' disable':''}}" wx:for="{{threeDays}}"> <view bindtap="changeDate" data-date="{{item}}" class="date-item{{activeDate.date==item.date?' active':''}}{{(item.stock<=0 || item.stock==null || item.price==null)?' disable':''}}" wx:for="{{threeDays}}">
<view>{{item.date}}</view> <view>{{item.date}}</view>
<view class="price" wx:if="{{item.stock!=0 && item.stock!=null && item.price!=null}}">{{item.price==0 || kjIdCom?'免费':('¥'+item.price/100)}}</view> <view class="price" wx:if="{{ !isTeam && item.stock!=0 && item.stock!=null && item.price!=null}}">{{item.price==0 || kjIdCom?'免费':('¥'+item.price/100)}}</view>
<!-- <view class="price" wx:if="{{item.stock==null || item.price==null}}">不可定</view> --> <!-- <view class="price" wx:if="{{item.stock==null || item.price==null}}">不可定</view> -->
<view class="price" wx:if="{{item.stock==0}}">售罄</view> <view class="price" wx:if="{{item.stock==0}}">售罄</view>
</view> </view>

2
pages/pbService/group/index.wxml

@ -11,7 +11,7 @@
<navigator url="/pages/info/museumInfo/index?id={{item.id}}&isGroup=1" class="group-item" wx:for="{{list}}"> <navigator url="/pages/info/museumInfo/index?id={{item.id}}&isGroup=1" class="group-item" wx:for="{{list}}">
<image src="{{item.headimg}}" mode="aspectFill"></image> <image src="{{item.headimg}}" mode="aspectFill"></image>
<view class="group-info"> <view class="group-info">
<view class="group-title textOver">{{item.title}}</view> <view class="group-title textOver">{{item.title}}(团体预约)</view>
<view class="iconfont textOver"><text class="icon-dianhua3"></text>电话:{{item.tel}}</view> <view class="iconfont textOver"><text class="icon-dianhua3"></text>电话:{{item.tel}}</view>
<view class="iconfont textOver"><text class="icon-location1"></text>{{item.address}}</view> <view class="iconfont textOver"><text class="icon-location1"></text>{{item.address}}</view>
<view class="group-bottom"> <view class="group-bottom">

4
project.private.config.json

@ -61,8 +61,8 @@
"scene": null "scene": null
}, },
{ {
"name": "我的", "name": "团体预约场馆",
"pathName": "pages/user/user", "pathName": "pages/pbService/group/index",
"query": "", "query": "",
"scene": null "scene": null
} }

Loading…
Cancel
Save