Authored by 王水玲

有货分期

@@ -11,10 +11,12 @@ const helpers = global.yoho.helpers; @@ -11,10 +11,12 @@ const helpers = global.yoho.helpers;
11 11
12 // 判断是否已经获取到了开通的状态值 12 // 判断是否已经获取到了开通的状态值
13 const _reviewStatus = (uid, status, next) => { 13 const _reviewStatus = (uid, status, next) => {
  14 + let jumpUrl = helpers.appUrlFormat('/product/new', 'go.new');
  15 +
14 if (status === '1') { 16 if (status === '1') {
15 return { 17 return {
16 review: { 18 review: {
17 - url: helpers.appUrlFormat('/product/new', 'go.new') 19 + url: jumpUrl
18 } 20 }
19 }; 21 };
20 } else if (status === '2') { 22 } else if (status === '2') {
@@ -27,7 +29,8 @@ const _reviewStatus = (uid, status, next) => { @@ -27,7 +29,8 @@ const _reviewStatus = (uid, status, next) => {
27 installmentOnly: { 29 installmentOnly: {
28 title: '分期专享', 30 title: '分期专享',
29 goods: result[0] 31 goods: result[0]
30 - } 32 + },
  33 + url: jumpUrl
31 } 34 }
32 }; 35 };
33 }).catch(next); 36 }).catch(next);
@@ -35,7 +38,7 @@ const _reviewStatus = (uid, status, next) => { @@ -35,7 +38,7 @@ const _reviewStatus = (uid, status, next) => {
35 } else if (status === '3') { 38 } else if (status === '3') {
36 return { 39 return {
37 error: { 40 error: {
38 - url: helpers.appUrlFormat('/product/new', 'go.new') 41 + url: jumpUrl
39 } 42 }
40 }; 43 };
41 } 44 }
@@ -75,6 +78,7 @@ const index = (req, res, next) => { @@ -75,6 +78,7 @@ const index = (req, res, next) => {
75 78
76 if (openStatus === '0') { 79 if (openStatus === '0') {
77 return installmentModel.getResources().then(data => { 80 return installmentModel.getResources().then(data => {
  81 + data[0].data[0].url = 'javascript:void(0)';
78 return { 82 return {
79 bannerTop: data, 83 bannerTop: data,
80 notOpen: true, 84 notOpen: true,
@@ -11,7 +11,7 @@ @@ -11,7 +11,7 @@
11 <i class="success-icon"></i> 11 <i class="success-icon"></i>
12 <p class="font-b">可用额度</p> 12 <p class="font-b">可用额度</p>
13 <p class="installment-price">¥<span>{{price}}</span></p> 13 <p class="installment-price">¥<span>{{price}}</span></p>
14 - <div class="open-btn">去逛逛</div> 14 + <a href="{{url}}" class="open-btn">去逛逛</a>
15 </div> 15 </div>
16 </div> 16 </div>
17 {{# installmentOnly}} 17 {{# installmentOnly}}