zhengyiming
2025-04-02 0886e91fdfe3b5528f80d2b6742083aa11d16ebb
fix: 四期bug
10个文件已修改
2个文件已删除
220 ■■■■■ 已修改文件
apps/taro/packages/components/assets/icon-back-top.png 补丁 | 查看 | 原始文档 | blame | 历史
apps/taro/packages/components/assets/icon-free-dian.png 补丁 | 查看 | 原始文档 | blame | 历史
apps/taro/src/hooks/lifepay.ts 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packages/components/src/components/Card/OrderCard.vue 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packages/components/src/views/Mine/Dashboard.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
packages/components/src/views/Order/components/ElectricOrder.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
packages/components/src/views/Order/components/GasOrder.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
packages/components/src/views/Order/components/PhoneOrder.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
packages/core/src/lifeRechargeConstants.ts 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packages/core/src/lifeRechargeServices.ts 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packages/services/api/LifePay.ts 83 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packages/services/api/typings.d.ts 88 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
apps/taro/packages/components/assets/icon-back-top.png
Binary files differ
apps/taro/packages/components/assets/icon-free-dian.png
Binary files differ
apps/taro/src/hooks/lifepay.ts
@@ -1,5 +1,6 @@
import { useQuery } from '@tanstack/vue-query';
import { useLifeRechargeContext, CreateEditPayChannelsInput } from '@life-payment/core-vue';
import { MaybeRef } from 'vue';
export function useOnlineService() {
  const { blLifeRecharge } = useLifeRechargeContext();
@@ -20,11 +21,12 @@
}
type UseLifePayChannlesAllListOptions = {
  params?: MaybeRef<API.QueryLifePayChannlesInput>;
  onSuccess?: (data: API.CreateEditPayChannelsInput[]) => any;
};
export function useLifePayChannlesAllList(options: UseLifePayChannlesAllListOptions = {}) {
  const { onSuccess } = options;
  const { onSuccess, params = {} } = options;
  const { blLifeRecharge } = useLifeRechargeContext();
@@ -33,9 +35,9 @@
    isLoading,
    refetch,
  } = useQuery({
    queryKey: ['blLifeRecharge/getLifePayChannlesAllList'],
    queryKey: ['blLifeRecharge/getLifePayChannlesAllList', params],
    queryFn: async () => {
      return await blLifeRecharge.services.getLifePayChannlesAllList({
      return await blLifeRecharge.services.getLifePayChannlesAllList(unref(params), {
        showLoading: false,
      });
    },
packages/components/src/components/Card/OrderCard.vue
@@ -4,7 +4,7 @@
      <div class="order-card-title-top">
        <div class="order-card-title-text">{{ title }}</div>
        <div class="order-card-title-status">
          {{ LifeRechargeConstants.LifePayOrderFrontStatusEnumText[status] }}
          {{ LifeRechargeConstants.LifePayOrderStatusEnumText[status] }}
        </div>
      </div>
      <div class="order-card-title-ordernum-wrapper">
@@ -14,14 +14,14 @@
        <slot name="actions">
          <div
            class="order-card-action"
            v-if="status === LifeRechargeConstants.LifePayOrderFrontStatusEnum.支付成功"
            v-if="status === LifeRechargeConstants.LifePayOrderStatusEnum.充值中"
            @click="emit('goApplyRefund', id)"
          >
            申请退款
          </div>
          <div
            class="order-card-action"
            v-if="status === LifeRechargeConstants.LifePayOrderFrontStatusEnum.退款失败"
            v-if="status === LifeRechargeConstants.LifePayOrderStatusEnum.退款失败"
            @click="emit('goRefundDetail', orderNo)"
          >
            详情
@@ -44,7 +44,7 @@
type Props = {
  title: string;
  status?: LifeRechargeConstants.LifePayOrderFrontStatusEnum;
  status?: LifeRechargeConstants.LifePayOrderStatusEnum;
  orderNo: string;
  id: string;
};
packages/components/src/views/Mine/Dashboard.vue
@@ -83,6 +83,6 @@
    );
  },
  placeholderData: () => ({} as TopStatisticsOutput),
  enabled: computed(() => blLifeRecharge.accountModel.userChannles.length > 0),
  enabled: computed(() => blLifeRecharge.accountModel.isBackClientUser),
});
</script>
packages/components/src/views/Order/components/ElectricOrder.vue
@@ -6,7 +6,7 @@
    <template #renderItem="{ item }">
      <OrderCard
        title="电费充值"
        :status="item?.frontStatus"
        :status="item?.lifePayOrderStatus"
        :order-no="item?.orderNo"
        :id="item?.id"
        @goApplyRefund="emit('goApplyRefund', $event)"
packages/components/src/views/Order/components/GasOrder.vue
@@ -6,7 +6,7 @@
    <template #renderItem="{ item }">
      <OrderCard
        title="燃气充值"
        :status="item?.frontStatus"
        :status="item?.lifePayOrderStatus"
        :order-no="item?.orderNo"
        :id="item?.id"
        @goApplyRefund="emit('goApplyRefund', $event)"
packages/components/src/views/Order/components/PhoneOrder.vue
@@ -6,7 +6,7 @@
    <template #renderItem="{ item }">
      <OrderCard
        title="话费充值"
        :status="item?.frontStatus"
        :status="item?.lifePayOrderStatus"
        :order-no="item?.orderNo"
        :id="item?.id"
        @goApplyRefund="emit('goApplyRefund', $event)"
packages/core/src/lifeRechargeConstants.ts
@@ -42,7 +42,10 @@
  export enum LifePayOrderStatusEnum {
    充值中 = 10,
    // 已失败 = 20,
    /**
     * @deprecated 仅作为老数据兼容判断
     */
    已失败 = 20,
    已完成 = 30,
@@ -56,7 +59,7 @@
  export const LifePayOrderStatusEnumText = {
    [LifePayOrderStatusEnum.充值中]: '充值中',
    // [LifePayOrderStatusEnum.已失败]: '已失败',
    [LifePayOrderStatusEnum.已失败]: '已失败',
    [LifePayOrderStatusEnum.已完成]: '已完成',
    [LifePayOrderStatusEnum.待退款]: '待退款',
    [LifePayOrderStatusEnum.已退款]: '已退款',
@@ -190,4 +193,10 @@
    微信小程序 = 20,
    微信公众号 = 30,
  }
  export enum LifePayChannelsStatsEnum {
    启用 = 10,
    禁用 = 20,
  }
}
packages/core/src/lifeRechargeServices.ts
@@ -351,9 +351,13 @@
  }
  /** 获取全部缴费渠道 GET /api/LifePay/GetLifePayChannlesAllList */
  async getLifePayChannlesAllList(options?: RequestConfig) {
  async getLifePayChannlesAllList(body: QueryLifePayChannlesInput, options?: RequestConfig) {
    return this.request<CreateEditPayChannelsInput[]>('/api/LifePay/GetLifePayChannlesAllList', {
      method: 'GET',
      method: 'POST',
      headers: {
        'Content-Type': 'application/json',
      },
      data: body,
      ...(options || {}),
    });
  }
@@ -888,3 +892,7 @@
  /** 昨日活跃用户 */
  yesterdayActiveUsers?: number;
}
export interface QueryLifePayChannlesInput {
  status?: LifeRechargeConstants.LifePayChannelsStatsEnum;
}
packages/services/api/LifePay.ts
@@ -176,9 +176,17 @@
  });
}
/** 同步订单 GET /api/LifePay/GetAllChannlesRake */
/** 同步订单分佣信息 GET /api/LifePay/GetAllChannlesRake */
export async function getAllChannlesRake(options?: API.RequestConfig) {
  return request<any>('/api/LifePay/GetAllChannlesRake', {
    method: 'GET',
    ...(options || {}),
  });
}
/** 统计交易流水 GET /api/LifePay/GetAllLifePayConsumption */
export async function getAllLifePayConsumption(options?: API.RequestConfig) {
  return request<any>('/api/LifePay/GetAllLifePayConsumption', {
    method: 'GET',
    ...(options || {}),
  });
@@ -207,9 +215,39 @@
  });
}
/** 渠道数据 POST /api/LifePay/GetChannelDataList */
export async function getChannelDataList(
  body: API.TopStatisticsInput,
  options?: API.RequestConfig
) {
  return request<API.ChannelDataListOutPut>('/api/LifePay/GetChannelDataList', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}
/** 获取渠道折扣 POST /api/LifePay/GetChannelRate */
export async function getChannelRate(body: API.ChannelsBaseInput, options?: API.RequestConfig) {
  return request<API.ChannelRateOutput>('/api/LifePay/GetChannelRate', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}
/** 30日佣金列表 POST /api/LifePay/GetChannlesRakeList */
export async function getChannlesRakeList(
  body: API.TopStatisticsInput,
  options?: API.RequestConfig
) {
  return request<API.ChannlesRakeListOutPut>('/api/LifePay/GetChannlesRakeList', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
@@ -288,10 +326,17 @@
  });
}
/** 获取全部缴费渠道 GET /api/LifePay/GetLifePayChannlesAllList */
export async function getLifePayChannlesAllList(options?: API.RequestConfig) {
/** 获取全部缴费渠道 POST /api/LifePay/GetLifePayChannlesAllList */
export async function getLifePayChannlesAllList(
  body: API.QueryLifePayChannlesInput,
  options?: API.RequestConfig
) {
  return request<API.CreateEditPayChannelsInput[]>('/api/LifePay/GetLifePayChannlesAllList', {
    method: 'GET',
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}
@@ -354,6 +399,24 @@
    data: body,
    ...(options || {}),
  });
}
/** 获取消费流水分页数据 POST /api/LifePay/GetLifePayConsumptionPage */
export async function getLifePayConsumptionPage(
  body: API.LifePayConsumptionPageInput,
  options?: API.RequestConfig
) {
  return request<API.LifePayConsumptionListOutputPageOutput>(
    '/api/LifePay/GetLifePayConsumptionPage',
    {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json',
      },
      data: body,
      ...(options || {}),
    }
  );
}
/** 获取收支流水分页数据 POST /api/LifePay/GetLifePayExpensesReceiptsPage */
@@ -548,6 +611,18 @@
  });
}
/** 获取30日收款统计 POST /api/LifePay/GetReceiptsList */
export async function getReceiptsList(body: API.TopStatisticsInput, options?: API.RequestConfig) {
  return request<API.ReceiptsListOutPut>('/api/LifePay/GetReceiptsList', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}
/** 获取顶部统计数据 POST /api/LifePay/GetTopStatistics */
export async function getTopStatistics(body: API.TopStatisticsInput, options?: API.RequestConfig) {
  return request<API.TopStatisticsOutput>('/api/LifePay/GetTopStatistics', {
packages/services/api/typings.d.ts
@@ -524,6 +524,29 @@
    type?: number;
  }
  interface ChannelDataListOutPut {
    /** Top5渠道收款 */
    receiveList?: ChannelDataReceive[];
    /** Top5渠道用户 */
    userNumberList?: ChannelDataUserNumber[];
  }
  interface ChannelDataReceive {
    /** 渠道名称 */
    channelName?: string;
    /** 收款 */
    receivePrice?: number;
    /** 佣金 */
    channlesRakePrice?: number;
  }
  interface ChannelDataUserNumber {
    /** 渠道名称 */
    channelName?: string;
    /** 用户数量 */
    number?: number;
  }
  interface ChannelOutput {
    name?: string;
    channlesNum?: string;
@@ -540,6 +563,11 @@
    checkChannelId?: string;
  }
  interface ChannlesRakeListOutPut {
    /** 30天佣金 */
    channlesRakeList?: ReceiptsDetail[];
  }
  interface CheckLoginVerificationCodeInput {
    messageType?: string;
    phoneNumber: string;
@@ -549,6 +577,10 @@
  interface ClockDto {
    kind?: string;
  }
  type ConsumptionFlowEnum = 10 | 20;
  type ConsumptionFrozenStatusEnum = 10 | 20;
  interface ControllerApiDescriptionModel {
    controllerName?: string;
@@ -1184,6 +1216,44 @@
  }
  type LifePayChannlesTypeEnum = 10 | 20;
  interface LifePayConsumptionListOutput {
    /** 编号 */
    id?: string;
    /** 平台订单号 */
    orderNo?: string;
    /** 外部订单号 */
    acoolyOrderNo?: string;
    /** 交易金额 */
    amount?: number;
    acoolyStatus?: ACOOLYStatusEnum;
    /** 记账时间 */
    finishTime?: string;
    frozenStatus?: ConsumptionFrozenStatusEnum;
    flow?: ConsumptionFlowEnum;
    /** 扣款金额 */
    deductionAmount?: number;
    /** 冻结金额 */
    frozenAmount?: number;
  }
  interface LifePayConsumptionListOutputPageOutput {
    pageModel?: Pagination;
    objectData?: any;
    data?: LifePayConsumptionListOutput[];
  }
  interface LifePayConsumptionPageInput {
    pageModel?: Pagination;
    checkChannelId?: string;
    /** 查询条件 */
    keyWord?: string;
    flow?: ConsumptionFlowEnum;
    /** 记账开始时间 */
    timeBegin?: string;
    /** 记账结束时间 */
    timeEnd?: string;
  }
  interface LifePayExpensesReceiptsListOutput {
    /** 编号 */
@@ -1852,6 +1922,10 @@
    providerKey?: string;
  }
  interface QueryLifePayChannlesInput {
    status?: LifePayChannelsStatsEnum;
  }
  interface QueryLifePayOrderListInput {
    pageModel?: Pagination;
    checkChannelId?: string;
@@ -1938,6 +2012,20 @@
    loginTimeEnd?: string;
  }
  interface ReceiptsDetail {
    /** 创建时间 */
    creationTime?: string;
    /** 金额 */
    amount?: number;
  }
  interface ReceiptsListOutPut {
    /** 30天收款 */
    receiveList?: ReceiptsDetail[];
    /** 30天收入 */
    incomeList?: ReceiptsDetail[];
  }
  interface RefundLifePayOrderInput {
    id?: string;
    /** 上传凭证 */