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
Plain Diff
Browse Files
Authored by
hf
9 years ago
Commit
928ccbd0478368a4b75dffccfe7be0e67041b5e2
2 parents
c6f96ced
73a92244
Merge branch 'develop' into test
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
32 additions
and
40 deletions
library/LibModels/Wap/Passport/LoginData.php
library/Plugin/Partner/sinaweibo/Call.php
template/m.yohobuy.com/actions/index/home/index.phtml
yohobuy/m.yohobuy.com/application/models/Index/User.php
yohobuy/m.yohobuy.com/application/modules/Passport/controllers/Login.php
yohobuy/m.yohobuy.com/configs/routes.index.ini
library/LibModels/Wap/Passport/LoginData.php
View file @
928ccbd
...
...
@@ -76,33 +76,17 @@ class LoginData
}
/**
*
写入
SESSION会话
*
登出
SESSION会话
*
* @param int $uid 用户ID
* @return array
*/
public
static
function
sign
inSession
(
$uid
)
public
static
function
sign
outSession
(
$token
)
{
$param
=
array
();
$param
[
'uid'
]
=
$uid
;
$param
[
'token'
]
=
md5
(
$uid
.
'#@!@#'
);
return
Yohobuy
::
get
(
Yohobuy
::
API_URL_LOGINSESSION
.
'Passport/session/index'
,
$param
);
}
/**
* 写入SESSION会话
*
* @param int $uid 用户ID
* @return array
*/
public
static
function
checkSession
(
$uid
)
{
$param
=
array
();
$param
[
'uid'
]
=
$uid
;
$param
[
'token'
]
=
md5
(
$uid
.
'#@!@#'
);
$param
[
'token'
]
=
$token
;
return
Yohobuy
::
get
(
Yohobuy
::
API_URL_LOGINSESSION
.
'Passport/session/
val
'
,
$param
);
return
Yohobuy
::
get
(
Yohobuy
::
API_URL_LOGINSESSION
.
'Passport/session/
logout
'
,
$param
);
}
}
...
...
library/Plugin/Partner/sinaweibo/Call.php
View file @
928ccbd
...
...
@@ -77,7 +77,7 @@ class Call extends Factory
if
(
is_array
(
$token
)
&&
isset
(
$token
[
'uid'
]))
{
$this
->
client
=
new
SaeTClientV2
(
$this
->
apiConfig
[
'appId'
],
$this
->
apiConfig
[
'appKey'
],
$token
[
'access_token'
]);
$this
->
client
=
new
\
SaeTClientV2
(
$this
->
apiConfig
[
'appId'
],
$this
->
apiConfig
[
'appKey'
],
$token
[
'access_token'
]);
$userInfo
=
$this
->
client
->
show_user_by_id
(
$token
[
'uid'
]);
...
...
@@ -108,7 +108,7 @@ class Call extends Factory
if
(
is_array
(
$token
)
&&
isset
(
$token
[
'access_token'
]))
{
$this
->
client
=
new
SaeTClientV2
(
$this
->
apiConfig
[
'appId'
],
$this
->
apiConfig
[
'appKey'
],
$token
[
'access_token'
]);
$this
->
client
=
new
\
SaeTClientV2
(
$this
->
apiConfig
[
'appId'
],
$this
->
apiConfig
[
'appKey'
],
$token
[
'access_token'
]);
$result
=
$this
->
client
->
friends_by_id
(
$params
[
'uid'
],
$params
[
'cursor'
],
$params
[
'count'
]);
...
...
@@ -133,7 +133,7 @@ class Call extends Factory
if
(
is_array
(
$token
)
&&
isset
(
$token
[
'access_token'
]))
{
$this
->
client
=
new
SaeTClientV2
(
$this
->
apiConfig
[
'appId'
],
$this
->
apiConfig
[
'appKey'
],
$token
[
'access_token'
]);
$this
->
client
=
new
\
SaeTClientV2
(
$this
->
apiConfig
[
'appId'
],
$this
->
apiConfig
[
'appKey'
],
$token
[
'access_token'
]);
$result
=
$this
->
client
->
bilateral
(
$params
[
'uid'
],
$params
[
'page'
],
$params
[
'count'
]);
...
...
@@ -163,7 +163,7 @@ class Call extends Factory
{
$content
.=
$link
;
$this
->
client
=
new
SaeTClientV2
(
$this
->
apiConfig
[
'appId'
],
$this
->
apiConfig
[
'appKey'
],
$token
[
'access_token'
]);
$this
->
client
=
new
\
SaeTClientV2
(
$this
->
apiConfig
[
'appId'
],
$this
->
apiConfig
[
'appKey'
],
$token
[
'access_token'
]);
$response
=
$this
->
client
->
upload
(
$content
,
$image
);
...
...
@@ -190,7 +190,7 @@ class Call extends Factory
if
(
is_array
(
$token
)
&&
isset
(
$token
[
'access_token'
]))
{
$this
->
client
=
new
SaeTClientV2
(
$this
->
apiConfig
[
'appId'
],
$this
->
apiConfig
[
'appKey'
],
$token
[
'access_token'
]);
$this
->
client
=
new
\
SaeTClientV2
(
$this
->
apiConfig
[
'appId'
],
$this
->
apiConfig
[
'appKey'
],
$token
[
'access_token'
]);
if
(
$uid
!==
null
)
{
...
...
@@ -218,7 +218,7 @@ class Call extends Factory
if
(
is_array
(
$token
)
&&
isset
(
$token
[
'access_token'
])
&&
is_string
(
$content
))
{
$this
->
client
=
new
SaeTClientV2
(
$this
->
apiConfig
[
'appId'
],
$this
->
apiConfig
[
'appKey'
],
$token
[
'access_token'
]);
$this
->
client
=
new
\
SaeTClientV2
(
$this
->
apiConfig
[
'appId'
],
$this
->
apiConfig
[
'appKey'
],
$token
[
'access_token'
]);
$this
->
client
->
update
(
$content
);
}
...
...
@@ -238,7 +238,7 @@ class Call extends Factory
{
if
(
is_array
(
$token
)
&&
isset
(
$token
[
'access_token'
])
&&
isset
(
$uid
))
{
$this
->
client
=
new
SaeTClientV2
(
$this
->
apiConfig
[
'appId'
],
$this
->
apiConfig
[
'appKey'
],
$token
[
'access_token'
]);
$this
->
client
=
new
\
SaeTClientV2
(
$this
->
apiConfig
[
'appId'
],
$this
->
apiConfig
[
'appKey'
],
$token
[
'access_token'
]);
$this
->
client
->
send_dm_by_id
(
$uid
,
$content
,
$id
);
}
}
...
...
template/m.yohobuy.com/actions/index/home/index.phtml
View file @
928ccbd
...
...
@@ -44,22 +44,22 @@
<a
class=
"type-item"
href=
"/home/order?type=2"
>
<span
class=
"iconfont"
>
634
;</span>
<br>待付款
{
{#if
pendingPaymentCount
}
}
<span
class=
"num"
>
{
{pendingPaymentCount
}
}</span>
{
{#if
wait_pay_num
}
}
<span
class=
"num"
>
{
{wait_pay_num
}
}</span>
{
{/if
}
}
</a>
<a
class=
"type-item"
href=
"/home/order?type=3"
>
<span
class=
"iconfont"
>
63
b;</span>
<br>待发货
{
{#if
dueOutGoodsCount
}
}
<span
class=
"num"
>
{
{dueOutGoodsCount
}
}</span>
{
{#if
wait_cargo_num
}
}
<span
class=
"num"
>
{
{wait_cargo_num
}
}</span>
{
{/if
}
}
</a>
<a
class=
"type-item"
href=
"/home/order?type=4"
>
<span
class=
"iconfont"
>
633
;</span>
<br>待收货
{
{#if
dueInGoodsCount
}
}
<span
class=
"num"
>
{
{dueInGoodsCount
}
}</span>
{
{#if
send_cargo_num
}
}
<span
class=
"num"
>
{
{send_cargo_num
}
}</span>
{
{/if
}
}
</a>
</div>
...
...
yohobuy/m.yohobuy.com/application/models/Index/User.php
View file @
928ccbd
...
...
@@ -62,10 +62,9 @@ class UserModel
'brand_favorite_total'
,
'product_favorite_total'
,
'product_browse'
,
'dueInGoodsCount'
,
'dueOutGoodsCount'
,
'pendingPaymentCount'
,
'refundGoodsCount'
'send_cargo_num'
,
'wait_cargo_num'
,
'wait_pay_num'
,
);
foreach
(
$infoNumData
[
'data'
]
as
$key
=>
&
$val
)
{
...
...
yohobuy/m.yohobuy.com/application/modules/Passport/controllers/Login.php
View file @
928ccbd
...
...
@@ -16,7 +16,7 @@ class LoginController extends AbstractAction
* 登录页
*/
public
function
indexAction
()
{
{
$this
->
setTitle
(
'登录'
);
$refer
=
$this
->
get
(
'refer'
);
...
...
@@ -67,14 +67,15 @@ class LoginController extends AbstractAction
/**
* 退出
*
* @todo
*/
public
function
outAction
()
{
$this
->
setCookie
(
'_UID'
,
''
);
$refer
=
$this
->
server
(
'HTTP_REFERER'
,
SITE_MAIN
);
$token
=
$this
->
get
(
'token'
);
LoginData
::
signoutSession
(
$token
);
$this
->
go
(
$refer
);
}
...
...
@@ -126,6 +127,7 @@ class LoginController extends AbstractAction
}
$data
[
'data'
][
'session'
]
=
Helpers
::
syncUserSession
(
$data
[
'data'
][
'uid'
]);
$data
[
'data'
][
'href'
]
=
$refer
;
}
while
(
false
);
$this
->
echoJson
(
$data
);
...
...
yohobuy/m.yohobuy.com/configs/routes.index.ini
View file @
928ccbd
...
...
@@ -40,6 +40,13 @@ routes.interational.route.module = Passport
routes.interational.route.controller
=
Login
routes.interational.route.action
=
International
; 登录页
routes.logout.type
=
"rewrite"
routes.logout.match
=
"/passport/signout/index"
routes.logout.route.module
=
Passport
routes.logout.route.controller
=
Login
routes.logout.route.action
=
out
; 找回密码(手机号)
routes.phoneback.type
=
"rewrite"
routes.phoneback.match
=
"/phoneback.html"
...
...
Please
register
or
login
to post a comment