Bläddra i källkod

210923 取代字串不帶入  

yukyo0821 3 år sedan
förälder
incheckning
3408cfd625
1 ändrade filer med 17 tillägg och 17 borttagningar
  1. 17 17
      backstage/static/js/yo.js

+ 17 - 17
backstage/static/js/yo.js

@@ -574,10 +574,10 @@ function GenProductSection(mimg, specimg) {
                 role="region"
                 aria-label="小寶優居 | ##ctitle##"
               >
-                ##AMP-IMG##
+##AMP-IMG##
               </amp-carousel>
               <div class="mt-3 carousel-preview">
-                ##PREV-IMG##
+##PREV-IMG##
               </div>
             </div>
           </div>
@@ -590,11 +590,11 @@ function GenProductSection(mimg, specimg) {
             </div>
             <hr>
             <div class="detail">
-                    ##swfPrice##
-                    ##swfColor##
-                    ##swfSize##
-                    ##swfMat##
-                    ##swfMemo##
+##swfPrice##
+##swfColor##
+##swfSize##
+##swfMat##
+##swfMemo##
             </div>
           </div>
         </div>
@@ -605,8 +605,8 @@ function GenProductSection(mimg, specimg) {
           <div>2.部分商品因應空間大小,保有客製尺寸服務,詳細客製尺寸,請預約門市諮詢訂購</div>
         </div>
       </div>
-      ##SPEC-IMG##
-    </div>
+##SPEC-IMG##
+</div>
   </section>`;
 
     tmpstr = tmpstr.replaceAll('##ctitle##', $("#ctitle").val());
@@ -620,23 +620,23 @@ function GenProductSection(mimg, specimg) {
     if ($("#swfPrice").val() != "")
         tmpstr = tmpstr.replaceAll('##swfPrice##', "<div>定價 : " + $("#swfPrice").val() + "</div>");
     else
-        tmpstr = tmpstr.replaceAll('##swfPrice##', '&nbsp;');
+        tmpstr = tmpstr.replaceAll('##swfPrice##', '');
     if ($("#swfColor").val() != "")
         tmpstr = tmpstr.replaceAll('##swfColor##', "<div>顏色 : " + $("#swfColor").val() + "</div>");
     else
-        tmpstr = tmpstr.replaceAll('##swfColor##', '&nbsp;');
+        tmpstr = tmpstr.replaceAll('##swfColor##', '');
     if ($("#swfSize").val() != "")
         tmpstr = tmpstr.replaceAll('##swfSize##', "<div>尺寸(mm) : " + $("#swfSize").val() + "</div>");
     else
-        tmpstr = tmpstr.replaceAll('##swfSize##', '&nbsp;');
+        tmpstr = tmpstr.replaceAll('##swfSize##', '');
     if ($("#swfMat").val() != "")
         tmpstr = tmpstr.replaceAll('##swfMat##', "<div>材質 : " + $("#swfMat").val() + "</div>");
     else
-        tmpstr = tmpstr.replaceAll('##swfMat##', '&nbsp;');
+        tmpstr = tmpstr.replaceAll('##swfMat##', '');
     if ($("#swfMemo").val() != "")
         tmpstr = tmpstr.replaceAll('##swfMemo##', "<div>備註 : " + $("#swfMemo").val() + "</div>");
     else
-        tmpstr = tmpstr.replaceAll('##swfMemo##', '&nbsp;');
+        tmpstr = tmpstr.replaceAll('##swfMemo##', '');
 
     mimgstr = "";
     firstimg = true;
@@ -658,7 +658,7 @@ function GenProductSection(mimg, specimg) {
             }
         }
     }
-    tmpstr = tmpstr.replaceAll('##AMP-IMG##', mimgstr == "" ? "&nbsp;" : mimgstr);
+    tmpstr = tmpstr.replaceAll('##AMP-IMG##', mimgstr == "" ? "" : mimgstr);
 
     previmgstr = "";
     for (i = 0; i < mimg.blocks.length; i++) {
@@ -678,7 +678,7 @@ function GenProductSection(mimg, specimg) {
             }
         }
     }
-    tmpstr = tmpstr.replaceAll('##PREV-IMG##', previmgstr == "" ? "&nbsp;" : previmgstr);
+    tmpstr = tmpstr.replaceAll('##PREV-IMG##', previmgstr == "" ? "" : previmgstr);
 
     specimgstr = "";
     for (i = 0; i < specimg.blocks.length; i++) {
@@ -695,7 +695,7 @@ function GenProductSection(mimg, specimg) {
             }
         }
     }
-    tmpstr = tmpstr.replaceAll('##SPEC-IMG##', specimgstr == "" ? "&nbsp;" : '<div class="spec"><div class="mb-4"><b>尺寸規格</b></div>' + specimgstr + '</div>');
+    tmpstr = tmpstr.replaceAll('##SPEC-IMG##', specimgstr == "" ? "" : '<div class="spec"><div class="mb-4"><b>尺寸規格</b></div>' + specimgstr + '</div>');
 
     return tmpstr;