Authored by 毕凯

增加绑定成功页面

1 -@import "common", "register", "login", "back", "code", "bind"; 1 +@import "common", "register", "login", "back", "code", "bind", "success";
  1 +.success-page {
  2 + color: #fefefe;
  3 +
  4 + .success-icon {
  5 + width: 74px;
  6 + height: 74px;
  7 + margin: 60px auto 30px;
  8 + background: image-url('passport/success.png');
  9 + background-size: 100%;
  10 + }
  11 +
  12 + .success-tip {
  13 + padding: 10px 10px;
  14 + font-size: 16px;
  15 + line-height: 1.5;
  16 + }
  17 +
  18 + .go {
  19 + display: block;
  20 + margin: 30px auto;
  21 + width: 270px;
  22 + height: 40px;
  23 + font-size: 14px;
  24 + line-height: 40px;
  25 + color: #fff;
  26 + background: rgba(255, 255, 255, 0.4);
  27 + border-radius: 5px;
  28 + }
  29 +}
  1 +{{> layout/header_passport}}
  2 +<div class="success-page passport-page yoho-page">
  3 + <div class="success-icon">
  4 + </div>
  5 + <div class="success-tip">
  6 + {{{successTip}}}
  7 + </div>
  8 + <a class="go" href="{{goUrl}}">
  9 + 立即购物
  10 + </a>
  11 +</div>
  12 +{{> layout/footer_passport}}
@@ -102,6 +102,22 @@ class BindController extends AbstractAction @@ -102,6 +102,22 @@ class BindController extends AbstractAction
102 } 102 }
103 103
104 /** 104 /**
  105 + * 绑定成功页面
  106 + */
  107 + public function successAction()
  108 + {
  109 + $this->setTitle('重新设置登录密码');
  110 + $data = array(
  111 + 'isPassportPage' => true, // 模板中模块标识
  112 + 'successTip' => '恭喜,您的手机号码已经关联成功。<br/>该手机号码不能用来登陆此账户,您可以选择继续使用微信登录', //提示文字
  113 + 'goUrl' => Helpers::url('/'), // 返回的到关联流程前的浏览页面
  114 + );
  115 +
  116 + // 渲染模板
  117 + $this->_view->display('success', $data);
  118 + }
  119 +
  120 + /**
105 * 绑定前手机号校验 121 * 绑定前手机号校验
106 */ 122 */
107 public function bindCheckAction() 123 public function bindCheckAction()
@@ -119,7 +135,7 @@ class BindController extends AbstractAction @@ -119,7 +135,7 @@ class BindController extends AbstractAction
119 $areaCode = $this->post('areaCode', '86'); 135 $areaCode = $this->post('areaCode', '86');
120 $sourceType = $this->post('sourceType'); 136 $sourceType = $this->post('sourceType');
121 $nickname = $this->post('nickname'); 137 $nickname = $this->post('nickname');
122 - 138 +
123 if (!is_numeric($phoneNum) || !$openId || !$areaCode || !$sourceType) { 139 if (!is_numeric($phoneNum) || !$openId || !$areaCode || !$sourceType) {
124 break; 140 break;
125 } 141 }