Showing
1 changed file
with
11 additions
and
0 deletions
@@ -9,6 +9,7 @@ const installmentModel = require('../models/installment'); | @@ -9,6 +9,7 @@ const installmentModel = require('../models/installment'); | ||
9 | const _ = require('lodash'); | 9 | const _ = require('lodash'); |
10 | const helpers = global.yoho.helpers; | 10 | const helpers = global.yoho.helpers; |
11 | const logger = global.yoho.logger; | 11 | const logger = global.yoho.logger; |
12 | +const yasProcess = require(`${global.utils}/yas-process`); | ||
12 | 13 | ||
13 | // 服务器报错页面 | 14 | // 服务器报错页面 |
14 | const _serverCrash = (res, params, err, next) => { | 15 | const _serverCrash = (res, params, err, next) => { |
@@ -64,6 +65,16 @@ const index = (req, res, next) => { | @@ -64,6 +65,16 @@ const index = (req, res, next) => { | ||
64 | }) | 65 | }) |
65 | ]).then((result) => { | 66 | ]).then((result) => { |
66 | 67 | ||
68 | + if (req.yoho.isApp) { | ||
69 | + _.forEach(result[1], goods => { | ||
70 | + goods.url = yasProcess.addParamsToGoodsHref({ | ||
71 | + href: goods.url, | ||
72 | + fromPageName: yasProcess.getPname(req), | ||
73 | + fromPageParam: req.originalUrl | ||
74 | + }); | ||
75 | + }); | ||
76 | + } | ||
77 | + | ||
67 | // openStatus:0 未申请 1审核中 2已开通 3 审核未通过 | 78 | // openStatus:0 未申请 1审核中 2已开通 3 审核未通过 |
68 | let openStatus = result[0]; | 79 | let openStatus = result[0]; |
69 | let installmentOnly = { | 80 | let installmentOnly = { |
-
Please register or login to post a comment