Commit 86be033d0a83559c3bb8bc9a90375b3fd673553e
1 parent
e5be5772
商品列表组件
Showing
8 changed files
with
188 additions
and
22 deletions
components/goods_list/goods_list.js
0 → 100644
1 | +// pages/user/yhq/qr_code/qr_code.js | |
2 | +const { | |
3 | + barcode, | |
4 | + qrcode | |
5 | +} = require('../../utils/index.js') | |
6 | + | |
7 | +Component({ | |
8 | + data: { | |
9 | + object: null, | |
10 | + }, | |
11 | + properties: { | |
12 | + // 这里定义了innerText属性,属性值可以在组件使用时指定 | |
13 | + }, | |
14 | + ready: function () { | |
15 | + }, | |
16 | + | |
17 | + methods: { | |
18 | + | |
19 | + }, | |
20 | + | |
21 | + //打开 | |
22 | + onshow: function (e) { | |
23 | + | |
24 | + } | |
25 | + | |
26 | + | |
27 | + | |
28 | +}) | |
0 | 29 | \ No newline at end of file | ... | ... |
components/goods_list/goods_list.json
0 → 100644
components/goods_list/goods_list.wxml
0 → 100644
1 | + <!-- 商品列表 --> | |
2 | + <wxs module="filter" src="../../utils/filter.wxs"></wxs> | |
3 | + <view class="collects"> | |
4 | + <view class="hang "> | |
5 | + <!-- 商品详情 --> | |
6 | + <view class="collect ib" wx:for="{{recommend}}" bindtap="go_url" data-url="/pages/goods/goodsInfo/goodsInfo?goods_id={{item.goods_id}}"> | |
7 | + <!-- 商品图片 --> | |
8 | + <image class="sp" src="{{item.original_img}}" mode="scaleToFill" binderror="bind_bnerr2" data-url="{{item.original_img}}" data-errorimg="recommend[{{index}}].original_img"></image> | |
9 | + <view class="bottom"> | |
10 | + <!-- 商品名称 --> | |
11 | + <view class="goods_name ellipsis-2 fs24">{{item.goods_name}}</view> | |
12 | + <!-- 商品价格 --> | |
13 | + <view class="money flex"> | |
14 | + <!-- 办卡价 --> | |
15 | + <view class="flex xc-wc"> | |
16 | + <view class="fs24">¥</view> | |
17 | + <view class="fs35">{{filter.toFix(item.shop_price,2)}}</view> | |
18 | + </view> | |
19 | + <!-- 原价 --> | |
20 | + <view class="price flex xc-ash"> | |
21 | + <view class="fs22">¥</view> | |
22 | + <view class="fs22">{{item.market_price}}</view> | |
23 | + </view> | |
24 | + | |
25 | + </view> | |
26 | + | |
27 | + | |
28 | + </view> | |
29 | + | |
30 | + | |
31 | + </view> | |
32 | + | |
33 | + </view> | |
34 | + <view class="nothing flex-center" wx:if="{{is_no_more}}"> | |
35 | + <view class="Foil"></view> | |
36 | + <view class="no_content fs24">没有更多内容了</view> | |
37 | + <view class="Foil"></view> | |
38 | + </view> | |
39 | + </view> | |
40 | + | |
41 | + | |
42 | + | |
0 | 43 | \ No newline at end of file | ... | ... |
components/goods_list/goods_list.wxss
0 → 100644
1 | +.collects { | |
2 | + margin-top: 40rpx; | |
3 | +} | |
4 | + | |
5 | +.hang { | |
6 | + width: 100%; | |
7 | + margin: auto; | |
8 | + padding-left: 21rpx; | |
9 | +} | |
10 | + | |
11 | +.hang .collect { | |
12 | + width: 347rpx; | |
13 | + height: 571rpx; | |
14 | + border-radius: 25rpx; | |
15 | + border: 1rpx solid rgb(214, 214, 214); | |
16 | + overflow: hidden; | |
17 | + margin-right: 14rpx; | |
18 | + margin-bottom: 5rpx; | |
19 | +} | |
20 | + | |
21 | +.collect .bottom { | |
22 | + padding: 0rpx 20rpx; | |
23 | +} | |
24 | + | |
25 | +.collect .sp { | |
26 | + width: 100%; | |
27 | + height: 326rpx; | |
28 | +} | |
29 | + | |
30 | +.collect .money { | |
31 | + margin-top: 60rpx; | |
32 | + margin-bottom: 18rpx; | |
33 | + line-height: 28rpx; | |
34 | + align-items: baseline; | |
35 | +} | |
36 | +.collect .money view{ | |
37 | + line-height: 28rpx; | |
38 | +} | |
39 | +.collect .money .flex { | |
40 | + font-weight: bold; | |
41 | +} | |
42 | +.collect .money .flex .fs24{ | |
43 | + padding-top: 5rpx; | |
44 | +} | |
45 | +.collect .Discount { | |
46 | + width: 156rpx; | |
47 | + height: 28rpx; | |
48 | + border-radius: 20rpx; | |
49 | + background-color: rgb(56, 56, 56); | |
50 | + font-size: 18rpx; | |
51 | + color: rgb(255, 255, 255); | |
52 | +} | |
53 | + | |
54 | +.collect .Discount image { | |
55 | + height: 18rpx; | |
56 | + width: 18rpx; | |
57 | + line-height: 28rpx; | |
58 | + margin-right: 3rpx; | |
59 | +} | |
60 | + | |
61 | +.collect.ml20 { | |
62 | + margin-left: 13rpx; | |
63 | +} | |
64 | + | |
65 | +.fs24.dollar { | |
66 | + padding: 0rpx; | |
67 | +} | |
68 | + | |
69 | +.money .price { | |
70 | + margin-left: 12rpx; | |
71 | + text-decoration: line-through; | |
72 | + line-height: 23rpx; | |
73 | +} | |
74 | + | |
75 | +.province { | |
76 | + line-height: 26rpx; | |
77 | +} | |
78 | + | |
79 | +.nothing { | |
80 | + height: 75rpx; | |
81 | + width: 100%; | |
82 | +} | |
83 | + | |
84 | +.nothing .no_content { | |
85 | + margin: 0rpx 11rpx; | |
86 | + color: rgb(138, 138, 138); | |
87 | +} | |
88 | + | |
89 | +.nothing .Foil { | |
90 | + width: 80rpx; | |
91 | + height: 2rpx; | |
92 | + background-color: rgb(138, 138, 138); | |
93 | +} | |
0 | 94 | \ No newline at end of file | ... | ... |
pages/index/index/index.json
... | ... | @@ -2,10 +2,11 @@ |
2 | 2 | "navigationBarBackgroundColor": "#ff7295", |
3 | 3 | "navigationBarTextStyle": "white", |
4 | 4 | "usingComponents": { |
5 | + "goods_list":"/components/goods_list/goods_list", | |
5 | 6 | "nav": "/components/diy_nav/diy_nav", |
6 | - "advertising":"/components/diy_advertising/diy_advertising", | |
7 | + "advertising":"/components/diy_advertising/diy_advertising", | |
7 | 8 | "groupbuy": "/components/diy_groupbuy/diy_groupbuy", |
8 | - "goodsGroup": "/components/diy_goodsGroup/diy_goodsGroup", | |
9 | + "goodsGroup": "/components/diy_goodsGroup/diy_goodsGroup", | |
9 | 10 | "seckill": "/components/diy_seckill/diy_seckill", |
10 | 11 | "searchbox":"/components/diy_searchbox/diy_searchbox", |
11 | 12 | "shopname": "/components/diy_shopname/diy_shopname", | ... | ... |
pages/index/index/index.wxml
1 | 1 | <!--普通界面--> |
2 | +<wxs module="filter" src="../../../utils/filter.wxs"></wxs> | |
2 | 3 | <view class="container rel" wx:if="{{ishow}}"> |
3 | 4 | <block wx:if="{{banner}}"> |
4 | 5 | <image class="xc-top-img abs" src="{{url}}/miniapp/images/top-img.png"></image> |
... | ... | @@ -375,36 +376,32 @@ |
375 | 376 | </view> |
376 | 377 | |
377 | 378 | </view> |
378 | - | |
379 | - <view class="collects"> | |
380 | - <view class="hang "> | |
379 | + <!-- 商品列表 --> | |
380 | + <!-- <view class="collects"> | |
381 | + <view class="hang "> --> | |
381 | 382 | <!-- 商品详情 --> |
382 | - <view class="collect ib" wx:for="{{recommend}}" bindtap="go_url" data-url="/pages/goods/goodsInfo/goodsInfo?goods_id={{item.goods_id}}"> | |
383 | + <!-- <view class="collect ib" wx:for="{{recommend}}" bindtap="go_url" data-url="/pages/goods/goodsInfo/goodsInfo?goods_id={{item.goods_id}}"> --> | |
383 | 384 | <!-- 商品图片 --> |
384 | - <image class="sp" src="{{item.original_img}}" mode="scaleToFill" binderror="bind_bnerr2" data-url="{{item.original_img}}" data-errorimg="recommend[{{index}}].original_img"></image> | |
385 | - <view class="bottom"> | |
385 | + <!-- <image class="sp" src="{{item.original_img}}" mode="scaleToFill" binderror="bind_bnerr2" data-url="{{item.original_img}}" data-errorimg="recommend[{{index}}].original_img"></image> | |
386 | + <view class="bottom"> --> | |
386 | 387 | <!-- 商品名称 --> |
387 | - <view class="goods_name ellipsis-2 fs24">{{item.goods_name}}</view> | |
388 | + <!-- <view class="goods_name ellipsis-2 fs24">{{item.goods_name}}</view> --> | |
388 | 389 | <!-- 商品价格 --> |
389 | - <view class="money flex"> | |
390 | + <!-- <view class="money flex"> --> | |
390 | 391 | <!-- 办卡价 --> |
391 | - <view class="flex xc-wc"> | |
392 | + <!-- <view class="flex xc-wc"> | |
392 | 393 | <view class="fs24">¥</view> |
393 | - <view class="fs35">{{item.shop_price}}</view> | |
394 | - </view> | |
394 | + <view class="fs35">{{filter.toFix(item.shop_price,2)}}</view> | |
395 | + </view> --> | |
395 | 396 | <!-- 原价 --> |
396 | - <view class="price flex xc-ash"> | |
397 | + <!-- <view class="price flex xc-ash"> | |
397 | 398 | <view class="fs22">¥</view> |
398 | 399 | <view class="fs22">{{item.market_price}}</view> |
399 | 400 | </view> |
400 | 401 | |
401 | 402 | </view> |
402 | 403 | |
403 | - <!-- 办卡优惠多少 | |
404 | - <view class="Discount flex-center"> | |
405 | - <image src="{{url}}/miniapp/images/Member.png"></image> | |
406 | - <view class="province">黑卡省11.9元</view> | |
407 | - </view>--> | |
404 | + | |
408 | 405 | </view> |
409 | 406 | |
410 | 407 | |
... | ... | @@ -416,7 +413,7 @@ |
416 | 413 | <view class="no_content fs24">没有更多内容了</view> |
417 | 414 | <view class="Foil"></view> |
418 | 415 | </view> |
419 | - </view> | |
416 | + </view> --> | |
420 | 417 | </view> |
421 | 418 | |
422 | 419 | </view> | ... | ... |
pages/user/member/menber.wxml