重新测试完成pk和竞赛列表
This commit is contained in:
+1
-1
@@ -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'
|
||||
|
||||
@@ -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') {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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.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,10 +83,13 @@
|
||||
<view class="ranking-list-div" @click="buttonClick('toRanking')">查看排行榜</view>
|
||||
<!-- 下方的两个按钮 -->
|
||||
<view class="fl1"></view>
|
||||
<view class="bottom-button-div">
|
||||
<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'">
|
||||
<uv-button class="button-3" text="返回" shape="circle" @click="buttonClick('continue')"></uv-button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -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;
|
||||
|
||||
@@ -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}`
|
||||
);
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user