1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- //执行一个创建七猫链接任务
- const axios = require('axios');
- const helper = require('../src/helper');
- const config = require('../etc/config.json')
- const HttpClient = require('../src/HttpClient')
- const CMD = {}
- CMD.runTask = async function(data,main_info,PlatformInfo,call_back){
- let tg_link_config = JSON.parse(main_info.tg_link_config)
- let chongzhi_id = tg_link_config['chongzhi_id']
- let chongzhi_list = JSON.parse(PlatformInfo.chongzhi)
- let chongzhi_name = null
- let recharge_template_id = ""
- let appid = main_info.app_id
- for (let index = 0; index < chongzhi_list.length; index++) {
- const cz_obj = chongzhi_list[index];
- if(cz_obj.id==chongzhi_id){
- chongzhi_name = cz_obj.name
- recharge_template_id = cz_obj.value
- break
- }
- }
- try {
- let client = new HttpClient()
- let response = await client.request(config.qimao_config.create_link_host,{
- admin_account_name:config.qimao_config.admin_account_name,
- project:6, //6 - 抖音小程序 8 - 微信小程序
- appid:appid,
- // create_time_start:0,
- // create_time_end:0,
- // last_modify_time_start:0,
- // last_modify_time_end:0,
- // page:0,
- // page_size:0
- })
- return response
- } catch (error) {
- console.error('fq_create_link :Error:', error);
- // 处理错误
- }
- }
- module.exports = CMD;
|