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
ed79510ea5e4256a7da653ef7390003f43af706d
1 parent
ea3fb3c0
限购商品详情 跳转APP
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
yohobuy/m.yohobuy.com/application/models/Product/Detail.php
yohobuy/m.yohobuy.com/application/models/Product/Detail.php
View file @
ed79510
...
...
@@ -323,7 +323,7 @@ class DetailModel
self
::
procShowStatus
(
$result
,
$showStatus
,
$isBeginSale
);
$result
[
'cartInfo'
][
'limitProductCode'
]
=
$baseInfo
[
'limitProductCode'
];
$result
[
'cartInfo'
][
'limitCodeUrl'
]
=
self
::
getLimitCodeUrl
(
$baseInfo
[
'
erpProductId
'
]);
$result
[
'cartInfo'
][
'limitCodeUrl'
]
=
self
::
getLimitCodeUrl
(
$baseInfo
[
'
limitProductCode
'
]);
$result
[
'cartInfo'
][
'limitProductPay'
]
=
Helpers
::
url
(
'/cart/index/orderEnsure'
);
}
else
{
$result
[
'cartInfo'
][
'addToCartUrl'
]
=
Helpers
::
url
(
'/product/buy_'
.
$productId
.
'_'
.
$goodsId
.
'.html'
);
...
...
@@ -878,16 +878,16 @@ class DetailModel
/**
* 根据设备类型获得限购商品跳转app的url
*
* @param string $
skn 商品skn
* @param string $
productCode 限购商品码
* @return string 限购商品跳转url
*/
private
static
function
getLimitCodeUrl
(
$
skn
)
private
static
function
getLimitCodeUrl
(
$
productCode
)
{
$url
=
'yohoapp://yoho.app/openwith?
product_skn='
.
$skn
;
$url
=
'yohoapp://yoho.app/openwith?
limit_product_code='
.
$productCode
;
// 苹果设备或者苹果IPAD
if
(
strstr
(
$_SERVER
[
'HTTP_USER_AGENT'
],
'iPhone'
)
||
strstr
(
$_SERVER
[
'HTTP_USER_AGENT'
],
'iPad'
))
{
$url
=
'yohobuy://'
.
Helpers
::
url
(
'/
product'
,
array
(
'skn'
=>
$skn
));
$url
=
'yohobuy://'
.
Helpers
::
url
(
'/
limitpurchase'
,
array
(
'lp'
=>
$productCode
));
}
return
$url
;
...
...
Please
register
or
login
to post a comment