Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 99bcb11

Browse files
修复ONE-Tool报错
1 parent 7ad8589 commit 99bcb11

3 files changed

Lines changed: 8 additions & 7 deletions

File tree

ONE-tool/ONE-Tool.Enc.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,13 @@
88
************ © 2023 Copyright Nicolas-kings ************/
99
/********************************************************
1010
* script : ONE-Tool.js
11-
* version : 1.8.1
11+
* version : 1.8.2
1212
* author : Nicolas-kings
1313
* date : 2021-04-05
1414
* desc : 具体配置说明,详见微信公众号-曰(读yue)坛
1515
* github : https://github.com/Nicolasking007/Scriptable
16-
* Changelog : v1.8.1 - 新增彩云天气版,打印日志调整、其他细节优化
16+
* Changelog : v1.8.2 - 修复情话报错
17+
* v1.8.1 - 新增彩云天气版,打印日志调整、其他细节优化
1718
* v1.8 - 修复背景报错,新增多个图片背景选项
1819
* v1.7 - 压缩代码,便于复制
1920
* v1.6 - 优化背景逻辑
@@ -63,7 +64,7 @@ const lockLocation = false
6364
//##############用户自定义参数配置模块-结束##############
6465
const filename = Script.name()
6566
const files = FileManager.local()
66-
const localversion = '1.8.1'
67+
const localversion = '1.8.2'
6768
const path = files.joinPath(files.documentsDirectory(), filename)
6869
const versionData = await getversion()
6970
const needUpdated = await updateCheck(localversion)
@@ -289,7 +290,7 @@ async function createWidget() {
289290
lunartime.textColor = new Color('#C6FFDD')
290291
lunartime.font = new Font('Menlo', 11)
291292

292-
const honey = widget.addText(`[🐷]${honeyData.ishan}`)
293+
const honey = widget.addText(`[🐷]${honeyData.data.content}`)
293294
honey.textColor = new Color('#BBD676')
294295
honey.font = new Font('Menlo', 11)
295296
honey.lineLimit = 1
@@ -480,7 +481,7 @@ async function gethoney() {
480481
const honeyCachePath = files.joinPath(files.documentsDirectory(), "honey-NK")
481482
var honeyData
482483
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()
484485
files.writeString(honeyCachePath, JSON.stringify(honeyData))
485486
log("[+]情话信息获取成功")
486487
} catch (e) {

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<div align="center">
2-
<img src="https://pic8.58cdn.com.cn/nowater/webim/big/n_v21b56c7a316d74d89aa99621de9dce00b.png" alt="Scriptable" style="width: 120px;height: 120px; overflow: hidden;display: inline-block;vertical-align: middle;">
2+
<img src="https://s2.loli.net/2024/03/23/2H8bLdCrGKjh1zo.png" alt="Scriptable" style="width: 120px;height: 120px; overflow: hidden;display: inline-block;vertical-align: middle;">
33
</br>
44
</br>
55
</div>

install.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"icon": "https://pic.rmb.bdstatic.com/bjh/6a9bfc89880d4a776f6406dd10249483.jpeg",
77
"apps": [
88
{
9-
"version": "1.8",
9+
"version": "1.8.2",
1010
"author": "Nicolas-kings",
1111
"description": "一个整合欢迎语、农历时间、每日情话、当日天气、手机电量、今年百分比的小组件",
1212
"scriptURL": "https://raw.githubusercontent.com/Nicolasking007/Scriptable/main/ONE-tool/ONE-Tool.Enc.js",

0 commit comments

Comments
 (0)