Răsfoiți Sursa

feat(淘宝账号池): 增加万能解析池配置开关

dodo hold 1 zi în urmă
părinte
comite
7246002d5f
2 a modificat fișierele cu 63 adăugiri și 4 ștergeri
  1. 2 0
      src/api/taobao.ts
  2. 61 4
      src/views/taobao/list.vue

+ 2 - 0
src/api/taobao.ts

@@ -144,6 +144,8 @@ export interface TkPoolRecord {
     enable_coupon: boolean;
     enable_sync_order: boolean;
     enable_deep_url: boolean;
+    enable_general_link_parse_pool: boolean;
+    use_general_link_parse_pool: boolean;
     enable_promotionQuery: boolean;
     enable_order_summary_cache: boolean;
     appkey: string;

+ 61 - 4
src/views/taobao/list.vue

@@ -475,6 +475,50 @@
                         </a-tag>
                     </span>
                 </template>
+                <template #general_link_parse_pool="{ record }">
+                    <a-space direction="vertical" size="small">
+                        <a-tooltip
+                            content="使用该账号的 AppKey、AppSecret 和 PID 为其他账号解析短链,账号需保持在线"
+                        >
+                            <a-space>
+                                <a-switch
+                                    :model-value="
+                                        record.enable_general_link_parse_pool
+                                    "
+                                    size="small"
+                                    @change="
+                                        changeAttr(
+                                            record.id,
+                                            'enable_general_link_parse_pool',
+                                            $event
+                                        )
+                                    "
+                                />
+                                <span>加入万能解析池</span>
+                            </a-space>
+                        </a-tooltip>
+                        <a-tooltip
+                            content="优先使用池内账号;无可用账号时按下探网址设置处理"
+                        >
+                            <a-space>
+                                <a-switch
+                                    :model-value="
+                                        record.use_general_link_parse_pool
+                                    "
+                                    size="small"
+                                    @change="
+                                        changeAttr(
+                                            record.id,
+                                            'use_general_link_parse_pool',
+                                            $event
+                                        )
+                                    "
+                                />
+                                <span>使用万能解析池</span>
+                            </a-space>
+                        </a-tooltip>
+                    </a-space>
+                </template>
                 <template #time="{ record }">
                     <div style="color: gray">
                         <div
@@ -487,9 +531,15 @@
                                 dayjs(record.last_time).format('MM-DD HH:mm')
                             }}</div
                         >
-                        <template v-if="formatDateTime(record.login_time) !== '-'">
-                            <div v-if="getLoginAgeHours(record.login_time) < 48">
-                                登录:{{ formatDateTime(record.login_time) }}</div
+                        <template
+                            v-if="formatDateTime(record.login_time) !== '-'"
+                        >
+                            <div
+                                v-if="getLoginAgeHours(record.login_time) < 48"
+                            >
+                                登录:{{
+                                    formatDateTime(record.login_time)
+                                }}</div
                             >
                             <a-tooltip v-else>
                                 <template #content>
@@ -594,7 +644,8 @@
                                 <a-descriptions-item label="首次触发">
                                     {{
                                         formatDateTime(
-                                            record.aiopen_risk.first_trigger_time
+                                            record.aiopen_risk
+                                                .first_trigger_time
                                         )
                                     }}
                                 </a-descriptions-item>
@@ -829,6 +880,12 @@
             width: 480,
             align: 'center',
         },
+        {
+            title: '万能解析',
+            slotName: 'general_link_parse_pool',
+            width: 210,
+            align: 'center',
+        },
         {
             title: '时间',
             slotName: 'time',