diff --git a/.drone.yml b/.drone.yml index d0ec613..985a4f1 100644 --- a/.drone.yml +++ b/.drone.yml @@ -3,40 +3,48 @@ type: docker name: build-deploy clone: - depth: 1 # ✅ 只拉取最近一次 commit,显著加快 clone 速度 + depth: 1 trigger: - event: - - push - - custom - branch: - - master - - test - - feature/ldb_build + event: [ push, custom ] + branch: [ master, test, feature/ldb_build ] steps: - name: install & build - image: node:23.9.0 + image: node:22-bullseye-slim + environment: + # 统一走镜像,避免 npmjs 超时 + NPM_CONFIG_REGISTRY: https://registry.npmmirror.com + PNPM_REGISTRY: https://registry.npmmirror.com + # 提高容错 + PNPM_FETCH_RETRIES: "5" + PNPM_FETCH_RETRY_MINTIMEOUT: "2000" + PNPM_FETCH_RETRY_MAXTIMEOUT: "60000" + PNPM_FETCH_TIMEOUT: "600000" + CI: "true" + # 固定 pnpm store 到缓存卷 + PNPM_STORE_DIR: /cache/pnpm volumes: - name: build-output path: /runner/builds + - name: pnpm-store-cache + path: /cache commands: + - node -v && npm -v - corepack enable - - corepack prepare pnpm@8.15.5 --activate - - pnpm install + - corepack prepare pnpm@10.13.1 --activate + # 关键:先把所有包拉进本地 store(不执行 postinstall) + - pnpm fetch + + # 离线优先安装:命中 store 就不走网络;锁住 lockfile + - pnpm install --frozen-lockfile --prefer-offline + - mkdir -p /runner/builds/${DRONE_REPO_NAME}/${DRONE_BRANCH} - | case "${DRONE_BRANCH}" in - feature/ldb_build | test) - pnpm run build:test - ;; - master) - pnpm run build:prod - ;; - *) - echo "❌ 未配置此分支的构建规则: ${DRONE_BRANCH}" - exit 1 - ;; + feature/ldb_build|test) pnpm run build:test ;; + master) pnpm run build:prod ;; + *) echo "❌ 未配置此分支的构建规则: ${DRONE_BRANCH}"; exit 1 ;; esac - rm -rf /runner/builds/${DRONE_REPO_NAME}/${DRONE_BRANCH}/* - cp -r dist/* /runner/builds/${DRONE_REPO_NAME}/${DRONE_BRANCH}/ @@ -44,12 +52,8 @@ steps: - name: deploy to spug image: curlimages/curl when: - status: - - success - branch: - - feature/ldb_build - - test - - master + status: [ success ] + branch: [ feature/ldb_build, test, master ] environment: SPUG_DEPLOY_URL: from_secret: spug_deploy_lingji_work_fe_url @@ -59,38 +63,35 @@ steps: - | echo "🚀 部署到 Spug: 分支 ${DRONE_BRANCH}" curl -X POST "$SPUG_DEPLOY_URL?name=${DRONE_BRANCH}&token=$SPUG_DEPLOY_TOKEN" \ - -H "Content-Type: application/json" \ - -d '{ - "ref": "refs/heads/'"${DRONE_BRANCH}"'", - "before": "'"${DRONE_COMMIT_BEFORE}"'", - "after": "'"${DRONE_COMMIT_SHA}"'", - "commits": [ - { - "message": "发布'"${DRONE_BRANCH}:${DRONE_COMMIT_SHA}"'" - } - ] - }' + -H "Content-Type: application/json" \ + -d '{ + "ref": "refs/heads/'"${DRONE_BRANCH}"'", + "before": "'"${DRONE_COMMIT_BEFORE}"'", + "after": "'"${DRONE_COMMIT_SHA}"'", + "commits": [{"message": "发布'"${DRONE_BRANCH}:${DRONE_COMMIT_SHA}"'"}] + }' - name: notify feishu on failure image: curlimages/curl when: - status: - - failure + status: [ failure ] environment: FEISHU_WEBHOOK: from_secret: feishu_webhook_url commands: - | curl -X POST "$FEISHU_WEBHOOK" \ - -H "Content-Type: application/json" \ - -d '{ - "msg_type": "text", - "content": { - "text": "❌ Drone-CI 执行失败 ❗️\n项目: '${DRONE_REPO_NAME}'\n分支: '${DRONE_BRANCH}'\n提交: '${DRONE_COMMIT_SHA:0:8}'" - } - }' + -H "Content-Type: application/json" \ + -d '{ + "msg_type": "text", + "content": { "text": "❌ Drone-CI 执行失败 ❗️\n项目: '${DRONE_REPO_NAME}'\n分支: '${DRONE_BRANCH}'\n提交: '${DRONE_COMMIT_SHA:0:8}'" } + }' volumes: - name: build-output host: - path: /www/dk_project/dk_compose/spug/data/repos/build/drone-runner/builds \ No newline at end of file + path: /www/dk_project/dk_compose/spug/data/repos/build/drone-runner/builds + - name: pnpm-store-cache + host: + # 建议为 pnpm store 单独准备一个可持久化目录 + path: /www/dk_project/dk_compose/spug/cache/pnpm-store diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 5129e2e..adf5755 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -49,7 +49,7 @@ importers: version: 4.17.21 marked: specifier: ^16.1.1 - version: 16.1.1 + version: 16.1.2 mitt: specifier: ^3.0.0 version: 3.0.0 @@ -650,36 +650,42 @@ packages: engines: {node: '>= 10.0.0'} cpu: [arm] os: [linux] + libc: [glibc] '@parcel/watcher-linux-arm-musl@2.5.1': resolution: {integrity: sha512-6E+m/Mm1t1yhB8X412stiKFG3XykmgdIOqhjWj+VL8oHkKABfu/gjFj8DvLrYVHSBNC+/u5PeNrujiSQ1zwd1Q==} engines: {node: '>= 10.0.0'} cpu: [arm] os: [linux] + libc: [musl] '@parcel/watcher-linux-arm64-glibc@2.5.1': resolution: {integrity: sha512-LrGp+f02yU3BN9A+DGuY3v3bmnFUggAITBGriZHUREfNEzZh/GO06FF5u2kx8x+GBEUYfyTGamol4j3m9ANe8w==} engines: {node: '>= 10.0.0'} cpu: [arm64] os: [linux] + libc: [glibc] '@parcel/watcher-linux-arm64-musl@2.5.1': resolution: {integrity: sha512-cFOjABi92pMYRXS7AcQv9/M1YuKRw8SZniCDw0ssQb/noPkRzA+HBDkwmyOJYp5wXcsTrhxO0zq1U11cK9jsFg==} engines: {node: '>= 10.0.0'} cpu: [arm64] os: [linux] + libc: [musl] '@parcel/watcher-linux-x64-glibc@2.5.1': resolution: {integrity: sha512-GcESn8NZySmfwlTsIur+49yDqSny2IhPeZfXunQi48DMugKeZ7uy1FX83pO0X22sHntJ4Ub+9k34XQCX+oHt2A==} engines: {node: '>= 10.0.0'} cpu: [x64] os: [linux] + libc: [glibc] '@parcel/watcher-linux-x64-musl@2.5.1': resolution: {integrity: sha512-n0E2EQbatQ3bXhcH2D1XIAANAcTZkQICBPVaxMeaCVBtOpBZpWJuf7LwyWPSBDITb7In8mqQgJ7gH8CILCURXg==} engines: {node: '>= 10.0.0'} cpu: [x64] os: [linux] + libc: [musl] '@parcel/watcher-win32-arm64@2.5.1': resolution: {integrity: sha512-RFzklRvmc3PkjKjry3hLF9wD7ppR4AKcWNzH7kXR7GUe0Igb3Nz8fyPwtZCSquGrhU5HhUNDr/mKBqj7tqA2Vw==} @@ -3696,6 +3702,11 @@ packages: resolution: {integrity: sha512-4y7uGv8bd2WdM9vpQsiQNo41Ln1NvhvDRuVt0k2JZQ+ezN2uaQes7lZeZ+QQUHOLQAtDaBJ+7wCbi+ab/KFs+w==} engines: {node: '>=0.10.0'} + marked@16.1.2: + resolution: {integrity: sha512-rNQt5EvRinalby7zJZu/mB+BvaAY2oz3wCuCjt1RDrWNpS1Pdf9xqMOeC9Hm5adBdcV/3XZPJpG58eT+WBc0XQ==} + engines: {node: '>= 20'} + hasBin: true + match-file@0.2.2: resolution: {integrity: sha512-BDEZIcrBSnooL0zC72Yt3z1HhJiCq+2pMnHKVDeYN/cilCrz3KrpqKPm4ZOfWCoDolRl4QyKQpfRlQWF6PqnjQ==} engines: {node: '>=0.10.0'} @@ -8080,7 +8091,6 @@ snapshots: dompurify@3.2.6: optionalDependencies: '@types/trusted-types': 2.0.7 - optional: true domutils@1.7.0: dependencies: @@ -10070,6 +10080,8 @@ snapshots: dependencies: object-visit: 1.0.1 + marked@16.1.2: {} + match-file@0.2.2: dependencies: is-glob: 3.1.0 diff --git a/src/assets/img/creative-generation-workshop/icon-avatar-default-v2.png b/src/assets/img/creative-generation-workshop/icon-avatar-default-v2.png new file mode 100644 index 0000000..d3ed337 Binary files /dev/null and b/src/assets/img/creative-generation-workshop/icon-avatar-default-v2.png differ diff --git a/src/assets/img/media-account/icon-dy.png b/src/assets/img/media-account/icon-dy.png deleted file mode 100644 index 0323b26..0000000 Binary files a/src/assets/img/media-account/icon-dy.png and /dev/null differ diff --git a/src/assets/img/media-account/icon-xhs.png b/src/assets/img/media-account/icon-xhs.png deleted file mode 100644 index c66ac71..0000000 Binary files a/src/assets/img/media-account/icon-xhs.png and /dev/null differ diff --git a/src/assets/img/platform/icon-dy.png b/src/assets/img/platform/icon-dy.png new file mode 100644 index 0000000..7a18a17 Binary files /dev/null and b/src/assets/img/platform/icon-dy.png differ diff --git a/src/assets/img/platform/icon-xhs.png b/src/assets/img/platform/icon-xhs.png new file mode 100644 index 0000000..ca4061a Binary files /dev/null and b/src/assets/img/platform/icon-xhs.png differ diff --git a/src/components/hover-image-preview/index.vue b/src/components/hover-image-preview/index.vue index 2366750..be68fc0 100644 --- a/src/components/hover-image-preview/index.vue +++ b/src/components/hover-image-preview/index.vue @@ -12,7 +12,7 @@ :disabled="!props.src" > @@ -22,9 +22,9 @@ diff --git a/src/hooks/useGetAiReviewResult.ts b/src/hooks/useGetAiReviewResult.ts index 188fd8c..5c2e6cc 100644 --- a/src/hooks/useGetAiReviewResult.ts +++ b/src/hooks/useGetAiReviewResult.ts @@ -21,7 +21,7 @@ export default function useGetAiReviewResult({ const checkResult = ref({}); const writerCode = computed(() => route.params.writerCode); - + const handleStartCheck = async () => { checkLoading.value = true; const { id, platform, content } = cardInfo.value; @@ -36,10 +36,13 @@ export default function useGetAiReviewResult({ startStatusPolling(); } }; - const handleAgainCheck = async () => { + const resetAiReviewInfo = () => { checkResult.value = {}; ticket.value = ''; clearStatusPollingTimer(); + }; + const handleAgainCheck = async () => { + resetAiReviewInfo(); handleStartCheck(); }; const startStatusPolling = () => { @@ -76,5 +79,6 @@ export default function useGetAiReviewResult({ checkResult, checkLoading, ticket, + resetAiReviewInfo, }; } diff --git a/src/router/routes/modules/creativeGenerationWorkshop.ts b/src/router/routes/modules/creativeGenerationWorkshop.ts index 4b55f59..6c60759 100644 --- a/src/router/routes/modules/creativeGenerationWorkshop.ts +++ b/src/router/routes/modules/creativeGenerationWorkshop.ts @@ -118,6 +118,8 @@ const COMPONENTS: AppRouteRecordRaw[] = [ locale: '分享链接列表', requiresAuth: false, requireLogin: false, + hideFooter: true, + hideSidebar: true, roles: ['*'], }, component: () => import('@/views/creative-generation-workshop/explore/list/index.vue'), @@ -129,6 +131,8 @@ const COMPONENTS: AppRouteRecordRaw[] = [ locale: '分享链接详情', requiresAuth: false, requireLogin: false, + hideFooter: true, + hideSidebar: true, roles: ['*'], }, component: () => import('@/views/creative-generation-workshop/explore/detail/index.vue'), diff --git a/src/styles/components/pagination.scss b/src/styles/components/pagination.scss index 6015af3..6d37a2b 100644 --- a/src/styles/components/pagination.scss +++ b/src/styles/components/pagination.scss @@ -3,6 +3,7 @@ .arco-pagination-item { border-radius: 4px; border: 1px solid var(--BG-300, #e6e6e8); + font-family: $font-family-manrope-regular; &-ellipsis { border: none; } @@ -26,9 +27,9 @@ border: 1px solid var(--BG-300, #e6e6e8); } &-prepend { - color: var(--Text-2, #3c4043); + color: var(--Text-2, #55585f); text-align: right; - font-family: $font-family-medium; + font-family: $font-family-regular; font-size: 14px; font-style: normal; font-weight: 400; @@ -38,4 +39,12 @@ background-color: transparent; } } + .arco-pagination-total { + color: var(--Text-2, #55585f); + font-family: $font-family-regular; + font-size: 14px; + font-style: normal; + font-weight: 400; + line-height: 22px; + } } diff --git a/src/styles/components/table.scss b/src/styles/components/table.scss index 9c53cc5..e027362 100644 --- a/src/styles/components/table.scss +++ b/src/styles/components/table.scss @@ -1,6 +1,6 @@ .arco-table { @mixin table-cell-text { - color: var(--Text-1, #3C4043); + color: var(--Text-1, #211F24); font-family: $font-family-regular; font-size: 14px; font-style: normal; @@ -22,6 +22,18 @@ @include table-cell-text; font-family: 'PingFangSC-Medium'; } + .arco-table-sorter { + .arco-table-sorter-icon { + .arco-icon { + color: #939499; + } + &-active { + .arco-icon { + color: $color-primary; + } + } + } + } } } } @@ -40,5 +52,15 @@ } } } + .arco-scrollbar { + display: flex; + flex-direction: column; + .arco-table-element { + height: 100%; + } + .arco-scrollbar-container{ + flex: 1; + } + } } } diff --git a/src/utils/platform.ts b/src/utils/platform.ts index 9a3c0d3..03f39c8 100644 --- a/src/utils/platform.ts +++ b/src/utils/platform.ts @@ -1,8 +1,8 @@ import icon1 from '@/assets/img/media-account/icon-jl.png'; import icon2 from '@/assets/img/media-account/icon-jg.png'; import icon3 from '@/assets/img/media-account/icon-bili.png'; -import icon4 from '@/assets/img/media-account/icon-dy.png'; -import icon5 from '@/assets/img/media-account/icon-xhs.png'; +import icon4 from '@/assets/img/platform/icon-dy.png'; +import icon5 from '@/assets/img/platform/icon-xhs.png'; // 投放账户 export enum ENUM_PUT_ACCOUNT_PLATFORM { diff --git a/src/views/creative-generation-workshop/explore/detail/components/ai-suggest/index.vue b/src/views/creative-generation-workshop/explore/detail/components/ai-suggest/index.vue index 2f00f7a..32e1614 100644 --- a/src/views/creative-generation-workshop/explore/detail/components/ai-suggest/index.vue +++ b/src/views/creative-generation-workshop/explore/detail/components/ai-suggest/index.vue @@ -1,5 +1,5 @@