Authored by 陈轩

Merge remote-tracking branch 'origin/develop' into develop

@@ -43,7 +43,7 @@ module.exports = { @@ -43,7 +43,7 @@ module.exports = {
43 order: req.query.order || 's_t_desc', 43 order: req.query.order || 's_t_desc',
44 limit: req.query.limit || '60', 44 limit: req.query.limit || '60',
45 color: req.query.color, 45 color: req.query.color,
46 - price: req.query.price, 46 + price: req.query.priceRange,
47 size: req.query.size, 47 size: req.query.size,
48 pd: req.query.pd, 48 pd: req.query.pd,
49 tagsFilter: req.query.tagsFilter 49 tagsFilter: req.query.tagsFilter
@@ -34,19 +34,21 @@ Vue.mixin({ @@ -34,19 +34,21 @@ Vue.mixin({
34 $(() => { 34 $(() => {
35 const $body = $('body'); 35 const $body = $('body');
36 36
  37 + // 页面内无 JS 时, 自动隐藏 App 显示的 Loading
37 if ($body.hasClass('no-local-js')) { 38 if ($body.hasClass('no-local-js')) {
38 yoho.showLoading(false); // 隐藏 App 默认显示的 loading 39 yoho.showLoading(false); // 隐藏 App 默认显示的 loading
39 util.visibilitychange(); 40 util.visibilitychange();
40 } 41 }
41 42
  43 + // 拦截页面内所有 a 标签的跳转
42 $body.on('click', 'a[href]', function() { 44 $body.on('click', 'a[href]', function() {
43 - // 拦截跳转  
44 if (!$(this).hasClass('no-intercept')) { 45 if (!$(this).hasClass('no-intercept')) {
45 interceptClick.intercept($(this).attr('href')); 46 interceptClick.intercept($(this).attr('href'));
46 return false; 47 return false;
47 } 48 }
48 }); 49 });
49 50
  51 + // App 发送给 H5 的事件,统一转为 Vue-bus 的事件
50 yoho.addNativeMethod('triggerH5Event', (eventName) => { 52 yoho.addNativeMethod('triggerH5Event', (eventName) => {
51 alert(eventName); 53 alert(eventName);
52 bus.$emit(eventName); 54 bus.$emit(eventName);
@@ -233,7 +233,7 @@ const yoho = { @@ -233,7 +233,7 @@ const yoho = {
233 */ 233 */
234 goSearch(args, success, fail) { 234 goSearch(args, success, fail) {
235 if (this.isApp && window.yohoInterface) { 235 if (this.isApp && window.yohoInterface) {
236 - window.yohoInterface.triggerEvent(success || function() {}, fail || function() {}, { 236 + window.yohoInterface.triggerEvent(success || nullFun, fail || nullFun, {
237 method: 'go.search', 237 method: 'go.search',
238 arguments: args 238 arguments: args
239 }); 239 });
@@ -250,7 +250,7 @@ const yoho = { @@ -250,7 +250,7 @@ const yoho = {
250 */ 250 */
251 goSetting(args, success, fail) { 251 goSetting(args, success, fail) {
252 if (this.isApp && window.yohoInterface) { 252 if (this.isApp && window.yohoInterface) {
253 - window.yohoInterface.triggerEvent(success || function() {}, fail || function() {}, { 253 + window.yohoInterface.triggerEvent(success || nullFun, fail || nullFun, {
254 method: 'go.setting', 254 method: 'go.setting',
255 arguments: args 255 arguments: args
256 }); 256 });
@@ -267,7 +267,7 @@ const yoho = { @@ -267,7 +267,7 @@ const yoho = {
267 */ 267 */
268 goSetAvatar(args, success, fail) { 268 goSetAvatar(args, success, fail) {
269 if (this.isApp && window.yohoInterface) { 269 if (this.isApp && window.yohoInterface) {
270 - window.yohoInterface.triggerEvent(success || function() {}, fail || function() {}, { 270 + window.yohoInterface.triggerEvent(success || nullFun, fail || nullFun, {
271 method: 'go.setAvatar', 271 method: 'go.setAvatar',
272 arguments: args 272 arguments: args
273 }); 273 });
@@ -284,7 +284,7 @@ const yoho = { @@ -284,7 +284,7 @@ const yoho = {
284 */ 284 */
285 goPageView(args, success, fail) { 285 goPageView(args, success, fail) {
286 if (this.isApp && window.yohoInterface) { 286 if (this.isApp && window.yohoInterface) {
287 - window.yohoInterface.triggerEvent(success || function() {}, fail || function() {}, { 287 + window.yohoInterface.triggerEvent(success || nullFun, fail || nullFun, {
288 method: 'go.pageView', 288 method: 'go.pageView',
289 arguments: args 289 arguments: args
290 }); 290 });
@@ -301,7 +301,7 @@ const yoho = { @@ -301,7 +301,7 @@ const yoho = {
301 */ 301 */
302 showLoading(args, success, fail) { 302 showLoading(args, success, fail) {
303 if (this.isApp && window.yohoInterface) { 303 if (this.isApp && window.yohoInterface) {
304 - window.yohoInterface.triggerEvent(success || function() {}, fail || function() {}, { 304 + window.yohoInterface.triggerEvent(success || nullFun, fail || nullFun, {
305 method: 'go.loading', 305 method: 'go.loading',
306 arguments: { 306 arguments: {
307 show: args ? 'yes' : 'no' 307 show: args ? 'yes' : 'no'