Browse Source

修改频度

longyu 2 years ago
parent
commit
320a36759c
1 changed files with 5 additions and 5 deletions
  1. 5 5
      watch/watch.go

+ 5 - 5
watch/watch.go

@@ -97,9 +97,6 @@ func WatchIndexFile(filePath string) {
 								}
 								if rk == 2 {
 									unit = colCell
-									if !strings.Contains(unit, "度") {
-										unit = unit + "度"
-									}
 								}
 								if rk == 3 {
 									source = colCell
@@ -109,6 +106,9 @@ func WatchIndexFile(filePath string) {
 								}
 								if rk == 5 {
 									frequency = colCell
+									if !strings.Contains(frequency, "度") {
+										frequency = frequency + "度"
+									}
 								}
 								if rk == 6 {
 									dateArr := strings.Split(colCell, "~")
@@ -148,8 +148,8 @@ func WatchIndexFile(filePath string) {
 							}
 
 							fmt.Println("isAdd:", isAdd)
-							if !strings.Contains(unit, "度") {
-								unit = unit + "度"
+							if !strings.Contains(frequency, "度") {
+								frequency = frequency + "度"
 							}
 							if isAdd == 1 {
 								indexObj.IndexCode = indexCode