From f9c716f33cd39d06117311764c1f5d52eb4ca9c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=94=B0=E5=B2=A9?= Date: Wed, 12 Nov 2025 15:09:21 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=8D=E6=96=B0=E6=B5=8B=E8=AF=95=E5=AE=8C?= =?UTF-8?q?=E6=88=90pk=E5=92=8C=E7=AB=9E=E8=B5=9B=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 2 +- .../selection-institutions/index.vue | 4 +- src/pages/competition/pk.vue | 4 +- src/pages/competition/result.vue | 39 +++++++++++++------ .../components/competitionRecordItem.vue | 5 +-- 5 files changed, 34 insertions(+), 20 deletions(-) diff --git a/.env.development b/.env.development index fb24b9b4..bdea487e 100644 --- a/.env.development +++ b/.env.development @@ -4,7 +4,7 @@ ENV = 'development' # VITE_APP_BASE_API_Url = 'https://aits.jlbank.com.cn:7001' -VITE_APP_BASE_API_Url = 'https://aitstest.jlbank.com.cn:7002' +VITE_APP_BASE_API_Url = 'https://aitstest.jlbank.com.cn:7001' # VITE_APP_BASE_API_Url = 'http://192.168.247.200' # VITE_APP_BASE_API_Url = 'http://aitscdn.jlbank.com.cn:7001' # VITE_APP_BASE_API_Url = 'http://192.168.108.129' diff --git a/src/components/selection-institutions/index.vue b/src/components/selection-institutions/index.vue index fb0ba731..77a1c5dd 100644 --- a/src/components/selection-institutions/index.vue +++ b/src/components/selection-institutions/index.vue @@ -81,7 +81,7 @@ const orgTree = ref(orgTreeInit); // 把全行信息插入 - const selectedPaths = ref([initSelect]); + const selectedPaths = ref([]); const updateSelectedPaths = (node, level) => { console.log('node', node); @@ -101,7 +101,7 @@ }; const click_button = (type) => { if (type === 'reset') { - updateSelectedPaths(initSelect, 0); + updateSelectedPaths({ orgName: '全部', orgId: 'A', parentId: '' }, 0); } else if (type === 'confirm') { emit('submit', JSON.parse(JSON.stringify(selectedPaths.value))); } else if (type === 'all') { diff --git a/src/pages/competition/pk.vue b/src/pages/competition/pk.vue index 873596c1..f0503891 100644 --- a/src/pages/competition/pk.vue +++ b/src/pages/competition/pk.vue @@ -134,7 +134,7 @@ let practiceStartTime = 0; // Pk开始时间 let practiceTimeTimer = null; // Pk计时器 let leaveStartTime = 0; // 离开开始时间 - const mode = ref('pk_in'); // PK中 pk_in + const mode = 'pk_in'; // PK中 pk_in // 计算对方分数 const opponentScore = computed(() => { @@ -262,7 +262,7 @@ common.setPageCache('competition_pk_to_resulf', pkData); nextTick(() => { common.redirectTo( - `/pages/competition/result?&execId=${pkData.execId}&orgId=${pkData.orgId}&papersId=${pkData.papersId}` + `/pages/competition/result?mode=${mode}&execId=${pkData.execId}&orgId=${pkData.orgId}&papersId=${pkData.papersId}` ); }); } else { diff --git a/src/pages/competition/result.vue b/src/pages/competition/result.vue index b289c1e6..9d8e2fa5 100644 --- a/src/pages/competition/result.vue +++ b/src/pages/competition/result.vue @@ -60,7 +60,7 @@ - {{ pkData.userNamePk }} + {{ pkData.pkIsAnony === 'N' ? pkData.userNamePk : '匿名' }} 正确/总题数 {{ pkData.correctNubPk }} @@ -83,10 +83,13 @@ 查看排行榜 - + + + + @@ -103,6 +106,7 @@ import { formatSecondsToMS } from './js/tool'; const action = ref(''); + const mode = ref(''); // 模式 PK中 pk_in, Pk列表查询 pk_result const pkData = reactive({ // 公共的 execId: '', @@ -113,7 +117,7 @@ // 自己的 userName: '', - isAnony: 'Y', // 匿名 String + isAnony: '', // 匿名 String correctNub: 0, // 正确数 int qnsNub: 0, // 总数 int timeTaken: 0, // 用时 int @@ -123,7 +127,7 @@ userIdPk: '', // 用户Id String userNamePk: '', // 用户姓名 String imgPk: '', // 对方头像 String - pkIsAnony: 'Y', // 匿名 String + pkIsAnony: '', // 匿名 String correctNubPk: 0, // 正确数 int qnsNubPk: 0, // 总数 int timeTakenPk: 0, // 用时 int @@ -137,18 +141,23 @@ common.navigateBack(); } else if (type === 'toRanking') { common.navigateTo(`/pages/competition/ranking?papersId=${pkData.papersId}&orgId=${pkData.orgId}`); - } + } + + }; onLoad((e) => { pkData.execId = e.execId || ''; pkData.papersId = e.papersId || ''; pkData.orgId = e.orgId || ''; + mode.value = e.mode || 'pk_result'; const pkDataInit = common.getPageCache('competition_pk_to_resulf'); + const userInfo = getUserInfo(); + console.log('userInfo', userInfo); Object.assign(pkData, { - userName: pkDataInit.userName, - isAnony: pkDataInit.isAnony, - pkIsAnony: pkDataInit.pkIsAnony, + userName: userInfo.userName, + isAnony: pkDataInit.isAnony ?? '', + pkIsAnony: pkDataInit.pkIsAnony ?? '', }); }); onMounted(() => { @@ -196,10 +205,12 @@ justify-content: space-around; font-size: 26rpx; .pk-msg-left-div > .avatar-div { - border: 3rpx solid #2b7af1; + // border: 3rpx solid #2b7af1; + border: 3rpx solid #fafafa; } .pk-msg-right-div > .avatar-div { - border: 3rpx solid #f63c13; + // border: 3rpx solid #f63c13; + border: 3rpx solid #fafafa; } .avatar-div { width: 78rpx; @@ -480,10 +491,14 @@ display: flex; margin-top: 50rpx; margin-bottom: 60rpx; + width: 550rpx; + justify-content: space-between; + .button-3{ + flex: 1; + } :deep(.uv-button) { /* 以下是所有 .uv-button 共用的公共样式 */ - margin: 16rpx; - width: 246rpx; + min-width: 246rpx; height: 92rpx; border-radius: 58px; font-weight: 500; diff --git a/src/pages/competitionRecord/components/competitionRecordItem.vue b/src/pages/competitionRecord/components/competitionRecordItem.vue index ba781610..a7d61f11 100644 --- a/src/pages/competitionRecord/components/competitionRecordItem.vue +++ b/src/pages/competitionRecord/components/competitionRecordItem.vue @@ -76,12 +76,11 @@ const click_list_item = (list_item) => { const pkData = { - userName: 'x', - isAnony: list_item.isAnony + isAnony: list_item.isAnony, } common.setPageCache('competition_pk_to_resulf', pkData); common.navigateTo( - `/pages/competition/result?&execId=${list_item.execId}&orgId=${list_item.orgId}&papersId=${list_item.papersId}` + `/pages/competition/result?mode=pk_result&execId=${list_item.execId}&orgId=${list_item.orgId}&papersId=${list_item.papersId}` );