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
Plain Diff
Browse Files
Authored by
ccbikai(👎🏻🍜)
8 years ago
Commit
4479bffbbb9a80f6f11f07c47179d93f6ac7a757
2 parents
79b230eb
d523f1e8
Merge branch 'release/5.1' into grey
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
28 additions
and
26 deletions
apps/guang/controllers/plustar.js
apps/guang/models/plustar.js
apps/guang/views/action/plustar/detail.hbs
apps/product/models/detail.js
config/common.js
public/js/activity/student.page.js
public/js/guang/plustar-list.page.js
public/js/product/detail/page-render.js
utils/guang-process.js
apps/guang/controllers/plustar.js
View file @
4479bff
...
...
@@ -75,11 +75,13 @@ const getDetailData = (req, res, next) => {
let
userAgent
=
req
.
get
(
'User-Agent'
);
let
isWeixin
=
userAgent
.
includes
(
'MicroMessenger'
);
// 标识是否是微信访问
if
(
req
.
yoho
.
isApp
)
{
if
(
uid
)
{
if
(
isApp
)
{
uid
=
crypto
.
encryption
(
''
,
req
.
query
.
uid
+
''
);
}
else
{
uid
=
req
.
user
.
uid
;
}
}
if
(
clientType
.
toLowerCase
()
===
'ios'
&&
version
)
{
clientType
=
'iphone'
;
...
...
@@ -97,7 +99,7 @@ const getDetailData = (req, res, next) => {
page
:
'plustar-detail'
,
title
:
result
.
brandName
,
pageHeader
:
headerModel
.
setNav
({
navTitle
:
result
.
brand
N
ame
navTitle
:
result
.
brand
_n
ame
}),
ps
:
result
});
...
...
apps/guang/models/plustar.js
View file @
4479bff
...
...
@@ -334,8 +334,8 @@ const getDetailData = (id, uid, udid, gender, isApp, clientType) => {
shareLink
:
'//guang.m.yohobuy.com/plustar/brandinfo?id='
+
id
,
shareTitle
:
list
.
brandName
,
shareImg
:
list
.
brandIco
,
shareDesc
:
htmlProcess
.
removeHtml
(
list
.
brandIntro
)
shareDesc
:
htmlProcess
.
removeHtml
(
list
.
brandIntro
),
clientType
:
clientType
});
return
list
;
...
...
apps/guang/views/action/plustar/detail.hbs
View file @
4479bff
...
...
@@ -98,7 +98,7 @@
</div>
<input
id=
"jump-to-app"
type=
"hidden"
value=
"
{{
jumpToApp
}}
"
>
<input
id=
"brandId"
type=
"hidden"
value=
"
{{
brand
I
d
}}
"
>
<input
id=
"brandId"
type=
"hidden"
value=
"
{{
brand
_i
d
}}
"
>
<input
id=
"clientType"
type=
"hidden"
value=
"
{{
clientType
}}
"
>
{{!-- wx-share --}}
...
...
apps/product/models/detail.js
View file @
4479bff
...
...
@@ -1268,7 +1268,7 @@ const _detailDataPkg = (origin, ua) => {
// colorStorageNum = 0;
// pagecache重构
_
.
forEach
(
origin
.
goods_list
,
function
(
value
)
{
if
(
value
.
status
===
0
)
{
if
(
value
.
status
===
0
&&
!
origin
.
isLimitBuy
)
{
return
;
}
...
...
@@ -1749,7 +1749,7 @@ let _detailDataPkgAsync = (origin, uid, vipLevel, ua) => {
};
// 显示加入购物车链接
if
(
!
soldOut
&&
!
notForSale
)
{
if
(
!
soldOut
&&
!
notForSale
||
origin
.
isLimitBuy
)
{
_
.
orderBy
(
colorGroup
);
Object
.
assign
(
dest
.
cartInfo
,
{
productId
:
origin
.
product_id
,
...
...
config/common.js
View file @
4479bff
...
...
@@ -16,15 +16,15 @@ module.exports = {
siteUrl
:
'//m.yohobuy.com'
,
assetUrl
:
'//localhost:5001'
,
domains
:
{
api
:
'http://api-test3.yohops.com:9999/'
,
service
:
'http://service-test3.yohops.com:9999/'
,
liveApi
:
'http://testapi.live.yohops.com:9999/'
,
singleApi
:
'http://api-test3.yohops.com:9999/'
// api: 'http://api-test3.yohops.com:9999/',
// service: 'http://service-test3.yohops.com:9999/',
// liveApi: 'http://testapi.live.yohops.com:9999/',
// singleApi: 'http://api-test3.yohops.com:9999/'
// api: 'http://api.yoho.cn/',
// service: 'http://service.yoho.cn/',
// liveApi: 'http://api.live.yoho.cn/',
// singleApi: 'http://single.yoho.cn/'
api
:
'http://api.yoho.cn/'
,
service
:
'http://service.yoho.cn/'
,
liveApi
:
'http://api.live.yoho.cn/'
,
singleApi
:
'http://single.yoho.cn/'
},
subDomains
:
{
host
:
'.m.yohobuy.com'
,
...
...
public/js/activity/student.page.js
View file @
4479bff
...
...
@@ -285,8 +285,8 @@ setTimeout(function() {
SRC_ID
:
5
,
ATTCT_RES
:
1
,
FAILURE_CAUSE
:
''
,
ATTCT_INFO
:
'{{info}}'
,
}).
replace
(
'{{info}}'
,
localStorage
.
STUDENTCOOKIES
),
ATTCT_INFO
:
JSON
.
parse
(
localStorage
.
STUDENTCOOKIES
),
}),
},
true
);
}
}
else
{
...
...
public/js/guang/plustar-list.page.js
View file @
4479bff
...
...
@@ -41,11 +41,11 @@ $('#nav-tab').on('touchend touchcancel', function(e) {
$
(
document
).
trigger
(
'scroll'
);
// Trigger lazyLoad
});
if
(
$
(
'#nav-tab'
).
find
(
'li:eq(0)'
).
hasClass
(
'focus'
))
{
// 解决li隐藏 swiper不渲染的问题
$
(
'#nav-tab'
).
find
(
'li:eq(0)'
).
removeClass
(
'focus'
);
$
(
'#nav-tab'
).
find
(
'li:eq(0)'
).
trigger
(
'touchend'
);
}
// if ($('#nav-tab').find('li:eq(0)').hasClass('focus')) {
// // 解决li隐藏 swiper不渲染的问题
// $('#nav-tab').find('li:eq(0)').removeClass('focus');
// $('#nav-tab').find('li:eq(0)').trigger('touchend');
// }
$
(
'#nav-tab'
).
on
(
'touchstart'
,
function
(
e
)
{
var
target
=
e
.
target
||
e
.
srcElement
;
...
...
public/js/product/detail/page-render.js
View file @
4479bff
...
...
@@ -107,15 +107,15 @@ function render(data) {
if
(
data
.
cartInfo
.
limitNotForSale
)
{
$
(
'#limitNotForSale'
).
removeClass
(
dbClass
);
}
if
(
data
.
cartInfo
.
limitNotForSale
)
{
$
(
'#limitNotForSale'
).
removeClass
(
dbClass
);
}
if
(
data
.
cartInfo
.
canBuyLimit
)
{
$
(
'.can-buy-limit'
).
removeClass
(
dbClass
);
}
if
(
data
.
cartInfo
.
noLimitCode
)
{
$
(
'#noLimitCode'
).
removeClass
(
dbClass
);
}
if
(
data
.
cartInfo
.
canNotBuy
)
{
$
(
'#noLimitCode'
).
removeClass
(
dbClass
);
}
$
(
'.cart-bar'
).
removeClass
(
'data-bind'
);
$
(
'#limitCodeUrl'
).
val
(
data
.
cartInfo
.
limitCodeUrl
);
$
(
'#limitProductPay'
).
val
(
data
.
cartInfo
.
limitProductPay
);
...
...
utils/guang-process.js
View file @
4479bff
...
...
@@ -110,7 +110,7 @@ const formatArticle = (articleData, showTag, isApp, showAuthor, uid, reqQueryStr
// 编辑人员 app跳转url处理 20160601
let
isLogin
=
uid
?
true
:
false
;
articleData
.
author
.
url
=
`
$
{
helpers
.
https
(
articleData
.
author
.
url
)}
&
openby
:
yohobuy
=
{
"action"
:
"go.h5"
,
"params"
:{
"param"
:{
"id"
:
"${articleData.author.author_id}"
},
"share"
:
""
,
"id"
:
$
{
articleData
.
author
.
author_id
},
"type"
:
0
,
"islogin"
:
"${isLogin}
"
,
"url"
:
"https:${helpers.urlFormat('/author/index', {uid: uid}, 'guang')} "
}}
&
uid
=
$
{
uid
}
`
;
articleData
.
author
.
url
=
`
$
{
helpers
.
https
(
articleData
.
author
.
url
)}
&
openby
:
yohobuy
=
{
"action"
:
"go.h5"
,
"params"
:{
"param"
:{
"id"
:
"${articleData.author.author_id}"
},
"share"
:
""
,
"id"
:
$
{
articleData
.
author
.
author_id
},
"type"
:
0
,
"islogin"
:
"${isLogin}"
,
"url"
:
"https:${helpers.urlFormat('/author/index', {uid: uid}, 'guang')} "
}}
&
uid
=
$
{
uid
}
`
;
result
.
author
=
articleData
.
author
;
if
(
result
.
author
.
avatar
)
{
result
.
author
.
avatar
=
result
.
author
.
avatar
.
replace
(
'http://'
,
'//'
);
...
...
Please
register
or
login
to post a comment