fix(mobile): unify empty/loading states on question board and points pages
This commit is contained in:
@@ -33,7 +33,7 @@
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
<text v-else class="muted empty">暂无积分明细</text>
|
||||
<StateBlock v-else type="empty" :card="false" title="暂无积分明细" />
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -43,6 +43,7 @@ import { ref } from 'vue';
|
||||
import { onShow } from '@dcloudio/uni-app';
|
||||
import type { IncentiveBalance, IncentiveLedgerItem } from '@/types/api';
|
||||
import { getMyIncentiveBalances, getMyIncentiveLedger } from '@/services/questions';
|
||||
import StateBlock from '@/components/StateBlock.vue';
|
||||
|
||||
const balances = ref<IncentiveBalance[]>([]);
|
||||
const ledger = ref<IncentiveLedgerItem[]>([]);
|
||||
|
||||
@@ -37,11 +37,8 @@
|
||||
</view>
|
||||
|
||||
<view v-if="message" class="status-message">{{ message }}</view>
|
||||
<view v-if="loading" class="panel employee-card empty">问题加载中…</view>
|
||||
<view v-else-if="!questions.length" class="panel employee-card empty">
|
||||
<text class="empty-title">当前暂无问题</text>
|
||||
<text class="muted">你可以发起第一条真实工作求助。</text>
|
||||
</view>
|
||||
<StateBlock v-if="loading" type="loading" title="问题加载中…" />
|
||||
<StateBlock v-else-if="!questions.length" type="empty" title="当前暂无问题" desc="你可以发起第一条真实工作求助。" />
|
||||
<view v-else class="question-list">
|
||||
<button v-for="item in questions" :key="item.id" class="question-card employee-card" @click="openQuestion(item.id)">
|
||||
<view class="question-meta">
|
||||
@@ -66,6 +63,7 @@ import type { QuestionBoardItem, QuestionBoardTab } from '@/types/api';
|
||||
import { isLoggedIn, rememberLoginRedirect } from '@/services/auth';
|
||||
import { listQuestions } from '@/services/questions';
|
||||
import { resetPageScroll } from '@/services/navigation';
|
||||
import StateBlock from '@/components/StateBlock.vue';
|
||||
|
||||
const path = '/pages/user/questions/index';
|
||||
const tabs: { key: QuestionBoardTab; label: string }[] = [
|
||||
|
||||
Reference in New Issue
Block a user