payment.tsx 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717
  1. import OSticky from '@/components/o-sticky'
  2. import {
  3. Button,
  4. Cell,
  5. CellGroup,
  6. Checkbox,
  7. CheckboxGroup,
  8. Icon,
  9. Image,
  10. Popup,
  11. showConfirmDialog,
  12. showToast,
  13. Tag
  14. } from 'vant'
  15. import { defineComponent, nextTick, onMounted, reactive, ref } from 'vue'
  16. import styles from '../index.module.less'
  17. import radioCheck from '@/common/images/icon-radio-check.png'
  18. import radioDefault from '@/common/images/icon-radio-default.png'
  19. import iconGives from '../images/icon-gives.png'
  20. import { useRoute, useRouter } from 'vue-router'
  21. import request from '@/helpers/request'
  22. import { moneyFormat } from '@/helpers/utils'
  23. import { CountUp } from 'countup.js'
  24. import OPopup from '@/components/o-popup'
  25. import MemberBao from '../../member-bao'
  26. import GoodsDetail from '../../goods-detail'
  27. import ODialog from '@/components/o-dialog'
  28. export default defineComponent({
  29. name: 'payment',
  30. emits: ['next'],
  31. setup() {
  32. const route = useRoute()
  33. const router = useRouter()
  34. const state = reactive({
  35. paymentType: '',
  36. musicPaymentType: '', // 乐团中对应支付方式
  37. check: [] as any, // 选中的数据
  38. checkboxRefs: [] as any,
  39. details: [] as any, //
  40. goodsInfo: {} as any, // 商品
  41. textBookInfo: {} as any, // 教材
  42. repaireInfo: {} as any, // 乐器保养
  43. vipInfo: {} as any, // 团练宝
  44. paymentOrderDetails: [] as any, // 购买状态
  45. orderInfo: {
  46. needPrice: 0,
  47. originalPrice: 0
  48. },
  49. memberBaoStatus: false, // 团练宝详情状态
  50. goodsStatus: false, //
  51. selectGoodsId: null as any,
  52. currentPrice: 0,
  53. selectGoodsInfo: {} as any,
  54. dialogStatus: false,
  55. dialogMessage: '',
  56. dialogOrchestraStatus: false, // 是否为不同的乐团
  57. dialogConfig: {} as any
  58. })
  59. // 获取支付渠道
  60. const sysParamConfig = async () => {
  61. try {
  62. const { data } = await request.get('/api-student/sysParamConfig/queryByParamName', {
  63. params: {
  64. paramName: 'payment_service_provider'
  65. }
  66. })
  67. state.paymentType = data.paramValue || ''
  68. } catch {
  69. //
  70. }
  71. }
  72. // 查询未支付订单
  73. const paymentOrderUnpaid = async () => {
  74. try {
  75. const { data } = await request.get('/api-student/userPaymentOrder/unpaid', {
  76. params: {
  77. orchestraId: route.query.id
  78. }
  79. })
  80. // 判断是否有待支付订单
  81. if (data.id) {
  82. if (data.orchestraId !== route.query.id) {
  83. state.dialogMessage = '您在其它乐团存在待支付订单,取消后才可继续报名,是否确认取消?'
  84. state.dialogStatus = true
  85. state.dialogOrchestraStatus = true
  86. state.dialogConfig = data
  87. } else {
  88. state.dialogMessage = '您有待支付的订单,是否继续支付'
  89. state.dialogStatus = true
  90. state.dialogConfig = data
  91. }
  92. }
  93. } catch {
  94. //
  95. }
  96. }
  97. // 获取商品信息
  98. const registerGoods = async () => {
  99. try {
  100. const { data } = await request.get(
  101. '/api-student/orchestraRegister/registerGoods/' + route.query.id
  102. )
  103. state.musicPaymentType = data.paymentServiceProvider || ''
  104. // 获取已经购买商品信息
  105. const paymentOrderDetails = data.paymentOrderDetails || []
  106. paymentOrderDetails.forEach((item: any) => {
  107. state.paymentOrderDetails.push(item.goodsType)
  108. })
  109. // 初始化数据商品数据
  110. const details = data.details || []
  111. details.forEach((item: any) => {
  112. if (item.goodsType === 'INSTRUMENTS') {
  113. const img = item.goodsUrl ? item.goodsUrl.split(',')[0] : ''
  114. state.goodsInfo = { ...item, goodsUrl: img }
  115. } else if (item.goodsType === 'TEXTBOOK') {
  116. const img = item.goodsUrl ? item.goodsUrl.split(',')[0] : ''
  117. state.textBookInfo = { ...item, goodsUrl: img }
  118. } else if (item.goodsType === 'REPAIR') {
  119. state.repaireInfo = { ...item }
  120. } else if (item.goodsType === 'VIP') {
  121. state.vipInfo = { ...item }
  122. }
  123. state.details = details
  124. // 默认选中所有的
  125. if (
  126. !state.paymentOrderDetails.includes(item.goodsType) &&
  127. ['INSTRUMENTS', 'TEXTBOOK', 'VIP'].includes(item.goodsType)
  128. ) {
  129. state.check.push(item.goodsId)
  130. }
  131. })
  132. calcPrice()
  133. } catch {
  134. //
  135. }
  136. }
  137. const onSelect = (type: string) => {
  138. state.checkboxRefs[type].toggle()
  139. calcPrice()
  140. }
  141. // 初始化金额
  142. const calcPrice = () => {
  143. const details = state.details
  144. const tempPrice = {
  145. needPrice: 0, //需要支付金额
  146. originalPrice: 0 // 原价
  147. }
  148. details.forEach((item: any) => {
  149. // 是否选中
  150. if (
  151. state.check.includes(item.goodsId) &&
  152. !state.paymentOrderDetails.includes(item.goodsType)
  153. ) {
  154. tempPrice.needPrice += parseFloat(item.currentPrice || 0)
  155. tempPrice.originalPrice += parseFloat(item.originalPrice || 0)
  156. }
  157. })
  158. state.orderInfo = tempPrice
  159. initNumCountUp()
  160. }
  161. const countUpRef = reactive({
  162. needPrice: null as any,
  163. originalPrice: null as any
  164. })
  165. const initNumCountUp = () => {
  166. nextTick(() => {
  167. // 在读学员
  168. if (countUpRef.needPrice) {
  169. countUpRef.needPrice.update(state.orderInfo.needPrice)
  170. } else {
  171. countUpRef.needPrice = new CountUp('needPrice', state.orderInfo.needPrice, {
  172. decimalPlaces: 2
  173. })
  174. if (!countUpRef.needPrice.error) {
  175. countUpRef.needPrice.start()
  176. } else {
  177. console.error(countUpRef.needPrice.error)
  178. }
  179. }
  180. // if (countUpRef.originalPrice) {
  181. // countUpRef.originalPrice.update(state.orderInfo.originalPrice)
  182. // } else {
  183. // countUpRef.originalPrice = new CountUp('originalPrice', state.orderInfo.originalPrice, {
  184. // decimalPlaces: 2
  185. // })
  186. // if (!countUpRef.originalPrice.error) {
  187. // countUpRef.originalPrice.start()
  188. // } else {
  189. // console.error(countUpRef.originalPrice.error)
  190. // }
  191. // }
  192. })
  193. }
  194. // 购买
  195. const onSubmit = async () => {
  196. try {
  197. // 判断订单号
  198. if (state.check.length <= 0) {
  199. showToast('请选择您要购买的商品')
  200. return
  201. }
  202. // 重新计算金额
  203. calcPrice()
  204. const params: any = [] // 支付参数
  205. const details = state.details
  206. let checkInstruments = false // 是否选择了乐器
  207. details.forEach((item: any) => {
  208. // 是否选中 并且没有购买过
  209. if (
  210. state.check.includes(item.goodsId) &&
  211. !state.paymentOrderDetails.includes(item.goodsType)
  212. ) {
  213. params.push({
  214. goodsId: item.goodsId,
  215. goodsNum: 1,
  216. goodsType: item.goodsType,
  217. paymentCashAmount: item.currentPrice, // 现金支付金额
  218. paymentCouponAmount: 0 // 优惠券金额
  219. })
  220. }
  221. // 判断是否是乐器
  222. if (
  223. item.goodsType === 'INSTRUMENTS' &&
  224. state.check.includes(item.goodsId) &&
  225. !state.paymentOrderDetails.includes(item.goodsType)
  226. ) {
  227. checkInstruments = false
  228. }
  229. })
  230. // 为了处理,商品和乐器保养做关联
  231. const repaire = state.repaireInfo
  232. if (checkInstruments && repaire.goodsId) {
  233. params.push({
  234. goodsId: repaire.goodsId,
  235. goodsNum: 1,
  236. goodsType: repaire.goodsType,
  237. paymentCashAmount: repaire.currentPrice, // 现金支付金额
  238. paymentCouponAmount: 0 // 优惠券金额
  239. })
  240. }
  241. // console.log({
  242. // bizId: route.query.id, // 乐团编号
  243. // orderType: 'ORCHESTRA',
  244. // paymentCashAmount: state.orderInfo.needPrice || 0,
  245. // paymentCouponAmount: 0,
  246. // goodsInfos: params
  247. // })
  248. // 创建订单
  249. const { data } = await request.post('/api-student/userPaymentOrder/executeOrder', {
  250. hideLoading: false,
  251. data: {
  252. paymentType: state.musicPaymentType || state.paymentType,
  253. bizId: route.query.id, // 乐团编号
  254. orderType: 'ORCHESTRA',
  255. paymentCashAmount: state.orderInfo.needPrice || 0,
  256. paymentCouponAmount: 0,
  257. goodsInfos: params,
  258. orderName: '乐团报名缴费',
  259. orderDesc: '乐团报名缴费'
  260. }
  261. })
  262. console.log(data)
  263. router.push({
  264. path: '/orderDetail',
  265. query: {
  266. pm: 1, // h5乐团报名
  267. config: JSON.stringify({ ...data.paymentConfig, paymentType: data.paymentType }),
  268. orderNo: data.orderNo
  269. }
  270. })
  271. } catch (e: any) {
  272. //
  273. console.log(e)
  274. }
  275. }
  276. onMounted(() => {
  277. sysParamConfig()
  278. // 查询未支付订单
  279. registerGoods()
  280. paymentOrderUnpaid()
  281. })
  282. return () => (
  283. <>
  284. <div class={styles.applyTitle}>报名须知</div>
  285. <div class={[styles.paymentTips, styles.mlr13]}>
  286. <p>
  287. 1、<span>乐团免费政策</span>:学生在团期间训练及教材免费政策(教材邮费需自理);
  288. </p>
  289. <p>
  290. 2、<span>入团须备工具</span>
  291. :家长在开训前自行为学生准备好①乐器、②乐团AI学练工具两项训练工具;
  292. </p>
  293. <p>
  294. 3、参加团购可享受同类工具同等品质价格低30%的团购政策,由基金会统一协调乐器调试及运输、学练工具安装及激活;
  295. </p>
  296. <p>
  297. 4、自行准备工具的家长,等收到开团确认信息后,可根据参考表开始为学生进行乐团训练工具准备。
  298. </p>
  299. </div>
  300. <CheckboxGroup
  301. v-model={state.check}
  302. style={{ paddingBottom: '20px' }}
  303. onChange={() => {
  304. calcPrice()
  305. }}
  306. >
  307. {/* 判断是否买了乐器学习系统 */}
  308. {!state.paymentOrderDetails.includes('VIP') && (
  309. <>
  310. {/* <div class={styles.applyTitle}>乐团学习系统</div> */}
  311. <CellGroup
  312. inset
  313. class={[styles.mlr13, styles.sectionCell]}
  314. onClick={() => onSelect(state.vipInfo.goodsId)}
  315. >
  316. <Cell border={false}>
  317. {{
  318. icon: () => (
  319. <Checkbox
  320. name={state.vipInfo.goodsId}
  321. class={styles.checkbox}
  322. ref={(el: any) => (state.checkboxRefs[state.vipInfo.goodsId] = el)}
  323. onClick={(e: Event) => {
  324. e.stopPropagation()
  325. }}
  326. v-slots={{
  327. icon: (props: any) => (
  328. <Icon
  329. class={styles.iconChecked}
  330. name={props.checked ? radioCheck : radioDefault}
  331. />
  332. )
  333. }}
  334. />
  335. ),
  336. title: () => (
  337. <div class={styles.section}>
  338. <Image
  339. class={styles.img}
  340. src={state.vipInfo.goodsUrl}
  341. onClick={(e: any) => {
  342. e.stopPropagation()
  343. state.memberBaoStatus = true
  344. }}
  345. />
  346. <div class={styles.sectionContent}>
  347. <h2
  348. onClick={(e: any) => {
  349. e.stopPropagation()
  350. state.memberBaoStatus = true
  351. }}
  352. >
  353. {state.vipInfo.goodsName}
  354. </h2>
  355. <Tag
  356. color="linear-gradient(135deg, #FF8C4A 0%, #FF531C 100%)"
  357. textColor="#fff"
  358. class={styles.brandName}
  359. >
  360. 6个月
  361. </Tag>
  362. <p class={[styles.model, 'van-multi-ellipsis--l2']}>
  363. {state.vipInfo.description}
  364. </p>
  365. </div>
  366. </div>
  367. )
  368. }}
  369. </Cell>
  370. <Cell>
  371. {{
  372. title: () => (
  373. <div class={styles.extra}>
  374. <div class={styles.sectionPrice}>
  375. <p class={styles.price}>
  376. 团购价:
  377. <span class={styles.numFont}>
  378. <span class={styles.numPrefix}>¥</span>
  379. {moneyFormat(state.vipInfo.currentPrice)}
  380. </span>
  381. </p>
  382. <p class={styles.originPrice}>
  383. 原价:
  384. <del class={styles.numFont}>
  385. ¥ {moneyFormat(state.vipInfo.originalPrice)}
  386. </del>
  387. </p>
  388. </div>
  389. </div>
  390. )
  391. }}
  392. </Cell>
  393. </CellGroup>
  394. </>
  395. )}
  396. {/* 判断是否已经购买乐器 */}
  397. {!state.paymentOrderDetails.includes('INSTRUMENTS') && (
  398. <>
  399. {/* <div class={styles.applyTitle}>乐器</div> */}
  400. <CellGroup
  401. inset
  402. class={[styles.mlr13, styles.sectionCell]}
  403. onClick={() => onSelect(state.goodsInfo.goodsId)}
  404. >
  405. <Cell border={false}>
  406. {{
  407. icon: () => (
  408. <Checkbox
  409. name={state.goodsInfo.goodsId}
  410. class={styles.checkbox}
  411. ref={(el: any) => (state.checkboxRefs[state.goodsInfo.goodsId] = el)}
  412. onClick={(e: Event) => {
  413. e.stopPropagation()
  414. }}
  415. v-slots={{
  416. icon: (props: any) => (
  417. <Icon
  418. class={styles.iconChecked}
  419. name={props.checked ? radioCheck : radioDefault}
  420. />
  421. )
  422. }}
  423. />
  424. ),
  425. title: () => (
  426. <div class={styles.section}>
  427. <Image
  428. class={styles.img}
  429. src={state.goodsInfo.goodsUrl}
  430. onClick={(e: any) => {
  431. e.stopPropagation()
  432. state.selectGoodsId = state.goodsInfo.goodsId
  433. state.currentPrice = state.goodsInfo.currentPrice
  434. state.selectGoodsInfo = {
  435. showFree: true,
  436. originalPrice: state.repaireInfo.originalPrice
  437. }
  438. state.goodsStatus = true
  439. }}
  440. />
  441. <div class={styles.sectionContent}>
  442. <h2
  443. onClick={(e: any) => {
  444. e.stopPropagation()
  445. state.selectGoodsId = state.goodsInfo.goodsId
  446. state.currentPrice = state.goodsInfo.currentPrice
  447. state.goodsStatus = true
  448. }}
  449. >
  450. {state.goodsInfo.goodsName}
  451. </h2>
  452. <Tag
  453. color="linear-gradient(135deg, #FF8C4A 0%, #FF531C 100%)"
  454. textColor="#fff"
  455. class={styles.brandName}
  456. >
  457. {state.goodsInfo.brandName}
  458. </Tag>
  459. <p class={[styles.model, 'van-multi-ellipsis--l2']}>
  460. {state.goodsInfo.description}
  461. </p>
  462. </div>
  463. </div>
  464. )
  465. }}
  466. </Cell>
  467. <Cell border={false}>
  468. {{
  469. title: () => (
  470. <div class={styles.extra}>
  471. <div class={styles.sectionPrice}>
  472. <p class={styles.price}>
  473. 团购价:
  474. <span class={styles.numFont}>
  475. <span class={styles.numPrefix}>¥ </span>
  476. {moneyFormat(state.goodsInfo.currentPrice)}
  477. </span>
  478. </p>
  479. <p class={styles.originPrice}>
  480. 原价:
  481. <del class={styles.numFont}>
  482. ¥ {moneyFormat(state.goodsInfo.originalPrice)}
  483. </del>
  484. </p>
  485. </div>
  486. </div>
  487. )
  488. }}
  489. </Cell>
  490. {/* <Cell center class={styles.gives}>
  491. {{
  492. title: () => (
  493. <div class={styles.sectionTips}>
  494. <Image src={iconGives} class={styles.iconGives} />
  495. 赠价值{state.repaireInfo.originalPrice}元乐器维保服务一年
  496. </div>
  497. )
  498. }}
  499. </Cell> */}
  500. </CellGroup>
  501. </>
  502. )}
  503. {/* 判断是否已经购买教材 */}
  504. {!state.paymentOrderDetails.includes('TEXTBOOK') && (
  505. <>
  506. {/* <div class={styles.applyTitle}>教材</div> */}
  507. <CellGroup
  508. inset
  509. class={[styles.mlr13, styles.sectionCell]}
  510. onClick={() => {
  511. return
  512. // onSelect(state.textBookInfo.goodsId)
  513. }}
  514. >
  515. <Cell border={false}>
  516. {{
  517. icon: () => (
  518. <Checkbox
  519. name={state.textBookInfo.goodsId}
  520. disabled
  521. class={styles.checkbox}
  522. ref={(el: any) => (state.checkboxRefs[state.textBookInfo.goodsId] = el)}
  523. onClick={(e: Event) => {
  524. e.stopPropagation()
  525. }}
  526. v-slots={{
  527. icon: (props: any) => (
  528. <Icon
  529. class={styles.iconChecked}
  530. name={props.checked ? radioCheck : radioDefault}
  531. />
  532. )
  533. }}
  534. />
  535. ),
  536. title: () => (
  537. <div class={styles.section}>
  538. <Image
  539. class={styles.img}
  540. src={state.textBookInfo.goodsUrl}
  541. onClick={(e: any) => {
  542. e.stopPropagation()
  543. state.selectGoodsId = state.textBookInfo.goodsId
  544. state.currentPrice = state.textBookInfo.currentPrice
  545. state.selectGoodsInfo = {}
  546. state.goodsStatus = true
  547. }}
  548. />
  549. <div class={styles.sectionContent}>
  550. <h2
  551. onClick={(e: any) => {
  552. e.stopPropagation()
  553. state.selectGoodsId = state.textBookInfo.goodsId
  554. state.currentPrice = state.textBookInfo.currentPrice
  555. state.selectGoodsInfo = {}
  556. state.goodsStatus = true
  557. }}
  558. >
  559. {state.textBookInfo.goodsName}
  560. </h2>
  561. <Tag
  562. color="linear-gradient(135deg, #FF8C4A 0%, #FF531C 100%)"
  563. textColor="#fff"
  564. class={styles.brandName}
  565. >
  566. {state.textBookInfo.brandName}
  567. </Tag>
  568. <p class={[styles.model, 'van-multi-ellipsis--l2']}>
  569. {state.textBookInfo.description}
  570. </p>
  571. </div>
  572. </div>
  573. )
  574. }}
  575. </Cell>
  576. <Cell>
  577. {{
  578. title: () => (
  579. <div class={styles.extra}>
  580. <div class={styles.sectionPrice}>
  581. <p class={styles.price}>
  582. 团购价:
  583. <span
  584. class={[
  585. state.textBookInfo.currentPrice > 0 ? styles.numFont : styles.free
  586. ]}
  587. >
  588. {state.textBookInfo.currentPrice > 0 ? (
  589. <>
  590. <span class={styles.numPrefix}>¥ </span>
  591. {moneyFormat(state.textBookInfo.currentPrice)}
  592. </>
  593. ) : (
  594. '免费'
  595. )}
  596. </span>
  597. </p>
  598. <p class={styles.originPrice}>
  599. 原价:
  600. <del class={styles.numFont}>
  601. ¥ {moneyFormat(state.textBookInfo.originalPrice)}
  602. </del>
  603. </p>
  604. </div>
  605. </div>
  606. )
  607. }}
  608. </Cell>
  609. </CellGroup>
  610. </>
  611. )}
  612. </CheckboxGroup>
  613. <OSticky position="bottom" background="white">
  614. <div class={styles.paymentContainer}>
  615. <div class={styles.payemntPrice}>
  616. <p class={styles.needPrice}>
  617. 支付金额:
  618. <span class={styles.numFont}>
  619. <span>¥ </span>
  620. <i style="font-style: normal" id="needPrice"></i>
  621. </span>
  622. </p>
  623. <p class={styles.allPrice}>
  624. <del class={styles.numFont}>
  625. 总原价:¥ {moneyFormat(state.orderInfo.originalPrice)}
  626. </del>
  627. </p>
  628. </div>
  629. <div class={styles.paymentBtn}>
  630. <Button
  631. color="linear-gradient(135deg, #FF8C4A 0%, #FF531C 100%)"
  632. round
  633. onClick={onSubmit}
  634. >
  635. 立即提交
  636. </Button>
  637. </div>
  638. </div>
  639. </OSticky>
  640. <OPopup v-model:modelValue={state.memberBaoStatus} position="right">
  641. <MemberBao />
  642. </OPopup>
  643. <OPopup v-model:modelValue={state.goodsStatus} position="right" destroy>
  644. {state.goodsStatus && (
  645. <GoodsDetail
  646. id={state.selectGoodsId}
  647. groupPrice={state.currentPrice}
  648. goodsInfo={state.selectGoodsInfo}
  649. />
  650. )}
  651. </OPopup>
  652. <ODialog
  653. title="提示"
  654. v-model:show={state.dialogStatus}
  655. message={state.dialogMessage}
  656. confirmButtonText={state.dialogOrchestraStatus ? '确认取消' : '继续支付'}
  657. cancelButtonText="取消订单"
  658. showCancelButton={!state.dialogOrchestraStatus}
  659. messageAlign={state.dialogOrchestraStatus ? 'left' : 'center'}
  660. onConfirm={async () => {
  661. if (state.dialogOrchestraStatus) {
  662. try {
  663. await request.post(
  664. '/api-student/userPaymentOrder/cancelPayment/' + state.dialogConfig.orderNo
  665. )
  666. } catch {
  667. //
  668. }
  669. } else {
  670. const paymentConfig = state.dialogConfig.paymentConfig
  671. router.push({
  672. path: '/orderDetail',
  673. query: {
  674. pm: 1, // h5乐团报名
  675. config: JSON.stringify({
  676. ...paymentConfig.paymentConfig,
  677. paymentType: paymentConfig.paymentType
  678. }),
  679. orderNo: paymentConfig.orderNo
  680. }
  681. })
  682. }
  683. }}
  684. onCancel={async () => {
  685. try {
  686. await request.post(
  687. '/api-student/userPaymentOrder/cancelPayment/' + state.dialogConfig.orderNo
  688. )
  689. } catch {
  690. //
  691. }
  692. }}
  693. />
  694. </>
  695. )
  696. }
  697. })