@tencent-map/lbs-skills 0.0.7 → 0.0.8
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/bin/cli.js +10 -4
- package/package.json +1 -1
package/bin/cli.js
CHANGED
|
@@ -326,10 +326,11 @@ async function cmdNearby(args) {
|
|
|
326
326
|
keyword = (args.location || '') + (args.keywords || '');
|
|
327
327
|
}
|
|
328
328
|
|
|
329
|
-
const
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
329
|
+
const params = new URLSearchParams();
|
|
330
|
+
params.set('keyword', keyword);
|
|
331
|
+
params.set('radius', args.radius || 1000);
|
|
332
|
+
params.set('code', lib.encodeKey(key));
|
|
333
|
+
const url = `https://mapapi.qq.com/web/claw/nearby-search.html?${params.toString()}`;
|
|
333
334
|
|
|
334
335
|
console.log(`\n🔍 已生成周边搜索链接:\n`);
|
|
335
336
|
console.log(` ${url}\n`);
|
|
@@ -491,6 +492,11 @@ async function main() {
|
|
|
491
492
|
const argv = process.argv.slice(2);
|
|
492
493
|
const command = argv[0];
|
|
493
494
|
|
|
495
|
+
if (command === '--version' || command === '-v') {
|
|
496
|
+
console.log(version);
|
|
497
|
+
return;
|
|
498
|
+
}
|
|
499
|
+
|
|
494
500
|
if (!command || command === '--help' || command === '-h') {
|
|
495
501
|
console.log(HELP);
|
|
496
502
|
return;
|