productDialog.vue 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <template>
  2. <uni-popup ref="detailPopup" :animation="false" :is-mask-click="false"
  3. mask-background-color="rgba(51, 137, 217, 0.65);" style="z-index: 101;">
  4. <view class="mall-detail-dialog">
  5. <view class="detail-content-box">
  6. <icon class="cpmx-title"></icon>
  7. <icon class="dialog-close-btn" @click="detailCloseBtn"></icon>
  8. <view class="product-body-box">
  9. <!-- ↓需要换成从接口中取得 wgy -->
  10. <view class="detail-item-box" v-for="(item,index) in productList " :key="index">
  11. <img :src="item.cover" class="mall-image" />
  12. <view class="content-body-box">
  13. <view class="content-name">
  14. <view class="name-text">{{item.levelName}}</view>
  15. </view>
  16. </view>
  17. </view>
  18. </view>
  19. </view>
  20. </view>
  21. </uni-popup>
  22. </template>
  23. <script setup>
  24. import {
  25. mallCardInfo
  26. } from "@/api/productMall.js"
  27. import {
  28. toast,
  29. debounce,
  30. getUserIdentity
  31. } from "@/utils/common";
  32. import {
  33. ref
  34. } from 'vue';
  35. const $emit = defineEmits(['payBtn'])
  36. const detailPopup = ref(null); // 索引
  37. let productList = ref([])
  38. // 打开弹窗
  39. function detailShow(data) {
  40. productList.value = data
  41. detailPopup.value.open();
  42. }
  43. // 开启提分之旅按钮
  44. function detailPayBtn() {
  45. $emit('payBtn')
  46. }
  47. function detailCloseBtn() {
  48. detailPopup.value.close();
  49. }
  50. defineExpose({
  51. detailShow
  52. })
  53. </script>