Skip to content

Commit 4b04c63

Browse files
author
ziye66666
authored
多看点 修复碎片兑换问题
1 parent b92ef82 commit 4b04c63

1 file changed

Lines changed: 10 additions & 5 deletions

File tree

Task/duokandian.js

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ boxjs链接 https://raw.githubusercontent.com/ziye66666/JavaScript/main/Task/zi
1616
2.12 增加碎片显示以及兑换
1717
2.14 修复宝箱问题
1818
2.16 修复报错
19-
2.18 修复碎片兑换问题
20-
2.19 调整
19+
2.19 修复碎片兑换问题
2120
2221
⚠️一共1个位置 1个ck 👉 2条 Secrets
2322
多账号换行
@@ -76,6 +75,10 @@ duokandianheaderVal = {
7675
'User-Agent': `duokandian/3.0.2 (com.duoyou.duokandian1; build:0; iOS 14.2.0) Alamofire/5.4.0`,
7776
'Accept-Language': `zh-Hans-CN;q=1.0`
7877
};
78+
79+
duokandianspdhheaderVal = {"Accept": "application/json, text/plain, */*","Accept-Encoding": "gzip, deflate","Accept-Language": "zh-cn","Connection": "close","Content-Length": "8","Content-Type": "application/json;charset=utf-8","Host": "dkd-api.dysdk.com","Origin": "http://dkd-api.dysdk.com","Referer": "http://dkd-api.dysdk.com/index.html","User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 14_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148"};
80+
81+
7982
if ($.isNode()) {
8083
// 没有设置 DKD_duokandianCASH 则默认为 0 不提现
8184
CASH = process.env.DKD_duokandianCASH || 0;
@@ -299,7 +302,7 @@ async function all() {
299302
if ($.lottoindex.data && $.lottoindex.data.times >= 1) {
300303
await lotto(); //转盘抽奖
301304
}
302-
if ($.lottoindex.data && $.lottoindex.data.chip >= 4) {
305+
if ($.lottoindex.data && $.lottoindex.data.chip >= 4 ) {
303306
await chip(); //碎片兑换
304307
}
305308

@@ -623,10 +626,12 @@ function lotto(timeout = 0) {
623626
function chip(timeout = 0) {
624627
return new Promise((resolve) => {
625628
setTimeout(() => {
629+
626630
let url = {
627631
url: `http://dkd-api.dysdk.com/lotto/convert?${duokandianbodyVal}`,
628-
headers: duokandianheaderVal,
629-
body: `{"id": 4}`,
632+
headers: duokandianspdhheaderVal,
633+
body: `{"id":4}`,
634+
630635
}
631636
$.post(url, async (err, resp, data) => {
632637
try {

0 commit comments

Comments
 (0)