zhengyiming
2025-03-25 e1ad299bfdf0ec29e07c19b12705e9fc18c1a9aa
packages/components/src/views/PhoneBillRecharge/PhoneBillRechargeStep2.vue
@@ -83,6 +83,12 @@
      </template>
    </ConfirmDialog>
    <NutToast :msg="state.msg" v-model:visible="state.show" type="warn" cover />
    <NutDialog
      title="提示"
      :content="dialogState.msg"
      v-model:visible="dialogState.visible"
      @ok="onOk"
    />
  </NutForm>
</template>
@@ -125,6 +131,11 @@
});
const { goTo } = usePhoneBillRechargeContext();
const dialogState = reactive({
  visible: false,
  msg: '',
});
const form = reactive({
  ispCode: '',
@@ -195,7 +206,14 @@
const formRef = ref<any>(null);
function onOk() {}
function handleSubmit() {
  if (!form.name) {
    dialogState.visible = true;
    dialogState.msg = '请先完善手机号所属机主姓名';
    return;
  }
  if (!formRef.value) return;
  formRef.value.validate().then(({ valid, errors }: any) => {
    if (valid) {
@@ -211,7 +229,7 @@
}
const { state, invokeAliPay, invokeWeixinPay } = useSelectPayType({
  openId: toRef(props, 'openId'),
  getOpenId: toRef(props, 'getOpenId'),
  isInWeChat: toRef(props, 'isInWeChat'),
  isH5: toRef(props, 'isH5'),
  appId: toRef(props, 'appId'),
@@ -226,9 +244,9 @@
      channelId: blLifeRecharge.accountModel.channlesNum,
      productData: {
        ispCode: form.ispCode,
        parValue: props.isDev ? 0.1 : form.parValue,
        parValue: form.parValue,
        phone: form.phone,
        name: form.ispCode === BlLifeRecharge.constants.IspCode.dianxin ? form.name : '',
        name: form.name,
      },
    };
    let res = await blLifeRecharge.services.createLifePayPhoneOrder(params);