sbd-npm 1.1.54 → 1.1.55
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 +20 -1
package/package.json
CHANGED
package/util.js
CHANGED
@@ -261,13 +261,32 @@ const Util = {
|
|
261
261
|
return location;
|
262
262
|
}
|
263
263
|
if (location_name === "") {
|
264
|
-
location_name = location.length >
|
264
|
+
location_name = location.length > 10 ? location.substr(0, 10) : location;
|
265
265
|
}
|
266
266
|
return "<a target='_blank' class='link_cls map_link' rel='noopener noreferrer nofollow' href='https://map.baidu.com/m?fr=ps01000&word=" + location + "'>" + location_name + "</a>";
|
267
267
|
}
|
268
268
|
return "--";
|
269
269
|
},
|
270
270
|
|
271
|
+
/**
|
272
|
+
* 谷歌Google地图链接地址
|
273
|
+
* @param location
|
274
|
+
* @param location_name
|
275
|
+
* @returns {string}
|
276
|
+
*/
|
277
|
+
google_map_url: function (location, location_name = "") {
|
278
|
+
if (location) {
|
279
|
+
if (location === "--") {
|
280
|
+
return location;
|
281
|
+
}
|
282
|
+
if (location_name === "") {
|
283
|
+
location_name = location.length > 10 ? location.substr(0, 10) : location;
|
284
|
+
}
|
285
|
+
return "<a target='_blank' class='link_cls map_link' rel='noopener noreferrer nofollow' href='https://www.google.com/maps?&hl=zh-Hans&q=" + location + "'>" + location_name + "</a>";
|
286
|
+
}
|
287
|
+
return "--";
|
288
|
+
},
|
289
|
+
|
271
290
|
/**
|
272
291
|
* 返回股票代码列表
|
273
292
|
* @param obj
|