|
@@ -4,30 +4,31 @@ |
|
@@ -4,30 +4,31 @@ |
4
|
* @date: 2016/07/05
|
4
|
* @date: 2016/07/05
|
5
|
*/
|
5
|
*/
|
6
|
|
6
|
|
7
|
- var $ = require('yoho-jquery'),
|
7
|
+var $ = require('yoho-jquery'),
|
8
|
lazyLoad = require('yoho-jquery-lazyload');
|
8
|
lazyLoad = require('yoho-jquery-lazyload');
|
9
|
|
9
|
|
10
|
var prising;
|
10
|
var prising;
|
11
|
|
11
|
|
12
|
- lazyLoad($('#msg-list img.lazy'));
|
12
|
+lazyLoad($('#msg-list img.lazy'));
|
13
|
|
13
|
|
14
|
-$(".msg-nav li").on('click', function() {
|
|
|
15
|
- var activeTab = $(this).attr("data-type"),
|
|
|
16
|
- href = $(this).find('a').attr("href");
|
14
|
+$('.msg-nav li').on('click', function() {
|
|
|
15
|
+ var activeTab = $(this).attr('data-type'),
|
|
|
16
|
+ href = $(this).find('a').attr('href');
|
17
|
|
17
|
|
18
|
- $(".msg-nav li").removeClass("active");
|
|
|
19
|
- $(this).addClass("active");
|
|
|
20
|
- console.log(activeTab)
|
|
|
21
|
- console.log(href)
|
18
|
+ $('.msg-nav li').removeClass('active');
|
|
|
19
|
+ $(this).addClass('active');
|
|
|
20
|
+ console.log(activeTab);
|
|
|
21
|
+ console.log(href);
|
22
|
});
|
22
|
});
|
23
|
|
23
|
|
24
|
$('.editorial-index-page').on('click', '.like-icon', function() {
|
24
|
$('.editorial-index-page').on('click', '.like-icon', function() {
|
25
|
var $this = $(this),
|
25
|
var $this = $(this),
|
26
|
- msgId = $this.closest('.content-msg').data().id,
|
|
|
27
|
- url;
|
26
|
+ msgId = $this.closest('.content-msg').data().id;
|
28
|
|
27
|
|
|
|
28
|
+ // url;
|
29
|
|
29
|
|
30
|
- //同一资讯多次点击归一处理
|
30
|
+
|
|
|
31
|
+ // 同一资讯多次点击归一处理
|
31
|
if (prising === msgId) {
|
32
|
if (prising === msgId) {
|
32
|
return;
|
33
|
return;
|
33
|
}
|
34
|
}
|
|
@@ -38,7 +39,7 @@ $('.editorial-index-page').on('click', '.like-icon', function() { |
|
@@ -38,7 +39,7 @@ $('.editorial-index-page').on('click', '.like-icon', function() { |
38
|
$this.toggleClass('liked');
|
39
|
$this.toggleClass('liked');
|
39
|
|
40
|
|
40
|
|
41
|
|
41
|
- //点赞或取消点赞
|
42
|
+ // 点赞或取消点赞
|
42
|
// if ($this.hasClass('liked')) {
|
43
|
// if ($this.hasClass('liked')) {
|
43
|
// url = '/guang/info/praise';
|
44
|
// url = '/guang/info/praise';
|
44
|
// } else {
|
45
|
// } else {
|