|
@@ -588,6 +588,28 @@ CMD.hy_topUpTemplate = async function(res,accountId) {
|
|
|
res.end(JSON.stringify({ message:"成功!",data:list,code:10000}));
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+
|
|
|
+ CMD.get_match_book_info = async function(res,book_id,platform) {
|
|
|
+ let book_info = null
|
|
|
+ if(platform==config.platform_fanqie){
|
|
|
+ book_info = await require('../src/api/fq/fq_search_book').根据番茄付费ID查询免费书籍(book_id)
|
|
|
+ }else if(platform==config.platform_fanqiemf){
|
|
|
+ book_info = await require('../src/api/fq/fq_search_book').根据番茄免费ID查询付费书籍(book_id)
|
|
|
+ }else if(platform==config.platform_qimao){
|
|
|
+ book_info = await require('../src/api/qm_mf/qm_mf_search_book').根据七猫付费ID查询免费书籍(book_id)
|
|
|
+ }else if(platform==config.platform_qmmf){
|
|
|
+ book_info = await require('../src/api/qm/qm_search_book').根据七猫免费D查询付费书籍(book_id)
|
|
|
+ }
|
|
|
+ res.writeHead(200, {'Content-Type': 'application/json'});
|
|
|
+ if(book_info==null){
|
|
|
+ res.end(JSON.stringify({ message:"没找到对应的匹配书籍!",data:{},code:10001}));
|
|
|
+ }else{
|
|
|
+ res.end(JSON.stringify({ message:"成功!",data:book_info,code:10000}));
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
CMD.get_zy_recharge_template = async function(res,user_id,page,size) {
|
|
|
let token = await require('../src/api/zy/get_zy_token').get_token()
|
|
|
let clinet = tools.getOneNewClinet()
|
|
@@ -764,7 +786,11 @@ var server = http.createServer(function(req,res){
|
|
|
CMD.get_zy_callback_template(res,owner,page,size)
|
|
|
}else if(jsonData['fun']=="get_zy_account_list"&&jsonData['cmd']=="zy_link"){
|
|
|
CMD.get_zy_account_list(res)
|
|
|
- }else{
|
|
|
+ }else if(jsonData['fun']=="get_match_book_info"&&jsonData['cmd']=="match"){
|
|
|
+ let book_id = jsonData['data']['book_id']
|
|
|
+ let platform = parseInt(jsonData['data']['platform'])
|
|
|
+ await CMD.get_match_book_info(res,book_id,platform)
|
|
|
+ } else{
|
|
|
res.writeHead(200, {'Content-Type': 'application/json'});
|
|
|
res.end(JSON.stringify({ message: 'fun 错误',code:100}));
|
|
|
}
|