|
8 | 8 | ************ © 2023 Copyright Nicolas-kings ************/ |
9 | 9 | /******************************************************** |
10 | 10 | * script : ONE-Tool.js |
11 | | - * version : 1.8.1 |
| 11 | + * version : 1.8.2 |
12 | 12 | * author : Nicolas-kings |
13 | 13 | * date : 2021-04-05 |
14 | 14 | * desc : 具体配置说明,详见微信公众号-曰(读yue)坛 |
15 | 15 | * github : https://github.com/Nicolasking007/Scriptable |
16 | | - * Changelog : v1.8.1 - 新增彩云天气版,打印日志调整、其他细节优化 |
| 16 | + * Changelog : v1.8.2 - 修复情话报错 |
| 17 | + * v1.8.1 - 新增彩云天气版,打印日志调整、其他细节优化 |
17 | 18 | * v1.8 - 修复背景报错,新增多个图片背景选项 |
18 | 19 | * v1.7 - 压缩代码,便于复制 |
19 | 20 | * v1.6 - 优化背景逻辑 |
@@ -63,7 +64,7 @@ const lockLocation = false |
63 | 64 | //##############用户自定义参数配置模块-结束############## |
64 | 65 | const filename = Script.name() |
65 | 66 | const files = FileManager.local() |
66 | | -const localversion = '1.8.1' |
| 67 | +const localversion = '1.8.2' |
67 | 68 | const path = files.joinPath(files.documentsDirectory(), filename) |
68 | 69 | const versionData = await getversion() |
69 | 70 | const needUpdated = await updateCheck(localversion) |
@@ -289,7 +290,7 @@ async function createWidget() { |
289 | 290 | lunartime.textColor = new Color('#C6FFDD') |
290 | 291 | lunartime.font = new Font('Menlo', 11) |
291 | 292 |
|
292 | | - const honey = widget.addText(`[🐷]${honeyData.ishan}`) |
| 293 | + const honey = widget.addText(`[🐷]${honeyData.data.content}`) |
293 | 294 | honey.textColor = new Color('#BBD676') |
294 | 295 | honey.font = new Font('Menlo', 11) |
295 | 296 | honey.lineLimit = 1 |
@@ -480,7 +481,7 @@ async function gethoney() { |
480 | 481 | const honeyCachePath = files.joinPath(files.documentsDirectory(), "honey-NK") |
481 | 482 | var honeyData |
482 | 483 | try { |
483 | | - honeyData = await new Request("https://api.vvhan.com/api/love?type=json").loadJSON() |
| 484 | + honeyData = await new Request("https://api.vvhan.com/api/text/love?type=json").loadJSON() |
484 | 485 | files.writeString(honeyCachePath, JSON.stringify(honeyData)) |
485 | 486 | log("[+]情话信息获取成功") |
486 | 487 | } catch (e) { |
|
0 commit comments