11// Todo: 待添加多账号签到
2-
2+ // ToDo: 种菜赚金币
33const cookieName = '趣头条'
44const signKey = 'senku_signKey_qtt'
55const signXTKKey = 'senku_signXTK_qtt'
@@ -18,24 +18,23 @@ const coinUrlVal = 'https://api.1sapp.com/app/ioscoin/getInfo?version=30967000&x
1818const signinfo = { playList : [ ] }
1919const playUrl = [ adUrl + 'pos=one' , adUrl + 'pos=two' , adUrl + 'pos=three' , adUrl + 'pos=four' ]
2020
21-
2221 ; ( sign = async ( ) => {
2322 senku . log ( `🔔 ${ cookieName } ` )
24- // 要获取首页奖励取消下方注释
25- if ( navCoinVal . match ( / \/ x \/ f e e d \/ g e t R e w a r d \? q d a t a = [ a - z A - Z 0 - 9 _ - ] + / ) ) {
23+ if ( navCoinVal != undefined && navCoinVal . match ( / \/ x \/ f e e d \/ g e t R e w a r d \? q d a t a = [ a - z A - Z 0 - 9 _ - ] + / ) ) {
2624 await navCoin ( )
2725 }
26+ if ( readVal != undefined && readVal . match ( / \/ c o n t e n t \/ r e a d V 2 \? q d a t a = [ a - z A - Z 0 - 9 _ - ] + / ) ) {
27+ await read ( )
28+ await getcoininfo ( )
29+ }
2830 await signDay ( )
2931 await signHour ( )
3032 await signLucky ( )
3133 await playone ( )
3234 await playtwo ( )
3335 await playthree ( )
3436 await playfour ( )
35- await read ( )
3637 await getinfo ( )
37- await getcoininfo ( )
38-
3938 showmsg ( )
4039 senku . done ( )
4140 } ) ( ) . catch ( ( e ) => senku . log ( `❌ ${ cookieName } 签到失败: ${ e } ` ) , senku . done ( ) )
@@ -267,7 +266,6 @@ function tTime(timestamp) {
267266function showmsg ( ) {
268267 let subTitle = ''
269268 let detail = ''
270- let moreDetail = ''
271269 // signDayMsg
272270 if ( signinfo . info && signinfo . info . data . signIn . today == 1 ) {
273271 if ( signinfo . signDay . code == 0 ) {
@@ -276,28 +274,25 @@ function showmsg() {
276274 const currentCoin = amount [ continuation ]
277275 const nextCoin = amount [ continuation + 1 ]
278276 const coins = signinfo . info . data . show_balance_info . coins
279- subTitle = '每日:✅'
280- detail += detail == '' ? '' : ', '
277+ subTitle += '每日:✅'
281278 detail += `【每日签到】获得${ currentCoin } 💰,明日可得${ nextCoin } 💰\n`
282279 }
283- else subTitle = '每日:🔄'
280+ else subTitle + = '每日:🔄'
284281 } else {
285- subTitle = '每日:❌'
282+ subTitle + = '每日:❌'
286283 senku . log ( `❌ ${ cookieName } showmsg - 每日签到: ${ JSON . stringify ( signinfo . signDay ) } ` )
287284 }
288285
289286 // signHourMsg
290287 subTitle += subTitle == '' ? '' : ', '
291288 if ( signinfo . signHour && signinfo . signHour . code == 0 ) {
292289 subTitle += '时段:✅'
293- detail += detail == '' ? '' : ','
294290 const amount = signinfo . signHour . data . amount
295291 const next_time = tTime ( signinfo . signHour . data . next_time )
296292 detail += `【时段签到】获得${ amount } 💰,下次签到:${ next_time } \n`
297293 } else subTitle += '时段:🔕'
298294
299295 // readMsg
300- detail += detail == '' ? '' : ','
301296 if ( signinfo . read && signinfo . read . data . status_code == 0 ) {
302297 if ( signinfo . coininfo . data ) {
303298 const desc = signinfo . coininfo . data . content_config . desc
@@ -323,25 +318,26 @@ function showmsg() {
323318 subTitle += subTitle == '' ? '' : ', '
324319 if ( signinfo . signLucky && signinfo . signLucky . code == 1 ) {
325320 subTitle += `幸运转盘:✅`
326- detail += detail == '' ? '' : ','
327321 const amount_coin = signinfo . signLucky . amount_coin
328322 const count = signinfo . signLucky . count
329323 const count_limit = signinfo . signLucky . count_limit
330324 detail += `【幸运转盘】获得${ amount_coin } ,抽奖情况:${ count } /${ count_limit } 次\n`
331325 } else subTitle += `转盘:次数上限`
326+
332327 // playAdsMsg
333328 subTitle += subTitle == '' ? '' : ', '
334329 if ( signinfo . playList ) {
335- subTitle += '广告:✅'
336-
337- const icon = signinfo . info . data . signIn . ext_ad . icon
338- const coins = signinfo . info . data . show_balance_info . coins
339- const continuation = signinfo . info . data . signIn . continuation
340- for ( const poss of icon ) {
341- const time = tTime ( poss . next_time )
342- detail += `【视频广告】下次🕥${ time } 可获得${ poss . amount } 💰\n`
343- }
344- detail += `【账户详情】共计:${ coins } 💰,连续签到${ continuation } 天`
330+ if ( signinfo . playList [ 0 ] . code == 0 ) {
331+ subTitle += '广告:✅'
332+ const icon = signinfo . info . data . signIn . ext_ad . icon
333+ const coins = signinfo . info . data . show_balance_info . coins
334+ const continuation = signinfo . info . data . signIn . continuation
335+ for ( const poss of icon ) {
336+ const time = tTime ( poss . next_time )
337+ detail += `【视频广告】下次🕥${ time } 可获得${ poss . amount } 💰\n`
338+ }
339+ detail += `【账户详情】共计:${ coins } 💰,连续签到${ continuation } 天`
340+ } else if ( signinfo . playList [ 0 ] . code == - 126 ) subTitle += '广告:权限错误'
345341 } else subTitle += '广告:❌'
346342
347343 senku . msg ( cookieName , subTitle , detail )
0 commit comments