@@ -987,7 +936,6 @@ import {
type GrayMemberGroup,
type GrayMode,
type GraySelectionSource,
- type PreflightSubmitResultDto,
type PublishMode,
type RnBundle,
type RnBundleInspectResult,
@@ -1555,15 +1503,9 @@ const showSubmitStore = ref(false)
const submittingToStores = ref(false)
const submitStoreVersion = ref
(null)
const selectedStores = ref([])
-const submitStoreMode = ref('MANUAL')
+const submitStoreMode = ref('AUTO_REVIEW')
const submitStoreScheduledAt = ref('')
-// Preflight dialog state
-const showPreflight = ref(false)
-const preflightLoading = ref(false)
-const preflightResult = ref(null)
-const preflightSkipCheck = ref(false)
-
const showStoreReviewDetail = ref(false)
const storeReviewDetailVersion = ref(null)
type StoreReviewItem = {
@@ -1701,32 +1643,15 @@ async function handleUpdatePublishSchedule() {
}
}
-async function openSubmitStoreDialog(row: AppVersion) {
+function openSubmitStoreDialog(row: AppVersion) {
submitStoreVersion.value = row
- preflightResult.value = null
- preflightSkipCheck.value = false
- showPreflight.value = true
- preflightLoading.value = true
- try {
- const res = await updateAdminApi.preflightStoreSubmission(row.id)
- preflightResult.value = res.data.data
- // Auto-open submit dialog if all allowed
- const allAllowed = preflightResult.value?.stores.every(s => s.canSubmit) ?? false
- if (allAllowed) {
- showPreflight.value = false
- showSubmitStore.value = true
- }
- } catch (e: any) {
- ElMessage.error(e?.response?.data?.message || '前置检查失败')
- } finally {
- preflightLoading.value = false
- }
- // Fallback: pre-select stores
selectedStores.value = enabledStores.value
.map(s => s.type)
.filter(t => !isStoreActiveReview(row, t))
- submitStoreMode.value = row.storeSubmitMode ?? 'MANUAL'
+ const savedMode = row.storeSubmitMode
+ submitStoreMode.value = (savedMode === 'SCHEDULED' ? 'SCHEDULED' : 'AUTO_REVIEW') as PublishMode
submitStoreScheduledAt.value = row.storeSubmitScheduledAt ?? ''
+ showSubmitStore.value = true
}
function getSubmitDialogStoreState(version: AppVersion | null, storeType: string): string {
@@ -2301,30 +2226,6 @@ function hasActiveStoreReview(row: AppVersion): boolean {
return items.some(i => i.state === 'SUBMITTING' || i.state === 'UNDER_REVIEW')
}
-function preflightTagType(state: string): string {
- return {
- ONLINE: 'success',
- UNDER_REVIEW: 'warning',
- UNDER_REVIEW_XIAOMI: 'warning',
- REJECTED: 'danger',
- NOT_FOUND: 'info',
- UNKNOWN: 'info',
- QUERY_FAILED: 'danger',
- }[state] ?? ''
-}
-
-function preflightStateLabel(state: string): string {
- return {
- ONLINE: '已上线',
- UNDER_REVIEW: '审核中',
- UNDER_REVIEW_XIAOMI: '审核中(版本号可能不准确)',
- REJECTED: '已拒绝',
- NOT_FOUND: '未找到',
- UNKNOWN: '未知',
- QUERY_FAILED: '查询失败',
- }[state] ?? state
-}
-
async function promptUnpublishRn(id: string) {
const reason = await promptUnpublishReason('下架确认')
if (!reason) return