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
543151ed
Commit
543151ed
authored
Aug 29, 2018
by
xinyuandu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
商学院修改
parent
3073d4ed
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
19 deletions
+14
-19
schoolBusinessNew.js
public/resource/js/schoolBusinessNew.js
+14
-19
No files found.
public/resource/js/schoolBusinessNew.js
View file @
543151ed
...
...
@@ -178,7 +178,9 @@ define(['doT', 'text!temp/schoolBusiness_template_tpl.html', 'ckfinder', 'ckfind
e
.
stopPropagation
();
if
(
confirm
(
'确定删除该文件吗?'
))
{
var
_imgId
=
_this
.
parent
().
attr
(
'data-imgid'
);
var
file_id
=
$
(
this
).
parent
(
'li'
).
attr
(
'id'
)
-
0
;
_this
.
parent
().
remove
();
user
.
addDeleteNewsEvent
(
file_id
);
};
});
//图片预览点击放大事件
...
...
@@ -251,7 +253,6 @@ define(['doT', 'text!temp/schoolBusiness_template_tpl.html', 'ckfinder', 'ckfind
//附件
var
file_paths
=
_data
[
'file'
];
console
.
log
(
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
(
'/'
);
...
...
@@ -260,30 +261,24 @@ define(['doT', 'text!temp/schoolBusiness_template_tpl.html', 'ckfinder', 'ckfind
'1'
:
dealFileName
(
decodeURI
(
_tempArr
[
_tempArr
.
length
-
1
]))
}));
}
//添加删除附件事件
user
.
addDeleteNewsEvent
();
}
else
{}
}
});
},
addDeleteNewsEvent
:
function
(){
$
(
'.delet-pic-btn'
).
unbind
(
'click'
).
bind
(
'click'
,
function
(){
var
file_id
=
$
(
this
).
parent
(
'li'
).
attr
(
'id'
)
-
0
;
$
.
ajax
({
url
:
'/index/delNewsFile'
,
type
:
'POST'
,
async
:
true
,
data
:
{
'file_id'
:
file_id
},
dataType
:
'json'
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
)
{
alert
(
'文件删除成功'
);
}
addDeleteNewsEvent
:
function
(
id
){
$
.
ajax
({
url
:
'/index/delNewsFile'
,
type
:
'POST'
,
async
:
true
,
data
:
{
'file_id'
:
id
},
dataType
:
'json'
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
)
{
alert
(
'文件删除成功'
);
}
});
}
);
}
});
},
getDistrict
:
function
(
fn
)
{
...
...
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