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
cccd0d9d
Commit
cccd0d9d
authored
Feb 18, 2019
by
duxinyuan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
11
parent
4770bd33
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
9 deletions
+11
-9
schoolBusinessNew.js
public/resource/js/schoolBusinessNew.js
+11
-9
No files found.
public/resource/js/schoolBusinessNew.js
View file @
cccd0d9d
...
...
@@ -98,8 +98,8 @@ define(['doT', 'text!temp/schoolBusiness_template_tpl.html', 'ckfinder', 'ckfind
$
(
"#upload-image-btn"
).
change
(
function
()
{
var
_this
=
$
(
this
),
_spFile
=
_this
.
data
(
'spfile'
),
_limitTop
=
_this
.
data
(
'limittop'
),
_fileNum
=
_this
.
parent
().
next
(
).
find
(
'.delet-pic-btn'
).
length
;
//根据删除按钮的个数,确定文件的个数
_limitTop
=
1
,
//
_this.data('limittop'),
_fileNum
=
$
(
'#fujian_ul'
).
find
(
'.delet-pic-btn'
).
length
;
//根据删除按钮的个数,确定文件的个数
if
(
_limitTop
&&
(
_fileNum
<
_limitTop
))
{
// BrowseServer(_this.prev().attr('id'), function(url) {
...
...
@@ -125,9 +125,6 @@ define(['doT', 'text!temp/schoolBusiness_template_tpl.html', 'ckfinder', 'ckfind
// }
// };
// });
var
formData
=
new
FormData
();
formData
.
append
(
'type'
,
'house_img'
);
formData
.
append
(
'image'
,
_this
[
0
].
files
[
0
]);
...
...
@@ -159,7 +156,7 @@ define(['doT', 'text!temp/schoolBusiness_template_tpl.html', 'ckfinder', 'ckfind
}
}
else
{
if
(
/
(\.
jpg|
\.
jpeg|
\.
png|
\.
gif|
\.
bmp
)
$/i
.
test
(
url
))
{
$
(
'#fujian_ul'
).
append
(
'<li><img class="titleImg" title="点击查看大图" src="{0}"
srcNma
e="{1}"/><a href="javascript:;" class="delet-pic-btn">删除</a></li>'
.
stringFormatObj
({
$
(
'#fujian_ul'
).
append
(
'<li><img class="titleImg" title="点击查看大图" src="{0}"
data-nam
e="{1}"/><a href="javascript:;" class="delet-pic-btn">删除</a></li>'
.
stringFormatObj
({
'0'
:
url
,
'1'
:
_data
.
data
.
img_path
}));
...
...
@@ -329,11 +326,13 @@ define(['doT', 'text!temp/schoolBusiness_template_tpl.html', 'ckfinder', 'ckfind
$
(
"#district_id2"
).
val
(
data
.
data
.
s_label_id
*
1
);
//商学院标签id
var
_data
=
data
[
'data'
];
if
(
_data
[
'cover_plan'
])
{
var
nameStr
=
_data
[
'cover_plan'
].
split
(
"Attachments/images"
)[
1
];
var
name
=
nameStr
.
substr
(
1
,
nameStr
.
length
-
1
);
console
.
log
(
name
);
// http://images.tonglianjituan.com/static/shop_image_depot/20190218/20190218105609841.jpg
_imgUploadLiebiao
.
html
(
'<li><img
title="点击查看大图" src="{0}"
/><a href="javascript:;" class="delet-pic-btn">删除</a></li>'
.
stringFormatObj
({
_imgUploadLiebiao
.
html
(
'<li><img
class="titleImg" data-name="'
+
name
+
'" title="点击查看大图" src="{0}" data
/><a href="javascript:;" class="delet-pic-btn">删除</a></li>'
.
stringFormatObj
({
'0'
:
_data
[
'cover_plan'
]
}));
};
...
...
@@ -398,6 +397,9 @@ define(['doT', 'text!temp/schoolBusiness_template_tpl.html', 'ckfinder', 'ckfind
});
},
add_news
:
function
()
{
//新增文章 编辑文章
if
(
$
(
'.titleImg'
))
{
var
pic
=
$
(
'.titleImg'
).
attr
(
"data-name"
);
}
var
_imgUploadLiebiao
=
$
(
'#fujian_ul'
);
//列表页封面图ul
// var _liebiaoPicObj = _imgUploadLiebiao.find('li>img');
var
_liebiaoPicObj
=
$
(
'.titleImg'
);
...
...
@@ -418,7 +420,7 @@ define(['doT', 'text!temp/schoolBusiness_template_tpl.html', 'ckfinder', 'ckfind
console
.
log
(
"1232132132132112312321321"
)
_data
.
title
=
$
(
"#announcement_title"
).
val
();
_data
.
s_label_id
=
$
(
"#district_id2"
).
val
();
//商学院标签id
_data
.
file_img
=
user
.
titlePic
;
//_liebiaoPicObj[0].src.replace(_urlCut, ''); //封面图 剪切后的字符串
_data
.
file_img
=
pic
//
user.titlePic;//_liebiaoPicObj[0].src.replace(_urlCut, ''); //封面图 剪切后的字符串
_data
.
content
=
_dajiangtangVal
;
//附件相关
...
...
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