增加pk弹窗
This commit is contained in:
@@ -60,7 +60,7 @@
|
||||
<image-preview v-if="pkData.pkIsAnony === 'N'" class="img" :src="pkData.imgPk"></image-preview>
|
||||
<image v-else class="img" :src="defaultAnonymousAvatar" mode="aspectFill"></image>
|
||||
</view>
|
||||
<view class="name-div">{{ pkData.pkIsAnony === 'N' ? pkData.userNamePk : '匿名' }} </view>
|
||||
<view class="name-div">{{ pkData.pkIsAnony === 'N' ? pkData.userNamePk : '匿名' }}</view>
|
||||
<view class="title">正确/总题数</view>
|
||||
<view class="topic-div number">
|
||||
<text class="loadingNoText font-size-54">{{ pkData.correctNubPk }}</text>
|
||||
@@ -83,15 +83,17 @@
|
||||
<view class="ranking-list-div" @click="buttonClick('toRanking')">查看排行榜</view>
|
||||
<!-- 下方的两个按钮 -->
|
||||
<view class="fl1"></view>
|
||||
<view class="bottom-button-div" v-if="mode==='pk_in'">
|
||||
<view class="bottom-button-div" v-if="mode === 'pk_in'">
|
||||
<uv-button class="button-1" text="退出挑战" shape="circle" @click="buttonClick('exit')"></uv-button>
|
||||
<uv-button class="button-2" text="继续挑战" shape="circle" @click="buttonClick('continue')"></uv-button>
|
||||
</view>
|
||||
<view class="bottom-button-div" v-if="mode==='pk_result'">
|
||||
<view class="bottom-button-div" v-if="mode === 'pk_result'">
|
||||
<uv-button class="button-3" text="返回" shape="circle" @click="buttonClick('continue')"></uv-button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<badge ref="badgeRef"></badge>
|
||||
<points ref="pointsRef"></points>
|
||||
</view>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
@@ -104,7 +106,10 @@
|
||||
import { pkAnonymousClose, pkAnonymousOpen, pkRankingList, pkRules } from '@/common/imgSvg';
|
||||
import { queryTraUserAnonyByUserId, updateTraUserAnony } from '@/api/user';
|
||||
import { formatSecondsToMS } from './js/tool';
|
||||
|
||||
import badge from '@/components/points-and-badge/badge';
|
||||
import points from '@/components/points-and-badge/points';
|
||||
import usePointsAndBadge from '@/components/points-and-badge/usePointsAndBadge';
|
||||
const { pointAndBadgesRun, badgeRef, pointsRef } = usePointsAndBadge();
|
||||
const action = ref('');
|
||||
const mode = ref(''); // 模式 PK中 pk_in, Pk列表查询 pk_result
|
||||
const pkData = reactive({
|
||||
@@ -141,9 +146,7 @@
|
||||
common.navigateBack();
|
||||
} else if (type === 'toRanking') {
|
||||
common.navigateTo(`/pages/competition/ranking?papersId=${pkData.papersId}&orgId=${pkData.orgId}`);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
onLoad((e) => {
|
||||
@@ -157,7 +160,7 @@
|
||||
Object.assign(pkData, {
|
||||
userName: userInfo.userName,
|
||||
isAnony: pkDataInit.isAnony ?? '',
|
||||
pkIsAnony: pkDataInit.pkIsAnony ?? '',
|
||||
pkIsAnony: pkDataInit.pkIsAnony ?? ''
|
||||
});
|
||||
});
|
||||
onMounted(() => {
|
||||
@@ -187,6 +190,8 @@
|
||||
nextTick(() => {
|
||||
action.value = 'result';
|
||||
});
|
||||
console.log('调用它');
|
||||
pointAndBadgesRun('11')
|
||||
});
|
||||
}, 2000);
|
||||
});
|
||||
@@ -493,7 +498,7 @@
|
||||
margin-bottom: 60rpx;
|
||||
width: 550rpx;
|
||||
justify-content: space-between;
|
||||
.button-3{
|
||||
.button-3 {
|
||||
flex: 1;
|
||||
}
|
||||
:deep(.uv-button) {
|
||||
|
||||
Reference in New Issue
Block a user