diff --git a/service/Application/Common/Lang/zh-cn.php b/service/Application/Common/Lang/zh-cn.php index d6be7f66963c7f043979eddfbf5405bcfbf818a0..3b9f41338571b16873584cbbef2efded7a93cc19 100755 --- a/service/Application/Common/Lang/zh-cn.php +++ b/service/Application/Common/Lang/zh-cn.php @@ -71,14 +71,16 @@ return array( 'common_verify_expire' => '验证码已过期', 'common_verify_error' => '验证码错误', 'common_verify_tips' => '验证码格式 6 位数字', + 'common_close_sms_user_reg_text' => '短信注册', + 'common_close_email_user_reg_text' => '邮箱注册', 'common_close_user_reg_tips' => '暂时关闭用户注册', - 'common_close_sms_user_reg_tips' => '暂时关闭短信用户注册', - 'common_close_email_user_reg_tips' => '暂时关闭邮箱用户注册', + 'common_close_sms_user_reg_tips' => '暂时关闭短信注册', + 'common_close_email_user_reg_tips' => '暂时关闭邮箱注册', 'common_close_user_login_tips' => '暂时关闭用户登录', 'common_send_time_tips' => '还有 {time} 秒', 'common_get_verify_text' => '获取验证码', 'common_img_verify_text' => '图形验证码', - 'common_img_verify_tips' => '请输入图形验证码', + 'common_img_verify_tips' => '请输入有效的图形验证码', 'common_img_sms_verify_text' => '短信验证码', 'common_img_sms_verify_tips' => '请输入短信验证码', 'common_img_verify_submit_text' => '看不清换一张', @@ -262,6 +264,7 @@ return array( 'common_go_top_text' => '回到顶部', 'common_toview_home_text' => '查看首页', 'common_email_send_user_reg_title' => '用户注册', + 'common_email_send_user_forget_title'=> '密码找回', 'common_layout_slider_more_text' => '了解更多', 'common_pay_time_text' => '支付时间', 'common_not_pay_text' => '未支付', diff --git a/service/Application/Home/Controller/UserController.class.php b/service/Application/Home/Controller/UserController.class.php index 2f82d009447796a8c2690662554fceb516b10a2f..b1055dceb794bc00f897e89ea3347d8a508c29ca 100755 --- a/service/Application/Home/Controller/UserController.class.php +++ b/service/Application/Home/Controller/UserController.class.php @@ -34,14 +34,11 @@ class UserController extends CommonController private function GetrefererUrl() { // 上一个页面, 空则用户中心 - if(empty($_SERVER['HTTP_REFERER'])) + $referer_url = U('Home/User/Index'); + if(!empty($_SERVER['HTTP_REFERER'])) { - $referer_url = U('Home/Bubble/Index'); - } else { - if(strpos($_SERVER['HTTP_REFERER'], 'RegInfo') !== false || strpos($_SERVER['HTTP_REFERER'], 'LoginInfo') !== false || strpos($_SERVER['HTTP_REFERER'], 'ForgetPwdInfo') !== false) + if(strpos($_SERVER['HTTP_REFERER'], 'RegInfo') === false && strpos($_SERVER['HTTP_REFERER'], 'LoginInfo') === false && strpos($_SERVER['HTTP_REFERER'], 'ForgetPwdInfo') === false) { - $referer_url = U('Home/Bubble/Index'); - } else { $referer_url = $_SERVER['HTTP_REFERER']; } } @@ -78,6 +75,31 @@ class UserController extends CommonController } } + /** + * [RegInfo 用户注册页面] + * @author Devil + * @blog http://gong.gg/ + * @version 0.0.1 + * @datetime 2017-03-02T22:48:35+0800 + */ + public function RegInfo() + { + $reg_all = MyC('home_user_reg_state'); + if(!empty($reg_all)) + { + if(empty($this->user)) + { + $this->display('RegInfo'); + } else { + $this->assign('msg', L('common_reg_already_had_tips')); + $this->display('/Public/TipsError'); + } + } else { + $this->assign('msg', L('common_close_user_reg_tips')); + $this->display('/Public/TipsError'); + } + } + /** * [EmailRegInfo 用户注册页面-邮箱] * @author Devil @@ -104,20 +126,20 @@ class UserController extends CommonController } /** - * [RegInfo 用户注册页面-短信] + * [SmsRegInfo 用户注册页面-短信] * @author Devil * @blog http://gong.gg/ * @version 0.0.1 * @datetime 2017-03-02T22:48:35+0800 */ - public function RegInfo() + public function SmsRegInfo() { if(in_array('sms', MyC('home_user_reg_state'))) { if(empty($this->user)) { $this->assign('referer_url', $this->GetrefererUrl()); - $this->display('RegInfo'); + $this->display('SmsRegInfo'); } else { $this->assign('msg', L('common_reg_already_had_tips')); $this->display('/Public/TipsError'); @@ -360,7 +382,7 @@ class UserController extends CommonController if(I('type') == 'sms') { $obj = new \Library\Sms($verify_param); - $state = $obj->SendText(I('accounts'), MyC('home_sms_user_reg'), $code); + $state = $obj->SendCode(I('accounts'), $code, MyC('home_sms_user_reg')); } else { $obj = new \Library\Email($verify_param); $email_param = array( @@ -477,7 +499,7 @@ class UserController extends CommonController if($type == 'mobile') { $obj = new \Library\Sms($verify_param); - $state = $obj->SendText($accounts, MyC('home_sms_user_forget_pwd'), $code); + $state = $obj->SendCode($accounts, $code, MyC('home_sms_user_forget_pwd')); // 邮箱 } else if($type == 'email') @@ -486,7 +508,7 @@ class UserController extends CommonController $email_param = array( 'email' => $accounts, 'content' => MyC('home_email_user_forget_pwd'), - 'title' => MyC('home_site_name').' - '.L('common_email_send_user_reg_title'), + 'title' => MyC('home_site_name').' - '.L('common_email_send_user_forget_title'), 'code' => $code, ); $state = $obj->SendHtml($email_param); diff --git a/service/Application/Home/View/Default/Index/Index.html b/service/Application/Home/View/Default/Index/Index.html index 4a4a759cb3bfcdad217146387c46a5077a217abe..3ec9f196c8cffa0363b5ef464209e2106b71c441 100755 --- a/service/Application/Home/View/Default/Index/Index.html +++ b/service/Application/Home/View/Default/Index/Index.html @@ -43,7 +43,7 @@
- + {{:U('Home/User/LoginInfo')}}{{:U('Home/User/Index')}}"> @@ -64,7 +64,7 @@ Hi, {{$user.user_name_view}} - 您好 {{$user.user_name_view}},欢迎来到 {{:MyC('home_site_name')}} + 您好,欢迎来到 {{:MyC('home_site_name')}} @@ -72,12 +72,17 @@ 退出
- + - + +
0待收货 0待发货 diff --git a/service/Application/Home/View/Default/Public/HeaderTopNav.html b/service/Application/Home/View/Default/Public/HeaderTopNav.html index 2526110e6c299fcff6971d4ffefe6d68a0d63a58..60be330b4bf83bcc911e88959a64ac137db70ed8 100755 --- a/service/Application/Home/View/Default/Public/HeaderTopNav.html +++ b/service/Application/Home/View/Default/Public/HeaderTopNav.html @@ -6,8 +6,12 @@