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
xuqi
9 years ago
Commit
9b9f2a2ffa3caed2559a8f2d7d5b2bd568566946
2 parents
6c11f541
85454366
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
5 changed files
with
9 additions
and
84 deletions
apps/me/views/partial/order/good-info.hbs
public/helper/cart.js
public/scss/me/order/_table.css
public/scss/me/return/_change.css
public/scss/me/return/_list.css
apps/me/views/partial/order/good-info.hbs
View file @
9b9f2a2
...
...
@@ -4,7 +4,7 @@
</a>
<div
class=
"detail"
>
<a
href=
"
{{
goodUrl
}}
"
target=
"_blank"
>
<p
class=
"with-bottom-space"
>
{{
productName
}}
</p>
<p
class=
"with-bottom-space
good-name-text
"
>
{{
productName
}}
</p>
</a>
<span
class=
"with-space"
>
颜色:
{{
colorName
}}
</span>
<span>
尺码:
...
...
public/helper/cart.js
deleted
100644 → 0
View file @
6c11f54
/**
* Handlebars helpers
* dongjinhu jinhu.dong@yoho.cn
* 2016-07-14
*/
'use strict'
;
/**
* 乘法
* @param {[Number]} num1
* @param {[Number]} num2
* @return {[boolen]}
*/
exports
.
multiple
=
(
num1
,
num2
)
=>
{
num1
=
typeof
num1
===
'number'
?
num1
:
parseFloat
(
num1
,
10
);
num2
=
typeof
num2
===
'number'
?
num2
:
parseFloat
(
num2
,
10
);
if
(
num1
&&
num2
)
{
return
num1
*
num2
;
}
};
/**
* 小于等于
* @param {[Number]} num1
* @param {[Number]} num2
* @param {[object]} options 上下文环境,一般不手动传
* @return {[boolen]}
*/
exports
.
lte
=
(
num1
,
num2
,
options
)
=>
{
num1
=
typeof
num1
===
'number'
?
num1
:
parseFloat
(
num1
,
10
);
num2
=
typeof
num2
===
'number'
?
num2
:
parseFloat
(
num2
,
10
);
if
(
num1
<=
num2
)
{
return
options
.
fn
(
this
);
}
return
options
.
inverse
(
this
);
};
/**
* 显示剩余库存
* @param {[Number]} leftNumber
* @return {[boolen]}
*/
exports
.
showStorage
=
(
leftNumber
)
=>
{
leftNumber
=
typeof
num1
===
'number'
?
leftNumber
:
parseFloat
(
leftNumber
,
10
);
if
(
leftNumber
<=
3
&&
leftNumber
>=
0
)
{
return
`仅剩
$
{
leftNumber
}
件`
;
}
else
if
(
leftNumber
<
0
)
{
return
'库存不足'
;
}
};
/**
* 判断两个数字是否相等
* @param {[Number]} v1
* @param {[Number]} v2
* @return {[boolen]}
*/
exports
.
isEqual
=
function
(
v1
,
v2
,
options
)
{
if
(
v1
===
v2
)
{
return
options
.
fn
(
this
);
}
return
options
.
inverse
(
this
);
};
/**
* 图片格式化
* @param {[String]} url
* @param {[Number]} width
* @param {[Number]} height
* @param {[String]} mode
* @return {[boolen]}
*/
exports
.
image
=
function
(
url
,
width
,
height
,
mode
)
{
mode
=
parseInt
(
mode
,
10
)
?
mode
:
2
;
url
=
url
||
''
;
return
url
.
replace
(
/{width}/g
,
width
).
replace
(
/{height}/g
,
height
).
replace
(
/{mode}/g
,
mode
);
};
public/scss/me/order/_table.css
View file @
9b9f2a2
...
...
@@ -23,6 +23,10 @@
color
:
#fff
;
}
.good-name-text
:hover
{
text-decoration
:
underline
;
}
.change-tag
{
margin
:
10px
auto
0
;
color
:
#1b1b1b
;
...
...
public/scss/me/return/_change.css
View file @
9b9f2a2
...
...
@@ -21,6 +21,10 @@
}
}
.goods-container
{
width
:
990px
;
}
.thumb-box
{
position
:
relative
;
float
:
left
;
...
...
public/scss/me/return/_list.css
View file @
9b9f2a2
...
...
@@ -28,8 +28,6 @@
}
.goods-container
{
width
:
990px
;
.for-return
{
display
:
block
;
}
...
...
Please
register
or
login
to post a comment