<template>
|
<PhoneBillRechargeBaseForm ref="formRef" v-model:form="form">
|
<div class="common-content">
|
<nut-button class="recharge-button" type="primary" @click="handleNext">
|
<div class="recharge-button-inner">
|
<div class="recharge-button-text">立即充值</div>
|
</div>
|
</nut-button>
|
</div>
|
</PhoneBillRechargeBaseForm>
|
</template>
|
|
<script setup lang="ts">
|
import {
|
Form as NutForm,
|
FormItem as NutFormItem,
|
RadioGroup as NutRadioGroup,
|
Radio as NutRadio,
|
Input as NutInput,
|
Button as NutButton,
|
} from '@nutui/nutui-taro';
|
import { FormRules } from '@nutui/nutui-taro/dist/types/__VUE/form/types';
|
import { reactive, ref, computed, provide } from 'vue';
|
import BlRadio from '../../components/Radio/Radio.vue';
|
import { FormValidator } from '../../utils';
|
import {
|
useLifeRechargeContext,
|
BlLifeRecharge,
|
LifePhoneDataCreateLifePayOrderInput,
|
LifeRechargeConstants,
|
} from '@life-payment/core-vue';
|
import RechargeTipsView from '../../components/RechargeTipsView/RechargeTipsView.vue';
|
import ConfirmDialog from '../../components/Dialog/ConfirmDialog.vue';
|
import ConfirmDialogInfoItem from '../../components/Dialog/ConfirmDialogInfoItem.vue';
|
import { useGetRate, useGetPhoneParValue } from '../../hooks';
|
import PhoneBillRechargeBaseForm from './PhoneBillRechargeBaseForm.vue';
|
import { usePhoneBillRechargeContext } from './context';
|
|
defineOptions({
|
name: 'PhoneBillRechargeStep1',
|
});
|
|
const form = reactive({
|
ispCode: '',
|
phone: '',
|
name: '',
|
});
|
|
const { goToNext } = usePhoneBillRechargeContext();
|
|
const formRef = ref<any>(null);
|
|
function handleNext() {
|
if (!formRef.value) return;
|
formRef.value.validate().then(({ valid, errors }: any) => {
|
if (valid) {
|
goToNext();
|
}
|
});
|
}
|
</script>
|