|
@@ -20,19 +20,36 @@ CMD.runTask = async function(t_data,main_info,PlatformInfo,call_back){
|
|
|
let unlock_gradients = zy_conifg.unlock_gradients
|
|
|
let free_word_count = zy_conifg.free_word_count
|
|
|
let start_pay_section = zy_conifg.start_pay_section!=0?zy_conifg.start_pay_section:book_info.data.default_pay_section
|
|
|
- let response = await clinet.post(`https://openapi-gaia.zhangyue.com/opendata/reseller/free/book/link/create`,{
|
|
|
- access_token:token,
|
|
|
- name:`${t_data.product_name}_${main_info.id}`,
|
|
|
- source:"toutiao2", //媒体 - 抖音小程序 只能使用 "toutiao2" - 微信小程序可选项如下 - bili B站/ - toutiao2 头条2.0 - gdt3 广点通3.0
|
|
|
- start_pay_section:start_pay_section, //开始付费章节
|
|
|
- book_chapter:zy_conifg.book_chapter, //调起章节
|
|
|
- book_id:parseInt(t_data.product_id),
|
|
|
- callback_conf_reseller_id:zy_conifg.callback_conf_reseller_id, //回传策略ID
|
|
|
- owner:zy_conifg.owner, //创建用户id
|
|
|
- app_key:zy_conifg.app_key, //应用Key
|
|
|
- free_word_count:free_word_count, //超短篇免费字数
|
|
|
- unlock_gradients:unlock_gradients //[{"end_unlock_count":999,"start_unlock_count":0,"unlock_word_count":80}] //超短篇单本书解锁次数
|
|
|
- })
|
|
|
+ let post_data = {}
|
|
|
+ if(book_info.data.totalChapterNum==0){
|
|
|
+ post_data = {
|
|
|
+ access_token:token,
|
|
|
+ name:`${t_data.product_name}_${main_info.id}`,
|
|
|
+ source:"toutiao2", //媒体 - 抖音小程序 只能使用 "toutiao2" - 微信小程序可选项如下 - bili B站/ - toutiao2 头条2.0 - gdt3 广点通3.0
|
|
|
+ start_pay_section:start_pay_section, //广告解锁章节
|
|
|
+ book_chapter:zy_conifg.book_chapter, //调起章节
|
|
|
+ book_id:parseInt(t_data.product_id),
|
|
|
+ callback_conf_reseller_id:zy_conifg.callback_conf_reseller_id, //回传策略ID
|
|
|
+ owner:zy_conifg.owner, //创建用户id
|
|
|
+ app_key:zy_conifg.app_key, //应用Key
|
|
|
+ free_word_count:free_word_count, //超短篇免费字数
|
|
|
+ unlock_gradients:unlock_gradients //[{"end_unlock_count":999,"start_unlock_count":0,"unlock_word_count":80}] //超短篇单本书解锁次数
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ post_data = {
|
|
|
+ access_token:token,
|
|
|
+ name:`${t_data.product_name}_${main_info.id}`,
|
|
|
+ source:"toutiao2", //媒体 - 抖音小程序 只能使用 "toutiao2" - 微信小程序可选项如下 - bili B站/ - toutiao2 头条2.0 - gdt3 广点通3.0
|
|
|
+ start_pay_section:start_pay_section, //广告解锁章节
|
|
|
+ book_chapter:zy_conifg.book_chapter, //调起章节
|
|
|
+ book_id:parseInt(t_data.product_id),
|
|
|
+ callback_conf_reseller_id:zy_conifg.callback_conf_reseller_id, //回传策略ID
|
|
|
+ owner:zy_conifg.owner, //创建用户id
|
|
|
+ app_key:zy_conifg.app_key, //应用Key
|
|
|
+ }
|
|
|
+ }
|
|
|
+ // console.log("post_data:",post_data)
|
|
|
+ let response = await clinet.post(`https://openapi-gaia.zhangyue.com/opendata/reseller/free/book/link/create`,post_data)
|
|
|
let promotion_info = null
|
|
|
if(response.data.code!=0){
|
|
|
console.error("get_zy_account_list error:",response)
|