zhengyiming
2025-02-21 9b87bcbcad94873dedee7389d1ef9742a8d72c2b
packages/components/src/views/PhoneBillRecharge/PhoneBillRecharge.vue
@@ -113,12 +113,13 @@
const emit = defineEmits<{
  (
    e: 'goPay',
    form: {
      ispCode: typeof BlLifeRecharge.constants.IspCode;
      phone: string;
      parValue: number;
      name: string;
    }
    // form: {
    //   ispCode: typeof BlLifeRecharge.constants.IspCode;
    //   phone: string;
    //   parValue: number;
    //   name: string;
    // }
    orderNo: string
  ): void;
}>();
@@ -172,23 +173,19 @@
  confirmDialogVisible.value = true;
}
async function createLifePayPhoneOrder() {
async function goPay() {
  try {
    let params: LifePhoneDataCreateLifePayOrderInput = {
      userId: blLifeRecharge.userId,
      // lifePayType: 10,
      productData: {
        ispCode: form.ispCode,
        parValue: 0.1,
        phone: '18858418480',
        phone: form.phone,
        name: form.ispCode === BlLifeRecharge.constants.IspCode.dianxin ? form.name : '',
      },
    };
    let res = await blLifeRecharge.services.createLifePayPhoneOrder(params);
    emit('goPay', res.orderNo);
  } catch (error) {}
}
function goPay() {
  emit('goPay');
}
</script>