Commit d0d104b8791c5df4ecaeb6a756a450b9ff7a90d6

Authored by 王强
1 parent a2cdfb73

新版活动页面,百元公益,添加页面渠道码~

src/components/shopGoodsBox/goodsBox.vue
@@ -76,8 +76,6 @@ @@ -76,8 +76,6 @@
76 // scrollItemBox = (scrollItemBox + ((30 * multiple * (childrens.length - 1)))) / clientWidth * this.basicWidth; 76 // scrollItemBox = (scrollItemBox + ((30 * multiple * (childrens.length - 1)))) / clientWidth * this.basicWidth;
77 scrollItemBox = (scrollItemBox / clientWidth * this.basicWidth); 77 scrollItemBox = (scrollItemBox / clientWidth * this.basicWidth);
78 78
79 - console.log(scrollItemBox);  
80 -  
81 // 判断scrollItemBox值,更新this.scrollItemBox宽度 79 // 判断scrollItemBox值,更新this.scrollItemBox宽度
82 if (scrollItemBox > this.basicWidth) { 80 if (scrollItemBox > this.basicWidth) {
83 this.$set(this, "scrollItemBox", scrollItemBox); 81 this.$set(this, "scrollItemBox", scrollItemBox);
src/components/shopGoodsList_2/goodsList.vue
@@ -74,9 +74,6 @@ @@ -74,9 +74,6 @@
74 * @param {object} goods [商品详情对象] 74 * @param {object} goods [商品详情对象]
75 */ 75 */
76 toDetail(goods) { 76 toDetail(goods) {
77 -  
78 - console.info("Goodlist gotoDetail:"+JSON.stringify(goods));  
79 -  
80 if (typeof this.funcs === "object" && typeof this.funcs.toDetail === "function") { 77 if (typeof this.funcs === "object" && typeof this.funcs.toDetail === "function") {
81 this.funcs.toDetail(goods); 78 this.funcs.toDetail(goods);
82 } 79 }
src/pages/activities/activities.vue
@@ -503,6 +503,13 @@ @@ -503,6 +503,13 @@
503 // 判断是否有函数 503 // 判断是否有函数
504 if (typeof this.$parent.gotoDetail === "function") { 504 if (typeof this.$parent.gotoDetail === "function") {
505 505
  506 + // 判断如果id = 33,是“百元公益”活动,设置页面渠道码
  507 + if (this.$route.query.id == '33') {
  508 +
  509 + // 添加activityCode参数
  510 + this.$set(this.$route.query, 'activityCode', 'ds_bygy');
  511 + }
  512 +
506 // 调用通用跳转函数 513 // 调用通用跳转函数
507 this.$parent.gotoDetail(goods, this.$route.query); 514 this.$parent.gotoDetail(goods, this.$route.query);
508 } 515 }
src/pages/activities/activity11.vue
@@ -704,8 +704,6 @@ @@ -704,8 +704,6 @@
704 */ 704 */
705 marketChannelCouponShopCallback(res, ext) { 705 marketChannelCouponShopCallback(res, ext) {
706 706
707 - console.info(res)  
708 -  
709 // 返回处理 707 // 返回处理
710 // if (res.statusCode === 200 && res.data.code == 200) { 708 // if (res.statusCode === 200 && res.data.code == 200) {
711 if (res.code == 200) { 709 if (res.code == 200) {
@@ -713,8 +711,6 @@ @@ -713,8 +711,6 @@
713 // 解构数据 711 // 解构数据
714 // let {data: datas} = res.data; 712 // let {data: datas} = res.data;
715 let datas =res.data; 713 let datas =res.data;
716 -  
717 - console.info(datas)  
718 714
719 // 设置优惠券数据 715 // 设置优惠券数据
720 if (datas.list && datas.list.length) { 716 if (datas.list && datas.list.length) {
src/pages/common/common.vue
@@ -502,11 +502,9 @@ @@ -502,11 +502,9 @@
502 */ 502 */
503 gotoDetail(goods, query) { 503 gotoDetail(goods, query) {
504 504
505 - console.info("commmon gotoDetail:"+JSON.stringify(goods));  
506 -  
507 // let params = null; 505 // let params = null;
508 506
509 - let params=this.getParams(this.mode); 507 + let params = this.getParams(this.mode);
510 508
511 // 提取key,判断是广告位还是详情 509 // 提取key,判断是广告位还是详情
512 let keyArr = Object.keys(goods); 510 let keyArr = Object.keys(goods);
@@ -532,22 +530,40 @@ @@ -532,22 +530,40 @@
532 to: goods.to, 530 to: goods.to,
533 shop_type: goods.shop_type 531 shop_type: goods.shop_type
534 }; 532 };
  533 +
  534 + // 判断是否是请求商品详情页面
  535 + if (options.type == '2') {
  536 +
  537 + // 按如果有query参数,并且有query.activityCode参数,设置activityCode参数
  538 + if (query !== null && typeof query === 'object' && query.activityCode) {
  539 +
  540 + // 设置渠道页面参数
  541 + this.$set(options, 'activity_code', query.activityCode);
  542 + }
  543 + }
535 544
536 // 商品详情处理 545 // 商品详情处理
537 } else { 546 } else {
538 547
539 // 设置参数 548 // 设置参数
540 options = { 549 options = {
541 - type: "2", 550 + type: '2',
542 to: goods.id, 551 to: goods.id,
543 shop_type: goods.shop_type 552 shop_type: goods.shop_type
544 }; 553 };
  554 +
  555 + // 按如果有query参数,并且有query.activityCode参数,设置activityCode参数
  556 + if (query !== null && typeof query === 'object' && query.activityCode) {
  557 +
  558 + // 设置渠道页面参数
  559 + this.$set(options, 'activity_code', query.activityCode);
  560 + }
545 } 561 }
546 562
547 // 调用App,提交参数 563 // 调用App,提交参数
548 - if(window.webkit && window.webkit.messageHandlers && window.webkit.messageHandlers.wjjToAppOnlineRetailers) { 564 + if (window.webkit && window.webkit.messageHandlers && window.webkit.messageHandlers.wjjToAppOnlineRetailers) {
549 window.webkit.messageHandlers.wjjToAppOnlineRetailers.postMessage({body: options}); 565 window.webkit.messageHandlers.wjjToAppOnlineRetailers.postMessage({body: options});
550 - } else if(window.obj && window.obj.wjjToAppOnlineRetailers) { 566 + } else if (window.obj && window.obj.wjjToAppOnlineRetailers) {
551 window.obj.wjjToAppOnlineRetailers(JSON.stringify(options)); 567 window.obj.wjjToAppOnlineRetailers(JSON.stringify(options));
552 } 568 }
553 }else{ 569 }else{