wcj 5 years ago
parent
commit
3bf0642abb
1 changed files with 4 additions and 4 deletions
  1. 4 4
      src/jfw/front/swordfish.go

+ 4 - 4
src/jfw/front/swordfish.go

@@ -297,8 +297,8 @@ func (m *Front) Searchinfolist(p string) error {
 					intns = append(intns, rand.Intn(100))
 				} else {
 					for {
-						v := rand.Intn(intns[(i - 1)] + 100)
-						if v-intns[(i - 1)] >= 30 {
+						v := rand.Intn(intns[(i-1)] + 100)
+						if v-intns[(i-1)] >= 30 {
 							intns = append(intns, v)
 							break
 						}
@@ -1569,7 +1569,7 @@ func (m *Front) WxpushAjaxReq() error {
 	defer util.Catch()
 	userId := util.ObjToString(m.GetSession("userId"))
 	if userId != "" {
-		vsid := m.GetString("vsid")
+		vsid, _ := m.GetInteger("vsid")
 		jy.SubscribePush.Visit(public.PushMysql, userId, vsid)
 	}
 	return nil
@@ -1970,7 +1970,7 @@ func searhWebContentblog(querymap map[string]string) (*[]map[string]interface{},
 			,"s_content":{"force_source": true}
         }
     },"_source":["s_title","s_date","s_contenttype","s_content","releasetime","s_description","praise","s_source","s_pic","s_pic1","l_createdate","s_code","_id","s_author"]
-	,"from":` + fmt.Sprintf("%v", ((currentPage - 1) * perPage)) + `,
+	,"from":` + fmt.Sprintf("%v", ((currentPage-1)*perPage)) + `,
 	"size":` + fmt.Sprintf("%v", perPage) +
 		`,"sort":[{"releasetime":{"order":"desc"}}] }`