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

Skip to content

Commit cf6a8d5

Browse files
优化细节
1 parent d355f7f commit cf6a8d5

5 files changed

Lines changed: 24 additions & 14 deletions

File tree

ONE-tool/ONE-Tool.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,13 @@ const changePicBg = true //选择true时,使用透明背景
1212
const ImageMode = false //选择true时,使用必应壁纸
1313
const previewSize = "Medium" //预览大小
1414
const colorMode = false // 是否是纯色背景
15+
16+
//*********使用前准备工作*********//
1517
const User = 'Nicolas-kings'
1618
const City = 'shenzhen'
1719
const WeatherKey = ' ' // 这里输入和风天气apikey https://dev.heweather.com/
20+
21+
1822
// const AQIToken = '' // you can get it from https://aqicn.org/data-platform/token/#/
1923
const padding = {
2024
top: 0,

cuntdown/cuntdown.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,13 @@ const ImageMode = false //选择true时,使用必应壁纸
1212
const previewSize = "Small" //预览大小
1313
const colorMode = false // 是否使用纯色背景
1414
const bgColor = new Color("000000") // 小组件背景色
15+
16+
//*********使用前准备工作*********//
1517
const endDate = '02/12/2021 00:00:00 AM'; //设定的倒计时时间
16-
const fontColor = Color.white() //new Color("#918A8A")
1718
const daysTillText = '距离春节' //倒计时文案
19+
20+
21+
const fontColor = Color.white() //new Color("#918A8A")
1822
const logoUrl = ''
1923
const widgetUrl = "https://nkupp.com" //跳转URL
2024
// const daysFont = Font.ultraLightSystemFont(70)

捷径盒数据看板/捷径盒数据.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,11 @@ const ImageMode = true //选择true时,使用必应壁纸
1111
const previewSize = "Medium" //预览大小
1212
const colorMode = false // 是否是纯色背景
1313
const bgColor = new Color("000000") // 小组件背景色
14+
15+
//*********使用前准备工作*********//
1416
const userId = '1792466836' //"2778959669" //输入捷径盒userID
17+
18+
1519
let res = await getData()
1620
let widgeturl = res.badges[0].url
1721
const padding = {

捷径社区数据看板/捷径社区数据.js

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,7 @@
33
// icon-color: blue; icon-glyph: award;
44
// author:Nicolas-kings
55
// ver:1.0.0 2020/11/20
6-
//*********使用前准备工作*********//
7-
//请前往代码的272/291行输入抓包获取的cookie
8-
//请前往代码的277/297行输入抓包获取的x-token
9-
//以及第20行处输入user_id
6+
107
const filename = `${Script.name()}.jpg`
118
const files = FileManager.local()
129
const path = files.joinPath(files.documentsDirectory(), filename)
@@ -16,7 +13,9 @@ const previewSize = "Medium" //预览大小
1613
const colorMode = false // 是否是纯色背景
1714
const bgColor = new Color("000000") // 小组件背景色
1815

19-
16+
//*********使用前准备工作*********//
17+
const token = '' //抓包获取token
18+
const cookie= '' //抓包获取cookie
2019
const userId = '' //输入捷径社区id https://sharecuts.cn/user/94lVdg6zgq
2120

2221
const api = 'https://api.sharecuts.cn/'
@@ -272,9 +271,9 @@ async function getData() {
272271
wakeRequest.headers = {
273272
"Accept": "*/*",
274273
"Content-Type": 'application/json',
275-
"Cookie":' ', //抓包获取的cookie
274+
"Cookie":cookie, //抓包获取的cookie
276275
"User-Agent":'Sharecuts/1.4.13 (tech.miidii.Sharecuts; build:120; iOS 14.2.0) Alamofire/5.0.0',
277-
"X-Token":' ', //抓包获取的token
276+
"X-Token":token, //抓包获取的token
278277
"X-User": userId
279278
}
280279
return await wakeRequest.loadJSON()
@@ -289,9 +288,9 @@ async function getDown() {
289288
wakeRequest.headers = {
290289
"Accept": "*/*",
291290
"Content-Type": 'application/json',
292-
"Cookie":' ', //抓包获取的cookie
291+
"Cookie":cookie, //抓包获取的cookie
293292
"User-Agent":'Sharecuts/1.4.13 (tech.miidii.Sharecuts; build:120; iOS 14.2.0) Alamofire/5.0.0',
294-
"X-Token":'', //抓包获取的token
293+
"X-Token":token, //抓包获取的token
295294
"X-User": userId
296295

297296
}

每日油价/oilprice.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,10 @@ const previewSize = "Medium" //预览大小 Small/Medium
1111
const colorMode = false // 是否使用纯色背景
1212
const bgColor = new Color("000000") // 小组件背景色
1313

14-
//输入要查询的省份
15-
const prov = '广东'
14+
//*********使用前准备工作*********//
15+
const prov = '广东' //输入要查询的省份
16+
const api_key = '' //前往天行数据申请apikey https://www.tianapi.com/apiview/104
1617

17-
//前往天行数据申请apikey https://www.tianapi.com/apiview/104
18-
const api_key = ''
1918
const size = previewSize
2019
let data = await fetchData()
2120
console.log(`\u6b22\u8fce\u4f7f\u7528\u6bcf\u65e5\u6cb9\u4ef7\u0026\u0023\u0031\u0038\u0033\u003b\u6765\u6e90\u4e8e\u516c\u4f17\u53f7\u0020\u002d\u0020\u66f0\u575b`)

0 commit comments

Comments
 (0)