浏览代码

修改bug

Jing 1 周之前
父节点
当前提交
ebce8e0f85

+ 1 - 1
.nuxt/manifest/latest.json

@@ -1 +1 @@
-{"id":"3bd15eac-7980-4b68-9bda-39b8091db749","timestamp":1751535107845}
+{"id":"64e4a0e5-a5e4-404f-ab32-2577848270e2","timestamp":1751963110973}

+ 0 - 1
.nuxt/manifest/meta/3bd15eac-7980-4b68-9bda-39b8091db749.json

@@ -1 +0,0 @@
-{"id":"3bd15eac-7980-4b68-9bda-39b8091db749","timestamp":1751535107845,"matcher":{"static":{},"wildcard":{},"dynamic":{}},"prerendered":[]}

+ 1 - 0
.nuxt/manifest/meta/64e4a0e5-a5e4-404f-ab32-2577848270e2.json

@@ -0,0 +1 @@
+{"id":"64e4a0e5-a5e4-404f-ab32-2577848270e2","timestamp":1751963110973,"matcher":{"static":{},"wildcard":{},"dynamic":{}},"prerendered":[]}

+ 1 - 1
.nuxt/tsconfig.json

@@ -102,7 +102,7 @@
         "./imports"
       ],
       "#app-manifest": [
-        "./manifest/meta/3bd15eac-7980-4b68-9bda-39b8091db749.json"
+        "./manifest/meta/64e4a0e5-a5e4-404f-ab32-2577848270e2.json"
       ],
       "#components": [
         "./components"

+ 1 - 1
assets/css/index.less

@@ -576,7 +576,7 @@ section {
             height: 18px;
             line-height: 18px;
             color: #666;
-            font-size: 14px;
+            font-size: 16px;
             margin-bottom: 11px;
             box-sizing: border-box;
             text-indent: 12px;

+ 12 - 2
components/goods/detail.vue

@@ -67,7 +67,7 @@
                         </div>
                         <div class="index_2_li clearfix">
                             <label class="index_2_li_label">有 效 期</label>
-                            <span class="index_2_li_text ">{{ getTime(newsDetail.validity, 'year', 1) }}</span>
+                            <span class="index_2_li_text ">{{ getValidityTime(newsDetail) }}</span>
                         </div>
                     </div>
                 </div>
@@ -172,7 +172,7 @@
                                 </div>
                                 <div class="index_2_li clearfix">
                                     <label class="index_2_li_label">截止日期</label>
-                                    <span class="index_2_li_text">{{ getTime(newsDetail.validity, 'year', 1) }}</span>
+                                    <span class="index_2_li_text">{{ getValidityTime(newsDetail) }}</span>
                                 </div>
                                 <div class="index_2_li clearfix">
                                     <label class="index_2_li_label">浏览次数</label>
@@ -397,6 +397,16 @@ if (getParentId.code == 200) {
 } else {
     console.log("获得路由id出错!", getParentId.message)
 }
+//1.5是否展示有效期
+const getValidityTime = (shopData) => {
+    if (shopData.islong == 1) {
+        return "无期限"
+    } else {
+        if (shopData.validity) {
+            return shopData.validity.split(' ')[0];
+        }
+    }
+}
 //1.获得路由id end ---------------------------------------->
 
 //2.获得模块数据 start ---------------------------------------->

+ 12 - 2
components/goods/detail3.vue

@@ -73,7 +73,7 @@
                         </div>
                         <div class="index_2_li clearfix">
                             <label class="index_2_li_label">有 效 期</label>
-                            <span class="index_2_li_text ">{{ getTime(newsDetail.validity, 'year', 1) }}</span>
+                            <span class="index_2_li_text ">{{ getValidityTime(newsDetail) }}</span>
                         </div>
                     </div>
                 </div>
@@ -178,7 +178,7 @@
                                 </div>
                                 <div class="index_2_li clearfix">
                                     <label class="index_2_li_label">截止日期</label>
-                                    <span class="index_2_li_text">{{ getTime(newsDetail.validity, 'year', 1) }}</span>
+                                    <span class="index_2_li_text">{{ getValidityTime(newsDetail) }}</span>
                                 </div>
                                 <div class="index_2_li clearfix">
                                     <label class="index_2_li_label">浏览次数</label>
@@ -403,6 +403,16 @@ if (getParentId.code == 200) {
 } else {
     console.log("获得路由id出错!", getParentId.message)
 }
+//1.5是否展示有效期
+const getValidityTime = (shopData) => {
+    if (shopData.islong == 1) {
+        return "无期限"
+    } else {
+        if (shopData.validity) {
+            return shopData.validity.split(' ')[0];
+        }
+    }
+}
 //1.获得路由id end ---------------------------------------->
 
 //2.获得模块数据 start ---------------------------------------->

+ 13 - 2
components/goods/detail_sec.vue

@@ -67,7 +67,7 @@
                         </div>
                         <div class="index_2_li clearfix">
                             <label class="index_2_li_label">有 效 期</label>
-                            <span class="index_2_li_text ">{{ getTime(newsDetail.validity, 'year', 1) }}</span>
+                            <span class="index_2_li_text ">{{ getValidityTime(newsDetail) }}</span>
                         </div>
                     </div>
                 </div>
@@ -172,7 +172,7 @@
                                 </div>
                                 <div class="index_2_li clearfix">
                                     <label class="index_2_li_label">截止日期</label>
-                                    <span class="index_2_li_text">{{ getTime(newsDetail.validity, 'year', 1) }}</span>
+                                    <span class="index_2_li_text">{{ getValidityTime(newsDetail) }}</span>
                                 </div>
                                 <div class="index_2_li clearfix">
                                     <label class="index_2_li_label">浏览次数</label>
@@ -397,6 +397,17 @@ if (getParentId.code == 200) {
 } else {
     console.log("获得路由id出错!", getParentId.message)
 }
+
+//1.5是否展示有效期
+const getValidityTime = (shopData) => {
+    if (shopData.islong == 1) {
+        return "无期限"
+    } else {
+        if (shopData.validity) {
+            return shopData.validity.split(' ')[0];
+        }
+    }
+}
 //1.获得路由id end ---------------------------------------->
 
 //2.获得模块数据 start ---------------------------------------->