Commit 40a744af by 王昆

gsb

parent 0c925a13
...@@ -26,7 +26,7 @@ class APIBase extends DocBase { ...@@ -26,7 +26,7 @@ class APIBase extends DocBase {
let appId = this.trim(params.appId); let appId = this.trim(params.appId);
let timestamp = Number(params.timestamp); let timestamp = Number(params.timestamp);
let nonceStr = Number(params.nonceStr); let nonceStr = this.trim(params.nonceStr);
let now = new Date().getTime(); let now = new Date().getTime();
if (now - timestamp > 60 * 60 * 60 * 1000) { if (now - timestamp > 60 * 60 * 60 * 1000) {
return system.getResultFail(1000000, "请求超时"); return system.getResultFail(1000000, "请求超时");
......
var APIBase = require("../../api.base"); var APIBase = require("../../api.base");
var system = require("../../../system"); var system = require("../../../system");
class TestAPI extends APIBase { class SignAPI extends APIBase {
constructor() { constructor() {
super(); super();
this.signSve = system.getObject("service.sign.signSve"); this.signSve = system.getObject("service.sign.signSve");
...@@ -103,4 +103,4 @@ class TestAPI extends APIBase { ...@@ -103,4 +103,4 @@ class TestAPI extends APIBase {
} }
} }
module.exports = TestAPI; module.exports = SignAPI;
...@@ -96,21 +96,21 @@ class AuthService extends ServiceBase { ...@@ -96,21 +96,21 @@ class AuthService extends ServiceBase {
if (isFee) { if (isFee) {
// 生成订单 // 生成订单
let logres = await this.orderauthlogSve.saveEorderAuthLog({ // let logres = await this.orderauthlogSve.saveEorderAuthLog({
order_id: orderProduct.id, // order_id: orderProduct.id,
product_id: orderProduct.product_id, // product_id: orderProduct.product_id,
platform_name: app.name, // platform_name: app.name,
platform_id: app.id, // platform_id: app.id,
spended_num: trade.trade_amt, // spended_num: trade.trade_amt,
user_name: params.idName, // 使用方 // user_name: params.idName, // 使用方
actual_spend_name: app.merchant_name,// 实际使用方 // actual_spend_name: app.merchant_name,// 实际使用方
engine_trade_id: trade.id, // engine_trade_id: trade.id,
pass: pass ? 1 : 0 // pass: pass ? 1 : 0
}); // });
console.log(logres); // console.log(logres);
} }
// 4. 返回认证结果 // 4. 返回认证结果
return system.getResultSuccess("TODO 返回具体参数", res.msg); return system.getResultSuccess(res.data, res.msg);
} }
// 交易 // 交易
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment