acdr-ui/dist/dev/mp-weixin/sheep/components/s-coupon-list/s-coupon-list.js.map

1 line
5.9 KiB
Plaintext
Raw Normal View History

2024-09-19 07:20:14 +08:00
{"version":3,"file":"s-coupon-list.js","sources":["../../../../../../src/sheep/components/s-coupon-list/s-coupon-list.vue","../../../../../../uniComponent:/RDovQXBwL1dvcmsvYWRkci9hY2RyLXVpL3NyYy9zaGVlcC9jb21wb25lbnRzL3MtY291cG9uLWxpc3Qvcy1jb3Vwb24tbGlzdC52dWU"],"sourcesContent":["<template>\r\n <view class=\"ss-m-20\" :style=\"{ opacity: disabled ? '0.5' : '1' }\">\r\n <view class=\"content\">\r\n <view\r\n class=\"tag ss-flex ss-row-center\"\r\n :class=\"isDisable ? 'disabled-bg-color' : 'info-bg-color'\"\r\n >\r\n {{ data.discountType === 1 ? '满减券' : '折扣券' }}\r\n </view>\r\n <view class=\"title ss-m-x-30 ss-p-t-18\">\r\n <view class=\"ss-flex ss-row-between\">\r\n <view\r\n class=\"value-text ss-flex-1 ss-m-r-10\"\r\n :class=\"isDisable ? 'disabled-color' : 'info-color'\"\r\n >\r\n {{ data.name }}\r\n </view>\r\n <view>\r\n <view\r\n class=\"ss-flex ss-col-bottom\"\r\n :class=\"isDisable ? 'disabled-color' : 'price-text'\"\r\n >\r\n <view class=\"value-reduce ss-m-b-10\" v-if=\"data.discountType === 1\">¥</view>\r\n <view class=\"value-price\">\r\n {{\r\n data.discountType === 1\r\n ? fen2yuan(data.discountPrice)\r\n : data.discountPercent / 10.0\r\n }}\r\n </view>\r\n <view class=\"value-discount ss-m-b-10 ss-m-l-4\" v-if=\"data.discountType === 2\">\r\n 折\r\n </view>\r\n </view>\r\n </view>\r\n </view>\r\n <view class=\"ss-flex ss-row-between ss-m-t-16\">\r\n <view\r\n class=\"sellby-text\"\r\n :class=\"isDisable ? 'disabled-color' : 'subtitle-color'\"\r\n v-if=\"data.validityType === 2\"\r\n >\r\n 有效期:领取后 {{ data.fixedEndTerm }} 天内可用\r\n </view>\r\n <view class=\"sellby-text\" :class=\"isDisable ? 'disabled-color' : 'subtitle-color'\" v-else>\r\n 有效期: {{ sheep.$helper.timeFormat(data.validStartTime, 'yyyy-mm-dd') }} 至\r\n {{ sheep.$helper.timeFormat(data.validEndTime, 'yyyy-mm-dd') }}\r\n </view>\r\n <view class=\"value-enough\" :class=\"isDisable ? 'disabled-color' : 'subtitle-color'\">\r\n 满 {{ fen2yuan(data.usePrice) }} 可用\r\n </view>\r\n </view>\r\n </view>\r\n </view>\r\n\r\n <!-- TODO 芋艿:可优化,增加优惠劵的描述 -->\r\n <view class=\"desc ss-flex ss-row-between\">\r\n <view>\r\n <view class=\"desc-title\">{{ data.description }}</view>\r\n <view>\r\n <slot name=\"reason\" />\r\n </view>\r\n </view>\r\n <view>\r\n <slot />\r\n </view>\r\n </view>\r\n </view>\r\n</template>\r\n\r\n<script setup>\r\nimport { computed, reactive } from 'vue'\r\nimport { fen2yuan } from '../../hooks/useGoods'\r\nimport sheep from '../../index'\r\n\r\nconst state = reactive({})\r\n\r\nconst isDisable = computed(() => {\r\n if (props.type === 'coupon') {\r\n return false\r\n }\r\n return props.data.status !== 1\r\n})\r\n\r\n// 接受参数\r\nconst props = defineProps({\r\n data: {\r\n type: Object,\r\n default: {},\r\n },\r\n disabled: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n type: {\r\n type: String,\r\n default: 'coupon', // coupon 优惠劵模版user 用户优惠劵\r\n },\r\n})\r\n</script>\r\n\r\n<style lang=\"scss\" scoped>\r\n \r\n.info-bg-color {\r\n background: linear-gradient(90deg, var(--ui-BG-Main), var(--ui-BG-Main-gradient));\r\n}\r\n\r\n.disabled-bg-color {\r\n background: #999;\r\n}\r\n\r\n.info-color {\r\n color: #333;\r\n}\r\n\r\n.subtitle-color {\r\n color: #666;\r\n}\r\n\r\n.disabled-color {\r\n color: #999;\r\n}\r\n\r\n.content {\r\n width: 100%;\r\n background: #fff;\r\n border-radius: 20rpx 20rpx 0 0;\r\n box-sh