panhui 3 ani în urmă
părinte
comite
253f52f11b
2 a modificat fișierele cu 8 adăugiri și 3 ștergeri
  1. 1 1
      .env.development
  2. 7 2
      src/components/product/ActivityRecord.vue

+ 1 - 1
.env.development

@@ -1,4 +1,4 @@
-VUE_APP_BASE_URL=https://www.raex.vip/
+VUE_APP_BASE_URL=https://test.raex.vip/
 NODE_ENV=development
 VUE_APP_PUBLIC_PATH=/
 ASSETS_PATH=raex

+ 7 - 2
src/components/product/ActivityRecord.vue

@@ -69,8 +69,13 @@ export default {
             }
         },
         isGoning() {
-            if (!this.info.scheduleSale && this.info.onShelf) {
-                return this.info.stock && this.info.stock > 0;
+            if (this.info.onShelf) {
+                if (
+                    (this.info.scheduleSale && this.dayjs().isAfter(this.dayjs(this.info.startTime))) ||
+                    !this.info.scheduleSale
+                ) {
+                    return this.info.stock && this.info.stock > 0;
+                }
             }
             return false;
         }