1 line
3.2 KiB
Plaintext
1 line
3.2 KiB
Plaintext
|
{"version":3,"file":"s-popup-image.js","sources":["../../../../../../src/sheep/components/s-popup-image/s-popup-image.vue","../../../../../../uniComponent:/RDovQXBwL1dvcmsvYWRkci9hY2RyLXVpL3NyYy9zaGVlcC9jb21wb25lbnRzL3MtcG9wdXAtaW1hZ2Uvcy1wb3B1cC1pbWFnZS52dWU"],"sourcesContent":["<template>\r\n <view>\r\n <view v-for=\"(item, index) in popupList\" :key=\"index\">\r\n <su-popup\r\n v-if=\"index === currentIndex\"\r\n :show=\"item.isShow\"\r\n type=\"center\"\r\n backgroundColor=\"none\"\r\n round=\"0\"\r\n :showClose=\"true\"\r\n :isMaskClick=\"false\"\r\n @close=\"onClose(index)\"\r\n >\r\n <view class=\"img-box\">\r\n <image\r\n class=\"modal-img\"\r\n :src=\"sheep.$url.cdn(item.imgUrl)\"\r\n mode=\"widthFix\"\r\n @tap.stop=\"onPopup(item.url)\"\r\n />\r\n </view>\r\n </su-popup>\r\n </view>\r\n </view>\r\n</template>\r\n\r\n<script setup>\r\nimport sheep from '@/sheep'\r\nimport { computed, ref } from 'vue'\r\nimport { saveAdvHistory } from '@/sheep/hooks/useModal'\r\n\r\n// 定义属性\r\nconst props = defineProps({\r\n data: {\r\n type: Object,\r\n default() {},\r\n },\r\n})\r\n\r\n// const modalStore = sheep.$store('modal');\r\nconst modalStore = JSON.parse(uni.getStorageSync('modal-store') || '{}')\r\nconsole.log(modalStore)\r\nconst advHistory = modalStore.advHistory || []\r\nconst currentIndex = ref(0)\r\nconst popupList = computed(() => {\r\n const list = props.data.list || []\r\n const newList = []\r\n if (list.length > 0) {\r\n list.forEach((adv) => {\r\n if (adv.showType === 'once' && advHistory.includes(adv.imgUrl)) {\r\n adv.isShow = false\r\n } else {\r\n adv.isShow = true\r\n newList.push(adv)\r\n }\r\n\r\n // 记录弹窗已显示过\r\n saveAdvHistory(adv)\r\n })\r\n }\r\n return newList\r\n})\r\n\r\n// 跳转链接\r\nfunction onPopup(path) {\r\n sheep.$router.go(path)\r\n}\r\n\r\n// 关闭\r\nfunction onClose(index) {\r\n currentIndex.value = index + 1\r\n popupList.value[index].isShow = false\r\n}\r\n</script>\r\n\r\n<style lang=\"scss\" scoped>\r\n \r\n.img-box {\r\n width: 610rpx;\r\n // height: 800rpx;\r\n}\r\n.modal-img {\r\n width: 100%;\r\n height: 100%;\r\n}\r\n</style>\r\n","import Component from 'D:/App/Work/addr/acdr-ui/src/sheep/components/s-popup-image/s-popup-image.vue'\nwx.createComponent(Component)"],"names":["uni","ref","computed","saveAdvHistory","sheep"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAgCA,UAAM,QAAQ;AAQd,UAAM,aAAa,KAAK,MAAMA,cAAAA,MAAI,eAAe,aAAa,KAAK,IAAI;AACvE,YAAQ,IAAI,UAAU;AACtB,UAAM,aAAa,WAAW,cAAc,CAAE;AAC9C,UAAM,eAAeC,cAAG,IAAC,CAAC;AAC1B,UAAM,YAAYC,cAAQ,SAAC,MAAM;AAC/B,YAAM,OAAO,MAAM,KAAK,QAAQ,CAAE;AAClC,YAAM,UAAU,CAAE;AAClB,UAAI,KAAK,SAAS,GAAG;AACnB,aAAK,QAAQ,CAAC,QAAQ;AACpB,cAAI,IAAI,aAAa,UAAU,WAAW,SAAS,IAAI,MAAM,GAAG;AAC9D,gBAAI,SAAS;AAAA,UACrB,OAAa;AACL,gBAAI,SAAS;AACb,oBAAQ,KAAK,GAAG;AAAA,UACjB;AAGDC,+BAAAA,eAAe,GAAG;AAAA,QACxB,CAAK;AAAA,MACF;AACD,aAAO;AAAA,IACT,CAAC;AAGD,aAAS,QAAQ,MAAM;AACrBC,wBAAM,QAAQ,GAAG,IAAI;AAAA,IACvB;AAGA,aAAS,QAAQ,OAAO;AACtB,mBAAa,QAAQ,QAAQ;AAC7B,gBAAU,MAAM,KAAK,EAAE,SAAS;AAAA,IAClC;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACvEA,GAAG,gBAAgB,SAAS;"}
|