import { AxiosResponse } from 'axios' ; import debug from 'debug' ; import { Send } from '../interfaces/send' ; import { ajax } from '@/utils/ajax' ; const Debugger = debug ( 'push:server-chan-turbo' ) ; author CaoMeiYouRen
 *  date export class export class ServerChanTurbo implements Send { author CaoMeiYouRen
     *  date param SCTKEY constructor ( SCTKEY ) { this . SCTKEY = SCTKEY ; Debugger ( 'set SCTKEY: "%s"' , SCTKEY ) ; if ( ! this . SCTKEY ) { throw new Error ( 'SCTKEY 是必须的！' ) ; } } private private SCTKEY : string ; author CaoMeiYouRen
     *  date param text param desp async send ( text , desp = '' ) { Debugger ( 'text: "%s", desp: "%s"' , text , desp ) ; return ajax ( { url : `https://sctapi.ftqq.com/${ this . SCTKEY }.send` , method : 'POST' , headers : { 'Content-Type' : 'application/x-www-form-urlencoded' , } , data : { text , desp , } , } ) ; } }