zhengyiming
2025-03-26 ea89b8937d8102a52676120ca74887fa340abb97
fix: 三期bug
3个文件已修改
36 ■■■■ 已修改文件
apps/taro/src/subpackages/recharge/phoneBillRecharge/InnerPage.vue 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packages/components/src/views/PhoneBillRecharge/PhoneBillRecharge.vue 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packages/components/src/views/PhoneBillRecharge/PhoneBillRechargeStep2.vue 23 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
apps/taro/src/subpackages/recharge/phoneBillRecharge/InnerPage.vue
@@ -12,6 +12,7 @@
      :isFocus="isFocus"
      :showAliPay="!isInWeChat"
      :showWeixinPay="isInWeChat"
      @missName="handleMissName"
    />
  </ContentScrollView>
</template>
@@ -23,6 +24,7 @@
import { isInAlipay, isInWeChat, isH5, isWeb } from '@/utils/env';
import { useUser, useFocus, useEnsureOpenId } from '@/hooks';
import { WXPayAppId } from '@/constants';
import { Message } from '@/utils';
defineOptions({
  name: 'InnerPage',
@@ -45,4 +47,13 @@
    url: `${RouterPath.rechargeResult}?orderNo=${orderNo}&lifePayOrderType=${BlLifeRecharge.constants.LifePayOrderTypeEnum.话费订单}`,
  });
}
async function handleMissName(userAccountId: string) {
  try {
    await Message.confirm({ message: '请先完善手机号所属机主姓名' });
    RouteHelper.navigateTo({
      url: `${RouterPath.editPhoneUserAccount}?id=${userAccountId}`,
    });
  } catch (error) {}
}
</script>
packages/components/src/views/PhoneBillRecharge/PhoneBillRecharge.vue
@@ -5,6 +5,7 @@
    v-bind="props"
    @go-pay="emit('goPay', $event)"
    @paySuccess="emit('paySuccess', $event)"
    @missName="emit('missName', $event)"
  />
</template>
@@ -30,6 +31,7 @@
const emit = defineEmits<{
  (e: 'goPay', orderNo: string): void;
  (e: 'paySuccess', orderNo: string): void;
  (e: 'missName', userAccountId: string): void;
}>();
provide(PhoneBillRechargeContextKey, {
packages/components/src/views/PhoneBillRecharge/PhoneBillRechargeStep2.vue
@@ -83,12 +83,6 @@
      </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>
@@ -132,11 +126,6 @@
const { goTo } = usePhoneBillRechargeContext();
const dialogState = reactive({
  visible: false,
  msg: '',
});
const form = reactive({
  ispCode: '',
  phone: '',
@@ -171,6 +160,7 @@
const emit = defineEmits<{
  (e: 'goPay', orderNo: string): void;
  (e: 'paySuccess', orderNo: string): void;
  (e: 'missName', userAccountId: string): void;
}>();
const { lifePayPhoneRate } = useGetRate();
@@ -206,17 +196,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) {
      if (!form.name) {
        emit('missName', form.currentUserAccountId);
        return;
      }
      recharge();
    }
  });