mallDetailDialog.vue 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. <template>
  2. <uni-popup ref="detailPopup" :animation="false" :is-mask-click="false"
  3. mask-background-color="rgba(51, 137, 217, 0.65);">
  4. <view class="mall-detail-dialog">
  5. <view class="detail-content-box">
  6. <icon class="yfmx-title"></icon>
  7. <icon class="dialog-close-btn" @click="detailCloseBtn"></icon>
  8. <view class="detail-body-box">
  9. <!-- ↓需要换成从接口中取得 wgy -->
  10. <view class="detail-item-box">
  11. <!-- radio选中状态需要改成动态的 wgy -->
  12. <radio value="zhifubao" checked="true" activeBackgroundColor="transparent" class="detail-radio radio-checked"/>
  13. <img src="/static/images/my/about-icon.png" class="mall-image"/>
  14. <view class="content-body-box">
  15. <view class="content-name">
  16. <view class="name-text">数学暑假进阶L1</view>
  17. </view>
  18. <view class="content-text">适用于L1和学前,介绍介绍,适用于L1和学前,介绍介绍适用于L1和学前,介绍介绍</view>
  19. <view class="content-row">
  20. <view class="content-yuanjia">¥39.9</view>
  21. </view>
  22. </view>
  23. </view>
  24. </view>
  25. <view class="detail-bottom-box">
  26. <view><radio value="zhifubao" checked="true" activeBackgroundColor="transparent" class="detail-radio radio-checked"/>全选</view>
  27. <view class="bottom-text-row">合计<text class="content-yuanjia">¥39.9</text></view>
  28. </view>
  29. </view>
  30. <!-- ↓需要换成动态的 wgy -->
  31. <view class="footer-mall-pay-box">
  32. <view class="mall-left-box">
  33. <view class="price-icon-box">
  34. <text class="red-price fh-text">¥</text>
  35. <text class="red-price">1999.8</text>明细
  36. <icon class="mx-jt-icon"></icon>
  37. </view>
  38. <view>购买即同意虚拟产品不支持退订</view>
  39. </view>
  40. <!-- 微信 -->
  41. <view class="pay-status-box" v-if="showPayWay" @click="switchPayWay"><icon class="wx-icon"></icon>微信</view>
  42. <!-- 支付宝 -->
  43. <view class="pay-status-box" v-if="!showPayWay" @click="switchPayWay"><icon class="zfb-icon"></icon>支付宝</view>
  44. <view class="pay-btn" @click="detailPayBtn">立即支付</view>
  45. </view>
  46. </view>
  47. </uni-popup>
  48. </template>
  49. <script setup>
  50. import { ref } from 'vue';
  51. const showPayWay = ref(true)
  52. function switchPayWay(){
  53. showPayWay.value = !showPayWay.value
  54. }
  55. const $emit = defineEmits(['payBtn'])
  56. const detailPopup = ref(null); // 索引
  57. // 打开弹窗
  58. function detailShow() {
  59. detailPopup.value.open();
  60. }
  61. // 开启提分之旅按钮
  62. function detailPayBtn(){
  63. $emit('payBtn')
  64. }
  65. function detailCloseBtn(){
  66. detailPopup.value.close();
  67. }
  68. defineExpose({
  69. detailShow
  70. })
  71. </script>