Merge branch 'develop' of http://git.dev.yoho.cn/web/yohobuy into develop
Showing
24 changed files
with
596 additions
and
590 deletions
No preview for this file type
@@ -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 Mon Dec 21 17:16:11 2015 | 5 | +Created by FontForge 20120731 at Wed Jan 13 13:50:02 2016 |
6 | By Ads | 6 | By Ads |
7 | </metadata> | 7 | </metadata> |
8 | <defs> | 8 | <defs> |
@@ -16,10 +16,10 @@ Created by FontForge 20120731 at Mon Dec 21 17:16:11 2015 | @@ -16,10 +16,10 @@ Created by FontForge 20120731 at Mon Dec 21 17:16:11 2015 | ||
16 | ascent="896" | 16 | ascent="896" |
17 | descent="-128" | 17 | descent="-128" |
18 | x-height="792" | 18 | x-height="792" |
19 | - bbox="-0.75 -224 3943 893" | 19 | + bbox="-0.75 -224 3943 896" |
20 | underline-thickness="50" | 20 | underline-thickness="50" |
21 | underline-position="-100" | 21 | underline-position="-100" |
22 | - unicode-range="U+0078-E641" | 22 | + unicode-range="U+0078-E644" |
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" /> |
@@ -268,5 +268,15 @@ d="M522 893q-103 0 -197 -40t-162 -108t-108.5 -162t-40.5 -197.5t40.5 -197.5t108.5 | @@ -268,5 +268,15 @@ d="M522 893q-103 0 -197 -40t-162 -108t-108.5 -162t-40.5 -197.5t40.5 -197.5t108.5 | ||
268 | t92.5 138.5t138.5 92.5t169 34.5t168.5 -34.5t138.5 -92.5t93 -138.5t34.5 -169t-34.5 -168.5t-93 -138.5t-138.5 -93t-169 -34.5zM775 268l-105 61q-11 4 -21 6.5t-18 2.5t-15 -0.5t-13 -4t-10 -5.5t-9 -6l-6 -7q-2 -2 -6 -7l-3 -4l-6 -10q-34 -4 -59 21l-51 50 | 268 | t92.5 138.5t138.5 92.5t169 34.5t168.5 -34.5t138.5 -92.5t93 -138.5t34.5 -169t-34.5 -168.5t-93 -138.5t-138.5 -93t-169 -34.5zM775 268l-105 61q-11 4 -21 6.5t-18 2.5t-15 -0.5t-13 -4t-10 -5.5t-9 -6l-6 -7q-2 -2 -6 -7l-3 -4l-6 -10q-34 -4 -59 21l-51 50 |
269 | q-24 25 -20 60l9 4q3 5 16 16t17 18t4 25t-11 43h-1l-60 105q-8 13 -20.5 20t-26 7t-27.5 -7l-62 -36q-3 -1 -6 -4l-6 -6l-6 -6q-3 -3 -5.5 -6t-4.5 -5t-3 -4l-1 -1q-14 -87 24.5 -183.5t121.5 -174.5q72 -68 157 -101.5t165 -29.5q4 1 10.5 2.5t20.5 10t21 20.5l36 62 | 269 | q-24 25 -20 60l9 4q3 5 16 16t17 18t4 25t-11 43h-1l-60 105q-8 13 -20.5 20t-26 7t-27.5 -7l-62 -36q-3 -1 -6 -4l-6 -6l-6 -6q-3 -3 -5.5 -6t-4.5 -5t-3 -4l-1 -1q-14 -87 24.5 -183.5t121.5 -174.5q72 -68 157 -101.5t165 -29.5q4 1 10.5 2.5t20.5 10t21 20.5l36 62 |
270 | q11 20 5.5 41.5t-25.5 32.5z" /> | 270 | q11 20 5.5 41.5t-25.5 32.5z" /> |
271 | + <glyph glyph-name="uniE642" unicode="" | ||
272 | +d="M439 324h110l-54 148zM501 881q-101 0 -192.5 -39.5t-158 -105.5t-105.5 -158t-39 -193q0 -205 145 -350t350 -145q101 0 192.5 39t158 105.5t105.5 158.5t39 192.5t-39 192.5t-105.5 158t-158 105.5t-192.5 39.5zM656 180l-19 -9q-2 -1 -4 -1.5t-3.5 -1t-3.5 -0.5 | ||
273 | +q-5 0 -9 2q-5 2 -8.5 5.5t-5.5 8.5l-27 69h-163l-25 -69q-4 -10 -14.5 -14t-19.5 1l-20 9q-9 4 -12.5 13t-0.5 18l151 401q6 16 23 16t23 -16l151 -401q3 -9 -0.5 -18t-12.5 -13z" /> | ||
274 | + <glyph glyph-name="uniE643" unicode="" horiz-adv-x="1124" | ||
275 | +d="M859 896h-595q-109 0 -186.5 -77.5t-77.5 -186.5v-760l200 135q18 14 49.5 24t63.5 14.5t71.5 6.5t66 2t57 -1t34.5 -1h317q109 0 186.5 77.5t77.5 186.5v316q0 109 -77.5 186.5t-186.5 77.5zM477 367q-42 0 -71.5 29.5t-29.5 70.5t29.5 70t71.5 29t71.5 -29t29.5 -70 | ||
276 | +q0 -14 -3.5 -27t-10 -23.5t-16 -20t-20.5 -15.5t-24 -10t-27 -4zM848 367q-42 0 -71.5 29.5t-29.5 70.5t29.5 70t71.5 29t71.5 -29t29.5 -70t-29.5 -70.5t-71.5 -29.5z" /> | ||
277 | + <glyph glyph-name="uniE644" unicode="" | ||
278 | +d="M523 881q-101 0 -192.5 -39.5t-158 -105.5t-105.5 -158t-39 -193q0 -205 145 -350t350 -145q67 0 131.5 18t119 49.5t100 77.5t77.5 100.5t49.5 118.5t17.5 131q0 101 -39 193t-105.5 158t-158 105.5t-192.5 39.5zM739 224q8 -8 7 -19q0 -2 -0.5 -4.5t-1.5 -5t-2.5 -4.5 | ||
279 | +t-3.5 -3q-11 -10 -15 -14q-7 -7 -17 -7t-18 7l-34 34q-59 -42 -131 -42q-94 0 -160.5 66.5t-66.5 160.5q0 46 18 88t48.5 72.5t72.5 48.5t88 18t88 -18t72.5 -48.5t48.5 -72.5t18 -88q0 -75 -45 -135zM592 337q8 7 18 6.5t17 -7.5l27 -27q25 39 25 84q0 64 -45.5 109.5 | ||
280 | +t-110 45.5t-110 -45.5t-45.5 -109.5t45.5 -109.5t109.5 -45.5q44 0 80 21l-27 28q-8 7 -7.5 18t7.5 18z" /> | ||
271 | </font> | 281 | </font> |
272 | </defs></svg> | 282 | </defs></svg> |
No preview for this file type
No preview for this file type
1 | #thumb-row { | 1 | #thumb-row { |
2 | - @include flexbox(( | ||
3 | - display: box, | ||
4 | - box-pack: justify | ||
5 | - ), $version: 1); | ||
6 | - @include flexbox(( | ||
7 | - display: flex, | ||
8 | - justify-content: space-around | ||
9 | - ), $version: 3); | 2 | + // @include flexbox(( |
3 | + // display: box, | ||
4 | + // box-pack: justify | ||
5 | + // ), $version: 1); | ||
6 | + // @include flexbox(( | ||
7 | + // display: flex, | ||
8 | + // justify-content: space-around | ||
9 | + // ), $version: 3); | ||
10 | background-color: #f0f0f0; | 10 | background-color: #f0f0f0; |
11 | text-align: center; | 11 | text-align: center; |
12 | - padding: 32rem/$pxConvertRem 14rem/$pxConvertRem 0; | ||
13 | - | 12 | + padding: 32rem/$pxConvertRem 0 0; |
14 | .thumb-row-box { | 13 | .thumb-row-box { |
15 | display: inline-block; | 14 | display: inline-block; |
16 | width: 275rem/$pxConvertRem; | 15 | width: 275rem/$pxConvertRem; |
@@ -19,5 +18,6 @@ | @@ -19,5 +18,6 @@ | ||
19 | background-size: 100%; | 18 | background-size: 100%; |
20 | background-repeat: no-repeat; | 19 | background-repeat: no-repeat; |
21 | background-position: center; | 20 | background-position: center; |
21 | + margin: 0 14.4rem/$pxConvertRem; | ||
22 | } | 22 | } |
23 | } | 23 | } |
@@ -47,7 +47,7 @@ | @@ -47,7 +47,7 @@ | ||
47 | right: 0; | 47 | right: 0; |
48 | top: 0; | 48 | top: 0; |
49 | margin-right: pxToRem(30px); | 49 | margin-right: pxToRem(30px); |
50 | - font-size: pxToRem(28px); | 50 | + font-size: pxToRem(34px); |
51 | font-weight: bold; | 51 | font-weight: bold; |
52 | line-height: pxToRem(100px); | 52 | line-height: pxToRem(100px); |
53 | } | 53 | } |
@@ -5,21 +5,19 @@ | @@ -5,21 +5,19 @@ | ||
5 | } | 5 | } |
6 | .coin-num { | 6 | .coin-num { |
7 | color: #d0021b; | 7 | color: #d0021b; |
8 | - font-size: pxToRem(66px); | 8 | + font-size: pxToRem(80px); |
9 | font-weight: bold; | 9 | font-weight: bold; |
10 | - line-height: pxToRem(106px); | 10 | + line-height: pxToRem(88px); |
11 | // letter-spacing: pxToRem(8px); | 11 | // letter-spacing: pxToRem(8px); |
12 | } | 12 | } |
13 | 13 | ||
14 | .info { | 14 | .info { |
15 | + width: auto; | ||
15 | color: #b0b0b0; | 16 | color: #b0b0b0; |
16 | font-size: pxToRem(24px); | 17 | font-size: pxToRem(24px); |
17 | - line-height: 1; | ||
18 | - | 18 | + line-height: 1rem; |
19 | .dollar { | 19 | .dollar { |
20 | display: inline-block; | 20 | display: inline-block; |
21 | - // margin-right: pxToRem(6px); | ||
22 | - vertical-align: middle; | ||
23 | width: pxToRem(24px); | 21 | width: pxToRem(24px); |
24 | height: pxToRem(24px); | 22 | height: pxToRem(24px); |
25 | background: image-url("me/yoho-coin/dollar.png") center center; | 23 | background: image-url("me/yoho-coin/dollar.png") center center; |
@@ -29,15 +27,15 @@ | @@ -29,15 +27,15 @@ | ||
29 | 27 | ||
30 | .more { | 28 | .more { |
31 | display: inline-block; | 29 | display: inline-block; |
32 | - margin: pxToRem(30px) 0; | 30 | + margin: pxToRem(20px) 0 pxToRem(30px); |
33 | color: #444; | 31 | color: #444; |
34 | - font-size: pxToRem(24px); | ||
35 | - line-height: pxToRem(40px); | ||
36 | - width: pxToRem(152px); | ||
37 | - height: pxToRem(36px); | 32 | + font-size: pxToRem(28px); |
33 | + line-height: pxToRem(44px); | ||
34 | + width: pxToRem(168px); | ||
35 | + height: pxToRem(42px); | ||
38 | text-align: center; | 36 | text-align: center; |
39 | border: 1px solid #444; | 37 | border: 1px solid #444; |
40 | - border-radius: pxToRem(36px); | 38 | + border-radius: pxToRem(22px); |
41 | } | 39 | } |
42 | 40 | ||
43 | .coin-tip { | 41 | .coin-tip { |
@@ -45,7 +43,7 @@ | @@ -45,7 +43,7 @@ | ||
45 | padding: pxToRem(20px) pxToRem(30px); | 43 | padding: pxToRem(20px) pxToRem(30px); |
46 | font-size: pxToRem(24px); | 44 | font-size: pxToRem(24px); |
47 | line-height: pxToRem(32px); | 45 | line-height: pxToRem(32px); |
48 | - color: #dc6870; | 46 | + color: #d0021b; |
49 | border-top: 1px solid #e0e0e0; | 47 | border-top: 1px solid #e0e0e0; |
50 | border-bottom: 1px solid #e0e0e0; | 48 | border-bottom: 1px solid #e0e0e0; |
51 | 49 | ||
@@ -54,7 +52,7 @@ | @@ -54,7 +52,7 @@ | ||
54 | width: pxToRem(32px); | 52 | width: pxToRem(32px); |
55 | height: pxToRem(32px); | 53 | height: pxToRem(32px); |
56 | font-weight: bold; | 54 | font-weight: bold; |
57 | - border: 2px solid #dc6870; | 55 | + border: 2px solid #d0021b; |
58 | border-radius: 50%; | 56 | border-radius: 50%; |
59 | } | 57 | } |
60 | } | 58 | } |
@@ -97,7 +97,7 @@ | @@ -97,7 +97,7 @@ | ||
97 | span { | 97 | span { |
98 | display: block; | 98 | display: block; |
99 | float: left; | 99 | float: left; |
100 | - font-size: inherit; | 100 | + // font-size: inherit; |
101 | padding-right: pxToRem(15px); | 101 | padding-right: pxToRem(15px); |
102 | } | 102 | } |
103 | p { | 103 | p { |
@@ -118,7 +118,7 @@ | @@ -118,7 +118,7 @@ | ||
118 | span { | 118 | span { |
119 | display: block; | 119 | display: block; |
120 | float: left; | 120 | float: left; |
121 | - font-size: inherit; | 121 | + // font-size: inherit; |
122 | color: $mainFontC; | 122 | color: $mainFontC; |
123 | padding-right: pxToRem(15px); | 123 | padding-right: pxToRem(15px); |
124 | } | 124 | } |
1 | {{> layout/header}} | 1 | {{> layout/header}} |
2 | <div class="goods-consults-page yoho-page"> | 2 | <div class="goods-consults-page yoho-page"> |
3 | <div class="goto-consult tap-hightlight" id="goto-consult" data-href="{{link}}"> | 3 | <div class="goto-consult tap-hightlight" id="goto-consult" data-href="{{link}}"> |
4 | - <i class="iconfont consult-logo"></i> | 4 | + <i class="iconfont consult-logo"></i> |
5 | <span>我要咨询</span> | 5 | <span>我要咨询</span> |
6 | <a href="{{link}}" class="iconfont enter-consult-page"></a> | 6 | <a href="{{link}}" class="iconfont enter-consult-page"></a> |
7 | </div> | 7 | </div> |
@@ -10,7 +10,7 @@ | @@ -10,7 +10,7 @@ | ||
10 | {{#list}} | 10 | {{#list}} |
11 | <div class="consult-item" data-id="{{id}}"> | 11 | <div class="consult-item" data-id="{{id}}"> |
12 | <div class="question"> | 12 | <div class="question"> |
13 | - <span class="iconfont"></span> | 13 | + <span class="iconfont"></span> |
14 | <p> | 14 | <p> |
15 | {{question}}<br> | 15 | {{question}}<br> |
16 | <span class="time">{{time}}</span> | 16 | <span class="time">{{time}}</span> |
@@ -18,7 +18,7 @@ | @@ -18,7 +18,7 @@ | ||
18 | </div> | 18 | </div> |
19 | 19 | ||
20 | <div class="answer"> | 20 | <div class="answer"> |
21 | - <span class="iconfont"></span> | 21 | + <span class="iconfont"></span> |
22 | <p>{{answer}}</p> | 22 | <p>{{answer}}</p> |
23 | </div> | 23 | </div> |
24 | 24 | ||
@@ -58,14 +58,14 @@ | @@ -58,14 +58,14 @@ | ||
58 | {{#commonConsults}} | 58 | {{#commonConsults}} |
59 | <div class="faq-item"> | 59 | <div class="faq-item"> |
60 | <div class="question"> | 60 | <div class="question"> |
61 | - <span class="iconfont"></span> | 61 | + <span class="iconfont"></span> |
62 | <p> | 62 | <p> |
63 | {{question}} | 63 | {{question}} |
64 | </p> | 64 | </p> |
65 | </div> | 65 | </div> |
66 | 66 | ||
67 | <div class="answer"> | 67 | <div class="answer"> |
68 | - <span class="iconfont"></span> | 68 | + <span class="iconfont"></span> |
69 | <p>{{answer}}</p> | 69 | <p>{{answer}}</p> |
70 | </div> | 70 | </div> |
71 | </div> | 71 | </div> |
@@ -11,7 +11,7 @@ | @@ -11,7 +11,7 @@ | ||
11 | </span> | 11 | </span> |
12 | <ul id="country-code-list" class="country-code-list"> | 12 | <ul id="country-code-list" class="country-code-list"> |
13 | {{# countryList}} | 13 | {{# countryList}} |
14 | - <li data-cc="+{{code}}">{{name}} +{{code}}</li> | 14 | + <li data-cc="{{areaCode}}">{{name}} {{areaCode}}</li> |
15 | {{/ countryList}} | 15 | {{/ countryList}} |
16 | </ul> | 16 | </ul> |
17 | </div> | 17 | </div> |
@@ -28,7 +28,7 @@ | @@ -28,7 +28,7 @@ | ||
28 | </li> | 28 | </li> |
29 | <li class="input-container-li clearfix"> | 29 | <li class="input-container-li clearfix"> |
30 | <input id="captcha" class="input va captcha" type="text" name="captcha" placeholder="验证码" autocomplete="off" maxlength="4"> | 30 | <input id="captcha" class="input va captcha" type="text" name="captcha" placeholder="验证码" autocomplete="off" maxlength="4"> |
31 | - <img id="captcha-img" class="captcha-img" src="http://web.dev.yohobuy.com/passport/images" alt=""> | 31 | + <img id="captcha-img" class="captcha-img" src="{{captchaUrl}}" alt=""> |
32 | <a id="change-captcha" class="link change-captcha">换一张</a> | 32 | <a id="change-captcha" class="link change-captcha">换一张</a> |
33 | <span id="captcha-err" class="err-tip captcha-err hide"> | 33 | <span id="captcha-err" class="err-tip captcha-err hide"> |
34 | <i></i> | 34 | <i></i> |
@@ -9,7 +9,7 @@ | @@ -9,7 +9,7 @@ | ||
9 | <li class="po-re"> | 9 | <li class="po-re"> |
10 | <label class="pn-label">手机号码</label> | 10 | <label class="pn-label">手机号码</label> |
11 | <span class="country-code">+{{area}}</span> | 11 | <span class="country-code">+{{area}}</span> |
12 | - <span class="phone-num">{{phoneNum}}</span> | 12 | + <span class="phone-num">{{mobile}}</span> |
13 | </li> | 13 | </li> |
14 | <li class="po-re"> | 14 | <li class="po-re"> |
15 | <input id="captcha" class="input va captcha" type="text" name="captcha"> | 15 | <input id="captcha" class="input va captcha" type="text" name="captcha"> |
@@ -22,8 +22,8 @@ | @@ -22,8 +22,8 @@ | ||
22 | </li> | 22 | </li> |
23 | <li> | 23 | <li> |
24 | <input name="area" id="area" type="hidden" value="{{area}}"> | 24 | <input name="area" id="area" type="hidden" value="{{area}}"> |
25 | - <input name="mobile" id="mobile" type="hidden" value="{{phoneNum}}"> | ||
26 | - <input name="captchaPic" id="captchaPic" type="hidden" value="{{captcha}}"> | 25 | + <input name="mobile" id="mobile" type="hidden" value="{{mobile}}"> |
26 | + <input name="captchaPic" id="captchaPic" type="hidden" value="{{verifyCode}}"> | ||
27 | <input name="refer" id="refer" type="hidden" value=""> | 27 | <input name="refer" id="refer" type="hidden" value=""> |
28 | <input id="next-step" class="btn next-step disable" type="submit" value="下一步" disabled=""> | 28 | <input id="next-step" class="btn next-step disable" type="submit" value="下一步" disabled=""> |
29 | </li> | 29 | </li> |
@@ -1483,305 +1483,309 @@ require("js/product/sort-pager"); | @@ -1483,305 +1483,309 @@ require("js/product/sort-pager"); | ||
1483 | require("js/product/product"); | 1483 | require("js/product/product"); |
1484 | }); | 1484 | }); |
1485 | define("js/product/filter", ["jquery"], function(require, exports, module){ | 1485 | define("js/product/filter", ["jquery"], function(require, exports, module){ |
1486 | -/** | ||
1487 | - * 商品筛选逻辑 | ||
1488 | - * @author: xuqi<qi.xu@yoho.cn> | ||
1489 | - * @date: 2015/12/4 | ||
1490 | - */ | ||
1491 | - | ||
1492 | -var $ = require("jquery"); | ||
1493 | - | ||
1494 | -var checkUnicode = { | ||
1495 | - unchecked: '', | ||
1496 | - checked: '' | ||
1497 | -}, | ||
1498 | -moreUnicode = { | ||
1499 | - up: '', | ||
1500 | - down: '' | ||
1501 | -}; | ||
1502 | - | ||
1503 | -//品牌相关变量 | ||
1504 | -var $brandDefault = $('.brand .default'), | ||
1505 | - $brandPanel = $('.brand .brand-panel'), | ||
1506 | - $brandAttrs = $('.brand .attr'), | ||
1507 | - $brandMore = $('#brand-more'), | ||
1508 | - $brandMulti = $('#brand-multi'); | ||
1509 | - | ||
1510 | -var $brandMoreTxt, $brandMoreIcon; | ||
1511 | - | ||
1512 | -//价格相关变量 | ||
1513 | -var $udPrice = $('.ud-price-range'), | ||
1514 | - interReg = /^\d+$/, | ||
1515 | - $limit, $min, $max, $btn; | ||
1516 | - | ||
1517 | -//分类相关变量 | ||
1518 | -var $sortSub = $('.sort-sub-wrap'); | ||
1519 | - | ||
1520 | -//高级选项相关变量 | ||
1521 | -var $seniorSubWrap = $('.senior-sub-wrap'), | ||
1522 | - $seniorAttrWrap = $('.senior-attr-wrap'); | ||
1523 | - | ||
1524 | -var seniorHoverTime, hoveredIndex; | ||
1525 | - | ||
1526 | -//清除checkbox选中状态 | ||
1527 | -function clearChecked($checkbox) { | ||
1528 | - $checkbox.removeClass('checked').html(checkUnicode.unchecked); | ||
1529 | -} | ||
1530 | - | ||
1531 | -//显示更多品牌面板 | ||
1532 | -function brandShowMore() { | ||
1533 | - $brandDefault.addClass('hide'); | ||
1534 | - $brandPanel.removeClass('hide'); | ||
1535 | -} | ||
1536 | - | ||
1537 | -//隐藏更多品牌面板 | ||
1538 | -function brandHideMore() { | ||
1539 | - $brandPanel.addClass('hide'); | ||
1540 | - $brandDefault.removeClass('hide'); | ||
1541 | -} | ||
1542 | - | ||
1543 | -//url构造&跳转 | ||
1544 | -function uriLoc(attr, val) { | ||
1545 | - var href = decodeURIComponent(window.location.search), | ||
1546 | - query = attr + '=' + val, | ||
1547 | - newHref; | ||
1548 | - | ||
1549 | - if (href === '') { | ||
1550 | - newHref = '?' + query; | ||
1551 | - } else { | ||
1552 | - newHref = href + '&' + query; | ||
1553 | - } | ||
1554 | - | ||
1555 | - window.location.href = newHref; | ||
1556 | -} | ||
1557 | - | ||
1558 | -//隐藏高级选项面板 | ||
1559 | -function hideSeniorPanel(index) { | ||
1560 | - $seniorSubWrap.children('.senior-sub:eq(' + hoveredIndex + ')').addClass('hide'); | ||
1561 | - $seniorAttrWrap.children('.attr:eq(' + hoveredIndex + ')').removeClass('hover'); | ||
1562 | - hoveredIndex = -1; | ||
1563 | -} | ||
1564 | - | ||
1565 | -//屏蔽筛选项双击文字选中 | ||
1566 | -$('.filter-box').on('selectstart', '.attr, .brands-index span', function() { | ||
1567 | - return false; | ||
1568 | -}); | ||
1569 | - | ||
1570 | -//【分类】 | ||
1571 | -$('.sort-pre').on('click', 'li', function() { | ||
1572 | - var $this = $(this), | ||
1573 | - index = $this.index(); | ||
1574 | - | ||
1575 | - $this.siblings('.active').removeClass('active'); | ||
1576 | - $this.addClass('active'); | ||
1577 | - | ||
1578 | - $sortSub.children(':not(.hide)').addClass('hide'); | ||
1579 | - $sortSub.children(':eq(' + index + ')').removeClass('hide'); | ||
1580 | -}); | ||
1581 | - | ||
1582 | -//【品牌】 | ||
1583 | -if ($brandMore.length > 0) { | ||
1584 | - $brandMoreTxt = $brandMore.children('em'); | ||
1585 | - $brandMoreIcon = $brandMore.children('.iconfont'); | ||
1586 | -} | ||
1587 | - | ||
1588 | -//【品牌】多选 | ||
1589 | -$brandMulti.click(function() { | ||
1590 | - if ($brandPanel.css('display') === 'none') { | ||
1591 | - | ||
1592 | - //显示品牌面板 | ||
1593 | - brandShowMore(); | ||
1594 | - } | ||
1595 | - | ||
1596 | - $brandPanel.addClass('multi'); //显示出checkbox | ||
1597 | - $(this).addClass('hide'); | ||
1598 | -}); | ||
1599 | - | ||
1600 | -//【品牌】更多 | ||
1601 | -$brandMore.click(function() { | ||
1602 | - var $this = $(this); | ||
1603 | - | ||
1604 | - if ($this.hasClass('more')) { | ||
1605 | - brandHideMore(); | ||
1606 | - | ||
1607 | - $brandMoreTxt.text('更多'); | ||
1608 | - $brandMoreIcon.html(moreUnicode.down); | ||
1609 | - } else { | ||
1610 | - brandShowMore(); | ||
1611 | - | ||
1612 | - $brandMoreTxt.text('收起'); | ||
1613 | - $brandMoreIcon.html(moreUnicode.up); | ||
1614 | - } | ||
1615 | - | ||
1616 | - $(this).toggleClass('more'); | ||
1617 | -}); | ||
1618 | - | ||
1619 | -//【品牌】索引 | ||
1620 | -$('.brands-index').on('click', 'span', function() { | ||
1621 | - var $this = $(this), | ||
1622 | - index = $this.data('index'); | ||
1623 | - | ||
1624 | - if ($this.index() === 0) { | ||
1625 | - | ||
1626 | - //全部 | ||
1627 | - $brandAttrs.removeClass('hide'); | ||
1628 | - } else { | ||
1629 | - $brandAttrs.addClass('hide').filter('[data-index=' + index + ']').removeClass('hide'); | ||
1630 | - } | ||
1631 | -}); | ||
1632 | - | ||
1633 | -//【品牌】搜索 | ||
1634 | -$('#brand-search-input').keyup(function() { | ||
1635 | - var val = $(this).val().toLowerCase(); | ||
1636 | - | ||
1637 | - if (val === '') { | ||
1638 | - $brandAttrs.removeClass('hide'); | ||
1639 | - } else { | ||
1640 | - $brandAttrs.addClass('hide').filter('[data-key*=' + val + ']').removeClass('hide'); | ||
1641 | - } | ||
1642 | -}); | ||
1643 | - | ||
1644 | -//【品牌】多选确定 | ||
1645 | -$('#brand-multi-ok').click(function() { | ||
1646 | - var val = ''; | ||
1647 | - | ||
1648 | - if ($(this).hasClass('dis')) { | ||
1649 | - return; | ||
1650 | - } | ||
1651 | - | ||
1652 | - $brandPanel.find('.checked').each(function() { | ||
1653 | - var id = $(this).data('id'); | ||
1654 | - | ||
1655 | - val += (val === '') ? id : (',' + id); | ||
1656 | - }); | ||
1657 | - | ||
1658 | - uriLoc('brand', val); | ||
1659 | -}); | ||
1660 | - | ||
1661 | -//【品牌/高级选项】多选取消 | ||
1662 | -$('.multi-select-cancel').click(function() { | ||
1663 | - var $panel = $(this).closest('.multi'); | ||
1664 | - | ||
1665 | - if ($panel.hasClass('brand-panel')) { | ||
1666 | - brandHideMore(); | ||
1667 | - | ||
1668 | - $brandMulti.removeClass('hide'); //显示多选按钮 | ||
1669 | - } | ||
1670 | - | ||
1671 | - $panel.removeClass('multi'); | ||
1672 | - clearChecked($panel.find('.checkbox.checked')); //清除选中状态 | ||
1673 | -}); | ||
1674 | - | ||
1675 | -//【品牌/高级选项】checkbox | ||
1676 | -$('.check-container').on('click', '.attr', function() { | ||
1677 | - var $this = $(this), | ||
1678 | - $check = $this.find('.checkbox'), | ||
1679 | - $btnOk = $this.parent('.check-container').next('.btns').find('.multi-select-ok'); | ||
1680 | - | ||
1681 | - $check.toggleClass('checked'); | ||
1682 | - | ||
1683 | - if ($check.hasClass('checked')) { | ||
1684 | - $check.html(checkUnicode.checked); | ||
1685 | - } else { | ||
1686 | - $check.html(checkUnicode.unchecked); | ||
1687 | - } | ||
1688 | - | ||
1689 | - //更新按钮状态 | ||
1690 | - if ($check.hasClass('checked') || | ||
1691 | - $this.siblings('.attr').find('.checked').length > 0) { | ||
1692 | - $btnOk.removeClass('dis'); | ||
1693 | - } else { | ||
1694 | - $btnOk.addClass('dis'); | ||
1695 | - } | ||
1696 | -}); | ||
1697 | - | ||
1698 | -//【品牌/高级选项】当多选时阻止链接默认跳转 | ||
1699 | -$('.brand, .senior').on('click', '.attr > a', function(e) { | ||
1700 | - if ($(this).closest('.multi').length > 0) { | ||
1701 | - e.preventDefault(); | ||
1702 | - } | ||
1703 | -}); | ||
1704 | - | ||
1705 | -//【价格】用户定义价格处理 | ||
1706 | -if ($udPrice.length > 0) { | ||
1707 | - $limit = $udPrice.find('.limit'); | ||
1708 | - $min = $limit.filter('.min'); | ||
1709 | - $max = $limit.filter('.max'); | ||
1710 | - $btn = $udPrice.find('.price-sure'); | ||
1711 | - | ||
1712 | - //【价格】输入 | ||
1713 | - $limit.keyup(function() { | ||
1714 | - var min = $.trim($min.val()), | ||
1715 | - max = $.trim($max.val()), | ||
1716 | - isMinInt = interReg.test(min), | ||
1717 | - isMaxInt = interReg.test(max); | ||
1718 | - | ||
1719 | - if (isMaxInt && (min === '' || isMinInt) || | ||
1720 | - isMinInt && (max === '' || isMaxInt) | ||
1721 | - ) { | ||
1722 | - $btn.removeClass('hide'); | ||
1723 | - } else { | ||
1724 | - $btn.addClass('hide'); | ||
1725 | - } | ||
1726 | - }); | ||
1727 | - | ||
1728 | - //【价格】多项查询 | ||
1729 | - $btn.click(function() { | ||
1730 | - var min = $.trim($min.val()), | ||
1731 | - max = $.trim($max.val()), | ||
1732 | - tmp; | ||
1733 | - | ||
1734 | - //对于min大于max的情况,交换位置 | ||
1735 | - if (min !== '' && max !== '' && +min > +max) { | ||
1736 | - tmp = max; | ||
1737 | - max = min; | ||
1738 | - min = tmp; | ||
1739 | - } | ||
1740 | - | ||
1741 | - uriLoc('price', min + ',' + max); | ||
1742 | - }); | ||
1743 | -} | ||
1744 | - | ||
1745 | -//【高级选项】鼠标移入显示子项 | ||
1746 | -$seniorAttrWrap.on('mouseenter', '.attr', function() { | ||
1747 | - var index = $(this).addClass('hover').index(); | ||
1748 | - | ||
1749 | - $seniorSubWrap.children('.senior-sub:eq(' + index + ')').removeClass('hide'); | ||
1750 | -}).on('mouseleave', '.attr', function() { | ||
1751 | - var $this = $(this), | ||
1752 | - index = $this.index(); | ||
1753 | - | ||
1754 | - hoveredIndex = index; | ||
1755 | - | ||
1756 | - seniorHoverTime = setTimeout(function() { | ||
1757 | - hideSeniorPanel(); | ||
1758 | - }, 100); | ||
1759 | -}); | ||
1760 | - | ||
1761 | -//【高级选项】多选 | ||
1762 | -$('.senior-sub').on('click', '.multi-select', function() { | ||
1763 | - $(this).closest('.senior-sub').addClass('multi'); | ||
1764 | -}).on('click', '.multi-select-ok', function() { | ||
1765 | - var $btn = $(this), | ||
1766 | - $sub = $btn.closest('.senior-sub'), | ||
1767 | - val = ''; | ||
1768 | - | ||
1769 | - if ($btn.hasClass('dis')) { | ||
1770 | - return; | ||
1771 | - } | ||
1772 | - | ||
1773 | - $sub.find('.checked').each(function() { | ||
1774 | - var id = $(this).data('id'); | ||
1775 | - | ||
1776 | - val += (val === '') ? id : (',' + id); | ||
1777 | - }); | ||
1778 | - | ||
1779 | - uriLoc($sub.data('attr'), val); | ||
1780 | -}).on('mouseenter', function() { | ||
1781 | - clearTimeout(seniorHoverTime); | ||
1782 | -}).on('mouseleave', function() { | ||
1783 | - hideSeniorPanel(); | 1486 | +/** |
1487 | + * 商品筛选逻辑 | ||
1488 | + * @author: xuqi<qi.xu@yoho.cn> | ||
1489 | + * @date: 2015/12/4 | ||
1490 | + */ | ||
1491 | + | ||
1492 | +var $ = require("jquery"); | ||
1493 | + | ||
1494 | +var checkUnicode = { | ||
1495 | + unchecked: '', | ||
1496 | + checked: '' | ||
1497 | +}, | ||
1498 | +moreUnicode = { | ||
1499 | + up: '', | ||
1500 | + down: '' | ||
1501 | +}; | ||
1502 | + | ||
1503 | +//品牌相关变量 | ||
1504 | +var $brandDefault = $('.brand .default'), | ||
1505 | + $brandPanel = $('.brand .brand-panel'), | ||
1506 | + $brandAttrs = $('.brand .attr'), | ||
1507 | + $brandMore = $('#brand-more'), | ||
1508 | + $brandMulti = $('#brand-multi'); | ||
1509 | + | ||
1510 | +var $brandMoreTxt, $brandMoreIcon; | ||
1511 | + | ||
1512 | +//价格相关变量 | ||
1513 | +var $udPrice = $('.ud-price-range'), | ||
1514 | + interReg = /^\d+$/, | ||
1515 | + $limit, $min, $max, $btn; | ||
1516 | + | ||
1517 | +//分类相关变量 | ||
1518 | +var $sortSub = $('.sort-sub-wrap'); | ||
1519 | + | ||
1520 | +//高级选项相关变量 | ||
1521 | +var $seniorSubWrap = $('.senior-sub-wrap'), | ||
1522 | + $seniorAttrWrap = $('.senior-attr-wrap'); | ||
1523 | + | ||
1524 | +var seniorHoverTime, hoveredIndex; | ||
1525 | + | ||
1526 | +//清除checkbox选中状态 | ||
1527 | +function clearChecked($checkbox) { | ||
1528 | + $checkbox.removeClass('checked').html(checkUnicode.unchecked); | ||
1529 | +} | ||
1530 | + | ||
1531 | +//显示更多品牌面板 | ||
1532 | +function brandShowMore() { | ||
1533 | + $brandDefault.addClass('hide'); | ||
1534 | + $brandPanel.removeClass('hide'); | ||
1535 | +} | ||
1536 | + | ||
1537 | +//隐藏更多品牌面板 | ||
1538 | +function brandHideMore() { | ||
1539 | + $brandPanel.addClass('hide'); | ||
1540 | + $brandDefault.removeClass('hide'); | ||
1541 | +} | ||
1542 | + | ||
1543 | +//url构造&跳转 | ||
1544 | +function uriLoc(attr, val) { | ||
1545 | + var href = decodeURIComponent(window.location.search), | ||
1546 | + query = attr + '=' + val, | ||
1547 | + newHref; | ||
1548 | + | ||
1549 | + if (href === '') { | ||
1550 | + newHref = '?' + query; | ||
1551 | + } else { | ||
1552 | + newHref = href + '&' + query; | ||
1553 | + } | ||
1554 | + | ||
1555 | + window.location.href = newHref; | ||
1556 | +} | ||
1557 | + | ||
1558 | +//隐藏高级选项面板 | ||
1559 | +function hideSeniorPanel(index) { | ||
1560 | + $seniorSubWrap.children('.senior-sub:eq(' + hoveredIndex + ')').addClass('hide'); | ||
1561 | + $seniorAttrWrap.children('.attr:eq(' + hoveredIndex + ')').removeClass('hover'); | ||
1562 | + hoveredIndex = -1; | ||
1563 | +} | ||
1564 | + | ||
1565 | +//屏蔽筛选项双击文字选中 | ||
1566 | +$('.filter-box').on('selectstart', '.attr, .brands-index span', function() { | ||
1567 | + return false; | ||
1568 | +}); | ||
1569 | + | ||
1570 | +//【分类】 | ||
1571 | +$('.sort-pre').on('click', 'li', function() { | ||
1572 | + var $this = $(this), | ||
1573 | + index = $this.index(); | ||
1574 | + | ||
1575 | + $this.siblings('.active').removeClass('active'); | ||
1576 | + $this.addClass('active'); | ||
1577 | + | ||
1578 | + $sortSub.children(':not(.hide)').addClass('hide'); | ||
1579 | + $sortSub.children(':eq(' + index + ')').removeClass('hide'); | ||
1580 | +}); | ||
1581 | + | ||
1582 | +//【品牌】 | ||
1583 | +if ($brandMore.length > 0) { | ||
1584 | + $brandMoreTxt = $brandMore.children('em'); | ||
1585 | + $brandMoreIcon = $brandMore.children('.iconfont'); | ||
1586 | +} | ||
1587 | + | ||
1588 | +//【品牌】多选 | ||
1589 | +$brandMulti.click(function() { | ||
1590 | + if ($brandPanel.css('display') === 'none') { | ||
1591 | + | ||
1592 | + //显示品牌面板 | ||
1593 | + brandShowMore(); | ||
1594 | + } | ||
1595 | + | ||
1596 | + $brandPanel.addClass('multi'); //显示出checkbox | ||
1597 | + $(this).addClass('hide'); | ||
1598 | +}); | ||
1599 | + | ||
1600 | +//【品牌】更多 | ||
1601 | +$brandMore.click(function() { | ||
1602 | + var $this = $(this); | ||
1603 | + | ||
1604 | + if ($this.hasClass('more')) { | ||
1605 | + brandHideMore(); | ||
1606 | + | ||
1607 | + $brandMoreTxt.text('更多'); | ||
1608 | + $brandMoreIcon.html(moreUnicode.down); | ||
1609 | + } else { | ||
1610 | + brandShowMore(); | ||
1611 | + | ||
1612 | + $brandMoreTxt.text('收起'); | ||
1613 | + $brandMoreIcon.html(moreUnicode.up); | ||
1614 | + } | ||
1615 | + | ||
1616 | + $(this).toggleClass('more'); | ||
1617 | +}); | ||
1618 | + | ||
1619 | +//【品牌】索引 | ||
1620 | +$('.brands-index').on('click', 'span', function() { | ||
1621 | + var $this = $(this), | ||
1622 | + index = $this.data('index'); | ||
1623 | + | ||
1624 | + if ($this.index() === 0) { | ||
1625 | + | ||
1626 | + //全部 | ||
1627 | + $brandAttrs.removeClass('hide'); | ||
1628 | + } else { | ||
1629 | + $brandAttrs.addClass('hide').filter('[data-index=' + index + ']').removeClass('hide'); | ||
1630 | + } | ||
1784 | }); | 1631 | }); |
1632 | + | ||
1633 | +//【品牌】搜索 | ||
1634 | +$('#brand-search-input').keyup(function() { | ||
1635 | + var val = $(this).val().toLowerCase(); | ||
1636 | + | ||
1637 | + if (val === '') { | ||
1638 | + $brandAttrs.removeClass('hide'); | ||
1639 | + } else { | ||
1640 | + $brandAttrs.addClass('hide').filter('[data-key*=' + val + ']').removeClass('hide'); | ||
1641 | + } | ||
1642 | +}); | ||
1643 | + | ||
1644 | +//【品牌】多选确定 | ||
1645 | +$('#brand-multi-ok').click(function() { | ||
1646 | + var val = ''; | ||
1647 | + | ||
1648 | + if ($(this).hasClass('dis')) { | ||
1649 | + return; | ||
1650 | + } | ||
1651 | + | ||
1652 | + $brandPanel.find('.checked').each(function() { | ||
1653 | + var id = $(this).data('id'); | ||
1654 | + | ||
1655 | + val += (val === '') ? id : (',' + id); | ||
1656 | + }); | ||
1657 | + | ||
1658 | + uriLoc('brand', val); | ||
1659 | +}); | ||
1660 | + | ||
1661 | +//【品牌/高级选项】多选取消 | ||
1662 | +$('.multi-select-cancel').click(function() { | ||
1663 | + var $panel = $(this).closest('.multi'); | ||
1664 | + | ||
1665 | + if ($panel.hasClass('brand-panel')) { | ||
1666 | + brandHideMore(); | ||
1667 | + | ||
1668 | + $brandMulti.removeClass('hide'); //显示多选按钮 | ||
1669 | + } | ||
1670 | + | ||
1671 | + $panel.removeClass('multi'); | ||
1672 | + clearChecked($panel.find('.checkbox.checked')); //清除选中状态 | ||
1673 | +}); | ||
1674 | + | ||
1675 | +//【品牌/高级选项】checkbox | ||
1676 | +$('.check-container').on('click', '.attr', function() { | ||
1677 | + var $this = $(this), | ||
1678 | + $check = $this.find('.checkbox'), | ||
1679 | + $btnOk = $this.parent('.check-container').next('.btns').find('.multi-select-ok'); | ||
1680 | + | ||
1681 | + $check.toggleClass('checked'); | ||
1682 | + | ||
1683 | + if ($check.hasClass('checked')) { | ||
1684 | + $check.html(checkUnicode.checked); | ||
1685 | + } else { | ||
1686 | + $check.html(checkUnicode.unchecked); | ||
1687 | + } | ||
1688 | + | ||
1689 | + //更新按钮状态 | ||
1690 | + if ($check.hasClass('checked') || | ||
1691 | + $this.siblings('.attr').find('.checked').length > 0) { | ||
1692 | + $btnOk.removeClass('dis'); | ||
1693 | + } else { | ||
1694 | + $btnOk.addClass('dis'); | ||
1695 | + } | ||
1696 | +}); | ||
1697 | + | ||
1698 | +//【品牌/高级选项】当多选时阻止链接默认跳转 | ||
1699 | +$('.brand, .senior').on('click', '.attr > a', function(e) { | ||
1700 | + if ($(this).closest('.multi').length > 0) { | ||
1701 | + e.preventDefault(); | ||
1702 | + } | ||
1703 | +}); | ||
1704 | + | ||
1705 | +//【价格】用户定义价格处理 | ||
1706 | +if ($udPrice.length > 0) { | ||
1707 | + $limit = $udPrice.find('.limit'); | ||
1708 | + $min = $limit.filter('.min'); | ||
1709 | + $max = $limit.filter('.max'); | ||
1710 | + $btn = $udPrice.find('.price-sure'); | ||
1711 | + | ||
1712 | + //【价格】输入 | ||
1713 | + $limit.keyup(function() { | ||
1714 | + var min = $.trim($min.val()), | ||
1715 | + max = $.trim($max.val()), | ||
1716 | + isMinInt = interReg.test(min), | ||
1717 | + isMaxInt = interReg.test(max); | ||
1718 | + | ||
1719 | + if (isMaxInt && (min === '' || isMinInt) || | ||
1720 | + isMinInt && (max === '' || isMaxInt) | ||
1721 | + ) { | ||
1722 | + $btn.removeClass('hide'); | ||
1723 | + } else { | ||
1724 | + $btn.addClass('hide'); | ||
1725 | + } | ||
1726 | + }); | ||
1727 | + | ||
1728 | + //【价格】多项查询 | ||
1729 | + $btn.click(function() { | ||
1730 | + var min = $.trim($min.val()), | ||
1731 | + max = $.trim($max.val()), | ||
1732 | + tmp; | ||
1733 | + | ||
1734 | + //对于min大于max的情况,交换位置 | ||
1735 | + if (min !== '' && max !== '' && +min > +max) { | ||
1736 | + tmp = max; | ||
1737 | + max = min; | ||
1738 | + min = tmp; | ||
1739 | + } | ||
1740 | + | ||
1741 | + uriLoc('price', min + ',' + max); | ||
1742 | + }); | ||
1743 | +} | ||
1744 | + | ||
1745 | +//【高级选项】鼠标移入显示子项 | ||
1746 | +$seniorAttrWrap.on('mouseenter', '.attr', function() { | ||
1747 | + var $this = $(this); | ||
1748 | + var index = $this.index(); | ||
1749 | + | ||
1750 | + $this.addClass('hover').siblings().removeClass('hover'); | ||
1751 | + | ||
1752 | + $seniorSubWrap.children('.senior-sub:eq(' + index + ')').removeClass('hide').siblings().addClass('hide'); | ||
1753 | +}).on('mouseleave', '.attr', function() { | ||
1754 | + var $this = $(this), | ||
1755 | + index = $this.index(); | ||
1756 | + | ||
1757 | + hoveredIndex = index; | ||
1758 | + | ||
1759 | + seniorHoverTime = setTimeout(function() { | ||
1760 | + hideSeniorPanel(); | ||
1761 | + }, 100); | ||
1762 | +}); | ||
1763 | + | ||
1764 | +//【高级选项】多选 | ||
1765 | +$('.senior-sub').on('click', '.multi-select', function() { | ||
1766 | + $(this).closest('.senior-sub').addClass('multi'); | ||
1767 | +}).on('click', '.multi-select-ok', function() { | ||
1768 | + var $btn = $(this), | ||
1769 | + $sub = $btn.closest('.senior-sub'), | ||
1770 | + val = ''; | ||
1771 | + | ||
1772 | + if ($btn.hasClass('dis')) { | ||
1773 | + return; | ||
1774 | + } | ||
1775 | + | ||
1776 | + $sub.find('.checked').each(function() { | ||
1777 | + var id = $(this).data('id'); | ||
1778 | + | ||
1779 | + val += (val === '') ? id : (',' + id); | ||
1780 | + }); | ||
1781 | + | ||
1782 | + uriLoc($sub.data('attr'), val); | ||
1783 | +}).on('mouseenter', function() { | ||
1784 | + clearTimeout(seniorHoverTime); | ||
1785 | +}).on('mouseleave', function() { | ||
1786 | + hideSeniorPanel(); | ||
1787 | +}); | ||
1788 | + | ||
1785 | }); | 1789 | }); |
1786 | define("js/product/sort-pager", ["jquery"], function(require, exports, module){ | 1790 | define("js/product/sort-pager", ["jquery"], function(require, exports, module){ |
1787 | /** | 1791 | /** |
@@ -3962,7 +3966,7 @@ function picCaptchaAjaxFn(page, callback) { | @@ -3962,7 +3966,7 @@ function picCaptchaAjaxFn(page, callback) { | ||
3962 | type: 'POST', | 3966 | type: 'POST', |
3963 | url: url, | 3967 | url: url, |
3964 | data: { | 3968 | data: { |
3965 | - code: $ca.val() | 3969 | + verifyCode: $ca.val() |
3966 | 3970 | ||
3967 | //mobile: $pn.val(), | 3971 | //mobile: $pn.val(), |
3968 | //area: $region.text().split('+')[1] | 3972 | //area: $region.text().split('+')[1] |
@@ -3995,7 +3999,7 @@ function msgCaptchaAjaxFn(page, callback) { | @@ -3995,7 +3999,7 @@ function msgCaptchaAjaxFn(page, callback) { | ||
3995 | type: 'POST', | 3999 | type: 'POST', |
3996 | url: url, | 4000 | url: url, |
3997 | data: { | 4001 | data: { |
3998 | - code: $ca.val(), | 4002 | + verifyCode: $ca.val(), |
3999 | mobile: $pn.val(), | 4003 | mobile: $pn.val(), |
4000 | area: $region.text().split('+')[1] | 4004 | area: $region.text().split('+')[1] |
4001 | } | 4005 | } |
@@ -4291,7 +4295,7 @@ exports.init = function(page) { | @@ -4291,7 +4295,7 @@ exports.init = function(page) { | ||
4291 | 4295 | ||
4292 | $regionSelect.change(function() { | 4296 | $regionSelect.change(function() { |
4293 | 4297 | ||
4294 | - $region.text('+' + $('#region').val()); | 4298 | + $region.text($('#region').val()); |
4295 | 4299 | ||
4296 | validateRule(page, $pn, showErrTip); //验证 | 4300 | validateRule(page, $pn, showErrTip); //验证 |
4297 | }); | 4301 | }); |
@@ -4319,7 +4323,7 @@ exports.init = function(page) { | @@ -4319,7 +4323,7 @@ exports.init = function(page) { | ||
4319 | data: { | 4323 | data: { |
4320 | area: $region.text().split('+')[1], | 4324 | area: $region.text().split('+')[1], |
4321 | mobile: $pn.val(), | 4325 | mobile: $pn.val(), |
4322 | - code: $ca.val() | 4326 | + verifyCode: $ca.val() |
4323 | } | 4327 | } |
4324 | }).then(function(data) { | 4328 | }).then(function(data) { |
4325 | if (data.code === 200) { | 4329 | if (data.code === 200) { |
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.

3.35 KB

2.77 KB

3.76 KB

4.71 KB

1020 Bytes
@@ -220,10 +220,11 @@ | @@ -220,10 +220,11 @@ | ||
220 | .price-sure { | 220 | .price-sure { |
221 | height: 24px; | 221 | height: 24px; |
222 | width: 44px; | 222 | width: 44px; |
223 | - border: 1px solid #e0e0e0; | ||
224 | - background: #fff; | ||
225 | - color: #666; | 223 | + background: #333; |
224 | + color: #fff; | ||
226 | margin-left: 10px; | 225 | margin-left: 10px; |
226 | + outline: none; | ||
227 | + border: none; | ||
227 | } | 228 | } |
228 | 229 | ||
229 | .color-block { | 230 | .color-block { |
@@ -267,7 +268,7 @@ | @@ -267,7 +268,7 @@ | ||
267 | top: 39px; | 268 | top: 39px; |
268 | background: #fff; | 269 | background: #fff; |
269 | border: 1px solid #eaeceb; | 270 | border: 1px solid #eaeceb; |
270 | - z-index: 1; | 271 | + z-index: 2; |
271 | 272 | ||
272 | ul { | 273 | ul { |
273 | max-width: 950px; | 274 | max-width: 950px; |
@@ -43,6 +43,7 @@ | @@ -43,6 +43,7 @@ | ||
43 | color: #222; | 43 | color: #222; |
44 | cursor: pointer; | 44 | cursor: pointer; |
45 | margin-right: 10px; | 45 | margin-right: 10px; |
46 | + background: #fff; | ||
46 | } | 47 | } |
47 | 48 | ||
48 | .iconfont { | 49 | .iconfont { |
@@ -54,14 +55,21 @@ | @@ -54,14 +55,21 @@ | ||
54 | > ul { | 55 | > ul { |
55 | position: absolute; | 56 | position: absolute; |
56 | display: none; | 57 | display: none; |
57 | - width: 42px; | ||
58 | - padding: 0 3px; | 58 | + width: 48px; |
59 | border-left: 1px solid #ccc; | 59 | border-left: 1px solid #ccc; |
60 | border-right: 1px solid #ccc; | 60 | border-right: 1px solid #ccc; |
61 | + background: #fff; | ||
62 | + z-index: 1; | ||
61 | } | 63 | } |
62 | 64 | ||
63 | li { | 65 | li { |
66 | + padding: 0 3px; | ||
64 | border-bottom: 1px solid #ccc; | 67 | border-bottom: 1px solid #ccc; |
68 | + | ||
69 | + &:hover { | ||
70 | + background: #376cf7; | ||
71 | + color: #fff; | ||
72 | + } | ||
65 | } | 73 | } |
66 | 74 | ||
67 | a { | 75 | a { |
@@ -84,4 +92,4 @@ | @@ -84,4 +92,4 @@ | ||
84 | color: #f00; | 92 | color: #f00; |
85 | } | 93 | } |
86 | } | 94 | } |
87 | -} | ||
95 | +} |
@@ -997,6 +997,7 @@ class HomeController extends AbstractAction | @@ -997,6 +997,7 @@ class HomeController extends AbstractAction | ||
997 | $this->_view->display('currency-detail', array( | 997 | $this->_view->display('currency-detail', array( |
998 | 'money' => $data['money'], | 998 | 'money' => $data['money'], |
999 | 'pageFooter' => true, | 999 | 'pageFooter' => true, |
1000 | + 'currencyPage' => true, | ||
1000 | 'currencyDetail' => true, | 1001 | 'currencyDetail' => true, |
1001 | 'currencyDetailPage' => true | 1002 | 'currencyDetailPage' => true |
1002 | )); | 1003 | )); |
1 | -<?php | ||
2 | -use Action\WebAction; | ||
3 | -use LibModels\Web\Passport\RegData; | ||
4 | -use Passport\PassportModel; | ||
5 | -use Plugin\Helpers; | ||
6 | -use LibModels\Wap\Passport\BackData; | ||
7 | -use Plugin\AuthCode; | ||
8 | - | ||
9 | -class BackController extends WebAction | ||
10 | -{ | ||
11 | - /** | ||
12 | - * 找回密码 | ||
13 | - */ | ||
14 | - public function indexAction() | ||
15 | - { | ||
16 | - $banner = PassportModel::getLeftBanner(PassportModel::BACK_LFFT_BANNER_CODE); | ||
17 | - $data = array( | ||
18 | - 'simpleHeader' => PassportModel::getSimpleHeader(false), | ||
19 | - 'backPage' => true, | ||
20 | - 'back' => array( | ||
21 | - 'coverHref' => $banner['url'], | ||
22 | - 'coverImg' => $banner['img'], | ||
23 | - 'countryCode' => '86', | ||
24 | - 'countryName' => '中国', | ||
25 | - 'countryList' => RegData::getAreasData(), | ||
26 | - ) | ||
27 | - ); | ||
28 | - $this->_view->display('index', $data); | ||
29 | - } | ||
30 | - | ||
31 | - public function authcodeAction() | ||
32 | - { | ||
33 | - echo $this->echoJson(array('code'=> 200)); | ||
34 | - } | ||
35 | - | ||
36 | - /** | ||
37 | - * | ||
38 | - */ | ||
39 | - public function emailAction() | ||
40 | - { | ||
41 | - $phoneNum = $this->post('phoneNum',''); | ||
42 | - $area = $this->post('area','86'); | ||
43 | - $captcha = $this->post('captcha',''); | ||
44 | - if(Helpers::verifyEmail($phoneNum)){ //验证邮箱 | ||
45 | - $email = $phoneNum; | ||
46 | - $data = BackData::sendCodeToEmail($email); | ||
47 | - $this->setSession('phoneNum', $phoneNum); | ||
48 | - if($data['code'] == 200) { | ||
49 | - $this->redirect('sendemail'); | ||
50 | - } | ||
51 | - else { | ||
52 | - $this->redirect('index'); | ||
53 | - } | ||
54 | - } else if(Helpers::verifyMobile($phoneNum)) {//验证手机号 | ||
55 | - $mobile = $phoneNum; | ||
56 | - $data = BackData::sendCodeToMobile($mobile); | ||
57 | - $this->setSession('phoneNum', $phoneNum); | ||
58 | - $this->setSession('area', $area); | ||
59 | - $this->setSession('captcha', $captcha); | ||
60 | - if($data['code'] == 200) { | ||
61 | - $this->redirect('verification'); | ||
62 | - } | ||
63 | - else { | ||
64 | - $this->redirect('index'); | ||
65 | - } | ||
66 | - } | ||
67 | - } | ||
68 | - | ||
69 | - /** | ||
70 | - * 发送邮件页面 | ||
71 | - */ | ||
72 | - public function sendemailAction() { | ||
73 | - $phoneNum = $this->getSession('phoneNum'); | ||
74 | - if(empty($phoneNum)) { | ||
75 | - $this->redirect('index'); | ||
76 | - } | ||
77 | - $banner = PassportModel::getLeftBanner(PassportModel::BACK_LFFT_BANNER_CODE); | ||
78 | - $simpleHeader = array( | ||
79 | - 'logo' => array( | ||
80 | - 'img' => 'http://static.yohobuy.com/newheader/img/logo_e.png', | ||
81 | - 'url' => 'http://www.yohobuy.com' | ||
82 | - ), | ||
83 | - 'tool' => array( | ||
84 | - 'user' => '2586703@qq.com', | ||
85 | - 'userCenter' => '', | ||
86 | - 'loginHref' => '', | ||
87 | - 'logoutHref' => '', | ||
88 | - 'registerHref' => '', | ||
89 | - 'favoriteHref' => '', | ||
90 | - 'couponHref' => '', | ||
91 | - 'orderHref' => '', | ||
92 | - 'helpHref' => '' | ||
93 | - ) | ||
94 | - ); | ||
95 | - $data = array( | ||
96 | - 'simpleHeader' => PassportModel::getSimpleHeader(false), | ||
97 | - 'sendEmail' => array( | ||
98 | - 'coverHref' => $banner['url'], | ||
99 | - 'coverImg' => $banner['img'], | ||
100 | - 'countrys' => array(), | ||
101 | - ) | ||
102 | - ); | ||
103 | - $this->_view->display('send-email', $data); | ||
104 | - } | ||
105 | - | ||
106 | - /** | ||
107 | - * 重置密码页面 | ||
108 | - */ | ||
109 | - public function backcodeAction() { | ||
110 | - $code = $this->get('code'); | ||
111 | - $info = $this->checkCode($code); | ||
112 | - if(empty($info)) { | ||
113 | - $this->redirect('index'); | ||
114 | - } | ||
115 | - $banner = PassportModel::getLeftBanner(PassportModel::BACK_LFFT_BANNER_CODE); | ||
116 | - $data = array( | ||
117 | - 'simpleHeader' => PassportModel::getSimpleHeader(false), | ||
118 | - 'resetPage' => true, | ||
119 | - 'resetPwd' => array( | ||
120 | - 'coverHref' => $banner['url'], | ||
121 | - 'coverImg' => $banner['img'], | ||
122 | - 'countrys' => array(), | ||
123 | - 'code' => $code, | ||
124 | - ) | ||
125 | - ); | ||
126 | - $this->_view->display('reset-pwd', $data); | ||
127 | - } | ||
128 | - | ||
129 | - /** | ||
130 | - * 更新密码接口 | ||
131 | - * | ||
132 | - */ | ||
133 | - public function updateAction() | ||
134 | - { | ||
135 | - $code = $this->post('code'); | ||
136 | - $password = $this->post('pwd'); | ||
137 | - $info = $this->checkCode($code); | ||
138 | - if(Helpers::verifyPassword($password) && !empty($info)) { | ||
139 | - //修改密码 | ||
140 | - if(isset($info['mobile'])) {//手机号修改密码 | ||
141 | - $mobile = $info['mobile']; | ||
142 | - $token = $info['token']; | ||
143 | - $area = $info['area']; | ||
144 | - $data = BackData::modifyPasswordByMobile($mobile, $token, $password, $area); | ||
145 | - if($data['code']) { | ||
146 | - $this->redirect('resetSuccess'); | ||
147 | - } | ||
148 | - } else if(isset($info['uid'])) {//其他方式修改密码 | ||
149 | - $uid = $info['uid']; | ||
150 | - $this->redirect('resetSuccess'); | ||
151 | - } | ||
152 | - } | ||
153 | - //跳转错误页面 | ||
154 | - $this->redirect('/error/index'); | ||
155 | - } | ||
156 | - | ||
157 | - /** | ||
158 | - * 重置密码成功 | ||
159 | - */ | ||
160 | - public function resetSuccessAction() { | ||
161 | - $banner = PassportModel::getLeftBanner(PassportModel::BACK_LFFT_BANNER_CODE); | ||
162 | - $data = array( | ||
163 | - 'simpleHeader' => PassportModel::getSimpleHeader(false), | ||
164 | - 'resetSuccess' => array( | ||
165 | - 'coverHref' => $banner['url'], | ||
166 | - 'coverImg' => $banner['img'], | ||
167 | - 'countrys' => array() | ||
168 | - ) | ||
169 | - ); | ||
170 | - $this->_view->display('reset-success', $data); | ||
171 | - } | ||
172 | - | ||
173 | - /** | ||
174 | - * 手机验证页面 | ||
175 | - */ | ||
176 | - public function verificationAction() { | ||
177 | - $phoneNum = $this->getSession('phoneNum'); | ||
178 | - $area = $this->getSession('area'); | ||
179 | - $captcha = $this->getSession('captcha'); | ||
180 | - if(empty($phoneNum)) { | ||
181 | - $this->redirect('index'); | ||
182 | - } | ||
183 | - $banner = PassportModel::getLeftBanner(PassportModel::BACK_LFFT_BANNER_CODE); | ||
184 | - $data = array( | ||
185 | - 'simpleHeader' => PassportModel::getSimpleHeader(false), | ||
186 | - 'vertificationPage' => true, | ||
187 | - 'verification' => array( | ||
188 | - 'coverHref' => $banner['url'], | ||
189 | - 'coverImg' => $banner['img'], | ||
190 | - 'phoneNum' => $phoneNum, | ||
191 | - 'area' => $area, | ||
192 | - 'captcha'=> $captcha, | ||
193 | - 'countrys' => array() | ||
194 | - ) | ||
195 | - ); | ||
196 | - $this->_view->display('verification', $data); | ||
197 | - } | ||
198 | - | ||
199 | - /** | ||
200 | - * 手机找回密码验证 | ||
201 | - */ | ||
202 | - public function backmobileAction() | ||
203 | - { | ||
204 | - $mobile = $this->post('mobile');//phoneNum | ||
205 | - $area = $this->post('area'); | ||
206 | - //$captcha = $this->post('captcha'); | ||
207 | - $code = $this->post('captcha');//code | ||
208 | - if($this->getSession('phoneNum') == $mobile && $this->getSession('area') == $area) | ||
209 | - { | ||
210 | - $result = BackData::validateMobileCode($mobile, $code, $area); | ||
211 | - if($result['code'] == 200) { | ||
212 | - $str = json_encode(array( | ||
213 | - 'mobile'=> $mobile, | ||
214 | - 'area' => $area, | ||
215 | - 'token'=> $result['data']['token'], | ||
216 | - 'create_time' => time() | ||
217 | - )); | ||
218 | - $code = AuthCode::encode($str, PassportModel::BACK_FIND_SECRET_KEY); | ||
219 | - $url = '/passport/back/backcode?code='.base64_encode($code); | ||
220 | - $this->redirect(SITE_MAIN.$url); | ||
221 | - } | ||
222 | - } | ||
223 | - } | ||
224 | - | ||
225 | - /** | ||
226 | - * 检查code | ||
227 | - * | ||
228 | - * @param string $code | ||
229 | - * @return boolean | ||
230 | - */ | ||
231 | - private function checkCode($code) | ||
232 | - { | ||
233 | - $code = base64_decode($code); | ||
234 | - $info = json_decode(AuthCode::decode($code, PassportModel::BACK_FIND_SECRET_KEY), true); | ||
235 | - if ($info['create_time'] < 1 || (time() - $info['create_time']) > 86400) { | ||
236 | - return array(); | ||
237 | - } | ||
238 | - return $info; | ||
239 | - } | 1 | +<?php |
2 | +use Action\WebAction; | ||
3 | +use LibModels\Web\Passport\RegData; | ||
4 | +use Passport\PassportModel; | ||
5 | +use Plugin\Helpers; | ||
6 | +use LibModels\Wap\Passport\BackData; | ||
7 | +use Plugin\AuthCode; | ||
8 | + | ||
9 | +class BackController extends WebAction | ||
10 | +{ | ||
11 | + /** | ||
12 | + * 找回密码 | ||
13 | + */ | ||
14 | + public function indexAction() | ||
15 | + { | ||
16 | + $banner = PassportModel::getLeftBanner(PassportModel::BACK_LFFT_BANNER_CODE); | ||
17 | + $data = array( | ||
18 | + 'simpleHeader' => PassportModel::getSimpleHeader(false), | ||
19 | + 'backPage' => true, | ||
20 | + 'back' => array( | ||
21 | + 'coverHref' => $banner['url'], | ||
22 | + 'coverImg' => $banner['img'], | ||
23 | + 'countryCode' => '86', | ||
24 | + 'countryName' => '中国', | ||
25 | + 'captchaUrl'=>'/passport/images?t=1449799445', | ||
26 | + 'countryList' => RegData::getAreasData(), | ||
27 | + ) | ||
28 | + ); | ||
29 | + $this->_view->display('index', $data); | ||
30 | + } | ||
31 | + | ||
32 | + public function authcodeAction() | ||
33 | + { | ||
34 | + echo $this->echoJson(array('code'=> 200)); | ||
35 | + } | ||
36 | + | ||
37 | + /** | ||
38 | + * | ||
39 | + */ | ||
40 | + public function emailAction() | ||
41 | + { | ||
42 | + $phoneNum = $this->post('phoneNum',''); | ||
43 | + $area = $this->post('area','86'); | ||
44 | + $verifyCode = $this->post('verifyCode',''); | ||
45 | + if(Helpers::verifyEmail($phoneNum)){ //验证邮箱 | ||
46 | + $email = $phoneNum; | ||
47 | + $data = BackData::sendCodeToEmail($email); | ||
48 | + if($data['code'] == 200) { | ||
49 | + $this->setSession('email', $email); | ||
50 | + $this->redirect('sendemail'); | ||
51 | + } | ||
52 | + else { | ||
53 | + $this->redirect('index'); | ||
54 | + } | ||
55 | + } else if(Helpers::verifyMobile($phoneNum)) {//验证手机号 | ||
56 | + $mobile = $phoneNum; | ||
57 | + $data = BackData::sendCodeToMobile($mobile); | ||
58 | + if($data['code'] == 200) { | ||
59 | + $this->setSession('mobile', $mobile); | ||
60 | + $this->setSession('area', $area); | ||
61 | + $this->setSession('verifyCode', $verifyCode); | ||
62 | + $this->redirect('verification'); | ||
63 | + } | ||
64 | + else { | ||
65 | + $this->redirect('index'); | ||
66 | + } | ||
67 | + } | ||
68 | + } | ||
69 | + | ||
70 | + /** | ||
71 | + * 发送邮件页面 | ||
72 | + */ | ||
73 | + public function sendemailAction() { | ||
74 | + $email = $this->getSession('email'); | ||
75 | + if(empty($email)) { | ||
76 | + $this->redirect('index'); | ||
77 | + } | ||
78 | + $banner = PassportModel::getLeftBanner(PassportModel::BACK_LFFT_BANNER_CODE); | ||
79 | + $data = array( | ||
80 | + 'simpleHeader' => PassportModel::getSimpleHeader(false), | ||
81 | + 'sendEmail' => array( | ||
82 | + 'coverHref' => $banner['url'], | ||
83 | + 'coverImg' => $banner['img'], | ||
84 | + 'countrys' => array(), | ||
85 | + ) | ||
86 | + ); | ||
87 | + $this->_view->display('send-email', $data); | ||
88 | + } | ||
89 | + | ||
90 | + /** | ||
91 | + * 重置密码页面 | ||
92 | + */ | ||
93 | + public function backcodeAction() { | ||
94 | + $code = $this->get('code'); | ||
95 | + $info = $this->checkCode($code); | ||
96 | + if(empty($info)) { | ||
97 | + $this->redirect('index'); | ||
98 | + } | ||
99 | + $banner = PassportModel::getLeftBanner(PassportModel::BACK_LFFT_BANNER_CODE); | ||
100 | + $data = array( | ||
101 | + 'simpleHeader' => PassportModel::getSimpleHeader(false), | ||
102 | + 'resetPage' => true, | ||
103 | + 'resetPwd' => array( | ||
104 | + 'coverHref' => $banner['url'], | ||
105 | + 'coverImg' => $banner['img'], | ||
106 | + 'countrys' => array(), | ||
107 | + 'code' => $code, | ||
108 | + ) | ||
109 | + ); | ||
110 | + $this->_view->display('reset-pwd', $data); | ||
111 | + } | ||
112 | + | ||
113 | + /** | ||
114 | + * 更新密码接口 | ||
115 | + * | ||
116 | + */ | ||
117 | + public function updateAction() | ||
118 | + { | ||
119 | + $code = $this->post('code'); | ||
120 | + $password = $this->post('pwd'); | ||
121 | + $info = $this->checkCode($code); | ||
122 | + if(Helpers::verifyPassword($password) && !empty($info)) { | ||
123 | + //修改密码 | ||
124 | + if(isset($info['mobile'])) {//手机号修改密码 | ||
125 | + $mobile = $info['mobile']; | ||
126 | + $token = $info['token']; | ||
127 | + $area = $info['area']; | ||
128 | + $data = BackData::modifyPasswordByMobile($mobile, $token, $password, $area); | ||
129 | + if($data['code']) { | ||
130 | + $this->redirect('resetSuccess'); | ||
131 | + } | ||
132 | + } else if(isset($info['uid'])) {//其他方式修改密码 | ||
133 | + $uid = $info['uid']; | ||
134 | + $this->redirect('resetSuccess'); | ||
135 | + } | ||
136 | + } | ||
137 | + //跳转错误页面 | ||
138 | + $this->redirect('/error/index'); | ||
139 | + } | ||
140 | + | ||
141 | + /** | ||
142 | + * 重置密码成功 | ||
143 | + */ | ||
144 | + public function resetSuccessAction() { | ||
145 | + $banner = PassportModel::getLeftBanner(PassportModel::BACK_LFFT_BANNER_CODE); | ||
146 | + $data = array( | ||
147 | + 'simpleHeader' => PassportModel::getSimpleHeader(false), | ||
148 | + 'resetSuccess' => array( | ||
149 | + 'coverHref' => $banner['url'], | ||
150 | + 'coverImg' => $banner['img'], | ||
151 | + 'countrys' => array() | ||
152 | + ) | ||
153 | + ); | ||
154 | + $this->_view->display('reset-success', $data); | ||
155 | + } | ||
156 | + | ||
157 | + /** | ||
158 | + * 手机验证页面 | ||
159 | + */ | ||
160 | + public function verificationAction() { | ||
161 | + $mobile = $this->getSession('mobile'); | ||
162 | + $area = $this->getSession('area'); | ||
163 | + $verifyCode = $this->getSession('verifyCode'); | ||
164 | + if(empty($mobile)) { | ||
165 | + $this->redirect('index'); | ||
166 | + } | ||
167 | + $banner = PassportModel::getLeftBanner(PassportModel::BACK_LFFT_BANNER_CODE); | ||
168 | + $data = array( | ||
169 | + 'simpleHeader' => PassportModel::getSimpleHeader(false), | ||
170 | + 'vertificationPage' => true, | ||
171 | + 'verification' => array( | ||
172 | + 'coverHref' => $banner['url'], | ||
173 | + 'coverImg' => $banner['img'], | ||
174 | + 'mobile' => $mobile, | ||
175 | + 'area' => $area, | ||
176 | + 'verifyCode'=> $verifyCode, | ||
177 | + 'countrys' => array() | ||
178 | + ) | ||
179 | + ); | ||
180 | + $this->_view->display('verification', $data); | ||
181 | + } | ||
182 | + | ||
183 | + /** | ||
184 | + * 手机找回密码验证 | ||
185 | + */ | ||
186 | + public function backmobileAction() | ||
187 | + { | ||
188 | + $mobile = $this->post('mobile'); | ||
189 | + $area = $this->post('area'); | ||
190 | + $verifyCode = $this->post('verifyCode'); | ||
191 | + $code = $this->post('code');//code | ||
192 | + if($this->getSession('mobile') == $mobile && $this->getSession('area') == $area) | ||
193 | + { | ||
194 | + $result = BackData::validateMobileCode($mobile, $code, $area); | ||
195 | + if($result['code'] == 200) { | ||
196 | + $str = json_encode(array( | ||
197 | + 'mobile'=> $mobile, | ||
198 | + 'area' => $area, | ||
199 | + 'token'=> $result['data']['token'], | ||
200 | + 'create_time' => time() | ||
201 | + )); | ||
202 | + $code = AuthCode::encode($str, PassportModel::BACK_FIND_SECRET_KEY); | ||
203 | + $url = '/passport/back/backcode?code='.base64_encode($code); | ||
204 | + $this->redirect(SITE_MAIN.$url); | ||
205 | + } | ||
206 | + } | ||
207 | + } | ||
208 | + | ||
209 | + /** | ||
210 | + * 检查code | ||
211 | + * | ||
212 | + * @param string $code | ||
213 | + * @return boolean | ||
214 | + */ | ||
215 | + private function checkCode($code) | ||
216 | + { | ||
217 | + $code = base64_decode($code); | ||
218 | + $info = json_decode(AuthCode::decode($code, PassportModel::BACK_FIND_SECRET_KEY), true); | ||
219 | + if ($info['create_time'] < 1 || (time() - $info['create_time']) > 86400) { | ||
220 | + return array(); | ||
221 | + } | ||
222 | + return $info; | ||
223 | + } | ||
240 | } | 224 | } |
@@ -22,12 +22,12 @@ class RegisterController extends WebAction | @@ -22,12 +22,12 @@ class RegisterController extends WebAction | ||
22 | 'region' => RegData::getAreasData(), | 22 | 'region' => RegData::getAreasData(), |
23 | 'location' => '+86', | 23 | 'location' => '+86', |
24 | 'captchaUrl' => '/passport/images?t=1449799445', | 24 | 'captchaUrl' => '/passport/images?t=1449799445', |
25 | - 'itemUrl' => '##', | 25 | + 'itemUrl' => 'http://www.yohobuy.com/help/?category_id=9', |
26 | 'referUrl' => $refer, | 26 | 'referUrl' => $refer, |
27 | 'loginUrl' => '/signin.html?refer='.$refer, | 27 | 'loginUrl' => '/signin.html?refer='.$refer, |
28 | 'coverHref' => $cover['url'], | 28 | 'coverHref' => $cover['url'], |
29 | 'coverImg' => $cover['img'], | 29 | 'coverImg' => $cover['img'], |
30 | - 'regBtnText' => '快速登录' | 30 | + 'regBtnText' => '立即注册' |
31 | ) | 31 | ) |
32 | ); | 32 | ); |
33 | $this->setCookie('refer', $refer); | 33 | $this->setCookie('refer', $refer); |
-
Please register or login to post a comment