Commit 648426f7 by 孙亚楠

Merge branch 'xgg-saas-merchant-h5' into xgg-saas-merchant

parents 35a6cd75 6a2ba2e2
...@@ -9,6 +9,17 @@ class APIBase extends DocBase { ...@@ -9,6 +9,17 @@ class APIBase extends DocBase {
this.cacheManager = system.getObject("db.common.cacheManager"); this.cacheManager = system.getObject("db.common.cacheManager");
this.logCtl = system.getObject("web.common.oplogCtl"); this.logCtl = system.getObject("web.common.oplogCtl");
this.oplogSve = system.getObject("service.common.oplogSve"); this.oplogSve = system.getObject("service.common.oplogSve");
this.merchantappletuserSve = system.getObject("service.uc.merchantappletuserSve");
}
async getLoginUser(merchant_id, openid, forceUpdate) {
return await this.merchantappletuserSve.getLoginUser({merchant_id: merchant_id, openid: openid, forceUpdate: forceUpdate});
}
async getMerchant(merchant_id) {
return await this.merchantSve.getMerchantWithCache({id: merchant_id, forceUpdate: true});
} }
getUUID() { getUUID() {
var uuid = uuidv4(); var uuid = uuidv4();
...@@ -17,7 +28,7 @@ class APIBase extends DocBase { ...@@ -17,7 +28,7 @@ class APIBase extends DocBase {
} }
/** /**
* 验证签名 * 验证签名
* @param {*} params 要验证的参数 * @param {*} params 要验证的参数
* @param {*} app_key 应用的校验key * @param {*} app_key 应用的校验key
*/ */
async verifySign(params, app_key) { async verifySign(params, app_key) {
......
...@@ -22,7 +22,7 @@ class ServiceBase { ...@@ -22,7 +22,7 @@ class ServiceBase {
/** /**
* 验证签名 * 验证签名
* @param {*} params 要验证的参数 * @param {*} params 要验证的参数
* @param {*} app_key 应用的校验key * @param {*} app_key 应用的校验key
*/ */
async verifySign(params, app_key) { async verifySign(params, app_key) {
...@@ -55,7 +55,7 @@ class ServiceBase { ...@@ -55,7 +55,7 @@ class ServiceBase {
} }
/** /**
* 创建签名 * 创建签名
* @param {*} params 要验证的参数 * @param {*} params 要验证的参数
* @param {*} app_key 应用的校验key * @param {*} app_key 应用的校验key
*/ */
async createSign(params, app_key) { async createSign(params, app_key) {
...@@ -220,7 +220,7 @@ class ServiceBase { ...@@ -220,7 +220,7 @@ class ServiceBase {
} }
try { try {
var params = { var params = {
"action_process": "xgg-saas-platform", "action_process": "sijibao",
"action_type": apiName, "action_type": apiName,
"action_body": params || {}, "action_body": params || {},
} }
...@@ -231,7 +231,7 @@ class ServiceBase { ...@@ -231,7 +231,7 @@ class ServiceBase {
url: reqUrl, url: reqUrl,
data: params data: params
}); });
console.log(rs); console.log(rs);
return rs.data; return rs.data;
} }
...@@ -293,4 +293,4 @@ class ServiceBase { ...@@ -293,4 +293,4 @@ class ServiceBase {
return o.toString().trim(); return o.toString().trim();
} }
} }
module.exports = ServiceBase; module.exports = ServiceBase;
\ No newline at end of file
...@@ -194,7 +194,7 @@ class System { ...@@ -194,7 +194,7 @@ class System {
merchant: dev + ":3101" + path, merchant: dev + ":3101" + path,
// 订单服务 // 订单服务
order: local + ":3103" + path, order: dev + ":3103" + path,
// 发票服务 // 发票服务
invoice: dev + ":3105" + path, invoice: dev + ":3105" + path,
......
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