Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHOBUYPC
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
2
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
毕凯
9 years ago
Commit
949118fe523a3774f91f65e6c2a64cf96bc4fdc2
1 parent
23eba12b
修正订单确认提交数据
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
34 additions
and
15 deletions
framework
static/js/shopping-cart/order-ensure.js
template/m.yohobuy.com/actions/index/shoppingCart/order-ensure.phtml
yohobuy/m.yohobuy.com/application/models/Index/Cart.php
framework
@
75bbc3b0
Subproject commit
e9d066dd88a8e7e37103021c427a205a5cfcdcec
Subproject commit
75bbc3b075de19f239532f60c5995d06c5f814e2
...
...
static/js/shopping-cart/order-ensure.js
View file @
949118f
...
...
@@ -15,6 +15,7 @@ var dispatchModeHammer,
dispatchTimeHammer
,
$invoice
=
$
(
'.invoice'
),
$price
=
$
(
'.price-cal'
),
payType
,
priceTmpl
=
Handlebars
.
compile
(
$
(
'#tmpl-price'
).
html
());
lazyLoad
();
...
...
@@ -109,7 +110,24 @@ function submitOrder() {
yohoCoin
:
orderInfo
(
'yohoCoin'
)
}
}).
then
(
function
(
res
)
{
console
.
log
(
res
);
var
url
;
if
(
!
res
)
{
tip
.
show
(
'网络出错'
);
return
;
}
if
(
res
.
code
===
200
)
{
if
(
payType
===
2
)
{
// 货到付款的进入订单页面
url
=
'/home/orderDetail?order_code='
+
res
.
data
.
order_code
;
}
else
{
url
=
'/home/pay?order_code='
+
res
.
data
.
order_code
;
}
window
.
location
.
href
=
url
;
}
else
{
tip
.
show
(
res
.
messege
||
'网络出错'
);
}
}).
fail
(
function
()
{
tip
.
show
(
'网络出错'
);
});
...
...
@@ -155,7 +173,10 @@ $('#msg').find('input').on('blur', function() {
});
$
(
'.pay-mode'
).
on
(
'click'
,
'li'
,
function
()
{
orderInfo
(
'paymentTypeId'
,
$
(
this
).
data
(
'pay-id'
));
orderInfo
(
'paymentType'
,
$
(
this
).
data
(
'pay-type'
));
var
$this
=
$
(
this
);
orderInfo
(
'paymentTypeId'
,
$this
.
data
(
'pay-id'
));
orderInfo
(
'paymentType'
,
$this
.
data
(
'pay-type'
));
payType
=
$this
.
data
(
'pay-type'
);
submitOrder
();
});
...
...
template/m.yohobuy.com/actions/index/shoppingCart/order-ensure.phtml
View file @
949118f
...
...
@@ -67,16 +67,14 @@
</li>
{
{/if
}
}
{
{#
yohoCoin
}
}
<li
class=
"coin"
data-yoho-coin=
"{{.}}"
>
<span
class=
"title"
>YOHO币</span>
<span
class=
"desc"
>可抵用¥
{
{.
}
}</span>
<span
class=
"coin-check"
>
<em>-
¥
{
{.
}
}</em>
<i
class=
"iconfont checkbox icon-cb-checked"
></i>
</span>
</li>
{
{/
yohoCoin
}
}
<li
class=
"coin"
data-yoho-coin=
"{{yohoCoin}}"
>
<span
class=
"title"
>YOHO币</span>
<span
class=
"desc"
>可抵用¥
{
{yohoCoin
}
}</span>
<span
class=
"coin-check"
>
<em>-
¥
{
{yohoCoin
}
}</em>
<i
class=
"iconfont checkbox icon-cb-checked"
></i>
</span>
</li>
{
{#if
invoice
}
}
<li
class=
"invoice {{#if needInvoice}}focus{{/if}}"
>
...
...
yohobuy/m.yohobuy.com/application/models/Index/Cart.php
View file @
949118f
...
...
@@ -586,7 +586,7 @@ class CartModel
$result
[
'message'
]
=
'请选择配送方式'
;
}
else
{
$orderSubRes
=
CartData
::
orderSub
(
$uid
,
$addressId
,
$cartType
,
$deliveryTime
,
$deliveryWay
,
$invoiceTitle
,
$invoiceId
,
$paymentId
,
$paymentType
,
$remark
,
$couponCode
,
$yohoCoin
);
if
(
$orderSubRes
&&
isset
(
$orderSubRes
[
'code'
]))
{
if
(
$orderSubRes
&&
isset
(
$orderSubRes
[
'code'
]))
{
$result
=
$orderSubRes
;
}
}
...
...
Please
register
or
login
to post a comment