Bläddra i källkod

210921 js fix2

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

+ 20 - 5
backstage/static/js/yo.js

@@ -631,11 +631,26 @@ function GenProductSection(mimg, specimg) {
             tmpstr = tmpstr.replaceAll('##ctypec##', value);
     });
     tmpstr = tmpstr.replaceAll('##swfDesc##', $("#swfDesc").val());
-    tmpstr = tmpstr.replaceAll('##swfPrice##', "<div>定價 : " + $("#swfPrice").val() + "</div>");
-    tmpstr = tmpstr.replaceAll('##swfColor##', "<div>顏色 : " + $("#swfColor").val() + "</div>");
-    tmpstr = tmpstr.replaceAll('##swfSize##', "<div>尺寸(mm) : " + $("#swfSize").val() + "</div>");
-    tmpstr = tmpstr.replaceAll('##swfMat##', "<div>材質 : " + $("#swfMat").val() + "</div>");
-    tmpstr = tmpstr.replaceAll('##swfMemo##', "<div>備註 : " + $("#swfMemo").val() + "</div>");
+    if ($("#swfPrice").val() != "")
+        tmpstr = tmpstr.replaceAll('##swfPrice##', "<div>定價 : " + $("#swfPrice").val() + "</div>");
+    else
+        tmpstr = tmpstr.replaceAll('##swfPrice##', "");
+    if ($("#swfColor").val() != "")
+        tmpstr = tmpstr.replaceAll('##swfColor##', "<div>顏色 : " + $("#swfColor").val() + "</div>");
+    else
+        tmpstr = tmpstr.replaceAll('##swfColor##', "");
+    if ($("#swfSize").val() != "")
+        tmpstr = tmpstr.replaceAll('##swfSize##', "<div>尺寸(mm) : " + $("#swfSize").val() + "</div>");
+    else
+        tmpstr = tmpstr.replaceAll('##swfSize##', "");
+    if ($("#swfMat").val() != "")
+        tmpstr = tmpstr.replaceAll('##swfMat##', "<div>材質 : " + $("#swfMat").val() + "</div>");
+    else
+        tmpstr = tmpstr.replaceAll('##swfMat##', "");
+    if ($("#swfMemo").val() != "")
+        tmpstr = tmpstr.replaceAll('##swfMemo##', "<div>備註 : " + $("#swfMemo").val() + "</div>");
+    else
+        tmpstr = tmpstr.replaceAll('##swfMemo##', "");
 
     mimgstr = "";
     firstimg = true;