zhengyiming
2025-03-12 db365a5eff31c040c42463df4966bf34a5de6a6d
apps/taro/src/subpackages/userAccount/userAccountList/InnerPage.vue
@@ -1,11 +1,29 @@
<template>
  <UserAccountListView />
  <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>