lv 3 недель назад
Родитель
Сommit
ae5f8e3d6b

+ 1 - 1
android/app/build.gradle

@@ -97,7 +97,7 @@ android {
         minSdkVersion rootProject.ext.minSdkVersion
         targetSdkVersion rootProject.ext.targetSdkVersion
         versionCode 1
-        versionName "1.0.2.1"
+        versionName "1.0.2.2"
 
         buildConfigField "String", "REACT_NATIVE_RELEASE_LEVEL", "\"${findProperty('reactNativeReleaseLevel') ?: 'stable'}\""
     }

+ 2 - 2
android/app/src/main/res/values/strings.xml

@@ -1,6 +1,6 @@
 <resources>
-  <string name="app_name">Loan Assistant</string>
+  <string name="app_name">借贷助手</string>
   <string name="expo_system_ui_user_interface_style" translatable="false">light</string>
-  <string name="expo_runtime_version">1.0.2.1</string>
+  <string name="expo_runtime_version">1.0.2.2</string>
   <string name="expo_splash_screen_resize_mode" translatable="false">contain</string>
 </resources>

+ 1 - 1
android/settings.gradle

@@ -31,7 +31,7 @@ extensions.configure(com.facebook.react.ReactSettingsExtension) { ex ->
 }
 expoAutolinking.useExpoModules()
 
-rootProject.name = 'Loan Assistant'
+rootProject.name = '借贷助手'
 
 expoAutolinking.useExpoVersionCatalog()
 

+ 2 - 2
app.json

@@ -1,8 +1,8 @@
 {
   "expo": {
-    "name": "Loan Assistant",
+    "name": "借贷助手",
     "slug": "assistant",
-    "version": "1.0.2.1",
+    "version": "1.0.2.2",
     "orientation": "portrait",
     "icon": "./assets/images/icon.png",
     "scheme": "loanassistant",

+ 4 - 4
ios/LoanAssistant.xcodeproj/project.pbxproj

@@ -372,11 +372,11 @@
 				);
 				OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_DEBUG";
 				PRODUCT_BUNDLE_IDENTIFIER = com.cdloan.assistant;
-				PRODUCT_NAME = LoanAssistant;
+				PRODUCT_NAME = "app";
 				SWIFT_OBJC_BRIDGING_HEADER = "LoanAssistant/LoanAssistant-Bridging-Header.h";
 				SWIFT_OPTIMIZATION_LEVEL = "-Onone";
 				SWIFT_VERSION = 5.0;
-				TARGETED_DEVICE_FAMILY = 1;
+				TARGETED_DEVICE_FAMILY = "1";
 				VERSIONING_SYSTEM = "apple-generic";
 			};
 			name = Debug;
@@ -403,10 +403,10 @@
 				);
 				OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_RELEASE";
 				PRODUCT_BUNDLE_IDENTIFIER = com.cdloan.assistant;
-				PRODUCT_NAME = LoanAssistant;
+				PRODUCT_NAME = "app";
 				SWIFT_OBJC_BRIDGING_HEADER = "LoanAssistant/LoanAssistant-Bridging-Header.h";
 				SWIFT_VERSION = 5.0;
-				TARGETED_DEVICE_FAMILY = 1;
+				TARGETED_DEVICE_FAMILY = "1";
 				VERSIONING_SYSTEM = "apple-generic";
 			};
 			name = Release;

+ 1 - 1
ios/LoanAssistant/Info.plist

@@ -19,7 +19,7 @@
     <key>CFBundlePackageType</key>
     <string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
     <key>CFBundleShortVersionString</key>
-    <string>1.0.2.1</string>
+    <string>1.0.2.2</string>
     <key>CFBundleSignature</key>
     <string>????</string>
     <key>CFBundleURLTypes</key>

+ 1 - 1
ios/LoanAssistant/Supporting/Expo.plist

@@ -36,7 +36,7 @@ FQ==&#xD;
     <key>EXUpdatesLaunchWaitMs</key>
     <integer>30000</integer>
     <key>EXUpdatesRuntimeVersion</key>
-    <string>1.0.2.1</string>
+    <string>1.0.2.2</string>
     <key>EXUpdatesURL</key>
     <string>https://updates-loan.ewaga.com/api/manifest</string>
   </dict>

+ 9 - 9
src/app/(tabs)/analytics.tsx

@@ -1,3 +1,9 @@
+import type { Customer as CustomerType } from '@/app/(tabs)/customer';
+import { SectionHeader } from '@/components/ui/section-header';
+import { Colors } from '@/constants/theme';
+import type { ListResponse } from '@/utils/api';
+import api from '@/utils/api';
+import { useSWC } from '@/utils/cache';
 import { ActivityIndicator, Modal } from '@ant-design/react-native';
 import { Ionicons } from '@expo/vector-icons';
 import { BlurView } from 'expo-blur';
@@ -6,13 +12,7 @@ import React, { useCallback, useState } from 'react';
 import { Pressable, Text, View } from 'react-native';
 import Animated, { Extrapolation, interpolate, useAnimatedScrollHandler, useAnimatedStyle, useSharedValue } from 'react-native-reanimated';
 import { useSafeAreaInsets } from 'react-native-safe-area-context';
-import { SectionHeader } from '@/components/ui/section-header';
-import { Colors } from '@/constants/theme';
-import api from '@/utils/api';
-import { useSWC } from '@/utils/cache';
 import { UploadComponent } from '../../components/upload';
-import type { Customer as CustomerType } from '@/app/(tabs)/customer';
-import type { ListResponse } from '@/utils/api';
 
 type AnalysisRecord = {
   id: string;
@@ -133,7 +133,7 @@ export default function AnalyticsScreen() {
 
 
 
-      <SectionHeader title="解析记录" actionText="查看全部" />
+      <SectionHeader title="解析记录" />
       <View className="gap-3">
         {loading === true && <ActivityIndicator />}
         {list?.list?.map((record) => (
@@ -173,7 +173,7 @@ export default function AnalyticsScreen() {
                 <Text className="text-base font-bold text-on-surface">
                   {record.customer_name || record.name || '客户'}
                 </Text>
-                <Text className="text-xs text-on-surface-variant">{record.createtime}</Text>
+                <Text className="text-xs text-on-surface-variant">{record.status}</Text>
               </View>
               {(record.status === 'pending' || record.status === 'failed') && (
                 <View>
@@ -201,7 +201,7 @@ export default function AnalyticsScreen() {
                     />
                   </View>
                 </View>)}
-              {record.status === 'canceled' && (
+              {record.status === 'failed' && (
                 <Text className="text-sm text-error">解析失败,请联系管理员</Text>
               )}
 

+ 57 - 46
src/app/(tabs)/customer.tsx

@@ -1,4 +1,9 @@
-import { ActivityIndicator, Toast } from '@ant-design/react-native';
+import { StatusBadge } from '@/components/ui/status-badge';
+import { Colors } from '@/constants/theme';
+import type { ListResponse } from '@/utils/api';
+import api from '@/utils/api';
+import { getApiCache } from '@/utils/storage';
+import { ActivityIndicator, Icon, Toast } from '@ant-design/react-native';
 import { Ionicons } from '@expo/vector-icons';
 import clsx from 'clsx';
 import { BlurView } from 'expo-blur';
@@ -7,19 +12,14 @@ import React, { useCallback, useEffect, useRef, useState } from 'react';
 import { Pressable, Text, TextInput, View } from 'react-native';
 import Animated, { Extrapolation, interpolate, useAnimatedScrollHandler, useAnimatedStyle, useSharedValue } from 'react-native-reanimated';
 import { useSafeAreaInsets } from 'react-native-safe-area-context';
-import { StatusBadge } from '@/components/ui/status-badge';
-import api from '@/utils/api';
-import { getApiCache } from '@/utils/storage';
-import type { ListResponse } from '@/utils/api';
 
-export type CustomerLoanStatus = 'idle' | 'matched' | 'unmatch' | 'pending' | 'completed' | 'all' | undefined;
+export type CustomerLoanStatus = 'idle' | 'unmatch' | 'completed' | 'all' | 'unknow' | undefined ;
 export const CustomerLoanStatusText: Record<NonNullable<CustomerLoanStatus>, string> = {
   all: '所有',
   idle: '待匹配',
-  pending: '匹配中',
-  matched: '已匹配',
   completed: '已完成',
   unmatch: '匹配失败',
+  unknow: "未知",
 };
 
 
@@ -31,6 +31,8 @@ export type Customer = {
   note: string;
   score?: string;
   updatetime: string;
+  credit_status?: string;
+  credit_count: number;
 };
 
 const PAGE_SIZE = 15;
@@ -38,51 +40,60 @@ const CACHE_KEY = 'customer_first';
 
 function CustomerCard({ item }: { item: Customer }) {
   return (
-    <Pressable
-      className="rounded-2xl border border-outline-variant bg-surface-container-lowest px-4 py-4 active:opacity-90 active:scale-[0.99]"
-    >
-      <View className="mb-3 flex-row items-start justify-between gap-3">
-        <View className="flex-1 flex-row items-center gap-3">
-          <View className="h-11 w-11 items-center justify-center rounded-full bg-primary-fixed">
-            <Text className="text-base font-bold text-primary">{item.name[0]}</Text>
-          </View>
-          <View className="flex-1">
-            <Text className="text-lg font-bold text-on-surface">{item.name}</Text>
-            <Text className="mt-1 text-sm text-on-surface-variant">{item.mobile}</Text>
+    
+      <View
+        className="rounded-2xl border border-outline-variant bg-surface-container-lowest px-4 py-4 mb-4"
+      >
+        <View className="mb-3 flex-row items-start justify-between gap-3">
+          <View className="flex-1 flex-row items-center gap-3">
+            <View className="h-11 w-11 items-center justify-center rounded-full bg-primary-fixed">
+              <Text className="text-base font-bold text-primary">{item.name[0]}</Text>
+            </View>
+            <View className="flex-1">
+              <Text className="text-lg font-bold text-on-surface">{item.name}</Text>
+              <Text className="mt-1 text-sm text-on-surface-variant">{item.mobile}</Text>
+            </View>
           </View>
+          <StatusBadge text={CustomerLoanStatusText[item.loan_status || 'unknow']} variant="secondary" />
         </View>
-        <StatusBadge text={item.loan_status || ''} variant="secondary" />
-      </View>
 
-      <Text className="mb-2.5 text-sm leading-6 text-on-surface-variant">{item.note}</Text>
+        {/* <Text className="mb-2.5 text-sm leading-6 text-on-surface-variant">{item.note}</Text> */}
 
-      <View className="mb-3 flex-row flex-wrap items-center gap-3">
-        <View className="flex-row items-center gap-1">
-          <Ionicons name="document-text-outline" size={16} color="#94a3b8" />
-          <Text className="text-xs text-on-surface-variant">{item.loan_status}</Text>
-        </View>
-        {item.score ? (
+        <View className="mb-1 flex-row flex-wrap items-center gap-3 pb-2">
           <View className="flex-row items-center gap-1">
-            <Ionicons name="analytics-outline" size={16} color="#94a3b8" />
-            <Text className="text-xs text-on-surface-variant">评分 {item.score}</Text>
+            <Ionicons name="document-text-outline" size={16} color="#94a3b8" />
+            <Text className="text-xs text-on-surface-variant">{item.loan_status}</Text>
           </View>
-        ) : null}
-        <Text className="ml-auto text-xs text-outline">{item.updatetime}</Text>
-      </View>
+          {item.score ? (
+            <View className="flex-row items-center gap-1">
+              <Ionicons name="analytics-outline" size={16} color="#94a3b8" />
+              <Text className="text-xs text-on-surface-variant">评分 {item.score}</Text>
+            </View>
+          ) : null}
+          <Text className="ml-auto text-xs text-outline">{item.credit_count==0?<Icon name='cloud-upload' size={14} color={Colors.tint} /> : item.credit_status}</Text>
+        </View>
 
-      <View className="flex-row gap-3">
-        <Pressable
-          className="flex-1 items-center rounded-xl bg-primary-container py-2.5 active:opacity-88"
-        >
-          <Text className="text-sm font-bold text-on-primary">{item.loan_status}</Text>
-        </Pressable>
-        <Pressable
-          className="flex-1 items-center rounded-xl bg-surface-container-high py-2.5 active:opacity-88"
-        >
-          <Text className="text-sm font-semibold text-on-surface">编辑资料</Text>
-        </Pressable>
+        <View className="flex-row gap-3">
+          <Link href={{
+      pathname: '/credit/detail', params: {
+        // id: item.credit_id,
+        customer_id: item.id,
+        name: item.name
+      }
+    }} asChild>
+          <Pressable
+            className="flex-1 items-center rounded-xl bg-primary-container py-2.5 active:opacity-88"
+          >
+            <Text className="text-sm font-bold text-on-primary">征信管理</Text>
+          </Pressable>
+            </Link>
+          <Pressable
+            className="flex-1 items-center rounded-xl bg-surface-container-high py-2.5 active:opacity-88"
+          >
+            <Text className="text-sm font-semibold text-on-surface">编辑资料</Text>
+          </Pressable>
+        </View>
       </View>
-    </Pressable>
   );
 }
 
@@ -300,7 +311,7 @@ export default function CustomerScreens() {
           </Animated.View>
         ),
       }} />
-      <Link asChild href="/customer/add" style={{bottom: insets.bottom + 44 + 12}} className="absolute pb-2 right-5">
+      <Link asChild href="/customer/add" style={{ bottom: insets.bottom + 44 + 12 }} className="absolute pb-2 right-5">
         <Pressable
           className="h-14 w-14 items-center justify-center rounded-full bg-primary-container active:opacity-80 active:scale-[0.94]"
         >

+ 7 - 7
src/app/_layout.tsx

@@ -1,5 +1,12 @@
+import { AnimatedSplashOverlay } from '@/components/animated-icon';
+import { antdTheme } from '@/constants/antd-theme';
+import { Colors } from '@/constants/theme';
 import '@/global.css';
+import api from '@/utils/api';
+import { AuthProvider } from '@/utils/auth';
+import { getGlobalStorage } from '@/utils/storage';
 import { Modal, Provider, Toast } from '@ant-design/react-native';
+import type { Theme } from '@react-navigation/native';
 import {
   DefaultTheme as ReactNavigationDefaultTheme,
   ThemeProvider,
@@ -12,13 +19,6 @@ import * as SplashScreen from 'expo-splash-screen';
 import * as updates from 'expo-updates';
 import { useEffect, useState } from 'react';
 import { Linking, Platform, View } from 'react-native';
-import { AnimatedSplashOverlay } from '@/components/animated-icon';
-import { antdTheme } from '@/constants/antd-theme';
-import { Colors } from '@/constants/theme';
-import api from '@/utils/api';
-import { AuthProvider } from '@/utils/auth';
-import { getGlobalStorage } from '@/utils/storage';
-import type { Theme } from '@react-navigation/native';
 
 
 SplashScreen.preventAutoHideAsync();

+ 204 - 1
src/app/credit/detail.tsx

@@ -1,3 +1,206 @@
+import { StatusBadge } from "@/components/ui/status-badge";
+import UIButton from "@/components/ui/ui-button";
+import { Colors } from "@/constants/theme";
+import api from "@/utils/api";
+import { useSWC } from "@/utils/cache";
+import { Icon, Toast } from "@ant-design/react-native";
+import { Ionicons } from "@expo/vector-icons";
+import dayjs from 'dayjs';
+import { Link, Stack, useLocalSearchParams, useRouter } from "expo-router";
+import { useCallback, useEffect } from "react";
+import { ScrollView, Text, View } from "react-native";
+import { useSafeAreaInsets } from "react-native-safe-area-context";
+
+type Credit = {
+  id: string;
+  customer_id?: string;
+  name?: string;
+  updatetime?: number;
+  tags?: string[];
+  recommend?: string[];
+  suggestions?: string[];
+  level?: string;
+  amount?: string;
+}
+
+const tagsBg = ["primary", "tertiary", "error", "success"];
+
+type Metric = {
+  label: string;
+  value: string;
+  hint?: string;
+  tone?: "default" | "warn" | "danger" | "ok";
+};
+
+type Suggestion = {
+  title: string;
+  desc: string;
+};
+
+
+const METRICS: Metric[] = [
+  { label: "近3个月查询次数", value: "8", hint: "次", tone: "warn" },
+  { label: "信用卡使用率", value: "72", hint: "%", tone: "warn" },
+  { label: "当前逾期", value: "无", tone: "ok" },
+  { label: "在用信贷账户", value: "6", hint: "户", tone: "default" },
+];
+
+const SUGGESTIONS: Suggestion[] = [
+  {
+    title: "控制近1个月新增查询",
+    desc: "短期内避免再次申请信用卡或网贷,降低硬查询次数。",
+  },
+  {
+    title: "优先匹配看重流水稳定的产品",
+    desc: "结合工资流水稳定的优势,选择对查询容忍度更高的产品。",
+  },
+  {
+    title: "降低信用卡使用率至 50% 以下",
+    desc: "适当还款或申请提额,使用率下降后可显著提升评分。",
+  },
+];
+
+const toneStyles: Record<NonNullable<Metric["tone"]>, { box: string; value: string }> = {
+  default: { box: "bg-surface-container-low border-outline-variant", value: "text-on-surface" },
+  ok: { box: "bg-green-50 border-green-100", value: "text-green-700" },
+  warn: { box: "bg-tertiary-fixed border-tertiary-fixed-dim", value: "text-on-tertiary-fixed" },
+  danger: { box: "bg-error-container border-error-container", value: "text-on-error-container" },
+};
+
+
+
 export default function CreditDetail() {
+  const insets = useSafeAreaInsets();
+  const router = useRouter();
+  const { id, customer_id, name } = useLocalSearchParams() as { id?: string; customer_id: string; name?: string };
+  const { data: detail, loading, error } = useSWC<Credit>("credit_" + (id ? id : "cid_" + customer_id), async () => {
+    return await api.post("credit/detail", {
+      id,
+      customer_id
+    })
+  });
+
+  const randTags = useCallback(() => {
+    const len = tagsBg.length;
+    return tagsBg[Math.floor(Math.random() * len)];
+  }, []);
+  const nav = useRouter();
+  useEffect(() => {
+    if (!loading && !detail) {
+      Toast.offline(error ? '加载征信信息失败' : "没有找到相关征信信息!");
+      // nav.dismiss();
+    }
+    if (detail?.id + "" == "-99") {
+
+    }
+  }, [error, detail, loading]);
+  return (
+    <View className="flex-1 bg-surface">
+      <Stack.Screen options={{ title: "征信报告", headerRight: customer_id || detail?.customer_id ? () => <Link className="items-center" href={{ pathname: '/customer', params: { id: customer_id || detail?.customer_id } }}><Icon color={Colors.tint} size={17} name="exclamation-circle" /></Link> : undefined }} />
+      <ScrollView
+        className="flex-1"
+        contentContainerStyle={{
+          paddingTop: insets.top + 60,
+          paddingBottom: insets.bottom + 32,
+          paddingHorizontal: 20,
+        }}
+        showsVerticalScrollIndicator={false}
+      >
+
+        <Text className="mb-5 text-sm leading-6 text-on-surface-variant">
+          客户:{detail?.name || name} · 最近更新 {detail?.updatetime ? dayjs(detail!.updatetime).toString() : '...'}
+        </Text>
+
+        {/* 评分卡片 */}
+        <View className="mb-3 rounded-3xl border border-outline-variant bg-surface-container-lowest px-5 py-6">
+          <View className="items-center">
+            <View className="h-28 w-28 items-center justify-center rounded-full border-[10px] border-primary-fixed bg-primary-fixed/30">
+              <Text className="text-4xl font-extrabold text-primary">{detail?.level??"??"}</Text>
+            </View>
+            <Text className="mt-4 text-sm text-on-surface-variant">建议可申请额度</Text>
+            <Text className="mt-1 text-2xl font-extrabold text-on-surface">...</Text>
+          </View>
+          <View className="mt-5 flex-row flex-wrap justify-center gap-2">
+            {(detail?.tags || ['...']).map((tag) => (
+              <StatusBadge key={tag} text={tag} variant={randTags() as any} />
+            ))}
+          </View>
+        </View>
+
+        {/* 综合评估 */}
+        <View className="mb-3 rounded-3xl border border-outline-variant bg-surface-container-lowest px-5 py-5">
+          <View className="mb-3 flex-row items-center">
+            <Ionicons name="analytics-outline" size={18} color={Colors.tint} />
+            <Text className="ml-2 text-base font-bold text-on-surface">关键指标</Text>
+          </View>
+          {(detail?.recommend || ['...']).map((item, idx) => <Text key={idx} className="text-sm leading-6 text-on-surface-variant">
+            {item}
+          </Text>)}
+        </View>
+
+        <View className="mb-3 rounded-3xl border border-outline-variant bg-surface-container-lowest px-5 py-5">
+          <View className="mb-3 flex-row items-center">
+            <Ionicons name="analytics-outline" size={18} color={Colors.tint} />
+            <Text className="ml-2 text-base font-bold text-on-surface">关键指标</Text>
+          </View>
+          {(detail?.recommend || ['...']).map((item, idx) => <Text key={idx} className="text-sm leading-6 text-on-surface-variant">
+            {item}
+          </Text>)}
+        </View>
+
+        {/* 关键指标 */}
+        {/* <View className="mb-3 rounded-3xl border border-outline-variant bg-surface-container-lowest px-5 py-5">
+          <View className="mb-4 flex-row items-center">
+            <Ionicons name="stats-chart-outline" size={18} color={Colors.tint} />
+            <Text className="ml-2 text-base font-bold text-on-surface">关键指标</Text>
+          </View>
+          <View className="flex-row flex-wrap -mx-1">
+            {METRICS.map((m) => {
+              const tone = toneStyles[m.tone ?? "default"];
+              return (
+                <View key={m.label} className="w-1/2 px-1 mb-2">
+                  <View className={`rounded-2xl border px-3 py-3 ${tone.box}`}>
+                    <Text className="text-xs text-on-surface-variant" numberOfLines={1}>
+                      {m.label}
+                    </Text>
+                    <View className="mt-1 flex-row items-baseline">
+                      <Text className={`text-2xl font-extrabold ${tone.value}`}>{m.value}</Text>
+                      {m.hint ? (
+                        <Text className={`ml-1 text-sm font-semibold ${tone.value}`}>{m.hint}</Text>
+                      ) : null}
+                    </View>
+                  </View>
+                </View>
+              );
+            })}
+          </View>
+
+          <View className="mt-2">
+            <View className="mb-1 flex-row items-center justify-between">
+              <Text className="text-sm text-on-surface-variant">负债率</Text>
+              <Text className="text-sm font-bold text-on-tertiary-fixed">68%</Text>
+            </View>
+            <View className="h-2 overflow-hidden rounded-full bg-surface-container">
+              <View className="h-full rounded-full bg-tertiary" style={{ width: "68%" }} />
+            </View>
+          </View>
+        </View> */}
+
+        {/* 建议动作 */}
+
 
-}
+        <UIButton
+          type="primary"
+          icon="thunderbolt"
+          onPress={() => router.push("/credit/select")}
+        >
+          智能匹配银行产品
+        </UIButton>
+        <View className="h-3" />
+        <UIButton type="second" icon="reload" onPress={() => router.back()}>
+          重新上传征信
+        </UIButton>
+      </ScrollView>
+    </View>
+  );
+}

+ 8 - 9
src/app/customer/select.tsx

@@ -1,3 +1,8 @@
+import { StatusBadge } from '@/components/ui/status-badge';
+import { Colors } from '@/constants/theme';
+import type { ListResponse } from '@/utils/api';
+import api from '@/utils/api';
+import { getApiCache } from '@/utils/storage';
 import { ActivityIndicator, Toast } from '@ant-design/react-native';
 import { Ionicons } from '@expo/vector-icons';
 import { useRoute } from '@react-navigation/native';
@@ -6,22 +11,16 @@ import { Stack, useNavigation } from 'expo-router';
 import { useCallback, useEffect, useRef, useState } from 'react';
 import { FlatList, Pressable, Text, TextInput, View } from 'react-native';
 import { useSafeAreaInsets } from 'react-native-safe-area-context';
-import { StatusBadge } from '@/components/ui/status-badge';
-import { Colors } from '@/constants/theme';
-import api from '@/utils/api';
-import { getApiCache } from '@/utils/storage';
-import type {Customer, CustomerLoanStatus} from '../(tabs)/customer';
-import type { ListResponse } from '@/utils/api';
+import type { Customer, CustomerLoanStatus } from '../(tabs)/customer';
 
 const PAGE_SIZE = 15;
 const CACHE_KEY = 'customer_first';
 export const CustomerLoanStatusText: Record<NonNullable<CustomerLoanStatus>, string> = {
   idle: '待匹配',
-  pending: '匹配中',
-  matched: '已匹配',
   completed: '已完成',
   unmatch: '匹配失败',
-  all: '所有'
+  all: '所有',
+  unknow: '未知'
 };
 
 

+ 4 - 3
src/utils/api.ts

@@ -1,10 +1,10 @@
+import type { AxiosRequestConfig } from 'axios';
 import axios from 'axios';
-import { fetch } from 'expo/fetch';
 import Constants from 'expo-constants';
+import type { FetchRequestInit } from 'expo/fetch';
+import { fetch } from 'expo/fetch';
 import { Platform } from 'react-native';
 import type { AccessToken } from './auth';
-import type { AxiosRequestConfig } from 'axios';
-import type { FetchRequestInit } from 'expo/fetch';
 
 const { api: apiConfig, jsVersion } = require('@/config.json') as AppConfig;
 let accessToken: AccessToken | undefined | null = null;
@@ -110,6 +110,7 @@ if (__DEV__) {
     apiClient.interceptors.response.use(
         (response) => {
             console.log('📡', response.status, response.config.url);
+            console.log(response.data);
             return response;
         },
         (error) => {