zhengyiming
2025-02-24 3ee683d6b002f098e5b7fed11b54615126d82a3c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<template>
  <ContentScrollView>
    <SelectPayTypeView
      style="margin-top: 40px"
      :orderNo="orderNo"
      :lifePayOrderType="lifePayOrderType"
      @paySuccess="handePaySuccess"
    />
  </ContentScrollView>
</template>
 
<script setup lang="ts">
import { SelectPayTypeView, LifeRechargeConstants } from '@life-payment/components';
import Taro from '@tarojs/taro';
 
defineOptions({
  name: 'selectPayType',
});
 
const router = Taro.useRouter();
const orderNo = router.params?.orderNo ?? '';
const lifePayOrderType = Number(router.params?.lifePayOrderType ?? '');
 
function handePaySuccess(
  orderNo: string,
  lifePayOrderType: LifeRechargeConstants.LifePayOrderTypeEnum
) {
  Taro.navigateTo({
    url: `${RouterPath.rechargeResult}?orderNo=${orderNo}&lifePayOrderType=${lifePayOrderType}`,
  });
}
</script>