Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
s_ibanshou
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
蒋林
s_ibanshou
Commits
b97d9fde
Commit
b97d9fde
authored
Jul 08, 2017
by
蒋林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
接口登录问题
parent
91be8368
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
48 additions
and
74 deletions
+48
-74
hotplnews.js
d/js/js/hotplnews.js
+1
-1
newnews.js
d/js/js/newnews.js
+1
-1
comment.php
e/action/news/comment.php
+24
-14
index.php
e/action/news/index.php
+4
-3
index.html
index.html
+8
-49
news.js
skin/default/js/news.js
+10
-6
No files found.
d/js/js/hotplnews.js
View file @
b97d9fde
document
.
write
(
"<li><a href=
\"
/changshang/2017-06-27/89.html
\"
title=
\"
测试
\"
>测试</a></li><li><a href=
\"
/hangye/76.html
\"
title=
\"
家电回收条例有望年内出台 厂商只卖拒收罚10万
\"
>家电回收条例有望年内出台 厂商只</a></li><li><a href=
\"
/pinlei/bingxiang/guzhangdaima/1.html
\"
title=
\"
科龙BCD-191W电冰箱故障代码表
\"
>科龙BCD-191W电冰箱故障代码表</a></li><li><a href=
\"
/pinlei/xiyiji/jingyanjiqiao/2.html
\"
title=
\"
美的洗衣机MB55-3006G按启动键后就进入洗衣(干洗)状态维修全过程
\"
>美的洗衣机MB55-3006G按启动键后就</a></li><li><a href=
\"
/pinlei/xiyiji/jingyanjiqiao/3.html
\"
title=
\"
自制拆装波轮洗衣机离合器中心螺帽配套工具
\"
>自制拆装波轮洗衣机离合器中心螺帽</a></li><li><a href=
\"
/pinlei/xiyiji/jingyanjiqiao/4.html
\"
title=
\"
自制拆洗衣机排水阀(水堵)工具
\"
>自制拆洗衣机排水阀(水堵)工具</a></li><li><a href=
\"
/shifu/5.html
\"
title=
\"
科龙BCD-242/HC电冰箱故障代码表
\"
>科龙BCD-242/HC电冰箱故障代码表</a></li><li><a href=
\"
/shifu/6.html
\"
title=
\"
小天鹅全自动洗衣机故障可控硅之“元凶”
\"
>小天鹅全自动洗衣机故障可控硅之“</a></li><li><a href=
\"
/pinlei/xiyiji/jingyanjiqiao/7.html
\"
title=
\"
洗衣机故障速修心得
\"
>洗衣机故障速修心得</a></li><li><a href=
\"
/pinlei/dianshiji/jingyanjiqiao/8.html
\"
title=
\"
液晶屏逻辑板和屏坏简易判断及检修
\"
>液晶屏逻辑板和屏坏简易判断及检修</a></li>"
);
\ No newline at end of file
document
.
write
(
"<li><a href=
\"
/changshang/2017-06-27/89.html
\"
title=
\"
测试
\"
>测试</a></li><li><a href=
\"
/shifu/24.html
\"
title=
\"
年轻时遇到了一些艳遇 回想起来依然记忆犹新
\"
>年轻时遇到了一些艳遇 回想起来依</a></li><li><a href=
\"
/hangye/76.html
\"
title=
\"
家电回收条例有望年内出台 厂商只卖拒收罚10万
\"
>家电回收条例有望年内出台 厂商只</a></li><li><a href=
\"
/hangye/83.html
\"
title=
\"
格力起诉美的“制冷王”空调侵权 索赔5000万元
\"
>格力起诉美的“制冷王”空调侵权 </a></li><li><a href=
\"
/pinlei/bingxiang/guzhangdaima/1.html
\"
title=
\"
科龙BCD-191W电冰箱故障代码表
\"
>科龙BCD-191W电冰箱故障代码表</a></li><li><a href=
\"
/pinlei/xiyiji/jingyanjiqiao/2.html
\"
title=
\"
美的洗衣机MB55-3006G按启动键后就进入洗衣(干洗)状态维修全过程
\"
>美的洗衣机MB55-3006G按启动键后就</a></li><li><a href=
\"
/pinlei/xiyiji/jingyanjiqiao/3.html
\"
title=
\"
自制拆装波轮洗衣机离合器中心螺帽配套工具
\"
>自制拆装波轮洗衣机离合器中心螺帽</a></li><li><a href=
\"
/pinlei/xiyiji/jingyanjiqiao/4.html
\"
title=
\"
自制拆洗衣机排水阀(水堵)工具
\"
>自制拆洗衣机排水阀(水堵)工具</a></li><li><a href=
\"
/shifu/5.html
\"
title=
\"
科龙BCD-242/HC电冰箱故障代码表
\"
>科龙BCD-242/HC电冰箱故障代码表</a></li><li><a href=
\"
/shifu/6.html
\"
title=
\"
小天鹅全自动洗衣机故障可控硅之“元凶”
\"
>小天鹅全自动洗衣机故障可控硅之“</a></li>"
);
\ No newline at end of file
d/js/js/newnews.js
View file @
b97d9fde
document
.
write
(
"<li><a href=
\"
/changshang/2017-06-27/89.html
\"
title=
\"
测试
\"
>测试</a></li><li><a href=
\"
/hangye/83.html
\"
title=
\"
格力起诉美的“制冷王”空调侵权 索赔5000万元
\"
>格力起诉美的“制冷王”空调侵权 </a></li><li><a href=
\"
/hangye/82.html
\"
title=
\"
公牛全线产品完成新国标升级:未来加大自动化投入
\"
>公牛全线产品完成新国标升级:未来加</a></li><li><a href=
\"
/hangye/81.html
\"
title=
\"
姑娘别怕 我只是把钳子别在了腰上
\"
>姑娘别怕 我只是把钳子别在了腰上</a></li><li><a href=
\"
/hangye/80.html
\"
title=
\"
插座国家标准又升级了 你还在用老的万能孔吗?
\"
>插座国家标准又升级了 你还在用老</a></li><li><a href=
\"
/hangye/76.html
\"
title=
\"
家电回收条例有望年内出台 厂商只卖拒收罚10万
\"
>家电回收条例有望年内出台 厂商只</a></li><li><a href=
\"
/hangye/75.html
\"
title=
\"
智能家电售后问题凸显 掘金未来需要新思路
\"
>智能家电售后问题凸显 掘金未来需</a></li><li><a href=
\"
/hangye/74.html
\"
title=
\"
中国制造加速走向全球 GMCC向世界展示中国“芯”
\"
>中国制造加速走向全球 GMCC向世界</a></li><li><a href=
\"
/hangye/73.html
\"
title=
\"
长虹制造云平台获国家“互联网+”重大工程支持项目
\"
>长虹制造云平台获国家“互联网+”</a></li><li><a href=
\"
/hangye/71.html
\"
title=
\"
网约家电维修 不想却遇“山寨”维修
\"
>网约家电维修 不想却遇“山寨”维</a></li>"
);
\ No newline at end of file
document
.
write
(
"<li><a href=
\"
/shouyehuandeng/2017-07-05/90.html
\"
title=
\"
首页幻灯 - 快查
\"
>首页幻灯 - 快查</a></li><li><a href=
\"
/changshang/2017-06-27/89.html
\"
title=
\"
测试
\"
>测试</a></li><li><a href=
\"
/hangye/83.html
\"
title=
\"
格力起诉美的“制冷王”空调侵权 索赔5000万元
\"
>格力起诉美的“制冷王”空调侵权 </a></li><li><a href=
\"
/hangye/82.html
\"
title=
\"
公牛全线产品完成新国标升级:未来加大自动化投入
\"
>公牛全线产品完成新国标升级:未来加</a></li><li><a href=
\"
/hangye/81.html
\"
title=
\"
姑娘别怕 我只是把钳子别在了腰上
\"
>姑娘别怕 我只是把钳子别在了腰上</a></li><li><a href=
\"
/hangye/80.html
\"
title=
\"
插座国家标准又升级了 你还在用老的万能孔吗?
\"
>插座国家标准又升级了 你还在用老</a></li><li><a href=
\"
/hangye/76.html
\"
title=
\"
家电回收条例有望年内出台 厂商只卖拒收罚10万
\"
>家电回收条例有望年内出台 厂商只</a></li><li><a href=
\"
/hangye/75.html
\"
title=
\"
智能家电售后问题凸显 掘金未来需要新思路
\"
>智能家电售后问题凸显 掘金未来需</a></li><li><a href=
\"
/hangye/74.html
\"
title=
\"
中国制造加速走向全球 GMCC向世界展示中国“芯”
\"
>中国制造加速走向全球 GMCC向世界</a></li><li><a href=
\"
/hangye/73.html
\"
title=
\"
长虹制造云平台获国家“互联网+”重大工程支持项目
\"
>长虹制造云平台获国家“互联网+”</a></li>"
);
\ No newline at end of file
e/action/news/comment.php
View file @
b97d9fde
...
...
@@ -7,11 +7,7 @@ require(__DIR__ . "/../../class/q_functions.php");
$link
=
db_connect
();
$empire
=
new
mysqlquery
();
$user
=
islogin
();
if
(
empty
(
$user
))
{
returnmsg
(
false
,
'请登录'
);
}
$iscas
=
getcvar
(
'mlcas'
);
$mod
=
isset
(
$_GET
[
'mod'
])
?
$_GET
[
'mod'
]
:
''
;
$newsid
=
isset
(
$_POST
[
'newsid'
])
?
intval
(
$_POST
[
'newsid'
])
:
0
;
$content
=
isset
(
$_POST
[
'content'
])
?
addslashes
(
trim
(
$_POST
[
'content'
]))
:
''
;
...
...
@@ -20,6 +16,9 @@ $page = isset($_POST['p']) ? intval($_POST['p']) : 0;
$page
=
$page
?
:
1
;
if
(
$mod
==
'create'
)
{
if
(
!
$iscas
)
{
returnmsg
(
false
,
'未登录'
,
'nologin'
);
}
if
(
!
$newsid
)
{
returnmsg
(
false
,
'内容ID参数错误'
);
}
...
...
@@ -27,8 +26,11 @@ if ($mod == 'create') {
returnmsg
(
false
,
'评论内容不能为空'
);
}
createComment
(
$newsid
,
$content
,
$user
);
createComment
(
$newsid
,
$content
);
}
elseif
(
$mod
==
'reply'
)
{
if
(
!
$iscas
)
{
returnmsg
(
false
,
'未登录'
,
'nologin'
);
}
if
(
!
$plid
)
{
returnmsg
(
false
,
'评论ID参数错误'
);
}
...
...
@@ -36,26 +38,31 @@ if ($mod == 'create') {
returnmsg
(
false
,
'评论内容不能为空'
);
}
replyComment
(
$plid
,
$content
,
$user
);
replyComment
(
$plid
,
$content
);
}
elseif
(
$mod
==
'like'
)
{
if
(
!
$iscas
)
{
returnmsg
(
false
,
'未登录'
,
'nologin'
);
}
if
(
!
$plid
)
{
returnmsg
(
false
,
'评论ID参数错误'
);
}
likeComment
(
$plid
,
$user
);
likeComment
(
$plid
);
}
else
{
if
(
!
$newsid
)
{
returnmsg
(
false
,
'内容ID参数错误'
);
}
comments
(
$newsid
,
10
,
$page
,
$user
);
comments
(
$newsid
,
10
,
$page
);
}
//创建评论
function
createComment
(
$newsid
,
$content
,
$user
)
{
function
createComment
(
$newsid
,
$content
)
{
global
$empire
,
$dbtbpre
;
$tablecomment
=
$dbtbpre
.
'ecms_comments'
;
$tablenews
=
$dbtbpre
.
'ecms_news'
;
$user
=
islogin
();
$sql
=
"select id,classid from
{
$tablenews
}
where id=
{
$newsid
}
"
;
$news
=
$empire
->
fetch1
(
$sql
);
if
(
empty
(
$news
))
{
...
...
@@ -77,10 +84,11 @@ function createComment($newsid, $content, $user) {
}
//回复评论
function
replyComment
(
$plid
,
$content
,
$user
)
{
function
replyComment
(
$plid
,
$content
)
{
global
$empire
,
$dbtbpre
;
$table
=
$dbtbpre
.
'ecms_comments'
;
$user
=
islogin
();
$sql
=
"select * from
$table
where id=
{
$plid
}
"
;
$comment
=
$empire
->
fetch1
(
$sql
);
if
(
empty
(
$comment
))
{
...
...
@@ -106,7 +114,7 @@ function replyComment($plid, $content, $user) {
}
//评论列表
function
comments
(
$newsid
,
$num
,
$p
=
1
,
$user
)
{
function
comments
(
$newsid
,
$num
,
$p
=
1
)
{
global
$empire
,
$dbtbpre
;
$tablecomment
=
$dbtbpre
.
'ecms_comments'
;
$tablemember
=
$dbtbpre
.
'enewsmember'
;
...
...
@@ -122,7 +130,8 @@ function comments($newsid, $num, $p=1, $user) {
$list
[]
=
handelcomment
(
$row
);
}
if
(
$list
)
{
if
(
$list
&&
getcvar
(
'mlcas'
))
{
$user
=
islogin
();
$ids
=
array_unique
(
array_column
(
$list
,
'id'
));
$ids
=
implode
(
','
,
$ids
);
$tablecommentlike
=
$dbtbpre
.
'ecms_comments_likenum'
;
...
...
@@ -180,11 +189,12 @@ function comment($id) {
}
//点赞
function
likeComment
(
$plid
,
$user
)
{
function
likeComment
(
$plid
)
{
global
$empire
,
$dbtbpre
;
$tablecomment
=
$dbtbpre
.
'ecms_comments'
;
$tablecommentlike
=
$dbtbpre
.
'ecms_comments_likenum'
;
$user
=
islogin
();
$sql
=
"select * from
{
$tablecomment
}
where id=
{
$plid
}
"
;
$comment
=
$empire
->
fetchassoc1
(
$sql
);
if
(
$comment
[
'user_id'
]
==
$user
[
'userid'
])
{
...
...
e/action/news/index.php
View file @
b97d9fde
...
...
@@ -13,10 +13,11 @@ use internalApi\ucenter\BrowsingHistory;
$link
=
db_connect
();
$empire
=
new
mysqlquery
();
$
user
=
islogin
(
);
if
(
empty
(
$user
)
)
{
returnmsg
(
false
,
'
请登录
'
);
$
iscas
=
getcvar
(
'mlcas'
);
if
(
!
$iscas
)
{
returnmsg
(
false
,
'
未登录'
,
'nologin
'
);
}
$user
=
islogin
();
$mod
=
isset
(
$_GET
[
'mod'
])
?
$_GET
[
'mod'
]
:
''
;
$newsid
=
isset
(
$_POST
[
'newsid'
])
?
intval
(
$_POST
[
'newsid'
])
:
0
;
...
...
index.html
View file @
b97d9fde
...
...
@@ -16,18 +16,6 @@
<style>body
{
background-color
:
#f3f3f3
}
</style>
</head>
<body>
<!--
<div class="top">
<form name="searchform" method="post" action="/e/search/index.php">
<div class="search-box">
<input type="hidden" name="show" value="title,newstext">
<input type="search" class="input-control" name="keyboard" placeholder="请输入关键词">
<!--<div class="placeholder"><i class="iconfont icon-sousuo"></i>请输入关键词</div>-->
</div>
</form>
<a
href=
"#"
class=
"sign"
><i
class=
"iconfont icon-qiandao1111"
></i></a>
</div>
-->
<div
class=
"empty-block"
></div>
<div
class=
"common-top"
>
...
...
@@ -38,7 +26,7 @@
<a
href=
"/hangye"
>
行业
</a>
<a
href=
"/changshang"
>
厂商
</a>
</div>
<a
href=
"
#
"
class=
"search"
><i
class=
"iconfont icon-sousuo"
></i></a>
<a
href=
"
javascript:;
"
class=
"search"
><i
class=
"iconfont icon-sousuo"
></i></a>
</div>
<div
class=
"swiper-container"
>
...
...
@@ -51,27 +39,27 @@
<div
class=
"quick-link"
>
<ul
class=
"link-item clearfix"
>
<li>
<a
href=
"
#
"
>
<a
href=
"
http://code.ibanshou.cn
"
>
<i
class=
"icon-kuaicha"
></i>
<p>
快查
</p>
</a>
</li>
<li>
<a
href=
"
#
"
>
<a
href=
"
javascript:;
"
>
<i
class=
"icon-kuaiwen"
></i>
<p>
快问
</p>
<p>
接单
</p>
</a>
</li>
<li>
<a
href=
"
#
"
>
<a
href=
"
http://xue.ibanshou.cn/home/category-detail?categoryId=3
"
>
<i
class=
"icon-huati"
></i>
<p>
话题
</p>
<p>
扳手SAAS
</p>
</a>
</li>
<li>
<a
href=
"
#
"
>
<a
href=
"
http://bbs.ibanshou.cn/forum.php?mod=forumdisplay&fid=112
"
>
<i
class=
"icon-more-pro"
></i>
<p>
更多
</p>
<p>
反馈
</p>
</a>
</li>
</ul>
...
...
@@ -121,35 +109,6 @@
<img
src=
"http://bbs.yunya.com/data/attachment/block/3f/3f0a9860abffca597be57ae748d68b99.jpg"
>
</a>
</li></ul></div>
<div
class=
"foot-nav"
>
<ul
class=
"nav-list"
>
<li>
<a
href=
"/"
>
<i
class=
"iconfont icon-shouye"
></i>
<p>
首页
</p>
</a>
</li>
<li>
<a
href=
"http://xue.ibanshou.cn"
>
<i
class=
"iconfont icon-icon_huabanfuben-copy"
></i>
<p>
学院
</p>
</a>
</li>
<li>
<a
href=
"http://bbs.ibanshou.cn"
>
<i
class=
"iconfont icon-appluntan"
></i>
<p>
社区
</p>
</a>
</li>
<li
class=
"cur"
>
<a
href=
"javascript:;"
>
<i
class=
"iconfont icon-yonghu"
></i>
<p>
我的
</p>
</a>
</li>
</ul>
</div>
<script
type=
'text/javascript'
src=
"/skin/default/js/jquery-1.11.3.min.js"
></script>
<script
type=
'text/javascript'
src=
"/skin/default/js/swiper.min.js"
></script>
<script
type=
'text/javascript'
src=
"http://u.yunya.com/common/nav.js"
></script>
...
...
skin/default/js/news.js
View file @
b97d9fde
...
...
@@ -29,7 +29,7 @@ $(".send-pl").click(function () {
$
(
".comment-send-box"
).
hide
();
$
(
'.mask'
).
hide
();
}
else
{
pop
(
e
.
msg
);
pop
(
e
.
msg
,
e
.
data
);
}
},
'json'
);
});
...
...
@@ -106,7 +106,7 @@ $(".reply-pl").click(function () {
$
(
".comment-reply"
).
hide
();
$
(
'.mask'
).
hide
();
}
else
{
pop
(
e
.
msg
);
pop
(
e
.
msg
,
e
.
data
);
}
},
'json'
);
});
...
...
@@ -142,12 +142,16 @@ function likeComment(plid, islike) {
}
});
}
else
{
pop
(
e
.
msg
);
pop
(
e
.
msg
,
e
.
data
);
}
},
'json'
);
}
function
pop
(
msg
)
{
function
pop
(
msg
,
islogin
)
{
if
(
islogin
===
'nologin'
)
{
location
.
href
=
"/e/member/login"
;
return
false
;
}
layer
.
msg
(
msg
);
}
...
...
@@ -219,7 +223,7 @@ function diggtop() {
$
(
"#zan"
).
find
(
'i'
).
removeClass
(
'icon-zan'
).
addClass
(
'icon-zan-fill'
);
$
(
'.zan-tip'
).
animate
({
opacity
:
"1"
,
top
:
"-=30"
},
500
).
animate
({
opacity
:
"0"
,
top
:
"-30"
},
"slow"
);
}
else
{
pop
(
e
.
msg
);
pop
(
e
.
msg
,
e
.
data
);
}
},
'json'
);
});
...
...
@@ -237,7 +241,7 @@ $('#favor').click(function () {
$
(
self
).
find
(
'i'
).
removeClass
(
'icon-favor-fill'
).
addClass
(
'icon-favor'
);
}
}
else
{
pop
(
e
.
msg
);
pop
(
e
.
msg
,
e
.
data
);
}
},
'json'
);
});
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment