sbd-npm 1.5.1 → 1.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/util.js +7 -1
package/package.json
CHANGED
package/util.js
CHANGED
|
@@ -191,8 +191,14 @@ const Util = {
|
|
|
191
191
|
html.push('<div class="list-group">');
|
|
192
192
|
if (j.data && j.data.length > 0) {
|
|
193
193
|
j.data.forEach(function (item) {
|
|
194
|
+
let href = "";
|
|
194
195
|
let upper_code = item.code.toUpperCase();
|
|
195
|
-
|
|
196
|
+
if (item.type && item.type === 1) {
|
|
197
|
+
href = Util.get_url("fund_public") + "?fund_code=" + upper_code;
|
|
198
|
+
} else {
|
|
199
|
+
href = "/stock/" + upper_code;
|
|
200
|
+
}
|
|
201
|
+
html.push('<a target="_blank" rel="noopener noreferrer nofollow" class="list-group-item" href="', href, '">', (item.name ? item.name : upper_code), '(', upper_code, ')</a>');
|
|
196
202
|
});
|
|
197
203
|
} else {
|
|
198
204
|
html.push('<a href="#" class="list-group-item disabled">无数据</a>');
|