order-detail.tsx 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. import OHeader from '@/components/o-header'
  2. import { defineComponent, reactive } from 'vue'
  3. import styles from './order-detail.module.less'
  4. import Addres from './component/addres'
  5. import OSticky from '@/components/o-sticky'
  6. import { Button, Cell, CellGroup, Image, Popup, Tag } from 'vant'
  7. import Payment from '@/views/adapay/payment'
  8. import { useRoute, useRouter } from 'vue-router'
  9. import OQrcode from '@/components/o-qrcode'
  10. export default defineComponent({
  11. name: 'order-detail',
  12. setup() {
  13. const route = useRoute()
  14. const router = useRouter()
  15. const state = reactive({
  16. paymentStatus: false,
  17. showQrcode: false
  18. })
  19. const onSubmit = () => {
  20. state.paymentStatus = true
  21. }
  22. return () => (
  23. <>
  24. <OHeader />
  25. <div class={styles.cartConfirm}>
  26. <div class={styles.cartConfirmBox}>
  27. <Addres />
  28. </div>
  29. <CellGroup style={{ margin: 0 }}>
  30. <Cell class={styles.cellItem} center>
  31. {{
  32. icon: () => (
  33. <Image
  34. class={styles.img}
  35. src="https://daya.ks3-cn-beijing.ksyuncs.com/12/1670231208704.png"
  36. />
  37. ),
  38. title: () => (
  39. <div class={styles.goodsContent}>
  40. <h2>长笛标准配置</h2>
  41. <Tag type="primary">品牌型号</Tag>
  42. <p class={styles.goodsNum}>x 1</p>
  43. </div>
  44. ),
  45. value: () => <span class={styles.cellPrice}>1212</span>
  46. }}
  47. </Cell>
  48. <Cell class={styles.cellItem} center>
  49. {{
  50. icon: () => (
  51. <Image
  52. class={styles.img}
  53. src="https://daya.ks3-cn-beijing.ksyuncs.com/12/1670231208704.png"
  54. />
  55. ),
  56. title: () => (
  57. <div class={styles.goodsContent}>
  58. <h2>长笛标准配置长笛标准配置</h2>
  59. <Tag type="primary">品牌型号</Tag>
  60. <p class={styles.goodsNum}>x 1</p>
  61. </div>
  62. ),
  63. value: () => <span class={styles.cellPrice}>1212</span>
  64. }}
  65. </Cell>
  66. </CellGroup>
  67. </div>
  68. <OSticky position="bottom" background="white">
  69. <div class={styles.paymentContainer}>
  70. <div class={styles.payemntPrice}>
  71. <p class={styles.needPrice}>
  72. 共需支付:<span>¥3,860.00</span>
  73. </p>
  74. </div>
  75. <div class={styles.paymentBtn}>
  76. <Button
  77. color="linear-gradient(135deg, #FF8C4A 0%, #FF531C 100%)"
  78. round
  79. onClick={onSubmit}
  80. >
  81. 立即购买
  82. </Button>
  83. </div>
  84. </div>
  85. </OSticky>
  86. <Popup
  87. show={state.paymentStatus}
  88. closeOnClickOverlay={false}
  89. position="bottom"
  90. round
  91. closeOnPopstate
  92. safeAreaInsetBottom
  93. style={{ minHeight: '30%' }}
  94. >
  95. <Payment
  96. paymentConfig={{}}
  97. onClose={() => (state.paymentStatus = false)}
  98. onBackOut={() => {
  99. console.log('back')
  100. // router.back()
  101. }}
  102. />
  103. </Popup>
  104. <Popup
  105. v-model:show={state.showQrcode}
  106. position="bottom"
  107. style={{ background: 'transparent' }}
  108. safeAreaInsetBottom={true}
  109. >
  110. <div class={styles.codeContainer}>
  111. <div class={styles.codeImg}>
  112. <div class={styles.codeContent}>
  113. <h2 class={styles.codeTitle}>乐团报名</h2>
  114. <div class={styles.codeName}>武汉小学2022上学期团武汉小学</div>
  115. <div class={styles.codeQr}>
  116. <OQrcode text="http://ponline.dayaedu.com/" size={'400'} />
  117. </div>
  118. <div style={{ textAlign: 'center' }}>
  119. <span class={styles.codeBtnText}>扫描上方二维码完成资料填写</span>
  120. </div>
  121. <div class={styles.codeTips}>二维码将在两小时后失效,请及时登记</div>
  122. </div>
  123. </div>
  124. </div>
  125. </Popup>
  126. </>
  127. )
  128. }
  129. })