|
@@ -88,19 +88,19 @@ type OtherBase struct {
|
|
|
func (f *Front) LoadSpider(codeTaskIdReState string) error {
|
|
|
tmpStr := strings.Split(codeTaskIdReState, "__")
|
|
|
code := tmpStr[0]
|
|
|
- taskId := tmpStr[1]
|
|
|
+ text := tmpStr[1]
|
|
|
auth := qu.IntAll(f.GetSession("auth"))
|
|
|
restate := -1
|
|
|
- if taskId == "restate=1" { //重采编辑
|
|
|
+ if text == "1" { //重采编辑
|
|
|
restate = 1
|
|
|
- } else if taskId == "restate=2" {
|
|
|
+ } else if text == "2" {
|
|
|
restate = 2
|
|
|
- } else if taskId == "restate=3" {
|
|
|
+ } else if text == "3" {
|
|
|
restate = 3
|
|
|
- } else {
|
|
|
- if auth == u.Role_Dev && qu.ObjToString(f.GetSession(taskId)) == "" {
|
|
|
+ } else if text != "bu" {
|
|
|
+ if auth == u.Role_Dev && qu.ObjToString(f.GetSession(text)) == "" {
|
|
|
xgTime := time.Unix(time.Now().Unix(), 0).Format("2006-01-02 15:04:05")
|
|
|
- f.SetSession(taskId, xgTime)
|
|
|
+ f.SetSession(text, xgTime)
|
|
|
}
|
|
|
}
|
|
|
copy := f.GetString("copy")
|
|
@@ -110,7 +110,7 @@ func (f *Front) LoadSpider(codeTaskIdReState string) error {
|
|
|
//lua, _ := u.MgoE.FindOne("luaconfig", map[string]interface{}{"code": code})
|
|
|
lua, _ := u.MgoEB.FindOne("luaconfig", map[string]interface{}{"code": code})
|
|
|
//爬虫开发人员编辑爬虫,修改爬虫信息
|
|
|
- if auth == u.Role_Dev && qu.ObjToString((*lua)["spidertype"]) == "increment" {
|
|
|
+ if auth == u.Role_Dev && text != "bu" && qu.ObjToString((*lua)["spidertype"]) == "increment" {
|
|
|
(*lua)["spidertype"] = "history"
|
|
|
(*lua)["incrementevent"] = (*lua)["event"]
|
|
|
}
|
|
@@ -170,7 +170,7 @@ func (f *Front) LoadSpider(codeTaskIdReState string) error {
|
|
|
js, _ := json.MarshalIndent((*lua)["model"], "", " ")
|
|
|
(*lua)["js"] = string(js)
|
|
|
f.T["lua"] = lua
|
|
|
- f.T["taskId"] = taskId
|
|
|
+ f.T["taskId"] = text
|
|
|
f.T["restate"] = restate
|
|
|
f.T["isflow"] = (*lua)["isflow"]
|
|
|
f.T["spidertype"] = (*lua)["spidertype"]
|