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
36be89a2
Commit
36be89a2
authored
Jul 16, 2018
by
agping
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
公告修改
parent
83a8ac97
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
435 additions
and
50 deletions
+435
-50
add_notice_view.html
application/index/view/notice/add_notice_view.html
+357
-2
index.html
application/index/view/notice/index.html
+4
-2
addNoticeView.js
public/resource/js/addNoticeView.js
+73
-0
notice.js
public/resource/js/notice.js
+1
-46
No files found.
application/index/view/notice/add_notice_view.html
View file @
36be89a2
{layout name="global/frame_tpl" /}
{layout name="global/frame_tpl" /}
2222
<input
type=
"hidden"
class=
"page-load"
id=
"addNoticeView"
/>
\ No newline at end of file
<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
;
}
</style>
<!--导航star-->
<!-- Page Content -->
<div
id=
"page-content-wrapper"
>
<div
class=
"container"
>
<div
class=
"row"
>
<div
class=
"col-lg-10 col-lg-offset-0"
>
<div
class=
"panel panel-default"
>
<div
class=
"panel-heading breadcrumb"
>
<li>
<a
href=
"#"
>
公告
</a>
</li>
<li
class=
"active"
>
新增公告
</li>
<div
class=
"pull-right"
>
<ul
class=
"bread_btn"
>
<li>
</li>
</ul>
</div>
</div>
<div
class=
"panel-body"
>
<div
class=
"table-responsive"
>
<table
class=
"table table-striped table-bordered table-hover table-condensed"
>
<thead>
</thead>
<tbody
id=
""
class=
"text-center"
>
<div
class=
""
id=
"modal_add_user"
>
<div
class=
""
>
<div
class=
""
id=
""
>
<div
class=
""
>
</button>
</div>
<div
class=
""
>
<form
class=
"form-horizontal"
action=
"/agents/add_user"
id=
""
>
<div
class=
"form-group"
>
<label
for=
"inputEmail3"
class=
"col-sm-2 control-label"
>
标题:
</label>
<div
class=
"col-sm-9"
>
<input
type=
"text"
class=
"form-control btn6"
name=
"user_name"
id=
"announcement_title"
placeholder=
"请输入标题"
>
<span
class=
"use-span text-danger"
>
(50字以内,显示在首页列表)
</span>
</div>
</div>
<!--<div class="form-group">
<label class="col-sm-2 control-label">标签:</label>
<div class="col-sm-9">
<select class="form-control btn5 input" name="" id="district_id2" title=" ">
<option value="">请选择标签</option>
</select>
</div>
</div>-->
<div
class=
"form-group"
>
<label
class=
"col-sm-2 control-label"
>
内容
</label>
<div
class=
"col-sm-9"
>
<div
class=
"form-group"
style=
"width: 100%;"
>
<!--<label for="" style="width: 100%;">内容</label>-->
<div
class=
"input-group"
style=
"width: 100%;"
id=
"dajiangtang"
>
<?php
create_editor('goods_sup_id','');
?>
</div>
</div>
</div>
</div>
</form>
</div>
<div
class=
""
>
<button
type=
"button"
class=
"btn btn-primary"
id=
"add_announcement"
>
保存
</button>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal -->
</div>
</tbody>
</table>
</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
id=
"img_mask_area"
title=
"点击任意位置可关闭"
>
<img
/>
</div>
\ No newline at end of file
application/index/view/notice/index.html
View file @
36be89a2
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
}
}
.modal-body2
{
.modal-body2
{
padding
:
35px
;
padding
:
35px
;
height
:
380px
;
/*height: 380px;*/
}
}
.user-ul
{
.user-ul
{
...
@@ -135,7 +135,9 @@
...
@@ -135,7 +135,9 @@
<div
class=
"pull-right"
>
<div
class=
"pull-right"
>
<ul
class=
"bread_btn"
>
<ul
class=
"bread_btn"
>
<li>
<li>
<a
href=
"#modal_add_user"
data-toggle=
"modal"
class=
"btn btn-default add_alert"
><i
class=
"icon-plus"
></i>
新增公告
<!--<a href="#modal_add_user" data-toggle="modal" class="btn btn-default add_alert"><i class="icon-plus"></i> 新增公告
</a>-->
<a
href=
"addNoticeView.html"
class=
"btn btn-default add_alert"
target=
"_self"
><i
class=
"icon-plus"
></i>
新增公告
</a>
</a>
</li>
</li>
</ul>
</ul>
...
...
public/resource/js/addNoticeView.js
0 → 100644
View file @
36be89a2
define
([
'doT'
,
'text!temp/notice_template_tpl.html'
,
'ckfinder'
,
'ckfinderStart'
,
'css!style/home.css'
,
"datetimepicker"
,
'pagination'
,
'bootstrapJs'
],
function
(
doT
,
template
)
{
var
user
=
{
pageNo
:
1
,
/*第几页*/
pageSize
:
15
,
/*每页显示多少条*/
user_id
:
0
,
urls
:
''
,
agent_id_two
:
''
,
agent_id2
:
0
,
init
:
function
()
{
//初始化dot
$
(
"body"
).
append
(
template
);
user
.
event
();
},
event
:
function
()
{
var
_doc
=
$
(
document
);
// 新增公告
$
(
document
).
delegate
(
"#add_announcement"
,
"click"
,
function
()
{
//新增客户
user
.
user_id
=
$
(
this
).
attr
(
"data-id"
);
user
.
add_announcement
();
});
},
add_announcement
:
function
()
{
var
params
=
{};
params
.
title
=
$
(
"#announcement_title"
).
val
();
// params.content = $("#announcement_content").val();
var
_dajiangtangObj
=
$
(
'#dajiangtang'
);
//大讲堂
var
_dajiangtangVal
=
getCKeditorValue
(
"goods_sup_id"
);
params
.
content
=
_dajiangtangVal
;
if
(
params
.
title
==
''
)
{
alert
(
'标题不能为空'
);
$
(
"#announcement_title"
).
focus
();
return
;
}
// if (params.title.length > 20) {
// alert('标题字数20以内');
// $("#announcement_title").focus();
// return ;
// }
if
(
params
.
content
==
''
)
{
alert
(
'内容不能为空'
);
$
(
"#announcement_content"
).
focus
();
return
;
}
// if (params.content.length > 250) {
// alert('公告内容字数250以内');
// $("#announcement_content").focus();
// return ;
// }
$
.
ajax
({
url
:
'/index/addNotice'
,
type
:
'POST'
,
async
:
true
,
data
:
params
,
dataType
:
'json'
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
)
{
$
(
"#modal_add_user"
).
modal
(
'hide'
);
//提交成功 关闭模态框
alert
(
'提交成功'
);
window
.
location
.
href
=
'/index/noticeIndex'
;
}
else
{
alert
(
data
.
msg
);
}
}
});
},
};
return
user
;
});
public/resource/js/notice.js
View file @
36be89a2
...
@@ -64,11 +64,7 @@ define (['doT', 'text!temp/notice_template_tpl.html','ckfinder','ckfinderStart',
...
@@ -64,11 +64,7 @@ define (['doT', 'text!temp/notice_template_tpl.html','ckfinder','ckfinderStart',
});
});
// ===========================新增公告====================
// ===========================新增公告====================
$
(
document
).
delegate
(
"#add_announcement"
,
"click"
,
function
()
{
//新增客户
user
.
user_id
=
$
(
this
).
attr
(
"data-id"
);
user
.
add_announcement
();
});
$
(
document
).
delegate
(
".announcement-details"
,
"click"
,
function
()
{
//点击公告详情
$
(
document
).
delegate
(
".announcement-details"
,
"click"
,
function
()
{
//点击公告详情
$
(
'.notice-title'
).
html
(
$
(
this
).
attr
(
"data-title"
));
$
(
'.notice-title'
).
html
(
$
(
this
).
attr
(
"data-title"
));
$
(
'.notice-time'
).
html
(
$
(
this
).
attr
(
"data-createTime"
));
$
(
'.notice-time'
).
html
(
$
(
this
).
attr
(
"data-createTime"
));
...
@@ -310,47 +306,6 @@ define (['doT', 'text!temp/notice_template_tpl.html','ckfinder','ckfinderStart',
...
@@ -310,47 +306,6 @@ define (['doT', 'text!temp/notice_template_tpl.html','ckfinder','ckfinderStart',
}
}
});
});
},
},
add_announcement
:
function
()
{
var
params
=
{};
params
.
title
=
$
(
"#announcement_title"
).
val
();
params
.
content
=
$
(
"#announcement_content"
).
val
();
if
(
params
.
title
==
''
)
{
alert
(
'标题不能为空'
);
$
(
"#announcement_title"
).
focus
();
return
;
}
// if (params.title.length > 20) {
// alert('标题字数20以内');
// $("#announcement_title").focus();
// return ;
// }
if
(
params
.
content
==
''
)
{
alert
(
'内容不能为空'
);
$
(
"#announcement_content"
).
focus
();
return
;
}
// if (params.content.length > 250) {
// alert('公告内容字数250以内');
// $("#announcement_content").focus();
// return ;
// }
$
.
ajax
({
url
:
'/index/addNotice'
,
type
:
'POST'
,
async
:
true
,
data
:
params
,
dataType
:
'json'
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
)
{
$
(
"#modal_add_user"
).
modal
(
'hide'
);
//提交成功 关闭模态框
user
.
getList
(
1
);
alert
(
'提交成功'
)
}
else
{
alert
(
data
.
msg
);
}
}
});
},
delete_user
:
function
(
params
)
{
delete_user
:
function
(
params
)
{
$
.
ajax
({
$
.
ajax
({
url
:
'/index/delNotice'
,
url
:
'/index/delNotice'
,
...
...
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