Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
land_army
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sugar
land_army
Commits
7751973f
Commit
7751973f
authored
Jun 08, 2022
by
wuxiaoli
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
互动平台
parent
7751a3c8
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
259 additions
and
70 deletions
+259
-70
application/common/model/ReleaseArticleModel.php
application/common/model/ReleaseArticleModel.php
+30
-0
application/common/model/ReleaseReplyModel.php
application/common/model/ReleaseReplyModel.php
+22
-0
application/index/controller/Index.php
application/index/controller/Index.php
+1
-3
application/index/controller/Interactive.php
application/index/controller/Interactive.php
+110
-3
application/index/view/common/headnavs.html
application/index/view/common/headnavs.html
+3
-1
application/index/view/index/index.html
application/index/view/index/index.html
+1
-1
application/index/view/index/interactdiscuss.html
application/index/view/index/interactdiscuss.html
+92
-62
No files found.
application/common/model/ReleaseArticleModel.php
0 → 100644
View file @
7751973f
<?php
namespace
app\common\model
;
use
think\Model
;
class
ReleaseArticleModel
Extends
Model
{
// 表名
protected
$name
=
'release_article'
;
// 开启自动写入时间戳字段
protected
$autoWriteTimestamp
=
'int'
;
// 定义时间戳字段名
protected
$createTime
=
'createtime'
;
protected
$updateTime
=
false
;
// 追加属性
protected
$append
=
[
];
public
static
function
queryReleaseArticle
(
$where
,
$field
=
"*"
,
$page
=
1
,
$pageSize
=
10
,
$order
=
'createtime desc'
){
$list
=
self
::
where
(
$where
)
->
field
(
$field
)
->
order
(
$order
)
->
limit
(
$pageSize
)
->
page
(
$page
)
->
select
();
foreach
(
$list
as
$key
=>
$val
){
$list
[
$key
][
'content'
]
=
mb_substr_content
(
$val
[
'content'
],
550
);
}
return
$list
;
}
}
application/common/model/ReleaseReplyModel.php
0 → 100644
View file @
7751973f
<?php
namespace
app\common\model
;
use
think\Model
;
class
ReleaseReplyModel
Extends
Model
{
// 表名
protected
$name
=
'release_reply'
;
// 开启自动写入时间戳字段
protected
$autoWriteTimestamp
=
'int'
;
// 定义时间戳字段名
protected
$createTime
=
'createtime'
;
protected
$updateTime
=
false
;
// 追加属性
protected
$append
=
[
];
}
application/index/controller/Index.php
View file @
7751973f
...
@@ -12,6 +12,7 @@ use app\common\model\AdModel;
...
@@ -12,6 +12,7 @@ use app\common\model\AdModel;
use
app\common\model\CourseVideoModel
;
use
app\common\model\CourseVideoModel
;
use
think\Db
;
use
think\Db
;
use
think\Hook
;
use
think\Hook
;
use
think\Session
;
class
Index
extends
Backend
class
Index
extends
Backend
...
@@ -32,9 +33,6 @@ class Index extends Backend
...
@@ -32,9 +33,6 @@ class Index extends Backend
$result
=
$this
->
auth
->
adminlogin
(
$username
,
86400
);
$result
=
$this
->
auth
->
adminlogin
(
$username
,
86400
);
if
(
$result
===
true
)
{
if
(
$result
===
true
)
{
Hook
::
listen
(
"admin_login_after"
,
$this
->
request
);
Hook
::
listen
(
"admin_login_after"
,
$this
->
request
);
}
else
{
$msg
=
$this
->
auth
->
getError
();
$msg
=
$msg
?
$msg
:
__
(
'用户名或密码不正确'
);
}
}
}
}
}
}
...
...
application/index/controller/Interactive.php
View file @
7751973f
...
@@ -9,6 +9,11 @@ use app\common\controller\Frontend;
...
@@ -9,6 +9,11 @@ use app\common\controller\Frontend;
use
app\common\model\AdModel
;
use
app\common\model\AdModel
;
use
app\common\model\CourseArticleModel
;
use
app\common\model\CourseArticleModel
;
use
app\common\model\CourseClassModel
;
use
app\common\model\CourseClassModel
;
use
app\common\model\ReleaseArticleModel
;
use
app\common\model\ReleaseReplyModel
;
use
think\Db
;
use
think\Hook
;
use
think\Session
;
/**互动平台
/**互动平台
* Class Interactive
* Class Interactive
...
@@ -18,6 +23,7 @@ class Interactive extends Backend
...
@@ -18,6 +23,7 @@ class Interactive extends Backend
protected
$noNeedLogin
=
'*'
;
protected
$noNeedLogin
=
'*'
;
protected
$noNeedRight
=
'*'
;
protected
$noNeedRight
=
'*'
;
protected
$layout
=
''
;
protected
$layout
=
''
;
protected
$pagesize
=
10
;
public
function
index
(){
public
function
index
(){
...
@@ -44,11 +50,112 @@ class Interactive extends Backend
...
@@ -44,11 +50,112 @@ class Interactive extends Backend
}
}
/**互动讨论区
*/
public
function
interactdiscuss
()
public
function
interactdiscuss
()
{
{
# code...
$keywords
=
$this
->
request
->
param
(
"keywords"
);
$listdata
=
[
1
,
2
,
3
,
4
,
5
];
$where
[
'is_delete'
]
=
0
;
$this
->
view
->
assign
(
"listdata"
,
$listdata
);
if
(
!
empty
(
$keywords
)){
$where
[
'content'
]
=
[
'like'
,
"%
$keywords
%"
];
}
$list
=
ReleaseArticleModel
::
where
(
$where
)
->
field
(
'*,FROM_UNIXTIME(createtime,"%Y-%m-%d %h:%i:%s") as createtime_text'
)
->
order
(
'createtime desc'
)
->
paginate
(
$this
->
pagesize
,
false
,[
'query'
=>
$this
->
request
->
param
()]);
foreach
(
$list
as
$key
=>
$val
){
$list
[
$key
][
'content'
]
=
mb_substr_content
(
$val
[
'content'
],
550
);
$list
[
$key
][
'adminuser'
]
=
Db
::
name
(
"admin"
)
->
where
([
'id'
=>
$val
[
'admin_id'
]])
->
field
(
"username,nickname,avatar,type"
)
->
find
();
$list
[
$key
][
'countTeacherReply'
]
=
ReleaseReplyModel
::
alias
(
"r"
)
->
join
(
"admin a"
,
"r.admin_id= a.id"
,
"LEFT"
)
->
where
([
'r.is_delete'
=>
0
,
'r.release_id'
=>
$val
[
'id'
],
'a.type'
=>
2
])
->
count
();
$list
[
$key
][
'countStudentReply'
]
=
ReleaseReplyModel
::
alias
(
"r"
)
->
join
(
"admin a"
,
"r.admin_id= a.id"
,
"LEFT"
)
->
where
([
'r.is_delete'
=>
0
,
'r.release_id'
=>
$val
[
'id'
],
'a.type'
=>
1
])
->
count
();
$list
[
$key
][
'countAllReply'
]
=
ReleaseReplyModel
::
where
([
'is_delete'
=>
0
,
'release_id'
=>
$val
[
'id'
]])
->
count
();
}
$this
->
view
->
assign
(
"list"
,
$list
);
$page
=
$list
->
render
();
$total
=
$list
->
total
();
$this
->
view
->
assign
(
"total"
,
$total
);
$this
->
view
->
assign
(
"page"
,
$page
);
$this
->
view
->
assign
(
"offset"
,
(
$list
->
currentPage
()
-
1
)
*
$list
->
listRows
()
+
1
);
$currenttotal
=
$list
->
currentPage
()
*
$list
->
listRows
();
if
(
$currenttotal
>
$list
->
total
())
{
$currenttotal
=
$list
->
total
();
}
$this
->
view
->
assign
(
"currenttotal"
,
$currenttotal
);
$this
->
view
->
assign
(
"keywords"
,
$keywords
);
return
$this
->
view
->
fetch
(
"index/interactdiscuss"
);
return
$this
->
view
->
fetch
(
"index/interactdiscuss"
);
}
}
/*
* 添加留言板
*/
public
function
ajaxAddReleaseArticle
(){
$content
=
$this
->
request
->
param
(
"content"
);
if
(
empty
(
$content
)){
$this
->
error
(
"请输入留言内容!"
);
}
if
(
$this
->
auth
->
isLogin
())
{
ReleaseArticleModel
::
create
([
'admin_id'
=>
$this
->
auth
->
id
,
'content'
=>
$content
,
'createtime'
=>
time
()]);
$this
->
success
(
"留言成功!"
);
}
else
{
$this
->
error
(
__
(
'Please login first'
),
url
(
'index/login'
));
}
}
/**
* 添加留言评论
*/
public
function
ajaxAddReleaseReply
(){
$content
=
$this
->
request
->
param
(
"content"
);
$release_id
=
$this
->
request
->
param
(
"release_id"
);
if
(
empty
(
$content
)){
$this
->
error
(
"请输入留言内容!"
);
}
if
(
empty
(
$release_id
)){
$this
->
error
(
"请选择留言内容进行评论!"
);
}
if
(
$this
->
auth
->
isLogin
())
{
ReleaseReplyModel
::
create
([
'release_id'
=>
$release_id
,
'admin_id'
=>
$this
->
auth
->
id
,
'content'
=>
$content
,
'createtime'
=>
time
()]);
$this
->
success
(
"留言成功!"
);
}
else
{
$this
->
error
(
__
(
'Please login first'
),
url
(
'index/login'
));
}
}
/**
* 分页加载评论列表
*/
public
function
loadingReleaseReply
(){
$release_id
=
$this
->
request
->
param
(
"release_id"
);
$page
=
$this
->
request
->
param
(
"page"
,
1
);
$type
=
$this
->
request
->
param
(
"type"
,
0
);
//教师2,学生1 全部0
$map
[
'r.is_delete'
]
=
0
;
$map
[
'r.release_id'
]
=
$release_id
;
if
(
in_array
(
$type
,[
1
,
2
])){
$map
[
'a.type'
]
=
$type
;
}
$list
=
ReleaseReplyModel
::
alias
(
"r"
)
->
join
(
"admin a"
,
"r.admin_id= a.id"
,
"LEFT"
)
->
where
(
$map
)
->
field
(
'r.*,FROM_UNIXTIME(r.createtime,"%Y-%m-%d %h:%i:%s") as createtime_text,a.username,a.nickname,a.avatar,a.type'
)
->
order
(
'r.createtime desc'
)
->
limit
(
$this
->
pagesize
)
->
page
(
$page
)
->
select
();
/*$list =ReleaseReplyModel::where($where)->field('*,FROM_UNIXTIME(createtime,"%Y-%m-%d %h:%i:%s") as createtime_text')
->order('createtime desc')
->limit($this->pagesize)
->page($page)
->select();*/
$list
=
collection
(
$list
)
->
toArray
();
$result
=
array
(
"rows"
=>
$list
);
return
json
(
$result
);
}
}
}
\ No newline at end of file
application/index/view/common/headnavs.html
View file @
7751973f
...
@@ -13,10 +13,12 @@
...
@@ -13,10 +13,12 @@
<!-- <li class="navitems"><a class="alink" href="/index.php/index/index/tsztindex">特色专题</a></li> -->
<!-- <li class="navitems"><a class="alink" href="/index.php/index/index/tsztindex">特色专题</a></li> -->
<!-- <li class="navitems"><a class="alink" href="javascript:;">教学团队</a></li> -->
<!-- <li class="navitems"><a class="alink" href="javascript:;">教学团队</a></li> -->
</ul>
</ul>
{if $admin==null}
<div
class=
"navrights"
>
<div
class=
"navrights"
>
<a
class=
"linklogin"
href=
"
javascript:;
"
>
登录
</a>
<a
class=
"linklogin"
href=
"
/yCVjiDHwKq.php/index/login
"
>
登录
</a>
<!-- <a class="langtaggle" href="javascript:;">EN 丨 CN</a> -->
<!-- <a class="langtaggle" href="javascript:;">EN 丨 CN</a> -->
</div>
</div>
{/if}
</div>
</div>
</div>
</div>
<!-- basenav end -->
<!-- basenav end -->
\ No newline at end of file
application/index/view/index/index.html
View file @
7751973f
...
@@ -336,7 +336,7 @@
...
@@ -336,7 +336,7 @@
</div>
</div>
</div>
</div>
<div
class=
"hdtlzq"
>
<div
class=
"hdtlzq"
>
<a
href=
"/index.php/index/interactive/in
dex
"
><img
class=
"hudongtlzq"
src=
"{$hd_banner.photo ?? ''}"
<a
href=
"/index.php/index/interactive/in
teractdiscuss
"
><img
class=
"hudongtlzq"
src=
"{$hd_banner.photo ?? ''}"
alt=
""
></a>
alt=
""
></a>
</div>
</div>
</div>
</div>
...
...
application/index/view/index/interactdiscuss.html
View file @
7751973f
...
@@ -40,71 +40,41 @@
...
@@ -40,71 +40,41 @@
</div>
</div>
<div
class=
"interactview clearfix "
>
<div
class=
"interactview clearfix "
>
<div
class=
"interactview_left"
>
<div
class=
"interactview_left"
>
{foreach name="list
data
" item="vo" key="k"}
{foreach name="list" item="vo" key="k"}
<div
class=
"discussitem"
>
<div
class=
"discussitem"
>
<div
class=
"linzhuinfo clearfix"
>
<div
class=
"linzhuinfo clearfix"
>
<img
class=
"utxs"
src=
"
http://i.qqkou.com/i/0a2642282057x2965290716b26.jpg
"
alt=
""
>
<img
class=
"utxs"
src=
"
{$vo.adminuser.avatar}
"
alt=
""
>
<div
class=
"uinfosx"
>
<div
class=
"uinfosx"
>
<p
class=
"nikesname"
>
文文尚木
</p>
<p
class=
"nikesname"
>
{$vo.adminuser.nickname}
</p>
<p
class=
"uinfotexts"
>
发布留言
<span
class=
"datetime"
>
2022-05-27 17:11:49
</span></p>
<p
class=
"uinfotexts"
>
发布留言
<span
class=
"datetime"
>
{$vo.createtime_text}
</span></p>
</div>
</div>
</div>
</div>
<div
class=
"louxiainfo"
>
<div
class=
"louxiainfo"
>
<div
class=
"lzplcontent"
>
<div
class=
"lzplcontent"
>
新华社北京4月25日电 在五四青年节即将到来之际,中共中央总书记、国家主席、中央军委主席习近平25日上午来到中国人民大学考察调研。
{$vo.content}
</div>
</div>
<!-- tab -->
<!-- tab -->
<div
class=
"replytabs clearfix"
>
<div
class=
"replytabs clearfix"
>
<div
class=
"replytabstab"
>
<div
class=
"replytabstab"
>
<div
class=
"replytabsitem"
>
教师(1
)
</div>
<div
class=
"replytabsitem"
onclick=
"returnReply({$vo.id},2)"
>
教师({$vo.countTeacherReply}
)
</div>
<div
class=
"replytabsitem"
>
学生(1
)
</div>
<div
class=
"replytabsitem"
onclick=
"returnReply({$vo.id},1)"
>
学生({$vo.countStudentReply}
)
</div>
<div
class=
"replytabsitem actives"
>
全部回复(2
)
</div>
<div
class=
"replytabsitem actives"
onclick=
"returnReply({$vo.id},0)"
>
全部回复({$vo.countAllReply}
)
</div>
</div>
</div>
<span
class=
"replytabs_tit"
>
回复:
</span>
<span
class=
"replytabs_tit"
>
回复:
</span>
</div>
</div>
<div
class=
"replytags"
>
<div
class=
"replytags"
>
<div
class=
"replytags_items "
>
<div
id=
"replytags_items"
>
<div
class=
"clearfix"
>
<img
class=
"hfusertx"
src=
"http://q2.qlogo.cn/headimg_dl?dst_uin=10000&spec=100"
alt=
""
>
<div
class=
"hfcontents"
>
<span
class=
"hfnames"
>
张老师:
</span>
<span
class=
"hfcontensa"
>
在长期的办学实践中,注重人文社会科学高等教育和马克思主义教学与研究,被誉为“我国人文社会
科学高等教育领域的一面旗帜”。
</span>
</div>
</div>
<div
class=
"reply_time"
>
2022-05-27 17:11:49
</div>
</div>
<div
class=
"replytags_items "
>
<div
class=
"clearfix"
>
<img
class=
"hfusertx"
src=
"http://q2.qlogo.cn/headimg_dl?dst_uin=10000&spec=100"
alt=
""
>
<div
class=
"hfcontents"
>
<span
class=
"hfnames"
>
张老师:
</span>
<span
class=
"hfcontensa"
>
在长期的办学实践中,注重人文社会科学高等教育和马克思主义教学与研究,被誉为“我国人文社会
科学高等教育领域的一面旗帜”。
</span>
</div>
</div>
<div
class=
"reply_time"
>
2022-05-27 17:11:49
</div>
</div>
<div
class=
"replytags_items "
>
<div
class=
"clearfix"
>
<img
class=
"hfusertx"
src=
"http://q2.qlogo.cn/headimg_dl?dst_uin=10000&spec=100"
alt=
""
>
<div
class=
"hfcontents"
>
<span
class=
"hfnames"
>
张老师:
</span>
<span
class=
"hfcontensa"
>
在长期的办学实践中,注重人文社会科学高等教育和马克思主义教学与研究,被誉为“我国人文社会
科学高等教育领域的一面旗帜”。
</span>
</div>
</div>
<div
class=
"reply_time"
>
2022-05-27 17:11:49
</div>
</div>
<div
class=
"replyinputtags"
>
</div>
<div
class=
"operationbtn clearfix"
>
<div
class=
"replyinputtags"
style=
"display: none"
>
<!--<div class="operationbtn clearfix">
<div class="replybtnssx">回复一下</div>
<div class="replybtnssx">回复一下</div>
</div>
</div>-->
<textarea
class=
"inputtextarea"
name=
""
id=
""
cols=
"30"
rows=
"10"
></textarea>
<input
type=
"hidden"
id=
"replyId"
value=
"{$vo.id}"
>
<textarea
class=
"inputtextarea"
name=
""
id=
"replyContent"
cols=
"30"
rows=
"10"
></textarea>
<div
class=
"operationbtnsub clearfix"
>
<div
class=
"operationbtnsub clearfix"
>
<div
class=
"replybtnssxsub"
>
发送
</div>
<div
class=
"replybtnssxsub"
>
发送
</div>
</div>
</div>
...
@@ -115,20 +85,23 @@
...
@@ -115,20 +85,23 @@
{/foreach}
{/foreach}
</div>
</div>
<div
class=
"interactview_right"
>
<div
class=
"interactview_right"
>
<form
name=
"form"
class=
"form-vertical"
method=
"GET"
action=
""
>
<div
class=
"leavingsearch"
>
<div
class=
"leavingsearch"
>
<p
class=
"searchtitle"
>
留言搜索
</p>
<p
class=
"searchtitle"
>
留言搜索
</p>
<div
class=
"leavinginputs clearfix"
>
<div
class=
"leavinginputs clearfix"
>
<input
class=
"inputs"
type=
"text"
placeholder=
"请输入关键词"
>
<input
class=
"inputs"
type=
"text"
name=
"keywords"
value=
"{$keywords}"
placeholder=
"请输入关键词"
>
<button
class=
"searchbtnfdj"
>
<button
class=
"searchbtnfdj"
>
<img
class=
"searchiconlaver"
src=
"/static/images/index/searchiconlaver.png"
alt=
""
>
<img
class=
"searchiconlaver"
src=
"/static/images/index/searchiconlaver.png"
alt=
""
>
</button>
</button>
</div>
</div>
</div>
</div>
</form>
<div
class=
"leavingtagggs"
>
<div
class=
"leavingtagggs"
>
<p
class=
"searchtitle"
>
我要留言
</p>
<p
class=
"searchtitle"
>
我要留言
</p>
<textarea
class=
"leavinginputss"
placeholder=
"请输入您的留言内容"
name=
""
id=
"
"
cols=
"30"
rows=
"10"
></textarea>
<textarea
class=
"leavinginputss"
placeholder=
"请输入您的留言内容"
id=
"articleContent
"
cols=
"30"
rows=
"10"
></textarea>
<button
class=
"submitleavings"
>
发送留言
</button>
<button
class=
"submitleavings"
>
发送留言
</button>
</div>
</div>
<div
class=
"leavingtagggs"
>
<div
class=
"leavingtagggs"
>
<p
class=
"searchtitle"
>
关注
</p>
<p
class=
"searchtitle"
>
关注
</p>
<div
class=
"btnboxtaggs"
>
<div
class=
"btnboxtaggs"
>
...
@@ -145,7 +118,7 @@
...
@@ -145,7 +118,7 @@
<div
class=
"fpages fpagestwo"
id=
"pagination-jump"
style=
"border: 0"
>
<div
class=
"fpages fpagestwo"
id=
"pagination-jump"
style=
"border: 0"
>
<div
class=
"fixed-table-pagination"
style=
"display: block;"
>
<div
class=
"fixed-table-pagination"
style=
"display: block;"
>
<div
class=
"pagination-detail"
><span
class=
"pagination-info"
>
<div
class=
"pagination-detail"
><span
class=
"pagination-info"
>
显示第
1 到第 10 条记录,总共 34
条记录
</span>
显示第
{$offset} 到第 {$currenttotal} 条记录,总共 {$total}
条记录
</span>
<span
class=
"page-list"
>
每页显示
<span
class=
"page-list"
>
每页显示
<span
class=
"btn-group dropup"
>
<span
class=
"btn-group dropup"
>
<button
type=
"button"
class=
"btn btn-default dropdown-toggle"
data-toggle=
"dropdown"
aria-expanded=
"false"
>
<button
type=
"button"
class=
"btn btn-default dropdown-toggle"
data-toggle=
"dropdown"
aria-expanded=
"false"
>
...
@@ -153,27 +126,84 @@
...
@@ -153,27 +126,84 @@
<ul
class=
"dropdown-menu"
role=
"menu"
>
<ul
class=
"dropdown-menu"
role=
"menu"
>
<li
role=
"menuitem"
class=
"active"
>
<li
role=
"menuitem"
class=
"active"
>
<a
href=
"#"
>
10
</a></li>
<a
href=
"#"
>
10
</a></li>
<!--<li role="menuitem"><a href="#">20</a></li>-->
</ul></span>
条记录
</span>
</ul></span>
条记录
</span>
</div>
</div>
</div>
</div>
<ul
class=
"pagination"
>
{$page}
<li
class=
"disabled"
><span>
«
</span>
</li>
<li
class=
"active"
><span>
1
</span></li>
<li><a
href=
"javascript:;"
>
2
</a></li>
<li><a
href=
"javascript:;"
>
3
</a></li>
<li><a
href=
"javascript:;"
>
4
</a></li>
<li><a
href=
"javascript:;"
>
»
</a></li>
</ul>
</div>
</div>
</div>
</div>
{include file="common/footers" /}
{include file="common/footers" /}
<script>
//添加留言板
$
(
document
).
on
(
"
click
"
,
"
.submitleavings
"
,
function
()
{
var
data
=
{
"
content
"
:
$
(
"
#articleContent
"
).
val
()};
$
.
ajax
({
type
:
"
GET
"
,
url
:
"
ajaxAddReleaseArticle
"
,
data
:
data
,
success
:
function
(
msg
){
if
(
msg
.
code
==
0
){
alert
(
msg
.
msg
);
}
else
{
alert
(
msg
.
msg
);
location
.
replace
(
location
.
href
);
}
}
});
});
//添加留言评论
$
(
document
).
on
(
"
click
"
,
"
.replybtnssxsub
"
,
function
()
{
var
data
=
{
"
content
"
:
$
(
"
#replyContent
"
).
val
(),
"
release_id
"
:
$
(
"
#replyId
"
).
val
()};
$
.
ajax
({
type
:
"
GET
"
,
url
:
"
ajaxAddReleaseReply
"
,
data
:
data
,
success
:
function
(
msg
){
if
(
msg
.
code
==
0
){
alert
(
msg
.
msg
);
}
else
{
alert
(
msg
.
msg
);
location
.
replace
(
location
.
href
);
}
}
});
});
//懒加载
function
returnReply
(
id
,
type
)
{
var
data
=
{
"
release_id
"
:
id
,
'
type
'
:
type
};
$
.
ajax
({
type
:
"
GET
"
,
url
:
"
loadingReleaseReply
"
,
data
:
data
,
success
:
function
(
msg
){
var
row
=
msg
.
rows
;
$
(
"
#replytags_items
"
).
empty
();
var
html
=
''
;
for
(
var
i
=
0
;
i
<
msg
.
rows
.
length
;
i
++
){
html
+=
'
<div class="replytags_items">
\n
'
+
'
<div class="clearfix">
\n
'
+
'
<img class="hfusertx" src="
'
+
row
[
i
].
avatar
+
'
" alt="">
\n
'
+
'
<div class="hfcontents">
\n
'
+
'
<span class="hfnames">
'
+
row
[
i
].
nickname
+
'
:</span>
\n
'
+
'
<span class="hfcontensa">
'
+
row
[
i
].
content
+
'
</span>
\n
'
+
'
</div>
\n
'
+
'
</div>
\n
'
+
'
<div class="reply_time">
'
+
row
[
i
].
createtime_text
+
'
</div>
\n
'
+
'
</div>
'
;
}
$
(
"
#replytags_items
"
).
append
(
html
);
$
(
"
.replyinputtags
"
).
css
(
"
display
"
,
"
block
"
);
// $(this).parent(".replytabstab").find(".replytabsitem").removeClass("actives");
// $(this).addClass("actives");
}
});
}
</script>
</body>
</body>
</html>
</html>
\ No newline at end of file
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