瀏覽代碼

cdn资源影响页面加载

Jianghan 9 月之前
父節點
當前提交
0f762bab9b

+ 4 - 1
exportData/main.go

@@ -485,7 +485,10 @@ func main() {
 			if baseInfo["package"] != nil {
 				pkg := baseInfo["package"].(map[string]interface{})
 				for _, p := range pkg {
-					p1 := p.(map[string]interface{})
+					p1, ok := p.(map[string]interface{})
+					if !ok {
+						log.Println(tmp["_id"])
+					}
 					winner := []string{}
 					bidamount := float64(0)
 					if p1["winner_all"] != nil {

+ 14 - 2
src/front/remark.go

@@ -2386,8 +2386,20 @@ func MarkPackage(content []interface{}, tagSet, baseSet, baseUnset map[string]in
 							m1 := make(map[string]interface{})
 							for _, tmp := range uts {
 								if temp, o3 := tmp.(map[string]interface{}); o3 {
-									if qu.ObjToString(temp["key"]) != "" && qu.ObjToString(temp["input"]) != "" {
-										m1[qu.ObjToString(temp["key"])] = qu.ObjToString(temp["input"])
+									if k1 := qu.ObjToString(temp["key"]); k1 != "" {
+										if k1 == "unitprice" || k1 == "totalprice" {
+											if qu.Float64All(temp["input"]) != 0 {
+												m1[k1] = qu.Float64All(temp["input"])
+											}
+										} else if k1 == "number" {
+											if qu.Float64All(temp["input"]) != 0 {
+												m1[k1] = qu.IntAll(temp["input"])
+											}
+										} else {
+											if qu.ObjToString(temp["input"]) != "" {
+												m1[qu.ObjToString(temp["key"])] = qu.ObjToString(temp["input"])
+											}
+										}
 									}
 								}
 							}

File diff suppressed because it is too large
+ 9 - 0
src/web/res/dist/css/bootstrap-switch.min.js


File diff suppressed because it is too large
+ 1 - 0
src/web/res/dist/js/jquery.min.js


+ 3 - 0
src/web/templates/project/check_detail.html

@@ -8,6 +8,9 @@
     <link href="/dist/css/animate.min.css" rel="stylesheet">
     <link rel="stylesheet" href="/dist/css/zz.css">
     <link rel="stylesheet" href="/dist/css/index.css">
+    <link href="/dist/css/bootstrap-switch.min.css" rel="stylesheet">
+    <script src="/dist/js/jquery.min.js"></script>
+    <script src="/dist/css/bootstrap-switch.min.js"></script>
     <script src="/dist/js/vue.min.js"></script>
     <script src="/dist/js/index.js"></script>
     <style>

+ 3 - 3
src/web/templates/project/remark_detail.html

@@ -8,9 +8,9 @@
     <link href="/dist/css/animate.min.css" rel="stylesheet">
     <link rel="stylesheet" href="/dist/css/zz.css">
     <link rel="stylesheet" href="/dist/css/index.css">
-    <link href="https://cdn.bootcdn.net/ajax/libs/bootstrap-switch/3.3.4/css/bootstrap3/bootstrap-switch.min.css" rel="stylesheet">
-    <script src="https://cdn.bootcdn.net/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
-    <script src="https://cdn.bootcdn.net/ajax/libs/bootstrap-switch/3.3.4/js/bootstrap-switch.min.js"></script>
+    <link href="/dist/css/bootstrap-switch.min.css" rel="stylesheet">
+    <script src="/dist/js/jquery.min.js"></script>
+    <script src="/dist/css/bootstrap-switch.min.js"></script>
     <script src="/dist/js/vue.min.js"></script>
     <script src="/dist/js/index.js"></script>
     <style>

Some files were not shown because too many files changed in this diff