1+ // Todo: 待添加多账号签到
2+
13const cookieName = '趣头条'
24const signurlKey = 'senku_signurl_qtt'
35const signheaderKey = 'senku_signheader_qtt'
@@ -16,6 +18,7 @@ let playUrl = [adUrl.concat("&pos=one"), adUrl.concat("&pos=two"), adUrl.concat(
1618 senku . log ( `🔔 ${ cookieName } ` )
1719 await signDay ( )
1820 await signHour ( )
21+ await signLucky ( )
1922 await play ( )
2023 await getinfo ( )
2124
@@ -60,6 +63,26 @@ function signHour() {
6063 } )
6164}
6265
66+ function signLucky ( ) {
67+ return new Promise ( ( resolve , reject ) => {
68+ const luckyUrlVal = signurlVal . replace ( "api.1sapp.com/sign/sign" , "qtt-turntable.qutoutiao.net/press_trigger" )
69+ signheaderVal . Host = "qtt-turntable.qutoutiao.net"
70+ const url = { url : luckyUrlVal , headers : JSON . parse ( signheaderVal ) }
71+ senku . get ( url , ( error , response , data ) => {
72+ try {
73+ senku . log ( `❕ ${ cookieName } signLucky - response: ${ JSON . stringify ( response ) } ` )
74+ signinfo . signLucky = JSON . parse ( data )
75+ resolve ( )
76+ } catch ( e ) {
77+ senku . msg ( cookieName , `幸运转盘: 失败` , `说明: ${ e } ` )
78+ senku . log ( `❌ ${ cookieName } signLucky - 幸运转盘失败: ${ e } ` )
79+ senku . log ( `❌ ${ cookieName } signLucky - response: ${ JSON . stringify ( response ) } ` )
80+ resolve ( )
81+ }
82+ } )
83+ } )
84+ }
85+
6386function getinfo ( ) {
6487 return new Promise ( ( resolve , reject ) => {
6588 const url = { url : getinfoUrlVal , headers : JSON . parse ( signheaderVal ) }
@@ -111,9 +134,9 @@ function play() {
111134function tTime ( timestamp ) {
112135 const date = new Date ( timestamp * 1000 )
113136 const M = ( date . getMonth ( ) + 1 < 10 ? '0' + ( date . getMonth ( ) + 1 ) : date . getMonth ( ) + 1 ) + '-'
114- const D = date . getDate ( ) + '- '
137+ const D = ( date . getDate ( ) + 1 < 10 ? '0' + ( date . getDate ( ) + 1 ) : date . getDate ( ) + 1 ) + ' '
115138 const h = date . getHours ( ) + ':'
116- const m = date . getMinutes ( ) + ''
139+ const m = ( date . getMinutes ( ) + 1 < 10 ? '0' + ( date . getMinutes ( ) + 1 ) : date . getMinutes ( ) + 1 ) + ''
117140 return M + D + h + m
118141}
119142
@@ -149,6 +172,16 @@ function showmsg() {
149172 detail += `时段签到:获得${ amount } 💰,下次签到:${ next_time } `
150173 } else subTitle += '时段:🔕'
151174
175+ // signLuckMsg
176+ subTitle += subTitle == '' ? '' : ', '
177+ if ( signinfo . signLucky && signinfo . signLucky == 1 ) {
178+ subTitle += `幸运转盘:✅`
179+ detail += detail == '' ? '' : ','
180+ const amount_coin = signinfo . signLucky . amount_coin
181+ const count = signinfo . signLucky . count
182+ const count_limit = signinfo . signLucky . count_limit
183+ detail += `幸运转盘:获得${ amount_coin } ,抽奖情况:${ count } /${ count_limit次 } `
184+ } else subTitle += `转盘:次数上限`
152185 // playAdsMsg
153186 subTitle += subTitle == '' ? '' : ', '
154187 if ( signinfo . playList ) {
0 commit comments