Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHOBUYWAP
·
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
Email Patches
Plain Diff
Browse Files
Authored by
Rock Zhang
9 years ago
Commit
76e17097c80dae33c71c15f45457c813a09000ec
1 parent
1b2e8acf
修复限购商品购买支付错误的bug
Code Review By Rock Zhang
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
17 additions
and
9 deletions
library/LibModels/Wap/Product/DetailData.php
static/js/cart/chose-panel.js
static/js/cart/order-ensure.js
yohobuy/m.yohobuy.com/application/models/Product/Detail.php
yohobuy/m.yohobuy.com/application/modules/Cart/controllers/Index.php
library/LibModels/Wap/Product/DetailData.php
View file @
76e1709
...
...
@@ -233,8 +233,12 @@ class DetailData
{
$param
=
Yohobuy
::
param
();
$param
[
'method'
]
=
'app.limitProduct.limitProductDetail'
;
$param
[
'uid'
]
=
$uid
;
$param
[
'limitProductCode'
]
=
$productCode
;
if
(
!
empty
(
$uid
))
{
$param
[
'uid'
]
=
$uid
;
}
$param
[
'client_secret'
]
=
Sign
::
getSign
(
$param
);
return
Yohobuy
::
get
(
Yohobuy
::
API_URL
,
$param
);
...
...
static/js/cart/chose-panel.js
View file @
76e1709
...
...
@@ -473,8 +473,8 @@ $yohoPage.on('touchstart', '.btn-minus', function() {
}
else
if
(
limitProductCode
)
{
// 当前面板选择的是限购商品
url
=
'http://m.yohobuy.com/cart/index/orderEnsure?code='
+
limitProductCode
+
'&&sku='
+
productSku
+
'&&skn='
+
skn
+
'&&buy_num='
+
buyNumber
;
url
=
'http://m.yohobuy.com/cart/index/orderEnsure?limitproductcode='
+
limitProductCode
+
'&sku='
+
productSku
+
'&skn='
+
skn
+
'&buy_number='
+
buyNumber
;
//打开结算页面,结束函数执行。
window
.
location
.
href
=
url
;
...
...
static/js/cart/order-ensure.js
View file @
76e1709
...
...
@@ -31,7 +31,7 @@ require('../common');
lazyLoad
();
function
getQueryParam
()
{
var
queryArray
=
location
.
search
.
substr
(
1
).
split
(
'&
&
'
),
var
queryArray
=
location
.
search
.
substr
(
1
).
split
(
'&'
),
i
,
subArr
=
[],
obj
=
{};
...
...
@@ -46,7 +46,7 @@ function getQueryParam() {
}
function
isLimitGood
()
{
return
getQueryParam
().
code
;
return
getQueryParam
().
limitproduct
code
;
}
...
...
@@ -69,7 +69,11 @@ if (document.referrer && document.referrer.indexOf('/cart/index/index') !== -1)
isLimitGood
()
&&
(
function
()
{
var
a
=
[];
a
.
push
(
getQueryParam
());
var
data
=
getQueryParam
();
data
[
'type'
]
=
'limitcode'
;
a
.
push
(
data
);
orderInfo
(
'skuList'
,
JSON
.
stringify
(
a
));
})();
...
...
yohobuy/m.yohobuy.com/application/models/Product/Detail.php
View file @
76e1709
...
...
@@ -757,7 +757,7 @@ class DetailModel
$result
=
array
();
do
{
if
(
empty
(
$
uid
)
||
empty
(
$
productCode
))
{
if
(
empty
(
$productCode
))
{
break
;
}
...
...
yohobuy/m.yohobuy.com/application/modules/Cart/controllers/Index.php
View file @
76e1709
...
...
@@ -295,10 +295,10 @@ class IndexController extends AbstractAction
}
// 如果传递了code, sku,skn,buy_number就代表是限购商品
$limitProductCode
=
$this
->
get
(
'code'
,
''
);
$limitProductCode
=
$this
->
get
(
'
limitproduct
code'
,
''
);
$sku
=
$this
->
get
(
'sku'
,
''
);
$skn
=
$this
->
get
(
'skn'
,
''
);
$buyNumber
=
$this
->
get
(
'buy_number'
,
''
);
$buyNumber
=
$this
->
get
(
'buy_number'
,
1
);
// 购物车商品为空跳转到购物车页面
$uid
=
$this
->
getUid
(
true
);
...
...
Please
register
or
login
to post a comment