From 6a8cf54ccb78130f678f953f10ce3239d91fa978 Mon Sep 17 00:00:00 2001 From: rd <> Date: Fri, 27 Jun 2025 17:14:35 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E9=87=8D=E6=96=B0=E6=8E=88=E6=9D=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/all/propertyMarketing.ts | 5 + .../components/account-table/index.vue | 12 +- .../authorized-account-modal/index.vue | 18 +- .../authorized-account-modal/style.scss | 2 +- .../reauthorize-account-modal/index.vue | 201 ++++++++++++++++++ .../reauthorize-account-modal/style.scss | 57 +++++ .../media-account/account-manage/index.vue | 2 +- 7 files changed, 288 insertions(+), 9 deletions(-) create mode 100644 src/views/property-marketing/media-account/account-manage/components/reauthorize-account-modal/index.vue create mode 100644 src/views/property-marketing/media-account/account-manage/components/reauthorize-account-modal/style.scss diff --git a/src/api/all/propertyMarketing.ts b/src/api/all/propertyMarketing.ts index 41ca7ca..bae28e9 100644 --- a/src/api/all/propertyMarketing.ts +++ b/src/api/all/propertyMarketing.ts @@ -116,3 +116,8 @@ export const pausePatchAccount = (id: string) => { export const startPatchAccount = (id: string) => { return Http.patch(`/v1/media-accounts/${id}/start`); }; + +// 媒体账号-获取授权图片 +export const getAuthorizedImage = (id: string) => { + return Http.get(`/v1/media-accounts/${id}/authorized-image`); +}; diff --git a/src/views/property-marketing/media-account/account-manage/components/account-table/index.vue b/src/views/property-marketing/media-account/account-manage/components/account-table/index.vue index a0d3d06..3530eaa 100644 --- a/src/views/property-marketing/media-account/account-manage/components/account-table/index.vue +++ b/src/views/property-marketing/media-account/account-manage/components/account-table/index.vue @@ -83,6 +83,8 @@ + + @@ -91,6 +93,8 @@ import { defineProps, ref, computed } from 'vue'; import { STATUS_LIST, EnumStatus } from '../../constants'; import PauseAccountPatchModal from './pause-account-patch'; import StatusBox from '../status-box'; +import ReauthorizeAccountModal from '../reauthorize-account-modal'; +import AuthorizedAccountModal from '../authorized-account-modal'; import icon1 from '@/assets/img/media-account/icon-dy.png'; import icon2 from '@/assets/img/media-account/icon-xhs.png'; @@ -110,6 +114,8 @@ const props = defineProps({ const emits = defineEmits(['openEdit', 'update', 'selectionChange', 'delete']); const pauseAccountPatchModalRef = ref(null); +const reauthorizeAccountModalRef = ref(null); +const authorizedAccountModalRef = ref(null); // 判断当前 item 是否被选中 const isSelected = (item) => { @@ -136,7 +142,11 @@ const openDelete = (item) => { const handleReauthorize = (item) => { const isUnauthorized = isUnauthorizedStatus(item.status); - console.log(isUnauthorized ? '去授权' : '重新授权'); + if (isUnauthorized) { + authorizedAccountModalRef.value?.open(item.id); + } else { + reauthorizeAccountModalRef.value?.open(item.id); + } }; const handlePause = (item) => { diff --git a/src/views/property-marketing/media-account/account-manage/components/authorized-account-modal/index.vue b/src/views/property-marketing/media-account/account-manage/components/authorized-account-modal/index.vue index c76a687..eaf6bd5 100644 --- a/src/views/property-marketing/media-account/account-manage/components/authorized-account-modal/index.vue +++ b/src/views/property-marketing/media-account/account-manage/components/authorized-account-modal/index.vue @@ -6,8 +6,8 @@ 未识别到有效二维码。
- +

二维码失效

@@ -56,7 +56,7 @@ + + diff --git a/src/views/property-marketing/media-account/account-manage/components/reauthorize-account-modal/style.scss b/src/views/property-marketing/media-account/account-manage/components/reauthorize-account-modal/style.scss new file mode 100644 index 0000000..40b1640 --- /dev/null +++ b/src/views/property-marketing/media-account/account-manage/components/reauthorize-account-modal/style.scss @@ -0,0 +1,57 @@ +@import '@/views/property-marketing/component.scss'; + +.reauthorize-account-modal { + border-radius: 8px; + .img-box { + position: relative; + .mask { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + opacity: 0.8; + background: #000; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + color: #fff; + .s1 { + color: var(--BG-White, #fff); + text-align: center; + font-family: 'Alibaba PuHuiTi'; + font-size: 14px; + font-style: normal; + font-weight: 400; + line-height: 22px; + } + } + } + .s2 { + color: var(--Text-1, #211f24); + font-family: 'Alibaba PuHuiTi'; + font-size: 14px; + font-style: normal; + font-weight: 400; + line-height: 22px; + } + .red-text { + overflow: hidden; + color: var(--Functional-Red-6, #f64b31); + text-overflow: ellipsis; + font-family: 'Alibaba PuHuiTi'; + font-size: 14px; + font-style: normal; + font-weight: 400; + line-height: 22px; + } + .account-tip-box { + // margin-left: 32px; + width: 100%; + padding: 8px 0px 8px 12px; + + border-radius: 4px; +background: var(--BG-200, #F2F3F5); + } +} diff --git a/src/views/property-marketing/media-account/account-manage/index.vue b/src/views/property-marketing/media-account/account-manage/index.vue index fbf32f3..f21fdbe 100644 --- a/src/views/property-marketing/media-account/account-manage/index.vue +++ b/src/views/property-marketing/media-account/account-manage/index.vue @@ -178,7 +178,7 @@ const getData = async () => { name: '全球', account_id: 1, mobile: 1777777, - status: 3, + status: 0, platform: 0, operator: { name: '小周',