Authored by 徐炜

Merge remote-tracking branch 'origin/release/4.9.1.0' into release/4.9.1.0

@@ -149,6 +149,7 @@ exports.index = (req, res, next) => { @@ -149,6 +149,7 @@ exports.index = (req, res, next) => {
149 banner, 149 banner,
150 icons, 150 icons,
151 link, 151 link,
  152 +
152 // url, 153 // url,
153 // param, 154 // param,
154 couponids = []; 155 couponids = [];
@@ -398,6 +399,7 @@ exports.detail = (req, res) => { @@ -398,6 +399,7 @@ exports.detail = (req, res) => {
398 399
399 exports.isLogin = (req, res, next) => { 400 exports.isLogin = (req, res, next) => {
400 // let refer = req.cookies.refer; 401 // let refer = req.cookies.refer;
  402 + let url = req.get('referer') || '/activity/student/register';
401 403
402 404
403 getPlatForm(req).then((yoho)=>{ 405 getPlatForm(req).then((yoho)=>{
@@ -415,8 +417,12 @@ exports.isLogin = (req, res, next) => { @@ -415,8 +417,12 @@ exports.isLogin = (req, res, next) => {
415 // refer = '/activity/student/register'; 417 // refer = '/activity/student/register';
416 // } 418 // }
417 419
  420 +
  421 + if (req.path === '/student/register' && !yoho.isStudent) {
  422 + url = '/activity/student/register';
  423 + }
418 res.redirect(helpers.urlFormat('/signin.html', { 424 res.redirect(helpers.urlFormat('/signin.html', {
419 - refer: req.get('referer') || '/activity/student/register' 425 + refer: url
420 })); 426 }));
421 }).catch(next); 427 }).catch(next);
422 428
@@ -13,7 +13,7 @@ @@ -13,7 +13,7 @@
13 {{#each data.list}} 13 {{#each data.list}}
14 <div class='s-section'> 14 <div class='s-section'>
15 <a href="javascript:void(0)"> 15 <a href="javascript:void(0)">
16 - <img src='{{image src 357 174}}' title="{{title}}"> 16 + <img src='{{image src 320 149}}' title="{{title}}">
17 </a> 17 </a>
18 </div> 18 </div>
19 {{/each}} 19 {{/each}}
@@ -24,8 +24,9 @@ @@ -24,8 +24,9 @@
24 {{#coupons}} 24 {{#coupons}}
25 <section class='s-section clearfix' data-template-id="{{template_id}}"> 25 <section class='s-section clearfix' data-template-id="{{template_id}}">
26 <h1>领券中心 26 <h1>领券中心
27 - <a class='more' href="{{link}}">...</a> 27 + <a class='more iconfont' href="{{link}}">&#xe618;</a>
28 </h1> 28 </h1>
  29 +
29 <div class='s-coupon-contain'> 30 <div class='s-coupon-contain'>
30 <style type="text/css"> 31 <style type="text/css">
31 .no-bg{ 32 .no-bg{
@@ -76,7 +77,7 @@ @@ -76,7 +77,7 @@
76 {{/activities}} 77 {{/activities}}
77 78
78 <section class='s-section clearfix'> 79 <section class='s-section clearfix'>
79 - <h1>学生专享商品<a class="more" href="//search.m.yohobuy.com/?students=1&title=学生专享商品&uid={{uid}}{{#isApp}}&app_version=1{{/isApp}}">...</a></h1> 80 + <h1>学生专享商品<a class="more iconfont" href="//search.m.yohobuy.com/?students=1&title=学生专享商品&uid={{uid}}{{#isApp}}&app_version=1{{/isApp}}">&#xe618;</a></h1>
80 <div class='goods-list clearfix'> 81 <div class='goods-list clearfix'>
81 {{#each goods}} 82 {{#each goods}}
82 <div class="good-info"> 83 <div class="good-info">
@@ -20,7 +20,7 @@ @@ -20,7 +20,7 @@
20 </section> 20 </section>
21 {{/if}} 21 {{/if}}
22 <section class='s-section clearfix'> 22 <section class='s-section clearfix'>
23 - <h1>学生专享商品<a class="more" href="//search.m.yohobuy.com/?students=1&title=学生专享商品&uid={{uid}}{{#isApp}}&app_version=1{{/isApp}}">...</a></h1> 23 + <h1>学生专享商品<a class="more iconfont" href="//search.m.yohobuy.com/?students=1&title=学生专享商品&uid={{uid}}{{#isApp}}&app_version=1{{/isApp}}">&#xe618;</a></h1>
24 <div class='goods-list clearfix'> 24 <div class='goods-list clearfix'>
25 {{#each goods}} 25 {{#each goods}}
26 <div class="good-info"> 26 <div class="good-info">
@@ -235,8 +235,9 @@ const _detailDataPkg = (origin, uid, vipLevel, ua) => { @@ -235,8 +235,9 @@ const _detailDataPkg = (origin, uid, vipLevel, ua) => {
235 if (originPrice.yohoCoinNum) { 235 if (originPrice.yohoCoinNum) {
236 dest.commodityReturn = originPrice.yohoCoinNum; 236 dest.commodityReturn = originPrice.yohoCoinNum;
237 } 237 }
238 - //学生有货币  
239 - if(originPrice.studentCoinNum){ 238 +
  239 + // 学生有货币
  240 + if (originPrice.studentCoinNum) {
240 dest.studentCoinNum = originPrice.studentCoinNum; 241 dest.studentCoinNum = originPrice.studentCoinNum;
241 } 242 }
242 } 243 }
@@ -13,7 +13,7 @@ @@ -13,7 +13,7 @@
13 <p class="good-tag sale-tag">SALE</p> 13 <p class="good-tag sale-tag">SALE</p>
14 {{/ is_discount}} 14 {{/ is_discount}}
15 {{# is_yohood}} 15 {{# is_yohood}}
16 - <div class="good-tag running-man-tag">跑男同款</div> 16 + <p class="good-tag new-festival-tag">新品节</p>
17 {{/ is_yohood}} 17 {{/ is_yohood}}
18 {{# is_limited}} 18 {{# is_limited}}
19 <p class="good-tag limit-tag">限量商品</p> 19 <p class="good-tag limit-tag">限量商品</p>
1 -# 代码规范说明文档  
2 -  
3 -开发前请务必仔细阅读,遵守规范,保持团队代码风格统一  
4 -  
5 -## 文件命名  
6 -* 中划线分隔小写单词  
7 -* Ex: `your-file`  
8 -  
9 -## 缩进  
10 -* 统一4个Space  
11 -* 建议将编辑器Tab映射成4个Space  
12 -  
13 -## 注释  
14 -* 为每个你创建的JS文件添加注释  
15 -  
16 -```  
17 -/**  
18 - * 对文件实现功能的描述  
19 - * @date: 2016-11-11  
20 - * @author: name<emial@yoho.cn>  
21 - */  
22 -```  
23 -  
24 -* 为重要的函数添加注释  
25 -  
26 -```  
27 -/**  
28 - * 对函数功能的说明  
29 - * @params name paramType 参数描述  
30 - * @return name returnType 返回值描述  
31 - */  
32 -```  
33 -  
34 -* 为重要的代码、逻辑复杂的代码或者有特殊处理的代码添加注释  
35 -  
36 -```  
37 -// Your comments for the code  
38 -```  
39 -* 减少不必要的注释  
40 - 类似于:**进入循环****循环结束**等垃圾话的注释请谨慎添加,大家都是程序员,不用你注释也能知道的  
41 -  
42 -  
43 -## html  
44 -* 见名知意,不要有1,2,3这种名字出现  
45 -* class、id等属性命名为中划线分隔小写单词  
46 -* html中请不要出现不必要的嵌套以及不要将标签滥用,比如使用`a`标签作为不跳转的按钮的标签  
47 -* 属性按顺序出现:`id -> class -> name -> data-* -> src,for,type,href -> title,alt -> aria-*,role`  
48 -  
49 -## js  
50 -[Link](doc/code-norm/js.md)  
51 -  
52 -## css  
53 -[Link](doc/code-norm/css.md)  
1 -# css代码规范  
2 -  
3 -## 选择器  
4 -* 使用class进行样式匹配,而不是id和标签  
5 -* 尽量避免使用属性选择器  
6 -* 尽可能精确的元素定位  
7 -  
8 -## 规则细节  
9 -  
10 - .ele-header, /*规则1:每个选择器声明总是使用新的一行*/  
11 - .ele-body,  
12 - .ele-footer { /*规则2:'{' 前需要添加1个空格*/  
13 - line-height: 1.2; /*规则3:样式声明以;结束,每个样式声明独占一行*/  
14 - font-weight: normal; /*规则4:属性声明的:后添加1个空格*/  
15 - margin: 0; /*规则5:属性值为0时不添加单位*/  
16 - background-color: #f3d; /*规则6:十六进制小写和缩写*/  
17 - }  
18 - /*规则7:没组选择器声明之间适用一空行间隔*/  
19 - .ele2 {  
20 - font-family: "open sans", arial, sans-serif; /*规则8:使用" ",而不是' '*/  
21 - padding: 0 1em 2em; /*规则9:适当缩写但不滥用*/  
22 - border-top: 1px;  
23 - background-color: rgba(0,0,0,.5); /*规则10:颜色值rgba等中不需要增加空格,并且去除浮点数前面不必要的0*/  
24 - }  
25 -  
26 -## 声明顺序(不做强制要求,尽量实现)  
27 -这是一个选择器内书写CSS属性顺序的大致轮廓,作为最佳实践,我们应该遵循以下顺序:  
28 -  
29 -* Position属性 (position,top,right,z-index...)  
30 -* Box Model属性 (display,float,width...)  
31 -* Typographic属性 (font,line-height,color,text-align...)  
32 -* Visual属性 (background,border,border-radius...)  
33 -  
34 -因为Position属性可以是一个元素脱离正常的文本流并可以覆盖盒模型相关样式,所以Position排第一位。盒模型决定一个元素位置和大小紧跟其后。后面属性属于元素内部或不会对前两者产生影响的,排在后面。  
35 -  
36 -完整属性顺序参考[Recsss](http://twitter.github.com/recess)  
37 -  
38 -## Sass风格  
39 -* 控制嵌套层级,禁止超过5层,尽量控制在3层以内  
1 -# JavaScript代码规范  
2 -  
3 -## 行的长度  
4 -每行长度不应该超过**120**个字符,如果一行多余120个字符,应该在一个运算符后换行,下一行增加**2**级缩进,即8个空格)  
5 -```  
6 -doSomething(argument1, argument2, argument3, argument4,  
7 - argument5);  
8 -```  
9 -## 运算符间距  
10 -二元运算符前后必须使用一个空格保持表达式的整洁,操作符包括赋值运算符和逻辑运算符  
11 -```  
12 -var name = 'xuqi'; // GOOD  
13 -var name='xuqi'; // BAD  
14 -```  
15 -## 括号间距  
16 -当使用括号时,紧接左括号之后和紧接右括号之前不应该有空格。  
17 -```  
18 -doSomething(arg); // GODD  
19 -doSomething( arg ); // BAD  
20 -```  
21 -## 变量声明  
22 -* 所有变量在使用前应该先定义  
23 -* 变量定义应该放在函数开头  
24 -* 使用var,const,let表达式定义变量,每行定义一个  
25 -* 除了首行,所有行都应该多一层缩进使变量声明对齐  
26 -* 初始化的变量放在未初始化的变量之前  
27 -* 所有的变量命名必须使用英文单词  
28 -* 浮点变量必须指明实部(即便以0.开头)和小数点后一位  
29 -  
30 -```  
31 -var name = 'xuqi',  
32 - age,  
33 - sex,  
34 - ...;  
35 -  
36 -const $ = require('yoho.jquery');  
37 -  
38 -let i;  
39 -```  
40 -  
41 -另外,晦涩的变量名最好给出注释,否则别人很难读懂接下来代码的意思。  
42 -  
43 -## 函数声明  
44 -* 函数在使用前应该先定义  
45 -* 函数名和开始圆括号之间无空格(包括匿名函数的function关键字与圆括号之间)  
46 -* 开始圆括号和结束圆括号之间无空格  
47 -* 参数名之间应该在逗号之后保留一个空格  
48 -* 开始花括号应该同function关键字保持同一行,结束圆括号和开始花括号之间应该保留一个空格  
49 -* 函数体保持一级缩进  
50 -  
51 -```  
52 -function doSomething(arg1, arg2) {  
53 - doThing1();  
54 - doThing2();  
55 -}  
56 -  
57 -const method = function() {  
58 - doSomething();  
59 -};  
60 -```  
61 -另外,IIFE的标准格式也在这里指出:  
62 -```  
63 -(function(args) {  
64 - //  
65 -}(args)); //(args)位于外层括号内  
66 -```  
67 -  
68 -## 对象直接量  
69 -* 起始左括号应该与表达式保持一行  
70 -* 每个属性的键名前保持一个缩进,第一个属性应该在左括号后另一起行  
71 -* 每个属性的键名不包含引号,其后跟一个冒号(前无空格,后有空格),然后是值  
72 -* 如果属性值为函数,函数体应该在属性名之下另起一行,并且其前后均应保留一个空行  
73 -* 一组相关属性的前后插入空行以提高代码的可读性  
74 -* 结束的右括号独占一行  
75 -  
76 -```  
77 -var person = {  
78 - name: 'xuqi',  
79 - age: 25,  
80 -  
81 - groupAttr1: xx1,  
82 - groupAttr2: xx2,  
83 -  
84 - walk: function() {  
85 - //your walk fn  
86 - }  
87 -};  
88 -```  
89 -  
90 -* 当对象字面量作为函数参数时,起始括号应该与函数名同行  
91 -  
92 -```  
93 -doSomething({  
94 - //do something  
95 -});  
96 -```  
97 -  
98 -## 命名  
99 -### 变量:  
100 -* 采用小驼峰命名格式  
101 -* 变量命名为名词(区别函数)  
102 -* 变量中不使用_  
103 -  
104 -### 函数:  
105 -* 采用小驼峰命名格式  
106 -* 函数命名为动词(区别变量)  
107 -* 函数名中不使用_  
108 -  
109 -### 构造函数:  
110 -* 采用大驼峰命名格式  
111 -* 命名应该是名词  
112 -  
113 -### 私有成员:  
114 -* 一个对象中不希望外部访问的以下划线开头(约定)  
115 -  
116 -## 等号运算符  
117 -使用`===`和`!==`,禁止使用`==`和`!=`  
118 -  
119 -## undefined  
120 -禁止使用`name === undefined`判断一个变量是否定义。应该使用`typeof(name) === 'undefined'`;  
121 -  
122 -## 常用语句规范  
123 -### if语句  
124 -```  
125 -if (condition) {  
126 - doSomething();  
127 -} else if (condition1) {  
128 - doSomething2();  
129 -} else {  
130 - soOtherThing();  
131 -}  
132 -```  
133 -### for语句  
134 -```  
135 -// GOOD  
136 -var i;  
137 -for (i = 0; i < len; i++) {  
138 - doSomething();  
139 -}  
140 -for (i in collection) {  
141 - if (collection.hasOwnProperty(i)) {  
142 - doSomething();  
143 - }  
144 -}  
145 -  
146 -// BAD  
147 -for (var i = 0; i < len; i++) {  
148 - doSomething();  
149 -}  
150 -for (i in collection) {  
151 - doSomething();  
152 -}  
153 -```  
154 -### while,do语句  
155 -```  
156 -while (condition) {  
157 - doSomething();  
158 -}  
159 -  
160 -do {  
161 - doSomething();  
162 -} while (condition)  
163 -```  
164 -  
165 -### switch语句  
166 -* 每一个case保持一个缩进  
167 -* 每一组语句都应该以break,return等结尾,或者用一行注释表示跳过(falling through)  
168 -* 无default的情况也要注释特别说明  
169 -  
170 -```  
171 -switch (val) {  
172 - case 1:  
173 - //nothing  
174 - case 2:  
175 - doSomething();  
176 - break;  
177 - default:  
178 - doDefault();  
179 -}  
180 -```  
181 -  
182 -### try语句  
183 -```  
184 -try {  
185 - doSomething();  
186 -} catch (err) {  
187 - doSomething2();  
188 -} finally {  
189 - doSomething3();  
190 -}  
191 -```  
192 -  
193 -## 模块化规范  
194 -* 模块开头require加载所有依赖模块  
195 -  
196 -```  
197 -var $ = require('yoho.jquery'),  
198 - flip = require('../plugin/flip'); //普通文件  
199 -  
200 -require('../plguin/login');  
201 -```  
202 -  
203 -* 模块抛出接口应该给予注释说明功能和使用方法  
1 -##公共头部模拟数据  
2 -  
3 -```javascript  
4 -var pageHeader = {  
5 - navBack: true,  
6 - navTitle: '逛',  
7 - navBtn: {  
8 - indexUrl: '#',  
9 - categoryUrl: '#',  
10 - shoppingCartUrl: '#',  
11 - mineUrl: '#'  
12 - }  
13 - };  
14 -```  
15 -##公共底部模拟数据  
16 -  
17 -```javascript  
18 -var pageFooter = true;  
19 -```  
@@ -11,9 +11,9 @@ @@ -11,9 +11,9 @@
11 {{# isDiscount}} 11 {{# isDiscount}}
12 <p class="good-tag sale-tag">SALE</p> 12 <p class="good-tag sale-tag">SALE</p>
13 {{/ isDiscount}} 13 {{/ isDiscount}}
14 - {{# isYohoood}}  
15 - <p class="good-tag running-man-tag">跑男同款</p>  
16 - {{/ isYohoood}} 14 + {{# isYohood}}
  15 + <p class="good-tag new-festival-tag">新品节</p>
  16 + {{/ isYohood}}
17 {{# isLimited}} 17 {{# isLimited}}
18 <p class="good-tag limit-tag">限量商品</p> 18 <p class="good-tag limit-tag">限量商品</p>
19 {{/ isLimited}} 19 {{/ isLimited}}

29.4 KB | W: | H:

36.6 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin
@@ -445,6 +445,7 @@ AsideSlider.prototype.init = function() { @@ -445,6 +445,7 @@ AsideSlider.prototype.init = function() {
445 'transform': translate, 445 'transform': translate,
446 '-webkit-transform': translate, 446 '-webkit-transform': translate,
447 }); 447 });
  448 + me.isFirst=false;
448 y = deltaY; 449 y = deltaY;
449 }) 450 })
450 451
1 var $ = require('yoho-jquery'); 1 var $ = require('yoho-jquery');
2 var tip = require('../plugin/tip'); 2 var tip = require('../plugin/tip');
3 var AsideSlider = require('./aslider'); 3 var AsideSlider = require('./aslider');
4 -var yas = window._yas || {  
5 - sendCustomInfo: function() {}  
6 -}; 4 +
  5 +// var yas = window._yas || {
  6 +// sendCustomInfo: function() {}
  7 +// };
7 8
8 var STUDENTCOOKIES = 'STUDENTCOOKIES'; 9 var STUDENTCOOKIES = 'STUDENTCOOKIES';
9 10
@@ -71,6 +72,7 @@ function isValidate(rules, datas) { @@ -71,6 +72,7 @@ function isValidate(rules, datas) {
71 reg, 72 reg,
72 rule; 73 rule;
73 74
  75 + datas = datas || {};
74 for (name in rules) { 76 for (name in rules) {
75 if (datas.hasOwnProperty(name)) { 77 if (datas.hasOwnProperty(name)) {
76 data = datas[name]; 78 data = datas[name];
@@ -89,6 +91,9 @@ function isValidate(rules, datas) { @@ -89,6 +91,9 @@ function isValidate(rules, datas) {
89 if (rule.is !== void (0) && data !== rule.is) { 91 if (rule.is !== void (0) && data !== rule.is) {
90 message = rule.msg; 92 message = rule.msg;
91 } 93 }
  94 + }else {
  95 + message = 'cookie 存储数据不全';
  96 + break;
92 } 97 }
93 } 98 }
94 return message; 99 return message;
@@ -134,7 +139,7 @@ function setFormByCookes(item) { @@ -134,7 +139,7 @@ function setFormByCookes(item) {
134 item.education_degree && $('#s-education-tb').val(item.education_degree); 139 item.education_degree && $('#s-education-tb').val(item.education_degree);
135 item.enrollment_year && $('#s-year-tb').val(item.enrollment_year); 140 item.enrollment_year && $('#s-year-tb').val(item.enrollment_year);
136 item.provinceName && $('#s-province-tb').val(item.provinceName); 141 item.provinceName && $('#s-province-tb').val(item.provinceName);
137 - if (item.procode) { 142 + if (item.procode && item.procode !== 'undefined') {
138 province.selected().areaCode = item.procode; 143 province.selected().areaCode = item.procode;
139 province.selected().addresseeName = item.provinceName; 144 province.selected().addresseeName = item.provinceName;
140 } 145 }
@@ -229,7 +234,7 @@ Filter.prototype = { @@ -229,7 +234,7 @@ Filter.prototype = {
229 var html = [], 234 var html = [],
230 name; 235 name;
231 236
232 - if (this.__select__ && this.__title__) { 237 + if (this.__select__ && this.__title__ && this.__select__[this.__feild__]) {
233 html.push('<h6 class=\'s-title\'>当前地区</h6>'); 238 html.push('<h6 class=\'s-title\'>当前地区</h6>');
234 html.push('<div class=\'s-item close\'>' + this.__select__[this.__feild__] + '</div>'); 239 html.push('<div class=\'s-item close\'>' + this.__select__[this.__feild__] + '</div>');
235 } 240 }
@@ -400,12 +405,15 @@ $(document).on('click', '.s-submit', function() { @@ -400,12 +405,15 @@ $(document).on('click', '.s-submit', function() {
400 data: obj.data 405 data: obj.data
401 }).then(function(data) { 406 }).then(function(data) {
402 if (+data.code === 200) { 407 if (+data.code === 200) {
403 - yas.sendCustomInfo({  
404 - EVENT: 'YB_STUDENT_ATTCT_SUBMIT',  
405 - C_ID: C_ID,  
406 - SRC_ID: 5,  
407 - SUBMIT_RES: 1  
408 - }, false); 408 + if (window._yas && window._yas.sendCustomInfo) {
  409 + window._yas.sendCustomInfo({
  410 + EVENT: 'YB_STUDENT_ATTCT_SUBMIT',
  411 + C_ID: C_ID,
  412 + SRC_ID: 5,
  413 + SUBMIT_RES: 1
  414 + }, false);
  415 + }
  416 +
409 location.href = data.data; 417 location.href = data.data;
410 } else { 418 } else {
411 tip.show(data.message); 419 tip.show(data.message);
@@ -421,13 +429,16 @@ $(document).on('click', '.s-submit', function() { @@ -421,13 +429,16 @@ $(document).on('click', '.s-submit', function() {
421 } else { 429 } else {
422 FAILURE_CAUSE = 2; 430 FAILURE_CAUSE = 2;
423 } 431 }
424 - yas.sendCustomInfo({  
425 - EVENT: 'YB_STUDENT_ATTCT_SUBMIT',  
426 - C_ID: C_ID,  
427 - SRC_ID: 5,  
428 - SUBMIT_RES: 2,  
429 - FAILURE_CAUSE: FAILURE_CAUSE  
430 - }, true); 432 + if (window._yas && window._yas.sendCustomInfo) {
  433 + window._yas.sendCustomInfo({
  434 + EVENT: 'YB_STUDENT_ATTCT_SUBMIT',
  435 + C_ID: C_ID,
  436 + SRC_ID: 5,
  437 + SUBMIT_RES: 2,
  438 + FAILURE_CAUSE: FAILURE_CAUSE
  439 + }, true);
  440 + }
  441 +
431 } 442 }
432 }); 443 });
433 444
@@ -447,8 +458,14 @@ $('#tb-is-read').change(function() { @@ -447,8 +458,14 @@ $('#tb-is-read').change(function() {
447 458
448 459
449 // 埋点 学生认证-信息填写页面 460 // 埋点 学生认证-信息填写页面
450 -yas.sendCustomInfo({  
451 - EVENT: 'YB_STUDENT_ATTCT_INFO',  
452 - C_ID: C_ID,  
453 - SRC_ID: 5  
454 -}, true); 461 +setTimeout(function() {
  462 + if (window._yas && window._yas.sendCustomInfo) {
  463 + window._yas.sendCustomInfo({
  464 + EVENT: 'YB_STUDENT_ATTCT_INFO',
  465 + C_ID: C_ID,
  466 + SRC_ID: 5
  467 + }, true);
  468 + }
  469 +}, 2000);
  470 +
  471 +
@@ -6,9 +6,6 @@ var $ = require('yoho-jquery'), @@ -6,9 +6,6 @@ var $ = require('yoho-jquery'),
6 6
7 var _weChatInterface = '//m.yohobuy.com/life/getSignPackage', 7 var _weChatInterface = '//m.yohobuy.com/life/getSignPackage',
8 wx = window.wx, 8 wx = window.wx,
9 - yas = window.yas || {  
10 - sendCustomInfo: function() {}  
11 - },  
12 C_ID, 9 C_ID,
13 getChannel; 10 getChannel;
14 11
@@ -199,22 +196,30 @@ if (typeof wx !== 'undefined') { @@ -199,22 +196,30 @@ if (typeof wx !== 'undefined') {
199 wx.onMenuShareWeibo(shareData); 196 wx.onMenuShareWeibo(shareData);
200 }); 197 });
201 } 198 }
202 -if ($('.s-verify-fail').size()) {  
203 - yas.sendCustomInfo({  
204 - EVENT: 'YB_STUDENT_ATTCT_RESULT',  
205 - C_ID: C_ID,  
206 - SRC_ID: 5,  
207 - ATTCT_RES: 1,  
208 - FAILURE_CAUSE: ''  
209 - }, true);  
210 -} else {  
211 - // 埋点 学生营销宣传首页  
212 - yas.sendCustomInfo({  
213 - EVENT: 'YB_STUDENT_HOME',  
214 - C_ID: C_ID,  
215 - SRC_ID: 1  
216 - }, true);  
217 -} 199 +
  200 +setTimeout(function() {
  201 + if ($('.s-verify-fail').size()) {
  202 + if (window._yas && window._yas.sendCustomInfo) {
  203 + window._yas.sendCustomInfo({
  204 + EVENT: 'YB_STUDENT_ATTCT_RESULT',
  205 + C_ID: C_ID,
  206 + SRC_ID: 5,
  207 + ATTCT_RES: 1,
  208 + FAILURE_CAUSE: ''
  209 + }, true);
  210 + }
  211 + } else {
  212 + // 埋点 学生营销宣传首页
  213 + if (window._yas && window._yas.sendCustomInfo) {
  214 + window._yas.sendCustomInfo({
  215 + EVENT: 'YB_STUDENT_HOME',
  216 + C_ID: C_ID,
  217 + SRC_ID: 1
  218 + }, true);
  219 + }
  220 + }
  221 +}, 3000);
  222 +
218 223
219 224
220 225
@@ -234,9 +239,11 @@ $('.swiper-slide', '.banner-top').click(function() { @@ -234,9 +239,11 @@ $('.swiper-slide', '.banner-top').click(function() {
234 F_INDEX: 1, 239 F_INDEX: 1,
235 I_INDEX: index 240 I_INDEX: index
236 }; 241 };
237 - yas.sendCustomInfo(options, false); 242 + if (window._yas && window._yas.sendCustomInfo) {
  243 + window._yas.sendCustomInfo(options, true);
  244 + }
238 245
239 -// return false; 246 + // return false;
240 }); 247 });
241 $('.s-activity', '.s-section').click(function() { 248 $('.s-activity', '.s-section').click(function() {
242 var options; 249 var options;
@@ -253,7 +260,9 @@ $('.s-activity', '.s-section').click(function() { @@ -253,7 +260,9 @@ $('.s-activity', '.s-section').click(function() {
253 F_INDEX: 3, 260 F_INDEX: 3,
254 I_INDEX: index 261 I_INDEX: index
255 }; 262 };
256 - yas.sendCustomInfo(options, false); 263 + if (window._yas && window._yas.sendCustomInfo) {
  264 + window._yas.sendCustomInfo(options, true);
  265 + }
257 }); 266 });
258 $('.good-info', '.goods-list').click(function() { 267 $('.good-info', '.goods-list').click(function() {
259 var options; 268 var options;
@@ -270,5 +279,9 @@ $('.good-info', '.goods-list').click(function() { @@ -270,5 +279,9 @@ $('.good-info', '.goods-list').click(function() {
270 F_INDEX: 4, 279 F_INDEX: 4,
271 I_INDEX: index 280 I_INDEX: index
272 }; 281 };
273 - yas.sendCustomInfo(options, false); 282 + if (window._yas && window._yas.sendCustomInfo) {
  283 + window._yas.sendCustomInfo(options, true);
  284 + }
274 }); 285 });
  286 +
  287 +
@@ -10,6 +10,7 @@ var plusstar = {}, @@ -10,6 +10,7 @@ var plusstar = {},
10 require('../common'); 10 require('../common');
11 11
12 plusstar = { 12 plusstar = {
  13 + scrollObj: {},
13 init: function() { 14 init: function() {
14 var that = this, 15 var that = this,
15 $liDom, 16 $liDom,
@@ -49,6 +50,12 @@ plusstar = { @@ -49,6 +50,12 @@ plusstar = {
49 tabNav: function(code) { 50 tabNav: function(code) {
50 var that = this; 51 var that = this;
51 52
  53 + if (typeof this.scrollObj[code] === 'undefined') {
  54 + // 如果不是第一次点击,回顶部
  55 + $(document).scrollTop(0);
  56 + this.scrollObj[code] = true;
  57 + }
  58 +
52 loading.showLoadingMask(); 59 loading.showLoadingMask();
53 $.ajax({ 60 $.ajax({
54 type: 'GET', 61 type: 'GET',
@@ -71,7 +78,7 @@ plusstar = { @@ -71,7 +78,7 @@ plusstar = {
71 loading.hideLoadingMask(); 78 loading.hideLoadingMask();
72 lazyLoad($('img.lazy')); 79 lazyLoad($('img.lazy'));
73 80
74 - //处理左右滑动,未加载的图片 81 + // 处理左右滑动,未加载的图片
75 setTimeout(function() { 82 setTimeout(function() {
76 $('img.lazy').each(function() { 83 $('img.lazy').each(function() {
77 if ($(this).attr('src') !== $(this).data('original')) { 84 if ($(this).attr('src') !== $(this).data('original')) {
@@ -239,13 +239,15 @@ @@ -239,13 +239,15 @@
239 .s-title { 239 .s-title {
240 padding: 30px 0; 240 padding: 30px 0;
241 } 241 }
242 - 242 + .s-content{
  243 + border-top: 1px solid #e0e0e0;
  244 + }
243 .s-section { 245 .s-section {
244 border-left: 1px solid #e0e0e0; 246 border-left: 1px solid #e0e0e0;
245 border-bottom: 1px solid #e0e0e0; 247 border-bottom: 1px solid #e0e0e0;
246 width: 50%; 248 width: 50%;
247 /* padding:30px 0px 30px 40px; */ 249 /* padding:30px 0px 30px 40px; */
248 - height: 174px; 250 + height: 152px;
249 background-color: #ffffff; 251 background-color: #ffffff;
250 display: table; 252 display: table;
251 float: left; 253 float: left;
@@ -397,6 +399,10 @@ @@ -397,6 +399,10 @@
397 border-bottom: 1px solid #e0e0e0; 399 border-bottom: 1px solid #e0e0e0;
398 position: relative; 400 position: relative;
399 401
  402 + input::-webkit-input-placeholder{
  403 + font-family: helvetica, Arial, "黑体";
  404 + font-weight:lighter;
  405 + }
400 label { 406 label {
401 width: 174px; 407 width: 174px;
402 display: inline-block; 408 display: inline-block;
@@ -43,9 +43,12 @@ @@ -43,9 +43,12 @@
43 } 43 }
44 44
45 .new-festival-tag { 45 .new-festival-tag {
46 - width: 90px;  
47 - background-color: #000;  
48 - color: #fff; 46 + color: #000;
  47 + width: 100px;
  48 + background-image: resolve("product/new-festival.png");
  49 + background-repeat: no-repeat;
  50 + background-color: #fff;
  51 + background-size: 100px 28px;
49 } 52 }
50 53
51 .limit-tag { 54 .limit-tag {
@@ -14,6 +14,9 @@ @@ -14,6 +14,9 @@
14 height: 80px; 14 height: 80px;
15 font-size: 16px; 15 font-size: 16px;
16 text-align: center; 16 text-align: center;
  17 + position: fixed;
  18 + z-index: 10;
  19 + background-color: #fff;
17 20
18 li { 21 li {
19 display: block; 22 display: block;
@@ -49,6 +52,12 @@ @@ -49,6 +52,12 @@
49 } 52 }
50 } 53 }
51 54
  55 + .plusstar-resources:before {
  56 + height: 72px;
  57 + content: "";
  58 + display: inline-block;
  59 + }
  60 +
52 .resources { 61 .resources {
53 background: #f6f6f6; 62 background: #f6f6f6;
54 63
@@ -72,15 +81,13 @@ @@ -72,15 +81,13 @@
72 .header-title { 81 .header-title {
73 position: relative; 82 position: relative;
74 width: 100%; 83 width: 100%;
75 - height: 100px; 84 + height: 70px;
76 font-size: 28px; 85 font-size: 28px;
77 - line-height: 100px; 86 + line-height: 70px;
78 text-align: center; 87 text-align: center;
79 font-weight: bold; 88 font-weight: bold;
80 - border-top: 1px solid #eee;  
81 margin: 0; 89 margin: 0;
82 margin-top: 20px; 90 margin-top: 20px;
83 - background: #fff;  
84 91
85 .more { 92 .more {
86 position: absolute; 93 position: absolute;
@@ -88,6 +95,8 @@ @@ -88,6 +95,8 @@
88 right: 0; 95 right: 0;
89 width: 100px; 96 width: 100px;
90 height: 100px; 97 height: 100px;
  98 + color: #b0b0b0;
  99 + font-size: 50px;
91 } 100 }
92 101
93 &:first-child { 102 &:first-child {
@@ -178,14 +187,12 @@ @@ -178,14 +187,12 @@
178 a { 187 a {
179 display: inline-block; 188 display: inline-block;
180 width: 50%; 189 width: 50%;
181 - height: 375px;  
182 overflow: hidden; 190 overflow: hidden;
183 } 191 }
  192 + }
184 193
185 - img {  
186 - width: 100%;  
187 - height: 100%;  
188 - } 194 + .goods {
  195 + background-color: #fff;
189 } 196 }
190 } 197 }
191 } 198 }
@@ -156,8 +156,12 @@ $basicBtnC: #eb0313; @@ -156,8 +156,12 @@ $basicBtnC: #eb0313;
156 } 156 }
157 157
158 .new-festival-tag { 158 .new-festival-tag {
159 - background-color: #000;  
160 - color: #fff; 159 + color: #000;
  160 + width: 120px;
  161 + background-image: resolve("product/new-festival.png");
  162 + background-repeat: no-repeat;
  163 + background-color: #fff;
  164 + background-size: 120px 38px;
161 } 165 }
162 166
163 .yohood-tag { 167 .yohood-tag {