zhengyiming
2025-03-12 8525b5c780d8855eca89c46790627c00b3d83c79
fix: 二期需求
17个文件已修改
213 ■■■■■ 已修改文件
packages/components/src/styles/card.scss 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packages/components/src/styles/nut.scss 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packages/components/src/views/GasBillRecharge/GasBillRechargeStep2.vue 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packages/components/src/views/GasBillRecharge/GasBillRechargeStep3.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packages/components/src/views/Order/OrderApplyRefundView.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
packages/components/src/views/PhoneBillRecharge/PhoneBillRechargeBaseForm.vue 19 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packages/components/src/views/PhoneBillRecharge/PhoneBillRechargeStep1.vue 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packages/components/src/views/PhoneBillRecharge/PhoneBillRechargeStep2.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packages/components/src/views/electricBillRecharge/ElectricBillRechargeStep1.vue 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packages/components/src/views/electricBillRecharge/ElectricBillRechargeStep2.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packages/components/src/views/userAccount/EditElectricUserAccount.vue 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packages/components/src/views/userAccount/EditGasUserAccount.vue 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packages/components/src/views/userAccount/EditPhoneUserAccount.vue 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packages/core/src/lifeRecharge.ts 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packages/core/src/lifeRechargeServices.ts 39 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packages/services/api/LifePay.ts 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packages/services/api/typings.d.ts 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packages/components/src/styles/card.scss
@@ -65,5 +65,10 @@
.par-account-list {
  .nut-radio--button {
    margin-bottom: 20px !important;
    &:last-child {
      margin-right: 20px !important;
      margin-bottom: 20px !important;
    }
  }
}
packages/components/src/styles/nut.scss
@@ -168,4 +168,14 @@
  .pro-form-item-tips {
    word-break: break-all;
  }
  .nut-dialog__header {
    height: 44px;
  }
  .nut-dialog__footer {
    .nut-button--plain {
      border-width: 1px;
    }
  }
}
packages/components/src/views/GasBillRecharge/GasBillRechargeStep2.vue
@@ -1,18 +1,21 @@
<template>
  <GasBillRechargeBaseForm ref="formRef" v-model:form="preSetForm">
    <NutFormItem label="备注信息" class="bole-form-item" prop="remark">
      <NutInput
        v-model.trim="preSetForm.remark"
        class="bole-input-text"
      <NutTextarea
        placeholder="请输入备注信息"
        type="text"
        max-length="30"
      />
        placeholderClass="bole-input-text-placeholder"
        autoSize
        class="bole-input-textarea"
        v-model="preSetForm.remark"
        :max-length="30"
        limit-show
      >
      </NutTextarea>
    </NutFormItem>
    <div class="common-content">
      <NutButton class="recharge-button" type="primary" @click="handleNext">
        <div class="recharge-button-inner">
          <div class="recharge-button-text">立即充值</div>
          <div class="recharge-button-text">保存</div>
        </div>
      </NutButton>
      <NutButton class="recharge-button" type="primary" plain @click="goToPrevious">
@@ -25,7 +28,11 @@
</template>
<script setup lang="ts">
import { Button as NutButton, FormItem as NutFormItem, Input as NutInput } from '@nutui/nutui-taro';
import {
  Button as NutButton,
  FormItem as NutFormItem,
  Textarea as NutTextarea,
} from '@nutui/nutui-taro';
import { reactive, ref, computed, watch } from 'vue';
import GasBillRechargeBaseForm from './GasBillRechargeBaseForm.vue';
import { useGasBillRechargeContext } from './context';
packages/components/src/views/GasBillRecharge/GasBillRechargeStep3.vue
@@ -226,6 +226,7 @@
  try {
    let params: LifeGasDataCreateLifePayOrderInput = {
      userId: blLifeRecharge.accountModel.userId,
      channelId: blLifeRecharge.accountModel.channlesNum,
      productData: {
        parValue: props.isDev ? 0.1 : form.parValue,
        gasOrgType: form.gasOrgType,
packages/components/src/views/Order/OrderApplyRefundView.vue
@@ -8,7 +8,7 @@
  >
    <NutFormItem class="bole-form-item" prop="refundApplyRemark" required>
      <NutTextarea
        placeholder="请填写您需要充值的手机号码"
        placeholder="请输入退款原因"
        placeholderClass="bole-input-text-placeholder"
        autoSize
        class="bole-input-textarea"
packages/components/src/views/PhoneBillRecharge/PhoneBillRechargeBaseForm.vue
@@ -7,7 +7,7 @@
    class="order-bill-recharge phone"
  >
    <NutFormItem label="选择运营商:" class="bole-form-item" prop="ispCode" required>
      <NutRadioGroup v-model="form.ispCode" direction="horizontal">
      <NutRadioGroup v-model="form.ispCode" direction="horizontal" @change="handleIspCodeChange">
        <BlRadio
          :label="key"
          v-for="(val, key) in BlLifeRecharge.constants.IspCodeText"
@@ -39,6 +39,11 @@
      />
    </NutFormItem>
    <slot></slot>
    <NutDialog
      title="提示"
      content="电信可充值区域包括:广东、江苏、湖北、四川、江西、河北、河南、福建、辽宁。其它区域正在分批次进行维护中,在此期间可能会出现充值不成功并自动退款的情况,请您谅解。"
      v-model:visible="dialogVisible"
    />
  </NutForm>
</template>
@@ -48,12 +53,13 @@
  FormItem as NutFormItem,
  RadioGroup as NutRadioGroup,
  Input as NutInput,
  Dialog as NutDialog,
} from '@nutui/nutui-taro';
import { FormRules } from '@nutui/nutui-taro/dist/types/__VUE/form/types';
import { reactive, ref, computed } from 'vue';
import BlRadio from '../../components/Radio/Radio.vue';
import { FormValidator } from '../../utils';
import { BlLifeRecharge } from '@life-payment/core-vue';
import { BlLifeRecharge, LifeRechargeConstants } from '@life-payment/core-vue';
defineOptions({
  name: 'PhoneBillRechargeBaseForm',
@@ -74,6 +80,15 @@
  name: [{ required: true, message: '请输入姓名' }],
});
const dialogVisible = ref(false);
function handleIspCodeChange(ispCode: LifeRechargeConstants.IspCode) {
  console.log('ispCode: ', ispCode);
  if (ispCode === LifeRechargeConstants.IspCode.dianxin) {
    dialogVisible.value = true;
  }
}
const formRef = ref<any>(null);
defineExpose({
packages/components/src/views/PhoneBillRecharge/PhoneBillRechargeStep1.vue
@@ -1,18 +1,21 @@
<template>
  <PhoneBillRechargeBaseForm ref="formRef" v-model:form="form">
    <NutFormItem label="备注信息" class="bole-form-item" prop="remark">
      <NutInput
        v-model.trim="form.remark"
        class="bole-input-text"
      <NutTextarea
        placeholder="请输入备注信息"
        type="text"
        max-length="30"
      />
        placeholderClass="bole-input-text-placeholder"
        autoSize
        class="bole-input-textarea"
        v-model="form.remark"
        :max-length="30"
        limit-show
      >
      </NutTextarea>
    </NutFormItem>
    <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 class="recharge-button-text">保存</div>
        </div>
      </nut-button>
      <nut-button class="recharge-button" type="primary" plain @click="goToNext">
@@ -25,7 +28,11 @@
</template>
<script setup lang="ts">
import { Button as NutButton, FormItem as NutFormItem, Input as NutInput } from '@nutui/nutui-taro';
import {
  Button as NutButton,
  FormItem as NutFormItem,
  Textarea as NutTextarea,
} from '@nutui/nutui-taro';
import { reactive, ref, computed, provide } from 'vue';
import PhoneBillRechargeBaseForm from './PhoneBillRechargeBaseForm.vue';
import { usePhoneBillRechargeContext } from './context';
packages/components/src/views/PhoneBillRecharge/PhoneBillRechargeStep2.vue
@@ -215,6 +215,7 @@
  try {
    let params: LifePhoneDataCreateLifePayOrderInput = {
      userId: blLifeRecharge.accountModel.userId,
      channelId: blLifeRecharge.accountModel.channlesNum,
      productData: {
        ispCode: form.ispCode,
        parValue: props.isDev ? 0.1 : form.parValue,
packages/components/src/views/electricBillRecharge/ElectricBillRechargeStep1.vue
@@ -1,18 +1,21 @@
<template>
  <ElectricBillRechargeBaseForm ref="formRef" v-model:form="form">
    <NutFormItem label="备注信息" class="bole-form-item" prop="remark">
      <NutInput
        v-model.trim="form.remark"
        class="bole-input-text"
      <NutTextarea
        placeholder="请输入备注信息"
        type="text"
        max-length="30"
      />
        placeholderClass="bole-input-text-placeholder"
        autoSize
        class="bole-input-textarea"
        v-model="form.remark"
        :max-length="30"
        limit-show
      >
      </NutTextarea>
    </NutFormItem>
    <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 class="recharge-button-text">保存</div>
        </div>
      </nut-button>
      <nut-button class="recharge-button" type="primary" plain @click="goToNext">
@@ -25,7 +28,12 @@
</template>
<script setup lang="ts">
import { Button as NutButton, FormItem as NutFormItem, Input as NutInput } from '@nutui/nutui-taro';
import {
  Button as NutButton,
  FormItem as NutFormItem,
  Input as NutInput,
  Textarea as NutTextarea,
} from '@nutui/nutui-taro';
import { reactive, ref } from 'vue';
import { useElectricBillRechargeContext } from './context';
import ElectricBillRechargeBaseForm from './ElectricBillRechargeBaseForm.vue';
packages/components/src/views/electricBillRecharge/ElectricBillRechargeStep2.vue
@@ -232,6 +232,7 @@
  try {
    let params: LifeElectricDataCreateLifePayOrderInput = {
      userId: blLifeRecharge.accountModel.userId,
      channelId: blLifeRecharge.accountModel.channlesNum,
      productData: {
        parValue: props.isDev ? 0.1 : form.parValue,
        electricType: form.electricType,
packages/components/src/views/userAccount/EditElectricUserAccount.vue
@@ -2,13 +2,16 @@
  <LoadingLayout :loading="isLoading">
    <ElectricBillRechargeBaseForm ref="formRef" v-model:form="form">
      <NutFormItem label="备注信息" class="bole-form-item" prop="remark">
        <NutInput
          v-model.trim="form.remark"
          class="bole-input-text"
        <NutTextarea
          placeholder="请输入备注信息"
          type="text"
          max-length="30"
        />
          placeholderClass="bole-input-text-placeholder"
          autoSize
          class="bole-input-textarea"
          v-model="form.remark"
          :max-length="30"
          limit-show
        >
        </NutTextarea>
      </NutFormItem>
      <div class="common-content">
        <NutButton class="recharge-button" type="primary" @click="handleSave">
@@ -23,7 +26,7 @@
<script setup lang="ts">
import ElectricBillRechargeBaseForm from '../electricBillRecharge/ElectricBillRechargeBaseForm.vue';
import { Button as NutButton } from '@nutui/nutui-taro';
import { Button as NutButton, Textarea as NutTextarea } from '@nutui/nutui-taro';
import { reactive, ref, computed } from 'vue';
import {
  useLifeRechargeContext,
packages/components/src/views/userAccount/EditGasUserAccount.vue
@@ -13,13 +13,16 @@
        </NutFormItem>
      </template>
      <NutFormItem label="备注信息" class="bole-form-item" prop="remark">
        <NutInput
          v-model.trim="form.remark"
          class="bole-input-text"
        <NutTextarea
          placeholder="请输入备注信息"
          type="text"
          max-length="30"
        />
          placeholderClass="bole-input-text-placeholder"
          autoSize
          class="bole-input-textarea"
          v-model="form.remark"
          :max-length="30"
          limit-show
        >
        </NutTextarea>
      </NutFormItem>
      <div class="common-content">
        <NutButton class="recharge-button" type="primary" @click="handleSave">
@@ -34,7 +37,7 @@
<script setup lang="ts">
import GasBillRechargeBaseForm from '../GasBillRecharge/GasBillRechargeBaseForm.vue';
import { Button as NutButton } from '@nutui/nutui-taro';
import { Button as NutButton, Textarea as NutTextarea } from '@nutui/nutui-taro';
import { reactive, ref, computed } from 'vue';
import {
  useLifeRechargeContext,
packages/components/src/views/userAccount/EditPhoneUserAccount.vue
@@ -2,13 +2,16 @@
  <LoadingLayout :loading="isLoading">
    <PhoneBillRechargeBaseForm ref="formRef" v-model:form="form">
      <NutFormItem label="备注信息" class="bole-form-item" prop="remark">
        <NutInput
          v-model.trim="form.remark"
          class="bole-input-text"
        <NutTextarea
          placeholder="请输入备注信息"
          type="text"
          max-length="30"
        />
          placeholderClass="bole-input-text-placeholder"
          autoSize
          class="bole-input-textarea"
          v-model="form.remark"
          :max-length="30"
          limit-show
        >
        </NutTextarea>
      </NutFormItem>
      <div class="common-content">
        <NutButton class="recharge-button" type="primary" @click="handleSave">
@@ -23,7 +26,7 @@
<script setup lang="ts">
import PhoneBillRechargeBaseForm from '../PhoneBillRecharge/PhoneBillRechargeBaseForm.vue';
import { Button as NutButton } from '@nutui/nutui-taro';
import { Button as NutButton, Textarea as NutTextarea } from '@nutui/nutui-taro';
import { reactive, ref, computed } from 'vue';
import {
  useLifeRechargeContext,
packages/core/src/lifeRecharge.ts
@@ -19,6 +19,7 @@
    this.accountModel = new BlLifeRechargeAccountModel({
      userId: options.userId,
      phoneNumber: options.phoneNumber,
      channlesNum: options.channlesNum,
    });
  }
packages/core/src/lifeRechargeServices.ts
@@ -18,12 +18,17 @@
      ...axiosConfig,
      // baseURL: process.env.NODE_ENV === 'development' ? '/' : 'https://api.81812333.com',
      requestInterceptors: [
        // [
        //   (config) => {
        //     console.log('config2: ', config);
        //     return config;
        //   },
        // ],
        [
          (config) => {
            if (config.params) {
              config.params.checkChannelId = this.ctx.accountModel.channlesNum;
            }
            if (config.data) {
              config.data.checkChannelId = this.ctx.accountModel.channlesNum;
            }
            return config;
          },
        ],
        ...axiosConfig.requestInterceptors,
      ],
      timeout: 10 * 1000,
@@ -122,14 +127,15 @@
  }
  /** 根据订单号获取支付状态 GET /api/LifePay/GetPayStatusByOrderNo */
  async getPayStatusByOrderNo(params: APIgetPayStatusByOrderNoParams, options?: RequestConfig) {
  async getPayStatusByOrderNo(body: GetPayStatusByOrderNoInput, options?: RequestConfig) {
    return this.request<LifeRechargeConstants.LifePayStatusEnum>(
      '/api/LifePay/GetPayStatusByOrderNo',
      {
        method: 'GET',
        params: {
          ...params,
        method: 'POST',
        headers: {
          'Content-Type': 'application/json',
        },
        data: body,
        ...(options || {}),
      }
    );
@@ -372,6 +378,8 @@
export interface LifePhoneDataCreateLifePayOrderInput {
  userId?: string;
  /** 渠道Id */
  channelId?: string;
  productData?: LifePhoneData;
}
@@ -392,6 +400,8 @@
export interface LifeElectricDataCreateLifePayOrderInput {
  userId?: string;
  /** 渠道Id */
  channelId?: string;
  productData?: LifeElectricData;
}
@@ -599,6 +609,8 @@
export interface LifeGasDataCreateLifePayOrderInput {
  userId?: string;
  /** 渠道Id */
  channelId?: string;
  productData?: LifeGasData;
}
@@ -691,7 +703,7 @@
}
export interface ChannelsBaseInput {
  channelId?: string;
  checkChannelId?: string;
}
export interface AreaInfo {
@@ -707,3 +719,8 @@
  /** 快速检索 */
  quickQuery?: string;
}
export interface GetPayStatusByOrderNoInput {
  checkChannelId?: string;
  orderNo?: string;
}
packages/services/api/LifePay.ts
@@ -248,13 +248,13 @@
  });
}
/** 根据订单号获取支付状态 GET /api/LifePay/GetPayStatusByOrderNo */
/** 根据订单号获取支付状态 POST /api/LifePay/GetPayStatusByOrderNo */
export async function getPayStatusByOrderNo(
  body: API.GetPayStatusByOrderNoInput,
  options?: API.RequestConfig
) {
  return request<API.LifePayStatusEnum>('/api/LifePay/GetPayStatusByOrderNo', {
    method: 'GET',
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
packages/services/api/typings.d.ts
@@ -518,6 +518,7 @@
  }
  interface AddUpdateUserAccountInput {
    checkChannelId?: string;
    id?: string;
    /** 用户编号 */
    userId?: string;
@@ -12329,7 +12330,7 @@
  interface LifeElectricDataCreateLifePayOrderInput {
    userId?: string;
    /** 渠道Id */
    /** 渠道名称 */
    channelId?: string;
    checkChannelId?: string;
    productData?: LifeElectricData;
@@ -12350,7 +12351,7 @@
  interface LifeGasDataCreateLifePayOrderInput {
    userId?: string;
    /** 渠道Id */
    /** 渠道名称 */
    channelId?: string;
    checkChannelId?: string;
    productData?: LifeGasData;
@@ -12445,7 +12446,7 @@
  interface LifePhoneDataCreateLifePayOrderInput {
    userId?: string;
    /** 渠道Id */
    /** 渠道名称 */
    channelId?: string;
    checkChannelId?: string;
    productData?: LifePhoneData;
@@ -16444,6 +16445,7 @@
  }
  interface QueryUserAccountAllListInput {
    checkChannelId?: string;
    /** 用户Id */
    userId?: string;
    lifePayOrderType?: LifePayOrderTypeEnum;
@@ -16965,6 +16967,7 @@
  }
  interface RefundUserLifePayOrderInput {
    checkChannelId?: string;
    id?: string;
    /** 用户Id */
    userId?: string;