Browse Source

no message

Jianghan 5 years ago
parent
commit
18a1199b2a

+ 0 - 1
src/service/private_service.go

@@ -41,7 +41,6 @@ func (f *Private) Keydatademo(world string) {
 	if len(destr) > 10 {
 		ctime := destr[:10]
 		ctimeint := qu.Int64All(ctime)
-		//log.Println(ctimeint)
 		if time.Now().Sub(time.Unix(ctimeint, 0)).Hours()/24 < util.Subday {
 			tagfield, _ := util.Mgo.FindOneByField("tags", bson.M{"s_dataid": world}, bson.M{"i_extfieldstype": 1, "i_estotal": 1, "s_customername": 1})
 			if (*tagfield) != nil && len(*tagfield) > 0 {

+ 1 - 21
src/service/rule_service.go

@@ -287,26 +287,6 @@ func createEsJosn(es string) {
 	}
 }
 
-// func (r *Rule) Esgeneration() {
-// 	defer qu.Catch()
-// 	if r.Method() == "POST" {
-// 		_id := r.GetString("_id")
-// 		tmp := make(map[string]string)
-// 		if bson.IsObjectIdHex(_id) {
-// 			data, _ := Mgo.FindOne("tags", `{"_id":"`+_id+`"}`)
-// 			if nil != data && len(*data) > 0 {
-// 				esstr := Utiltags(*data)
-// 				tmp["data"] = esstr
-// 			} else {
-// 				tmp["err"] = "id no found"
-// 			}
-// 		} else {
-// 			tmp["err"] = "id err"
-// 		}
-// 		r.ServeJson(tmp)
-// 	}
-// }
-
 //更新xlsx db
 func updateDbXf(id string, rdata map[string]interface{}) (rid string, rep bool) {
 	defer qu.Catch()
@@ -337,7 +317,7 @@ func (r *Rule) DemoData() {
 		query := bson.M{
 			"s_dataid": sDataid,
 		}
-		data, _ := Mgo.Find("tagsdata", query, bson.M{"publishtime": -1}, nil, false, start, limit)
+		data, _ := Mgo.Find("tagsdata", query, `{"publishtime":-1}`, nil, false, start, limit)
 		count := Mgo.Count("tagsdata", query)
 		r.ServeJson(map[string]interface{}{
 			"data":            data,

+ 2 - 2
src/web/templates/com/header.html

@@ -169,10 +169,10 @@
 								<tr>
 									<th rowspan="2" style="align-content: center">序号</th>
 									<th rowspan="2">关键词</th>
-									<th rowspan="2">省份</th>
-									<th rowspan="2">城市</th>
 									<th rowspan="2">公告标题</th>
 									<th rowspan="2">公告类型</th>
+									<th rowspan="2">省份</th>
+									<th rowspan="2">城市</th>
 									<th rowspan="2">公告内容</th>
 									<th rowspan="2">发布时间</th>
 									<th rowspan="2">公告地址</th>

+ 14 - 14
src/web/templates/private/rule_create.html

@@ -952,20 +952,6 @@
                                 return ""
                             }
                         }, width: "8%"},
-                    {"data": function(row) {
-                            if (row.area != undefined) {
-                                return row.area
-                            }else {
-                                return ""
-                            }
-                        }, width: "4%"},
-                    {"data": function(row) {
-                            if (row.city != undefined) {
-                                return row.city
-                            }else {
-                                return ""
-                            }
-                        }, width: "4%"},
                     {"data": function (row) {
                             if (row.s_jyhref != undefined) {
                                 tmp = '<a class="" target="_blank" href='+row.s_jyhref+'>'+row.title+'</a>';
@@ -981,6 +967,20 @@
                                 return ""
                             }
                         }, width: "4%"},
+                    {"data": function(row) {
+                            if (row.area != undefined) {
+                                return row.area
+                            }else {
+                                return ""
+                            }
+                        }, width: "4%"},
+                    {"data": function(row) {
+                            if (row.city != undefined) {
+                                return row.city
+                            }else {
+                                return ""
+                            }
+                        }, width: "4%"},
                     {"data": function (row) {
                             var str = com.trimStr(row.detail);
                             if (str.length > 14) {

+ 14 - 14
src/web/templates/private/rule_edit.html

@@ -987,20 +987,6 @@
                             return ""
                         }
                     }, width: "8%"},
-                {"data": function(row) {
-                        if (row.area != undefined) {
-                            return row.area
-                        }else {
-                            return ""
-                        }
-                    }, width: "4%"},
-                {"data": function(row) {
-                        if (row.city != undefined) {
-                            return row.city
-                        }else {
-                            return ""
-                        }
-                    }, width: "4%"},
                 {"data": function (row) {
                         if (row.s_jyhref != undefined) {
                             tmp = '<a class="" target="_blank" href='+row.s_jyhref+'>'+row.title+'</a>';
@@ -1016,6 +1002,20 @@
                             return ""
                         }
                     }, width: "4%"},
+                {"data": function(row) {
+                        if (row.area != undefined) {
+                            return row.area
+                        }else {
+                            return ""
+                        }
+                    }, width: "4%"},
+                {"data": function(row) {
+                        if (row.city != undefined) {
+                            return row.city
+                        }else {
+                            return ""
+                        }
+                    }, width: "4%"},
                 {"data": function (row) {
                         var str = com.trimStr(row.detail);
                         if (str.length > 14) {