Skip to content

Commit 0c4bbe0

Browse files
committed
修复hg-ha bug fix #192
1 parent e415a32 commit 0c4bbe0

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

internal/app/miit/miit.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
package miit
22

33
import (
4-
"github.com/tidwall/gjson"
5-
"github.com/wgpsec/ENScan/common"
6-
"github.com/wgpsec/ENScan/common/gologger"
74
urlTool "net/url"
85
"strconv"
96
"time"
7+
8+
"github.com/tidwall/gjson"
9+
"github.com/wgpsec/ENScan/common"
10+
"github.com/wgpsec/ENScan/common/gologger"
1011
)
1112

1213
type Miit struct {
@@ -26,7 +27,7 @@ func (h *Miit) GetInfoByPage(keyword string, page int, em *common.EnsGo) (info c
2627
url := h.Options.ENConfig.App.MiitApi + "/query/" + em.Api + "?page=" + strconv.Itoa(page) + "&search=" + urlTool.QueryEscape(keyword)
2728
content := h.getReq(url+"&page=1", "")
2829
var listData []gjson.Result
29-
data := gjson.Get(content, "data")
30+
data := gjson.Get(content, "params")
3031
listData = data.Get("list").Array()
3132
info = common.InfoPage{
3233
Total: data.Get("total").Int(),
@@ -41,7 +42,7 @@ func (h *Miit) getInfoList(keyword string, types string, options *common.ENOptio
4142
url := options.ENConfig.App.MiitApi + "/query/" + types + "?page=1&search=" + urlTool.QueryEscape(keyword)
4243
content := h.getReq(url+"&page=1", "")
4344
var listData []gjson.Result
44-
data := gjson.Get(content, "data")
45+
data := gjson.Get(content, "params")
4546
listData = data.Get("list").Array()
4647
if data.Get("hasNextPage").Bool() {
4748
for i := 2; int(data.Get("pages").Int()) >= i; i++ {

0 commit comments

Comments
 (0)