maxiaoshan 3 years ago
parent
commit
8fdc222a78
4 changed files with 11 additions and 3 deletions
  1. 1 1
      src/config.json
  2. 4 0
      src/front/front.go
  3. 1 1
      src/util/config.go
  4. 5 1
      src/web/templates/detail.html

+ 1 - 1
src/config.json

@@ -2,7 +2,7 @@
     "port": "5111",
     "dbaddress": "192.168.3.207:27092",
     "dbname": "mxs",
-    "size": 10,
+    "size":50,
     "fromtable": "marked",
     "totablel": "errdata",
     "redis": "extcheck=192.168.3.207:1679",

+ 4 - 0
src/front/front.go

@@ -44,6 +44,7 @@ type Front struct {
 var preKey = "ck_"
 var preErr = "err_"
 var SE = qu.SimpleEncrypt{Key: "topJYBX2019"}
+var CheckLock = &sync.Mutex{}
 
 /*
 	status
@@ -146,9 +147,12 @@ func (i *Front) ListInfo() error {
 //判断id是否正在被标记
 func (i *Front) CheckId() {
 	defer qu.Catch()
+	CheckLock.Lock()
+	defer CheckLock.Unlock()
 	msg := ""
 	id := i.GetString("id")
 	coll := i.GetSession("coll").(string)
+	qu.Debug(coll, id)
 	if coll != "" {
 		exists, err := redis.Exists("extcheck", coll+"_"+id)
 		if err == nil {

+ 1 - 1
src/util/config.go

@@ -29,7 +29,7 @@ type config struct {
 	CustomerField map[string]string      `json:"customerfield"`
 }
 
-const JYHREFPRE = "https://www.jianyu360.com/article/content/"
+const JYHREFPRE = "https://www.jianyu360.cn/article/content/"
 const SPECIALTYPE = "二级不存在"
 const BIDDINGSTARTID = "5a862f0640d2d9bbe88e3cec"
 

+ 5 - 1
src/web/templates/detail.html

@@ -626,7 +626,10 @@
             ]
         },
         methods: {
-            selectchange(uni,status,two,one){
+            selectchange(uni,status,two,one){//状态更新
+              if (uni.status == '-1' || uni.status == '2') {
+                status = 2
+              }
               this.setStatus(uni,status,two,one);
             },
             openHref () {
@@ -657,6 +660,7 @@
                   }
               }
             },
+            // 检查一级是否需要改变状态
             checkOneStatus: function (config) {
                 var tempObj = {
                     obj: config.type ? config.one : config.two