Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHOBUYWAP
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
王水玲
9 years ago
Commit
e6b7b37fbb144498976f3553219669c84c3b527f
1 parent
b84d9b9a
星潮教室
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
57 deletions
static/js/guang/calendar.js
static/js/guang/collocation-list.js
static/js/guang/star-classroom.js
static/js/guang/calendar.js
View file @
e6b7b37
...
...
@@ -88,6 +88,7 @@ var CalendarHandler = {
// 生成当月的日期
for
(
i
=
1
;
i
<=
nowDaysNub
;
i
++
)
{
// if (signDay.indexOf(i) > -1) {
// $dayItem.append('<div class="item signItem">' + i + '</div>');
// } else {
...
...
static/js/guang/collocation-list.js
View file @
e6b7b37
...
...
@@ -21,8 +21,7 @@ function massageAJAX(page) {
},
dataType
:
'html'
,
success
:
function
(
data
)
{
console
.
log
(
data
[
0
])
if
(
data
===
' '
)
{
if
(
data
===
''
)
{
stopLoading
=
true
;
tip
.
show
(
'没有更多了'
);
}
...
...
static/js/guang/star-classroom.js
View file @
e6b7b37
...
...
@@ -6,13 +6,11 @@
var
$
=
require
(
'jquery'
),
Swiper
=
require
(
'yoho.iswiper'
),
tip
=
require
(
'../plugin/tip'
),
loading
=
require
(
'../plugin/loading'
),
stopLoading
=
false
;
tip
=
require
(
'../plugin/tip'
);
var
bannerSwiper
,
collocationSwiper
;
var
page
=
1
;
var
nowDaysNub
=
0
;
function
intimacyData
(
data
)
{
var
$ul
=
$
(
'.fan-charts-cont'
),
...
...
@@ -28,7 +26,7 @@ function intimacyData(data) {
if
(
signDay
.
length
>
0
)
{
for
(
i
=
0
;
i
<
nowDaysNub
;
i
++
)
{
if
(
signDay
.
indexOf
(
i
+
1
)
>
-
1
)
{
if
(
signDay
.
indexOf
(
i
+
1
)
>
-
1
)
{
$
(
'.now-days'
).
eq
(
i
).
addClass
(
'signItem'
);
}
}
...
...
@@ -45,7 +43,8 @@ function intimacyData(data) {
'<i class="rank-ico">'
+
data
.
fanCharts
[
i
].
num
+
'</i>'
+
'<img src="'
+
data
.
fanCharts
[
i
].
img
+
'" />'
+
'<span class="fans-name">'
+
data
.
fanCharts
[
i
].
name
+
'</span>'
+
'<div class="fans-intimacy">亲密度<span class="'
+
style
+
'">'
+
data
.
fanCharts
[
i
].
intimacyNum
+
'</span></div>'
+
'<div class="fans-intimacy">亲密度<span class="'
+
style
+
'">'
+
data
.
fanCharts
[
i
].
intimacyNum
+
'</span></div>'
+
'</li>'
;
}
...
...
@@ -93,23 +92,23 @@ if ($('.artice-zan').find('li').length > 0) {
// 点赞
$
(
'.like-ico'
).
on
(
'click'
,
function
()
{
var
that
=
$
(
this
),
var
$
that
=
$
(
this
),
addString
=
''
;
$
.
ajax
({
type
:
'POST'
,
url
:
'/guang/starclass/setPraise'
,
data
:
{
articleId
:
that
.
parents
(
'li'
).
attr
(
'articleId'
)
articleId
:
$
that
.
parents
(
'li'
).
attr
(
'articleId'
)
},
success
:
function
(
data
)
{
var
code
=
data
.
code
;
if
(
code
===
200
)
{
if
(
that
.
hasClass
(
'like'
))
{
that
.
removeClass
(
'like'
);
if
(
$that
.
hasClass
(
'like'
))
{
$that
.
removeClass
(
'like'
);
}
else
{
that
.
addClass
(
'like'
);
$
that
.
addClass
(
'like'
);
}
if
(
data
.
num
>
99
)
{
...
...
@@ -118,7 +117,7 @@ $('.like-ico').on('click', function() {
addString
=
''
;
}
that
.
parent
().
find
(
'.zan-more'
).
html
(
data
.
num
+
addString
);
$
that
.
parent
().
find
(
'.zan-more'
).
html
(
data
.
num
+
addString
);
}
},
error
:
function
()
{
...
...
@@ -130,46 +129,20 @@ $('.like-ico').on('click', function() {
// 签到
$
(
'.add-intimacy'
).
on
(
'click'
,
function
()
{
// $.ajax({
// type: 'GET',
// url: '/guang/starclass/sign',
// success: function(data) {
// var code = data.code;
// if (code === 200) {
// intimacyData(data.data);
// }
// },
// error: function() {
// tip.show('网络断开连接了~');
// }
// });
data
=
{
signDay
:
'1,2,5,8,11'
,
intimacyNum
:
'15'
,
fanCharts
:
[
{
num
:
'1'
,
img
:
'http://img12.static.yhbimg.com/yhb-img01/2016/03/28/04/02ca2b986e193f7134d2f75c74f8169ec3.jpg?imageView/2/w/640/h/240'
,
name
:
'aaaaa'
,
intimacyNum
:
'2546'
},
{
num
:
'2'
,
img
:
'http://img12.static.yhbimg.com/yhb-img01/2016/03/28/04/02ca2b986e193f7134d2f75c74f8169ec3.jpg?imageView/2/w/640/h/240'
,
name
:
'aaaaa'
,
intimacyNum
:
'2546'
},
{
num
:
'3'
,
img
:
'http://img12.static.yhbimg.com/yhb-img01/2016/03/28/04/02ca2b986e193f7134d2f75c74f8169ec3.jpg?imageView/2/w/640/h/240'
,
name
:
'aaaaa'
,
intimacyNum
:
'2546'
}
]
};
$
.
ajax
({
type
:
'GET'
,
url
:
'/guang/starclass/sign'
,
success
:
function
(
data
)
{
var
code
=
data
.
code
;
intimacyData
(
data
);
if
(
code
===
200
)
{
intimacyData
(
data
.
data
);
}
},
error
:
function
()
{
tip
.
show
(
'网络断开连接了~'
);
}
});
});
$
(
'.pop-intimacy .pop-close, .mask'
).
on
(
'click'
,
function
()
{
...
...
@@ -184,14 +157,14 @@ $('.pop-intimacy .pop-close, .mask').on('click', function() {
// 收藏
$
(
'.count-area .collection'
).
on
(
'click'
,
function
()
{
var
that
=
$
(
this
)
$icon
=
that
.
find
(
'.collected-ico'
);
var
$that
=
$
(
this
),
$icon
=
$that
.
find
(
'.collected-ico'
);
$
.
ajax
({
type
:
'POST'
,
url
:
'/guang/opt/praiseArticle'
,
data
:
{
articleId
:
that
.
parents
(
'li'
).
attr
(
'articleId'
)
articleId
:
$
that
.
parents
(
'li'
).
attr
(
'articleId'
)
},
success
:
function
(
data
)
{
var
code
=
data
.
code
;
...
...
@@ -203,7 +176,7 @@ $('.count-area .collection').on('click', function() {
$icon
.
addClass
(
'collected'
);
}
that
.
find
(
'.collected-num'
).
html
(
data
.
num
);
$
that
.
find
(
'.collected-num'
).
html
(
data
.
num
);
}
},
...
...
Please
register
or
login
to post a comment