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
Email Patches
Plain Diff
Browse Files
Authored by
郭成尧
9 years ago
Commit
10ee729eebd513a98e11decd36117ff01da64572
1 parent
0716ead9
ua判断
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
3 deletions
apps/product/models/detail.js
config/common.js
apps/product/models/detail.js
View file @
10ee729
...
...
@@ -99,8 +99,18 @@ const procShowStatus = (data, showStatus, isBeginSale) => {
* @return {[string]} 限购商品跳转url
*/
const
getLimitCodeUrl
=
(
productCode
,
skn
,
ua
)
=>
{
var
url
=
'yohoapp://yoho.app/openwith?limit_product_code='
+
productCode
+
'&product_skn='
+
skn
;
var
url
=
'yohoapp://yoho.app/openwith?limit_product_code='
+
productCode
+
'&product_skn='
+
skn
;
let
isIphone
=
String
(
ua
).
indexOf
(
'iPhone'
)
>=
0
;
let
isIpad
=
ua
.
indexOf
(
'iPad'
)
>=
0
;
if
(
isIphone
||
isIpad
)
{
let
params
=
{};
params
.
lp
=
productCode
;
url
=
'yohobuy://'
+
helpers
.
url
(
'/limitpurchase'
,
params
);
}
return
url
;
};
...
...
@@ -460,7 +470,6 @@ const detailDataPkg = (origin, uid, vipLevel, ua) => {
// 处理限购商品有关的按钮状态
dest
=
procShowStatus
(
dest
,
showStatus
,
isBeginSale
);
dest
.
cartInfo
.
limitProductCode
=
origin
.
limitProductCode
;
dest
.
cartInfo
.
limitCodeUrl
=
getLimitCodeUrl
(
origin
.
limitProductCode
,
origin
.
erpProductId
,
ua
);
dest
.
cartInfo
.
limitProductPay
=
helpers
.
url
(
'/cart/index/orderEnsure'
);
...
...
config/common.js
View file @
10ee729
...
...
@@ -7,7 +7,7 @@
module
.
exports
=
{
domains
:
{
api
:
'http://
devapi.yoho.cn:58078
'
api
:
'http://
192.168.102.205:8080/gateway
'
},
loggers
:
{
infoFile
:
{
...
...
Please
register
or
login
to post a comment