Bläddra i källkod

前端相关代码提交

yuhongqi 1 månad sedan
förälder
incheckning
b3f103f639
1 ändrade filer med 4 tillägg och 4 borttagningar
  1. 4 4
      src/views/components/course/userCourseCatalogDetailsZM.vue

+ 4 - 4
src/views/components/course/userCourseCatalogDetailsZM.vue

@@ -944,8 +944,8 @@ export default {
         }
       }
 
-      // 验证:当修改弹出时间时,需要验证关闭时间
-      if (fieldName === 'cardPopupTime' && product.cardCloseTime) {
+      // 验证:当修改弹出时间时,需要验证关闭时间(若卡片关闭时间为 00:00:00 则不校验关闭>弹出)
+      if (fieldName === 'cardPopupTime' && product.cardCloseTime && product.cardCloseTime !== '00:00:00') {
         const popupSeconds = this.timeToSeconds(value || '00:00:00');
         const closeSeconds = this.timeToSeconds(product.cardCloseTime);
         const diffSeconds = closeSeconds - popupSeconds;
@@ -986,8 +986,8 @@ export default {
         }
       }
 
-      // 验证:当修改上架时间时,需要验证下架时间
-      if (fieldName === 'onShelfTime' && product.offShelfTime) {
+      // 验证:当修改上架时间时,需要验证下架时间(若下架时间为 00:00:00 则不校验关闭>开启)
+      if (fieldName === 'onShelfTime' && product.offShelfTime && product.offShelfTime !== '00:00:00') {
         const onShelfSeconds = this.timeToSeconds(value || '00:00:00');
         const offShelfSeconds = this.timeToSeconds(product.offShelfTime);
         const diffSeconds = offShelfSeconds - onShelfSeconds;