Authored by 郝肖肖

'cps列表数字匹配'

@@ -13,13 +13,13 @@ module.exports = class extends global.yoho.BaseModel { @@ -13,13 +13,13 @@ module.exports = class extends global.yoho.BaseModel {
13 this.invitecode(params), 13 this.invitecode(params),
14 this.checkApply(params) 14 this.checkApply(params)
15 ]).then(res => { 15 ]).then(res => {
16 - let share = (_.get(res[0], 'data.context', '')).match(/(\d+)/g); 16 + let share = (_.get(res[0], 'data.context', '')).match(/\>(\d+)</g);
17 let gainList = [ 17 let gainList = [
18 { 18 {
19 url: _.get(res[0], 'data.url', ''), 19 url: _.get(res[0], 'data.url', ''),
20 img: '//img11.static.yhbimg.com/yhb-img01/2018/07/09/10/010d4f185b1a155449966ef12d3ed41490.jpg?imageView2/{mode}/w/{width}/h/{height}', // eslint-disable-line 20 img: '//img11.static.yhbimg.com/yhb-img01/2018/07/09/10/010d4f185b1a155449966ef12d3ed41490.jpg?imageView2/{mode}/w/{width}/h/{height}', // eslint-disable-line
21 - totalUser: _.get(share, '[0]', 0),  
22 - totalCouponNum: _.get(share, '[1]', 0), 21 + totalUser: parseInt(_.get(share, '[0]', 0).replace('>', '').replace('<', ''), 10),
  22 + totalCouponNum: parseInt(_.get(share, '[1]', 0).replace('>', '').replace('<', ''), 10),
23 isShow: true 23 isShow: true
24 }, { 24 }, {
25 url: _.get(res[1], 'data.checkUrl', ''), 25 url: _.get(res[1], 'data.checkUrl', ''),
@@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
2 {{#gainList}} 2 {{#gainList}}
3 <div class="have-gain-item"> 3 <div class="have-gain-item">
4 <div class="item-img"> 4 <div class="item-img">
5 - <img src="{{image img 690 430}}" /> 5 + <a href="{{url}}"><img src="{{image img 690 430}}" /></a>
6 </div> 6 </div>
7 <div class="item-footer"> 7 <div class="item-footer">
8 {{#if isShow}} 8 {{#if isShow}}
  1 +body {
  2 + background-color: #f0f0f0;
  3 +}
  4 +
1 .have-gain-index { 5 .have-gain-index {
2 background-color: #f0f0f0; 6 background-color: #f0f0f0;
3 7