Authored by 郭成尧

Merge branch 'feature/payEnd' into 'release/5.4'

增加支付失败



See merge request !173
@@ -60,6 +60,14 @@ const payAli = (req, res, next) => { @@ -60,6 +60,14 @@ const payAli = (req, res, next) => {
60 title: '支付中心 | Yoho!Buy有货 | 潮流购物逛不停' 60 title: '支付中心 | Yoho!Buy有货 | 潮流购物逛不停'
61 }; 61 };
62 62
  63 + let responseFailure = {
  64 + pageHeader: headerModel.setNav({
  65 + navTitle: '支付中心',
  66 + navBtn: false
  67 + }),
  68 + title: '支付中心 | Yoho!Buy有货 | 潮流购物逛不停'
  69 + };
  70 +
63 let param = { 71 let param = {
64 uid: req.user.uid, 72 uid: req.user.uid,
65 udid: req.sessionID || require('md5')(req.ip) || 'yoho', 73 udid: req.sessionID || require('md5')(req.ip) || 'yoho',
@@ -77,7 +85,7 @@ const payAli = (req, res, next) => { @@ -77,7 +85,7 @@ const payAli = (req, res, next) => {
77 85
78 // 支付宝支付校验 86 // 支付宝支付校验
79 if (!verifyResult.payResult) { 87 if (!verifyResult.payResult) {
80 - return res.render('pay/pay-ali', responseData); 88 + return res.render('pay/pay-failure', responseFailure);
81 } 89 }
82 90
83 payModel.getPayAli(param).then(result => { 91 payModel.getPayAli(param).then(result => {
  1 +<div class="pay-back-page">
  2 + <div class="failure-order">
  3 + <p>订单提交失败!</p>
  4 +
  5 + <div class="failure-notice">
  6 + <span class="iconfont">&#xe628;</span>提示:支付失败
  7 + </div>
  8 + </div>
  9 +</div>
@@ -24,10 +24,14 @@ function getGender() { @@ -24,10 +24,14 @@ function getGender() {
24 24
25 require('../channel/maybe-like')(getGender()); 25 require('../channel/maybe-like')(getGender());
26 26
27 -if ($('#goods-list').length === 0) {  
28 - $('.maybe-like').hide();  
29 -} 27 +// 你可能喜欢没有数据就隐藏
  28 +setTimeout(function() {
  29 + if ($('#goods-list').find('.good-info').length === 0) {
  30 + $('.maybe-like').hide();
  31 + }
  32 +}, 200);
30 33
  34 +// 防诈骗提示滚动
31 if (tipConWidth > promptWidth - tipWidth) { 35 if (tipConWidth > promptWidth - tipWidth) {
32 var speed = 30; 36 var speed = 30;
33 37
@@ -6,6 +6,7 @@ @@ -6,6 +6,7 @@
6 @import "select-coupon"; 6 @import "select-coupon";
7 @import "select-address"; 7 @import "select-address";
8 @import "jit-detail"; 8 @import "jit-detail";
  9 +@import "pay-failure";
9 10
10 11
11 .icon-checkbox:before { content: "\e61c"; } 12 .icon-checkbox:before { content: "\e61c"; }
  1 +.pay-back-page {
  2 + font-family: helvetica,Arial,黑体;
  3 +
  4 + .failure-order {
  5 + margin-top: 140px;
  6 + background-color: #fff;
  7 +
  8 + p{
  9 + font-size: 37px;
  10 + font-weight: normal;
  11 + margin: 0;
  12 + padding: 0;
  13 + text-align: center;
  14 + }
  15 + }
  16 +
  17 + .failure-notice {
  18 + text-align: center;
  19 + color: #24acaa;
  20 + display: block;
  21 + padding: 17px 30px 10px 0;
  22 +
  23 + .iconfont {
  24 + margin-right: 10px;
  25 + }
  26 + }
  27 +}