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
9 years ago
Commit
53c916cb436dc4e944e446dd609d96d0169c2e90
1 parent
340db282
special delivery way
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
14 deletions
apps/shopping/controllers/order.js
apps/shopping/views/action/order.hbs
public/js/shopping/order/address.js
apps/shopping/controllers/order.js
View file @
53c916c
...
...
@@ -14,13 +14,19 @@ const helper = global.yoho.helpers;
// 结算页面
const
index
=
(
req
,
res
,
next
)
=>
{
orderModel
.
index
(
req
.
user
.
uid
).
then
(
result
=>
{
orderModel
.
index
(
req
.
user
.
id
).
then
(
result
=>
{
let
data
=
result
.
data
;
// 设置头部路径索引focus
result
.
data
.
bcNavFocus
=
2
;
data
.
bcNavFocus
=
2
;
// 构造诡异的配送方式数据【显示普通快递的文字,确用顺丰发货和顺丰的快递费】
data
.
delivery_way
=
_
.
concat
(
_
.
assign
(
_
.
find
(
data
.
delivery_way
,
{
delivery_way_id
:
2
}),
{
delivery_way_name
:
'普通快递'
}));
// 发票抬头
result
.
data
.
invoices
.
invoiceTitle
=
[
data
.
invoices
.
invoiceTitle
=
[
{
name
:
'个人'
,
value
:
1
,
...
...
@@ -33,17 +39,17 @@ const index = (req, res, next) => {
];
// 返回购物车链接
result
.
data
.
goCartLink
=
helper
.
urlFormat
(
'/shopping/cart'
);
data
.
goCartLink
=
helper
.
urlFormat
(
'/shopping/cart'
);
// 拆单是否显示左右切换
_
.
forEach
(
result
.
data
.
shopping_cart_data
.
package_list
,
i
=>
{
_
.
forEach
(
data
.
shopping_cart_data
.
package_list
,
i
=>
{
if
(
i
.
goods_list
.
length
>
4
)
{
i
.
showToggle
=
true
;
}
});
// 是否打印价格radio
result
.
data
.
printPriceRadio
=
[
data
.
printPriceRadio
=
[
{
value
:
'1'
,
name
:
'是'
...
...
@@ -56,7 +62,7 @@ const index = (req, res, next) => {
];
res
.
display
(
'order'
,
{
content
:
result
.
data
,
content
:
data
,
defaultHeader
:
false
});
}).
catch
(
next
);
...
...
apps/shopping/views/action/order.hbs
View file @
53c916c
...
...
@@ -32,9 +32,11 @@
<div
class=
"dispatch-type order-block"
>
<p
class=
"title"
>
配送方式
</p>
<ul
class=
"content"
>
<li
class=
"chose-row clearfix focus"
>
<span
class=
"chose-block"
>
普通快递:运费¥10.00
</span>
</li>
{{#
each
delivery_way
}}
<li
class=
"chose-row clearfix
{{#if
@first
}}
focus
{{/if}}
"
data-id=
"
{{
delivery_way_id
}}
"
>
<span
class=
"chose-block"
>
{{
delivery_way_name
}}
:运费¥
{{
round
delivery_way_cost
2
}}
</span>
</li>
{{/
each
}}
</ul>
</div>
<div
class=
"order-info order-block"
>
...
...
@@ -173,7 +175,9 @@
{{#
shopping_cart_data
}}
<div
class=
"balance-info left"
>
<p>
收货信息:
<em
id=
"receiver"
></em>
{{#
with
..
/
delivery_address
}}
收货信息:
<em
id=
"receiver"
>
{{
consignee
}}
{{
mobile
}}
{{
area
}}
{{
address
}}
</em>
{{/
with
}}
<span
class=
"right"
>
{{
selected_goods_count
}}
件商品
</span>
</p>
<p>
...
...
public/js/shopping/order/address.js
View file @
53c916c
...
...
@@ -451,9 +451,6 @@ $.ajax({
}
dotYou
(
$
(
'.address'
));
// 填收货人信息
receiver
(
data
.
data
[
0
]);
}
}
});
...
...
Please
register
or
login
to post a comment