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
Email Patches
Plain Diff
Browse Files
Authored by
xuqi
2016-07-22 14:00:20 +0800
Commit
45da10c08023cc00c6153de327e4da0158e93e1e
1 parent
ae37f451
pay style
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
109 additions
and
75 deletions
apps/shopping/views/action/pay.hbs
apps/shopping/views/partial/pay/online-pay.hbs
public/js/shopping/pay.page.js
public/js/shopping/pay/pay.js
public/scss/shopping/_pay.css
apps/shopping/views/action/pay.hbs
View file @
45da10c
{{>
sign-header
}}
<div
class=
"center-content pay-online-wrapper"
>
{{#
order
}}
<div
class=
"title"
>
...
...
@@ -8,12 +7,16 @@
<span
class=
"cash right"
>
应付金额:
{{
paymentAmount
}}
</span>
</div>
<div
class=
"footer"
>
<span
class=
"desc left"
>
PADDY.BA
<span
class=
"blue"
>
2小时
</span>
内您无法完成付款,系统会将您的订单取消
</span>
<span
id=
"orderDetailCtrl"
class=
"right"
>
收起详情
<span
class=
"iconfont"
>

</span></span>
<span
class=
"desc pay-notice left"
>
{{
nickName
}}
如果
<span
class=
"blue"
>
2小时
</span>
内您无法完成付款,系统会将您的订单取消
</span>
<span
id=
"order-detail-ctrl"
class=
"right order-detail-ctrl shrink"
>
<em>
展开详情
</em>
<i
class=
"iconfont down"
>

</i>
<i
class=
"iconfont up"
>

</i>
</span>
</div>
</div>
<div
class=
"order-detail"
>
<div
class=
"order-detail
hide
"
>
<div
class=
"row"
>
<div
class=
"item"
>
<span
class=
"label"
>
收货地址:
</span>
...
...
@@ -42,45 +45,29 @@
</div>
</div>
{{/
order
}}
{{#
pay
}}
<div
class=
"pay-type"
>
<div
class=
"pay-nav"
>
<ul
class=
"tabs clearfix"
>
{{#
type
}}
<li
class=
"
{{#if
selected
}}
active
{{/if}}
"
data-type=
"
{{
id
}}
"
>
{{
name
}}
</li>
{{/
type
}}
{{#
each
type
}}
<li
{{#if
selected
}}
class=
"active"
{{/if}}
data-type=
"
{{
id
}}
"
>
{{
name
}}
</li>
{{/
each
}}
</ul>
</div>
<div
id=
"payItems"
>
</div>
<div
id=
"online"
>
{{#
onlinePay
}}
<div
class=
"pay-type-icon online-pay
{{#
unless
selected
}}
active
{{/
unless
}}
"
>
{{>
pay
/
online-pay
}}
<div
class=
"pay-type-icon online-pay
{{#if
selected
}}
active
{{/if}}
"
data-name=
"
{{
name
}}
"
data-id=
"
{{
id
}}
"
>
<img
src=
"
{{
img
}}
"
>
<span
class=
"choose-tag iconfont"
>

</span>
</div>
{{/
onlinePay
}}
{{/
onlinePay
}}
</div>
{{#
debitCard
}}
<div
class=
"debit-card
{{#
unless
selected
}}
hide
{{/
unless
}}
"
>
{{>
pay
/
debit-card
}}
</div>
{{/
debitCard
}}
{{#
creditCard
}}
<div
class=
"credit-card
{{#
unless
selected
}}
hide
{{/
unless
}}
"
>
{{>
pay
/
credit-card
}}
</div>
{{/
creditCard
}}
</div>
{{/
pay
}}
{{/
pay
}}
<div
class=
"pay-ctrl"
>
<
a
class=
"btn btn-shape right"
>
去
<span
id=
"payTypeName"
>
支付宝
</span>
支付
</a
>
<
span
id=
"go-pay-btn"
class=
"btn btn-shape right"
>
去
<em
id=
"pay-type-name"
>
支付宝
</em>
支付
</span
>
</div>
</div>
...
...
apps/shopping/views/partial/pay/online-pay.hbs
View file @
45da10c
<div
class=
"pay-icon-col"
>
<div
>
<img
src=
"
{{
img
}}
"
alt=
""
>
</div>
<div
class=
"choose-tag"
><span
class=
"iconfont"
>

</span></div>
<div
class=
"pay-icon-col"
data-name=
"
{{
name
}}
"
data-id=
"
{{
id
}}
"
>
<img
src=
"
{{
img
}}
"
>
<span
class=
"choose-tag iconfont"
>

</span>
</div>
\ No newline at end of file
...
...
public/js/shopping/pay.page.js
View file @
45da10c
...
...
@@ -2,4 +2,45 @@
* Created by TaoHuang on 2016/7/18.
*/
require
(
'./pay/pay'
)();
\ No newline at end of file
var
$
=
require
(
'yoho-jquery'
);
var
$orderDetail
=
$
(
'.order-detail'
);
// 展开详情/收起详情
$
(
'#order-detail-ctrl'
).
click
(
function
()
{
var
$this
=
$
(
this
);
$this
.
toggleClass
(
'shrink'
);
if
(
$this
.
hasClass
(
'shrink'
))
{
// 收起状态
$this
.
find
(
'em'
).
text
(
'展开详情'
);
}
else
{
// 展开状态
$this
.
find
(
'em'
).
text
(
'收起详情'
);
}
$orderDetail
.
toggleClass
(
'hide'
);
});
$
(
'.pay-type-icon'
).
click
(
function
()
{
var
$this
=
$
(
this
);
if
(
$this
.
hasClass
(
'active'
))
{
return
;
}
// 切换选中状态
$this
.
siblings
(
'.active'
).
removeClass
(
'active'
);
$this
.
addClass
(
'active'
);
$
(
'#pay-type-name'
).
text
(
$this
.
data
(
'name'
));
});
// 去支付
$
(
'#go-pay-btn'
).
click
(
function
()
{
});
...
...
public/js/shopping/pay/pay.js
deleted
100644 → 0
View file @
ae37f45
/**
* Created by TaoHuang on 2016/7/18.
*/
module
.
exports
=
function
(){
};
\ No newline at end of file
public/scss/shopping/_pay.css
View file @
45da10c
$
width
:
1150px
;
$
liWidth
:
1
2
0px
;
$
liWidth
:
1
4
0px
;
$
liHeight
:
40px
;
$
liBorderColor
:
#e6e6e6
;
$
fontColor
:
#616161
;
...
...
@@ -14,16 +14,45 @@ $fontColor: #616161;
.content
{
font-weight
:
bold
;
height
:
40px
;
}
.desc
{
.footer
{
height
:
20px
;
}
}
.cash
{
.pay-notice
{
color
:
#999
;
font-size
:
14px
;
}
.order-detail-ctrl
{
font-size
:
14px
;
cursor
:
pointer
;
/* 默认情况为收起状态 箭头方向为上 */
&.shrink
{
.up
{
display
:
inline-block
;
}
.footer
{
height
:
20px
;
.down
{
display
:
none
;
}
}
.up
{
display
:
none
;
}
.down
{
display
:
inline-block
;
}
.iconfont
{
font-size
:
12px
;
margin-left
:
10px
;
}
}
...
...
@@ -39,15 +68,10 @@ $fontColor: #616161;
.item
{
float
:
left
;
width
:
calc
(
$
width
/
2
-
31px
);
.label
{
}
}
}
}
.pay-type
{
.pay-nav
{
height
:
calc
(
$
liHeight
+
2px
);
line-height
:
calc
(
$
liHeight
+
2px
);
...
...
@@ -77,8 +101,7 @@ $fontColor: #616161;
line-height
:
calc
(
$
liHeight
-
2px
);
top
:
1px
;
border-bottom
:
none
;
color
:
black
;
font-weight
:
bold
;
color
:
#000
;
z-index
:
3
;
}
}
...
...
@@ -86,41 +109,37 @@ $fontColor: #616161;
}
.pay-type-icon
{
position
:
relative
;
float
:
left
;
width
:
250px
;
height
:
80px
;
margin-bottom
:
30px
;
margin-right
:
50px
;
margin-top
:
30px
;
position
:
relative
;
cursor
:
pointer
;
border
:
1px
solid
$
liBorderColor
;
&.active
{
border
:
2px
solid
black
;
}
.pay-icon-col
{
height
:
80px
;
.img-wrapper
{
height
:
60px
;
width
:
200px
;
}
text-align
:
center
;
img
{
margin
:
0
auto
;
display
:
inline-block
;
margin-top
:
19px
;
}
.choose-tag
{
display
:
none
;
position
:
absolute
;
bottom
:
0
;
right
:
0
;
height
:
22px
;
width
:
23px
;
}
}
&
.active
{
border
:
2px
solid
black
;
.choose-tag
{
display
:
inline-block
;
}
}
}
...
...
Please
register
or
login
to post a comment