feat(mobile): unify page states with shared StateBlock component
This commit is contained in:
@@ -101,7 +101,7 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-else class="empty">暂无入库案例</view>
|
||||
<StateBlock v-else type="empty" :card="false" title="暂无入库案例" />
|
||||
</view>
|
||||
|
||||
<view v-if="caseDetail" class="panel case-detail-panel">
|
||||
@@ -147,6 +147,7 @@ import { releaseAuthenticatedFileUrl } from '@/services/api';
|
||||
import { isLoggedIn, rememberLoginRedirect } from '@/services/auth';
|
||||
import { navigateBackToToday, resetPageScroll } from '@/services/navigation';
|
||||
import { ensureEmployeePosition } from '@/services/position';
|
||||
import StateBlock from '@/components/StateBlock.vue';
|
||||
|
||||
const loggedIn = ref(false);
|
||||
const selectedFile = ref<CaseSelectedFile | null>(null);
|
||||
|
||||
@@ -71,10 +71,13 @@
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<view v-else-if="loggedIn && !loading" class="panel empty-panel">
|
||||
<text class="empty">{{ message || '训练记录不存在或不属于当前账号' }}</text>
|
||||
<button class="secondary-button" @click="goBack">返回我的页面</button>
|
||||
</view>
|
||||
<StateBlock
|
||||
v-else-if="loggedIn && !loading"
|
||||
type="empty"
|
||||
:title="message || '训练记录不存在或不属于当前账号'"
|
||||
action-text="返回我的页面"
|
||||
@action="goBack"
|
||||
/>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -86,6 +89,7 @@ import { authenticatedFileUrl, releaseAuthenticatedFileUrl } from '@/services/ap
|
||||
import { isLoggedIn, rememberLoginRedirect } from '@/services/auth';
|
||||
import { getPracticeHistoryDetail } from '@/services/practice';
|
||||
import { resetPageScroll } from '@/services/navigation';
|
||||
import StateBlock from '@/components/StateBlock.vue';
|
||||
|
||||
const detail = ref<ReviewDetail | null>(null);
|
||||
const reviewId = ref(0);
|
||||
@@ -335,13 +339,11 @@ onUnload(releaseAudio);
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.login-panel,
|
||||
.empty-panel {
|
||||
.login-panel {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.login-button,
|
||||
.empty-panel button {
|
||||
.login-button {
|
||||
margin-top: 14px;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user