feat(seller): 微信区上号方式与账号密码互斥,自动固定为扫码
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -38,7 +38,8 @@ const {
|
||||
rankOptions,
|
||||
insuranceOptions,
|
||||
levelOptions,
|
||||
loginMethodOptions,
|
||||
effectiveLoginMethodOptions,
|
||||
isScanOnlyServer,
|
||||
regionOptions,
|
||||
banRecordOptions,
|
||||
skinGroups,
|
||||
@@ -383,7 +384,7 @@ const screenshotGuides: Record<string, string> = {
|
||||
<template #input>
|
||||
<div class="radio-group">
|
||||
<button
|
||||
v-for="opt in loginMethodOptions"
|
||||
v-for="opt in effectiveLoginMethodOptions"
|
||||
:key="opt"
|
||||
type="button"
|
||||
class="radio-btn"
|
||||
@@ -396,7 +397,11 @@ const screenshotGuides: Record<string, string> = {
|
||||
</template>
|
||||
</van-field>
|
||||
<p class="field-hint">
|
||||
优先推荐【账密登录】,出售速度约为扫码的数倍,两种方式安全性一致,账密登录更便捷,请自行衡量
|
||||
{{
|
||||
isScanOnlyServer
|
||||
? '微信账号仅支持扫码登录,上号方式固定为扫码。'
|
||||
: '优先推荐【账密登录】,出售速度约为扫码的数倍,两种方式安全性一致,账密登录更便捷,请自行衡量'
|
||||
}}
|
||||
</p>
|
||||
|
||||
<van-field label="解锁赛伊德" required class="publish-field">
|
||||
|
||||
@@ -43,7 +43,8 @@ const {
|
||||
rankOptions,
|
||||
insuranceOptions,
|
||||
levelOptions,
|
||||
loginMethodOptions,
|
||||
effectiveLoginMethodOptions,
|
||||
isScanOnlyServer,
|
||||
regionOptions,
|
||||
banRecordOptions,
|
||||
skinGroups,
|
||||
@@ -322,12 +323,16 @@ function selectDailyLoss(value: string | number) {
|
||||
<div class="field-row login-method-row">
|
||||
<label>上号方式</label>
|
||||
<OptionChips
|
||||
:options="loginMethodOptions"
|
||||
:options="effectiveLoginMethodOptions"
|
||||
:model-value="form.login_method"
|
||||
@select="form.login_method = String($event)"
|
||||
/>
|
||||
<p class="field-hint">
|
||||
优先推荐账密登录,出售速度通常更快;请结合账号安全情况自行选择。
|
||||
{{
|
||||
isScanOnlyServer
|
||||
? '微信账号仅支持扫码登录,上号方式固定为扫码。'
|
||||
: '优先推荐账密登录,出售速度通常更快;请结合账号安全情况自行选择。'
|
||||
}}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user