Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yoho-blk
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
1
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Plain Diff
Browse Files
Authored by
biao
9 years ago
Commit
573a218f00b68f6b7e2e2cd3cd95c44a9e81ced7
2 parents
8c83babc
f829b57d
Merge branch 'release/1.0' of
http://git.yoho.cn/fe/yoho-blk
into release/1.0
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
41 additions
and
50 deletions
apps/me/views/partial/order/good-info.hbs
doraemon/api/upload.js
public/js/me/refund.page.js
public/scss/me/order/_table.css
public/scss/me/return/_index.css
public/tpl/me/thumbnail.hbs
apps/me/views/partial/order/good-info.hbs
View file @
573a218
...
...
@@ -10,6 +10,6 @@
<span>
尺码:
<span
class=
"bold"
>
{{
sizeName
}}
</span>
</span>
<p
class=
"bold buy-number"
>
{{>
icon
/
error-round
}}
{{
buyNumber
}}
</p>
<p
class=
"bold buy-number"
>
<span
class=
"iconfont"
>

</span>
{{
buyNumber
}}
</p>
</div>
</div>
...
...
doraemon/api/upload.js
View file @
573a218
...
...
@@ -68,6 +68,7 @@ const uploadImg = (req, res) => {
code
:
200
,
data
:
datas
[
0
],
datas
:
datas
,
imgs
:
imgs
,
names
:
req
.
body
.
fileNames
,
message
:
'上传成功'
,
status
:
true
...
...
public/js/me/refund.page.js
View file @
573a218
...
...
@@ -5,7 +5,6 @@
*/
var
$
=
require
(
'yoho-jquery'
),
lazyload
=
require
(
'yoho-jquery-lazyload'
),
handlebars
=
require
(
'yoho-handlebars'
),
upload
=
require
(
'../plugins/upload'
),
Alert
=
require
(
'../plugins/dialog'
).
Alert
;
...
...
@@ -23,14 +22,7 @@ var orderCode = $('#order-code').val() || 0,
type
:
$refundType
.
find
(
'.type-item.cur'
).
data
(
'id'
)
// 1--原卡返回 2--银行卡 3--支付宝 4--yoho币
};
var
tpl
=
'<div class="img-wrap" data-img="{{data}}">'
+
'<div class="img-opt">'
+
'<span class="review-upimg">查看</span>'
+
'<span class="cancel-upimg">删除</span>'
+
'</div>'
+
'<div class="img-view"><img src="{{data}}"></div>'
+
'</div>'
,
imgFn
=
handlebars
.
compile
(
tpl
);
var
imgBoxTpl
=
require
(
'../../tpl/me/thumbnail.hbs'
);
var
checked
;
...
...
@@ -139,7 +131,7 @@ function packApplyInfo() {
}
good
.
evidence_images
=
[];
$special
.
find
(
'.
img-wrap
'
).
each
(
function
()
{
$special
.
find
(
'.
thumb-box
'
).
each
(
function
()
{
var
img
=
$
(
this
).
data
(
'img'
);
if
(
img
)
{
...
...
@@ -223,7 +215,7 @@ $refundTable.on('change', '.refund-reason', function() {
num
=
$this
.
data
(
'num'
)
||
0
;
if
(
num
>
3
)
{
new
Alert
(
'<h1>最多上传4张凭证</h1>'
).
show
(
);
$this
.
addClass
(
'hide'
);
return
;
}
...
...
@@ -232,26 +224,28 @@ $refundTable.on('change', '.refund-reason', function() {
if
(
result
&&
result
.
code
===
200
)
{
// 避免异步上传导致数量不统一
num
=
$this
.
data
(
'num'
)
||
0
;
if
(
num
>
3
)
{
$this
.
addClass
(
'hide'
);
return
;
}
else
if
(
num
===
3
)
{
$this
.
addClass
(
'hide'
);
}
$this
.
siblings
(
'.img-up-tip'
).
text
(
++
num
+
'/4'
);
$this
.
data
(
'num'
,
num
);
$this
.
before
(
img
Fn
(
result
));
$this
.
before
(
img
BoxTpl
({
src
:
result
.
data
}
));
}
}
});
}).
on
(
'click'
,
'.
img-opt > span
'
,
function
()
{
}).
on
(
'click'
,
'.
thumb-box .delete
'
,
function
()
{
var
$this
=
$
(
this
),
$wrap
=
$this
.
closest
(
'.
img-wrap
'
),
$wrap
=
$this
.
closest
(
'.
thumb-box
'
),
$upBtn
=
$wrap
.
siblings
(
'.img-upload'
),
num
=
$upBtn
.
data
(
'num'
)
||
0
;
if
(
$this
.
hasClass
(
'cancel-upimg'
))
{
$wrap
.
siblings
(
'.img-up-tip'
).
text
(
--
num
+
'/4'
);
$wrap
.
remove
();
$upBtn
.
data
(
'num'
,
num
);
}
$wrap
.
siblings
(
'.img-up-tip'
).
text
(
--
num
+
'/4'
);
$wrap
.
remove
();
$upBtn
.
removeClass
(
'hide'
).
data
(
'num'
,
num
);
});
$refundType
.
on
(
'click'
,
'.type-item'
,
function
()
{
...
...
public/scss/me/order/_table.css
View file @
573a218
...
...
@@ -121,12 +121,8 @@
font-weight
:
normal
;
.iconfont
{
outline
:
3px
solid
#fff
;
outline-offset
:
-3px
;
border-radius
:
100%
;
background
:
#000
;
font-weight
:
normal
;
color
:
#
fff
;
color
:
#
000000
;
}
&
.last
{
...
...
public/scss/me/return/_index.css
View file @
573a218
...
...
@@ -93,17 +93,13 @@
margin-right
:
20px
;
}
.img-wrap
,
.img-upload
{
width
:
60px
;
height
:
60px
;
border
:
1px
dashed
#eee
;
line-height
:
60px
;
float
:
left
;
border
:
1px
dashed
#eee
;
margin-right
:
10px
;
}
.img-upload
{
line-height
:
60px
;
text-align
:
center
;
color
:
#dfdfdf
;
cursor
:
pointer
;
...
...
@@ -112,31 +108,35 @@
font-size
:
34px
;
}
}
}
.img-wrap
{
position
:
relative
;
}
.img-wrap
:hover
.img-opt
{
display
:
block
;
}
.thumb-box
{
position
:
relative
;
float
:
left
;
.img-opt
{
width
:
100%
;
height
:
20px
;
line-height
:
20px
;
background
:
#555
;
font-size
:
12px
;
color
:
#fff
;
opacity
:
0.7
;
.operation-box
{
display
:
none
;
width
:
60px
;
padding
:
5px
0
;
position
:
absolute
;
top
:
0
;
background-color
:
rgba
(
0
,
0
,
0
,
0.6
);
text-align
:
center
;
display
:
none
;
font-size
:
12px
;
>
*
{
display
:
inline-block
;
.delete
{
cursor
:
pointer
;
}
*
{
color
:
#fff
!important
;
}
}
&
:hover
{
.operation-box
{
display
:
block
;
}
}
}
...
...
public/tpl/me/thumbnail.hbs
View file @
573a218
<div
class=
"thumb-box"
>
<div
class=
"thumb-box"
data-img=
"
{{
src
}}
"
>
<img
class=
"envidence"
src=
"
{{
src
}}
"
alt=
"凭证图片"
>
<div
class=
"operation-box"
>
<a
href=
"
{{
src
}}
"
target=
"_blank"
>
查看
</a>
...
...
Please
register
or
login
to post a comment