Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tl_estate
Project
Project
Details
Activity
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hujun
tl_estate
Commits
738c9d8e
Commit
738c9d8e
authored
Feb 18, 2019
by
duxinyuan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
bd18c9bb
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
66 additions
and
70 deletions
+66
-70
plNews.html
application/index/view/news/plNews.html
+21
-6
plNews.js
public/resource/js/plNews.js
+40
-41
plNews_template_tpl.html
public/resource/template/plNews_template_tpl.html
+5
-23
No files found.
application/index/view/news/plNews.html
View file @
738c9d8e
...
@@ -238,8 +238,23 @@
...
@@ -238,8 +238,23 @@
background
:
#fff
;
background
:
#fff
;
}
}
.btn4
{
.btn4
{
width
:
14%
!important
;
width
:
10%
!important
;
}
}
.autocut
{
display
:
block
;
max-width
:
300px
;
overflow
:
hidden
;
white-space
:
nowrap
;
text-overflow
:
ellipsis
;
-o-text-overflow
:
ellipsis
;
-icab-text-overflow
:
ellipsis
;
-khtml-text-overflow
:
ellipsis
;
-moz-text-overflow
:
ellipsis
;
-webkit-text-overflow
:
ellipsis
;
}
table
{
width
:
100%
;
/*table-layout:auto;*/
}
</style>
</style>
<!--导航star-->
<!--导航star-->
...
@@ -260,7 +275,7 @@
...
@@ -260,7 +275,7 @@
<div
class=
"panel-body"
>
<div
class=
"panel-body"
>
<div
class=
"table-responsive"
>
<div
class=
"table-responsive"
>
<table
class=
"table table-striped table-bordered table-hover table-condensed"
>
<table
class=
"table table-striped table-bordered table-hover table-condensed"
style=
"width : 100%!important;overflow:hidden ; "
>
<thead>
<thead>
<tr>
<tr>
<td
colspan=
"11"
>
<td
colspan=
"11"
>
...
@@ -278,8 +293,8 @@
...
@@ -278,8 +293,8 @@
<input
class=
"form-control btn2 margin-top-ld"
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"comit_name"
placeholder=
"姓名/手机号"
type=
"text"
value=
""
>
<input
class=
"form-control btn2 margin-top-ld"
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"comit_name"
placeholder=
"姓名/手机号"
type=
"text"
value=
""
>
<ul
class=
"user-ul"
style=
"display:none"
></ul>
<input
class=
"form-control btn2 margin-top-ld"
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"release_title"
placeholder=
"文章名称"
type=
"text"
value=
""
>
<input
class=
"form-control btn2 margin-top-ld"
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"release_title"
placeholder=
"文章名称"
type=
"text"
value=
""
>
<ul
class=
"user-ul"
style=
"display:none"
></ul>
<span
class=
"btn btn-info btn3 margin-top-ld"
id=
"search"
>
搜索
</span>
<span
class=
"btn btn-info btn3 margin-top-ld"
id=
"search"
>
搜索
</span>
<span
class=
"btn btn-info btn3 margin-top-ld"
id=
"reset"
>
重置
</span>
<span
class=
"btn btn-info btn3 margin-top-ld"
id=
"reset"
>
重置
</span>
...
@@ -291,7 +306,7 @@
...
@@ -291,7 +306,7 @@
<th
class=
"text-center"
>
评论时间
</th>
<th
class=
"text-center"
>
评论时间
</th>
<th
class=
"text-center"
>
评论人姓名
</th>
<th
class=
"text-center"
>
评论人姓名
</th>
<th
class=
"text-center"
>
文章标题
</th>
<th
class=
"text-center"
>
文章标题
</th>
<th
class=
"text-center"
>
评论内容
</th>
<th
class=
"text-center"
style=
"max-width : 40%"
>
评论内容
</th>
<th
class=
"text-center"
>
操作
</th>
<th
class=
"text-center"
>
操作
</th>
</tr>
</tr>
</thead>
</thead>
...
@@ -357,7 +372,7 @@
...
@@ -357,7 +372,7 @@
</h4>
</h4>
</div>
</div>
<div
class=
"modal-body"
>
<div
class=
"modal-body"
>
<span
id=
"realContex"
></span>
</div>
</div>
<div
class=
"modal-footer text-center"
>
<div
class=
"modal-footer text-center"
>
<button
type=
"button"
class=
"btn btn-default"
data-dismiss=
"modal"
>
关闭
</button>
<button
type=
"button"
class=
"btn btn-default"
data-dismiss=
"modal"
>
关闭
</button>
...
...
public/resource/js/plNews.js
View file @
738c9d8e
...
@@ -16,6 +16,7 @@ define (['doT', 'text!temp/plNews_template_tpl.html','ckfinder','ckfinderStart',
...
@@ -16,6 +16,7 @@ define (['doT', 'text!temp/plNews_template_tpl.html','ckfinder','ckfinderStart',
agent_id_two
:
''
,
agent_id_two
:
''
,
agent_id2
:
0
,
agent_id2
:
0
,
modal_btn_id
:
''
,
modal_btn_id
:
''
,
will_delete_id
:
''
,
init
:
function
()
{
init
:
function
()
{
//初始化dot
//初始化dot
$
(
"body"
).
append
(
template
);
$
(
"body"
).
append
(
template
);
...
@@ -33,10 +34,10 @@ define (['doT', 'text!temp/plNews_template_tpl.html','ckfinder','ckfinderStart',
...
@@ -33,10 +34,10 @@ define (['doT', 'text!temp/plNews_template_tpl.html','ckfinder','ckfinderStart',
$
(
"#reset"
).
click
(
function
()
{
$
(
"#reset"
).
click
(
function
()
{
document
.
getElementById
(
"form_search"
).
reset
();
document
.
getElementById
(
"form_search"
).
reset
();
});
});
$
(
"#confirm_delete"
).
click
(
function
(){
$
(
"#confirm_delete"
).
click
(
function
(
e
){
var
id
=
user
.
will_delete_id
;
var
params
=
{};
var
params
=
{};
params
.
id
=
user
.
announcementdel_id
;
params
.
id
=
id
;
console
.
log
(
user
.
announcementdel_id
);
if
(
!
params
.
id
||
params
.
id
==
null
){
if
(
!
params
.
id
||
params
.
id
==
null
){
alert
(
"要删除的id不能为空"
);
alert
(
"要删除的id不能为空"
);
return
false
;
return
false
;
...
@@ -49,6 +50,23 @@ define (['doT', 'text!temp/plNews_template_tpl.html','ckfinder','ckfinderStart',
...
@@ -49,6 +50,23 @@ define (['doT', 'text!temp/plNews_template_tpl.html','ckfinder','ckfinderStart',
user
.
text_details
();
user
.
text_details
();
});
});
$
(
"#show_modal"
).
on
(
"hidden.bs.modal"
,
function
(){
$
(
'#realContex'
).
text
(
""
);
});
$
(
document
).
on
(
'click'
,
'.show_modal_btn'
,
function
(
e
){
var
text
=
e
.
target
.
dataset
.
text
;
$
(
'#realContex'
).
text
(
text
);
});
$
(
document
).
on
(
'click'
,
'.announcement-del'
,
function
(
e
){
var
id
=
e
.
target
.
dataset
.
id
;
user
.
will_delete_id
=
e
.
target
.
dataset
.
id
;
});
$
(
'#modal-delete'
).
on
(
"hidden.bs.modal"
,
function
(){
user
.
will_delete_id
=
""
;
});
//部门门店的二级联动
//部门门店的二级联动
that
.
getDistrict
(
function
()
{
that
.
getDistrict
(
function
()
{
_doc
.
on
(
'input'
,
'#commit_home'
,
function
()
{
_doc
.
on
(
'input'
,
'#commit_home'
,
function
()
{
...
@@ -182,55 +200,36 @@ define (['doT', 'text!temp/plNews_template_tpl.html','ckfinder','ckfinderStart',
...
@@ -182,55 +200,36 @@ define (['doT', 'text!temp/plNews_template_tpl.html','ckfinder','ckfinderStart',
var
params
=
{};
var
params
=
{};
params
.
start_time
=
$
(
"#start_date"
).
val
();
params
.
start_time
=
$
(
"#start_date"
).
val
();
params
.
end_time
=
$
(
"#end_date"
).
val
();
params
.
end_time
=
$
(
"#end_date"
).
val
();
params
.
commit_home
=
$
(
'#commit_home'
).
val
();
params
.
district_id
=
$
(
'#commit_home'
).
val
();
params
.
commit_shop
=
$
(
'#commit_shop'
).
val
();
params
.
store_id
=
$
(
'#commit_shop'
).
val
();
params
.
userName
=
$
(
'#comit_name'
).
val
();
params
.
name
=
$
(
'#comit_name'
).
val
().
split
(
"-"
)[
1
];
params
.
release_title
=
$
(
'#release_title'
).
val
();
params
.
phone
=
$
(
'#comit_name'
).
val
().
split
(
"-"
)[
2
];
params
.
title
=
$
(
'#release_title'
).
val
();
params
.
pageNo
=
user
.
pageNo
;
params
.
pageNo
=
user
.
pageNo
;
params
.
pageSize
=
user
.
pageSize
;
params
.
pageSize
=
user
.
pageSize
;
console
.
log
(
params
);
console
.
log
(
params
);
// $.ajax ({
$
.
ajax
({
// url: '/index/business_school',
url
:
'/index/getCommentList'
,
// type: 'GET',
type
:
'GET'
,
// async: true,
async
:
true
,
// data: params,
data
:
params
,
// dataType: 'json',
dataType
:
'json'
,
// success: function (data) {
success
:
function
(
data
)
{
// console.log('公告');
// var temp = document.getElementById ('plNews_list_tpl').innerHTML;
console
.
log
(
'公告'
);
// var doTtmpl = doT.template (temp);
var
temp
=
document
.
getElementById
(
'plNews_list_tpl'
).
innerHTML
;
// $ ("#users_list").html (doTtmpl (data.data.list));
// /*分页代码*/
// add_page(data.data.total,pageNo,user.pageSize,user.getList);
// $("#total_page").html(data.data.total);
// }
// });
var
datas
=
[
{
'create_time'
:
'2018-08-08'
,
'title'
:
"china"
,
'comment_number'
:
"welcome"
,
'id'
:
1
},{
'create_time'
:
'2018-08-09'
,
'title'
:
"china0"
,
'comment_number'
:
"welcome1"
,
'id'
:
2
}
]
var
temp
=
document
.
getElementById
(
'plNews_list_tpl'
).
innerHTML
;
var
doTtmpl
=
doT
.
template
(
temp
);
var
doTtmpl
=
doT
.
template
(
temp
);
$
(
"#users_list"
).
html
(
doTtmpl
(
data
s
));
$
(
"#users_list"
).
html
(
doTtmpl
(
data
.
data
));
/*分页代码*/
/*分页代码*/
add_page
(
data
.
data
.
total
,
pageNo
,
user
.
pageSize
,
user
.
getList
);
add_page
(
data
.
data
.
total
,
pageNo
,
user
.
pageSize
,
user
.
getList
);
$
(
"#total_page"
).
html
(
data
.
data
.
total
);
$
(
"#total_page"
).
html
(
data
.
data
.
total
);
}
});
},
},
delete_text
:
function
(
params
)
{
//删除文章
delete_text
:
function
(
params
)
{
//删除文章
$
.
ajax
({
$
.
ajax
({
url
:
'/index/delNews'
,
url
:
'/index/delNews
Comment
'
,
type
:
'POST'
,
type
:
'POST'
,
async
:
true
,
async
:
true
,
data
:
params
,
data
:
params
,
...
...
public/resource/template/plNews_template_tpl.html
View file @
738c9d8e
<script
id=
"plNews_list_tpl"
type=
"text/template"
>
<script
id=
"plNews_list_tpl"
type=
"text/template"
>
[
%
if
(
it
)
{
%
]
[
%
if
(
it
)
{
%
]
[
%
for
(
var
item
in
it
){
%
]
[
%
for
(
var
item
in
it
){
%
]
<
tr
>
<
tr
style
=
"width : 100%;"
>
<
td
>
[
%=
it
[
item
][
'create_time'
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
'create_time'
]
%
]
<
/td
>
<!--<
td
>
[
%=
hideTel
(
it
[
item
][
"name"
])
%
]
<
/td>--
>
<
td
>
[
%=
it
[
item
][
"name"
]
%
]
<
/td
>
<!--<
td
>
[
%
if
(
it
[
item
][
"name"
]
!=
null
)
{
%
]
<
td
style
=
" "
>
[
%=
it
[
item
][
"title"
]
%
]
<
/td
>
[
%=
it
[
item
][
"name"
]
%
]
<
td
><
span
class
=
"autocut"
>
[
%=
it
[
item
][
"comment_content"
]
%
]
<
/span></
td
>
[
%
}
%
]
<
/td>--
>
<
td
>
[
%=
it
[
item
][
"title"
]
%
]
<
/td
>
<!--<
td
>
[
%
if
(
it
[
item
][
"label_name"
]
!=
null
)
{
%
]
[
%=
it
[
item
][
"label_name"
]
%
]
[
%
}
%
]
<
/td>--
>
<!--<
td
>
[
%=
it
[
item
][
"label_name"
]
%
]
<
/td>--
>
<!--
没有评论数字段
-->
<
td
>
[
%=
it
[
item
][
"comment_number"
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
"comment_number"
]
%
]
<
/td
>
<
td
>
<
td
>
<
a
href
=
"#show_modal"
class
=
"btn1 btn-success show_modal_btn"
data
-
toggle
=
"modal"
data
-
id
=
"[%= it[item]['id'] %]"
>
评论详情
<
/a>
<
a
href
=
"#show_modal"
class
=
"btn1 btn-success show_modal_btn"
data
-
toggle
=
"modal"
data
-
id
=
"[%= it[item]['id'] %]"
data
-
text
=
"[%= it[item]["
comment_content
"] %]"
>
评论详情
<
/a>
<!--<
a
class
=
"btn1 btn-success"
href
=
"new_text.html?id=[%= it[item]['id'] %]"
data
-
createTime
=
'[%= it[item]["create_time"] %]'
data
-
title
=
'[%= it[item]["title"] %]'
data
-
id
=
'[%= it[item]["id"] %]'
data
-
content
=
'[%= it[item]["content"] %]'
target
=
"_self"
>-->
<!--<
a
class
=
"btn1 btn-success"
href
=
"new_text.html?id=[%= it[item]['id'] %]"
data
-
id
=
"[%= it[item]['id'] %]"
>
编辑
<
/a
>
[
%
if
(
check_auth
(
'index/delNews'
))
{
%
]
-->
<!--
删除权限
-->
<
a
class
=
"btn1 btn-danger announcement-del"
href
=
"#modal-delete"
data
-
toggle
=
"modal"
data
-
id
=
'[%= it[item]["id"] %]'
>
删除
<
/a
>
<
a
class
=
"btn1 btn-danger announcement-del"
href
=
"#modal-delete"
data
-
toggle
=
"modal"
data
-
id
=
'[%= it[item]["id"] %]'
>
删除
<
/a
>
<!--
[
%
}
%
]
-->
<
/td
>
<
/td
>
<
/tr
>
<
/tr
>
[
%
}
%
]
[
%
}
%
]
...
...
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