Authored by QC-L

修复拼团列表UI展示不正确的问题 review by 黄敬囿

@@ -14,6 +14,9 @@ @@ -14,6 +14,9 @@
14 "backgroundColor": "#fff", 14 "backgroundColor": "#fff",
15 "backgroundTextStyle": "dark", 15 "backgroundTextStyle": "dark",
16 "onReachBottomDistance": 100 16 "onReachBottomDistance": 100
17 - } 17 + },
  18 + "navigateToMiniProgramAppIdList": [
  19 + "wx207f18be42db9028"
  20 + ]
18 } 21 }
19 22

2.47 KB | W: | H:

608 Bytes | W: | H:

  • 2-up
  • Swipe
  • Onion skin
@@ -30,6 +30,8 @@ Component({ @@ -30,6 +30,8 @@ Component({
30 * 组件的方法列表 30 * 组件的方法列表
31 */ 31 */
32 methods: { 32 methods: {
33 - 33 + clickGroupDetail(e) {
  34 + this.triggerEvent('handlegroupdetail', e.currentTarget.dataset.groupProduct);
  35 + }
34 } 36 }
35 }) 37 })
1 <!--pages/zeroSell/components/group-recommend-cell.wxml--> 1 <!--pages/zeroSell/components/group-recommend-cell.wxml-->
2 <!-- <text>pages/zeroSell/components/group-recommend-cell.wxml</text> --> 2 <!-- <text>pages/zeroSell/components/group-recommend-cell.wxml</text> -->
3 3
4 -<view class="group-product-cell-bg"> 4 +<view class="group-product-cell-bg" bindtap="clickGroupDetail" data-group-product="{{group_product}}">
5 <view class="group-product-header"> 5 <view class="group-product-header">
6 - <image class="group-product-left-icon" src="{{group_number_image}}"></image> 6 + <image class="group-product-left-icon" src="{{group_number_image}}">
  7 + </image>
  8 + <text class="group-product-left-icon group-product-left-icon-number">{{group_product.people_num}}人团</text>
7 <image class="group-product-image" src="{{group_product.default_images}}"></image> 9 <image class="group-product-image" src="{{group_product.default_images}}"></image>
8 </view> 10 </view>
9 <view class="group-product-name">{{group_product.product_name}}</view> 11 <view class="group-product-name">{{group_product.product_name}}</view>
1 /* pages/zeroSell/components/group-recommend-cell.wxss */ 1 /* pages/zeroSell/components/group-recommend-cell.wxss */
2 .group-product-image { 2 .group-product-image {
3 - margin-left: -72rpx;  
4 width: 322rpx; 3 width: 322rpx;
5 height: 430rpx; 4 height: 430rpx;
6 - z-index: 1;  
7 } 5 }
8 6
9 .group-product-cell-bg { 7 .group-product-cell-bg {
10 margin-top: 20rpx; 8 margin-top: 20rpx;
11 } 9 }
12 10
13 -.group-product-header {  
14 - display: flex;  
15 - flex-direction: row;  
16 -}  
17 -  
18 .group-product-left-icon { 11 .group-product-left-icon {
19 margin-top: 10rpx; 12 margin-top: 10rpx;
20 width: 88rpx; 13 width: 88rpx;
21 height: 40rpx; 14 height: 40rpx;
22 - z-index: 2; 15 + position: absolute;
  16 + margin-left: -15rpx;
  17 + color: #FFFFFF;
  18 + font-size: 22rpx;
  19 + font-family: PingFangSC-Medium;
  20 +}
  21 +
  22 +.group-product-left-icon-number {
  23 + margin-left: 0rpx;
  24 + margin-top: 19rpx;
23 } 25 }
24 26
25 .group-product-name { 27 .group-product-name {
@@ -29,7 +31,6 @@ @@ -29,7 +31,6 @@
29 font-size: 20rpx; 31 font-size: 20rpx;
30 color: #444444; 32 color: #444444;
31 margin-top: 24rpx; 33 margin-top: 24rpx;
32 - margin-left: 16rpx;  
33 display: -webkit-box; 34 display: -webkit-box;
34 overflow: hidden; 35 overflow: hidden;
35 text-overflow: ellipsis; 36 text-overflow: ellipsis;
@@ -40,7 +41,6 @@ @@ -40,7 +41,6 @@
40 } 41 }
41 42
42 .group-price { 43 .group-price {
43 - margin-left: 16rpx;  
44 display: flex; 44 display: flex;
45 flex-direction: row; 45 flex-direction: row;
46 align-items: center; 46 align-items: center;
@@ -21,6 +21,8 @@ Component({ @@ -21,6 +21,8 @@ Component({
21 * 组件的方法列表 21 * 组件的方法列表
22 */ 22 */
23 methods: { 23 methods: {
24 - 24 + groupDetail(e) {
  25 + this.triggerEvent('goToGroupMiniApp', e.detail);
  26 + }
25 } 27 }
26 }) 28 })
@@ -5,6 +5,6 @@ @@ -5,6 +5,6 @@
5 </view> 5 </view>
6 <view class="group-list"> 6 <view class="group-list">
7 <block wx:for="{{groupRecommendList}}"> 7 <block wx:for="{{groupRecommendList}}">
8 - <group-recommend-cell product="{{item}}"></group-recommend-cell> 8 + <group-recommend-cell product="{{item}}" bindhandlegroupdetail="groupDetail"></group-recommend-cell>
9 </block> 9 </block>
10 </view> 10 </view>
@@ -209,6 +209,21 @@ Page(Object.assign({ @@ -209,6 +209,21 @@ Page(Object.assign({
209 this._loadGroupList(page); 209 this._loadGroupList(page);
210 }, 210 },
211 211
  212 + goToGroupMiniApp(e) {
  213 + console.log(e);
  214 + console.log(e.detail);
  215 + wx.navigateToMiniProgram({
  216 + appId: 'wx207f18be42db9028',
  217 + path: `pages/group/detail?productSkn=${e.detail.product_skn}&activityId=${e.detail.activity_id}&page_param=${e.detail.activity_id}`,
  218 + success(res) {
  219 +
  220 + },
  221 + fail(error) {
  222 +
  223 + }
  224 + })
  225 + },
  226 +
212 /** 227 /**
213 * 用户点击右上角分享 228 * 用户点击右上角分享
214 */ 229 */
@@ -28,7 +28,7 @@ @@ -28,7 +28,7 @@
28 <view class="fellow-bar" wx:if="{{product.status}}"> 28 <view class="fellow-bar" wx:if="{{product.status}}">
29 <fellow-bar></fellow-bar> 29 <fellow-bar></fellow-bar>
30 </view> 30 </view>
31 -<group-recommend groupRecommendList="{{groupList}}"> 31 +<group-recommend groupRecommendList="{{groupList}}" bindgoToGroupMiniApp="goToGroupMiniApp">
32 </group-recommend> 32 </group-recommend>
33 33
34 <view class="action-bar"> 34 <view class="action-bar">
@@ -28,14 +28,14 @@ @@ -28,14 +28,14 @@
28 position: fixed; 28 position: fixed;
29 width: 100%; 29 width: 100%;
30 top: 0rpx; 30 top: 0rpx;
31 - z-index: 5; 31 + z-index: 999;
32 } 32 }
33 33
34 .action-bar { 34 .action-bar {
35 position: fixed; 35 position: fixed;
36 width: 100%; 36 width: 100%;
37 bottom: 0; 37 bottom: 0;
38 - z-index: 5; 38 + z-index: 999;
39 } 39 }
40 40
41 .foot { 41 .foot {