Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHO-ACTIVITY-PHP
·
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
hf
9 years ago
Commit
2a109023ca5137fd773aafda71d66ea9d00d826f
1 parent
d11bb027
fixes bug refs YW-1052
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
10 deletions
yohobuy/m.yohobuy.com/application/modules/Guang/controllers/Plusstar.php
yohobuy/m.yohobuy.com/public/index.php
yohobuy/m.yohobuy.com/public/robots.txt
yohobuy/m.yohobuy.com/application/modules/Guang/controllers/Plusstar.php
View file @
2a10902
...
...
@@ -85,6 +85,8 @@ class PlusstarController extends AbstractAction
$channel
=
$this
->
get
(
'yh_channel'
);
// 标识是不是APP客户端
$isApp
=
is_numeric
(
$channel
);
// 标识是否是微信访问
$isWeixin
=
stripos
(
$this
->
server
(
'HTTP_USER_AGENT'
,
''
),
'MicroMessenger'
)
!==
false
;
// APP访问时通过频道参数判断性别
if
(
$isApp
)
{
switch
(
intval
(
$channel
))
{
...
...
@@ -99,7 +101,7 @@ class PlusstarController extends AbstractAction
}
$uid
=
$this
->
get
(
'uid'
);
$udid
=
$this
->
get
(
'udid'
);
$this
->
setSession
(
'uid'
,
$uid
);
}
// 从Cookie获取
...
...
@@ -138,14 +140,14 @@ class PlusstarController extends AbstractAction
$data
[
'ps'
][
'newArrival'
][
'moreUrl'
]
=
$url
;
$data
[
'ps'
][
'newArrival'
][
'naList'
]
=
$brandInfo
[
'getNewProduct'
];
$data
[
'ps'
][
'infos'
]
=
array
();
// 拼收藏的URL, 一个坑!
// 备注:此处是根据原来逛的代码硬扒过来的
$defaultUrl
=
Helpers
::
url
(
'/plustar/brandinfo'
,
array
(
'id'
=>
$id
),
'guang'
);
if
(
$isApp
)
{
$url
=
$defaultUrl
;
$url
.=
'&openby:yohobuy={"action":"go.weblogin","params":{"jumpurl":{"url":"http:\/\/guang.m.yohobuy.com\/plustar\/brandinfo","param":{"id":'
.
$id
.
'}},"requesturl":{"url":"\/guang\/api\/v1\/favorite\/togglebrand","param":{"brand_id":"'
.
$brandId
.
'"}},"priority":"Y"}}'
;
$url
.=
'&openby:yohobuy={"action":"go.weblogin","params":{"jumpurl":{"url":"http:\/\/guang.m.yohobuy.com\/plustar\/brandinfo","param":{"id":'
.
$id
.
'}},"requesturl":{"url":"\/guang\/api\/v1\/favorite\/togglebrand","param":{"brand_id":"'
.
$brandId
.
'"}},"priority":"Y"}}'
;
}
else
{
$url
=
Helpers
::
url
(
'/signin.html'
,
array
(
'refer'
=>
$defaultUrl
));
}
...
...
@@ -161,16 +163,16 @@ class PlusstarController extends AbstractAction
}
// 设置头部信息
if
(
!
$isApp
)
{
if
(
!
$isApp
&&
!
$isWeixin
)
{
$this
->
setNavHeader
(
$data
[
'ps'
][
'name'
],
true
,
SITE_MAIN
);
}
// 标识有微信分享
$data
[
'hasWxShare'
]
=
true
;
$data
[
'shareLink'
]
=
$defaultUrl
;
$data
[
'shareTitle'
]
=
$data
[
'ps'
][
'name'
];
$data
[
'shareDesc'
]
=
(
mb_strlen
(
$data
[
'ps'
][
'intro'
],
'utf-8'
)
>
800
)
?
mb_substr
(
$data
[
'ps'
][
'intro'
],
0
,
800
,
'utf-8'
)
.
'...'
:
$data
[
'ps'
][
'intro'
];
$data
[
'shareDesc'
]
=
(
mb_strlen
(
$data
[
'ps'
][
'intro'
],
'utf-8'
)
>
800
)
?
mb_substr
(
$data
[
'ps'
][
'intro'
],
0
,
800
,
'utf-8'
)
.
'...'
:
$data
[
'ps'
][
'intro'
];
$data
[
'shareImg'
]
=
$data
[
'ps'
][
'logo'
];
$brandInfo
=
array
();
...
...
yohobuy/m.yohobuy.com/public/index.php
View file @
2a10902
<?php
use
Yaf\Application
;
define
(
'SITE_MAIN'
,
'http://m
testh5
.yohobuy.com'
);
// 网站主域名
define
(
'SITE_MAIN'
,
'http://m.yohobuy.com'
);
// 网站主域名
define
(
'OLD_MAIN'
,
'http://m.yohobuy.com'
);
// 网站旧域名
define
(
'COOKIE_DOMAIN'
,
'.yohobuy.com'
);
// COOKIE作用域
define
(
'SUB_DOMAIN'
,
'.m
testh5
.yohobuy.com'
);
// 子域名后缀
define
(
'SUB_DOMAIN'
,
'.m.yohobuy.com'
);
// 子域名后缀
define
(
'USE_CACHE'
,
true
);
// 缓存的开关
define
(
'APPLICATION_PATH'
,
dirname
(
__DIR__
));
// 应用目录
define
(
'ROOT_PATH'
,
dirname
(
dirname
(
APPLICATION_PATH
)));
// 根目录
...
...
yohobuy/m.yohobuy.com/public/robots.txt
View file @
2a10902
User-agent: *
Disallow: /
\ No newline at end of file
Disallow:
\ No newline at end of file
...
...
Please
register
or
login
to post a comment