From aef36dc4f5f2c8fcdc67607206c7392c49ffcc77 Mon Sep 17 00:00:00 2001 From: yml2213 Date: Sat, 15 Aug 2026 10:47:06 +0800 Subject: [PATCH] =?UTF-8?q?feat(seller):=20=E5=BE=AE=E4=BF=A1=E5=8C=BA?= =?UTF-8?q?=E4=B8=8A=E5=8F=B7=E6=96=B9=E5=BC=8F=E4=B8=8E=E8=B4=A6=E5=8F=B7?= =?UTF-8?q?=E5=AF=86=E7=A0=81=E4=BA=92=E6=96=A5=EF=BC=8C=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E5=9B=BA=E5=AE=9A=E4=B8=BA=E6=89=AB=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../seller/composables/usePublishForm.ts | 25 +++++++++++++++++++ .../views/MobileSellerListingCreateView.vue | 11 +++++--- .../seller/views/SellerListingCreateView.vue | 11 +++++--- 3 files changed, 41 insertions(+), 6 deletions(-) diff --git a/frontend/src/features/seller/composables/usePublishForm.ts b/frontend/src/features/seller/composables/usePublishForm.ts index 335f74f..eb858ae 100644 --- a/frontend/src/features/seller/composables/usePublishForm.ts +++ b/frontend/src/features/seller/composables/usePublishForm.ts @@ -89,6 +89,29 @@ export function usePublishForm(options: UsePublishFormOptions) { screenshotFiles, selectedSkins, }) + + // ========== 上号方式互斥 ========== + // 微信区账号只能扫码登录:选择微信区后,「账号密码」不可选,默认固定为「扫码」。 + const scanOnlyServers = ['微信'] + const scanLoginMethod = '扫码' + const passwordLoginMethod = '账号密码' + + const isScanOnlyServer = computed(() => scanOnlyServers.includes(form.server_region)) + + const effectiveLoginMethodOptions = computed(() => { + if (!isScanOnlyServer.value) return pricing.loginMethodOptions.value + return pricing.loginMethodOptions.value.filter(option => option !== passwordLoginMethod) + }) + + watch( + () => form.server_region, + server => { + if (!scanOnlyServers.includes(server)) return + if (form.login_method !== scanLoginMethod) { + form.login_method = scanLoginMethod + } + } + ) const uploadedScreenshotCount = computed( () => pricing.screenshotSlots.value.filter(item => getScreenshotCount(item.key) > 0).length ) @@ -885,6 +908,8 @@ export function usePublishForm(options: UsePublishFormOptions) { passwordAndDeviceConfirmed, canPublishAfterAgreements, showBanRecordRiskHint, + isScanOnlyServer, + effectiveLoginMethodOptions, fileInput, activeUploadKey, form, diff --git a/frontend/src/features/seller/views/MobileSellerListingCreateView.vue b/frontend/src/features/seller/views/MobileSellerListingCreateView.vue index 9354fa9..5374001 100644 --- a/frontend/src/features/seller/views/MobileSellerListingCreateView.vue +++ b/frontend/src/features/seller/views/MobileSellerListingCreateView.vue @@ -38,7 +38,8 @@ const { rankOptions, insuranceOptions, levelOptions, - loginMethodOptions, + effectiveLoginMethodOptions, + isScanOnlyServer, regionOptions, banRecordOptions, skinGroups, @@ -383,7 +384,7 @@ const screenshotGuides: Record = {

- 优先推荐【账密登录】,出售速度约为扫码的数倍,两种方式安全性一致,账密登录更便捷,请自行衡量 + {{ + isScanOnlyServer + ? '微信账号仅支持扫码登录,上号方式固定为扫码。' + : '优先推荐【账密登录】,出售速度约为扫码的数倍,两种方式安全性一致,账密登录更便捷,请自行衡量' + }}

diff --git a/frontend/src/features/seller/views/SellerListingCreateView.vue b/frontend/src/features/seller/views/SellerListingCreateView.vue index 8ea7e7a..e99b299 100644 --- a/frontend/src/features/seller/views/SellerListingCreateView.vue +++ b/frontend/src/features/seller/views/SellerListingCreateView.vue @@ -43,7 +43,8 @@ const { rankOptions, insuranceOptions, levelOptions, - loginMethodOptions, + effectiveLoginMethodOptions, + isScanOnlyServer, regionOptions, banRecordOptions, skinGroups, @@ -322,12 +323,16 @@ function selectDailyLoss(value: string | number) {