1 line
25 KiB
Plaintext
1 line
25 KiB
Plaintext
{"version":3,"file":"s-goods-column.js","sources":["../../../../../../src/sheep/components/s-goods-column/s-goods-column.vue","../../../../../../uniComponent:/RDovQXBwL1dvcmsvYWRkci9hY2RyLXVpL3NyYy9zaGVlcC9jb21wb25lbnRzL3MtZ29vZHMtY29sdW1uL3MtZ29vZHMtY29sdW1uLnZ1ZQ"],"sourcesContent":["<!-- 页面 -->\r\n<template>\r\n <view class=\"ss-goods-wrap\">\r\n <!-- xs卡片:横向紧凑型,一行放两个,图片左内容右边 -->\r\n <view\r\n v-if=\"size === 'xs'\"\r\n class=\"xs-goods-card ss-flex ss-col-stretch\"\r\n :style=\"[elStyles]\"\r\n @tap=\"onClick\"\r\n >\r\n <view v-if=\"tagStyle.show\" class=\"tag-icon-box\">\r\n <image class=\"tag-icon\" :src=\"sheep.$url.cdn(tagStyle.src || tagStyle.imgUrl)\"></image>\r\n </view>\r\n <image\r\n class=\"xs-img-box\"\r\n :src=\"sheep.$url.cdn(data.image || data.picUrl)\"\r\n mode=\"aspectFit\"\r\n ></image>\r\n <view\r\n v-if=\"goodsFields.title?.show || goodsFields.name?.show || goodsFields.price?.show\"\r\n class=\"xs-goods-content ss-flex-col ss-row-around\"\r\n >\r\n <view\r\n v-if=\"goodsFields.title?.show || goodsFields.name?.show\"\r\n class=\"xs-goods-title ss-line-1\"\r\n :style=\"[{ color: titleColor, width: titleWidth ? titleWidth + 'rpx' : '' }]\"\r\n >\r\n {{ data.title || data.name }}\r\n </view>\r\n <view\r\n v-if=\"goodsFields.price?.show\"\r\n class=\"xs-goods-price font-OPPOSANS\"\r\n :style=\"[{ color: goodsFields.price.color }]\"\r\n >\r\n <text class=\"price-unit ss-font-24\">{{ priceUnit }}</text>\r\n {{ isArray(data.price) ? fen2yuan(data.price[0]) : fen2yuan(data.price) }}\r\n </view>\r\n </view>\r\n </view>\r\n\r\n <!-- sm卡片:竖向紧凑,一行放三个,图上内容下 -->\r\n <view v-if=\"size === 'sm'\" class=\"sm-goods-card ss-flex-col\" :style=\"[elStyles]\" @tap=\"onClick\">\r\n <view v-if=\"tagStyle.show\" class=\"tag-icon-box\">\r\n <image class=\"tag-icon\" :src=\"sheep.$url.cdn(tagStyle.src || tagStyle.imgUrl)\"></image>\r\n </view>\r\n <image\r\n class=\"sm-img-box\"\r\n :src=\"sheep.$url.cdn(data.image || data.picUrl)\"\r\n mode=\"aspectFill\"\r\n ></image>\r\n\r\n <view\r\n v-if=\"goodsFields.title?.show || goodsFields.name?.show || goodsFields.price?.show\"\r\n class=\"sm-goods-content\"\r\n :style=\"[{ color: titleColor, width: titleWidth ? titleWidth + 'rpx' : '' }]\"\r\n >\r\n <view\r\n v-if=\"goodsFields.title?.show || goodsFields.name?.show\"\r\n class=\"sm-goods-title ss-line-1 ss-m-b-16\"\r\n >\r\n {{ data.title || data.name }}\r\n </view>\r\n <view\r\n v-if=\"goodsFields.price?.show\"\r\n class=\"sm-goods-price font-OPPOSANS\"\r\n :style=\"[{ color: goodsFields.price.color }]\"\r\n >\r\n <text class=\"price-unit ss-font-24\">{{ priceUnit }}</text>\r\n {{ isArray(data.price) ? fen2yuan(data.price[0]) : fen2yuan(data.price) }}\r\n </view>\r\n </view>\r\n </view>\r\n\r\n <!-- md卡片:竖向,一行放两个,图上内容下 -->\r\n <view v-if=\"size === 'md'\" class=\"md-goods-card ss-flex-col\" :style=\"[elStyles]\" @tap=\"onClick\">\r\n <view v-if=\"tagStyle.show\" class=\"tag-icon-box\">\r\n <image class=\"tag-icon\" :src=\"sheep.$url.cdn(tagStyle.src || tagStyle.imgUrl)\"></image>\r\n </view>\r\n <image\r\n class=\"md-img-box\"\r\n :src=\"sheep.$url.cdn(data.image || data.picUrl)\"\r\n mode=\"widthFix\"\r\n ></image>\r\n <view\r\n class=\"md-goods-content ss-flex-col ss-row-around ss-p-b-20 ss-p-t-20 ss-p-x-16\"\r\n :id=\"elId\"\r\n >\r\n <view\r\n v-if=\"goodsFields.title?.show || goodsFields.name?.show\"\r\n class=\"md-goods-title ss-line-1\"\r\n :style=\"[{ color: titleColor, width: titleWidth ? titleWidth + 'rpx' : '' }]\"\r\n >\r\n {{ data.title || data.name }}\r\n </view>\r\n <view\r\n v-if=\"goodsFields.subtitle?.show || goodsFields.introduction?.show\"\r\n class=\"md-goods-subtitle ss-m-t-16 ss-line-1\"\r\n :style=\"[{ color: subTitleColor, background: subTitleBackground }]\"\r\n >\r\n {{ data.subtitle || data.introduction }}\r\n </view>\r\n <slot name=\"activity\">\r\n <view v-if=\"data.promos?.length\" class=\"tag-box ss-flex-wrap ss-flex ss-col-center\">\r\n <view\r\n class=\"activity-tag ss-m-r-10 ss-m-t-16\"\r\n v-for=\"item in data.promos\"\r\n :key=\"item.id\"\r\n >\r\n {{ item.title }}\r\n </view>\r\n </view>\r\n </slot>\r\n <view class=\"ss-flex ss-col-bottom\">\r\n <view\r\n v-if=\"goodsFields.price?.show\"\r\n class=\"md-goods-price ss-m-t-16 font-OPPOSANS ss-m-r-10\"\r\n :style=\"[{ color: goodsFields.price.color }]\"\r\n >\r\n <text class=\"price-unit ss-font-24\">{{ priceUnit }}</text>\r\n {{ isArray(data.price) ? fen2yuan(data.price[0]) : fen2yuan(data.price) }}\r\n </view>\r\n\r\n <view\r\n v-if=\"\r\n (goodsFields.original_price?.show || goodsFields.marketPrice?.show) &&\r\n (data.original_price > 0 || data.marketPrice > 0)\r\n \"\r\n class=\"goods-origin-price ss-m-t-16 font-OPPOSANS ss-flex\"\r\n :style=\"[{ color: originPriceColor }]\"\r\n >\r\n <text class=\"price-unit ss-font-20\">{{ priceUnit }}</text>\r\n <view class=\"ss-m-l-8\">{{ fen2yuan(data.marketPrice) }}</view>\r\n </view>\r\n </view>\r\n\r\n <view class=\"ss-m-t-16 ss-flex ss-col-center ss-flex-wrap\">\r\n <view class=\"sales-text\">{{ salesAndStock }}</view>\r\n </view>\r\n </view>\r\n\r\n <slot name=\"cart\">\r\n <view class=\"cart-box ss-flex ss-col-center ss-row-center\">\r\n <image class=\"cart-icon\" src=\"/static/img/shop/tabbar/category2.png\" mode=\"\" />\r\n </view>\r\n </slot>\r\n </view>\r\n\r\n <!-- lg卡片:横向型,一行放一个,图片左内容右边 -->\r\n <view\r\n v-if=\"size === 'lg'\"\r\n class=\"lg-goods-card ss-flex ss-col-stretch\"\r\n :style=\"[elStyles]\"\r\n @tap=\"onClick\"\r\n >\r\n <view v-if=\"tagStyle.show\" class=\"tag-icon-box\">\r\n <image class=\"tag-icon\" :src=\"sheep.$url.cdn(tagStyle.src || tagStyle.imgUrl)\"></image>\r\n </view>\r\n <view v-if=\"seckillTag\" class=\"seckill-tag ss-flex ss-row-center\">秒杀</view>\r\n <view v-if=\"grouponTag\" class=\"groupon-tag ss-flex ss-row-center\">\r\n <view class=\"tag-icon\">拼团</view>\r\n </view>\r\n <image\r\n class=\"lg-img-box\"\r\n :src=\"sheep.$url.cdn(data.image || data.picUrl)\"\r\n mode=\"aspectFill\"\r\n ></image>\r\n <view class=\"lg-goods-content ss-flex-1 ss-flex-col ss-row-between ss-p-b-10 ss-p-t-20\">\r\n <view>\r\n <view\r\n v-if=\"goodsFields.title?.show || goodsFields.name?.show\"\r\n class=\"lg-goods-title ss-line-2\"\r\n :style=\"[{ color: titleColor }]\"\r\n >\r\n {{ data.title || data.name }}\r\n </view>\r\n <view\r\n v-if=\"goodsFields.subtitle?.show || goodsFields.introduction?.show\"\r\n class=\"lg-goods-subtitle ss-m-t-10 ss-line-1\"\r\n :style=\"[{ color: subTitleColor, background: subTitleBackground }]\"\r\n >\r\n {{ data.subtitle || data.introduction }}\r\n </view>\r\n </view>\r\n <view>\r\n <slot name=\"activity\">\r\n <view v-if=\"data.promos?.length\" class=\"tag-box ss-flex ss-col-center\">\r\n <view class=\"activity-tag ss-m-r-10\" v-for=\"item in data.promos\" :key=\"item.id\">\r\n {{ item.title }}\r\n </view>\r\n </view>\r\n </slot>\r\n <view class=\"ss-flex ss-col-bottom ss-m-t-10\">\r\n <view\r\n v-if=\"goodsFields.price?.show\"\r\n class=\"lg-goods-price ss-m-r-12 ss-flex ss-col-bottom font-OPPOSANS\"\r\n :style=\"[{ color: goodsFields.price.color }]\"\r\n >\r\n <text class=\"ss-font-24\">{{ priceUnit }}</text>\r\n {{ isArray(data.price) ? fen2yuan(data.price[0]) : fen2yuan(data.price) }}\r\n </view>\r\n <view\r\n v-if=\"\r\n (goodsFields.original_price?.show || goodsFields.marketPrice?.show) &&\r\n (data.original_price > 0 || data.marketPrice > 0)\r\n \"\r\n class=\"goods-origin-price ss-flex ss-col-bottom font-OPPOSANS\"\r\n :style=\"[{ color: originPriceColor }]\"\r\n >\r\n <text class=\"price-unit ss-font-20\">{{ priceUnit }}</text>\r\n <view class=\"ss-m-l-8\">{{ fen2yuan(data.marketPrice) }}</view>\r\n </view>\r\n </view>\r\n <view class=\"ss-m-t-8 ss-flex ss-col-center ss-flex-wrap\">\r\n <view class=\"sales-text\">{{ salesAndStock }}</view>\r\n </view>\r\n </view>\r\n </view>\r\n\r\n <slot name=\"cart\">\r\n <view class=\"buy-box ss-flex ss-col-center ss-row-center\" v-if=\"buttonShow\">去购买</view>\r\n </slot>\r\n </view>\r\n\r\n <!-- sl卡片:竖向型,一行放一个,图片上内容下边 -->\r\n <view v-if=\"size === 'sl'\" class=\"sl-goods-card ss-flex-col\" :style=\"[elStyles]\" @tap=\"onClick\">\r\n <view v-if=\"tagStyle.show\" class=\"tag-icon-box\">\r\n <image class=\"tag-icon\" :src=\"sheep.$url.cdn(tagStyle.src || tagStyle.imgUrl)\"></image>\r\n </view>\r\n\r\n <image\r\n class=\"sl-img-box\"\r\n :src=\"sheep.$url.cdn(data.image || data.picUrl)\"\r\n mode=\"aspectFill\"\r\n ></image>\r\n\r\n <view class=\"sl-goods-content\">\r\n <view>\r\n <view\r\n v-if=\"goodsFields.title?.show || goodsFields.name?.show\"\r\n class=\"sl-goods-title ss-line-1\"\r\n :style=\"[{ color: titleColor }]\"\r\n >\r\n {{ data.title || data.name }}\r\n </view>\r\n <view\r\n v-if=\"goodsFields.subtitle?.show || goodsFields.introduction?.show\"\r\n class=\"sl-goods-subtitle ss-m-t-16\"\r\n :style=\"[{ color: subTitleColor, background: subTitleBackground }]\"\r\n >\r\n {{ data.subtitle || data.introduction }}\r\n </view>\r\n </view>\r\n <view>\r\n <slot name=\"activity\">\r\n <view v-if=\"data.promos?.length\" class=\"tag-box ss-flex ss-col-center ss-flex-wrap\">\r\n <view\r\n class=\"activity-tag ss-m-r-10 ss-m-t-16\"\r\n v-for=\"item in data.promos\"\r\n :key=\"item.id\"\r\n >\r\n {{ item.title }}\r\n </view>\r\n </view>\r\n </slot>\r\n <view v-if=\"goodsFields.price?.show\" class=\"ss-flex ss-col-bottom font-OPPOSANS\">\r\n <view class=\"sl-goods-price ss-m-r-12\" :style=\"[{ color: goodsFields.price.color }]\">\r\n <text class=\"price-unit ss-font-24\">{{ priceUnit }}</text>\r\n {{ isArray(data.price) ? fen2yuan(data.price[0]) : fen2yuan(data.price) }}\r\n </view>\r\n <view\r\n v-if=\"\r\n (goodsFields.original_price?.show || goodsFields.marketPrice?.show) &&\r\n (data.original_price > 0 || data.marketPrice > 0)\r\n \"\r\n class=\"goods-origin-price ss-m-t-16 font-OPPOSANS ss-flex\"\r\n :style=\"[{ color: originPriceColor }]\"\r\n >\r\n <text class=\"price-unit ss-font-20\">{{ priceUnit }}</text>\r\n <view class=\"ss-m-l-8\">{{ fen2yuan(data.marketPrice) }}</view>\r\n </view>\r\n </view>\r\n <view class=\"ss-m-t-16 ss-flex ss-flex-wrap\">\r\n <view class=\"sales-text\">{{ salesAndStock }}</view>\r\n </view>\r\n </view>\r\n </view>\r\n\r\n <slot name=\"cart\">\r\n <view class=\"buy-box ss-flex ss-col-center ss-row-center\">去购买</view>\r\n </slot>\r\n </view>\r\n </view>\r\n</template>\r\n\r\n<script setup>\r\n/**\r\n * 商品卡片\r\n *\r\n * @property {Array} size = [xs | sm | md | lg | sl ] \t\t\t \t- 列表数据\r\n * @property {String} tag \t\t\t\t\t\t\t\t\t\t\t- md及以上才有\r\n * @property {String} img \t\t\t\t\t\t\t\t\t\t\t- 图片\r\n * @property {String} background \t\t\t\t\t\t\t\t\t- 背景色\r\n * @property {String} topRadius \t\t\t\t\t\t\t\t\t- 上圆角\r\n * @property {String} bottomRadius \t\t\t\t\t\t\t\t\t- 下圆角\r\n * @property {String} title \t\t\t\t\t\t\t\t\t\t- 标题\r\n * @property {String} titleColor \t\t\t\t\t\t\t\t\t- 标题颜色\r\n * @property {Number} titleWidth = 0\t\t\t\t\t\t\t\t- 标题宽度,默认0,单位rpx\r\n * @property {String} subTitle \t\t\t\t\t\t\t\t\t\t- 副标题\r\n * @property {String} subTitleColor\t\t\t\t\t\t\t\t\t- 副标题颜色\r\n * @property {String} subTitleBackground \t\t\t\t\t\t\t- 副标题背景\r\n * @property {String | Number} price \t\t\t\t\t\t\t\t- 价格\r\n * @property {String} priceColor \t\t\t\t\t\t\t\t\t- 价格颜色\r\n * @property {String | Number} originPrice \t\t\t\t\t\t\t- 原价/划线价\r\n * @property {String} originPriceColor \t\t\t\t\t\t\t\t- 原价颜色\r\n * @property {String | Number} sales \t\t\t\t\t\t\t\t- 销售数量\r\n * @property {String} salesColor\t\t\t\t\t\t\t\t\t- 销售数量颜色\r\n *\r\n * @slots activity\t\t\t\t\t\t\t\t\t\t\t\t \t- 活动插槽\r\n * @slots cart\t\t\t\t\t\t\t\t\t\t\t\t\t\t- 购物车插槽,默认包含文字,背景色,文字颜色 || 图片 || 行为\r\n *\r\n * @event {Function()} click \t\t\t\t\t\t\t\t\t\t- 点击卡片\r\n *\r\n */\r\nimport { computed, reactive, getCurrentInstance, onMounted, nextTick } from 'vue'\r\nimport sheep from '@/sheep'\r\nimport { fen2yuan, formatSales, formatStock } from '@/sheep/hooks/useGoods'\r\n\r\nimport goodsCollectVue from '@/modules/mall/user/goods-collect.vue'\r\nimport { isArray } from 'lodash-es'\r\n\r\n// 数据\r\nconst state = reactive({})\r\n\r\n// 接收参数\r\nconst props = defineProps({\r\n goodsFields: {\r\n type: [Array, Object],\r\n default() {\r\n return {\r\n // 商品价格\r\n price: { show: true },\r\n // 库存\r\n stock: { show: true },\r\n // 商品名称\r\n name: { show: true },\r\n // 商品介绍\r\n introduction: { show: true },\r\n // 市场价\r\n marketPrice: { show: true },\r\n // 销量\r\n salesCount: { show: true },\r\n }\r\n },\r\n },\r\n tagStyle: {\r\n type: Object,\r\n default: {},\r\n },\r\n data: {\r\n type: Object,\r\n default: {},\r\n },\r\n size: {\r\n type: String,\r\n default: 'sl',\r\n },\r\n background: {\r\n type: String,\r\n default: '',\r\n },\r\n topRadius: {\r\n type: Number,\r\n default: 0,\r\n },\r\n bottomRadius: {\r\n type: Number,\r\n default: 0,\r\n },\r\n titleWidth: {\r\n type: Number,\r\n default: 0,\r\n },\r\n titleColor: {\r\n type: String,\r\n default: '#333',\r\n },\r\n priceColor: {\r\n type: String,\r\n default: '',\r\n },\r\n originPriceColor: {\r\n type: String,\r\n default: '#C4C4C4',\r\n },\r\n priceUnit: {\r\n type: String,\r\n default: '¥',\r\n },\r\n subTitleColor: {\r\n type: String,\r\n default: '#999999',\r\n },\r\n subTitleBackground: {\r\n type: String,\r\n default: '',\r\n },\r\n buttonShow: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n seckillTag: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n grouponTag: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n})\r\n\r\n// 组件样式\r\nconst elStyles = computed(() => {\r\n return {\r\n background: props.background,\r\n 'border-top-left-radius': props.topRadius + 'px',\r\n 'border-top-right-radius': props.topRadius + 'px',\r\n 'border-bottom-left-radius': props.bottomRadius + 'px',\r\n 'border-bottom-right-radius': props.bottomRadius + 'px',\r\n }\r\n})\r\n\r\n// 格式化销量、库存信息\r\nconst salesAndStock = computed(() => {\r\n const text = []\r\n if (props.goodsFields.salesCount?.show) {\r\n text.push(formatSales(props.data.sales_show_type, props.data.salesCount))\r\n }\r\n if (props.goodsFields.stock?.show) {\r\n text.push(formatStock(props.data.stock_show_type, props.data.stock))\r\n }\r\n return text.join(' | ')\r\n})\r\n\r\n// 返回事件\r\nconst emits = defineEmits(['click', 'getHeight'])\r\n\r\nconst onClick = () => {\r\n emits('click')\r\n}\r\n\r\n// 获取卡片实时高度\r\nconst { proxy } = getCurrentInstance()\r\nconst elId = `sheep_${Math.ceil(Math.random() * 10e5).toString(36)}`\r\nfunction getGoodsPriceCardWH() {\r\n if (props.size === 'md') {\r\n const view = uni.createSelectorQuery().in(proxy)\r\n view.select(`#${elId}`).fields({ size: true, scrollOffset: true })\r\n view.exec((data) => {\r\n let totalHeight = 0\r\n const goodsPriceCard = data[0]\r\n if (props.data.image_wh) {\r\n totalHeight =\r\n (goodsPriceCard.width / props.data.image_wh.w) * props.data.image_wh.h +\r\n goodsPriceCard.height\r\n } else {\r\n totalHeight = goodsPriceCard.width\r\n }\r\n emits('getHeight', totalHeight)\r\n })\r\n }\r\n}\r\nonMounted(() => {\r\n nextTick(() => {\r\n getGoodsPriceCardWH()\r\n })\r\n})\r\n</script>\r\n\r\n<style lang=\"scss\" scoped>\r\n \r\n.tag-icon-box {\r\n position: absolute;\r\n top: 0;\r\n left: 0;\r\n z-index: 2;\r\n .tag-icon {\r\n width: 72rpx;\r\n height: 44rpx;\r\n }\r\n}\r\n.seckill-tag {\r\n position: absolute;\r\n top: 0;\r\n left: 0;\r\n z-index: 2;\r\n width: 68rpx;\r\n height: 38rpx;\r\n font-size: 24rpx;\r\n font-weight: 500;\r\n line-height: 32rpx;\r\n color: #ffffff;\r\n background: linear-gradient(90deg, #ff5854 0%, #ff2621 100%);\r\n border-radius: 10rpx 0px 10rpx 0px;\r\n}\r\n.groupon-tag {\r\n position: absolute;\r\n top: 0;\r\n left: 0;\r\n z-index: 2;\r\n width: 68rpx;\r\n height: 38rpx;\r\n font-size: 24rpx;\r\n font-weight: 500;\r\n line-height: 32rpx;\r\n color: #ffffff;\r\n background: linear-gradient(90deg, #fe832a 0%, #ff6600 100%);\r\n border-radius: 10rpx 0px 10rpx 0px;\r\n}\r\n.goods-img {\r\n width: 100%;\r\n height: 100%;\r\n background-color: #f5f5f5;\r\n}\r\n.price-unit {\r\n margin-right: -4px;\r\n}\r\n.sales-text {\r\n display: table;\r\n margin-left: 0rpx;\r\n font-size: 24rpx;\r\n color: #c4c4c4;\r\n transform: scale(0.8);\r\n}\r\n\r\n.activity-tag {\r\n flex-shrink: 0;\r\n padding: 0 10rpx;\r\n font-size: 20rpx;\r\n line-height: 30rpx;\r\n color: #ff0000;\r\n border: 1px solid rgba(#ff0000, 0.25);\r\n border-radius: 4px;\r\n}\r\n\r\n.goods-origin-price {\r\n font-size: 20rpx;\r\n line-height: 36rpx;\r\n color: #c4c4c4;\r\n text-decoration: line-through;\r\n}\r\n\r\n// xs\r\n.xs-goods-card {\r\n position: relative;\r\n overflow: hidden;\r\n // max-width: 375rpx;\r\n background-color: $white;\r\n\r\n .xs-img-box {\r\n width: 128rpx;\r\n height: 128rpx;\r\n margin-right: 20rpx;\r\n }\r\n\r\n .xs-goods-title {\r\n font-size: 26rpx;\r\n font-weight: 500;\r\n color: #333;\r\n }\r\n\r\n .xs-goods-price {\r\n font-size: 30rpx;\r\n color: $red;\r\n }\r\n}\r\n\r\n// sm\r\n.sm-goods-card {\r\n position: relative;\r\n overflow: hidden;\r\n // width: 223rpx;\r\n // width: 100%;\r\n background-color: $white;\r\n\r\n .sm-img-box {\r\n // width: 228rpx;\r\n width: 100%;\r\n height: 208rpx;\r\n }\r\n .sm-goods-content {\r\n box-sizing: border-box;\r\n padding: 20rpx 16rpx;\r\n }\r\n .sm-goods-title {\r\n font-size: 26rpx;\r\n color: #333;\r\n }\r\n\r\n .sm-goods-price {\r\n font-size: 30rpx;\r\n color: $red;\r\n }\r\n}\r\n\r\n// md\r\n.md-goods-card {\r\n position: relative;\r\n z-index: 1;\r\n width: 100%;\r\n overflow: hidden;\r\n background-color: $white;\r\n\r\n .md-img-box {\r\n width: 100%;\r\n }\r\n\r\n .md-goods-title {\r\n width: 100%;\r\n font-size: 26rpx;\r\n color: #333;\r\n }\r\n .md-goods-subtitle {\r\n font-size: 24rpx;\r\n font-weight: 400;\r\n color: #999999;\r\n }\r\n\r\n .md-goods-price {\r\n font-size: 30rpx;\r\n line-height: 36rpx;\r\n color: $red;\r\n }\r\n\r\n .cart-box {\r\n position: absolute;\r\n right: 20rpx;\r\n bottom: 50rpx;\r\n z-index: 2;\r\n width: 54rpx;\r\n height: 54rpx;\r\n background: linear-gradient(90deg, #fe8900, #ff5e00);\r\n border-radius: 50%;\r\n\r\n .cart-icon {\r\n width: 30rpx;\r\n height: 30rpx;\r\n }\r\n }\r\n}\r\n\r\n// lg\r\n.lg-goods-card {\r\n position: relative;\r\n z-index: 1;\r\n height: 280rpx;\r\n overflow: hidden;\r\n background-color: $white;\r\n\r\n .lg-img-box {\r\n width: 280rpx;\r\n height: 280rpx;\r\n margin-right: 20rpx;\r\n }\r\n\r\n .lg-goods-title {\r\n font-size: 28rpx;\r\n font-weight: 500;\r\n color: #333333;\r\n // line-height: 36rpx;\r\n // width: 410rpx;\r\n }\r\n .lg-goods-subtitle {\r\n font-size: 24rpx;\r\n font-weight: 400;\r\n color: #999999;\r\n // line-height: 30rpx;\r\n // width: 410rpx;\r\n }\r\n\r\n .lg-goods-price {\r\n font-size: 30rpx;\r\n line-height: 36rpx;\r\n color: $red;\r\n }\r\n\r\n .buy-box {\r\n position: absolute;\r\n right: 20rpx;\r\n bottom: 20rpx;\r\n z-index: 2;\r\n width: 120rpx;\r\n height: 50rpx;\r\n font-size: 24rpx;\r\n color: #ffffff;\r\n background: linear-gradient(90deg, #fe8900, #ff5e00);\r\n border-radius: 25rpx;\r\n }\r\n .tag-box {\r\n width: 100%;\r\n }\r\n}\r\n\r\n// sl\r\n\r\n.sl-goods-card {\r\n position: relative;\r\n z-index: 1;\r\n width: 100%;\r\n overflow: hidden;\r\n background-color: $white;\r\n .sl-goods-content {\r\n box-sizing: border-box;\r\n padding: 20rpx 20rpx;\r\n }\r\n .sl-img-box {\r\n width: 100%;\r\n height: 360rpx;\r\n }\r\n\r\n .sl-goods-title {\r\n font-size: 26rpx;\r\n font-weight: 500;\r\n color: #333;\r\n }\r\n .sl-goods-subtitle {\r\n font-size: 24rpx;\r\n font-weight: 400;\r\n line-height: 30rpx;\r\n color: #999999;\r\n }\r\n\r\n .sl-goods-price {\r\n font-size: 30rpx;\r\n line-height: 36rpx;\r\n color: $red;\r\n }\r\n\r\n .buy-box {\r\n position: absolute;\r\n right: 20rpx;\r\n bottom: 20rpx;\r\n z-index: 2;\r\n width: 148rpx;\r\n height: 50rpx;\r\n font-size: 24rpx;\r\n color: #ffffff;\r\n background: linear-gradient(90deg, #fe8900, #ff5e00);\r\n border-radius: 25rpx;\r\n }\r\n}\r\n</style>\r\n","import Component from 'D:/App/Work/addr/acdr-ui/src/sheep/components/s-goods-column/s-goods-column.vue'\nwx.createComponent(Component)"],"names":["reactive","computed","formatSales","formatStock","getCurrentInstance","uni","onMounted","nextTick"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2UcA,kBAAQ,SAAC,EAAE;AAGzB,UAAM,QAAQ;AAuFd,UAAM,WAAWC,cAAQ,SAAC,MAAM;AAC9B,aAAO;AAAA,QACL,YAAY,MAAM;AAAA,QAClB,0BAA0B,MAAM,YAAY;AAAA,QAC5C,2BAA2B,MAAM,YAAY;AAAA,QAC7C,6BAA6B,MAAM,eAAe;AAAA,QAClD,8BAA8B,MAAM,eAAe;AAAA,MACpD;AAAA,IACH,CAAC;AAGD,UAAM,gBAAgBA,cAAQ,SAAC,MAAM;;AACnC,YAAM,OAAO,CAAE;AACf,WAAI,WAAM,YAAY,eAAlB,mBAA8B,MAAM;AACtC,aAAK,KAAKC,qBAAW,YAAC,MAAM,KAAK,iBAAiB,MAAM,KAAK,UAAU,CAAC;AAAA,MACzE;AACD,WAAI,WAAM,YAAY,UAAlB,mBAAyB,MAAM;AACjC,aAAK,KAAKC,qBAAW,YAAC,MAAM,KAAK,iBAAiB,MAAM,KAAK,KAAK,CAAC;AAAA,MACpE;AACD,aAAO,KAAK,KAAK,KAAK;AAAA,IACxB,CAAC;AAGD,UAAM,QAAQ;AAEd,UAAM,UAAU,MAAM;AACpB,YAAM,OAAO;AAAA,IACf;AAGA,UAAM,EAAE,MAAO,IAAGC,iCAAoB;AACtC,UAAM,OAAO,SAAS,KAAK,KAAK,KAAK,OAAQ,IAAG,GAAI,EAAE,SAAS,EAAE,CAAC;AAClE,aAAS,sBAAsB;AAC7B,UAAI,MAAM,SAAS,MAAM;AACvB,cAAM,OAAOC,cAAG,MAAC,oBAAmB,EAAG,GAAG,KAAK;AAC/C,aAAK,OAAO,IAAI,IAAI,EAAE,EAAE,OAAO,EAAE,MAAM,MAAM,cAAc,KAAI,CAAE;AACjE,aAAK,KAAK,CAAC,SAAS;AAClB,cAAI,cAAc;AAClB,gBAAM,iBAAiB,KAAK,CAAC;AAC7B,cAAI,MAAM,KAAK,UAAU;AACvB,0BACG,eAAe,QAAQ,MAAM,KAAK,SAAS,IAAK,MAAM,KAAK,SAAS,IACrE,eAAe;AAAA,UACzB,OAAa;AACL,0BAAc,eAAe;AAAA,UAC9B;AACD,gBAAM,aAAa,WAAW;AAAA,QACpC,CAAK;AAAA,MACF;AAAA,IACH;AACAC,kBAAAA,UAAU,MAAM;AACdC,oBAAAA,WAAS,MAAM;AACb,4BAAqB;AAAA,MACzB,CAAG;AAAA,IACH,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC1dD,GAAG,gBAAgB,SAAS;"} |