Authored by 周少峰

Merge branch 'hotfix/installmentOpen' into 'master'

分期开通结果为空白页bug

分期开通结果为空白页bug 修改

See merge request !74
@@ -190,6 +190,12 @@ const review = (req, res) => { @@ -190,6 +190,12 @@ const review = (req, res) => {
190 installmentModel.getQueryCreditInfo(uid), 190 installmentModel.getQueryCreditInfo(uid),
191 installmentModel.getResources('advertisement') 191 installmentModel.getResources('advertisement')
192 ]).then((result) => { 192 ]).then((result) => {
  193 + let advertisement = false;
  194 +
  195 + if (result && result[2].length > 1) {
  196 + advertisement = result[2][0].data[0];
  197 + }
  198 +
193 res.render(templete, _.assign({ 199 res.render(templete, _.assign({
194 success: { 200 success: {
195 price: result[1].currCreditLimit, 201 price: result[1].currCreditLimit,
@@ -202,7 +208,7 @@ const review = (req, res) => { @@ -202,7 +208,7 @@ const review = (req, res) => {
202 }, 208 },
203 goods: result[0] 209 goods: result[0]
204 }, 210 },
205 - advertisement: result[2][0].data[0], 211 + advertisement: advertisement,
206 url: helpers.appUrlFormat(req.originalUrl, 'go.instalmentlist', { 212 url: helpers.appUrlFormat(req.originalUrl, 'go.instalmentlist', {
207 title: '分期专享' 213 title: '分期专享'
208 }) 214 })
1 { 1 {
2 "name": "m-yohobuy-node", 2 "name": "m-yohobuy-node",
3 - "version": "5.3.4", 3 + "version": "5.3.5",
4 "private": true, 4 "private": true,
5 "description": "A New Yohobuy Project With Express", 5 "description": "A New Yohobuy Project With Express",
6 "repository": { 6 "repository": {
@@ -271,6 +271,7 @@ $('#apply-button').click(function() { @@ -271,6 +271,7 @@ $('#apply-button').click(function() {
271 } 271 }
272 272
273 if (asyncMode) { 273 if (asyncMode) {
  274 + params.params.failReason = encodeURIComponent(params.params.failReason);
274 yohoApp.invokeMethod('go.instalmentActivated', params.params); 275 yohoApp.invokeMethod('go.instalmentActivated', params.params);
275 } else { 276 } else {
276 that.attr('href', location.pathname + '?openby:yohobuy=' + encodeURIComponent(JSON.stringify(params))); 277 that.attr('href', location.pathname + '?openby:yohobuy=' + encodeURIComponent(JSON.stringify(params)));