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
7fa6e412
Commit
7fa6e412
authored
Mar 21, 2019
by
agping
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
轮播图 弹窗 bug
parent
83f858e8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
14 deletions
+20
-14
banner.js
public/resource/js/banner.js
+17
-11
banner_template_tpl.html
public/resource/template/banner_template_tpl.html
+3
-3
No files found.
public/resource/js/banner.js
View file @
7fa6e412
...
...
@@ -26,9 +26,7 @@ define (['doT', 'text!temp/banner_template_tpl.html', 'ckfinder', 'ckfinderStart
_spFile
=
_this
.
data
(
'spfile'
),
_limitTop
=
_this
.
data
(
'limittop'
),
_fileNum
=
_this
.
parent
().
next
().
find
(
'.delet-pic-btn'
).
length
;
//根据删除按钮的个数,确定文件的个数
console
.
log
(
"123123"
)
if
(
_limitTop
&&
(
_fileNum
<
_limitTop
))
{
console
.
log
(
"啊发撒"
)
banner
.
uploadImg
(
_this
);
}
else
{
alert
(
'上传上限为 '
+
_limitTop
);
...
...
@@ -42,12 +40,8 @@ define (['doT', 'text!temp/banner_template_tpl.html', 'ckfinder', 'ckfinderStart
e
.
preventDefault
();
e
.
stopPropagation
();
$
(
this
).
parent
().
parent
().
remove
();
/*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);
};*/
banner
.
imageName
=
''
;
});
...
...
@@ -117,6 +111,7 @@ define (['doT', 'text!temp/banner_template_tpl.html', 'ckfinder', 'ckfinderStart
});
$
(
document
).
delegate
(
".editor_banner"
,
"click"
,
function
()
{
$
(
'.img_area'
).
html
(
''
);
$
(
"#editor_modal_title"
).
html
(
"编辑广告"
);
var
item
=
$
(
this
).
parents
(
"tr"
).
find
(
"td"
);
$
(
"#id"
).
val
(
$
(
this
).
attr
(
"data-id"
));
...
...
@@ -129,7 +124,19 @@ define (['doT', 'text!temp/banner_template_tpl.html', 'ckfinder', 'ckfinderStart
}
$
(
"#title"
).
val
(
item
.
eq
(
0
).
html
());
$
(
"#url"
).
val
(
item
.
eq
(
3
).
html
());
$
(
"#cover_image"
).
val
(
item
.
eq
(
1
).
find
(
"input"
).
val
());
// $ ("#cover_image").val (item.eq (1).find ("input").val ());
var
pic_path
=
$
(
this
).
attr
(
"data-pic"
);
var
tagLiu
=
''
;
tagLiu
+=
'<div class="col-xs-3 pictures" id='
+
pic_path
+
'>'
;
tagLiu
+=
' <img src="'
+
ServerHostImageLiu
+
'/resource/lib/Attachments/images/'
+
pic_path
+
'" class="" id="" width="90%">'
;
tagLiu
+=
' <div style="text-align:center" id="'
+
pic_path
+
'"><a href="javascript:;" class="delet-pic-btn">删除</a></div>'
;
tagLiu
+=
'</div>'
;
$
(
'.img_area'
).
append
(
tagLiu
);
banner
.
imageName
=
pic_path
;
console
.
log
(
$
.
trim
(
item
.
eq
(
2
).
html
()));
if
(
$
.
trim
(
item
.
eq
(
2
).
html
())
==
"用户app"
){
// $ ("#client").attr ("checked",true);/prop能够反复改变 attr不能反复改变属性
...
...
@@ -139,7 +146,6 @@ define (['doT', 'text!temp/banner_template_tpl.html', 'ckfinder', 'ckfinderStart
if
(
$
.
trim
(
item
.
eq
(
2
).
html
())
==
"经纪人app"
){
// $ ("#agent_side").attr ("checked",true)
$
(
"#agent_side"
).
prop
(
"checked"
,
true
);
console
.
log
(
66
)
}
$
(
"#sort"
).
val
(
item
.
eq
(
4
).
html
());
});
...
...
@@ -245,7 +251,7 @@ define (['doT', 'text!temp/banner_template_tpl.html', 'ckfinder', 'ckfinderStart
var
_url
=
_data
.
data
.
internet_img_name
;
var
tag
=
''
;
tag
+=
'<div class="col-xs-3 pictures" id='
+
_data
.
data
.
img_path
+
'>'
;
tag
+=
' <img src="
https://images.tonglianjituan.com
/resource/lib/Attachments/images/'
+
_url
+
'" class="" id="" width="90%">'
;
tag
+=
' <img src="
'
+
ServerHostImageLiu
+
'
/resource/lib/Attachments/images/'
+
_url
+
'" class="" id="" width="90%">'
;
tag
+=
' <div style="text-align:center" id="'
+
_data
.
data
.
img_path
+
'"><a href="javascript:;" class="delet-pic-btn">删除</a></div>'
;
tag
+=
'</div>'
;
$
(
'.img_area'
).
append
(
tag
)
;
...
...
public/resource/template/banner_template_tpl.html
View file @
7fa6e412
...
...
@@ -5,8 +5,8 @@
<
td
>
[
%=
it
[
item
][
"title"
]
%
]
<
/td
>
<
td
>
<
input
type
=
"hidden"
value
=
'[%= it[item]["pic_path"] %]'
>
<
img
src
=
'
https://images.tonglianjituan.com/resource/lib/Attachments/images/[%= it[item]["pic_path"] %]'
class
=
"diagram-image J_preview
"
data
-
bimg
=
'
https://images.tonglianjituan.com
/resource/lib/Attachments/images/[%= it[item]["pic_path"] %]'
>
<
img
src
=
'
[%= ServerHostImageLiu %]/resource/lib/Attachments/images/[%= it[item]["pic_path"] %]'
class
=
"diagram-image J_preview no-scroll-page-img
"
data
-
bimg
=
'
[%= ServerHostImageLiu %]
/resource/lib/Attachments/images/[%= it[item]["pic_path"] %]'
>
<
/td
>
<
td
>
...
...
@@ -24,7 +24,7 @@
<
td
>
[
%
if
(
check_auth
(
'index/addOrSave'
))
{
%
]
<
a
class
=
"btn1 btn-success editor_banner "
href
=
"#modal-add-do"
data
-
toggle
=
"modal"
data
-
id
=
"[%= it[item]['id'] %]"
>
data
-
id
=
"[%= it[item]['id'] %]"
data
-
pic
=
"[%= it[item]['pic_path'] %]"
>
编辑
<
/a
>
[
%
}
%
]
...
...
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