完善活动运营域与联调标准化
This commit is contained in:
@@ -19,6 +19,12 @@ type EventPreparePageData = {
|
||||
assignmentMode: string
|
||||
variantModeText: string
|
||||
variantSummaryText: string
|
||||
presentationText: string
|
||||
contentBundleText: string
|
||||
runtimePlaceText: string
|
||||
runtimeMapText: string
|
||||
runtimeVariantText: string
|
||||
runtimeRouteCodeText: string
|
||||
selectedVariantId: string
|
||||
selectedVariantText: string
|
||||
selectableVariants: Array<{
|
||||
@@ -85,6 +91,24 @@ function formatVariantSummary(result: BackendEventPlayResult): string {
|
||||
return preview
|
||||
}
|
||||
|
||||
function formatPresentationSummary(result: BackendEventPlayResult): string {
|
||||
const currentPresentation = result.currentPresentation
|
||||
if (!currentPresentation) {
|
||||
return '当前未声明展示版本'
|
||||
}
|
||||
|
||||
return `${currentPresentation.presentationId || '--'} / ${currentPresentation.templateKey || '--'} / ${currentPresentation.version || '--'}`
|
||||
}
|
||||
|
||||
function formatContentBundleSummary(result: BackendEventPlayResult): string {
|
||||
const currentContentBundle = result.currentContentBundle
|
||||
if (!currentContentBundle) {
|
||||
return '当前未声明内容包版本'
|
||||
}
|
||||
|
||||
return `${currentContentBundle.bundleId || '--'} / ${currentContentBundle.bundleType || '--'} / ${currentContentBundle.version || '--'}`
|
||||
}
|
||||
|
||||
function resolveSelectedVariantId(
|
||||
currentVariantId: string,
|
||||
assignmentMode?: string | null,
|
||||
@@ -184,6 +208,12 @@ Page({
|
||||
assignmentMode: '',
|
||||
variantModeText: '--',
|
||||
variantSummaryText: '--',
|
||||
presentationText: '--',
|
||||
contentBundleText: '--',
|
||||
runtimePlaceText: '待 launch 确认',
|
||||
runtimeMapText: '待 launch 确认',
|
||||
runtimeVariantText: '待 launch 确认',
|
||||
runtimeRouteCodeText: '待 launch 确认',
|
||||
selectedVariantId: '',
|
||||
selectedVariantText: '当前无需手动指定赛道',
|
||||
selectableVariants: [],
|
||||
@@ -277,6 +307,20 @@ Page({
|
||||
assignmentMode: result.play.assignmentMode || '',
|
||||
variantModeText: formatAssignmentMode(result.play.assignmentMode),
|
||||
variantSummaryText: formatVariantSummary(result),
|
||||
presentationText: formatPresentationSummary(result),
|
||||
contentBundleText: formatContentBundleSummary(result),
|
||||
runtimePlaceText: '待 launch.runtime 确认',
|
||||
runtimeMapText: '待 launch.runtime 确认',
|
||||
runtimeVariantText: selectedVariant
|
||||
? selectedVariant.name
|
||||
: (result.play.courseVariants && result.play.courseVariants[0]
|
||||
? result.play.courseVariants[0].name
|
||||
: '待 launch 确认'),
|
||||
runtimeRouteCodeText: selectedVariant
|
||||
? selectedVariant.routeCodeText
|
||||
: (result.play.courseVariants && result.play.courseVariants[0] && result.play.courseVariants[0].routeCode
|
||||
? result.play.courseVariants[0].routeCode || '待 launch 确认'
|
||||
: '待 launch 确认'),
|
||||
selectedVariantId,
|
||||
selectedVariantText: selectedVariant
|
||||
? `${selectedVariant.name} / ${selectedVariant.routeCodeText}`
|
||||
@@ -512,6 +556,8 @@ Page({
|
||||
selectedVariantText: selectedVariant
|
||||
? `${selectedVariant.name} / ${selectedVariant.routeCodeText}`
|
||||
: '当前无需手动指定赛道',
|
||||
runtimeVariantText: selectedVariant ? selectedVariant.name : '待 launch 确认',
|
||||
runtimeRouteCodeText: selectedVariant ? selectedVariant.routeCodeText : '待 launch 确认',
|
||||
selectableVariants,
|
||||
})
|
||||
},
|
||||
|
||||
@@ -16,6 +16,40 @@
|
||||
<view class="summary">当前选择:{{selectedVariantText}}</view>
|
||||
</view>
|
||||
|
||||
<view class="panel">
|
||||
<view class="panel__title">活动运营摘要</view>
|
||||
<view class="summary">当前阶段先展示活动运营对象摘要,不展开复杂 schema。</view>
|
||||
<view class="row">
|
||||
<view class="row__label">展示版本</view>
|
||||
<view class="row__value">{{presentationText}}</view>
|
||||
</view>
|
||||
<view class="row">
|
||||
<view class="row__label">内容包版本</view>
|
||||
<view class="row__value">{{contentBundleText}}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="panel">
|
||||
<view class="panel__title">运行对象摘要</view>
|
||||
<view class="summary">当前阶段以前端已知信息预览,最终绑定以后端 `launch.runtime` 为准。</view>
|
||||
<view class="row">
|
||||
<view class="row__label">地点</view>
|
||||
<view class="row__value">{{runtimePlaceText}}</view>
|
||||
</view>
|
||||
<view class="row">
|
||||
<view class="row__label">地图</view>
|
||||
<view class="row__value">{{runtimeMapText}}</view>
|
||||
</view>
|
||||
<view class="row">
|
||||
<view class="row__label">赛道</view>
|
||||
<view class="row__value">{{runtimeVariantText}}</view>
|
||||
</view>
|
||||
<view class="row">
|
||||
<view class="row__label">RouteCode</view>
|
||||
<view class="row__value">{{runtimeRouteCodeText}}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="panel" wx:if="{{assignmentMode === 'manual' && selectableVariants.length}}">
|
||||
<view class="panel__title">赛道选择</view>
|
||||
<view class="summary">当前活动要求手动指定赛道。这里的选择会随 launch 一起带给后端,最终绑定以后端返回为准。</view>
|
||||
|
||||
Reference in New Issue
Block a user