Toggle navigation
Toggle navigation
This project
Loading...
Sign in
liuloulou
/
yohobuy-portal-fe2
·
Commits
Go to a project
GitLab
Go to dashboard
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
ZhongW
9 years ago
Commit
5eec2b966833e7f992b772b33f3e3f33463c3e53
1 parent
303af277
封面排序
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
3 deletions
code/apps/goods/views/netsale/__partail/fenmian.html
code/static/js.jquery/module/goods/netsale/partials/editor_recommend.js
code/apps/goods/views/netsale/__partail/fenmian.html
View file @
5eec2b9
...
...
@@ -33,10 +33,10 @@
<
a
class
=
"fileinput-button-icon"
href
=
"javascript:void(0);"
><
img
src
=
"[[_item.imageUrl]]"
><
/a
>
<
i
class
=
"remove-item-btn glyphicon glyphicon-remove-circle"
><
/i
>
<
/div
>
<
div
class
=
"cover-color"
>
<
div
class
=
"cover-color"
>
[[
if
_item
.
isDefault
==
"Y"
]]
<
a
href
=
"javascript:;"
class
=
"btn btn-default btn-metro info"
data
-
i
=
"0"
>
默认
<
/a
>
[[
else
]]
[[
else
]]
<
a
href
=
"javascript:;"
class
=
"btn btn-default btn-metro"
data
-
i
=
"0"
>
默认
<
/a
>
[[
/if]
]
...
...
@@ -54,7 +54,11 @@
[[
else
]]
<
a
href
=
"javascript:;"
class
=
"btn btn-default btn-metro"
data
-
i
=
"2"
>
女封
<
/a
>
[[
/if]
]
[[
/if]
]
[[
/if]]
<
/div
>
<
div
class
=
"cover-color"
>
<
a
href
=
"javascript:;"
class
=
"btn btn-primary move_sort left"
data
-
i
=
[[
_index
]]
>
左移
<
/a
>
<
a
href
=
"javascript:;"
class
=
"btn btn-primary move_sort right"
id
=
[[
index
]]
"move_right"
[[
_index
]]
data
-
i
=
[[
_index
]]
>
右移
<
/a
>
<
/div
>
<
/li
>
[[
/each]
]
...
...
code/static/js.jquery/module/goods/netsale/partials/editor_recommend.js
View file @
5eec2b9
...
...
@@ -325,6 +325,21 @@ function renderGoodList() {
goodsList
:
goodsList
,
gender
:
gender
}));
for
(
var
i
in
goodsList
){
// var index = goodsList[i].goodsImagesList.length;
// alert(index);
// $(".right").each(function(){
// alert($(this).attr("data-i"))
// })
// $(".cover-image-list").hasAttr()
// alert(typeof($(".move_sort").find(".right").attr("data-i")))
// if(=="undefined"
// $(".move_sort") data-i ind("")
// addFengmian(uesImgIndex, uesImgMap[i]);
}
//添加封面图
common
.
edit
.
ajaxfileupload
(
".fenmianfile"
,
{
params
:
{
...
...
@@ -489,6 +504,28 @@ $(document).on("click", "#fenMainSave", function () {
return
false
;
});
//图片排序
$
(
document
).
on
(
'click'
,
'.move_sort'
,
function
()
{
if
(
$
(
this
).
hasClass
(
"right"
)){
var
img_index
=
$
(
this
).
attr
(
"data-i"
);
var
img
=
goodsList
[
0
].
goodsImagesList
[
img_index
];
var
imgright
=
goodsList
[
0
].
goodsImagesList
[
parseInt
(
img_index
)
+
1
];
goodsList
[
0
].
goodsImagesList
[
img_index
]
=
imgright
;
goodsList
[
0
].
goodsImagesList
[
parseInt
(
img_index
)
+
1
]
=
img
;
// goodsList[0].goodsImagesList.splice(img_index, 1);
// goodsList[0].goodsImagesList.push(img);
}
else
{
var
img_index
=
$
(
this
).
attr
(
"data-i"
);
var
img
=
goodsList
[
0
].
goodsImagesList
[
img_index
];
var
imgleft
=
goodsList
[
0
].
goodsImagesList
[
parseInt
(
img_index
)
-
1
];
goodsList
[
0
].
goodsImagesList
[
img_index
]
=
imgleft
;
goodsList
[
0
].
goodsImagesList
[
parseInt
(
img_index
)
-
1
]
=
img
;
}
renderGoodList
();
});
GOLABDATA
.
on
(
"fenmian"
,
function
()
{
var
map
=
{
goodsImagesBoList
:
[]
...
...
Please
register
or
login
to post a comment