zhengyiming
2025-06-11 91f00f1df35a964d69f48b9f71b484e2d4ef357e
fix: v1.4
1个文件已添加
10个文件已修改
131 ■■■■ 已修改文件
apps/taro/package.json 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
apps/taro/src/hooks/user.ts 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
apps/taro/src/utils/request/index.ts 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packages/components/src/views/Mine/Dashboard.vue 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packages/core/src/lifeRechargeAccountModel.ts 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packages/core/src/lifeRechargeServices.ts 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packages/services/api/LifePay.ts 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packages/services/api/Log.ts 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packages/services/api/index.ts 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packages/services/api/typings.d.ts 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pnpm-lock.yaml 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
apps/taro/package.json
@@ -77,7 +77,7 @@
    "qrcode.vue": "^3.6.0",
    "qs": "^6.11.1",
    "senin-mini": "^1.0.10",
    "senior-request": "^1.0.3",
    "senior-request": "^1.0.5",
    "taro-plugin-pinia": "^1.0.0",
    "vconsole": "^3.15.1",
    "vue": "3.5.12",
apps/taro/src/hooks/user.ts
@@ -174,12 +174,12 @@
  const { wxCode, wxOpenId } = useUser();
  const { getLifePayWxIndentity } = useLifePayWxIndentity();
  async function ensureOpenId() {
  async function ensureOpenId(): Promise<string> {
    if (wxOpenId.value) {
      return wxOpenId.value;
    } else {
      let rea = await getLifePayWxIndentity(wxCode.value);
      return rea.openId ? rea.openId : wxOpenId.value;
      return rea.openId ? rea.openId : await ensureOpenId();
    }
  }
apps/taro/src/utils/request/index.ts
@@ -1,5 +1,5 @@
import { type IRequestOptions, Request, type RequestConfig } from 'senior-request';
import { type AxiosRequestConfig, type AxiosError } from 'axios';
import axios, { type AxiosRequestConfig, type AxiosError } from 'axios';
import qs from 'qs';
import Taro from '@tarojs/taro';
import { getToken, Message } from '@/utils';
@@ -101,6 +101,13 @@
    // 错误接收及处理
    errorHandler: (error, opts) => {
      console.log('error: ', error);
      const userStore = useUserStoreWithOut();
      logFront({
        url: opts.url,
        message: JSON.stringify(error),
        requestTime: new Date().toLocaleString(),
        userId: userStore.virtualUserId,
      });
      if (opts?.skipErrorHandler) throw error;
      if (opts?.customErrorHandler) {
@@ -289,3 +296,15 @@
}
export const request = Request.create(config);
function logFront(body: API.LogFrontInput) {
  return axios.request({
    baseURL: AxiosOptions.baseURL,
    url: '/api/Log/LogFront',
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
  });
}
packages/components/src/views/Mine/Dashboard.vue
@@ -29,7 +29,7 @@
        <DashboardItem
          title="累计收益"
          :icon="IconDashboard5"
          :value="toThousand(topStatistics?.accumulatedIncome ?? 0)"
          :value="toThousand(topStatistics?.accumulatedChannlesRakePrice ?? 0)"
          need-symbol
        />
        <DashboardItem
@@ -80,7 +80,10 @@
const { blLifeRecharge } = useLifeRechargeContext();
const { data: topStatistics } = useQuery({
  queryKey: ['lifePayServices/getTopStatistics', blLifeRecharge.accountModel.userChannles],
  queryKey: [
    'lifePayServices/getTopStatistics',
    computed(() => blLifeRecharge.accountModel.userChannles),
  ],
  queryFn: async () => {
    return await blLifeRecharge.services.getTopStatistics(
      {
@@ -92,6 +95,10 @@
    );
  },
  placeholderData: () => ({} as TopStatisticsOutput),
  enabled: computed(() => blLifeRecharge.accountModel.isBackClientUser),
  enabled: computed(() => {
    return (
      !!blLifeRecharge.accountModel.isBackClientUser && blLifeRecharge.accountModel.isGetUserInfo
    );
  }),
});
</script>
packages/core/src/lifeRechargeAccountModel.ts
@@ -13,6 +13,7 @@
  /**用户所有的渠道 */
  userChannles = [] as ChannelOutput[];
  isBackClientUser: boolean;
  isGetUserInfo = false;
  constructor(
    ctx: BlLifeRecharge<TResponse, TRequestOptions>,
@@ -43,11 +44,12 @@
          showLoading: false,
        }
      );
      this.isBackClientUser = res.isBackClientUser;
      this.promoterIdNumber = res.promoterIdNumber;
      if (res && res.isBackClientUser) {
        this.setUserChannles(res.channlesNum ?? []);
      }
      this.isBackClientUser = res.isBackClientUser;
      this.promoterIdNumber = res.promoterIdNumber;
      this.isGetUserInfo = true;
      return res;
    } catch (error) {
      console.log('error: ', error);
packages/core/src/lifeRechargeServices.ts
@@ -962,6 +962,8 @@
  accumulatedUsers?: number;
  /** 昨日活跃用户 */
  yesterdayActiveUsers?: number;
  /** 累计佣金 */
  accumulatedChannlesRakePrice?: number;
}
export interface QueryLifePayChannlesInput {
packages/services/api/LifePay.ts
@@ -482,6 +482,21 @@
  });
}
/** 导出渠道订单Excel POST /api/LifePay/GetLifePayOrderPageExportForChannle */
export async function getLifePayOrderPageExportForChannle(
  body: API.QueryLifePayOrderListInput,
  options?: API.RequestConfig
) {
  return request<any>('/api/LifePay/GetLifePayOrderPageExportForChannle', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}
/** 获取充值流水分页数据 POST /api/LifePay/GetLifePayRechargeReceiptsPage */
export async function getLifePayRechargeReceiptsPage(
  body: API.LifePayRechargeReceiptsPageInput,
packages/services/api/Log.ts
New file
@@ -0,0 +1,15 @@
/* eslint-disable */
// @ts-ignore
import { request } from '@/utils/request';
/** 记录前端日志 POST /api/Log/LogFront */
export async function logFront(body: API.LogFrontInput, options?: API.RequestConfig) {
  return request<any>('/api/Log/LogFront', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}
packages/services/api/index.ts
@@ -14,6 +14,7 @@
import * as IdentityUser from './IdentityUser';
import * as IdentityUserLookup from './IdentityUserLookup';
import * as LifePay from './LifePay';
import * as Log from './Log';
import * as OperateHistory from './OperateHistory';
import * as Permissions from './Permissions';
import * as PhoneMessage from './PhoneMessage';
@@ -37,6 +38,7 @@
  IdentityUser,
  IdentityUserLookup,
  LifePay,
  Log,
  OperateHistory,
  Permissions,
  PhoneMessage,
packages/services/api/typings.d.ts
@@ -1473,6 +1473,8 @@
    lifePayType?: LifePayTypeEnum;
    /** 渠道名称 */
    channelName?: string;
    /** 运营商 */
    operator?: string;
    lifePayOrderType?: LifePayOrderTypeEnum;
    /** 订单号 */
    orderNo?: string;
@@ -1514,6 +1516,8 @@
    acoolyOrderNo?: string;
    acoolyStatus?: ACOOLYStatusEnum;
    lifePayRefundStatus?: LifePayRefundStatusEnum;
    /** 订单参数详情 */
    orderParamDetailJsonStr?: string;
    /** 实际到账金额 */
    actualReceivedAmount?: number;
    actualReceivedStatus?: LifePayStatusEnum;
@@ -1773,6 +1777,13 @@
    error?: string;
  }
  interface LogFrontInput {
    userId?: string;
    message?: string;
    url?: string;
    requestTime?: string;
  }
  interface MethodParameterApiDescriptionModel {
    name?: string;
    typeAsString?: string;
pnpm-lock.yaml
@@ -601,8 +601,8 @@
        specifier: ^1.0.10
        version: 1.0.12(@nutui/icons-vue-taro@0.0.9)(@nutui/nutui-taro@4.3.13)(@tanstack/vue-query@4.37.1)(@tarojs/components@3.6.20)(@tarojs/taro@3.6.20)(axios@1.7.7)(dayjs@1.11.13)(lodash@4.17.21)(vue@3.5.12)
      senior-request:
        specifier: ^1.0.3
        version: 1.0.4(axios@1.7.7)
        specifier: ^1.0.5
        version: 1.0.5(axios@1.7.7)
      taro-plugin-pinia:
        specifier: ^1.0.0
        version: 1.0.0
@@ -9520,8 +9520,8 @@
      - whiskers
    dev: true
  /@tencentcloud/call-engine-js@3.0.1:
    resolution: {integrity: sha512-OafM512KDbk4b9dpVVymLvuQuoVNqp7ZQmnZVjDmC5v/bQxA1FSUaAinty+7AU1Fb1FxQwxuHKDPysQAU+9M0g==}
  /@tencentcloud/call-engine-js@3.1.0:
    resolution: {integrity: sha512-ygbGO+NDsqVoF4ud4bAto4zLzqC6CYSJ1lvkoMsRHdaTeXi2M4qrcAqbqbrFD9L8VjLTsbw1o2MzbQCQfYnv3g==}
    dependencies:
      '@tencentcloud/chat': 3.5.5
      core-js: 3.41.0
@@ -9542,10 +9542,10 @@
      - vue
    dev: false
  /@tencentcloud/call-uikit-vue2.6@4.0.6(vue@3.5.12):
    resolution: {integrity: sha512-As0qoW6TncyZ0y10Ogm6KrziZGznM5DX5HBPdYfZDbDm6eIYxG13HD3K8BzUC/GRlny8Nxn4EfhSkn48StBruQ==}
  /@tencentcloud/call-uikit-vue2.6@4.0.7(vue@3.5.12):
    resolution: {integrity: sha512-w3EankGnt74+S6rDrsVsLY/sRm+R4PtnHQEKHiJyySOGUKlgthq8/gOh2Lee03mh3+Yd6gRivOnEmlBbVNEmQA==}
    dependencies:
      '@tencentcloud/call-engine-js': 3.0.1
      '@tencentcloud/call-engine-js': 3.1.0
      '@tencentcloud/chat': 3.5.5
      '@tencentcloud/tui-core': 2.4.0
      '@vue/composition-api': 1.7.2(vue@3.5.12)
@@ -9561,10 +9561,10 @@
      tuicall-engine-webrtc: 3.1.6
    dev: false
  /@tencentcloud/call-uikit-vue2@4.0.6:
    resolution: {integrity: sha512-egV/rS0T77vj3+d3YpurJxynFBJ41hbBO8WPmwc5z9BD2qjM2HSKgbMR2jGF6XAxjherCK/qlaIZLQQiNIKmNQ==}
  /@tencentcloud/call-uikit-vue2@4.0.7:
    resolution: {integrity: sha512-EzLrlzOgAnIY+aSVT2if06D0ebPgqIXTcVQuY+xj6NQI+PTpfkRu/SAlC50CHuaGOdH7F5P+U32dCOjcCoS4BQ==}
    dependencies:
      '@tencentcloud/call-engine-js': 3.0.1
      '@tencentcloud/call-engine-js': 3.1.0
      '@tencentcloud/chat': 3.5.5
      '@tencentcloud/tui-core': 2.4.0
    dev: false
@@ -9577,10 +9577,10 @@
      tuicall-engine-webrtc: 3.1.6
    dev: false
  /@tencentcloud/call-uikit-vue@4.0.6:
    resolution: {integrity: sha512-eqcIv2QcsH1iRdpbBJu6sv73wVMzaeb4Bap5A2B+uVJrnrwEd1KwOzk8wV4gNIbtF08fK933R4OnkuCRMhoH4A==}
  /@tencentcloud/call-uikit-vue@4.0.7:
    resolution: {integrity: sha512-FGaCeCOAyk0z/qiobT+d9F1RFKLal1/lhk51pDso38MlJbvhzk7/s/feubO1Fbi5nHqRBF71m7+RS44m/Fcspg==}
    dependencies:
      '@tencentcloud/call-engine-js': 3.0.1
      '@tencentcloud/call-engine-js': 3.1.0
      '@tencentcloud/chat': 3.5.5
      '@tencentcloud/tui-core': 2.4.0
    dev: false
@@ -9614,9 +9614,9 @@
      '@tiptap/pm': ^2.0.0-beta.220
      '@tiptap/suggestion': ^2.0.0-beta.220
    dependencies:
      '@tencentcloud/call-uikit-vue': 4.0.6
      '@tencentcloud/call-uikit-vue2': 4.0.6
      '@tencentcloud/call-uikit-vue2.6': 4.0.6(vue@3.5.12)
      '@tencentcloud/call-uikit-vue': 4.0.7
      '@tencentcloud/call-uikit-vue2': 4.0.7
      '@tencentcloud/call-uikit-vue2.6': 4.0.7(vue@3.5.12)
      '@tencentcloud/chat-uikit-engine': 2.4.4
      '@tencentcloud/roomkit-web-vue3': 3.0.0(pinia@2.3.1)(typescript@4.9.5)(vue@3.5.12)
      '@tencentcloud/tui-core': 2.4.0
@@ -27356,6 +27356,14 @@
      axios: 1.7.7
    dev: false
  /senior-request@1.0.5(axios@1.7.7):
    resolution: {integrity: sha512-4o7p4uuP2w20atTCYsP+9aQr3VMMKyMLO/urRZAVfFepgH5cUcHRO4ZFprpXKqkPKrF3QjrNPY4Vk8Y3CIRovg==}
    peerDependencies:
      axios: '*'
    dependencies:
      axios: 1.7.7
    dev: false
  /sentence-case@3.0.4:
    resolution: {integrity: sha512-8LS0JInaQMCRoQ7YUytAo/xUu5W2XnQxV2HI/6uM6U7CITS1RqPElr30V6uIqyMKM9lJGRVFy5/4CuzcixNYSg==}
    dependencies: