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
561338e0
Commit
561338e0
authored
Feb 14, 2019
by
duxinyuan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
商学院评论列表,未注册路由,代码未王城,接口未对接,模态框数据未定义
parent
5b22c989
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
660 additions
and
0 deletions
+660
-0
plNews.html
application/index/view/news/plNews.html
+370
-0
plNews.js
public/resource/js/plNews.js
+251
-0
plNews_template_tpl.html
public/resource/template/plNews_template_tpl.html
+39
-0
No files found.
application/index/view/news/plNews.html
0 → 100644
View file @
561338e0
{layout name="global/frame_two_tpl" /}
<input
type=
"hidden"
class=
"page-load"
id=
"plNews"
/>
<style>
.modal-body1
{
height
:
600px
;
overflow-y
:
auto
;
padding-bottom
:
60px
;
}
.modal-body2
{
padding
:
35px
;
height
:
380px
;
}
.user-ul
{
width
:
100%
;
height
:
auto
;
padding-bottom
:
15px
;
float
:
left
;
position
:
relative
;
left
:
-40px
;
}
.user-ul
li
{
list-style
:
none
;
line-height
:
30px
;
}
.user-ul2
{
width
:
100%
;
height
:
auto
;
padding-bottom
:
15px
;
float
:
left
;
position
:
relative
;
left
:
-40px
;
}
.user-ul2
li
{
list-style
:
none
;
line-height
:
30px
;
}
.input
{
width
:
16%
!important
;
}
.text-left
{
float
:
left
;
display
:
inline-block
;
height
:
26px
;
line-height
:
26px
;
font-size
:
14px
;
}
.text-right
{
float
:
right
;
display
:
inline-block
;
}
#batch
{
float
:
left
;
height
:
34px
;
line-height
:
34px
;
}
.ld-Marheight
{
margin-top
:
15px
;
}
.phone_list
{
margin-top
:
32px
;
width
:
182px
;
margin-left
:
-182px
;
}
.phone_jia
{
width
:
182px
;
}
.phone_list
li
{
height
:
22px
;
line-height
:
22px
;
}
.phone_list
li
:nth-of-type
(
even
)
{
display
:
none
;
}
.modal-dialog-one
{
width
:
668px
;
}
.clear
{
clear
:
both
;
}
.left
{
float
:
left
;
font-size
:
12px
;
}
.bottom
{
margin-top
:
30px
;
}
.btn6_1
{
width
:
80%
!important
;
float
:
left
;
}
.notice-title
{
font-size
:
20px
;
}
.notice-time
{
font-size
:
13px
;
margin-top
:
20px
;
}
.notice-text
{
font-size
:
16px
;
margin-top
:
30px
;
text-indent
:
2em
;
}
.col-sm-9
.btn5
{
width
:
30%
!important
;
}
.img-pre-ul
{
padding-left
:
0
;
overflow
:
hidden
;
/*width: 100%;*/
}
/*图片上传相关样式*/
.img-pre-ul
>
li
{
list-style
:
no
;
float
:
left
;
width
:
210px
;
height
:
170px
;
overflow
:
hidden
;
margin-right
:
10px
;
margin-top
:
10px
;
}
.img-pre-ul
>
li
.pdf-pre-li
{
height
:
70px
;
}
.img-pre-ul
>
li
>
img
{
float
:
left
;
width
:
210px
;
height
:
140px
;
object-fit
:
contain
;
cursor
:
pointer
;
}
.img-pre-ul
>
li
>
a
{
float
:
left
;
width
:
210px
;
text-align
:
center
;
line-height
:
30px
;
}
.img-pre-ul
>
li
>
a
.pdf-pre-a
{
line-height
:
20px
;
word-break
:
break-all
;
}
/*图片点击放大预览区域的样式*/
#img_mask_area
{
position
:
fixed
;
left
:
0
;
top
:
0
;
width
:
100%
;
height
:
100%
;
overflow
:
hidden
;
z-index
:
1999
;
background-color
:
rgba
(
0
,
0
,
0
,
.3
);
display
:
none
;
}
#img_mask_area
>
img
{
width
:
900px
;
height
:
700px
;
object-fit
:
contain
;
position
:
absolute
;
left
:
50%
;
top
:
50%
;
margin-left
:
-450px
;
margin-top
:
-350px
;
}
/*上传图片列表 样式*/
.form-group
{
margin
:
10px
;
}
.input-100-width
{
width
:
100px
!important
;
}
.input-360-width
{
width
:
360px
!important
;
}
.textarea-500-width
{
width
:
500px
!important
;
}
.list-group-item
>
.full-width-100
+
.full-width-100
{
padding-top
:
10px
;
}
.list-group-item
>
.full-width-100
>
label
{
width
:
60px
;
}
.list-group-item
>
.full-pic-area
>
label
{
width
:
120px
;
}
.delet-pic-btn
{
color
:
red
;
}
#modal_content_add
{
width
:
900px
;
}
.cke_skin_kama
.cke_wrapper
{
background-color
:
#fff
;
}
#modal_detail_value
{
height
:
200px
;
overflow-y
:
scroll
;
border
:
1px
solid
#ccc
;
background
:
#fff
;
}
.btn4
{
width
:
14%
!important
;
}
</style>
<!--导航star-->
<!-- Sidebar -->
<!-- /#sidebar-wrapper -->
<!-- Page Content -->
<div
id=
"page-content-wrapper"
>
<div
class=
"container"
>
<div
class=
"row"
>
<div
class=
""
>
<div
class=
"panel panel-default"
>
<div
class=
"panel-heading breadcrumb"
>
<li
class=
"active"
>
商学院心得评论
</li>
<div
class=
"pull-right"
>
</div>
</div>
<div
class=
"panel-body"
>
<div
class=
"table-responsive"
>
<table
class=
"table table-striped table-bordered table-hover table-condensed"
>
<thead>
<tr>
<td
colspan=
"11"
>
<form
action=
""
method=
"get"
id=
"form_search"
>
<span
class=
"fore-span ld-Marheight"
>
评论时间:
</span>
<input
class=
"form-control btn4 ld-Marheight"
value=
""
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"start_date"
name=
"start_date"
type=
"date"
>
<span
class=
"fore-span ld-Marheight"
>
-
</span>
<input
class=
"form-control btn4 ld-Marheight"
value=
""
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"end_date"
name=
"end_date"
type=
"date"
>
<select
class=
"form-control btn2 ld-Marheight"
id=
"commit_home"
>
<option
value=
""
>
提交人所在部门
</option>
</select>
<select
class=
"form-control btn2 ld-Marheight"
id=
"commit_shop"
>
<option
value=
""
>
提交人所在门店
</option>
</select>
<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=
""
>
<span
class=
"btn btn-info btn3 margin-top-ld"
id=
"search"
>
搜索
</span>
<span
class=
"btn btn-info btn3 margin-top-ld"
id=
"reset"
>
重置
</span>
</form>
</td>
</tr>
<tr>
<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>
</tr>
</thead>
<tbody
id=
"users_list"
class=
"text-center"
>
</tbody>
</table>
</div>
<div
class=
"text-right"
id=
"pagediv"
>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- /#wrapper -->
<!-- /#删除模态框 -->
<div
class=
"modal fade"
id=
"modal-delete"
tabindex=
"-1"
role=
"dialog"
aria-labelledby=
"myModalLabel"
aria-hidden=
"true"
>
<div
class=
"modal-dialog"
>
<div
class=
"modal-content"
>
<div
class=
"modal-header"
>
<button
type=
"button"
class=
"close"
data-dismiss=
"modal"
aria-hidden=
"true"
>
×
</button>
<h4
class=
"modal-title"
>
删除
</h4>
</div>
<div
class=
"modal-body"
>
<div
class=
"modal-body"
>
<input
type=
"hidden"
value=
""
id=
"delete_id"
/>
确认删除吗?
</div>
</div>
<div
class=
"modal-footer"
>
<button
type=
"button"
class=
"btn btn-default"
data-dismiss=
"modal"
>
关闭
</button>
<button
type=
"button"
class=
"btn btn-primary"
id=
"confirm_delete"
>
删除
</button>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal -->
</div>
<!-- 查看-->
<div
class=
"modal fade"
id=
"show_modal"
tabindex=
"-1"
role=
"dialog"
aria-labelledby=
"myModalLabel"
aria-hidden=
"true"
>
<div
class=
"modal-dialog button-center-bargain"
style=
"width:70%!important"
>
<div
class=
"modal-content"
>
<div
class=
"modal-header"
>
<button
type=
"button"
class=
"close"
data-dismiss=
"modal"
aria-hidden=
"true"
>
×
</button>
<h4
class=
"modal-title"
>
详情
</h4>
</div>
<div
class=
"modal-body"
>
</div>
<div
class=
"modal-footer text-center"
>
<button
type=
"button"
class=
"btn btn-default"
data-dismiss=
"modal"
>
关闭
</button>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal -->
</div>
\ No newline at end of file
public/resource/js/plNews.js
0 → 100644
View file @
561338e0
define
([
'doT'
,
'text!temp/plNews_template_tpl.html'
,
'ckfinder'
,
'ckfinderStart'
,
'css!style/home.css'
,
"datetimepicker"
,
'pagination'
,
'bootstrapJs'
],
function
(
doT
,
template
)
{
//处理文件名,长度过长时处理
function
dealFileName
(
str
)
{
//如果文件超过30的长度,则用*代替
if
(
str
.
length
>
26
)
{
return
str
.
slice
(
0
,
23
)
+
'***'
+
str
.
slice
(
-
4
);
}
else
{
return
str
;
};
};
var
user
=
{
pageNo
:
1
,
/*第几页*/
pageSize
:
15
,
/*每页显示多少条*/
user_id
:
0
,
urls
:
''
,
agent_id_two
:
''
,
agent_id2
:
0
,
modal_btn_id
:
''
,
init
:
function
()
{
//初始化dot
$
(
"body"
).
append
(
template
);
user
.
event
();
user
.
getList
();
//时间控件初始化
},
event
:
function
()
{
var
that
=
this
;
var
_doc
=
$
(
document
);
$
(
"#search"
).
click
(
function
(){
user
.
getList
(
1
);
});
$
(
"#reset"
).
click
(
function
()
{
document
.
getElementById
(
"form_search"
).
reset
();
});
$
(
"#confirm_delete"
).
click
(
function
(){
var
params
=
{};
params
.
id
=
user
.
announcementdel_id
;
console
.
log
(
user
.
announcementdel_id
);
if
(
!
params
.
id
||
params
.
id
==
null
){
alert
(
"要删除的id不能为空"
);
return
false
;
}
user
.
delete_text
(
params
);
});
$
(
"#show_modal"
).
on
(
"shown.bs.modal"
,
function
(){
$
(
'.cke_toolbox'
).
hide
();
user
.
text_details
();
});
//部门门店的二级联动
that
.
getDistrict
(
function
()
{
_doc
.
on
(
'input'
,
'#commit_home'
,
function
()
{
var
_this
=
$
(
this
);
var
_id
=
$
(
'#commit_home'
).
val
();
$
(
'#commit_shop'
).
html
(
''
);
//先清空
if
(
_id
&&
_id
!=
'0'
)
{
that
.
getDistrictStoreList
(
_id
,
function
(
_data
)
{
var
_str
=
'<option value="0">全部</option>'
;
$
.
each
(
_data
,
function
(
i
,
item
)
{
_str
+=
'<option value="'
+
item
.
id
+
'">'
+
item
.
store_name
+
'</option>'
;
});
$
(
'#commit_shop'
).
append
(
_str
)
});
}
else
{};
});
});
//分佣方 姓名下拉式
$
(
document
).
on
(
"input"
,
"#comit_name"
,
function
()
{
//手机号新增搜索客方
if
(
$
(
"#comit_name"
).
val
()
==
''
)
{
that
.
agent_id_phone
=
''
;
$
(
".user-ul"
).
html
(
''
);
}
else
{
that
.
search_person
();
}
});
//点击li 列表消失
$
(
document
).
delegate
(
".addphone"
,
"click"
,
function
()
{
//list消失新增客户 点击li事件 获取id ul消失
that
.
addphone
(
this
);
});
},
//将li里的值 赋给input(分佣方姓名)
addphone
:
function
(
obj
)
{
//新增客户 input赋值
var
that
=
this
;
var
user_ht
=
$
(
obj
).
html
()
+
''
;
var
user_ht_str
=
user_ht
.
substring
(
0
,
user_ht
.
length
-
3
);
$
(
"#comit_name"
).
val
(
user_ht_str
);
$
(
".user-ul"
).
html
(
''
);
$
(
".user-ul"
).
hide
();
// that.agent_id_phone = $(obj).attr("data-id");
},
getDistrict
:
function
(
fn
)
{
$
.
ajax
({
url
:
'/index/getDistrict'
,
type
:
'GET'
,
async
:
true
,
data
:
{
"pageSize"
:
1000
},
dataType
:
'json'
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
&&
data
.
data
!=
null
)
{
var
str
=
''
;
$
.
each
(
data
.
data
,
function
(
i
,
item
)
{
str
+=
'<option value="'
+
item
.
id
+
'">'
+
item
.
district_name
+
'</option>'
;
});
$
(
'#commit_home'
).
append
(
str
);
fn
&&
fn
();
}
else
{
alert
(
data
.
msg
);
}
}
});
},
getDistrictStoreList
:
function
(
id
,
fn
)
{
$
.
ajax
({
url
:
'/index/getDistrictStoreList'
,
type
:
'GET'
,
async
:
true
,
data
:
{
'id'
:
id
,
"pageSize"
:
1000
},
dataType
:
'json'
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
&&
data
.
data
!=
null
)
{
fn
&&
fn
(
data
.
data
);
}
else
{
alert
(
data
.
msg
);
}
}
});
},
search_person
:
function
()
{
//手机号新增客户
$
.
ajax
({
url
:
'/index/getBroker_new'
,
type
:
'GET'
,
async
:
true
,
data
:
{
"phone"
:
$
(
"#comit_name"
).
val
(),
'all'
:
1
},
dataType
:
'json'
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
)
{
var
user_ul
=
""
;
$
.
each
(
data
.
data
,
function
(
i
,
item
)
{
if
(
item
.
status
==
0
||
item
.
status
==
4
){
var
status
=
' '
;
};
if
(
item
.
status
==
1
){
var
status
=
'-长假'
;
};
if
(
item
.
status
==
2
){
var
status
=
'-离职'
;
};
if
(
item
.
status
==
3
){
var
status
=
'-转勤'
;
}
user_ul
+=
'<li class="addphone" data-id="'
+
item
.
id
+
'">'
+
item
.
id
+
'-'
+
item
.
name
+
'-'
+
item
.
phone
+
status
+
'</li>'
;
});
$
(
".user-ul"
).
html
(
user_ul
);
$
(
".user-ul"
).
show
();
}
else
{
alert
(
data
.
msg
);
}
}
});
},
//筛选 获取文章列表
getList
:
function
(
pageNo
)
{
user
.
pageNo
=
pageNo
;
var
params
=
{};
params
.
start_time
=
$
(
"#start_date"
).
val
();
params
.
end_time
=
$
(
"#end_date"
).
val
();
params
.
commit_home
=
$
(
'#commit_home'
).
val
();
params
.
commit_shop
=
$
(
'#commit_shop'
).
val
();
params
.
userName
=
$
(
'#comit_name'
).
val
();
params
.
release_title
=
$
(
'#release_title'
).
val
();
params
.
pageNo
=
user
.
pageNo
;
params
.
pageSize
=
user
.
pageSize
;
console
.
log
(
params
);
// $.ajax ({
// url: '/index/business_school',
// type: 'GET',
// async: true,
// data: params,
// dataType: 'json',
// success: function (data) {
// console.log('公告');
// var temp = document.getElementById ('plNews_list_tpl').innerHTML;
// var doTtmpl = doT.template (temp);
// $ ("#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
);
$
(
"#users_list"
).
html
(
doTtmpl
(
datas
));
/*分页代码*/
add_page
(
data
.
data
.
total
,
pageNo
,
user
.
pageSize
,
user
.
getList
);
$
(
"#total_page"
).
html
(
data
.
data
.
total
);
},
delete_text
:
function
(
params
)
{
//删除文章
$
.
ajax
({
url
:
'/index/delNews'
,
type
:
'POST'
,
async
:
true
,
data
:
params
,
dataType
:
'json'
,
success
:
function
(
data
)
{
$
(
"#modal-delete"
).
modal
(
'hide'
);
if
(
data
.
code
==
"101"
)
{
alert
(
data
.
msg
);
return
false
;
}
user
.
getList
(
user
.
pageNo
);
}
});
},
};
return
user
;
});
public/resource/template/plNews_template_tpl.html
0 → 100644
View file @
561338e0
<script
id=
"plNews_list_tpl"
type=
"text/template"
>
[
%
if
(
it
)
{
%
]
[
%
for
(
var
item
in
it
){
%
]
<
tr
>
<
td
>
[
%=
it
[
item
][
'create_time'
]
%
]
<
/td
>
<!--<
td
>
[
%=
hideTel
(
it
[
item
][
"name"
])
%
]
<
/td>--
>
<!--<
td
>
[
%
if
(
it
[
item
][
"name"
]
!=
null
)
{
%
]
[
%=
it
[
item
][
"name"
]
%
]
[
%
}
%
]
<
/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
>
<
a
href
=
"#show_modal"
class
=
"btn1 btn-success show_modal_btn"
data
-
toggle
=
"modal"
data
-
id
=
"[%= it[item]['id'] %]"
>
评论详情
<
/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
>
<!--
[
%
}
%
]
-->
<
/td
>
<
/tr
>
[
%
}
%
]
[
%
}
else
{
%
]
<
tr
>
<
td
colspan
=
"7"
style
=
"text-align:center;"
>
暂无数据
<
/td
>
<
/tr
>
[
%
}
%
]
</script>
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