Showing
4 changed files
with
8 additions
and
8 deletions
@@ -15,8 +15,7 @@ const shopList = (uid, tabName) => { | @@ -15,8 +15,7 @@ const shopList = (uid, tabName) => { | ||
15 | uid: uid, | 15 | uid: uid, |
16 | tab_name: tabName | 16 | tab_name: tabName |
17 | }, { | 17 | }, { |
18 | - code: 200, | ||
19 | - cache: true | 18 | + code: 200 |
20 | }).then((result) => { | 19 | }).then((result) => { |
21 | if (result && result.code === 200) { | 20 | if (result && result.code === 200) { |
22 | _.forEach(result.data, function(data) { | 21 | _.forEach(result.data, function(data) { |
@@ -3,7 +3,7 @@ | @@ -3,7 +3,7 @@ | ||
3 | <a href="{{href}}"> | 3 | <a href="{{href}}"> |
4 | <div class="info-title"> | 4 | <div class="info-title"> |
5 | <div class="collect"> | 5 | <div class="collect"> |
6 | - <span class="fans">粉丝:{{collectionNum}}</span> | 6 | + <span class="fans">粉丝:<b class="fans-count">{{collectionNum}}</b></span> |
7 | <i class="iconfont collect-btn {{#if isFavorite}}already-collect{{/ if}}"></i> | 7 | <i class="iconfont collect-btn {{#if isFavorite}}already-collect{{/ if}}"></i> |
8 | </div> | 8 | </div> |
9 | 9 |
@@ -96,7 +96,8 @@ function shopListData(tabName, stoping) { | @@ -96,7 +96,8 @@ function shopListData(tabName, stoping) { | ||
96 | // 店铺收藏 | 96 | // 店铺收藏 |
97 | $('.collect-btn').on('click', function(e) { | 97 | $('.collect-btn').on('click', function(e) { |
98 | var opt, | 98 | var opt, |
99 | - $this = $(this); | 99 | + $this = $(this), |
100 | + fansCount = parseInt($this.parent().find('.fans-count').html()); | ||
100 | 101 | ||
101 | shopId = $this.parents('.shop-info').data('id'); | 102 | shopId = $this.parents('.shop-info').data('id'); |
102 | 103 | ||
@@ -131,9 +132,11 @@ function shopListData(tabName, stoping) { | @@ -131,9 +132,11 @@ function shopListData(tabName, stoping) { | ||
131 | if ($this.hasClass('already-collect')) { | 132 | if ($this.hasClass('already-collect')) { |
132 | $this.removeClass('already-collect'); | 133 | $this.removeClass('already-collect'); |
133 | tip.show('店铺取消收藏成功'); | 134 | tip.show('店铺取消收藏成功'); |
135 | + $this.parent().find('.fans-count').html(fansCount - 1); | ||
134 | } else { | 136 | } else { |
135 | $this.addClass('already-collect'); | 137 | $this.addClass('already-collect'); |
136 | tip.show('店铺收藏成功'); | 138 | tip.show('店铺收藏成功'); |
139 | + $this.parent().find('.fans-count').html(fansCount + 1); | ||
137 | } | 140 | } |
138 | } | 141 | } |
139 | 142 |
@@ -26,7 +26,6 @@ | @@ -26,7 +26,6 @@ | ||
26 | 26 | ||
27 | .active { | 27 | .active { |
28 | color: #000; | 28 | color: #000; |
29 | - font-weight: bold; | ||
30 | } | 29 | } |
31 | } | 30 | } |
32 | 31 | ||
@@ -86,7 +85,7 @@ | @@ -86,7 +85,7 @@ | ||
86 | float: left; | 85 | float: left; |
87 | margin-left: 25px; | 86 | margin-left: 25px; |
88 | font-size: 22px; | 87 | font-size: 22px; |
89 | - width: 170px; | 88 | + width: 200px; |
90 | height: 65px; | 89 | height: 65px; |
91 | } | 90 | } |
92 | 91 | ||
@@ -98,17 +97,16 @@ | @@ -98,17 +97,16 @@ | ||
98 | white-space: nowrap; | 97 | white-space: nowrap; |
99 | overflow: hidden; | 98 | overflow: hidden; |
100 | text-overflow: ellipsis; | 99 | text-overflow: ellipsis; |
100 | + width: 240px; | ||
101 | } | 101 | } |
102 | 102 | ||
103 | .shop-name { | 103 | .shop-name { |
104 | - width: 170px; | ||
105 | font-weight: bold; | 104 | font-weight: bold; |
106 | font-size: 24px; | 105 | font-size: 24px; |
107 | height: 35px; | 106 | height: 35px; |
108 | } | 107 | } |
109 | 108 | ||
110 | .giving { | 109 | .giving { |
111 | - width: 170px; | ||
112 | color: #b0b0b0; | 110 | color: #b0b0b0; |
113 | font-size: 22px; | 111 | font-size: 22px; |
114 | } | 112 | } |
-
Please register or login to post a comment