Committed by
李奇
删除废弃文件
Showing
16 changed files
with
1 additions
and
239 deletions
.wxrc
deleted
100644 → 0
component/homenav/homenav.js
deleted
100644 → 0
component/homenav/homenav.json
deleted
100644 → 0
component/homenav/homenav.wxml
deleted
100644 → 0
component/homenav/homenav.wxss
deleted
100644 → 0
component/homenav/images/yoho@3x.png
deleted
100644 → 0
11 KB
component/productListCell.js
deleted
100644 → 0
1 | -// component/productListCell.js | ||
2 | -import { shouldDiscardTap} from '../utils/util'; | ||
3 | - | ||
4 | -//获取应用实例 | ||
5 | -let app = getApp(); | ||
6 | - | ||
7 | -const screenHeight = app.globalData.systemInfo.screenHeight; | ||
8 | -const windowWidth = app.globalData.systemInfo.windowWidth; | ||
9 | -const windowHeight = app.globalData.systemInfo.windowHeight; | ||
10 | - | ||
11 | -const DEVICE_WIDTH_RATIO = windowWidth / 320; | ||
12 | - | ||
13 | -let listWidth = Math.ceil(137.5 * DEVICE_WIDTH_RATIO); | ||
14 | -let listHeight = Math.ceil(254 * DEVICE_WIDTH_RATIO); | ||
15 | - | ||
16 | -const IMAGE_WIDTH = 145; | ||
17 | -const IMAGE_HEIGHT = 193; | ||
18 | -const IMAGE_RATIO = IMAGE_HEIGHT / IMAGE_WIDTH; | ||
19 | -let listImageTop = 31; | ||
20 | -let listImageWidth = listWidth; | ||
21 | -let listImageHeight = Math.ceil(listWidth * IMAGE_RATIO); | ||
22 | - | ||
23 | -let listMarginHorizontal = (windowWidth - listWidth * 2) / 3; | ||
24 | - | ||
25 | -let PV_ID = new Date().getTime() + ''; | ||
26 | - | ||
27 | -Component({ | ||
28 | - /** | ||
29 | - * 组件的属性列表 | ||
30 | - */ | ||
31 | - properties: { | ||
32 | - item:{ | ||
33 | - type: Object | ||
34 | - }, | ||
35 | - pageName: { | ||
36 | - type: String, | ||
37 | - value: "" | ||
38 | - }, | ||
39 | - animationType: { | ||
40 | - type: String, | ||
41 | - value: "" | ||
42 | - }, | ||
43 | - logEvenName: { | ||
44 | - type: String, | ||
45 | - value: "" | ||
46 | - }, | ||
47 | - index: { | ||
48 | - type: Number, | ||
49 | - value: 0 | ||
50 | - }, | ||
51 | - fIndex: { | ||
52 | - type: Number, | ||
53 | - value: 0 | ||
54 | - }, | ||
55 | - fName: { | ||
56 | - type: String, | ||
57 | - value: "" | ||
58 | - }, | ||
59 | - pageParam: { | ||
60 | - type: String, | ||
61 | - value: "" | ||
62 | - } | ||
63 | - }, | ||
64 | - | ||
65 | - /** | ||
66 | - * 组件的初始数据 | ||
67 | - */ | ||
68 | - data: { | ||
69 | - lastTapTimeStamp: 0, | ||
70 | - | ||
71 | - screenHeight, | ||
72 | - windowHeight, | ||
73 | - listWidth, | ||
74 | - listHeight, | ||
75 | - listImageWidth, | ||
76 | - listImageHeight, | ||
77 | - listImageTop, | ||
78 | - listMarginHorizontal, | ||
79 | - }, | ||
80 | - | ||
81 | - /** | ||
82 | - * 组件的方法列表 | ||
83 | - */ | ||
84 | - methods: { | ||
85 | - productCellTapped(event) { | ||
86 | - if (shouldDiscardTap(event.timeStamp, this.data.lastTapTimeStamp)) { | ||
87 | - return; | ||
88 | - } | ||
89 | - this.setData({ lastTapTimeStamp: event.timeStamp }); | ||
90 | - let data = event.currentTarget.dataset; | ||
91 | - let productSkn = data.productSkn; | ||
92 | - | ||
93 | - // 根据动画类型来选择动画效果 | ||
94 | - if (this.properties.animationType && this.properties.animationType == "redirectTo") { | ||
95 | - wx.redirectTo({ | ||
96 | - url: '/pages/goodsDetail/goodsDetail?productSkn=' + productSkn + '&page_name=' + this.properties.pageName + '&page_param=' + this.properties.pageParam | ||
97 | - }) | ||
98 | - } else { | ||
99 | - wx.navigateTo({ | ||
100 | - url: '/pages/goodsDetail/goodsDetail?productSkn=' + productSkn + '&page_name=' + this.properties.pageName + '&page_param=' + this.properties.pageParam | ||
101 | - }); | ||
102 | - } | ||
103 | - } | ||
104 | - } | ||
105 | -}) |
component/productListCell.json
deleted
100644 → 0
component/productListCell.wxml
deleted
100644 → 0
1 | -<!--component/productListCell.wxml--> | ||
2 | -<view class="product" style="width:{{listWidth}}px;margin-left:{{listMarginHorizontal}}px" bindtap="productCellTapped" data-product-skn="{{item.product_skn}}"> | ||
3 | - <image class="productImage" mode="aspectFit" src="{{item.default_images}}" style="width:{{listImageWidth}}px;height:{{listImageHeight}}px;margin-top:{{listImageTop}}px;" /> | ||
4 | - <text class="productTitle">{{item.product_name}}</text> | ||
5 | - | ||
6 | - <view class='bottomContainerView'> | ||
7 | - <view class="priceContainer"> | ||
8 | - <text class="price1" style="color:{{item.showOriginPrice ? '#d0021b' : '#444444'}}">{{item.salePriceStr}}</text> | ||
9 | - <text class="price2">{{item.showOriginPrice ? item.originPriceStr : ''}}</text> | ||
10 | - </view> | ||
11 | - <!-- 加入购物车按钮需要上层传入是否展示 部分商品由于特殊性 在商品列表不展示购物车按钮 --> | ||
12 | - <image wx:if="{{showAddShopCartBtn && (item.is_shop_cart_add == 'Y')}}" class='addToShopCartImage' src='images/jrgwc@2x.png' catchtap='addToShopCartAction' data-item='{{item}}'></image> | ||
13 | - </view> | ||
14 | -</view> |
component/productListCell.wxss
deleted
100644 → 0
1 | -/* component/productListCell.wxss */ | ||
2 | - | ||
3 | -.product { | ||
4 | - display: flex; | ||
5 | - flex-direction: column; | ||
6 | - background-color: white; | ||
7 | -} | ||
8 | - | ||
9 | -.productImage { | ||
10 | - display: block; | ||
11 | - | ||
12 | -} | ||
13 | - | ||
14 | -.productTitle { | ||
15 | - margin-top: 21rpx; | ||
16 | - margin-bottom: 1rpx; | ||
17 | - color: #444444; | ||
18 | - font-family: PingFang SC; | ||
19 | - font-size: 24rpx; | ||
20 | - /*font-weight: bold;*/ | ||
21 | - line-height: 30rpx; | ||
22 | - display: -webkit-box; | ||
23 | - -webkit-box-orient: vertical; | ||
24 | - -webkit-line-clamp: 2; | ||
25 | - overflow: hidden; | ||
26 | - height: 60rpx; | ||
27 | -} | ||
28 | - | ||
29 | -.bottomContainerView { | ||
30 | - display: flex; | ||
31 | - flex-direction: row; | ||
32 | - align-items: flex-end; | ||
33 | - /* margin-bottom: 20rpx; */ | ||
34 | - justify-content: space-between; | ||
35 | -} | ||
36 | - | ||
37 | -.priceContainer { | ||
38 | - display: flex; | ||
39 | - flex-direction: row; | ||
40 | - width: 236rpx; | ||
41 | - display:-webkit-box; | ||
42 | - -webkit-line-clamp:1; | ||
43 | - -webkit-box-orient:vertical; | ||
44 | - overflow:hidden; | ||
45 | -} | ||
46 | - | ||
47 | -.price1 { | ||
48 | - font-size: 24rpx; | ||
49 | - color: #d0021b; | ||
50 | -} | ||
51 | - | ||
52 | -.price2 { | ||
53 | - margin-left: 10rpx; | ||
54 | - font-size: 24rpx; | ||
55 | - color: #b0b0b0; | ||
56 | - text-decoration: line-through; | ||
57 | -} | ||
58 | - | ||
59 | -.addToShopCartImage { | ||
60 | - width: 80rpx; | ||
61 | - height: 46rpx; | ||
62 | -} |
@@ -8,7 +8,7 @@ | @@ -8,7 +8,7 @@ | ||
8 | "quickNavigation": "/pages/quickNavigation/quickNavigation", | 8 | "quickNavigation": "/pages/quickNavigation/quickNavigation", |
9 | "tabs": "./components/tabs", | 9 | "tabs": "./components/tabs", |
10 | "tabs-pane": "./components/tabs-pane", | 10 | "tabs-pane": "./components/tabs-pane", |
11 | - "dialog": "../../component/dialog/dialog", | 11 | + "dialog": "/components/dialog/dialog", |
12 | "prize-item": "./components/prize-item", | 12 | "prize-item": "./components/prize-item", |
13 | "login": "../../login/login/login" | 13 | "login": "../../login/login/login" |
14 | } | 14 | } |
-
Please register or login to post a comment