Blame view
src/components/CommodityCard/CommodityCard.vue
2.75 KB
1003c53e8 go |
1 |
<template> |
7d6833f2c 地址列表 |
2 3 |
<view class="card" |
b9fb65756 购物车和推荐产品根据sk_id来对应价格 |
4 |
@tap="toGoods(goods.id?goods.id:goods.pid,goods.sk_id)" |
7d6833f2c 地址列表 |
5 |
> |
88c0598d3 详情页参数选择修改 |
6 7 8 9 10 11 12 |
<easy-loadimage mode="widthFix" :scroll-top="scrollTop" :image-src="goods.imgurl?goods.imgurl:goods.pic" :viewHeight="viewHeight" ></easy-loadimage> <!-- <image |
7d6833f2c 地址列表 |
13 |
mode="widthFix" |
058f060df 冲突修改 |
14 |
:src="goods.imgurl?goods.imgurl:goods.pic" |
967ce241a 合并冲突 |
15 |
></image> --> |
058f060df 冲突修改 |
16 |
<view class="name">{{goods.name?goods.name:goods.p_name}}</view> |
7d6833f2c 地址列表 |
17 18 |
<view class="info"> <view class="priceBox"> |
089dce19d 支付修改 |
19 |
<view class="price">{{goods.old_price ? goods.old_price : (goods.rsSon && goods.rsSon.Min_Price)}}</view> |
7d6833f2c 地址列表 |
20 |
<view class="originCost"> |
089dce19d 支付修改 |
21 22 |
<!-- {{goods.price !== undefined?goods.price:goods.real_price}} --> {{goods.real_price ? goods.real_price : parseInt(goods.rsSon && goods.rsSon.Min_Price*(1 + Number(goods.rsSon.discount)/100))}} |
7d6833f2c 地址列表 |
23 24 25 26 27 |
</view> </view> <view class="trade_num">{{goods.trade_num}}人购买</view> </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 40 41 42 43 44 45 46 |
props: { /** * 商品数据 */ goods: { id: Number, imgurl: String, name: String, rsSon: Object, originCost: String, price: String, trade_num: String, |
089dce19d 支付修改 |
47 48 |
goodType: String, }, |
88c0598d3 详情页参数选择修改 |
49 50 |
scrollTop: Number, viewHeight: Number, |
7d6833f2c 地址列表 |
51 52 |
}, created () { |
7d6833f2c 地址列表 |
53 54 55 |
}, data () { return { |
88c0598d3 详情页参数选择修改 |
56 |
|
7d6833f2c 地址列表 |
57 58 |
} }, |
967ce241a 合并冲突 |
59 |
|
7d6833f2c 地址列表 |
60 |
methods: { |
a3d2beaa8 立即支付功能 |
61 |
toGoods (id, skId) { |
88c0598d3 详情页参数选择修改 |
62 |
console.log('---', '../details/details?pid=' + id + '&sk_id=' + skId) |
7d6833f2c 地址列表 |
63 |
uni.navigateTo({ |
88c0598d3 详情页参数选择修改 |
64 |
url: '../details/details?pid=' + id + '&sk_id=' + skId, |
7d6833f2c 地址列表 |
65 66 |
success: res => {}, fail: () => {}, |
089dce19d 支付修改 |
67 |
complete: () => {}, |
7d6833f2c 地址列表 |
68 |
}) |
089dce19d 支付修改 |
69 70 |
}, }, |
7d6833f2c 地址列表 |
71 |
} |
1003c53e8 go |
72 73 |
</script> |
fb85b244c user页面 |
74 |
<style lang="scss"> |
7d6833f2c 地址列表 |
75 76 77 78 79 80 |
image { width: 100%; height: 120rpx; } .name { width: 92%; |
37f3387c9 购物车支付 |
81 |
height: 84rpx; |
7d6833f2c 地址列表 |
82 |
padding: 5px 4%; |
15af636b4 购物车逻辑 |
83 |
box-sizing: border-box; |
7d6833f2c 地址列表 |
84 85 86 87 88 |
display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; text-align: justify; overflow: hidden; |
156736a2e 样式修改 |
89 |
font-size: 26rpx; |
7d6833f2c 地址列表 |
90 91 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 |
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> |