-
Notifications
You must be signed in to change notification settings - Fork 15
/
unicomFee.js
17 lines (16 loc) · 1.1 KB
/
unicomFee.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/*
cron 20 * * *
*/
const notify = require('./sendNotify')
const request = require('axios')
const payload = "duanlianjieabc=&channelCode=&serviceType=&saleChannel=&externalSources=&contactCode=&ticket=&ticketPhone=&ticketChannel=&userNumber=&language=chinese"
const header = {
"Cookie":process.env.UNICOM_TOKEN,
"User-Agent":"Mozilla/5.0 (iPhone; CPU iPhone OS 15_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 unicom{version:[email protected]}"
}
request.post("https://m.client.10010.com/servicequerybusiness/balancenew/accountBalancenew.htm",payload,{headers:header}).then((res)=>{
var res = res.data
var report = '剩余话费:'+res.curntbalancecust+',当月支出:'+res.allbillfee+',(其中上网费:'+res.realTimeFeeSpecialFlagThree[0].bill.billfee+',月固定费:'+res.realTimeFeeSpecialFlagThree[1].bill.billfee+',语音通话:'+res.realTimeFeeSpecialFlagThree[2].bill.billfee+',)当月存入:'+res.monthlyRechargeBill+',上月余额:'+res.carryForwardFromLastMonth
console.log(report)
notify.sendNotify('联通账单简报',report)
})