|
@@ -125,7 +125,14 @@ CMD.runTask = async function(t_data,main_info,PlatformInfo,call_back){
|
|
|
let chapter_info = await require('../src/api/yw/get_book_tg_chapter_id').get_book_tg_chapter_id(t_data.product_id)
|
|
|
console.log("main_info.yw_id:",main_info.yw_id)
|
|
|
console.log("chapter_info:",chapter_info)
|
|
|
- await require('../src/api/yw/switchApp').switchApp(main_info.yw_id)
|
|
|
+ let coopid = 24
|
|
|
+ if(main_info.pay_type==0){
|
|
|
+ coopid = 29
|
|
|
+ }else{
|
|
|
+ coopid = 24
|
|
|
+ }
|
|
|
+
|
|
|
+ await require('../src/api/yw/switchApp').switchApp(main_info.yw_id,coopid)
|
|
|
let timestamp = helper.getCurrentUnixTimestamp()
|
|
|
let tg_link_config = JSON.parse(main_info.tg_link_config)
|
|
|
let chongzhi_id = tg_link_config['chongzhi_id']
|
|
@@ -193,6 +200,19 @@ CMD.runTask = async function(t_data,main_info,PlatformInfo,call_back){
|
|
|
"channel_type": 1,
|
|
|
"force_style": "1"
|
|
|
};
|
|
|
+
|
|
|
+ if(main_info.pay_type==0){
|
|
|
+ postData = {
|
|
|
+ "cost": 0,
|
|
|
+ "name": `${promotion_name}_${main_info.id}`,
|
|
|
+ "cbid": t_data.product_id,
|
|
|
+ "ccid": chapter_info.ccid,
|
|
|
+ "page_name": `《${t_data.product_name}》第1章 01`,
|
|
|
+ "backup_book_status": 2,
|
|
|
+ "channel_type": 1,
|
|
|
+ "force_style": "1"
|
|
|
+ };
|
|
|
+ }
|
|
|
console.log("postData:",postData)
|
|
|
|
|
|
let response = await fetch("https://open.yuewen.com/api/miniappspread/addH5Spread", {
|