Merge branch 'release/4.6' of git.yoho.cn:fe/yohobuy-node into release/4.6
Showing
3 changed files
with
7 additions
and
9 deletions
@@ -177,8 +177,8 @@ const getSubNav = (data, type) => { | @@ -177,8 +177,8 @@ const getSubNav = (data, type) => { | ||
177 | * @param {String} 指定页面类型为boys,girls,kids,lifestyle | 177 | * @param {String} 指定页面类型为boys,girls,kids,lifestyle |
178 | * @return {object} 头部数据 | 178 | * @return {object} 头部数据 |
179 | */ | 179 | */ |
180 | -const setHeaderData = (resData, type) => { | ||
181 | - let data = { | 180 | +const setHeaderData = (resData, type) => ( |
181 | + { | ||
182 | headerData: { | 182 | headerData: { |
183 | header: true, | 183 | header: true, |
184 | headType: type, | 184 | headType: type, |
@@ -186,10 +186,8 @@ const setHeaderData = (resData, type) => { | @@ -186,10 +186,8 @@ const setHeaderData = (resData, type) => { | ||
186 | navbars: resData ? getNavBar(resData, type) : [], | 186 | navbars: resData ? getNavBar(resData, type) : [], |
187 | subNav: resData ? getSubNav(resData, type) : [] | 187 | subNav: resData ? getSubNav(resData, type) : [] |
188 | } | 188 | } |
189 | - }; | ||
190 | - | ||
191 | - return data; | ||
192 | -}; | 189 | + } |
190 | +); | ||
193 | 191 | ||
194 | 192 | ||
195 | 193 |
@@ -78,7 +78,7 @@ function Dialog(options) { | @@ -78,7 +78,7 @@ function Dialog(options) { | ||
78 | } | 78 | } |
79 | 79 | ||
80 | // 绑定按钮事件 | 80 | // 绑定按钮事件 |
81 | - if (!!opt.btns) { | 81 | + if (opt.btns) { |
82 | for (i = 0; i < opt.btns.length; i++) { | 82 | for (i = 0; i < opt.btns.length; i++) { |
83 | bindBtnEvt(i); | 83 | bindBtnEvt(i); |
84 | } | 84 | } |
@@ -29,7 +29,7 @@ var $ = require('yoho-jquery'), | @@ -29,7 +29,7 @@ var $ = require('yoho-jquery'), | ||
29 | lazyLoad(this.$element.find('img.lazy')); | 29 | lazyLoad(this.$element.find('img.lazy')); |
30 | return; | 30 | return; |
31 | } | 31 | } |
32 | - if (!!this.options.pagination) { | 32 | + if (this.options.pagination) { |
33 | this.smallItem = $(this.options.pagination).find('li'); | 33 | this.smallItem = $(this.options.pagination).find('li'); |
34 | } else { | 34 | } else { |
35 | this._createPage(); | 35 | this._createPage(); |
@@ -170,4 +170,4 @@ var $ = require('yoho-jquery'), | @@ -170,4 +170,4 @@ var $ = require('yoho-jquery'), | ||
170 | orient: true, // 左右切换箭头的显示 | 170 | orient: true, // 左右切换箭头的显示 |
171 | pagination: null | 171 | pagination: null |
172 | }; | 172 | }; |
173 | -})($); | 173 | +}($)); |
-
Please register or login to post a comment