Commit c715c79d4ebc2bfd9c9f644dca1455c5fd6c0af6
1 parent
c6250693
组合购分享优化
Showing
7 changed files
with
46 additions
and
20 deletions
components/diy_goodsGroup/diy_goodsGroup.js
@@ -573,7 +573,7 @@ Component({ | @@ -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 | if (th.data.object.column_action_name) { | 578 | if (th.data.object.column_action_name) { |
579 | if (th.data.object.style == 6 || th.data.object.style == 5) { | 579 | if (th.data.object.style == 6 || th.data.object.style == 5) { |
@@ -643,7 +643,7 @@ Component({ | @@ -643,7 +643,7 @@ Component({ | ||
643 | }, | 643 | }, |
644 | // 加购方法 hide | 644 | // 加购方法 hide |
645 | hide_add_purchase(){ | 645 | hide_add_purchase(){ |
646 | - console.error('隐藏加购方法。。。。'); | 646 | + // console.error('隐藏加购方法。。。。'); |
647 | setTimeout(()=>{ | 647 | setTimeout(()=>{ |
648 | this.setData({ | 648 | this.setData({ |
649 | add_purchase:false | 649 | add_purchase:false |
components/diy_top_nav/diy_top_nav.js
@@ -20,11 +20,11 @@ Component({ | @@ -20,11 +20,11 @@ Component({ | ||
20 | }, | 20 | }, |
21 | nav_frontColor:{ | 21 | nav_frontColor:{ |
22 | type:String, | 22 | type:String, |
23 | - value:'#ffffff', | 23 | + value:'#000', |
24 | }, | 24 | }, |
25 | nav_backgroundColor:{ | 25 | nav_backgroundColor:{ |
26 | type:String, | 26 | type:String, |
27 | - value:'#ff7295', | 27 | + value:'#ffffff', |
28 | }, | 28 | }, |
29 | is_share:{ | 29 | is_share:{ |
30 | type:Boolean, | 30 | type:Boolean, |
packageB/pages/zuhegou/index/index.js
@@ -20,6 +20,7 @@ Page({ | @@ -20,6 +20,7 @@ Page({ | ||
20 | showNum: false, | 20 | showNum: false, |
21 | haveAdded: false, | 21 | haveAdded: false, |
22 | imgDraw: {}, | 22 | imgDraw: {}, |
23 | + new_imgDraw:{}, | ||
23 | id: 0, //获得活动id | 24 | id: 0, //获得活动id |
24 | page: 1, //第一页 | 25 | page: 1, //第一页 |
25 | no_more: 0, //没有更多 | 26 | no_more: 0, //没有更多 |
@@ -38,6 +39,7 @@ Page({ | @@ -38,6 +39,7 @@ Page({ | ||
38 | sec_pick_index: 0, //门店选择的下标,地区选择之后的内页 | 39 | sec_pick_index: 0, //门店选择的下标,地区选择之后的内页 |
39 | userbuynum: false,//是否有超出购买次数,还是否可以购买。false 为可购买,true为不可购买 | 40 | userbuynum: false,//是否有超出购买次数,还是否可以购买。false 为可购买,true为不可购买 |
40 | sales_map: {}, //线下销售的map | 41 | sales_map: {}, //线下销售的map |
42 | + fxShow:false,//分享是否显示 | ||
41 | }, | 43 | }, |
42 | 44 | ||
43 | /** | 45 | /** |
@@ -614,6 +616,8 @@ Page({ | @@ -614,6 +616,8 @@ Page({ | ||
614 | th.get_head_temp(function () { | 616 | th.get_head_temp(function () { |
615 | var txt = th.data.act.zhprice + "元" + th.data.act.zhbuyqty + "件"; | 617 | var txt = th.data.act.zhprice + "元" + th.data.act.zhbuyqty + "件"; |
616 | var imgDraw = th.data.imgDraw; | 618 | var imgDraw = th.data.imgDraw; |
619 | + // console.error('头像地址1'); | ||
620 | + // console.error(th.data.share_head); | ||
617 | imgDraw.views[0].url = th.data.share_head; | 621 | imgDraw.views[0].url = th.data.share_head; |
618 | imgDraw.views[1].text = userInfo.nickname; | 622 | imgDraw.views[1].text = userInfo.nickname; |
619 | imgDraw.views[3].text = txt; | 623 | imgDraw.views[3].text = txt; |
@@ -634,7 +638,14 @@ Page({ | @@ -634,7 +638,14 @@ Page({ | ||
634 | imgDraw.views[2].url = path22; | 638 | imgDraw.views[2].url = path22; |
635 | imgDraw.views[5].url = vpath; | 639 | imgDraw.views[5].url = vpath; |
636 | th.setData({ | 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,6 +660,8 @@ Page({ | ||
649 | th.get_head_temp(function () { | 660 | th.get_head_temp(function () { |
650 | var imgDraw = th.data.imgDraw; | 661 | var imgDraw = th.data.imgDraw; |
651 | var txt = th.data.act.zhprice + "元" + th.data.act.zhbuyqty + "件"; | 662 | var txt = th.data.act.zhprice + "元" + th.data.act.zhbuyqty + "件"; |
663 | + // console.error('头像地址2'); | ||
664 | + // console.error(th.data.share_head); | ||
652 | imgDraw.views[0].url = th.data.share_head; | 665 | imgDraw.views[0].url = th.data.share_head; |
653 | imgDraw.views[1].text = userInfo.nickname; | 666 | imgDraw.views[1].text = userInfo.nickname; |
654 | imgDraw.views[2].text = txt; | 667 | imgDraw.views[2].text = txt; |
@@ -670,7 +683,14 @@ Page({ | @@ -670,7 +683,14 @@ Page({ | ||
670 | var vpath = res.path; | 683 | var vpath = res.path; |
671 | imgDraw.views[4].url = vpath; | 684 | imgDraw.views[4].url = vpath; |
672 | th.setData({ | 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,7 +1462,9 @@ Page({ | ||
1442 | }, | 1462 | }, |
1443 | 1463 | ||
1444 | onImgOK(e) { | 1464 | onImgOK(e) { |
1445 | - console.log(e.detail.path); | 1465 | + // console.error('绘制返回------------'); |
1466 | + // console.error(e); | ||
1467 | + // console.log(e.detail.path); | ||
1446 | this.setData({ | 1468 | this.setData({ |
1447 | myimg: e.detail.path, | 1469 | myimg: e.detail.path, |
1448 | }); | 1470 | }); |
@@ -1541,7 +1563,8 @@ Page({ | @@ -1541,7 +1563,8 @@ Page({ | ||
1541 | //---获取分享图片的本地地址,头像和商品图片---- | 1563 | //---获取分享图片的本地地址,头像和商品图片---- |
1542 | var path2 = getApp().globalData.userInfo.head_pic; | 1564 | var path2 = getApp().globalData.userInfo.head_pic; |
1543 | if (path2 == "") { | 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 | tt(); | 1568 | tt(); |
1546 | } else { | 1569 | } else { |
1547 | path2 = path2.replace("http://thirdwx.qlogo.cn", "https://wx.qlogo.cn"); | 1570 | path2 = path2.replace("http://thirdwx.qlogo.cn", "https://wx.qlogo.cn"); |
@@ -1555,7 +1578,8 @@ Page({ | @@ -1555,7 +1578,8 @@ Page({ | ||
1555 | tt(); | 1578 | tt(); |
1556 | }, | 1579 | }, |
1557 | fail: function () { | 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 | tt(); | 1583 | tt(); |
1560 | } | 1584 | } |
1561 | }); | 1585 | }); |
packageB/pages/zuhegou/index/index.wxml
@@ -98,7 +98,7 @@ | @@ -98,7 +98,7 @@ | ||
98 | </view> | 98 | </view> |
99 | </view> | 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 | <text class="iconfont icon-zhuanfa fs40"></text> | 102 | <text class="iconfont icon-zhuanfa fs40"></text> |
103 | <view class="fs22 c-8">分享</view> | 103 | <view class="fs22 c-8">分享</view> |
104 | </view> | 104 | </view> |
@@ -155,7 +155,9 @@ | @@ -155,7 +155,9 @@ | ||
155 | 155 | ||
156 | </view> | 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 | <catch wx:if="{{error}}">{{error}}</catch> | 162 | <catch wx:if="{{error}}">{{error}}</catch> |
161 | <warn id="warn"></warn> | 163 | <warn id="warn"></warn> |
pages/index/index/index.js
@@ -91,8 +91,8 @@ Page({ | @@ -91,8 +91,8 @@ Page({ | ||
91 | is_full_screen_navigation: false, //是否满屏 | 91 | is_full_screen_navigation: false, //是否满屏 |
92 | is_full_screen_navigation_index: -1, //广告轮播满屏下标 | 92 | is_full_screen_navigation_index: -1, //广告轮播满屏下标 |
93 | nav_title: '首页', | 93 | nav_title: '首页', |
94 | - nav_frontColor: "#ffffff", | ||
95 | - nav_backgroundColor: "#ff7295", | 94 | + nav_frontColor: "#000", |
95 | + nav_backgroundColor: "#fff", | ||
96 | nav_type: 1, //导航类型 | 96 | nav_type: 1, //导航类型 |
97 | searchbox_transparent: 1, //搜索框背景是否透明 | 97 | searchbox_transparent: 1, //搜索框背景是否透明 |
98 | is_show_top:0, //是否置顶显示 | 98 | is_show_top:0, //是否置顶显示 |
@@ -331,8 +331,8 @@ Page({ | @@ -331,8 +331,8 @@ Page({ | ||
331 | backgroundColor: '#ff7295', // 必写项 | 331 | backgroundColor: '#ff7295', // 必写项 |
332 | }) | 332 | }) |
333 | this.setData({ | 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,7 +1023,7 @@ Page({ | ||
1023 | this.setData({ | 1023 | this.setData({ |
1024 | nav_type: 1, | 1024 | nav_type: 1, |
1025 | searchbox_transparent: 1, | 1025 | searchbox_transparent: 1, |
1026 | - nav_frontColor: '#fff' | 1026 | + nav_frontColor: '#000' |
1027 | }) | 1027 | }) |
1028 | // this.data.nav_type = 1 | 1028 | // this.data.nav_type = 1 |
1029 | } | 1029 | } |
pages/index/index/index.wxml
@@ -23,7 +23,7 @@ | @@ -23,7 +23,7 @@ | ||
23 | </block> | 23 | </block> |
24 | 24 | ||
25 | <view class="top-bar"> | 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 | <view id="off_top" wx:if="{{is_gz_h5}}"> | 29 | <view id="off_top" wx:if="{{is_gz_h5}}"> |
pages/template/index.js
@@ -17,8 +17,8 @@ Page({ | @@ -17,8 +17,8 @@ Page({ | ||
17 | is_full_screen_navigation: false, //是否满屏 | 17 | is_full_screen_navigation: false, //是否满屏 |
18 | is_full_screen_navigation_index: -1, //广告轮播满屏下标 | 18 | is_full_screen_navigation_index: -1, //广告轮播满屏下标 |
19 | nav_title: '首页', | 19 | nav_title: '首页', |
20 | - nav_frontColor: "#ffffff", | ||
21 | - nav_backgroundColor: "#ff7295", | 20 | + nav_frontColor: "#000", |
21 | + nav_backgroundColor: "#fff", | ||
22 | nav_type: 1, //导航类型 | 22 | nav_type: 1, //导航类型 |
23 | searchbox_transparent: 1, //搜索框背景是否透明 | 23 | searchbox_transparent: 1, //搜索框背景是否透明 |
24 | 24 | ||
@@ -243,7 +243,7 @@ Page({ | @@ -243,7 +243,7 @@ Page({ | ||
243 | this.setData({ | 243 | this.setData({ |
244 | nav_type: 1, | 244 | nav_type: 1, |
245 | searchbox_transparent: 1, | 245 | searchbox_transparent: 1, |
246 | - nav_frontColor: '#fff' | 246 | + nav_frontColor: '#000' |
247 | }) | 247 | }) |
248 | // this.data.nav_type = 1 | 248 | // this.data.nav_type = 1 |
249 | } | 249 | } |