master
chenxiaojun 5 years ago
commit 9143f057d4

@ -402,7 +402,11 @@ class UserController extends BaseController
$pgInfo = strval(cookie('pgInfo')); $pgInfo = strval(cookie('pgInfo'));
Log::write('register:' . date('Y-m-d H:i:s') . ' ---- ' . json_encode($_POST) . ' --- ' . $pgInfo, 'INFO'); Log::write('register:' . date('Y-m-d H:i:s') . ' ---- ' . json_encode($_POST) . ' --- ' . $pgInfo, 'INFO');
if (isset($_POST['promote_id']) && !empty($_POST['promote_id'])) { if (isset($_POST['promote_id']) && !empty($_POST['promote_id'])) {
$pid = $this->suser->register($phone, $password, $phone, $register_way, $register_type, $_POST['promote_id'], $_POST['promote_account'], $sex, $nickname, $head_img); Log::write('cxj_register:' . date('Y-m-d H:i:s') . ' ---- post' . json_encode($_POST) .' --- INFO');
$thisPromoteAccount = M('promote', 'tab_')->where(array('id' => $_POST['promote_id']))->getField('account');
$thisPromoteAccount = !empty($thisPromoteAccount) ? $thisPromoteAccount : '自然注册';
$promoteAccount = isset($_POST['promote_account']) ? $_POST['promote_account'] : $thisPromoteAccount;
$pid = $this->suser->register($phone, $password, $phone, $register_way, $register_type, $_POST['promote_id'], $promoteAccount, $sex, $nickname, $head_img);
} else { } else {
$pid = $this->suser->register($phone, $password, $phone, $register_way, $register_type, '', '', $sex, $nickname, $head_img); $pid = $this->suser->register($phone, $password, $phone, $register_way, $register_type, '', '', $sex, $nickname, $head_img);
} }

@ -29,7 +29,7 @@
<div class="forget"><a href="{:U('User/forget')}">忘记密码?</a></div> <div class="forget"><a href="{:U('User/forget')}">忘记密码?</a></div>
<button class="enter submit">登录</button> <button class="enter submit">登录</button>
<if condition="I('get.pid') gt 0"> <if condition="I('get.pid') gt 0">
<div class="promptly">还没有账号?<a style="margin-left: 10px;" href="<?='mobile.php?s=/User/step1/pid/'.I('get.pid').'/gid/'.I('get.gid').'.html'?>"> 账号注册 </a>|<a href="<?='mobile.php?s=/User/step/pid/'.I('get.pid').'/gid/'.I('get.gid').'.html'?>"> 手机注册 </a></div> <div class="promptly">还没有账号?<a style="margin-left: 10px;" href="<?='mobile.php?s=/User/step1/pid/'.I('get.pid').'/gid/'.I('get.gid').'.html'?>"> 账号注册 </a>|<a href="{:U('User/register',array('pid'=>I('get.pid',0),'gid'=>I('get.gid',0)))}"> 手机注册 </a></div>
<else/> <else/>
<div class="promptly">还没有账号?<a style="margin-left: 10px;" href="{:U('User/step1')}"> 账号注册 </a>|<a href="{:U('User/register')}"> 手机注册 </a></div> <div class="promptly">还没有账号?<a style="margin-left: 10px;" href="{:U('User/step1')}"> 账号注册 </a>|<a href="{:U('User/register')}"> 手机注册 </a></div>
</if> </if>

Loading…
Cancel
Save