dodo hold 2 лет назад
Родитель
Сommit
96ec753e6d

+ 49 - 25
src/api/taobao.ts

@@ -3,30 +3,26 @@ import qs from 'query-string';
 import type { DescData } from '@arco-design/web-vue/es/descriptions/interface';
 import type { DescData } from '@arco-design/web-vue/es/descriptions/interface';
 import type { ListRes } from './base';
 import type { ListRes } from './base';
 
 
-export interface UpdateCookieModel {
+export interface UpdateConfigModel {
     cookie: string;
     cookie: string;
+    ignorePercentage: number;
+    jdIgnorePercentage: number;
+    pass_salt: string;
+    ignorePercentageCity: string;
+    fake_click_min: number;
+    fake_click_max: number;
+    fake_click_ttl: number;
+    rt_max: number;
+    tk_whitelist_regular: string;
+    tk_blacklist_regular: string;
+    multi_token_regular: string;
 }
 }
 
 
-export interface FormRes {
-    msg: string;
+export interface UpdateConfigRes {
+    msg?: string;
     code: number;
     code: number;
-    success: boolean;
-}
-
-export function updateCookies(data: UpdateCookieModel) {
-    return axios.post<FormRes>('/api/taobao/updateCookies', data);
-}
-
-export interface TkUpdateAccountModel {
-    id: number;
-    name: string;
-    val: any;
-}
-
-export function TkUpdateAccount(data: UpdateTkAccountModel) {
-    return axios.post<FormRes>('/api/taobao/update', data);
+    data?: UpdateConfigModel;
 }
 }
-
 // list
 // list
 export interface TkPoolRecord {
 export interface TkPoolRecord {
     id: number;
     id: number;
@@ -44,19 +40,48 @@ export interface TkPoolRecord {
     refpid: string;
     refpid: string;
     status: boolean;
     status: boolean;
     tb_token: string;
     tb_token: string;
-    daily_income_limit: number;
     api: string;
     api: string;
-    api_id: number;
     end_point: string;
     end_point: string;
     api_id: number;
     api_id: number;
     enable_fake_click: boolean;
     enable_fake_click: boolean;
     enable_parse: boolean;
     enable_parse: boolean;
     enable_coupon: boolean;
     enable_coupon: boolean;
+    enable_sync_order: boolean;
+    enable_promotionQuery: boolean;
+    appkey: string;
+    appSecret: string;
+    open_pid: string;
+}
+
+export interface FormRes {
+    msg: string;
+    code: number;
+    success: boolean;
 }
 }
 
 
+export function updateConfig(data: UpdateConfigModel) {
+    return axios.post<FormRes>('/api/config/update', data);
+}
+export function getConfig() {
+    return axios.get<UpdateConfigModel>('/api/config/get');
+}
 
 
+export interface UpdateCookieModel {
+    cookie: string;
+}
+export function updateCookies(data: UpdateCookieModel) {
+    return axios.post<FormRes>('/api/taobao/updateCookies', data);
+}
 
 
+export interface TkUpdateAccountModel {
+    id: number;
+    name: string;
+    val: any;
+}
 
 
+export function TkUpdateAccount(data: TkUpdateAccountModel) {
+    return axios.post<UpdateConfigRes>('/api/taobao/update', data);
+}
 
 
 export interface TkPoolParams extends Partial<TkPoolRecord> {
 export interface TkPoolParams extends Partial<TkPoolRecord> {
     current: number;
     current: number;
@@ -132,12 +157,11 @@ export interface TkReportRecord {
     sett_ord_amt_56: number;
     sett_ord_amt_56: number;
     sett_tk_disp_tfee_56: number;
     sett_tk_disp_tfee_56: number;
 
 
-    
     order_ord_amt_12: number;
     order_ord_amt_12: number;
     order_ord_amt_14: number;
     order_ord_amt_14: number;
     order_ord_tfee_12: number;
     order_ord_tfee_12: number;
     order_ord_tfee_14: number;
     order_ord_tfee_14: number;
-    
+
     order_ord_amt_12_14: number;
     order_ord_amt_12_14: number;
     order_ord_tfee_12_14: number;
     order_ord_tfee_12_14: number;
 
 
@@ -303,9 +327,9 @@ export interface TkOrderRecord {
     last_time: string; // assuming ISO 8601 format for datetime
     last_time: string; // assuming ISO 8601 format for datetime
 }
 }
 
 
-export interface TkOrdersParams   {
+export interface TkOrdersParams {
     keyword?: string;
     keyword?: string;
-    tkStatus?: number[]; 
+    tkStatus?: number[];
     query_date?: string[]; // 覆盖 report_date 的类型为字符串数组
     query_date?: string[]; // 覆盖 report_date 的类型为字符串数组
     current: number;
     current: number;
     pageSize: number;
     pageSize: number;

+ 31 - 31
src/mock/user.ts

@@ -7,35 +7,35 @@ import setupMock, {
 import { MockParams } from '@/types/mock';
 import { MockParams } from '@/types/mock';
 import { isLogin } from '@/utils/auth';
 import { isLogin } from '@/utils/auth';
 
 
-setupMock({
-  setup() {
-    // Mock.XHR.prototype.withCredentials = true;
+// setupMock({
+//   setup() {
+//     // Mock.XHR.prototype.withCredentials = true;
 
 
-    // 用户信息
-    Mock.mock(new RegExp('/api/user/info'), () => {
-      if (isLogin()) {
-        const role = window.localStorage.getItem('userRole') || 'admin';
-        return successResponseWrap({
-          name: '王立群',
-          avatar:
-            '//lf1-xgcdn-tos.pstatp.com/obj/vcloud/vadmin/start.8e0e4855ee346a46ccff8ff3e24db27b.png',
-          email: 'wangliqun@email.com',
-          job: 'frontend',
-          jobName: '前端艺术家',
-          organization: 'Frontend',
-          organizationName: '前端',
-          location: 'beijing',
-          locationName: '北京',
-          introduction: '人潇洒,性温存',
-          personalWebsite: 'https://www.arco.design',
-          phone: '150****0000',
-          registrationDate: '2013-05-10 12:10:00',
-          accountId: '15012312300',
-          certification: 1,
-          role,
-        });
-      }
-      return failResponseWrap(null, '未登录', 50008);
-    });
-  },
-});
+//     // 用户信息
+//     Mock.mock(new RegExp('/api/user/info'), () => {
+//       if (isLogin()) {
+//         const role = window.localStorage.getItem('userRole') || 'admin';
+//         return successResponseWrap({
+//           name: '王立群',
+//           avatar:
+//             '//lf1-xgcdn-tos.pstatp.com/obj/vcloud/vadmin/start.8e0e4855ee346a46ccff8ff3e24db27b.png',
+//           email: 'wangliqun@email.com',
+//           job: 'frontend',
+//           jobName: '前端艺术家',
+//           organization: 'Frontend',
+//           organizationName: '前端',
+//           location: 'beijing',
+//           locationName: '北京',
+//           introduction: '人潇洒,性温存',
+//           personalWebsite: 'https://www.arco.design',
+//           phone: '150****0000',
+//           registrationDate: '2013-05-10 12:10:00',
+//           accountId: '15012312300',
+//           certification: 1,
+//           role,
+//         });
+//       }
+//       return failResponseWrap(null, '未登录', 50008);
+//     });
+//   },
+// });

+ 2 - 2
src/router/routes/modules/settings.ts

@@ -15,7 +15,7 @@ const SETTINGS: AppRouteRecordRaw = {
     {
     {
       path: 'config',
       path: 'config',
       name: 'config',
       name: 'config',
-      component: () => import('@/views/settings/config/index.vue'),
+      component: () => import('@/views/settings/config.vue'),
       meta: {
       meta: {
         locale: 'menu.settings.config',
         locale: 'menu.settings.config',
         requiresAuth: true,
         requiresAuth: true,
@@ -25,4 +25,4 @@ const SETTINGS: AppRouteRecordRaw = {
   ],
   ],
 };
 };
 
 
-// export default SETTINGS;
+export default SETTINGS;

+ 136 - 0
src/views/settings/components/regular-tester.vue

@@ -0,0 +1,136 @@
+<template>
+    <a-modal width="90%" height="90%" v-model:visible="visible" title="正则测试" :footer="false" @cancel="handleCancel">
+        <a-row class="wrapper">
+            <a-col :span="24">
+                <a-form ref="formRef" class="form" :label-col-props="{ span: 2 }" :wrapper-col-props="{ span: 21 }">
+                    <a-form-item label="测试文本" placeholder="在此输入待匹配文本" row-class="keep-margin">
+                        <a-textarea class="textarea" v-model="content" auto-size />
+                        <template #extra>
+                        </template>
+                    </a-form-item>
+                    <a-form-item label="淘口令正则" placeholder="需要匹配的正则表达式,一行一个" row-class="keep-margin">
+                        <a-textarea class="textarea" v-model="pattern" auto-size />
+                        <template #extra>
+                            <a-alert type="success" v-if="testResult === true">正则匹配</a-alert>
+                            <a-alert type="error" v-else-if="testResult === false">正则不匹配</a-alert>
+                            <a-alert type="error" v-else-if="testResult instanceof Error">发生错误:{{ testResult.message
+                                }}</a-alert>
+
+
+                        </template>
+                    </a-form-item>
+                    <a-form-item label="淘口令排除正则" placeholder="需要匹配的正则表达式,一行一个" row-class="keep-margin">
+                        <a-textarea class="textarea" v-model="pattern2" auto-size />
+                        <template #extra>
+                            <a-alert type="success" v-if="testResult2 === true">正则匹配</a-alert>
+                            <a-alert type="error" v-else-if="testResult2 === false">正则不匹配</a-alert>
+                            <a-alert type="error" v-else-if="testResult2 instanceof Error">
+                                发生错误:{{ testResult2.message }}</a-alert>
+                        </template>
+                    </a-form-item>
+
+                    <a-form-item label="混合口令正则" placeholder="需要匹配的正则表达式,一行一个" row-class="keep-margin">
+                        <a-textarea class="textarea" v-model="pattern3" auto-size />
+                        <template #extra>
+                            <a-alert type="success" v-if="testResult3 === true">正则匹配</a-alert>
+                            <a-alert type="error" v-else-if="testResult3 === false">正则不匹配</a-alert>
+                            <a-alert type="error" v-else-if="testResult3 instanceof Error">
+                                发生错误:{{ testResult3.message }}</a-alert>
+                        </template>
+                    </a-form-item>
+
+                    <a-form-item>
+                        <a-space>
+                            <a-button type="primary" @click="handleTester">测试</a-button>
+                            <a-button type="secondary" @click="handleCancel">取消</a-button>
+                        </a-space>
+                    </a-form-item>
+                </a-form>
+            </a-col>
+        </a-row>
+    </a-modal>
+</template>
+
+<script lang="ts" setup>
+
+import { defineEmits, ref } from 'vue';
+import { Message } from '@arco-design/web-vue';
+import {
+    TkPoolParams,
+    queryTkPool,
+    TkPoolRecord,
+} from '@/api/taobao';
+
+
+const content = ref<string>('');
+const pattern = defineModel<string>('pattern', { default: '', required: true })
+const pattern2 = defineModel<string>('pattern2', { default: '', required: true })
+const pattern3 = defineModel<string>('pattern3', { default: '', required: true })
+const visible = defineModel<boolean>('visible', { default: false, required: true })
+
+const testResult = ref<boolean | undefined | Error>(undefined)
+const testResult2 = ref<boolean | undefined | Error>(undefined)
+const testResult3 = ref<boolean | undefined | Error>(undefined)
+
+const testPatterns = (text: string, patterns: string): boolean | Error => {
+    try {
+        const patternArray = patterns.split('\n').filter(p => p.trim() !== '');
+        const regexes = patternArray.map(p => new RegExp(p, 'g'));
+
+        return regexes.some(regex => regex.test(text));
+
+    } catch (error: any) {
+        const msg = (error as Error).message
+        console.error("正则表达式无效:", msg)
+        return error as Error
+    }
+};
+
+
+const handleTester = () => {
+    console.log('test');
+    const msg = 'test'
+    testResult.value = testPatterns(content.value, pattern.value)
+    testResult2.value = testPatterns(content.value, pattern2.value)
+    testResult3.value = testPatterns(content.value, pattern3.value)
+};
+const handleCancel = () => {
+    testResult.value = undefined
+    testResult2.value = undefined
+    testResult3.value = undefined
+    visible.value = false;
+}
+
+testResult.value = undefined
+testResult2.value = undefined
+testResult3.value = undefined
+
+</script>
+
+<style scoped lang="less">
+.container {
+    padding: 0 20px 20px 20px;
+}
+
+.wrapper {
+    padding: 20px 0 0 20px;
+    min-height: 580px;
+    background-color: var(--color-bg-2);
+    border-radius: 4px;
+}
+
+:deep(.section-title) {
+    margin-top: 0;
+    margin-bottom: 16px;
+    font-size: 14px;
+}
+
+.form {
+    margin: 0 auto;
+}
+
+.form .textarea {
+    height: 100%;
+    min-height: 200px;
+}
+</style>

+ 212 - 0
src/views/settings/config.vue

@@ -0,0 +1,212 @@
+<template>
+    <div class="container">
+        <Breadcrumb :items="['menu.settings', 'menu.settings.config']" />
+        <a-card class="general-card" :title="$t('menu.settings.config')">
+            <a-row class="wrapper">
+
+                <a-col :span="24">
+                    <a-spin :loading="loading" style="width:100%">
+                        <a-form ref="formRef" :model="formData" class="form" :label-col-props="{ span: 4 }"
+                            :wrapper-col-props="{ span: 19 }">
+
+                            <a-form-item field="ignorePercentage" label="放弃流量" :rules="[{ required: true }]">
+                                <a-input-number v-model="formData.ignorePercentage" :min="0" :max="100"
+                                    placeholder="主动放弃流量,0-100,举例:10 = 放弃10%" />
+                            </a-form-item>
+
+                            <a-form-item field="jdIgnorePercentage" label="JD放弃流量" :rules="[{ required: true }]">
+                                <a-input-number v-model="formData.jdIgnorePercentage" :min="0" :max="100"
+                                    placeholder="主动放弃流量,0-100,举例:10 = 放弃10%" />
+                            </a-form-item>
+
+                            <a-form-item field="pass_salt" label="pass_salt" :rules="[{ required: true }]">
+                                <a-input v-model="formData.pass_salt" />
+                            </a-form-item>
+
+
+                            <a-form-item field="ignorePercentageCity" label="流量控制-城市" :rules="[{ required: true }]">
+                                <a-input v-model="formData.ignorePercentageCity" />
+                            </a-form-item>
+
+                            <a-form-item field="fake_click_min" label="补点击次数" :rules="[{ required: true }]">
+                                <a-input-number v-model="formData.fake_click_min" :min="0" /> -
+                                <a-input-number v-model="formData.fake_click_max" :min="0" />
+                            </a-form-item>
+
+
+                            <a-form-item field="fake_click_min" label="补点击时长" :rules="[{ required: true }]">
+                                <a-input-number v-model="formData.fake_click_ttl" :min="24"
+                                    placeholder="转链后多少时间内需要补点击,默认24小时" />
+                            </a-form-item>
+
+
+
+                            <a-form-item field="rt_max" label="转链超时" :rules="[{ required: true }]">
+                                <a-input-number v-model="formData.rt_max" :min="500" placeholder="转链API最长超时时间,单位毫秒" />
+                            </a-form-item>
+
+
+                            <a-form-item field="tk_whitelist_regular" label="淘口令正则">
+                                <a-textarea v-model="formData.tk_whitelist_regular" auto-size placeholder="淘口令正则" />
+                                <template #extra>
+                                    <a-button type="outline" @click="clickRegularTester">正则测试
+                                    </a-button>
+                                </template>
+                            </a-form-item>
+
+                            <a-form-item field="tk_blacklist_regular" label="淘口令排除正则">
+                                <a-textarea v-model="formData.tk_blacklist_regular" auto-size placeholder="淘口令排除正则" />
+                                <template #extra>
+                                    <a-button type="outline" @click="clickRegularTester">正则测试
+                                    </a-button>
+                                </template>
+                            </a-form-item>
+
+                            <a-form-item field="multi_token_regular" label="混合口令正则">
+                                <a-textarea v-model="formData.multi_token_regular" auto-size placeholder="混合口令正则" />
+                                <template #extra>
+                                    <a-button type="outline" @click="clickRegularTester">正则测试
+                                    </a-button>
+                                </template>
+                            </a-form-item>
+                            <a-form-item>
+                                <a-space>
+                                    <a-button type="primary" @click="validate">
+                                        {{ $t('form.save') }}
+                                    </a-button>
+                                    <a-button type="secondary" @click="reset">
+                                        {{ $t('form.reset') }}
+                                    </a-button>
+                                </a-space>
+                            </a-form-item>
+                        </a-form>
+                    </a-spin>
+                </a-col>
+            </a-row>
+        </a-card>
+        <RegularTester v-model:visible="showRegularTester" v-model:pattern="formData.tk_whitelist_regular"
+            v-model:pattern2="formData.tk_blacklist_regular" v-model:pattern3="formData.multi_token_regular" />
+    </div>
+</template>
+
+<script lang="ts" setup>
+import { ref, computed } from 'vue';
+import { useRouter } from 'vue-router';
+
+import useLoading from '@/hooks/loading';
+import { Message } from '@arco-design/web-vue';
+import { FormInstance } from '@arco-design/web-vue/es/form';
+import {
+    UpdateConfigModel, updateConfig,
+    getConfig, UpdateConfigRes
+} from '@/api/taobao';
+import { useUserStore } from '@/store';
+import RegularTester from './components/regular-tester.vue';
+
+const userStore = useUserStore();
+const userInfo = computed(() => {
+    return {
+        name: userStore.name,
+    };
+});
+console.log(userInfo.value)
+
+const { loading, setLoading } = useLoading(true);
+
+const router = useRouter();
+
+const formRef = ref<FormInstance>();
+const formData = ref<UpdateConfigModel>({
+    cookie: '',
+    ignorePercentage: 0,
+    jdIgnorePercentage: 0,
+    pass_salt: '',
+    ignorePercentageCity: '',
+    fake_click_min: 0,
+    fake_click_max: 0,
+    fake_click_ttl: 0,
+    rt_max: 0,
+    tk_whitelist_regular: '',
+    tk_blacklist_regular: '',
+    multi_token_regular: '',
+});
+
+const showRegularTester = ref<boolean>(false);
+
+
+
+const clickRegularTester = (pattern: string) => {
+    showRegularTester.value = true
+};
+
+const validate = async () => {
+    const res = await formRef.value?.validate();
+    if (!res) {
+        try {
+            const data = await updateConfig(formData.value);
+            console.log(data);
+            const msg = data.msg || '更新成功!';
+            if (data.success) {
+                Message.success(msg);
+            } else {
+                Message.error(msg);
+            }
+
+
+        } catch (err) {
+            console.error(err);
+        }
+    }
+};
+const restoreJson = (e: string): string => {
+    e = e.replace(/\\\\/g, "\\").replace(/\\"/g, '"');
+    return e;
+};
+
+
+const reset = async () => {
+    setLoading(true);
+    // await formRef.value?.resetFields();
+    const { data } = await getConfig()
+    const config = data
+    console.log(config)
+    if (config) {
+        config.tk_whitelist_regular = restoreJson(config.tk_whitelist_regular)
+        config.tk_blacklist_regular = restoreJson(config.tk_blacklist_regular)
+        config.multi_token_regular = restoreJson(config.multi_token_regular)
+        formData.value = config
+    }
+    setLoading(false);
+};
+reset();
+
+
+</script>
+
+<style scoped lang="less">
+.container {
+    padding: 0 20px 20px 20px;
+}
+
+.wrapper {
+    padding: 20px 0 0 20px;
+    min-height: 580px;
+    background-color: var(--color-bg-2);
+    border-radius: 4px;
+}
+
+:deep(.section-title) {
+    margin-top: 0;
+    margin-bottom: 16px;
+    font-size: 14px;
+}
+
+.form {
+    margin: 0 auto;
+}
+
+.form .cookie {
+    height: 100%;
+    min-height: 500px;
+}
+</style>

+ 0 - 71
src/views/settings/config/components/announcement.vue

@@ -1,71 +0,0 @@
-<template>
-  <a-card
-    class="general-card"
-    :title="$t('workplace.announcement')"
-    :header-style="{ paddingBottom: '0' }"
-    :body-style="{ padding: '15px 20px 13px 20px' }"
-  >
-    <template #extra>
-      <a-link>{{ $t('workplace.viewMore') }}</a-link>
-    </template>
-    <div>
-      <div v-for="(item, idx) in list" :key="idx" class="item">
-        <a-tag :color="item.type" size="small">{{ item.label }}</a-tag>
-        <span class="item-content">
-          {{ item.content }}
-        </span>
-      </div>
-    </div>
-  </a-card>
-</template>
-
-<script lang="ts" setup>
-  const list = [
-    {
-      type: 'orangered',
-      label: '活动',
-      content: '内容最新优惠活动',
-    },
-    {
-      type: 'cyan',
-      label: '消息',
-      content: '新增内容尚未通过审核,详情请点击查看。',
-    },
-    {
-      type: 'blue',
-      label: '通知',
-      content: '当前产品试用期即将结束,如需续费请点击查看。',
-    },
-    {
-      type: 'blue',
-      label: '通知',
-      content: '1月新系统升级计划通知',
-    },
-    {
-      type: 'cyan',
-      label: '消息',
-      content: '新增内容已经通过审核,详情请点击查看。',
-    },
-  ];
-</script>
-
-<style scoped lang="less">
-  .item {
-    display: flex;
-    align-items: center;
-    width: 100%;
-    height: 24px;
-    margin-bottom: 4px;
-    .item-content {
-      flex: 1;
-      overflow: hidden;
-      text-overflow: ellipsis;
-      white-space: nowrap;
-      margin-left: 4px;
-      color: var(--color-text-2);
-      text-decoration: none;
-      font-size: 13px;
-      cursor: pointer;
-    }
-  }
-</style>

+ 0 - 35
src/views/settings/config/components/banner.vue

@@ -1,35 +0,0 @@
-<template>
-  <a-col class="banner">
-    <a-col :span="8">
-      <a-typography-title :heading="5" style="margin-top: 0">
-        {{ $t('workplace.welcome') }} {{ userInfo.name }}
-      </a-typography-title>
-    </a-col>
-    <a-divider class="panel-border" />
-  </a-col>
-</template>
-
-<script lang="ts" setup>
-  import { computed } from 'vue';
-  import { useUserStore } from '@/store';
-
-  const userStore = useUserStore();
-  const userInfo = computed(() => {
-    return {
-      name: userStore.name,
-    };
-  });
-</script>
-
-<style scoped lang="less">
-  .banner {
-    width: 100%;
-    padding: 20px 20px 0 20px;
-    background-color: var(--color-bg-2);
-    border-radius: 4px 4px 0 0;
-  }
-
-  :deep(.arco-icon-home) {
-    margin-right: 6px;
-  }
-</style>

+ 0 - 24
src/views/settings/config/components/carousel.vue

@@ -1,24 +0,0 @@
-<template>
-  <a-carousel
-    indicator-type="slider"
-    show-arrow="hover"
-    auto-play
-    style="width: 100%; height: 170px; border-radius: 4px; overflow: hidden"
-  >
-    <a-carousel-item v-for="(src, idx) in imageSrc" :key="idx">
-      <div>
-        <img :src="src" style="width: 100%" />
-      </div>
-    </a-carousel-item>
-  </a-carousel>
-</template>
-
-<script lang="ts" setup>
-  const imageSrc = [
-    '//p3-armor.byteimg.com/tos-cn-i-49unhts6dw/5cc3cd1d994b7ef9db6a1f619a22addd.jpg~tplv-49unhts6dw-image.image',
-    '//p3-armor.byteimg.com/tos-cn-i-49unhts6dw/f256cbcc287139e191fecea9d255a1f0.jpg~tplv-49unhts6dw-image.image',
-    '//p3-armor.byteimg.com/tos-cn-i-49unhts6dw/b557ff0cd44146a2e471b477af2f30d0.jpg~tplv-49unhts6dw-image.image',
-    '//p3-armor.byteimg.com/tos-cn-i-49unhts6dw/665106f4bbd2a2df96eaf7aec52f7bc3.jpg~tplv-49unhts6dw-image.image',
-    '//p3-armor.byteimg.com/tos-cn-i-49unhts6dw/ea095a2c9c72b5d8f2f2818040db736d.jpg~tplv-49unhts6dw-image.image',
-  ];
-</script>

+ 0 - 114
src/views/settings/config/components/categories-percent.vue

@@ -1,114 +0,0 @@
-<template>
-  <a-spin :loading="loading" style="width: 100%">
-    <a-card
-      class="general-card"
-      :header-style="{ paddingBottom: '0' }"
-      :body-style="{
-        padding: '20px',
-      }"
-    >
-      <template #title>
-        {{ $t('workplace.categoriesPercent') }}
-      </template>
-      <Chart height="310px" :option="chartOption" />
-    </a-card>
-  </a-spin>
-</template>
-
-<script lang="ts" setup>
-  import useLoading from '@/hooks/loading';
-  import useChartOption from '@/hooks/chart-option';
-
-  const { loading } = useLoading();
-  const { chartOption } = useChartOption((isDark) => {
-    // echarts support https://echarts.apache.org/zh/theme-builder.html
-    // It's not used here
-    return {
-      legend: {
-        left: 'center',
-        data: ['纯文本', '图文类', '视频类'],
-        bottom: 0,
-        icon: 'circle',
-        itemWidth: 8,
-        textStyle: {
-          color: isDark ? 'rgba(255, 255, 255, 0.7)' : '#4E5969',
-        },
-        itemStyle: {
-          borderWidth: 0,
-        },
-      },
-      tooltip: {
-        show: true,
-        trigger: 'item',
-      },
-      graphic: {
-        elements: [
-          {
-            type: 'text',
-            left: 'center',
-            top: '40%',
-            style: {
-              text: '内容量',
-              textAlign: 'center',
-              fill: isDark ? '#ffffffb3' : '#4E5969',
-              fontSize: 14,
-            },
-          },
-          {
-            type: 'text',
-            left: 'center',
-            top: '50%',
-            style: {
-              text: '928,531',
-              textAlign: 'center',
-              fill: isDark ? '#ffffffb3' : '#1D2129',
-              fontSize: 16,
-              fontWeight: 500,
-            },
-          },
-        ],
-      },
-      series: [
-        {
-          type: 'pie',
-          radius: ['50%', '70%'],
-          center: ['50%', '50%'],
-          label: {
-            formatter: '{d}%',
-            fontSize: 14,
-            color: isDark ? 'rgba(255, 255, 255, 0.7)' : '#4E5969',
-          },
-          itemStyle: {
-            borderColor: isDark ? '#232324' : '#fff',
-            borderWidth: 1,
-          },
-          data: [
-            {
-              value: [148564],
-              name: '纯文本',
-              itemStyle: {
-                color: isDark ? '#3D72F6' : '#249EFF',
-              },
-            },
-            {
-              value: [334271],
-              name: '图文类',
-              itemStyle: {
-                color: isDark ? '#A079DC' : '#313CA9',
-              },
-            },
-            {
-              value: [445694],
-              name: '视频类',
-              itemStyle: {
-                color: isDark ? '#6CAAF5' : '#21CCFF',
-              },
-            },
-          ],
-        },
-      ],
-    };
-  });
-</script>
-
-<style scoped lang="less"></style>

+ 0 - 200
src/views/settings/config/components/content-chart.vue

@@ -1,200 +0,0 @@
-<template>
-  <a-spin :loading="loading" style="width: 100%">
-    <a-card
-      class="general-card"
-      :header-style="{ paddingBottom: 0 }"
-      :body-style="{
-        paddingTop: '20px',
-      }"
-      :title="$t('workplace.contentData')"
-    >
-      <template #extra>
-        <a-link>{{ $t('workplace.viewMore') }}</a-link>
-      </template>
-      <Chart height="289px" :option="chartOption" />
-    </a-card>
-  </a-spin>
-</template>
-
-<script lang="ts" setup>
-  import { ref } from 'vue';
-  import { graphic } from 'echarts';
-  import useLoading from '@/hooks/loading';
-  import { queryContentData, ContentDataRecord } from '@/api/dashboard';
-  import useChartOption from '@/hooks/chart-option';
-  import { ToolTipFormatterParams } from '@/types/echarts';
-  import { AnyObject } from '@/types/global';
-
-  function graphicFactory(side: AnyObject) {
-    return {
-      type: 'text',
-      bottom: '8',
-      ...side,
-      style: {
-        text: '',
-        textAlign: 'center',
-        fill: '#4E5969',
-        fontSize: 12,
-      },
-    };
-  }
-  const { loading, setLoading } = useLoading(true);
-  const xAxis = ref<string[]>([]);
-  const chartsData = ref<number[]>([]);
-  const graphicElements = ref([
-    graphicFactory({ left: '2.6%' }),
-    graphicFactory({ right: 0 }),
-  ]);
-  const { chartOption } = useChartOption(() => {
-    return {
-      grid: {
-        left: '2.6%',
-        right: '0',
-        top: '10',
-        bottom: '30',
-      },
-      xAxis: {
-        type: 'category',
-        offset: 2,
-        data: xAxis.value,
-        boundaryGap: false,
-        axisLabel: {
-          color: '#4E5969',
-          formatter(value: number, idx: number) {
-            if (idx === 0) return '';
-            if (idx === xAxis.value.length - 1) return '';
-            return `${value}`;
-          },
-        },
-        axisLine: {
-          show: false,
-        },
-        axisTick: {
-          show: false,
-        },
-        splitLine: {
-          show: true,
-          interval: (idx: number) => {
-            if (idx === 0) return false;
-            if (idx === xAxis.value.length - 1) return false;
-            return true;
-          },
-          lineStyle: {
-            color: '#E5E8EF',
-          },
-        },
-        axisPointer: {
-          show: true,
-          lineStyle: {
-            color: '#23ADFF',
-            width: 2,
-          },
-        },
-      },
-      yAxis: {
-        type: 'value',
-        axisLine: {
-          show: false,
-        },
-        axisLabel: {
-          formatter(value: any, idx: number) {
-            if (idx === 0) return value;
-            return `${value}k`;
-          },
-        },
-        splitLine: {
-          show: true,
-          lineStyle: {
-            type: 'dashed',
-            color: '#E5E8EF',
-          },
-        },
-      },
-      tooltip: {
-        trigger: 'axis',
-        formatter(params) {
-          const [firstElement] = params as ToolTipFormatterParams[];
-          return `<div>
-            <p class="tooltip-title">${firstElement.axisValueLabel}</p>
-            <div class="content-panel"><span>总内容量</span><span class="tooltip-value">${(
-              Number(firstElement.value) * 10000
-            ).toLocaleString()}</span></div>
-          </div>`;
-        },
-        className: 'echarts-tooltip-diy',
-      },
-      graphic: {
-        elements: graphicElements.value,
-      },
-      series: [
-        {
-          data: chartsData.value,
-          type: 'line',
-          smooth: true,
-          // symbol: 'circle',
-          symbolSize: 12,
-          emphasis: {
-            focus: 'series',
-            itemStyle: {
-              borderWidth: 2,
-            },
-          },
-          lineStyle: {
-            width: 3,
-            color: new graphic.LinearGradient(0, 0, 1, 0, [
-              {
-                offset: 0,
-                color: 'rgba(30, 231, 255, 1)',
-              },
-              {
-                offset: 0.5,
-                color: 'rgba(36, 154, 255, 1)',
-              },
-              {
-                offset: 1,
-                color: 'rgba(111, 66, 251, 1)',
-              },
-            ]),
-          },
-          showSymbol: false,
-          areaStyle: {
-            opacity: 0.8,
-            color: new graphic.LinearGradient(0, 0, 0, 1, [
-              {
-                offset: 0,
-                color: 'rgba(17, 126, 255, 0.16)',
-              },
-              {
-                offset: 1,
-                color: 'rgba(17, 128, 255, 0)',
-              },
-            ]),
-          },
-        },
-      ],
-    };
-  });
-  const fetchData = async () => {
-    setLoading(true);
-    try {
-      const { data: chartData } = await queryContentData();
-      chartData.forEach((el: ContentDataRecord, idx: number) => {
-        xAxis.value.push(el.x);
-        chartsData.value.push(el.y);
-        if (idx === 0) {
-          graphicElements.value[0].style.text = el.x;
-        }
-        if (idx === chartData.length - 1) {
-          graphicElements.value[1].style.text = el.x;
-        }
-      });
-    } catch (err) {
-      // you can report use errorHandler or other
-    } finally {
-      setLoading(false);
-    }
-  };
-  fetchData();
-</script>
-
-<style scoped lang="less"></style>

+ 0 - 131
src/views/settings/config/components/data-panel.vue

@@ -1,131 +0,0 @@
-<template>
-  <a-grid :cols="24" :row-gap="16" class="panel">
-    <a-grid-item
-      class="panel-col"
-      :span="{ xs: 12, sm: 12, md: 12, lg: 12, xl: 12, xxl: 6 }"
-    >
-      <a-space>
-        <a-avatar :size="54" class="col-avatar">
-          <img
-            alt="avatar"
-            src="//p3-armor.byteimg.com/tos-cn-i-49unhts6dw/288b89194e657603ff40db39e8072640.svg~tplv-49unhts6dw-image.image"
-          />
-        </a-avatar>
-        <a-statistic
-          :title="$t('workplace.onlineContent')"
-          :value="373.5"
-          :precision="1"
-          :value-from="0"
-          animation
-          show-group-separator
-        >
-          <template #suffix>
-            W+ <span class="unit">{{ $t('workplace.pecs') }}</span>
-          </template>
-        </a-statistic>
-      </a-space>
-    </a-grid-item>
-    <a-grid-item
-      class="panel-col"
-      :span="{ xs: 12, sm: 12, md: 12, lg: 12, xl: 12, xxl: 6 }"
-    >
-      <a-space>
-        <a-avatar :size="54" class="col-avatar">
-          <img
-            alt="avatar"
-            src="//p3-armor.byteimg.com/tos-cn-i-49unhts6dw/fdc66b07224cdf18843c6076c2587eb5.svg~tplv-49unhts6dw-image.image"
-          />
-        </a-avatar>
-        <a-statistic
-          :title="$t('workplace.putIn')"
-          :value="368"
-          :value-from="0"
-          animation
-          show-group-separator
-        >
-          <template #suffix>
-            <span class="unit">{{ $t('workplace.pecs') }}</span>
-          </template>
-        </a-statistic>
-      </a-space>
-    </a-grid-item>
-    <a-grid-item
-      class="panel-col"
-      :span="{ xs: 12, sm: 12, md: 12, lg: 12, xl: 12, xxl: 6 }"
-    >
-      <a-space>
-        <a-avatar :size="54" class="col-avatar">
-          <img
-            alt="avatar"
-            src="//p3-armor.byteimg.com/tos-cn-i-49unhts6dw/77d74c9a245adeae1ec7fb5d4539738d.svg~tplv-49unhts6dw-image.image"
-          />
-        </a-avatar>
-        <a-statistic
-          :title="$t('workplace.newDay')"
-          :value="8874"
-          :value-from="0"
-          animation
-          show-group-separator
-        >
-          <template #suffix>
-            <span class="unit">{{ $t('workplace.pecs') }}</span>
-          </template>
-        </a-statistic>
-      </a-space>
-    </a-grid-item>
-    <a-grid-item
-      class="panel-col"
-      :span="{ xs: 12, sm: 12, md: 12, lg: 12, xl: 12, xxl: 6 }"
-      style="border-right: none"
-    >
-      <a-space>
-        <a-avatar :size="54" class="col-avatar">
-          <img
-            alt="avatar"
-            src="//p3-armor.byteimg.com/tos-cn-i-49unhts6dw/c8b36e26d2b9bb5dbf9b74dd6d7345af.svg~tplv-49unhts6dw-image.image"
-          />
-        </a-avatar>
-        <a-statistic
-          :title="$t('workplace.newFromYesterday')"
-          :value="2.8"
-          :precision="1"
-          :value-from="0"
-          animation
-        >
-          <template #suffix> % <icon-caret-up class="up-icon" /> </template>
-        </a-statistic>
-      </a-space>
-    </a-grid-item>
-    <a-grid-item :span="24">
-      <a-divider class="panel-border" />
-    </a-grid-item>
-  </a-grid>
-</template>
-
-<script lang="ts" setup></script>
-
-<style lang="less" scoped>
-  .arco-grid.panel {
-    margin-bottom: 0;
-    padding: 16px 20px 0 20px;
-  }
-  .panel-col {
-    padding-left: 43px;
-    border-right: 1px solid rgb(var(--gray-2));
-  }
-  .col-avatar {
-    margin-right: 12px;
-    background-color: var(--color-fill-2);
-  }
-  .up-icon {
-    color: rgb(var(--red-6));
-  }
-  .unit {
-    margin-left: 8px;
-    color: rgb(var(--gray-8));
-    font-size: 12px;
-  }
-  :deep(.panel-border) {
-    margin: 4px 0 0 0;
-  }
-</style>

+ 0 - 42
src/views/settings/config/components/docs.vue

@@ -1,42 +0,0 @@
-<template>
-  <a-card
-    class="general-card"
-    :title="$t('workplace.docs')"
-    :header-style="{ paddingBottom: 0 }"
-    :body-style="{ paddingTop: 0 }"
-    style="height: 166px"
-  >
-    <template #extra>
-      <a-link>{{ $t('workplace.viewMore') }}</a-link>
-    </template>
-    <a-row>
-      <a-col :span="12">
-        <a-link>
-          {{ $t('workplace.docs.productOverview') }}
-        </a-link>
-      </a-col>
-      <a-col :span="12">
-        <a-link>
-          {{ $t('workplace.docs.userGuide') }}
-        </a-link>
-      </a-col>
-      <a-col :span="12">
-        <a-link>
-          {{ $t('workplace.docs.workflow') }}
-        </a-link>
-      </a-col>
-      <a-col :span="12">
-        <a-link>
-          {{ $t('workplace.docs.interfaceDocs') }}
-        </a-link>
-      </a-col>
-    </a-row>
-  </a-card>
-</template>
-
-<style lang="less" scoped>
-  .arco-card-body .arco-link {
-    margin: 10px 0;
-    color: rgb(var(--gray-8));
-  }
-</style>

+ 0 - 118
src/views/settings/config/components/popular-content.vue

@@ -1,118 +0,0 @@
-<template>
-  <a-spin :loading="loading" style="width: 100%">
-    <a-card
-      class="general-card"
-      :header-style="{ paddingBottom: '0' }"
-      :body-style="{ padding: '17px 20px 21px 20px' }"
-    >
-      <template #title>
-        {{ $t('workplace.popularContent') }}
-      </template>
-      <template #extra>
-        <a-link>{{ $t('workplace.viewMore') }}</a-link>
-      </template>
-      <a-space direction="vertical" :size="10" fill>
-        <a-radio-group
-          v-model:model-value="type"
-          type="button"
-          @change="typeChange as any"
-        >
-          <a-radio value="text">
-            {{ $t('workplace.popularContent.text') }}
-          </a-radio>
-          <a-radio value="image">
-            {{ $t('workplace.popularContent.image') }}
-          </a-radio>
-          <a-radio value="video">
-            {{ $t('workplace.popularContent.video') }}
-          </a-radio>
-        </a-radio-group>
-        <a-table
-          :data="renderList"
-          :pagination="false"
-          :bordered="false"
-          :scroll="{ x: '100%', y: '264px' }"
-        >
-          <template #columns>
-            <a-table-column title="排名" data-index="key"></a-table-column>
-            <a-table-column title="内容标题" data-index="title">
-              <template #cell="{ record }">
-                <a-typography-paragraph
-                  :ellipsis="{
-                    rows: 1,
-                  }"
-                >
-                  {{ record.title }}
-                </a-typography-paragraph>
-              </template>
-            </a-table-column>
-            <a-table-column title="点击量" data-index="clickNumber">
-            </a-table-column>
-            <a-table-column
-              title="日涨幅"
-              data-index="increases"
-              :sortable="{
-                sortDirections: ['ascend', 'descend'],
-              }"
-            >
-              <template #cell="{ record }">
-                <div class="increases-cell">
-                  <span>{{ record.increases }}%</span>
-                  <icon-caret-up
-                    v-if="record.increases !== 0"
-                    style="color: #f53f3f; font-size: 8px"
-                  />
-                </div>
-              </template>
-            </a-table-column>
-          </template>
-        </a-table>
-      </a-space>
-    </a-card>
-  </a-spin>
-</template>
-
-<script lang="ts" setup>
-  import { ref } from 'vue';
-  import useLoading from '@/hooks/loading';
-  import { queryPopularList } from '@/api/dashboard';
-  import type { TableData } from '@arco-design/web-vue/es/table/interface';
-
-  const type = ref('text');
-  const { loading, setLoading } = useLoading();
-  const renderList = ref<TableData[]>();
-  const fetchData = async (contentType: string) => {
-    try {
-      setLoading(true);
-      const { data } = await queryPopularList({ type: contentType });
-      renderList.value = data;
-    } catch (err) {
-      // you can report use errorHandler or other
-    } finally {
-      setLoading(false);
-    }
-  };
-  const typeChange = (contentType: string) => {
-    fetchData(contentType);
-  };
-  fetchData('text');
-</script>
-
-<style scoped lang="less">
-  .general-card {
-    min-height: 395px;
-  }
-  :deep(.arco-table-tr) {
-    height: 44px;
-    .arco-typography {
-      margin-bottom: 0;
-    }
-  }
-  .increases-cell {
-    display: flex;
-    align-items: center;
-    span {
-      margin-right: 4px;
-    }
-  }
-</style>

+ 0 - 35
src/views/settings/config/components/quick-operation.vue

@@ -1,35 +0,0 @@
-<template>
-  <a-card
-    class="general-card"
-    :title="$t('workplace.quick.operation')"
-    :header-style="{ paddingBottom: '0' }"
-    :body-style="{ padding: '24px 20px 0 20px' }"
-  >
-    <template #extra>
-      <a-link>{{ $t('workplace.quickOperation.setup') }}</a-link>
-    </template>
-    <a-row :gutter="8">
-      <a-col v-for="link in links" :key="link.text" :span="8" class="wrapper">
-        <div class="icon">
-          <component :is="link.icon" />
-        </div>
-        <a-typography-paragraph class="text">
-          {{ $t(link.text) }}
-        </a-typography-paragraph>
-      </a-col>
-    </a-row>
-    <a-divider class="split-line" style="margin: 0" />
-  </a-card>
-</template>
-
-<script lang="ts" setup>
-  const links = [
-    { text: 'workplace.contentManagement', icon: 'icon-file' },
-    { text: 'workplace.contentStatistical', icon: 'icon-storage' },
-    { text: 'workplace.advanced', icon: 'icon-settings' },
-    { text: 'workplace.onlinePromotion', icon: 'icon-mobile' },
-    { text: 'workplace.contentPutIn', icon: 'icon-fire' },
-  ];
-</script>
-
-<style scoped lang="less"></style>

+ 0 - 44
src/views/settings/config/components/recently-visited.vue

@@ -1,44 +0,0 @@
-<template>
-  <a-card
-    class="general-card"
-    :title="$t('workplace.recently.visited')"
-    :header-style="{ paddingBottom: '0' }"
-    :body-style="{ paddingTop: '26px' }"
-  >
-    <div style="margin-bottom: -1rem">
-      <a-row :gutter="8">
-        <a-col v-for="link in links" :key="link.text" :span="8" class="wrapper">
-          <div class="icon">
-            <component :is="link.icon" />
-          </div>
-          <a-typography-paragraph class="text">
-            {{ $t(link.text) }}
-          </a-typography-paragraph>
-        </a-col>
-      </a-row>
-    </div>
-  </a-card>
-</template>
-
-<script lang="ts" setup>
-  const links = [
-    {
-      text: 'workplace.contentManagement',
-      icon: 'icon-storage',
-    },
-    {
-      text: 'workplace.contentStatistical',
-      icon: 'icon-file',
-    },
-    {
-      text: 'workplace.advanced',
-      icon: 'icon-settings',
-    },
-  ];
-</script>
-
-<style lang="less" scoped>
-  :deep(.arco-card-header-title) {
-    line-height: inherit;
-  }
-</style>

+ 0 - 148
src/views/settings/config/index.vue

@@ -1,148 +0,0 @@
-<template>
-  <div class="container">
-    <div class="left-side">
-      <div class="panel">
-        <Banner />
-        <DataPanel />
-        <ContentChart />
-      </div>
-      <a-grid :cols="24" :col-gap="16" :row-gap="16" style="margin-top: 16px">
-        <a-grid-item
-          :span="{ xs: 24, sm: 24, md: 24, lg: 12, xl: 12, xxl: 12 }"
-        >
-          <PopularContent />
-        </a-grid-item>
-        <a-grid-item
-          :span="{ xs: 24, sm: 24, md: 24, lg: 12, xl: 12, xxl: 12 }"
-        >
-          <CategoriesPercent />
-        </a-grid-item>
-      </a-grid>
-    </div>
-    <div class="right-side">
-      <a-grid :cols="24" :row-gap="16">
-        <a-grid-item :span="24">
-          <div class="panel moduler-wrap">
-            <QuickOperation />
-            <RecentlyVisited />
-          </div>
-        </a-grid-item>
-        <a-grid-item class="panel" :span="24">
-          <Carousel />
-        </a-grid-item>
-        <a-grid-item class="panel" :span="24">
-          <Announcement />
-        </a-grid-item>
-        <a-grid-item class="panel" :span="24">
-          <Docs />
-        </a-grid-item>
-      </a-grid>
-    </div>
-  </div>
-</template>
-
-<script lang="ts" setup>
-  import Banner from './components/banner.vue';
-  import DataPanel from './components/data-panel.vue';
-  import ContentChart from './components/content-chart.vue';
-  import PopularContent from './components/popular-content.vue';
-  import CategoriesPercent from './components/categories-percent.vue';
-  import RecentlyVisited from './components/recently-visited.vue';
-  import QuickOperation from './components/quick-operation.vue';
-  import Announcement from './components/announcement.vue';
-  import Carousel from './components/carousel.vue';
-  import Docs from './components/docs.vue';
-</script>
-
-<script lang="ts">
-  export default {
-    name: 'Dashboard', // If you want the include property of keep-alive to take effect, you must name the component
-  };
-</script>
-
-<style lang="less" scoped>
-  .container {
-    background-color: var(--color-fill-2);
-    padding: 16px 20px;
-    padding-bottom: 0;
-    display: flex;
-  }
-
-  .left-side {
-    flex: 1;
-    overflow: auto;
-  }
-
-  .right-side {
-    width: 280px;
-    margin-left: 16px;
-  }
-
-  .panel {
-    background-color: var(--color-bg-2);
-    border-radius: 4px;
-    overflow: auto;
-  }
-  :deep(.panel-border) {
-    margin-bottom: 0;
-    border-bottom: 1px solid rgb(var(--gray-2));
-  }
-  .moduler-wrap {
-    border-radius: 4px;
-    background-color: var(--color-bg-2);
-    :deep(.text) {
-      font-size: 12px;
-      text-align: center;
-      color: rgb(var(--gray-8));
-    }
-
-    :deep(.wrapper) {
-      margin-bottom: 8px;
-      text-align: center;
-      cursor: pointer;
-
-      &:last-child {
-        .text {
-          margin-bottom: 0;
-        }
-      }
-      &:hover {
-        .icon {
-          color: rgb(var(--arcoblue-6));
-          background-color: #e8f3ff;
-        }
-        .text {
-          color: rgb(var(--arcoblue-6));
-        }
-      }
-    }
-
-    :deep(.icon) {
-      display: inline-block;
-      width: 32px;
-      height: 32px;
-      margin-bottom: 4px;
-      color: rgb(var(--dark-gray-1));
-      line-height: 32px;
-      font-size: 16px;
-      text-align: center;
-      background-color: rgb(var(--gray-1));
-      border-radius: 4px;
-    }
-  }
-</style>
-
-<style lang="less" scoped>
-  // responsive
-  .mobile {
-    .container {
-      display: block;
-    }
-    .right-side {
-      // display: none;
-      width: 100%;
-      margin-left: 0;
-      margin-top: 16px;
-    }
-  }
-</style>

+ 0 - 38
src/views/settings/config/locale/en-US.ts

@@ -1,38 +0,0 @@
-export default {
-  'menu.settings.updateCookies': 'Update Cookie',
-  'workplace.welcome': 'Welcome!',
-  'workplace.balance': 'Balance (CNY)',
-  'workplace.order.pending': 'Pending',
-  'workplace.order.pendingRenewal': 'Renewal Order',
-  'workplace.onlineContent': 'Online Content',
-  'workplace.putIn': 'Put In',
-  'workplace.newDay': 'Daily Additional Comments',
-  'workplace.newFromYesterday': 'New From Yesterday',
-  'workplace.minute': 'Min',
-  'workplace.docs': 'Documents',
-  'workplace.docs.productOverview': 'Product Overview',
-  'workplace.docs.userGuide': 'User Guide',
-  'workplace.docs.workflow': 'Workflow',
-  'workplace.docs.interfaceDocs': 'Interface Docs',
-  //
-  'workplace.contentManagement': 'Content Management',
-  'workplace.contentStatistical': 'Content Statistical',
-  'workplace.advanced': 'Advanced',
-  'workplace.onlinePromotion': 'Online Promotion',
-  'workplace.contentPutIn': 'Put In',
-  'workplace.announcement': 'Announcement',
-  'workplace.recently.visited': 'Recently Visited',
-  'workplace.record.nodata': 'No data',
-  'workplace.quick.operation': 'Quick Operation',
-  'workplace.quickOperation.setup': 'Setup',
-  'workplace.allProject': 'All',
-  'workplace.loadMore': 'More',
-  'workplace.viewMore': 'More',
-  'workplace.contentData': 'Content Data',
-  'workplace.popularContent': 'Popular Content',
-  'workplace.popularContent.text': 'text',
-  'workplace.popularContent.image': 'image',
-  'workplace.popularContent.video': 'video',
-  'workplace.categoriesPercent': 'Categories Percent',
-  'workplace.pecs': 'pecs',
-};

+ 0 - 37
src/views/settings/config/locale/zh-CN.ts

@@ -1,37 +0,0 @@
-export default {
-  'menu.settings.updateCookies': '更新Cookie',
-  'workplace.welcome': '欢迎回来!',
-  'workplace.balance': '余额(元)',
-  'workplace.order.pending': '待支付',
-  'workplace.order.pendingRenewal': '待续费订单',
-  'workplace.onlineContent': '线上总内容',
-  'workplace.putIn': '投放中内容',
-  'workplace.newDay': '日新增评论',
-  'workplace.newFromYesterday': '较昨日新增',
-  'workplace.minute': '分钟',
-  'workplace.docs': '帮助文档',
-  'workplace.docs.productOverview': '产品概要',
-  'workplace.docs.userGuide': '使用指南',
-  'workplace.docs.workflow': '接入流程',
-  'workplace.docs.interfaceDocs': '接口文档',
-  'workplace.contentManagement': '内容管理',
-  'workplace.contentStatistical': '内容分析',
-  'workplace.advanced': '高级管理',
-  'workplace.onlinePromotion': '线上推广',
-  'workplace.contentPutIn': '内容投放',
-  'workplace.announcement': '公告',
-  'workplace.recently.visited': '最近访问',
-  'workplace.record.nodata': '暂无数据',
-  'workplace.quick.operation': '快捷操作',
-  'workplace.quickOperation.setup': '管理',
-  'workplace.allProject': '所有项目',
-  'workplace.loadMore': '加载更多',
-  'workplace.viewMore': '查看更多',
-  'workplace.contentData': '内容数据',
-  'workplace.popularContent': '线上热门内容',
-  'workplace.popularContent.text': '文本',
-  'workplace.popularContent.image': '图片',
-  'workplace.popularContent.video': '视频',
-  'workplace.categoriesPercent': '内容类型占比',
-  'workplace.pecs': '个',
-};

+ 0 - 129
src/views/settings/config/mock.ts

@@ -1,129 +0,0 @@
-import Mock from 'mockjs';
-import qs from 'query-string';
-import dayjs from 'dayjs';
-import { GetParams } from '@/types/global';
-import setupMock, { successResponseWrap } from '@/utils/setup-mock';
-
-const textList = [
-  {
-    key: 1,
-    clickNumber: '346.3w+',
-    title: '经济日报:财政政策要精准提升…',
-    increases: 35,
-  },
-  {
-    key: 2,
-    clickNumber: '324.2w+',
-    title: '双12遇冷,消费者厌倦了电商平…',
-    increases: 22,
-  },
-  {
-    key: 3,
-    clickNumber: '318.9w+',
-    title: '致敬坚守战“疫”一线的社区工作…',
-    increases: 9,
-  },
-  {
-    key: 4,
-    clickNumber: '257.9w+',
-    title: '普高还是职高?家长们陷入选择…',
-    increases: 17,
-  },
-  {
-    key: 5,
-    clickNumber: '124.2w+',
-    title: '人民快评:没想到“浓眉大眼”的…',
-    increases: 37,
-  },
-];
-const imageList = [
-  {
-    key: 1,
-    clickNumber: '15.3w+',
-    title: '杨涛接替陆慷出任外交部美大司…',
-    increases: 15,
-  },
-  {
-    key: 2,
-    clickNumber: '12.2w+',
-    title: '图集:龙卷风袭击美国多州房屋…',
-    increases: 26,
-  },
-  {
-    key: 3,
-    clickNumber: '18.9w+',
-    title: '52岁大姐贴钱照顾自闭症儿童八…',
-    increases: 9,
-  },
-  {
-    key: 4,
-    clickNumber: '7.9w+',
-    title: '杭州一家三口公园宿营取暖中毒',
-    increases: 0,
-  },
-  {
-    key: 5,
-    clickNumber: '5.2w+',
-    title: '派出所副所长威胁市民?警方调…',
-    increases: 4,
-  },
-];
-const videoList = [
-  {
-    key: 1,
-    clickNumber: '367.6w+',
-    title: '这是今日10点的南京',
-    increases: 5,
-  },
-  {
-    key: 2,
-    clickNumber: '352.2w+',
-    title: '立陶宛不断挑衅致经济受损民众…',
-    increases: 17,
-  },
-  {
-    key: 3,
-    clickNumber: '348.9w+',
-    title: '韩国艺人刘在石确诊新冠',
-    increases: 30,
-  },
-  {
-    key: 4,
-    clickNumber: '346.3w+',
-    title: '关于北京冬奥会,文在寅表态',
-    increases: 12,
-  },
-  {
-    key: 5,
-    clickNumber: '271.2w+',
-    title: '95后现役军人荣立一等功',
-    increases: 2,
-  },
-];
-setupMock({
-  setup() {
-    Mock.mock(new RegExp('/api/content-data'), () => {
-      const presetData = [58, 81, 53, 90, 64, 88, 49, 79];
-      const getLineData = () => {
-        const count = 8;
-        return new Array(count).fill(0).map((el, idx) => ({
-          x: dayjs()
-            .day(idx - 2)
-            .format('YYYY-MM-DD'),
-          y: presetData[idx],
-        }));
-      };
-      return successResponseWrap([...getLineData()]);
-    });
-    Mock.mock(new RegExp('/api/popular/list'), (params: GetParams) => {
-      const { type = 'text' } = qs.parseUrl(params.url).query;
-      if (type === 'image') {
-        return successResponseWrap([...videoList]);
-      }
-      if (type === 'video') {
-        return successResponseWrap([...imageList]);
-      }
-      return successResponseWrap([...textList]);
-    });
-  },
-});

+ 1 - 1
src/views/taobao/components/viewOrdersModal.vue

@@ -51,7 +51,7 @@ const handleClickOrder = (val: any) => {
         case "order_ord_amt":
         case "order_ord_amt":
             tkStatus.value = [3];
             tkStatus.value = [3];
             break;
             break;
-        case "order_ord_amt_12":
+        case "order_ord_amt_12_14":
             tkStatus.value = [12, 14];
             tkStatus.value = [12, 14];
             break;
             break;
         case "pay_ord_amt_56":
         case "pay_ord_amt_56":

+ 45 - 20
src/views/taobao/list.vue

@@ -106,7 +106,7 @@
                 </a-col>
                 </a-col>
             </a-row>
             </a-row>
 
 
-            <a-table row-key="id" :loading="loading" :pagination="pagination"
+            <a-table row-key="id" :loading="loading" :pagination="pagination" :summary="true" summary-text="汇总"
                 :columns="(cloneColumns as TableColumnData[])" :data="renderData" :bordered="false" :size="size"
                 :columns="(cloneColumns as TableColumnData[])" :data="renderData" :bordered="false" :size="size"
                 @page-change="onPageChange">
                 @page-change="onPageChange">
                 <template #index="{ record }">
                 <template #index="{ record }">
@@ -142,32 +142,50 @@
                     </a-tag>
                     </a-tag>
                 </template>
                 </template>
                 <template #actions="{ record }">
                 <template #actions="{ record }">
-                        <a-tag v-if="record.enable_parse" size="mini" bordered color="red"
-                            @click="changeAttr(record.id, 'enable_parse', false)">
-                            转链
-                        </a-tag>
-                        <a-tag v-else size="mini" bordered color=""
-                            @click="changeAttr(record.id, 'enable_parse', true)">
-                            转链
-                        </a-tag>
-                        <span style="margin:0 5px;">
-                        <a-tag v-if="record.enable_coupon" size="mini" bordered color="orange"
+                    <a-tag v-if="record.enable_parse" size="small" bordered color="red"
+                        @click="changeAttr(record.id, 'enable_parse', false)">
+                        转链
+                    </a-tag>
+                    <a-tag v-else size="small" bordered color="" @click="changeAttr(record.id, 'enable_parse', true)">
+                        转链
+                    </a-tag>
+                    <span style="margin: 5px;">
+                        <a-tag v-if="record.enable_coupon" size="small" bordered color="orange"
                             @click="changeAttr(record.id, 'enable_coupon', false)">
                             @click="changeAttr(record.id, 'enable_coupon', false)">
                             优惠券
                             优惠券
                         </a-tag>
                         </a-tag>
-                        <a-tag v-else size="mini" bordered color=""
+                        <a-tag v-else size="small" bordered color=""
                             @click="changeAttr(record.id, 'enable_coupon', true)">
                             @click="changeAttr(record.id, 'enable_coupon', true)">
                             优惠券
                             优惠券
                         </a-tag>
                         </a-tag>
                     </span>
                     </span>
-                        <a-tag v-if="record.enable_fake_click" size="mini" bordered color="blue"
+                    <a-tag v-if="record.enable_sync_order" size="small" bordered color="arcoblue"
+                        @click="changeAttr(record.id, 'enable_sync_order', false)">
+                        同步订单
+                    </a-tag>
+                    <a-tag v-else size="small" bordered color="gray"
+                        @click="changeAttr(record.id, 'enable_sync_order', true)">
+                        同步订单
+                    </a-tag>
+                    <span style="margin:0 5px;">
+                        <a-tag v-if="record.enable_fake_click" size="small" bordered color="blue"
                             @click="changeAttr(record.id, 'enable_fake_click', false)">
                             @click="changeAttr(record.id, 'enable_fake_click', false)">
                             补点击
                             补点击
                         </a-tag>
                         </a-tag>
-                        <a-tag v-else size="mini" bordered color="gray"
+                        <a-tag v-else size="small" bordered color="gray"
                             @click="changeAttr(record.id, 'enable_fake_click', true)">
                             @click="changeAttr(record.id, 'enable_fake_click', true)">
                             补点击
                             补点击
                         </a-tag>
                         </a-tag>
+                    </span>
+
+                    <a-tag v-if="record.enable_promotionQuery" size="small" bordered color="orangered"
+                        @click="changeAttr(record.id, 'enable_promotionQuery', false)">
+                        搜同款
+                    </a-tag>
+                    <a-tag v-else size="small" bordered color="gray"
+                        @click="changeAttr(record.id, 'enable_promotionQuery', true)">
+                        搜同款
+                    </a-tag>
                 </template>
                 </template>
                 <template #time="{ record }">
                 <template #time="{ record }">
                     <div>{{ record.create_time }}</div>
                     <div>{{ record.create_time }}</div>
@@ -181,6 +199,13 @@
                         预计收益
                         预计收益
                     </a-button>
                     </a-button>
                 </template>
                 </template>
+
+                <template #summary-cell="{ column, record }">
+                    <div style="margin:10px auto" v-if="column.slotName == 'daily_income_limit'">
+                        预估: {{ amountFormat(record.current_amt) }}
+                    </div>
+                </template>
+
             </a-table>
             </a-table>
         </a-card>
         </a-card>
     </div>
     </div>
@@ -198,6 +223,7 @@ import type { SelectOptionData } from '@arco-design/web-vue/es/select/interface'
 import type { TableColumnData } from '@arco-design/web-vue/es/table/interface';
 import type { TableColumnData } from '@arco-design/web-vue/es/table/interface';
 import cloneDeep from 'lodash/cloneDeep';
 import cloneDeep from 'lodash/cloneDeep';
 import Sortable from 'sortablejs';
 import Sortable from 'sortablejs';
+import { numberFormat, amountFormat } from '@/utils/util';
 
 
 type SizeProps = 'mini' | 'small' | 'medium' | 'large';
 type SizeProps = 'mini' | 'small' | 'medium' | 'large';
 type Column = TableColumnData & { checked?: true };
 type Column = TableColumnData & { checked?: true };
@@ -224,7 +250,7 @@ const size = ref<SizeProps>('mini');
 
 
 const basePagination: Pagination = {
 const basePagination: Pagination = {
     current: 1,
     current: 1,
-    pageSize: 20,
+    pageSize: 50,
 };
 };
 const pagination = reactive({
 const pagination = reactive({
     ...basePagination,
     ...basePagination,
@@ -264,6 +290,7 @@ const columns = computed<TableColumnData[]>(() => [
     {
     {
         title: '每日收益限额',
         title: '每日收益限额',
         slotName: 'daily_income_limit',
         slotName: 'daily_income_limit',
+        dataIndex: 'current_amt',
         width: 180,
         width: 180,
     },
     },
     {
     {
@@ -284,7 +311,7 @@ const columns = computed<TableColumnData[]>(() => [
     {
     {
         title: '分类',
         title: '分类',
         slotName: 'actions',
         slotName: 'actions',
-        width: 200,
+        width: 330,
         align: 'center',
         align: 'center',
     },
     },
     {
     {
@@ -319,7 +346,7 @@ const statusOptions = computed<SelectOptionData[]>(() => [
 const fetchData = async (
 const fetchData = async (
     params: TkPoolParams = {
     params: TkPoolParams = {
         current: 1,
         current: 1,
-        pageSize: 20,
+        pageSize: 50,
         sort: 'status',
         sort: 'status',
         order: 'descending',
         order: 'descending',
         getTotal: true,
         getTotal: true,
@@ -328,13 +355,11 @@ const fetchData = async (
     setLoading(true);
     setLoading(true);
     try {
     try {
         const { data } = await queryTkPool(params);
         const { data } = await queryTkPool(params);
-        console.log(data);
         if (!data) return;
         if (!data) return;
         // const { data } = await queryTkPool(params);
         // const { data } = await queryTkPool(params);
         renderData.value = data.list;
         renderData.value = data.list;
         pagination.current = data.page;
         pagination.current = data.page;
         pagination.total = data.count;
         pagination.total = data.count;
-        console.log(data);
     } catch (err) {
     } catch (err) {
         console.log(err);
         console.log(err);
         // you can report use errorHandler or other
         // you can report use errorHandler or other
@@ -410,7 +435,7 @@ const search = () => {
     } as unknown as TkPoolParams);
     } as unknown as TkPoolParams);
 };
 };
 const onPageChange = (current: number) => {
 const onPageChange = (current: number) => {
-    fetchData({ ...basePagination, current, getTotal: current === 1 });
+    fetchData({ ...basePagination, current });
 };
 };
 
 
 fetchData();
 fetchData();

+ 9 - 1
src/views/taobao/report_daily.vue

@@ -213,7 +213,7 @@
                         </template>
                         </template>
                     </a-popover>
                     </a-popover>
                 </template>
                 </template>
-                
+
                 <template #summary-cell="{ column, record }">
                 <template #summary-cell="{ column, record }">
                     <!-- 
                     <!-- 
                     { "title": "点击人数", "dataIndex": "uclk_uv_56", "width": 100, "align": "right", "parent": { "title": "点击", "children": [ { "title": "点击人数", "dataIndex": "uclk_uv_56", "width": 100, "align": "right" }, { "title": "点击次数", "dataIndex": "uclk_pv_56", "width": 100, "align": "right" } ], "checked": true, "colSpan": 2 } }
                     { "title": "点击人数", "dataIndex": "uclk_uv_56", "width": 100, "align": "right", "parent": { "title": "点击", "children": [ { "title": "点击人数", "dataIndex": "uclk_uv_56", "width": 100, "align": "right" }, { "title": "点击次数", "dataIndex": "uclk_pv_56", "width": 100, "align": "right" } ], "checked": true, "colSpan": 2 } }
@@ -226,6 +226,7 @@
                         column.slotName == 'order_ord_amt' ||
                         column.slotName == 'order_ord_amt' ||
                         column.slotName == 'order_ord_tfee' ||
                         column.slotName == 'order_ord_tfee' ||
                         column.slotName == 'pay_tk_disp_tfee_56' ||
                         column.slotName == 'pay_tk_disp_tfee_56' ||
+                        column.slotName == 'eff_tk_disp_tfee' ||
                         column.slotName == 'sett_tk_disp_tfee_56' ||
                         column.slotName == 'sett_tk_disp_tfee_56' ||
                         column.slotName == 'order_ord_tfee_12_14' ||
                         column.slotName == 'order_ord_tfee_12_14' ||
                         column.slotName == 'order_ord_amt_12_14'">
                         column.slotName == 'order_ord_amt_12_14'">
@@ -379,6 +380,11 @@ const columns = computed<TableColumnData[]>(() => [
                 width: 100,
                 width: 100,
                 align: 'right',
                 align: 'right',
             },
             },
+            {
+                title: '订单付款数',
+                dataIndex: 'order_ord_num',
+                width: 110,
+            },
             {
             {
                 title: '付款金额',
                 title: '付款金额',
                 slotName: 'pay_ord_amt_56',
                 slotName: 'pay_ord_amt_56',
@@ -423,6 +429,7 @@ const columns = computed<TableColumnData[]>(() => [
             {
             {
                 title: '有效付款预估收入',
                 title: '有效付款预估收入',
                 dataIndex: 'eff_tk_disp_tfee',
                 dataIndex: 'eff_tk_disp_tfee',
+                slotName: 'eff_tk_disp_tfee',
                 width: 150,
                 width: 150,
                 align: 'right',
                 align: 'right',
                 render: (e: any) => amountFormat(e.record.eff_tk_disp_tfee)
                 render: (e: any) => amountFormat(e.record.eff_tk_disp_tfee)
@@ -472,6 +479,7 @@ const columns = computed<TableColumnData[]>(() => [
                 width: 120,
                 width: 120,
                 align: 'right',
                 align: 'right',
                 dataIndex: 'order_ord_tfee',
                 dataIndex: 'order_ord_tfee',
+                slotName: 'order_ord_tfee',
                 render: (e: any) => amountFormat(e.record.order_ord_tfee)
                 render: (e: any) => amountFormat(e.record.order_ord_tfee)
             },
             },
             {
             {