master
sunke 5 years ago
parent 51c4656da6
commit 44c969ac0c

@ -116,14 +116,19 @@ class IndexController extends HomeController
'login_phone' => $mobile,
])->find();
if($promote) {
$loginrecord['promote_id'] = get_pid();
$loginrecord['promote_id'] = $promote['id'];
$loginrecord['account'] = $promote['account'];
$loginrecord['client_ip'] = $_SERVER['REMOTE_ADDR'];
$loginrecord['login_type'] = 2;
$loginrecord['create_time'] = time();
M("promote_login_record", "tab_")->add($loginrecord);
setcookie('login_phone', $mobile, time() + 3600 * 10000, $_SERVER["HTTP_HOST"]);
$this->success('登录成功!', U('Promote/index'));
$promote1 = new PromoteApi();
$result = $promote1->login($promote['account'], $promote['password']);
if ($result) {
$this->success('登录成功!', U('Promote/index'));
}
}else {
$this->error('此电话未注册,登录失败');
}

Loading…
Cancel
Save