Autouserinfo.php
2.92 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
<?php
use Action\AbstractAction;
use LibModels\Web\Passport\RegData;
use LibModels\Web\Passport\LoginData;
use LibModels\Web\Home\IndexData;
use Passport\PassportModel as PassportModel;
use Plugin\Helpers;
use Plugin\Images;
use Plugin\Partner\Factory;
class AutouserinfoController extends AbstractAction
{
/**
* 第三方登录完善个人信息:
* 绑定手机号
*/
public function indexAction()
{
$this->setTitle('联合登录补全信息');
$nickname = $this->get('nickname');
$openId = $this->get('openId');
$sourceType = $this->get('sourceType');
//登录后跳转页面
$refer = $this->getCookie('refer');
if (empty($refer)) {
$refer = SITE_MAIN;
}
else {
$refer = rawurldecode($refer);
}
//获取用户
$uid = $this->getUid(true);
if (!$uid) {
$isLogin = false;
$username = '';
}
else {
$isLogin = true;
$username = $this->_uname;
}
$simpleHeader = PassportModel::getSimpleHeader($isLogin, $username);
//整合
$data = array(
'loginPage' => true,
'simpleHeader' => $simpleHeader,
'passport' => array(
'coverHref' => '',
'coverImg' => 'http://img12.static.yhbimg.com/yhb-img01/2015/12/01/07/020a0b6e7ff908d0c2bc4045b4fef42b9f.png?imageView/2/w/252/h/190',
),
);
$this->_view->display('index', $data);
}
/**
* 完善信息页面
*/
public function userInfoAction()
{
//获取用户
$uid = $this->getUid(true);
$nickname = $this->get('nickname');
$openId = $this->get('openId');
$sourceType = $this->get('sourceType');
if (!$uid) {
$isLogin = false;
$username = '';
}
else {
$isLogin = true;
$username = $this->_uname;
}
$simpleHeader = PassportModel::getSimpleHeader($isLogin, $username);
//整合
$data = array(
'simpleHeader' => $simpleHeader,
'passport' => array(
'coverHref' => '',
'coverImg' => 'http://img12.static.yhbimg.com/yhb-img01/2015/12/01/07/020a0b6e7ff908d0c2bc4045b4fef42b9f.png?imageView/2/w/252/h/190',
'goShoppingUrl' => SITE_MAIN,
'completeInfoUrl' => Helpers::url('/passport/autouserinfo/index', array('openId' => $openId, 'sourceType' => $sourceType, 'nickname' => $nickname)),
),
);
$this->_view->display('userinfo', $data);
}
/*
* 发送绑定验证吗
*/
/*
* 验证图形验证码
*/
/*
* 验证短信验证码
*/
/*
* 绑定手机号
*/
}