Blame view
src/components/CommodityCard/CommodityCard.vue
2.93 KB
1003c53e8 go |
1 |
<template> |
7d6833f2c 地址列表 |
2 3 |
<view class="card" |
78c1e1372 auto commit the c... |
4 |
@tap="toGoods(goods.shop_wood_id?goods.shop_wood_id:goods.shop_wood_id,goods.eyegArr[0].wsp_id)" |
7d6833f2c 地址列表 |
5 |
> |
88c0598d3 详情页参数选择修改 |
6 7 8 |
<easy-loadimage mode="widthFix" :scroll-top="scrollTop" |
78c1e1372 auto commit the c... |
9 |
:image-src="goods.url0?goods.url0:goods.url45" |
88c0598d3 详情页参数选择修改 |
10 11 |
:viewHeight="viewHeight" ></easy-loadimage> |
78c1e1372 auto commit the c... |
12 |
<!-- <image |
7d6833f2c 地址列表 |
13 |
mode="widthFix" |
78c1e1372 auto commit the c... |
14 |
:src="goods.url0?goods.url0:goods.url45" |
967ce241a 合并冲突 |
15 |
></image> --> |
78c1e1372 auto commit the c... |
16 |
<view class="name">{{goods.shop_wood_name?goods.shop_wood_name:goods.shop_wood_name}}</view> |
7d6833f2c 地址列表 |
17 18 |
<view class="info"> <view class="priceBox"> |
78c1e1372 auto commit the c... |
19 |
<view class="price">{{goods.sales_price ? goods.sales_price : (goods.sales_price && goods.rsSon.sales_price)}}</view> |
7d6833f2c 地址列表 |
20 |
<view class="originCost"> |
089dce19d 支付修改 |
21 |
<!-- {{goods.price !== undefined?goods.price:goods.real_price}} --> |
78c1e1372 auto commit the c... |
22 |
{{goods.sales_price ? goods.sales_price : parseInt(goods.sales_price && goods.sales_price*(1 + Number(0)/100))}} |
7d6833f2c 地址列表 |
23 24 |
</view> </view> |
78c1e1372 auto commit the c... |
25 |
<view class="trade_num">{{goods.sales_num}}人购买</view> |
7d6833f2c 地址列表 |
26 27 |
</view> </view> |
1003c53e8 go |
28 |
</template> |
fb85b244c user页面 |
29 30 |
<script> |
967ce241a 合并冲突 |
31 32 |
import easyLoadimage from '@/components/EasyLoadimage/EasyLoadimage.vue' // const MockData = require('@/static/easy-loadimage/mock-data.json') |
7d6833f2c 地址列表 |
33 |
export default { |
88c0598d3 详情页参数选择修改 |
34 |
components: { easyLoadimage }, |
7d6833f2c 地址列表 |
35 36 37 38 39 |
props: { /** * 商品数据 */ goods: { |
78c1e1372 auto commit the c... |
40 41 42 43 44 45 46 47 48 49 |
shop_wood_id: Number, url0: String, url45: String, shop_wood_name: String, // rsSon: Object, // originCost: String, sales_price: String, sales_num: String, // goodType: String, eyegArr:Object |
089dce19d 支付修改 |
50 |
}, |
88c0598d3 详情页参数选择修改 |
51 52 |
scrollTop: Number, viewHeight: Number, |
7d6833f2c 地址列表 |
53 54 |
}, created () { |
7d6833f2c 地址列表 |
55 56 57 |
}, data () { return { |
88c0598d3 详情页参数选择修改 |
58 |
|
7d6833f2c 地址列表 |
59 60 |
} }, |
967ce241a 合并冲突 |
61 |
|
7d6833f2c 地址列表 |
62 |
methods: { |
78c1e1372 auto commit the c... |
63 64 |
toGoods (shop_wood_id, skuId) { console.log('---', '../details/details?shop_wood_id=' + shop_wood_id + '&sk_id=' + skuId) |
7d6833f2c 地址列表 |
65 |
uni.navigateTo({ |
78c1e1372 auto commit the c... |
66 |
url: '../details/details?shop_wood_id=' + shop_wood_id + '&sk_id=' + skuId, |
7d6833f2c 地址列表 |
67 68 |
success: res => {}, fail: () => {}, |
089dce19d 支付修改 |
69 |
complete: () => {}, |
7d6833f2c 地址列表 |
70 |
}) |
089dce19d 支付修改 |
71 72 |
}, }, |
7d6833f2c 地址列表 |
73 |
} |
1003c53e8 go |
74 75 |
</script> |
fb85b244c user页面 |
76 |
<style lang="scss"> |
7d6833f2c 地址列表 |
77 78 79 80 81 82 |
image { width: 100%; height: 120rpx; } .name { width: 92%; |
37f3387c9 购物车支付 |
83 |
height: 84rpx; |
7d6833f2c 地址列表 |
84 |
padding: 5px 4%; |
15af636b4 购物车逻辑 |
85 |
box-sizing: border-box; |
7d6833f2c 地址列表 |
86 87 88 89 90 |
display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; text-align: justify; overflow: hidden; |
156736a2e 样式修改 |
91 |
font-size: 26rpx; |
7d6833f2c 地址列表 |
92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 |
color: #333333; } .info { display: flex; justify-content: space-between; align-items: center; width: 92%; padding: 5px 4% 5px 4%; .priceBox { display: flex; justify-content: space-between; align-items: center; .price { color: #eb5d3b; font-size: 28rpx; font-weight: 600; margin-right: 10rpx; } .originCost { text-decoration: line-through; color: #999999; font-size: 20rpx; } } .trade_num { color: #999999; font-size: 20rpx; } } </style> |