Authored by xuqi

Merge branch 'feature/passport' of http://git.dev.yoho.cn/web/yohobuy into feature/passport

  1 +{{> layout/simple-header}}
  2 +<div class="login-page back-page yoho-page clearfix">
  3 + {{# back}}
  4 + {{> passport/cover}}
  5 + <div class="content">
  6 +
  7 + </div>
  8 + {{/ back}}
  9 +</div>
  10 +{{> layout/footer}}
  1 +{{> layout/header}}
  2 +<div class="login-page passport-page yoho-page clearfix">
  3 + {{# passport}}
  4 + {{> passport/cover}}
  5 + <div class="content">
  6 + <div class="register-page">
  7 + <form id="register-form" class="register-form" method="POST" action="{{actionUrl}}" autocomplete="off">
  8 + <ul>
  9 + <li class="clearfix">
  10 + <select id="region" class="region" name="region">
  11 + {{#each region}}
  12 + <option {{#if selected}}selected="selected"{{/if}} value="{{id}}">{{name}}</option>
  13 + {{/each}}
  14 + </select>
  15 + </li>
  16 + <li class="clearfix">
  17 + <span id="country-code" class="country-code">{{location}}</span>
  18 + <input value="" id="phone-num" class="input va phone-num" type="text" name="phoneNum" placeholder="请输入手机号码" autocomplete="off">
  19 + </li>
  20 + <li class="w330 clearfix">
  21 + <input id="captcha" class="input va captcha" type="text" name="captcha" placeholder="图形验证码" autocomplete="off" maxlength="4">
  22 + <img id="captcha-img" class="captcha-img" src="{{captchaUrl}}" alt="">
  23 + <a class="link change-captcha">换一张</a>
  24 + </li>
  25 + <li class="clearfix">
  26 + <input id="msg-captcha" class="input va msg-captcha" type="text" name="msgCaptcha" placeholder="短信验证码" autocomplete="off" maxlength="4">
  27 + <input id="send-captcha" class="btn send-captcha disable" type="button" value="获取短信验证码" disabled="">
  28 + <span id="msg-tip" class="hide msg-tip">短信验证码已发送至您的手机,请查收</span>
  29 + </li>
  30 + <li class="clearfix">
  31 + <input id="pwd" class="input va pwd" name="pwd" placeholder="设置密码" autocomplete="off" maxlength="20" type="password">
  32 + <div class="pwd-intensity-container">
  33 + <span class="pwd-intensity low">低</span>
  34 + <span class="pwd-intensity mid">中</span>
  35 + <span class="pwd-intensity high">高</span>
  36 + </div>
  37 + <div id="pwd-tips" class="hide pwd-tips">
  38 + <div class="default" id="pwd-tip1">密码只支持6-20位字符</div>
  39 + <div class="default" id="pwd-tip2">建议由字母、 数字、 符号两种以上组合</div>
  40 + </div>
  41 + </li>
  42 +
  43 + <li class="items-container clearfix">
  44 + <input id="agree-terms" class="agree-terms" type="checkbox" checked="">
  45 + <span>
  46 + 我已阅读并同意遵守
  47 + <a class="link go-yoho-items" href="{{itemUrl}}">YOHO!有货服务条款</a>
  48 + </span>
  49 + </li>
  50 + <li class="clearfix">
  51 + <input name="refer" id="refer" type="hidden" value="{{referUrl}}">
  52 + <input id="register-btn" class="btn register-btn disable" type="submit" value="立即注册" disabled="">
  53 + </li>
  54 + <li class="quick-login-container">
  55 + 我已注册YOHO!有货账号
  56 + <a class="link go-login" href="{{loginUrl}}">快速登录</a>
  57 + </li>
  58 + </ul>
  59 + <div id="err-tip" class="err-tip hide">
  60 + <span></span>
  61 + <b></b>
  62 + </div>
  63 + </form>
  64 + </div>
  65 + </div>
  66 + {{/ passport}}
  67 +</div>
  68 +{{> layout/footer}}
  1 +<!DOCTYPE html>
  2 +<html>
  3 + <head>
  4 + <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
  5 + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  6 + <meta http-equiv="Cache-Control" content="no-siteapp" />
  7 + <meta name="renderer" content="webkit">
  8 + <link rel="shortcut icon" href="http://www.yohobuy.com/favicon.ico" type="image/x-icon" />
  9 + <meta name="keywords" content="{{keywords}}">
  10 + <meta name="description" content="{{description}}">
  11 + <title>{{title}}</title>
  12 + <!-- [if (gte IE 6)&(lte IE 8)>
  13 + <script src="http://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
  14 + <![endif]-->
  15 + <link rel="stylesheet" href="http://webstatic.dev.yohobuy.com/css/index.css">
  16 + </head>
  17 + <body>
  18 + {{# simpleHeader}}
  19 + <div class="simple-header">
  20 + <div class="header-inner clearfix">
  21 + {{# logo}}
  22 + <h1 class="logo">
  23 + <a href="{{url}}">
  24 + <img src="{{img}}" alt="">
  25 + </a>
  26 + </h1>
  27 + {{/ logo}}
  28 + <ul class="header-tool clearfix">
  29 + {{# tool}}
  30 + <li {{#if options}}class="tool-options"{{/if}}{{#if loginUrl}}class="login-box"{{/if}}>
  31 + {{# tell}}
  32 + <i class="tell-icon iconfont">&#xe61c;</i>
  33 + {{/ tell}}
  34 +
  35 + {{#if url}}
  36 + <a href="{{url}}">{{title}}</a>
  37 + {{/if}}
  38 +
  39 + {{#unless url}}
  40 + <span>{{title}}</span>
  41 + {{/unless}}
  42 +
  43 + {{#if options}}
  44 + <i class="options-icon down iconfont">&#xe604;</i>
  45 + <i class="options-icon up iconfont">&#xe603;</i>
  46 + <div class="tool-select">
  47 + {{# options}}
  48 + <a href="{{url}}">{{textCn}}</a>
  49 + {{/ options}}
  50 + </div>
  51 + {{/if}}
  52 +
  53 + {{#if loginUrl}}
  54 + <a href="{{loginUrl}}">[请登录]</a>
  55 + <a href="{{regUrl}}">[免费注册]</a>
  56 + {{/if}}
  57 + </li>
  58 + {{/ tool}}
  59 + </ul>
  60 + </div>
  61 + </div>
  62 + {{/ simpleHeader}}
@@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
2 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" > 2 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
3 <svg xmlns="http://www.w3.org/2000/svg"> 3 <svg xmlns="http://www.w3.org/2000/svg">
4 <metadata> 4 <metadata>
5 -Created by FontForge 20120731 at Thu Dec 10 11:10:57 2015 5 +Created by FontForge 20120731 at Fri Dec 11 11:28:33 2015
6 By Ads 6 By Ads
7 </metadata> 7 </metadata>
8 <defs> 8 <defs>
@@ -19,7 +19,7 @@ Created by FontForge 20120731 at Thu Dec 10 11:10:57 2015 @@ -19,7 +19,7 @@ Created by FontForge 20120731 at Thu Dec 10 11:10:57 2015
19 bbox="0 -214 1172.1 864" 19 bbox="0 -214 1172.1 864"
20 underline-thickness="50" 20 underline-thickness="50"
21 underline-position="-100" 21 underline-position="-100"
22 - unicode-range="U+0078-E61B" 22 + unicode-range="U+0078-E61C"
23 /> 23 />
24 <missing-glyph horiz-adv-x="374" 24 <missing-glyph horiz-adv-x="374"
25 d="M34 0v682h272v-682h-272zM68 34h204v614h-204v-614z" /> 25 d="M34 0v682h272v-682h-272zM68 34h204v614h-204v-614z" />
@@ -97,5 +97,10 @@ d="M903 493l-68 69l-388 -388l-231 230l-68 -68l299 -298l65 65z" /> @@ -97,5 +97,10 @@ d="M903 493l-68 69l-388 -388l-231 230l-68 -68l299 -298l65 65z" />
97 <glyph glyph-name="uniE61B" unicode="&#xe61b;" 97 <glyph glyph-name="uniE61B" unicode="&#xe61b;"
98 d="M505 253l2 -2q2 -1 4 -1l3 1l430 364q2 2 1 6l-2 2q-1 1 -3 1h-435h-424q-2 0 -3 -1l-2 -2l1 -6zM72 585q-3 2 -6 0l-3 -4v-584q0 -4 3.5 -5t5.5 1l288 346zM953 585h-5l-288 -246l287 -346q3 -2 6 -1t3 5v584q0 3 -3 4zM641 322l-131 -111l-5 5l-125 103l-275 -328 98 d="M505 253l2 -2q2 -1 4 -1l3 1l430 364q2 2 1 6l-2 2q-1 1 -3 1h-435h-424q-2 0 -3 -1l-2 -2l1 -6zM72 585q-3 2 -6 0l-3 -4v-584q0 -4 3.5 -5t5.5 1l288 346zM953 585h-5l-288 -246l287 -346q3 -2 6 -1t3 5v584q0 3 -3 4zM641 322l-131 -111l-5 5l-125 103l-275 -328
99 q-2 -3 -1 -6l2 -2q1 -1 3 -1h396h407q4 0 5 3t-1 6z" /> 99 q-2 -3 -1 -6l2 -2q1 -1 3 -1h396h407q4 0 5 3t-1 6z" />
  100 + <glyph glyph-name="uniE61C" unicode="&#xe61c;"
  101 +d="M982 137l-4 6l-10 12q-12 13 -42 38q-12 10 -25.5 20.5t-27.5 21t-26 17.5l-48 31l-21 11q-5 2 -11.5 3t-13 0.5t-11.5 -2.5q-7 -2 -13.5 -7.5t-9.5 -10.5l-17 -25q-4 -6 -8 -13l-12 -24q-9 -18 -15 -28q-7 -14 -21 -24t-32 -13.5t-36 7.5q-102 57 -171 123
  102 +q-101 95 -135 172q-8 13 -1.5 37t26.5 34q12 6 25 11.5t23 9.5t18 9q7 4 14.5 8.5t18.5 11.5l2 1l4 4l2 1l3 3q19 18 9 43l-3 8q-1 4 -4 10t-12.5 24.5t-19.5 34.5q-8 14 -19.5 31t-21.5 31q-10 13 -20.5 24t-18.5 17.5t-14.5 11.5t-9.5 6l-4 2l-13 7q-9 4 -17.5 4.5t-16 -1
  103 +t-16.5 -4.5q-5 -2 -9.5 -4.5t-8.5 -4t-9 -4.5l-7 -4q-3 -2 -8 -6t-7 -5t-7.5 -5.5t-7 -5.5t-8 -6.5t-7.5 -5.5q-44 -37 -69.5 -82.5t-19.5 -86.5q10 -72 88 -198.5t182.5 -225.5t237.5 -173t209 -84q79 -10 169 73q16 15 31.5 34.5t24.5 38.5q6 14 7.5 30t-5.5 31v0z
  104 +M982 137z" />
100 </font> 105 </font>
101 </defs></svg> 106 </defs></svg>
@@ -1048,6 +1048,98 @@ @@ -1048,6 +1048,98 @@
1048 line-height: 16px; 1048 line-height: 16px;
1049 } 1049 }
1050 } 1050 }
  1051 +
  1052 +.simple-header {
  1053 + height: 66px;
  1054 + margin: 0 0 20px 0;
  1055 + border-bottom: 2px solid #222;
  1056 +
  1057 + .header-inner {
  1058 + width: 990px;
  1059 + height: 100%;
  1060 + margin: 0 auto;
  1061 + }
  1062 +
  1063 + .logo {
  1064 + float: left;
  1065 + line-height: 66px;
  1066 + font-size: 0;
  1067 + img {
  1068 + vertical-align: middle;
  1069 + }
  1070 + }
  1071 +}
  1072 +
  1073 +.simple-header .header-tool {
  1074 + float: right;
  1075 + line-height: 66px;
  1076 + font-size: 0;
  1077 + li {
  1078 + @include inline-block;
  1079 + padding: 0 10px;
  1080 + *margin: 19px 0 0;
  1081 + line-height: 28px;
  1082 + font-size: 12px;
  1083 +
  1084 + span, a {
  1085 + font-size: 12px;
  1086 + }
  1087 +
  1088 + .tell-icon {
  1089 + font-size: 12px;
  1090 + }
  1091 + .tell-icon ~ span {
  1092 + font-weight: bold;
  1093 + }
  1094 + }
  1095 + .login-box {
  1096 + a {
  1097 + color: #666;
  1098 + }
  1099 + }
  1100 + .tool-options {
  1101 + position: relative;
  1102 + font-size: 0;
  1103 + cursor: pointer;
  1104 +
  1105 + &:hover {
  1106 + background-color: #eaeceb;
  1107 + .iconfont {
  1108 + &.up {
  1109 + display: inline-block;
  1110 + *display: inline;
  1111 + *zoom: 1;
  1112 + }
  1113 + &.down {
  1114 + display: none;
  1115 + }
  1116 + }
  1117 + }
  1118 + .iconfont, span{
  1119 + @include inline-block;
  1120 + font-size: 12px;
  1121 + height: 28px;
  1122 + line-height: 28px;
  1123 + &.up {
  1124 + display: none;
  1125 + }
  1126 +
  1127 + }
  1128 + .tool-select {
  1129 + display: none;
  1130 + position: absolute;
  1131 + width: 74px;
  1132 + left: 0;
  1133 + background: #eaeceb;
  1134 + z-index: 9;
  1135 + a {
  1136 + display: block;
  1137 + padding: 0 0 0 10px;
  1138 + border-top: 1px solid #ddd;
  1139 + }
  1140 + }
  1141 + }
  1142 +}
1051 @media (max-width:1180px) { 1143 @media (max-width:1180px) {
1052 .yoho-header { 1144 .yoho-header {
1053 .header-topwrapper { 1145 .header-topwrapper {
1 -@import "login"; 1 +@import "login", "register";
2 2
3 .passport-page { 3 .passport-page {
4 width: 1150px; 4 width: 1150px;
  1 +/*
  2 + * @description 注册页样式
  3 + * @author chenglong.wang@yoho.cn
  4 + * @time 2015/12/11
  5 + */
  6 +
  7 +.content {
  8 +
  9 + .register-page {
  10 + font-size: 14px;
  11 + color: #b9b9b9;
  12 + }
  13 +
  14 + .register-form {
  15 + height: auto;
  16 +
  17 + li {
  18 + margin-bottom: 25px;
  19 + width: 270px;
  20 + position: relative;
  21 +
  22 + &.w330 {
  23 + width: 330px;
  24 + }
  25 +
  26 + input, select {
  27 + outline: none;
  28 + }
  29 +
  30 + input {
  31 + height: 43px;
  32 + line-height: 43px;
  33 + font-size: 16px;
  34 + width: 268px;
  35 + border: 1px solid #dbdbdb;
  36 + text-indent: 10px;
  37 + font-family: '黑体' Regular;
  38 + color: #9a9a9a;
  39 + padding: 0;
  40 +
  41 + &.phone-num {
  42 + width: 209px;
  43 + display: block;
  44 + float: left;
  45 + }
  46 +
  47 + &.captcha, &.msg-captcha{
  48 + width: 160px;
  49 + float: left;
  50 + }
  51 +
  52 + &.send-captcha {
  53 + top: 0;
  54 + background: #555;
  55 + position: absolute;
  56 + width: 100px;
  57 + right: 0;
  58 + font-size: 12px;
  59 + text-indent: 0;
  60 + letter-spacing: 0;
  61 + }
  62 +
  63 + &.agree-terms {
  64 + width: initial;
  65 + height: initial;
  66 + vertical-align: middle;
  67 + }
  68 + }
  69 +
  70 + .link {
  71 + text-decoration: underline;
  72 + color: #ff1901;
  73 + }
  74 +
  75 + .btn {
  76 + height: 45px;
  77 + line-height: 45px;
  78 + color: #fff;
  79 + border: none;
  80 + padding: 0;
  81 + font-family: '黑体' Regular;
  82 + text-align: center;
  83 + }
  84 +
  85 + //区域下拉选择框
  86 + select.region {
  87 + height: 30px;
  88 + padding: 4px 0;
  89 + width: 132px;
  90 + border-color: #c1c1c1;
  91 + color: #9a9a9a;
  92 + font-size: 16px;
  93 + font-family: '黑体' Regular;
  94 + }
  95 +
  96 + //手机号
  97 + .country-code {
  98 + width: 58px;
  99 + height: 43px;
  100 + line-height: 43px;
  101 + text-align: center;
  102 + white-space: nowrap;
  103 + border: 1px solid #dbdbdb;
  104 + border-right: 0;
  105 + font-size: 16px;
  106 + display: block;
  107 + float: left;
  108 + }
  109 +
  110 + //验证码
  111 + .captcha-img {
  112 + height: 37px;
  113 + width: 90px;
  114 + border: 0;
  115 + vertical-align: middle;
  116 + outline: none;
  117 + margin-left: 10px;
  118 + margin-top: 4px;
  119 + float: left;
  120 + }
  121 + .change-captcha {
  122 + margin-left: 10px;
  123 + cursor: pointer;
  124 + float: left;
  125 + height: 43px;
  126 + line-height: 43px;
  127 + }
  128 +
  129 + //密码强度
  130 + .pwd-intensity-container {
  131 + width: 270px;
  132 + text-align: right;
  133 + margin-top: 5px;
  134 +
  135 + .pwd-intensity {
  136 + height: 15px;
  137 + font-size: 12px;
  138 + background-color: #e8e8e8;
  139 + padding: 1px 10px;
  140 + text-align: center;
  141 + }
  142 + }
  143 +
  144 + //服务条款
  145 + &.items-container {
  146 + font-size: 13px;
  147 + text-align: right;
  148 + white-space: nowrap;
  149 + }
  150 +
  151 + //立即注册
  152 + .register-btn {
  153 + width: 270px;
  154 + font-size: 20px;
  155 + font-weight: bold;
  156 +
  157 + &.disable {
  158 + background: #555;
  159 + }
  160 + }
  161 +
  162 + //立即登录
  163 + &.quick-login-container {
  164 + width: 270px;
  165 + font-size: 13px;
  166 + text-align: right;
  167 + white-space: nowrap;
  168 + }
  169 + }
  170 + }
  171 +}
  1 +<?php
  2 +
  3 +use Action\AbstractAction;
  4 +
  5 +class BackController extends AbstractAction
  6 +{
  7 + /**
  8 + * 找回密码
  9 + */
  10 + public function indexAction()
  11 + {
  12 +
  13 + $simpleHeader = array(
  14 + 'logo' => array(
  15 + 'img' => 'http://static.yohobuy.com/newheader/img/logo_e.png',
  16 + 'url' => 'http://www.yohobuy.com'
  17 + ),
  18 + 'tool' => array(
  19 + array(
  20 + 'title' => 'Hi~',
  21 + 'loginUrl' => 'www.yoho.com',
  22 + 'regUrl' => ''
  23 + ),
  24 + array(
  25 + 'title' => 'MY有货',
  26 + 'options' => array(
  27 + array(
  28 + 'textCn' => '我的收藏',
  29 + 'url' => ''
  30 + ),
  31 + array(
  32 + 'textCn' => '优惠券',
  33 + 'url' => ''
  34 + ),
  35 + )
  36 + ),
  37 + array(
  38 + 'title' => '订单中心',
  39 + 'url' => 'http://www.yohobuy.com/home/orders?t=1449801433.5294'
  40 + ),
  41 + array(
  42 + 'title' => '帮助中心',
  43 + 'url' => 'http://www.yohobuy.com/help'
  44 + ),
  45 + array(
  46 + 'title' => '400-9889-9646',
  47 + 'tell' => true
  48 + )
  49 + )
  50 + );
  51 + $data = array(
  52 + 'simpleHeader' => $simpleHeader,
  53 + 'loginPage' => true,
  54 + 'back' => array(
  55 + 'coverHref' => '/passport',
  56 + 'coverImg' => 'http://img12.static.yhbimg.com/yhb-img01/2015/12/01/07/020a0b6e7ff908d0c2bc4045b4fef42b9f.png?imageView/2/w/252/h/190',
  57 + 'countrys' => array()
  58 + )
  59 + );
  60 + $this->_view->display('index', $data);
  61 + }
  62 +}
@@ -8,7 +8,7 @@ class LoginController extends AbstractAction @@ -8,7 +8,7 @@ class LoginController extends AbstractAction
8 * 登录页 8 * 登录页
9 */ 9 */
10 public function indexAction() 10 public function indexAction()
11 - { 11 + {
12 $data = array( 12 $data = array(
13 'loginPage' => true, 13 'loginPage' => true,
14 'passport' => array( 14 'passport' => array(
  1 +<?php
  2 +
  3 +use Action\AbstractAction;
  4 +
  5 +class RegisterController extends AbstractAction
  6 +{
  7 + /**
  8 + * 登录页
  9 + */
  10 + public function indexAction()
  11 + {
  12 + $data = array(
  13 + 'registerPage' => true,
  14 + 'passport' => array(
  15 + 'actionUrl' => '/passport/register/mobileregister',
  16 + 'region' => array(
  17 + array(
  18 + 'id' => 12,
  19 + 'name' => '中国',
  20 + 'selected' => true
  21 + ),
  22 + array(
  23 + 'id' => 13,
  24 + 'name' => '中国澳门',
  25 + 'selected' => false
  26 + ),
  27 + array(
  28 + 'id' => 14,
  29 + 'name' => '中国台湾',
  30 + 'selected' => false
  31 + ),
  32 + array(
  33 + 'id' => 15,
  34 + 'name' => '中国香港',
  35 + 'selected' => false
  36 + ),
  37 + array(
  38 + 'id' => 16,
  39 + 'name' => '马来西亚',
  40 + 'selected' => false
  41 + ),
  42 + ),
  43 + 'location' => '+86',
  44 + 'captchaUrl' => 'http://www.yohobuy.com/passport/images?t=1449799445',
  45 + 'itemUrl' => '##',
  46 + 'refUrl' => 'http://www.yohobuy.com/',
  47 + 'loginUrl' => '/signin.html?refer=http://www.yohobuy.com/',
  48 + 'coverHref' => '/passport',
  49 + 'coverImg' => 'http://img12.static.yhbimg.com/yhb-img01/2015/12/01/07/020a0b6e7ff908d0c2bc4045b4fef42b9f.png?imageView/2/w/252/h/190'
  50 + )
  51 + );
  52 + $this->_view->display('index', $data);
  53 + }
  54 +}