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
03a5df96
Commit
03a5df96
authored
Aug 29, 2018
by
xinyuandu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
商学院查看功能
parent
8c850986
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
170 additions
and
2 deletions
+170
-2
index.html
application/index/view/news/index.html
+101
-0
schoolBusiness.js
public/resource/js/schoolBusiness.js
+69
-2
No files found.
application/index/view/news/index.html
View file @
03a5df96
...
...
@@ -337,4 +337,104 @@
<!-- /.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:80%!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"
>
<table
class=
"table table-striped table-bordered table-hover table-condensed"
>
<tbody
id=
""
class=
"text-center"
>
<tr>
<td>
<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"
>
<!--(20字以内,显示在首页列表)-->
</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"
>
<!--选择图片-->
<ul
class=
"list-group"
>
<li
class=
"list-group-item"
>
<!--封面图 一张-->
<div
class=
"form-group full-width-100 full-pic-area"
>
<!--<label for="">列表页封面图(1张)</label>-->
<input
readonly=
"readonly"
type=
"text"
name=
"liebiao_pic_input"
class=
"form-control"
style=
"width: 150px !important;display:none"
id=
"liebiao_pic_input"
placeholder=
"请选择图片"
>
<span
class=
"tip"
></span>
</div>
<ul
class=
"img-pre-ul"
id=
"liebiao_pic_ul"
></ul>
</li>
</ul>
</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%;">-->
<div
class=
""
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>
<!--附件-->
<div
class=
"form-group"
>
<label
class=
"col-sm-2 control-label"
>
附件
<!--(格式为pdf/doc,选填,上限为10个)-->
:
</label>
<div
class=
"col-sm-9"
>
<div
class=
"file-upload-area"
style=
"padding-left:15px!important"
>
<div
class=
"btn-area"
>
<input
type=
"file"
id=
"file_input"
class=
""
data-limittop=
"10"
/>
<!--修改上传文件的最大数字-->
</div>
<ul
class=
"img-pre-ul"
id=
"fujian_ul"
></ul>
<!-- <p>点击文件名称即可下载</p>
-->
</div>
</div>
</div>
</form>
<!--<button type="button" class="btn btn-primary" id="add_news">保存 </button>-->
</td>
</tr>
</tbody>
</table>
</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/schoolBusiness.js
View file @
03a5df96
define
([
'doT'
,
'text!temp/schoolBusiness_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
,
/*每页显示多少条*/
...
...
@@ -6,6 +15,7 @@ define (['doT', 'text!temp/schoolBusiness_template_tpl.html','ckfinder','ckfinde
urls
:
''
,
agent_id_two
:
''
,
agent_id2
:
0
,
modal_btn_id
:
''
,
init
:
function
()
{
//初始化dot
$
(
"body"
).
append
(
template
);
...
...
@@ -43,7 +53,7 @@ define (['doT', 'text!temp/schoolBusiness_template_tpl.html','ckfinder','ckfinde
});
$
(
"#close"
).
click
(
function
()
{
/*
$("#close").click(function () {
document.getElementById("add_user_form").reset();
$(".user-ul").empty();
});
...
...
@@ -51,7 +61,7 @@ define (['doT', 'text!temp/schoolBusiness_template_tpl.html','ckfinder','ckfinde
$(".close").click(function(){
document.getElementById("add_user_form").reset();
$(".user-ul").empty();
});
});
*/
$
(
"#confirm_delete"
).
click
(
function
(){
var
params
=
{};
...
...
@@ -135,7 +145,64 @@ define (['doT', 'text!temp/schoolBusiness_template_tpl.html','ckfinder','ckfinde
_imgMaskObj
.
click
(
function
(
e
)
{
this
.
style
.
display
=
'none'
;
});
_doc
.
on
(
'click'
,
'.show_modal_btn'
,
function
(
e
){
user
.
modal_btn_id
=
e
.
target
.
dataset
.
id
;
});
$
(
"#show_modal"
).
on
(
"shown.bs.modal"
,
function
(){
user
.
text_details
();
});
},
//点击编辑 调用的接口
text_details
:
function
()
{
var
news_id
=
user
.
modal_btn_id
;
var
_imgUploadLunbo
=
$
(
'#xiangqing_pic_ul'
);
//详情页轮播图ul
var
_imgUploadLiebiao
=
$
(
'#liebiao_pic_ul'
);
//列表页封面图ul
var
_urlCut
=
location
.
origin
+
'/resource/lib/Attachments/images/'
;
//要截取的部分url
var
_dajiangtangObj
=
$
(
'#dajiangtang'
);
//大讲堂
$
.
ajax
({
'type'
:
'GET'
,
'url'
:
'/index/getNewsInfo'
,
data
:
{
'id'
:
news_id
,
},
dataType
:
"json"
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
)
{
$
(
"#announcement_title"
).
val
(
data
.
data
.
title
);
$
(
"#district_id2"
).
val
(
data
.
data
.
s_label_id
*
1
);
//商学院标签id
var
_data
=
data
[
'data'
];
if
(
_data
[
'cover_plan'
])
{
_imgUploadLiebiao
.
html
(
'<li><img title="点击查看大图" src="{0}" /></li>'
.
stringFormatObj
({
'0'
:
_data
[
'cover_plan'
]
}));
};
//获取编辑器里的内容
// setCKeditorValue(id,content)
setCKeditorValue
(
"goods_sup_id"
,
_data
[
'content'
]);
//附件
var
file_paths
=
_data
[
'file'
];
if
(
file_paths
)
{
for
(
var
i
=
0
;
i
<
file_paths
.
length
;
i
++
){
console
.
log
(
file_paths
[
i
][
'file_name'
])
var
_tempArr
=
file_paths
[
i
][
'file_name'
].
split
(
'/'
);
file_paths
[
i
][
'file_name'
]
&&
$
(
'#fujian_ul'
).
append
(
'<li class="pdf-pre-li" id='
+
file_paths
[
i
][
'file_id'
]
+
'><a class="pdf-pre-a" download="{1}" href="{0}" title="点击可下载">{1}</a></li>'
.
stringFormatObj
({
'0'
:
'/'
+
file_paths
[
i
][
'show_file'
],
'1'
:
dealFileName
(
decodeURI
(
_tempArr
[
_tempArr
.
length
-
1
]))
}));
}
}
$
(
'#announcement_title'
).
attr
(
'readonly'
,
'readonly'
);
$
(
'#district_id2'
).
attr
(
'disabled'
,
'disabled'
);
}
else
{}
}
});
},
//筛选 获取文章列表
getList
:
function
(
pageNo
)
{
user
.
pageNo
=
pageNo
;
...
...
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