Popup.vue 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <template>
  2. <coupon-popup :value="value" @input="onChangeValue" :couponInfo="couponInfo" :storeRule="storeRule" border-radius="20" :maskCloseAble="true"
  3. @open="openPopup" @close="closePopup"/>
  4. </template>
  5. <script>
  6. import { setCartTotalNum } from '@/utils/app'
  7. import * as CartApi from '@/api/cart'
  8. import CouponPopup from '@/components/prestore-popup'
  9. export default {
  10. components: {
  11. CouponPopup
  12. },
  13. props: {
  14. // true 组件显示 false 组件隐藏
  15. value: {
  16. Type: Boolean,
  17. default: false
  18. },
  19. // 卡券详情信息
  20. couponInfo: {
  21. type: Object,
  22. default: {}
  23. },
  24. // 预存规则
  25. storeRule: {
  26. type: Array,
  27. default: []
  28. }
  29. },
  30. data() {
  31. return {}
  32. },
  33. created() {
  34. // empty
  35. },
  36. methods: {
  37. // 监听组件显示隐藏
  38. onChangeValue(val) {
  39. this.$emit('input', val)
  40. },
  41. /**
  42. * 获取卡券信息
  43. */
  44. findCouponInfo() {
  45. return new Promise((resolve, reject) => {
  46. resolve(couponInfo)
  47. })
  48. },
  49. // sku组件 开始-----------------------------------------------------------
  50. openPopup() {
  51. // console.log("监听 - 打开sku组件")
  52. },
  53. closePopup() {
  54. // console.log("监听 - 关闭sku组件")
  55. }
  56. }
  57. }
  58. </script>
  59. <style lang="scss" scoped>
  60. </style>