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
b39702db
Commit
b39702db
authored
Jul 04, 2018
by
agping
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
商学院修改
parent
1b0f0b96
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
144 additions
and
74 deletions
+144
-74
index.html
application/index/view/news/index.html
+51
-34
schoolBusiness.js
public/resource/js/schoolBusiness.js
+93
-40
No files found.
application/index/view/news/index.html
View file @
b39702db
...
@@ -6,7 +6,8 @@
...
@@ -6,7 +6,8 @@
overflow-y
:
auto
;
overflow-y
:
auto
;
padding-bottom
:
60px
;
padding-bottom
:
60px
;
}
}
.modal-body2
{
.modal-body2
{
padding
:
35px
;
padding
:
35px
;
height
:
380px
;
height
:
380px
;
}
}
...
@@ -92,33 +93,40 @@
...
@@ -92,33 +93,40 @@
.clear
{
.clear
{
clear
:
both
;
clear
:
both
;
}
}
.left
{
.left
{
float
:
left
;
float
:
left
;
font-size
:
12px
;
font-size
:
12px
;
}
}
.bottom
{
.bottom
{
margin-top
:
30px
;
margin-top
:
30px
;
}
}
.btn6_1
{
.btn6_1
{
width
:
80%
!important
;
width
:
80%
!important
;
float
:
left
;
float
:
left
;
}
}
.notice-title
{
.notice-title
{
font-size
:
20px
;
font-size
:
20px
;
}
}
.notice-time
{
.notice-time
{
font-size
:
13px
;
font-size
:
13px
;
margin-top
:
20px
;
margin-top
:
20px
;
}
}
.notice-text
{
.notice-text
{
font-size
:
16px
;
font-size
:
16px
;
margin-top
:
30px
;
margin-top
:
30px
;
text-indent
:
2em
;
text-indent
:
2em
;
}
}
.col-sm-9
.btn5
{
width
:
30%
!important
;
.col-sm-9
.btn5
{
width
:
30%
!important
;
}
}
.img-pre-ul
{
.img-pre-ul
{
padding-left
:
0
;
padding-left
:
0
;
overflow
:
hidden
;
overflow
:
hidden
;
...
@@ -184,39 +192,42 @@
...
@@ -184,39 +192,42 @@
margin-top
:
-350px
;
margin-top
:
-350px
;
}
}
/*上传图片列表 样式*/
/*上传图片列表 样式*/
.form-group
{
.form-group
{
margin
:
10px
;
margin
:
10px
;
}
}
.input-100-width
{
.input-100-width
{
width
:
100px
!important
;
width
:
100px
!important
;
}
}
.input-360-width
{
.input-360-width
{
width
:
360px
!important
;
width
:
360px
!important
;
}
}
.textarea-500-width
{
.textarea-500-width
{
width
:
500px
!important
;
width
:
500px
!important
;
}
}
.list-group-item
>
.full-width-100
+
.full-width-100
{
.list-group-item
>
.full-width-100
+
.full-width-100
{
padding-top
:
10px
;
padding-top
:
10px
;
}
}
.list-group-item
>
.full-width-100
>
label
{
.list-group-item
>
.full-width-100
>
label
{
width
:
60px
;
width
:
60px
;
}
}
.list-group-item
>
.full-pic-area
>
label
{
.list-group-item
>
.full-pic-area
>
label
{
width
:
120px
;
width
:
120px
;
}
}
.delet-pic-btn
{
color
:
red
;
.delet-pic-btn
{
}
color
:
red
;
#modal_content_add
{
}
#modal_content_add
{
width
:
900px
;
width
:
900px
;
}
}
</style>
</style>
<!--导航star-->
<!--导航star-->
...
@@ -307,7 +318,7 @@
...
@@ -307,7 +318,7 @@
×
×
</button>
</button>
<h4
class=
"modal-title"
>
<h4
class=
"modal-title"
>
新增
公告
新增
文章
</h4>
</h4>
</div>
</div>
...
@@ -321,7 +332,6 @@
...
@@ -321,7 +332,6 @@
</div>
</div>
</div>
</div>
<div
class=
"form-group"
>
<div
class=
"form-group"
>
<label
class=
"col-sm-2 control-label"
>
标签:
</label>
<label
class=
"col-sm-2 control-label"
>
标签:
</label>
<div
class=
"col-sm-9"
>
<div
class=
"col-sm-9"
>
...
@@ -338,14 +348,22 @@
...
@@ -338,14 +348,22 @@
<ul
class=
"list-group"
>
<ul
class=
"list-group"
>
<li
class=
"list-group-item"
>
<li
class=
"list-group-item"
>
<div
class=
"form-group full-width-100 full-pic-area"
>
<!--详情图 多张--
>
<!--<label for="">详情页轮播图(至少4张)</label>--
>
<!--<div class="form-group full-width-100 full-pic-area"
>
<input readonly="readonly" type="text" name="xiangqing_pic_input" class="form-control" style="display: none" id="xiangqing_pic_input" placeholder="请选择图片">
<input readonly="readonly" type="text" name="xiangqing_pic_input" class="form-control" style="display: none" id="xiangqing_pic_input" placeholder="请选择图片">
<button class="btn btn-default upload-image-btn" id="xiangqing_pic_btn" type="button" data-limittop="20">上传图片</button>
<button class="btn btn-default upload-image-btn" id="xiangqing_pic_btn" type="button" data-limittop="20">上传图片</button>
<span class="tip"></span>
<span class="tip"></span>
</div>
</div>
<ul class="img-pre-ul" id="xiangqing_pic_ul">
<ul class="img-pre-ul" id="xiangqing_pic_ul">
</ul>
</ul>-->
<!--封面图 一张-->
<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=
"请选择图片"
>
<button
class=
"btn btn-default upload-image-btn"
id=
"liebiao_pic_btn"
type=
"button"
data-limittop=
"1"
>
选择图片
</button>
<span
class=
"tip"
></span>
</div>
<ul
class=
"img-pre-ul"
id=
"liebiao_pic_ul"
></ul>
</li>
</li>
</ul>
</ul>
...
@@ -375,12 +393,11 @@
...
@@ -375,12 +393,11 @@
</div>
</div>
</div>-->
</div>-->
</form>
</form>
</div>
</div>
<div
class=
"modal-footer"
>
<div
class=
"modal-footer"
>
<button
type=
"button"
class=
"btn btn-primary"
id=
"add_announcement
"
>
<button
type=
"button"
class=
"btn btn-primary"
id=
"add_news
"
>
保存
保存
</button>
</button>
</div>
</div>
...
...
public/resource/js/schoolBusiness.js
View file @
b39702db
...
@@ -31,14 +31,6 @@ define (['doT', 'text!temp/schoolBusiness_template_tpl.html','ckfinder','ckfinde
...
@@ -31,14 +31,6 @@ define (['doT', 'text!temp/schoolBusiness_template_tpl.html','ckfinder','ckfinde
var
_id
=
_this
.
val
();
var
_id
=
_this
.
val
();
_this
.
next
().
html
(
''
);
//先清空
_this
.
next
().
html
(
''
);
//先清空
if
(
_id
&&
_id
!=
'0'
){
if
(
_id
&&
_id
!=
'0'
){
user
.
getDistrictStoreList
(
_id
,
function
(
_data
){
// var _str = '';
var
_str
=
'<option value="0">全部</option>'
;
$
.
each
(
_data
,
function
(
i
,
item
)
{
_str
+=
'<option value="'
+
item
.
id
+
'">'
+
item
.
store_name
+
'</option>'
;
});
_this
.
next
().
html
(
_str
);
});
}
else
{
}
else
{
};
};
});
});
...
@@ -87,10 +79,10 @@ define (['doT', 'text!temp/schoolBusiness_template_tpl.html','ckfinder','ckfinde
...
@@ -87,10 +79,10 @@ define (['doT', 'text!temp/schoolBusiness_template_tpl.html','ckfinder','ckfinde
document
.
getElementById
(
"add_user_form"
).
reset
();
document
.
getElementById
(
"add_user_form"
).
reset
();
});
});
// ===========================新增
公告
====================
// ===========================新增
文章
====================
$
(
document
).
delegate
(
"#add_
announcement"
,
"click"
,
function
()
{
//新增客户
$
(
document
).
delegate
(
"#add_
news"
,
"click"
,
function
()
{
//新增文章
user
.
user_id
=
$
(
this
).
attr
(
"data-id"
);
user
.
user_id
=
$
(
this
).
attr
(
"data-id"
);
user
.
add_
announcement
();
user
.
add_
news
();
});
});
$
(
document
).
delegate
(
".announcement-details"
,
"click"
,
function
()
{
//点击公告详情
$
(
document
).
delegate
(
".announcement-details"
,
"click"
,
function
()
{
//点击公告详情
...
@@ -274,7 +266,7 @@ define (['doT', 'text!temp/schoolBusiness_template_tpl.html','ckfinder','ckfinde
...
@@ -274,7 +266,7 @@ define (['doT', 'text!temp/schoolBusiness_template_tpl.html','ckfinder','ckfinde
_imgMaskObj
.
click
(
function
(
e
)
{
_imgMaskObj
.
click
(
function
(
e
)
{
this
.
style
.
display
=
'none'
;
this
.
style
.
display
=
'none'
;
});
});
//保存上传的图片
//保存上传的图片
详情页多张
_doc
.
on
(
'click'
,
'#saveBtn'
,
function
(
e
)
{
_doc
.
on
(
'click'
,
'#saveBtn'
,
function
(
e
)
{
var
_this
=
$
(
this
);
var
_this
=
$
(
this
);
var
_data
=
{
var
_data
=
{
...
@@ -463,6 +455,43 @@ define (['doT', 'text!temp/schoolBusiness_template_tpl.html','ckfinder','ckfinde
...
@@ -463,6 +455,43 @@ define (['doT', 'text!temp/schoolBusiness_template_tpl.html','ckfinder','ckfinde
}
});
},
//点击收款图片 调用的接口
getaddPicList
:
function
()
{
//提交
var
_imgUploadLunbo
=
$
(
'#xiangqing_pic_ul'
);
//详情页轮播图ul
var
_imgUploadLiebiao
=
$
(
'#liebiao_pic_ul'
);
//列表页封面图ul
var
_urlCut
=
location
.
origin
+
'/resource/lib/Attachments/images/'
;
//要截取的部分url
_imgUploadLunbo
.
empty
();
$
.
ajax
({
'type'
:
'GET'
,
'url'
:
'/index/houseEdit'
,
data
:
{
"id"
:
3104
,
},
dataType
:
"json"
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
)
{
// 封面图一张
if
(
_data
[
'cover'
]){
_imgUploadLiebiao
.
html
(
'<li><img title="点击查看大图" src="{0}" /><a href="javascript:;" class="delet-pic-btn">删除</a></li>'
.
stringFormatObj
({
'0'
:
_urlCut
+
_data
[
'cover'
]
}));
};
// 封面图一张
var
_data
=
data
[
'data'
];
for
(
var
i
in
_data
[
'slide_show'
])
{
_imgUploadLunbo
.
append
(
'<li data-imgid="{id}"><img title="点击查看大图" src="{0}" /><a href="javascript:;" class="delet-pic-btn">删除</a></li>'
.
stringFormatObj
({
'0'
:
_urlCut
+
_data
[
'slide_show'
][
i
][
'img_name'
],
'id'
:
_data
[
'slide_show'
][
i
][
'id'
]
}));
};
// follow.getList(0);
}
else
{
}
}
}
});
});
},
},
...
@@ -486,35 +515,61 @@ define (['doT', 'text!temp/schoolBusiness_template_tpl.html','ckfinder','ckfinde
...
@@ -486,35 +515,61 @@ define (['doT', 'text!temp/schoolBusiness_template_tpl.html','ckfinder','ckfinde
}
}
});
});
},
},
add_announcement
:
function
()
{
add_news
:
function
()
{
//新增文章
var
params
=
{};
var
_imgUploadLiebiao
=
$
(
'#liebiao_pic_ul'
);
//列表页封面图ul
params
.
title
=
$
(
"#announcement_title"
).
val
();
var
_liebiaoPicObj
=
_imgUploadLiebiao
.
find
(
'li>img'
);
params
.
content
=
$
(
"#announcement_content"
).
val
();
var
_urlCut
=
location
.
origin
+
'/resource/lib/Attachments/images/'
;
//要截取的部分url
if
(
params
.
title
==
''
)
{
var
_dajiangtangObj
=
$
(
'#dajiangtang'
);
//大讲堂
alert
(
'标题不能为空'
);
var
_dajiangtangVal
=
_dajiangtangObj
.
find
(
'iframe'
).
contents
().
find
(
'body'
).
html
();
$
(
"#announcement_title"
).
focus
();
return
;
if
(
_liebiaoPicObj
.
length
<
1
)
{
}
alert
(
'列表页封面图需要上传'
);
if
(
params
.
title
.
length
>
20
)
{
return
false
;
alert
(
'标题字数20以内'
);
};
$
(
"#announcement_title"
).
focus
();
return
;
var
_data
=
{};
}
//字符串形式 传过去
if
(
params
.
content
==
''
)
{
// $.each(_liebiaoPicObj, function(i, item) {
alert
(
'内容不能为空'
);
//// _data['cover[' + i + ']'] = item.src.replace(_urlCut, '');
$
(
"#announcement_content"
).
focus
();
// _data['file_img[' + i + ']'] = item.src;
return
;
//
}
// });
if
(
params
.
content
.
length
>
250
)
{
alert
(
'公告内容字数250以内'
);
_data
.
title
=
$
(
"#announcement_title"
).
val
();
$
(
"#announcement_content"
).
focus
();
_data
.
title2
=
$
(
"#district_id2"
).
val
();
//商学院标签id
return
;
_data
.
file_img
=
_liebiaoPicObj
[
0
].
src
;
//封面图
}
_data
.
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 ;
// }
//判断有没有图片
// if(_liebiaoPicObj.length < 1) {
// alert('列表页封面图需要上传');
// return false;
// };
$
.
ajax
({
$
.
ajax
({
url
:
'/index/addN
otice
'
,
url
:
'/index/addN
ews
'
,
type
:
'POST'
,
type
:
'POST'
,
async
:
true
,
async
:
true
,
data
:
params
,
data
:
_data
,
dataType
:
'json'
,
dataType
:
'json'
,
success
:
function
(
data
)
{
success
:
function
(
data
)
{
if
(
data
.
code
==
200
)
{
if
(
data
.
code
==
200
)
{
...
@@ -548,8 +603,6 @@ define (['doT', 'text!temp/schoolBusiness_template_tpl.html','ckfinder','ckfinde
...
@@ -548,8 +603,6 @@ define (['doT', 'text!temp/schoolBusiness_template_tpl.html','ckfinder','ckfinde
};
};
return
user
;
return
user
;
});
});
function
edit
(
obj
)
{
function
edit
(
obj
)
{
var
params
=
{}
var
params
=
{}
params
.
id
=
$
(
obj
).
attr
(
"data-id"
)
params
.
id
=
$
(
obj
).
attr
(
"data-id"
)
...
...
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