Ver Fonte

导入爬虫新增spidercompete字段

maxiaoshan há 3 anos atrás
pai
commit
61e628c36f
2 ficheiros alterados com 3 adições e 1 exclusões
  1. 2 0
      src/front/front.go
  2. 1 1
      src/web/templates/index.html

+ 2 - 0
src/front/front.go

@@ -597,6 +597,7 @@ func (f *Front) Importfile() {
 							o["urgency"] = 0
 						}
 						o["platform"] = cells[9].Value
+						o["spidercompete"] = true
 						//						table := cells[6].Value
 						//						o["table"] = table
 						//						o["transfercode"] = qu.IntAll(Transfercode[table])
@@ -716,6 +717,7 @@ func pf(o map[string]interface{}) (bool, string) {
 	param["historyevent"] = qu.IntAll(o["historyevent"])
 	param["spiderhistorymaxpage"] = 1
 	param["platform"] = o["platform"]
+	param["spidercompete"] = o["spidercompete"]
 	//qu.Debug("param---", param)
 	issave := spider.SaveSpider(o["code"].(string), param)
 	return issave, one["s_name"].(string)

+ 1 - 1
src/web/templates/index.html

@@ -113,7 +113,7 @@
      <small>
       <a class="btn btn-default btn-sm" onclick="spidercopy()">复制爬虫</a>
 			{{if gt (session "auth") 2}}
-			<a class="btn btn-default btn-sm" href="/center/spider">新建爬虫</a>
+			<!--<a class="btn btn-default btn-sm" href="/center/spider">新建爬虫</a>-->
 			<a class="btn btn-default btn-sm" id="assign" onclick="assign()">分配</a>
 			<a class="btn btn-default btn-sm" id="disables" onclick="disables()">作废</a>
 			{{end}}