Skip to content

Commit

Permalink
更新重试次数为3次,调整相似度表单适合手机查看
Browse files Browse the repository at this point in the history
  • Loading branch information
axiaoxin committed Jul 14, 2021
1 parent 8ee5316 commit 1acc289
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 14 deletions.
2 changes: 2 additions & 0 deletions core/searcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ func (s Searcher) SearchFunds(ctx context.Context, fundCodes []string) (map[stri
retry.OnRetry(func(n uint, err error) {
logging.Errorf(ctx, "retry#%d: code:%v %v\n", n, code, err)
}),
retry.Attempts(3),
retry.Delay(500*time.Millisecond),
)
if err != nil {
logging.Errorf(ctx, "SearchFunds QueryFundInfo code:%v err:%v", code, err)
Expand Down
2 changes: 1 addition & 1 deletion statics/html/fund_index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ <h4>4433法则</h4>
<div id="index_content" class="row">
<div class="col s12">
<ul class="tabs">
<li class="tab col s4 l3"><a href="#4433">4433基金列表</a></li>
<li class="tab col s4 l3"><a href="#4433">4433基金</a></li>
<li class="tab col s4 l3"><a href="#fundfilter">基金严选</a></li>
<li class="tab col s4 l3"><a href="#fundcheck">基金检测</a></li>
<li class="tab col s4 l3"><a href="#fundsim">持仓相似度</a></li>
Expand Down
16 changes: 3 additions & 13 deletions statics/html/fund_similarity.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,17 @@ <h4 class="center">基金<span onclick="$('#desc_similarity').tapTarget('open')"
<table class="striped centered">
<thead>
<tr>
<th>基金代码</th>
<th>基金名称</th>
<th>持仓股票</th>
<th>重复持仓</th>
<th>持仓相似度</th>
<th width="35%">基金名称</th>
<th width="35%">重复持仓</th>
<th width="30%">持仓相似度</th>
</tr>
</thead>
<tbody>
{{ range .Result }}
<tr>
<td>
<span class="copybtn waves-effect waves-red" data-clipboard-text="{{ .Fund.Code }}">{{ .Fund.Code }}<i class="material-icons tiny">content_copy</i></span>
</td>
<td>
<a target="_blank" href="http://fund.eastmoney.com/{{ .Fund.Code }}.html">{{ .Fund.Name }}</a>
</td>
<td>
{{ range $i, $s := .Fund.Stocks }}
{{ $i }}.{{ $s.Name }}</br>
{{ end }}
</td>
<td>
{{ range $i, $s := .SameStocks }}
{{ $i }}.{{ $s }}</br>
Expand Down

0 comments on commit 1acc289

Please sign in to comment.