Commit c715c79d4ebc2bfd9c9f644dca1455c5fd6c0af6

Authored by 前端开发-罗建龙
1 parent c6250693

组合购分享优化

components/diy_goodsGroup/diy_goodsGroup.js
... ... @@ -573,7 +573,7 @@ Component({
573 573 }
574 574  
575 575 })
576   - console.error(th.data.requestData);
  576 + // console.error(th.data.requestData);
577 577 //-----------------------
578 578 if (th.data.object.column_action_name) {
579 579 if (th.data.object.style == 6 || th.data.object.style == 5) {
... ... @@ -643,7 +643,7 @@ Component({
643 643 },
644 644 // 加购方法 hide
645 645 hide_add_purchase(){
646   - console.error('隐藏加购方法。。。。');
  646 + // console.error('隐藏加购方法。。。。');
647 647 setTimeout(()=>{
648 648 this.setData({
649 649 add_purchase:false
... ...
components/diy_top_nav/diy_top_nav.js
... ... @@ -20,11 +20,11 @@ Component({
20 20 },
21 21 nav_frontColor:{
22 22 type:String,
23   - value:'#ffffff',
  23 + value:'#000',
24 24 },
25 25 nav_backgroundColor:{
26 26 type:String,
27   - value:'#ff7295',
  27 + value:'#ffffff',
28 28 },
29 29 is_share:{
30 30 type:Boolean,
... ...
packageB/pages/zuhegou/index/index.js
... ... @@ -20,6 +20,7 @@ Page({
20 20 showNum: false,
21 21 haveAdded: false,
22 22 imgDraw: {},
  23 + new_imgDraw:{},
23 24 id: 0, //获得活动id
24 25 page: 1, //第一页
25 26 no_more: 0, //没有更多
... ... @@ -38,6 +39,7 @@ Page({
38 39 sec_pick_index: 0, //门店选择的下标,地区选择之后的内页
39 40 userbuynum: false,//是否有超出购买次数,还是否可以购买。false 为可购买,true为不可购买
40 41 sales_map: {}, //线下销售的map
  42 + fxShow:false,//分享是否显示
41 43 },
42 44  
43 45 /**
... ... @@ -614,6 +616,8 @@ Page({
614 616 th.get_head_temp(function () {
615 617 var txt = th.data.act.zhprice + "元" + th.data.act.zhbuyqty + "件";
616 618 var imgDraw = th.data.imgDraw;
  619 + // console.error('头像地址1');
  620 + // console.error(th.data.share_head);
617 621 imgDraw.views[0].url = th.data.share_head;
618 622 imgDraw.views[1].text = userInfo.nickname;
619 623 imgDraw.views[3].text = txt;
... ... @@ -634,7 +638,14 @@ Page({
634 638 imgDraw.views[2].url = path22;
635 639 imgDraw.views[5].url = vpath;
636 640 th.setData({
637   - imgDraw: imgDraw
  641 + // ['imgDraw.views[0].url']:imgDraw.views[0].url,
  642 + // ['imgDraw.views[1].text']:imgDraw.views[1].text,
  643 + // ['imgDraw.views[2].text']:imgDraw.views[2].text,
  644 + // ['imgDraw.views[3].text']:imgDraw.views[3].text,
  645 + // ['imgDraw.views[4].text']:imgDraw.views[4].url,
  646 + imgDraw: imgDraw,
  647 + new_imgDraw:imgDraw,
  648 + fxShow:true
638 649 })
639 650 }
640 651 })
... ... @@ -649,6 +660,8 @@ Page({
649 660 th.get_head_temp(function () {
650 661 var imgDraw = th.data.imgDraw;
651 662 var txt = th.data.act.zhprice + "元" + th.data.act.zhbuyqty + "件";
  663 + // console.error('头像地址2');
  664 + // console.error(th.data.share_head);
652 665 imgDraw.views[0].url = th.data.share_head;
653 666 imgDraw.views[1].text = userInfo.nickname;
654 667 imgDraw.views[2].text = txt;
... ... @@ -670,7 +683,14 @@ Page({
670 683 var vpath = res.path;
671 684 imgDraw.views[4].url = vpath;
672 685 th.setData({
673   - imgDraw: imgDraw
  686 + // ['imgDraw.views[0].url']:imgDraw.views[0].url,
  687 + // ['imgDraw.views[1].text']:imgDraw.views[1].text,
  688 + // ['imgDraw.views[2].text']:imgDraw.views[2].text,
  689 + // ['imgDraw.views[3].text']:imgDraw.views[3].text,
  690 + // ['imgDraw.views[4].url']:imgDraw.views[4].url,
  691 + imgDraw: imgDraw,
  692 + new_imgDraw:imgDraw,
  693 + fxShow:true
674 694 })
675 695 }
676 696 })
... ... @@ -1442,7 +1462,9 @@ Page({
1442 1462 },
1443 1463  
1444 1464 onImgOK(e) {
1445   - console.log(e.detail.path);
  1465 + // console.error('绘制返回------------');
  1466 + // console.error(e);
  1467 + // console.log(e.detail.path);
1446 1468 this.setData({
1447 1469 myimg: e.detail.path,
1448 1470 });
... ... @@ -1541,7 +1563,8 @@ Page({
1541 1563 //---获取分享图片的本地地址,头像和商品图片----
1542 1564 var path2 = getApp().globalData.userInfo.head_pic;
1543 1565 if (path2 == "") {
1544   - ee.data.share_head = "../../../../images/share/hui_hear_pic.png";
  1566 + // ee.data.share_head = "../../../../images/share/hui_hear_pic.png";
  1567 + ee.data.share_head = "https://mshopimg.yolipai.net//miniapp/images/no-head.jpg";
1545 1568 tt();
1546 1569 } else {
1547 1570 path2 = path2.replace("http://thirdwx.qlogo.cn", "https://wx.qlogo.cn");
... ... @@ -1555,7 +1578,8 @@ Page({
1555 1578 tt();
1556 1579 },
1557 1580 fail: function () {
1558   - ee.data.share_head = "../../../../images/share/hui_hear_pic.png"; //分享的图片不能用网络的
  1581 + ee.data.share_head = "https://mshopimg.yolipai.net//miniapp/images/no-head.jpg";
  1582 + // ee.data.share_head = "../../../../images/share/hui_hear_pic.png"; //分享的图片不能用网络的
1559 1583 tt();
1560 1584 }
1561 1585 });
... ...
packageB/pages/zuhegou/index/index.wxml
... ... @@ -98,7 +98,7 @@
98 98 </view>
99 99 </view>
100 100 <!-- 分享 -->
101   - <view wx:if="{{imgDraw}}" class="share-container" bindtap="share">
  101 + <view wx:if="{{imgDraw && fxShow}}" class="share-container" bindtap="share">
102 102 <text class="iconfont icon-zhuanfa fs40"></text>
103 103 <view class="fs22 c-8">分享</view>
104 104 </view>
... ... @@ -155,7 +155,9 @@
155 155  
156 156 </view>
157 157  
158   -<painter style="position: absolute; top: -9999rpx;" palette="{{imgDraw}}" bind:imgOK="onImgOK"/>
  158 +
  159 + <painter style="position: absolute; top: -9999rpx;" palette="{{imgDraw}}" bind:imgOK="onImgOK"/>
  160 +
159 161 <!-- 活动异常提醒 -->
160 162 <catch wx:if="{{error}}">{{error}}</catch>
161 163 <warn id="warn"></warn>
... ...
pages/index/index/index.js
... ... @@ -91,8 +91,8 @@ Page({
91 91 is_full_screen_navigation: false, //是否满屏
92 92 is_full_screen_navigation_index: -1, //广告轮播满屏下标
93 93 nav_title: '首页',
94   - nav_frontColor: "#ffffff",
95   - nav_backgroundColor: "#ff7295",
  94 + nav_frontColor: "#000",
  95 + nav_backgroundColor: "#fff",
96 96 nav_type: 1, //导航类型
97 97 searchbox_transparent: 1, //搜索框背景是否透明
98 98 is_show_top:0, //是否置顶显示
... ... @@ -331,8 +331,8 @@ Page({
331 331 backgroundColor: '#ff7295', // 必写项
332 332 })
333 333 this.setData({
334   - nav_frontColor: '#ffffff', // 必写项
335   - nav_backgroundColor: '#ff7295', // 必写项
  334 + nav_frontColor: '#000', // 必写项
  335 + nav_backgroundColor: '#fff', // 必写项
336 336 })
337 337 }
338 338  
... ... @@ -1023,7 +1023,7 @@ Page({
1023 1023 this.setData({
1024 1024 nav_type: 1,
1025 1025 searchbox_transparent: 1,
1026   - nav_frontColor: '#fff'
  1026 + nav_frontColor: '#000'
1027 1027 })
1028 1028 // this.data.nav_type = 1
1029 1029 }
... ...
pages/index/index/index.wxml
... ... @@ -23,7 +23,7 @@
23 23 </block>
24 24  
25 25 <view class="top-bar">
26   - <top_nav nav_type="{{0}}" nav_frontColor="{{nav_frontColor}}" nav_backgroundColor="{{nav_backgroundColor ? nav_backgroundColor :'#fff'}}" nav_title="{{nav_title}}"></top_nav>
  26 + <top_nav nav_type="{{0}}" nav_frontColor="{{'#fff'}}" nav_backgroundColor="{{'#ff7295'}}" nav_title="{{nav_title}}"></top_nav>
27 27  
28 28 <!-- 顶部关注公众号 -->
29 29 <view id="off_top" wx:if="{{is_gz_h5}}">
... ...
pages/template/index.js
... ... @@ -17,8 +17,8 @@ Page({
17 17 is_full_screen_navigation: false, //是否满屏
18 18 is_full_screen_navigation_index: -1, //广告轮播满屏下标
19 19 nav_title: '首页',
20   - nav_frontColor: "#ffffff",
21   - nav_backgroundColor: "#ff7295",
  20 + nav_frontColor: "#000",
  21 + nav_backgroundColor: "#fff",
22 22 nav_type: 1, //导航类型
23 23 searchbox_transparent: 1, //搜索框背景是否透明
24 24  
... ... @@ -243,7 +243,7 @@ Page({
243 243 this.setData({
244 244 nav_type: 1,
245 245 searchbox_transparent: 1,
246   - nav_frontColor: '#fff'
  246 + nav_frontColor: '#000'
247 247 })
248 248 // this.data.nav_type = 1
249 249 }
... ...