Commit 10315c7c5eeea7ed14242938bc8daa5066a4148d
1 parent
05cca8f8
1. 登陆成功的图片显示
2. 分享跳转内页
Showing
10 changed files
with
72 additions
and
19 deletions
app.js
packageA/images/gt.png renamed to images/gt.png
1.72 KB
packageA/pages/activity_share/activity_share.js
... | ... | @@ -142,7 +142,7 @@ Page({ |
142 | 142 | //礼包的转发 |
143 | 143 | if(th.data.currentIndex==3){ |
144 | 144 | var lbid=th.data.hui_active.lbId; |
145 | - var url="pages/giftpack/giftpacklist/giftpacklist?lbId="+lbid+"&isBuy=1"; | |
145 | + var url="/pages/giftpack/giftpacklist/giftpacklist?lbId="+lbid+"&isBuy=1"; | |
146 | 146 | if(getApp().globalData.user_id){ |
147 | 147 | url+="&first_leader="+getApp().globalData.user_id; |
148 | 148 | } |
... | ... | @@ -1060,6 +1060,28 @@ Page({ |
1060 | 1060 | this.data.is_load=0; |
1061 | 1061 | this.data.currentPage=1; |
1062 | 1062 | this.requestGoodsList(); |
1063 | + }, | |
1064 | + | |
1065 | + | |
1066 | + go_goods:function(e){ | |
1067 | + var index=e.currentTarget.dataset.index; | |
1068 | + var item=this.data.list[index]; | |
1069 | + var url="/pages/goods/goodsInfo/goodsInfo?goods_id=" + item.goods_id; | |
1070 | + getApp().goto(url); | |
1071 | + }, | |
1072 | + | |
1073 | + go_coll_good:function(e){ | |
1074 | + var gid=e.currentTarget.dataset.gid; | |
1075 | + var url="/pages/goods/goodsInfo/goodsInfo?goods_id=" + gid; | |
1076 | + getApp().goto(url); | |
1077 | + }, | |
1078 | + | |
1079 | + go_libao:function(e){ | |
1080 | + var index=e.currentTarget.dataset.index; | |
1081 | + var item=this.data.list[index]; | |
1082 | + var lbid=item.lbId; | |
1083 | + var url="/pages/giftpack/giftpacklist/giftpacklist?lbId="+lbid+"&isBuy=1"; | |
1084 | + getApp().goto(url); | |
1063 | 1085 | } |
1064 | 1086 | |
1065 | 1087 | ... | ... |
packageA/pages/activity_share/activity_share.wxml
... | ... | @@ -26,13 +26,13 @@ |
26 | 26 | scroll-y="true" |
27 | 27 | bindscrolltolower="refresh" |
28 | 28 | scroll-anchoring |
29 | - refresher-enabled> | |
29 | + > | |
30 | 30 | |
31 | 31 | <block wx:for="{{list}}"> |
32 | 32 | |
33 | 33 | <!-- 拼单和秒杀 --> |
34 | 34 | <block wx:if="{{currentIndex == 0 || currentIndex == 1}}"> |
35 | - <view class class="list-item"> | |
35 | + <view class class="list-item" bindtap="go_goods" data-index="{{index}}"> | |
36 | 36 | <view class="img-container"> |
37 | 37 | <image src="{{url+item.original_img}}" style="width: 100%; height: 100%;" |
38 | 38 | binderror="bind_bnerr2" lazy-load="true" |
... | ... | @@ -67,7 +67,7 @@ |
67 | 67 | <view>¥{{item.price}}</view> |
68 | 68 | <view class="retail">零售价:¥{{item.market_price}}</view> |
69 | 69 | </view> |
70 | - <view bindtap="share_good" data-index="{{index}}" class="t-r fs28"><text class="btn-share">分享</text></view> | |
70 | + <view catchtap="share_good" data-index="{{index}}" class="t-r fs28"><text class="btn-share">分享</text></view> | |
71 | 71 | </view> |
72 | 72 | </view> |
73 | 73 | </block> |
... | ... | @@ -107,7 +107,7 @@ |
107 | 107 | |
108 | 108 | <!-- 专享礼包 --> |
109 | 109 | <block wx:if="{{currentIndex == 3}}"> |
110 | - <view class class="list-item"> | |
110 | + <view class class="list-item" bindtap="go_libao" data-index="{{index}}"> | |
111 | 111 | <view class="img-container"> |
112 | 112 | <image src="{{url+item.lbUrl}}" style="width: 100%; height: 100%;" |
113 | 113 | binderror="bind_bnerr2" lazy-load="true" |
... | ... | @@ -122,7 +122,7 @@ |
122 | 122 | </view> |
123 | 123 | <view class="fs22 line-through gray">零售价:¥{{item.giftPosPrice}}</view> |
124 | 124 | <!-- <view class="fs22">已售:<text class="red">3</text></view> --> |
125 | - <view bindtap="share_index" data-index="{{index}}" class="t-r fs28"><view class="btn-share">分享</view></view> | |
125 | + <view catchtap="share_index" data-index="{{index}}" class="t-r fs28"><view class="btn-share">分享</view></view> | |
126 | 126 | </view> |
127 | 127 | </view> |
128 | 128 | </block> |
... | ... | @@ -151,7 +151,7 @@ |
151 | 151 | <view class="popup-title dash-b">活动详情</view> |
152 | 152 | <!-- 搭配促销 --> |
153 | 153 | <block wx:if="{{currentIndex2 == 1}}"> |
154 | - <view class="pdv20 dash-b fs28"> | |
154 | + <view class="pdv20 dash-b fs28" bindtap="go_coll_good" data-gid="{{hui_active.main_goods_id}}"> | |
155 | 155 | <view class="popup-title2">必买商品</view> |
156 | 156 | <view class="popup-title3">商品编号:{{hui_active.goods_sn}}</view> |
157 | 157 | <view class="popup-title3">{{hui_active.main_goods_name}}</view> |
... | ... | @@ -168,7 +168,7 @@ |
168 | 168 | </view> |
169 | 169 | <view class="popup-list t-c"> |
170 | 170 | <block wx:for="{{list2}}"> |
171 | - <view class="flex ai-center pdb10"> | |
171 | + <view class="flex ai-center pdb10" bindtap="go_coll_good" data-gid="{{item.goods_id}}"> | |
172 | 172 | <view class="w25">{{index+1}}</view> |
173 | 173 | <view class="w25 ellipsis-2">{{item.goods_name}}</view> |
174 | 174 | <view class="w25">¥{{g_filter.toFix(item.shop_price,2)}}</view> |
... | ... | @@ -206,11 +206,11 @@ |
206 | 206 | </view> |
207 | 207 | <view class="t-c"> |
208 | 208 | <block wx:for="{{list2}}"> |
209 | - <view class="flex ai-center pdb10"> | |
209 | + <view class="flex ai-center pdb10" bindtap="go_coll_good" data-gid="{{item.goods_id}}"> | |
210 | 210 | <view class="w25">{{index+1}}</view> |
211 | 211 | <view class="w25 ellipsis-2">{{item.goods_name}}</view> |
212 | 212 | <view class="w25">¥{{item.shop_price}}</view> |
213 | - <view bindtap="share_good2" data-index="{{index}}" class="w25"><text class="btn-share">分享</text></view> | |
213 | + <view catchtap="share_good2" data-index="{{index}}" class="w25"><text class="btn-share">分享</text></view> | |
214 | 214 | </view> |
215 | 215 | </block> |
216 | 216 | </view> | ... | ... |
packageA/pages/goods_share/goods_share.js
... | ... | @@ -792,6 +792,13 @@ Page({ |
792 | 792 | this.data.is_load=0; |
793 | 793 | this.data.currentPage=1; |
794 | 794 | this.requestGoodsList(); |
795 | + }, | |
796 | + | |
797 | + go_goods:function(e){ | |
798 | + var index=e.currentTarget.dataset.index; | |
799 | + var item=this.data.list[index]; | |
800 | + var url="/pages/goods/goodsInfo/goodsInfo?goods_id=" + item.goods_id; | |
801 | + getApp().goto(url); | |
795 | 802 | } |
796 | 803 | |
797 | 804 | ... | ... |
packageA/pages/goods_share/goods_share.wxml
... | ... | @@ -33,9 +33,9 @@ |
33 | 33 | scroll-y="true" |
34 | 34 | bindscrolltolower="refresh" |
35 | 35 | scroll-anchoring |
36 | - refresher-enabled> | |
36 | + > | |
37 | 37 | <block wx:for="{{list}}"> |
38 | - <view class class="list-item"> | |
38 | + <view class class="list-item" bindtap="go_goods" data-index="{{index}}"> | |
39 | 39 | <view class="img-container"> |
40 | 40 | <image src="{{url+item.original_img}}" style="width: 100%; height: 100%;" |
41 | 41 | binderror="bind_bnerr2" lazy-load="true" |
... | ... | @@ -64,7 +64,7 @@ |
64 | 64 | <text wx:else class="red">¥{{item.fir_rate+item.sec_rate+item.thi_rate}}</text> |
65 | 65 | </view> |
66 | 66 | </view> |
67 | - <view bindtap="share_good" data-index="{{index}}" class="t-r fs28 pdt14"> | |
67 | + <view catchtap="share_good" data-index="{{index}}" class="t-r fs28 pdt14"> | |
68 | 68 | <view class="btn-share">分享</view> |
69 | 69 | </view> |
70 | 70 | </view> | ... | ... |
packageA/pages/live_share/live_share.js
... | ... | @@ -179,6 +179,16 @@ Page({ |
179 | 179 | this.requestGoodsList(); |
180 | 180 | }, |
181 | 181 | |
182 | + cancel:function(){ | |
183 | + this.setData({share_hidden:1}); | |
184 | + }, | |
185 | + go_live:function(e){ | |
186 | + var index=e.currentTarget.dataset.index; | |
187 | + var item=this.data.list[index]; | |
188 | + var url='/packageA/pages/liveStreamDetails/liveStreamDetails?id=' + item.id + '&live=ing'; | |
189 | + getApp().goto(url); | |
190 | + } | |
191 | + | |
182 | 192 | |
183 | 193 | |
184 | 194 | }) |
185 | 195 | \ No newline at end of file | ... | ... |
packageA/pages/live_share/live_share.wxml
... | ... | @@ -14,10 +14,10 @@ |
14 | 14 | scroll-y="true" |
15 | 15 | bindscrolltolower="refresh" |
16 | 16 | scroll-anchoring |
17 | - refresher-enabled> | |
17 | + > | |
18 | 18 | <!-- 专享礼包 --> |
19 | 19 | <block wx:for="{{list}}"> |
20 | - <view class class="list-item"> | |
20 | + <view class class="list-item" bindtap="go_live" data-index="{{index}}"> | |
21 | 21 | <view class="img-container {{currentIndex2 == 0?'live':currentIndex2 == 1?'coming':'playback'}}"> |
22 | 22 | <image src="{{item.cover_img}}" style="width: 100%; height: 100%;" |
23 | 23 | binderror="bind_bnerr2" lazy-load="true" |
... | ... | @@ -27,7 +27,7 @@ |
27 | 27 | <view class="ellipsis-2 fs28 name">{{item.name}}</view> |
28 | 28 | <view class="pdt20 fs26 red">直播时间:{{filter.format_time(item.start_time, 2)}} </view> |
29 | 29 | <view class="fs26 red pdv10">主播:{{item['anchor_name']}}</view> |
30 | - <view bindtap="share_index" data-index="{{index}}" class="t-r fs28 pdt10"><view class="btn-share">分享</view></view> | |
30 | + <view catchtap="share_index" data-index="{{index}}" class="t-r fs28 pdt10"><view class="btn-share">分享</view></view> | |
31 | 31 | </view> |
32 | 32 | </view> |
33 | 33 | </block> | ... | ... |
packageA/pages/quan/quan.js
... | ... | @@ -156,6 +156,20 @@ Page({ |
156 | 156 | com.set_type(1); |
157 | 157 | }, |
158 | 158 | |
159 | + cancel:function(){ | |
160 | + this.setData({share_hidden:1}); | |
161 | + }, | |
162 | + | |
163 | + go_quan:function(e){ | |
164 | + var index=e.currentTarget.dataset.index; | |
165 | + var item=this.data.list[index]; | |
166 | + var url="/packageA/pages/quan_pro/quan_pro?id="+item.id; | |
167 | + getApp().goto(url); | |
168 | + } | |
169 | + | |
170 | + | |
171 | + | |
172 | + | |
159 | 173 | |
160 | 174 | |
161 | 175 | ... | ... |
packageA/pages/quan/quan.wxml
... | ... | @@ -17,7 +17,7 @@ |
17 | 17 | refresher-enabled> |
18 | 18 | |
19 | 19 | <block wx:for="{{list}}"> |
20 | - <view class="coupons bg-red"> | |
20 | + <view class="coupons bg-red" bindtap="go_quan" data-index="{{index}}"> | |
21 | 21 | <view class="flex"> |
22 | 22 | <view> |
23 | 23 | <view class="coupon-hd ellipsis-2 fs32">{{item.name}}</view> |
... | ... | @@ -40,7 +40,7 @@ |
40 | 40 | <view wx:if="{{item.useobjecttype==12}}" class="coupon-ft ellipsis-2 fs28">分类一({{item.useobjectname}})</view> |
41 | 41 | <view wx:if="{{item.useobjecttype==20}}" class="coupon-ft ellipsis-2 fs28">单品({{item.useobjectname}})</view> |
42 | 42 | |
43 | - <view bindtap="share_index" data-index="{{index}}" class="btn-share" >分享</view> | |
43 | + <view catchtap="share_index" data-index="{{index}}" class="btn-share" >分享</view> | |
44 | 44 | </view> |
45 | 45 | </view> |
46 | 46 | </block> | ... | ... |