zhengyiming
2025-03-12 db365a5eff31c040c42463df4966bf34a5de6a6d
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
<template>
  <UserAccountListView @go-edit="handleGoEdit" />
</template>
 
<script setup lang="ts">
import { UserAccountListView } from '@life-payment/components';
import { UserAccountListOutput, LifeRechargeConstants } from '@life-payment/core-vue';
import Taro from '@tarojs/taro';
 
defineOptions({
  name: 'InnerPage',
});
 
function handleGoEdit(row: UserAccountListOutput) {
  if (row.lifePayType === LifeRechargeConstants.LifePayOrderTypeEnum.话费订单) {
    Taro.navigateTo({
      url: `${RouterPath.editPhoneUserAccount}?id=${row.id}`,
    });
  } else if (row.lifePayType === LifeRechargeConstants.LifePayOrderTypeEnum.电费订单) {
    Taro.navigateTo({
      url: `${RouterPath.editElectricUserAccount}?id=${row.id}`,
    });
  } else if (row.lifePayType === LifeRechargeConstants.LifePayOrderTypeEnum.燃气订单) {
    Taro.navigateTo({
      url: `${RouterPath.editGasUserAccount}?id=${row.id}`,
    });
  }
}
</script>