1234567891011121314151617181920212223242526272829303132333435 |
- const CMD = {}
- const HttpClient = require('../../../src/HttpClient')
- const config = require('../../../etc/config.json')
- const helper = require('../../helper')
- // 获取点众回传模板
- CMD.get_callback_template = async function(channelId,call_back){
- let clinet = new HttpClient()
- let timestamp = helper.getCurrentUnixTimestamp()
- let signKey = helper.md5(config.dianzhong_config.clientId+config.dianzhong_config.token+timestamp)
- let response = await clinet.post(config.dianzhong_config.callbacklist_hots,{
- channelId:channelId,
- clientId:config.dianzhong_config.clientId,
- timestamp:timestamp,
- type:config.dianzhong_config.type,
- signKey:signKey
- })
- call_back(response)
- }
- // 获取点众免费回传模板
- CMD.get_mf_callback_template = async function(channelId,call_back){
- let clinet = new HttpClient()
- let timestamp = helper.getCurrentUnixTimestamp()
- let signKey = helper.md5(config.dianzhong_mf_channel_config.clientId+config.dianzhong_mf_channel_config.token+timestamp)
- let response = await clinet.post(config.dianzhong_config.callbacklist_hots,{
- channelId:channelId,
- clientId:config.dianzhong_mf_channel_config.clientId,
- timestamp:timestamp,
- type:config.dianzhong_config.type,
- signKey:signKey
- })
- call_back(response)
- }
- module.exports = CMD;
|