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
hf
9 years ago
Commit
3347a6f437752ea77c07729066a75d22c9220f74
1 parent
a19aa9bd
fixes bug to brand list favorite
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
13 additions
and
10 deletions
static/js/product/list.js
yohobuy/m.yohobuy.com/application/modules/Product/controllers/Opt.php
yohobuy/m.yohobuy.com/configs/core/cache.developer.config.ini
yohobuy/m.yohobuy.com/configs/core/cache.production.config.ini
yohobuy/m.yohobuy.com/configs/core/cache.testing.config.ini
static/js/product/list.js
View file @
3347a6f
...
...
@@ -402,7 +402,7 @@ if ($brandHeader.length > 0) {
success
:
function
(
data
)
{
if
(
data
.
code
===
200
)
{
$this
.
toggleClass
(
'coled'
);
}
else
if
(
data
.
code
===
400
||
data
.
code
===
412
)
{
}
else
if
(
data
.
code
===
400
)
{
location
.
href
=
data
.
data
;
//未登录跳转登录页
}
else
{
tip
.
show
(
data
.
message
);
...
...
yohobuy/m.yohobuy.com/application/modules/Product/controllers/Opt.php
View file @
3347a6f
...
...
@@ -25,7 +25,7 @@ class OptController extends AbstractAction
*/
public
function
favoriteBrandAction
()
{
$result
=
array
(
'code'
=>
401
,
'message'
=>
'
未登录
'
,
'data'
=>
false
);
$result
=
array
(
'code'
=>
401
,
'message'
=>
'
参数不正确
'
,
'data'
=>
false
);
do
{
/* 判断是否是AJAX请求 */
...
...
@@ -42,6 +42,8 @@ class OptController extends AbstractAction
/* 判断用户是否登录 */
$uid
=
$this
->
getUdid
();
if
(
!
$uid
)
{
$referer
=
$this
->
server
(
'HTTP_REFERER'
,
SITE_MAIN
);
$result
=
array
(
'code'
=>
400
,
'message'
=>
'未登录'
,
'data'
=>
Helpers
::
url
(
'/signin.html'
,
array
(
'refer'
=>
$referer
)));
break
;
}
...
...
@@ -55,14 +57,9 @@ class OptController extends AbstractAction
/* 收藏 */
$result
=
BrandData
::
favorite
(
$id
,
$uid
);
if
(
!
isset
(
$result
[
'code'
]))
{
$result
=
array
(
'code'
=>
401
,
'message'
=>
'参数不正确'
,
'data'
=>
false
);
break
;
}
/* 未登录的情况,加跳转链接 */
if
(
$result
[
'code'
]
==
412
||
$result
[
'code'
]
==
400
)
{
$referer
=
$this
->
server
(
'HTTP_REFERER'
,
SITE_MAIN
);
$result
[
'data'
]
=
Helpers
::
url
(
'/signin.html'
,
array
(
'refer'
=>
$referer
));
}
}
while
(
false
);
$this
->
echoJson
(
$result
);
...
...
yohobuy/m.yohobuy.com/configs/core/cache.developer.config.ini
View file @
3347a6f
[memcached]
master.hosts
=
127.0.0.1:11212,127.0.0.1:11213
slave.hosts
=
127.0.0.1:11212,127.0.0.1:11213
memcached.session
=
127.0.0.1:11212,127.0.0.1:11213
[redis]
servers.hosts
=
192.168.1.168:6379
\ No newline at end of file
...
...
yohobuy/m.yohobuy.com/configs/core/cache.production.config.ini
View file @
3347a6f
[memcached]
master.hosts
=
10.170.182.9:12111,10.172.169.31:12111,10.173.8.214:12111
slave.hosts
=
10.170.182.9:12112,10.172.169.31:12112,10.173.8.214:12112
memcached.session
=
10.170.182.9:12111,10.172.169.31:12111,10.173.8.214:12111
[redis]
servers.hosts
=
127.0.0.1:6379
\ No newline at end of file
...
...
yohobuy/m.yohobuy.com/configs/core/cache.testing.config.ini
View file @
3347a6f
[memcached]
master.hosts
=
127.0.0.1:11212,127.0.0.1:11213
slave.hosts
=
127.0.0.1:11212,127.0.0.1:11213
master.hosts
=
127.0.0.1:11212,127.0.0.1:11213
slave.hosts
=
127.0.0.1:11212,127.0.0.1:11213
memcached.session
=
127.0.0.1:11212,127.0.0.1:11213
[redis]
servers.hosts
=
127.0.0.1:6379
\ No newline at end of file
...
...
Please
register
or
login
to post a comment