Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yohobuywap-node
·
Commits
Go to a project
GitLab
Go to group
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
Plain Diff
Browse Files
Authored by
毕凯
8 years ago
Commit
018087cba4b21fbdc65a86d17dd6d88ffeb18928
2 parents
fef3d297
e77e2bbe
Merge remote-tracking branch 'origin/feature/supportShipment' into release/6.0.1
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
27 additions
and
9 deletions
apps/cart/views/action/buynow/order-ensure.hbs
apps/cart/views/action/order-ensure.hbs
public/js/cart/buynow-order-ensure.page.js
public/js/cart/order-ensure.js
public/scss/cart/_order-ensure.css
utils/payment-process.js
apps/cart/views/action/buynow/order-ensure.hbs
View file @
018087c
...
...
@@ -50,8 +50,8 @@
<ul
class=
"dispatch-mode"
>
{{#
each
dispatchMode
}}
<li
{{#if
isSelected
}}
class=
"chosed"
{{/if}}
data-id=
"
{{
id
}}
"
>
<span>
{{
name
}}
:运费¥
{{
cost
}}
</span>
<i
class=
"right iconfont
{{#if
isSelected
}}
icon-cb-radio
{{else}}
icon-radio
{{/if}}
"
data-id=
"
{{
id
}}
"
></i>
<span>
{{
name
}}
:运费¥
{{
cost
}}
{{#if
is_support_message
}}
(
{{
is_support_message
}}
)
{{/if}}
</span>
<i
class=
"right iconfont
{{#if
isSelected
}}
icon-cb-radio
{{else}}
icon-radio
{{/if}}{{#if
is_support_message
}}
no-support
{{/if}}
"
data-id=
"
{{
id
}}
"
></i>
</li>
{{/
each
}}
</ul>
...
...
apps/cart/views/action/order-ensure.hbs
View file @
018087c
...
...
@@ -50,8 +50,8 @@
<ul
class=
"dispatch-mode"
>
{{#
each
dispatchMode
}}
<li
{{#if
isSelected
}}
class=
"chosed"
{{/if}}
data-id=
"
{{
id
}}
"
>
<span>
{{
name
}}
:运费¥
{{
cost
}}
</span>
<i
class=
"right iconfont
{{#if
isSelected
}}
icon-cb-radio
{{else}}
icon-radio
{{/if}}
"
data-id=
"
{{
id
}}
"
></i>
<span>
{{
name
}}
:运费¥
{{
cost
}}
{{#if
is_support_message
}}
(
{{
is_support_message
}}
)
{{/if}}
</span>
<i
class=
"right iconfont
{{#if
isSelected
}}
icon-cb-radio
{{else}}
icon-radio
{{/if}}{{#if
is_support_message
}}
no-support
{{/if}}
"
data-id=
"
{{
id
}}
"
></i>
</li>
{{/
each
}}
</ul>
...
...
public/js/cart/buynow-order-ensure.page.js
View file @
018087c
...
...
@@ -343,6 +343,10 @@ if (!orderInfo('address_id')) {
}
$
(
'.delivery-id'
).
on
(
'touchend'
,
'li'
,
function
(
event
)
{
if
(
$
(
this
).
find
(
'i'
).
hasClass
(
'no-support'
))
{
return
false
;
}
orderInfo
(
'delivery_way'
,
$
(
this
).
data
(
'id'
));
// 实付金额发生变化,使用有货币为0
...
...
@@ -448,6 +452,10 @@ $subBlock.on('touchstart', 'li', function() {
return
true
;
}
if
(
$
(
this
).
find
(
'i'
).
hasClass
(
'no-support'
))
{
return
false
;
}
$
.
each
(
$
(
this
).
parents
(
'ul'
).
find
(
'i'
),
function
()
{
$
(
this
).
parents
(
'ul'
).
find
(
'i'
).
removeClass
(
'icon-cb-radio'
).
addClass
(
'icon-radio'
);
});
...
...
public/js/cart/order-ensure.js
View file @
018087c
...
...
@@ -324,6 +324,10 @@ if (!orderInfo('addressId')) {
}
$
(
'.delivery-id'
).
on
(
'touchend'
,
'li'
,
function
(
event
)
{
if
(
$
(
this
).
find
(
'i'
).
hasClass
(
'no-support'
))
{
return
false
;
}
orderInfo
(
'deliveryId'
,
$
(
this
).
data
(
'id'
));
// 实付金额发生变化,使用有货币为0
...
...
@@ -425,11 +429,16 @@ $('.dispatch').on('touchend', 'h3', function() {
});
$subBlock
.
on
(
'touchstart'
,
'li'
,
function
()
{
// 送货时间提示语li,不响应事件
if
(
$
(
this
).
hasClass
(
'dispatch-time-info'
))
{
return
true
;
}
if
(
$
(
this
).
find
(
'i'
).
hasClass
(
'no-support'
))
{
return
false
;
}
$
.
each
(
$
(
this
).
parents
(
'ul'
).
find
(
'i'
),
function
()
{
$
(
this
).
parents
(
'ul'
).
find
(
'i'
).
removeClass
(
'icon-cb-radio'
).
addClass
(
'icon-radio'
);
});
...
...
public/scss/cart/_order-ensure.css
View file @
018087c
...
...
@@ -196,7 +196,7 @@
height
:
auto
;
overflow
:
hidden
;
line-height
:
80px
;
font-size
:
2
8
px
;
font-size
:
2
6
px
;
background
:
#e0e0e0
;
display
:
none
;
...
...
utils/payment-process.js
View file @
018087c
...
...
@@ -97,7 +97,7 @@ function tranformPayment(data, orderInfo, cartType, skuList, orderComputeData) {
if
(
data
.
hasOwnProperty
(
'delivery_address'
)
&&
!
_
.
isEmpty
(
data
.
delivery_address
))
{
let
cookieAddress
=
orderInfo
.
address
;
let
addressData
=
data
.
delivery_address
;
let
isSupport
=
cookieAddress
?
cookieAddress
.
is_support
:
addressData
.
is_support
;
let
isSupport
=
cookieAddress
?
cookieAddress
.
is_support
:
''
;
result
.
name
=
cookieAddress
?
cookieAddress
.
consignee
:
addressData
.
consignee
;
result
.
phoneNum
=
cookieAddress
?
cookieAddress
.
mobile
:
addressData
.
mobile
;
...
...
@@ -107,8 +107,7 @@ function tranformPayment(data, orderInfo, cartType, skuList, orderComputeData) {
cookieAddress
.
address_info
:
[
addressData
.
area
,
addressData
.
address
].
join
(
' '
);
result
.
addressId
=
crypto
.
encryption
(
null
,
result
.
addressId
+
''
);
isSunfengSupport
=
isSupport
===
'Y'
;
isSunfengSupport
=
isSupport
===
'N'
;
}
// delivery_way 配送信息
...
...
@@ -120,7 +119,7 @@ function tranformPayment(data, orderInfo, cartType, skuList, orderComputeData) {
let
defaultKey
=
0
;
deliveryWay
.
forEach
((
way
,
index
)
=>
{
if
(
way
.
delivery_way_name
===
'顺丰速运'
&&
!
isSunfengSupport
)
{
if
(
way
.
delivery_way_name
===
'顺丰速运'
&&
isSunfengSupport
)
{
return
;
}
...
...
@@ -138,6 +137,8 @@ function tranformPayment(data, orderInfo, cartType, skuList, orderComputeData) {
id
:
way
.
delivery_way_id
,
name
:
way
.
delivery_way_name
,
cost
:
way
.
delivery_way_cost
,
is_support_message
:
(
way
.
is_support
===
'N'
&&
way
.
is_support_message
!==
''
)
?
way
.
is_support_message
:
''
},
obj
)
);
});
...
...
Please
register
or
login
to post a comment