1 line
4.1 KiB
Plaintext
1 line
4.1 KiB
Plaintext
{"version":3,"file":"s-activity-pop.js","sources":["../../../../../../src/sheep/components/s-activity-pop/s-activity-pop.vue","../../../../../../uniComponent:/RDovQXBwL1dvcmsvYWRkci9hY2RyLXVpL3NyYy9zaGVlcC9jb21wb25lbnRzL3MtYWN0aXZpdHktcG9wL3MtYWN0aXZpdHktcG9wLnZ1ZQ"],"sourcesContent":["<!-- 商品信息:满减送等营销活动的弹窗 -->\r\n<template>\r\n <su-popup :show=\"show\" type=\"bottom\" round=\"20\" @close=\"emits('close')\" showClose>\r\n <view class=\"model-box\">\r\n <view class=\"title ss-m-t-16 ss-m-l-20 ss-flex\">营销活动</view>\r\n <scroll-view\r\n class=\"model-content ss-m-t-50\"\r\n scroll-y\r\n :scroll-with-animation=\"false\"\r\n :enable-back-to-top=\"true\"\r\n >\r\n <view v-for=\"item in state.activityInfo\" :key=\"item.id\">\r\n <view class=\"ss-flex ss-col-top ss-m-b-40\" @tap=\"onGoodsList(item)\">\r\n <view class=\"model-content-tag ss-flex ss-row-center\">满减</view>\r\n <view class=\"ss-m-l-20 model-content-title ss-flex-1\">\r\n <view class=\"ss-m-b-24\" v-for=\"rule in state.activityMap[item.id]?.rules\" :key=\"rule\">\r\n {{ formatRewardActivityRule(state.activityMap[item.id], rule) }}\r\n </view>\r\n </view>\r\n <text class=\"cicon-forward\" />\r\n </view>\r\n </view>\r\n </scroll-view>\r\n </view>\r\n </su-popup>\r\n</template>\r\n<script setup>\r\nimport sheep from '@/sheep'\r\nimport { computed, reactive, watch } from 'vue'\r\nimport RewardActivityApi from '@/sheep/api/promotion/rewardActivity'\r\nimport { formatRewardActivityRule } from '@/sheep/hooks/useGoods'\r\n\r\nconst props = defineProps({\r\n modelValue: {\r\n type: Object,\r\n default() {},\r\n },\r\n show: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n})\r\nconst emits = defineEmits(['close'])\r\nconst state = reactive({\r\n activityInfo: computed(() => props.modelValue),\r\n activityMap: {},\r\n})\r\n\r\nwatch(\r\n () => props.show,\r\n () => {\r\n // 展示的情况下,加载每个活动的详细信息\r\n if (props.show) {\r\n state.activityInfo?.forEach((activity) => {\r\n RewardActivityApi.getRewardActivity(activity.id).then((res) => {\r\n if (res.code !== 0) {\r\n return\r\n }\r\n state.activityMap[activity.id] = res.data\r\n })\r\n })\r\n }\r\n },\r\n)\r\n\r\nfunction onGoodsList(e) {\r\n sheep.$router.go('/modules/mall/activity/index', {\r\n activityId: e.id,\r\n })\r\n}\r\n</script>\r\n<style lang=\"scss\" scoped>\r\n \r\n.model-box {\r\n height: 60vh;\r\n .title {\r\n height: 80rpx;\r\n font-size: 36rpx;\r\n font-weight: bold;\r\n color: #333333;\r\n }\r\n}\r\n.model-content {\r\n box-sizing: border-box;\r\n padding: 0 20rpx;\r\n .model-content-tag {\r\n width: 68rpx;\r\n height: 32rpx;\r\n font-size: 24rpx;\r\n font-weight: 500;\r\n line-height: 42rpx;\r\n color: #ff6911;\r\n background: rgba(#ff6911, 0.1);\r\n border-radius: 5rpx;\r\n }\r\n .model-content-title {\r\n font-size: 26rpx;\r\n font-weight: 500;\r\n color: #333333;\r\n }\r\n .cicon-forward {\r\n font-size: 28rpx;\r\n color: #999999;\r\n }\r\n}\r\n</style>\r\n","import Component from 'D:/App/Work/addr/acdr-ui/src/sheep/components/s-activity-pop/s-activity-pop.vue'\nwx.createComponent(Component)"],"names":["reactive","computed","watch","RewardActivityApi","sheep"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCA,UAAM,QAAQ;AAUd,UAAM,QAAQ;AACd,UAAM,QAAQA,cAAAA,SAAS;AAAA,MACrB,cAAcC,cAAQ,SAAC,MAAM,MAAM,UAAU;AAAA,MAC7C,aAAa,CAAE;AAAA,IACjB,CAAC;AAEDC,kBAAK;AAAA,MACH,MAAM,MAAM;AAAA,MACZ,MAAM;;AAEJ,YAAI,MAAM,MAAM;AACd,sBAAM,iBAAN,mBAAoB,QAAQ,CAAC,aAAa;AACxCC,+CAAiB,kBAAC,kBAAkB,SAAS,EAAE,EAAE,KAAK,CAAC,QAAQ;AAC7D,kBAAI,IAAI,SAAS,GAAG;AAClB;AAAA,cACD;AACD,oBAAM,YAAY,SAAS,EAAE,IAAI,IAAI;AAAA,YAC/C,CAAS;AAAA,UACT;AAAA,QACK;AAAA,MACF;AAAA,IACH;AAEA,aAAS,YAAY,GAAG;AACtBC,wBAAM,QAAQ,GAAG,gCAAgC;AAAA,QAC/C,YAAY,EAAE;AAAA,MAClB,CAAG;AAAA,IACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACpEA,GAAG,gBAAgB,SAAS;"} |