Browse Source

剧场演出改版

master
jiazhipeng 1 year ago
parent
commit
55e721bb65
  1. 5
      pages/component/calendarTheatre/index.js
  2. 5
      pages/component/calendarTheatre/index.wxml
  3. 5
      pages/order/show/index.js
  4. 6
      pages/order/show/index.wxss

5
pages/component/calendarTheatre/index.js

@ -149,9 +149,10 @@ Component({
}, },
onTapDay:function(e){ onTapDay:function(e){
let date = e.currentTarget.dataset.date; let date = e.currentTarget.dataset.date;
console.log(date) let item = e.currentTarget.dataset.item;
console.log(date, item)
if (date) { if (date && item.haveStock) {
console.log('trigger') console.log('trigger')
this.triggerEvent("onTapDay",date) this.triggerEvent("onTapDay",date)
} }

5
pages/component/calendarTheatre/index.wxml

@ -11,8 +11,9 @@
<view wx:for='{{date}}' class='{{(index == todayIndex) && isTodayWeek ? "weekMark" : ""}}'>{{item}}<view></view></view> <view wx:for='{{date}}' class='{{(index == todayIndex) && isTodayWeek ? "weekMark" : ""}}'>{{item}}<view></view></view>
</view> </view>
<view class='date-box'> <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 bindtap="onTapDay" wx:for='{{dateArr}}' class='{{activeDay == item.date ? "nowDay" : ""}}' data-date='{{dates[item.date]}}'
<view class="date-head{{dates[item.date]?'':' disable'}}" > data-item="{{item}}" style="flex-direction:column">
<view class="date-head{{dates[item.date]&&item.haveStock?'':' disable'}}" >
<view>{{item.dateNum}}</view> <view>{{item.dateNum}}</view>
</view> </view>

5
pages/order/show/index.js

@ -107,8 +107,11 @@ Page({
dateArr.push({date: util.formatDate(new Date(date))}) dateArr.push({date: util.formatDate(new Date(date))})
} }
dateArr.forEach(v=>{ dateArr.forEach((v,index)=>{
v.short_date = v.date.split("-").splice(1, 2).join("-") v.short_date = v.date.split("-").splice(1, 2).join("-")
if (index == 0) v.short_date = "今天 "+v.short_date
if (index == 1) v.short_date = "明天 "+v.short_date
if (index == 2) v.short_date = "后天 "+v.short_date
}) })
this.setData({dateArr: dateArr}) this.setData({dateArr: dateArr})
// 默认选中第一天 // 默认选中第一天

6
pages/order/show/index.wxss

@ -46,6 +46,7 @@ page {
.sku-box .tag{ .sku-box .tag{
width: fit-content; width: fit-content;
} }
.tag{ .tag{
padding: 15rpx 19rpx; padding: 15rpx 19rpx;
border: 1px solid #999999; border: 1px solid #999999;
@ -64,6 +65,11 @@ page {
border: none; border: none;
color: #FFFFFF; color: #FFFFFF;
} }
.date-box-page-sadsdsd .tag{
padding: 15rpx 0rpx;
text-align: center;
width: 220rpx;
}
.tag.disabled{ .tag.disabled{
background: #CCCCCC; background: #CCCCCC;

Loading…
Cancel
Save