Browse Source

下单标签

master
jiazhipeng 7 months ago
parent
commit
6bfd9a3501
  1. 7
      pages/info/sceneProductInfo/index.wxml
  2. 6
      pages/info/sceneProductInfo/index.wxss
  3. 11
      pages/order/components/date/index.js
  4. 3
      pages/order/components/date/index.wxml
  5. 14
      pages/order/components/date/index.wxss

7
pages/info/sceneProductInfo/index.wxml

@ -66,7 +66,7 @@
</view> </view>
<view class="product-item" wx:for="{{item.sku}}" wx:for-item="sku" wx:for-index="itemI" <view class="product-item" wx:for="{{item.sku}}" wx:for-item="sku" wx:for-index="itemI"
bindtap="selectDate" data-sku="{{sku}}" data-product="{{item}}" data-index="0" bindtap="selectDate" data-sku="{{sku}}" data-product="{{item}}" data-index="1"
data-disable="{{item.flag==0 || sku.flag=='off'?1:0}}" > data-disable="{{item.flag==0 || sku.flag=='off'?1:0}}" >
<view class="skutitle">{{sku.sku_name}}</view> <view class="skutitle">{{sku.sku_name}}</view>
<view class="product-box"> <view class="product-box">
@ -76,7 +76,7 @@
<view class="product-tag textOver" >{{tool.filterTag(sku.display_tags,",",2,false)}}</view> <view class="product-tag textOver" >{{tool.filterTag(sku.display_tags,",",2,false)}}</view>
</view> </view>
<view class="order-tip-text" capture-bind:tap="selectDate" data-sku="{{sku}}" data-product="{{item}}" <view class="order-tip-text" catchtap="selectDate" data-sku="{{sku}}" data-product="{{item}}"
data-index="1" data-index="1"
data-disable="{{item.flag==0 || sku.flag=='off'?1:0}}">ⓘ预订须知></view> data-disable="{{item.flag==0 || sku.flag=='off'?1:0}}">ⓘ预订须知></view>
</view> </view>
@ -87,7 +87,8 @@
<!-- <text wx:if="{{sku.is_merged}}">起</text> --> <!-- <text wx:if="{{sku.is_merged}}">起</text> -->
</view> </view>
<!-- showOrder selectDate --> <!-- showOrder selectDate -->
<view data-sku="{{sku}}" data-product="{{item}}" <view data-sku="{{sku}}" data-product="{{item}}" catchtap="selectDate"
data-disable="{{item.flag==0 || sku.flag=='off'?1:0}}" data-index="0"
class="btn{{item.flag==0 || sku.flag=='off'?' disable':''}}">预订</view> class="btn{{item.flag==0 || sku.flag=='off'?' disable':''}}">预订</view>
</view> </view>
</view> </view>

6
pages/info/sceneProductInfo/index.wxss

@ -1065,12 +1065,6 @@ line-height: 93rpx;
font-size: 37rpx; font-size: 37rpx;
color: #000000; color: #000000;
} }
.mask-content1 .date-box>view:nth-of-type(2){
border: none !important;
padding-top: 10rpx !important;
height: auto !important;
}
.mask-scroll-content{ .mask-scroll-content{
flex: 1; flex: 1;
height: 100rpx; height: 100rpx;

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

@ -51,16 +51,23 @@ Component({
afterTom:util.formatHou(new Date()), afterTom:util.formatHou(new Date()),
skuName:'', skuName:'',
monthList:[], monthList:[],
scrollLeft: 0 scrollLeft: 0,
refundTag: "",
}, },
lifetimes: { lifetimes: {
attached: function () { attached: function () {
console.log(app.globalData.product); console.log(app.globalData.product);
let skuName = app.globalData.product.sku.sku_name let skuName = app.globalData.product.sku.sku_name
let refundTag = "";
if (app.globalData.product&&app.globalData.product.sku&&app.globalData.product.sku.sku_model) {
if(app.globalData.product.sku.sku_model.is_auto_refund == 1) refundTag = "过期自动退";
if(app.globalData.product.sku.sku_model.is_auto_refund == 2) refundTag = "过期自动核销";
}
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,
skuName skuName,
refundTag: refundTag
}) })
// 在组件实例进入页面节点树时执行 // 在组件实例进入页面节点树时执行
let product = app.globalData.product, today = util.formatDate(new Date()), end_date = util.formatDate(new Date(new Date().getTime() + this.properties.endDays * 24 * 60 * 60 * 1000)); let product = app.globalData.product, today = util.formatDate(new Date()), end_date = util.formatDate(new Date(new Date().getTime() + this.properties.endDays * 24 * 60 * 60 * 1000));

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

@ -23,7 +23,8 @@
</view> --> </view> -->
<view class="date-box"> <view class="date-box">
<view class="box-title">{{skuName}}</view> <view class="box-title">{{skuName}}</view>
<view style="border-top: 1rpx solid #ccc;padding: 48rpx 0 0 21rpx;"> <view class="refund-tag" wx:if="{{refundTag}}">{{refundTag}}</view>
<view style="padding: 48rpx 0 0 21rpx;">
<view style="font-weight: 500;font-size: 31rpx;color: #000000;margin-bottom: 40rpx;"> <view style="font-weight: 500;font-size: 31rpx;color: #000000;margin-bottom: 40rpx;">
使用日期 使用日期
</view> </view>

14
pages/order/components/date/index.wxss

@ -128,4 +128,18 @@
font-weight: 500; font-weight: 500;
font-size: 27rpx; font-size: 27rpx;
color: #000000; color: #000000;
}
.refund-tag{
margin-left: 20rpx;
background: rgba(241, 34, 34, 0.1);
border-radius: 7rpx;
height: 37rpx;
line-height: 37rpx;
padding: 0 10rpx;
font-weight: 500;
font-size: 24rpx;
color: #F12222;
width: fit-content;
} }
Loading…
Cancel
Save