Merge branch 'develop' of http://25.13.9.101:9000/K17_AITS/tra-app into develop
This commit is contained in:
+3
-3
@@ -6,7 +6,7 @@ ENV = 'development'
|
||||
# VITE_APP_BASE_API_Url = 'http://25.18.122.78:9786'
|
||||
|
||||
# DEV
|
||||
VITE_APP_BASE_API_Url = 'https://aitstest.jlbank.com.cn:7002'
|
||||
VITE_APP_BASE_API_Url = 'https://aitstest.jlbank.com.cn:7001'
|
||||
|
||||
# app入口
|
||||
#VITE_APP_BASE_API_Url = 'http://25.16.122.65:7001'
|
||||
@@ -16,7 +16,7 @@ VITE_APP_BASE_API_Url = 'https://aitstest.jlbank.com.cn:7002'
|
||||
# h5专用地址
|
||||
|
||||
|
||||
# VITE_APP_BASE_H5_API_Url = 'https://aitstest.jlbank.com.cn:7001'
|
||||
VITE_APP_BASE_H5_API_Url = 'https://aitstest.jlbank.com.cn:7001'
|
||||
# VITE_APP_BASE_H5_API_Url = 'https://aitstest.jlbank.com.cn:7002'
|
||||
|
||||
# dev
|
||||
@@ -31,7 +31,7 @@ VITE_APP_BASE_H5_API_Url = 'http://25.18.122.91:9786'
|
||||
# VITE_APP_BASE_H5_API_Url_TRAAPP = 'http://25.64.16.130:9601'
|
||||
# VITE_APP_BASE_H5_API_Url_TRASTUDY = 'http://25.64.16.130:9602'
|
||||
|
||||
# VITE_APP_BASE_H5_API_Url_TRAEXAM = 'http://25.64.16.130:9604'
|
||||
# VITE_APP_BASE_H5_API_Url_TRAEXAM = 'http://25.64.16.140:9604'
|
||||
# 张建成
|
||||
# VITE_APP_BASE_H5_API_Url_TRAASK = 'http://25.64.16.144:9605'
|
||||
# VITE_APP_BASE_H5_API_Url_TRASTUDY = 'http://25.64.16.144:9602'
|
||||
|
||||
@@ -22,9 +22,9 @@ export const queryAllTraTaskCrsInfo = (data) => {
|
||||
|
||||
|
||||
// 根据任务id查询这一条
|
||||
export const queryAllTraTaskIUserId = (data) => {
|
||||
export const queryTraTaskInfoByTaskId = (data) => {
|
||||
return request({
|
||||
url: base_url + '/traTaskInfo/queryAllTraTaskIUserId',
|
||||
url: base_url + '/traTaskInfo/queryTraTaskInfoByTaskId',
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
|
||||
@@ -100,7 +100,6 @@ export default function request({
|
||||
return resolve(res)
|
||||
} else if (res?.rtnCode === '0001') { // 为前后端约定不公共拦截的码值(王洋洋20250830定)
|
||||
return reject(res)
|
||||
|
||||
} else if (res?.rtnCode === '0002' && res?.message) {
|
||||
if (toastErrors) {
|
||||
common.msg(res.message)
|
||||
|
||||
@@ -99,7 +99,7 @@
|
||||
const click_list_item = (list_item) => {
|
||||
const papersName = item.value.examName;
|
||||
common.navigateTo(
|
||||
`/pages/examination/result?execId=${list_item.execId}&papersName=${papersName}&mode=record`
|
||||
`/pages/examination/result?execId=${list_item.execId}&papersName=${papersName}&mode=record&flagQuery=Y&flagQueryDetail=Y`
|
||||
);
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -469,6 +469,8 @@
|
||||
});
|
||||
}
|
||||
func.then((res) => {
|
||||
// 考试完成事件
|
||||
uni.$emit('exam_completed')
|
||||
// 判断是否需要查分
|
||||
const flagQueryDetail = res.body.flagQueryDetail === '' ? res.body.flagQuery : res.body.flagQueryDetail;
|
||||
common.redirectTo(
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
<nav-bar :is_seat="true"></nav-bar>
|
||||
<view class="nav-div">
|
||||
<view class="title ellipsis-text">考试结算</view>
|
||||
<view class="back_div" @click="common.navigateBack()">
|
||||
|
||||
<view class="back_div" @click="goto_back()">
|
||||
<view class="back-icon"></view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -218,7 +219,11 @@
|
||||
common.navigateTo('/pages/examRanking/index?papersId=' + result.papersId);
|
||||
}
|
||||
};
|
||||
const goto_back = () => {
|
||||
common.navigateBack()
|
||||
};
|
||||
|
||||
|
||||
const getStatusClass = (index) => {
|
||||
const remainder = index % 3;
|
||||
if (remainder === 0) return 'in_progress';
|
||||
@@ -277,6 +282,8 @@
|
||||
result.examLenTm = body.examLenTm;
|
||||
}
|
||||
topicList.push(...body.qnsInfoVo);
|
||||
|
||||
// 触发考试完成事件
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
|
||||
@@ -117,16 +117,23 @@
|
||||
|
||||
// 跳转到详情
|
||||
const click_item = (item) => {
|
||||
if (item.isTimeOut === '00') {
|
||||
common.msg('任务已结束');
|
||||
return;
|
||||
if(item.limitTyp === '02') {
|
||||
if(item.isTimeOut === '01') {
|
||||
return common.msg('任务未开始');
|
||||
} else if(item.isTimeOut === '02') {
|
||||
return common.msg('任务已结束');
|
||||
}
|
||||
}
|
||||
setPageCache('learning_tasks_details', item);
|
||||
common.navigateTo(`/pages/learningTasks/details?collectId=${item.collectionId}`);
|
||||
};
|
||||
const getStatusClass = (isFinish) => {
|
||||
// 01进行中、02已完成、03已超时
|
||||
// if (isFinish === '00') return 'in_progress';
|
||||
// if (isFinish === '01') return 'completed';
|
||||
// return 'expired';
|
||||
if (isFinish === '02') return 'completed';
|
||||
return 'in_progress';
|
||||
return 'expired';
|
||||
};
|
||||
const scrolltolower = (item) => {
|
||||
getData();
|
||||
|
||||
@@ -38,22 +38,19 @@
|
||||
const emit = defineEmits(['click_item']);
|
||||
const item = computed(() => props.item);
|
||||
const getStatusClass = (isFinish) => {
|
||||
// 00进行中、01已完成、02已超时
|
||||
// 01进行中、02已完成、03已超时
|
||||
// if (isFinish === '00') return 'in_progress';
|
||||
// if (isFinish === '01') return 'completed';
|
||||
// return 'expired';
|
||||
if (isFinish === '02') return 'completed';
|
||||
return 'in_progress';
|
||||
return 'expired';
|
||||
};
|
||||
// 跳转到详情
|
||||
const click_item = (item) => {
|
||||
if(item.limitTyp === '02') {
|
||||
const startTm = new Date(item.startTm).getTime();
|
||||
const endTm = new Date(item.endTm).getTime();
|
||||
const currentTimestamp = Date.now();
|
||||
if(currentTimestamp < startTm) {
|
||||
if(item.isTimeOut === '01') {
|
||||
return common.msg('任务未开始');
|
||||
} else if(currentTimestamp > endTm) {
|
||||
} else if(item.isTimeOut === '02') {
|
||||
return common.msg('任务已结束');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<view class="scroll_div">
|
||||
<scroll-view scroll-y="true" class="scroll-Y" @scrolltolower="scrolltolower" :show-scrollbar="false">
|
||||
<itemVue :item="item" v-for="(item, index) in data_list"></itemVue>
|
||||
<itemVue :item="item" v-for="(item, index) in data_list"></itemVue>
|
||||
<list-no-data v-if="total === 0 && status == 'nomore'">暂无学习任务</list-no-data>
|
||||
<uv-load-more v-if="total !== 0" :status="status" loadmore-text="轻轻上拉加载" :height="30"></uv-load-more>
|
||||
</scroll-view>
|
||||
@@ -23,7 +23,7 @@
|
||||
required: true
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
const getData = (from = '', searchText = '') => {
|
||||
if (from == 'first') {
|
||||
if (total.value !== -1) {
|
||||
@@ -58,7 +58,7 @@
|
||||
});
|
||||
}, 200);
|
||||
};
|
||||
|
||||
|
||||
const scrolltolower = (item) => {
|
||||
getData();
|
||||
};
|
||||
@@ -67,9 +67,19 @@
|
||||
console.log('value', value);
|
||||
getData('first', value);
|
||||
};
|
||||
const updateData = (item) => {
|
||||
const index = data_list.findIndex((res) => res.taskId === item.taskId);
|
||||
|
||||
console.log('updateData', index, item);
|
||||
if (index !== -1) {
|
||||
data_list[index] = item;
|
||||
}
|
||||
};
|
||||
|
||||
defineExpose({
|
||||
getData,
|
||||
search
|
||||
search,
|
||||
updateData
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -78,7 +88,7 @@
|
||||
background-color: #f1f5fa;
|
||||
padding: 22rpx;
|
||||
}
|
||||
|
||||
|
||||
.scroll-Y {
|
||||
height: calc(100vh - var(--status-bar-height) - 88rpx - 80rpx - 88rpx - 20rpx - 30rpx);
|
||||
background-color: #fff;
|
||||
|
||||
@@ -128,7 +128,7 @@
|
||||
<script setup>
|
||||
import { onLoad, onUnload } from '@dcloudio/uni-app';
|
||||
import { ref, reactive, computed, nextTick } from 'vue';
|
||||
import { queryAllTraTaskCrsInfo } from '@/api/learningTasks.js';
|
||||
import { queryAllTraTaskCrsInfo, queryTraTaskInfoByTaskId } from '@/api/learningTasks.js';
|
||||
import { passTheExamIcon, completeTheExercisesIcon, lockIcon } from '@/common/imgSvg';
|
||||
import { insertTraPersonalCollectionTask, deleteTraPersonalCollectionById } from '@/api/favorites.js';
|
||||
import common from '@/common/common';
|
||||
@@ -159,6 +159,7 @@
|
||||
taskId: detailData.taskId
|
||||
})
|
||||
.then((res) => {
|
||||
data_list.length = 0
|
||||
data_list.push(...res.body);
|
||||
})
|
||||
.finally(() => {
|
||||
@@ -211,13 +212,28 @@
|
||||
getData();
|
||||
// 监听里面学习完成后更新任务历程
|
||||
uni.$on('refresh_course_list', () => {
|
||||
// 继续出去更新列表
|
||||
console.log('详情监听里面学习完成后更新任务历程');
|
||||
queryTraTaskInfoByTaskId({taskId:detailData.taskId}).then(({body}) => {
|
||||
uni.$emit('refresh_tasks_list', body)
|
||||
|
||||
})
|
||||
getData();
|
||||
});
|
||||
// 监听考试完成事件
|
||||
uni.$on('exam_completed', () => {
|
||||
// 继续出去更新列表
|
||||
console.log('详情监听里面学习完成后更新任务历程');
|
||||
queryTraTaskInfoByTaskId({taskId:detailData.taskId}).then(({body}) => {
|
||||
uni.$emit('refresh_tasks_list', body)
|
||||
})
|
||||
getData();
|
||||
});
|
||||
|
||||
});
|
||||
onUnload(() => {
|
||||
uni.$off('refresh_course_list');
|
||||
uni.$off('exam_completed');
|
||||
if (detailData.collectionId !== collectId.value) {
|
||||
const pages = getCurrentPages();
|
||||
if (pages.length >= 2) {
|
||||
|
||||
@@ -85,18 +85,16 @@
|
||||
});
|
||||
|
||||
onLoad(() => {
|
||||
uni.$on('refresh_course_list', (crsId) => {
|
||||
console.log('列表监听里面学习完成后更新任务历程', crsId);
|
||||
queryAllTraTaskIUserId({crsId}).then(res => {
|
||||
const index = listItemRefs
|
||||
typeof listItemRefs.value[newValue]?.getData === 'function' &&
|
||||
listItemRefs.value[newValue]?.getData('first');
|
||||
})
|
||||
|
||||
uni.$on('refresh_tasks_list', (res) => {
|
||||
console.log('列表监听里面学习完成后更新任务历程', res);
|
||||
if(typeof listItemRefs.value[tabAct.value]?.updateData === 'function') {
|
||||
listItemRefs.value[tabAct.value]?.updateData(res);
|
||||
}
|
||||
|
||||
});
|
||||
});
|
||||
onUnload(() => {
|
||||
uni.$off('refresh_course_list');
|
||||
uni.$off('refresh_tasks_list');
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
+42
-23
@@ -6,8 +6,7 @@
|
||||
<image src="/static/images/login/profile.png" class="profile"></image>
|
||||
</view>
|
||||
<view class="title_logo">
|
||||
<image src="/static/images/login/logo_text.png" mode="heightFix" class="log_img" @click="goTest">
|
||||
</image>
|
||||
<image src="/static/images/login/logo_text.png" mode="heightFix" class="log_img" @click="goTest"></image>
|
||||
<view class="fl1"></view>
|
||||
</view>
|
||||
<view class="title_text_div">
|
||||
@@ -18,11 +17,23 @@
|
||||
</view>
|
||||
<view class="account_password_div">
|
||||
<view class="title1 font_pf">账号</view>
|
||||
<uv-input class="account_input" v-model="account" :adjustPosition="false" :maxlength="30"
|
||||
placeholder="请输入账号"></uv-input>
|
||||
<uv-input
|
||||
class="account_input"
|
||||
v-model="account"
|
||||
:adjustPosition="false"
|
||||
:maxlength="30"
|
||||
placeholder="请输入账号"
|
||||
></uv-input>
|
||||
<view class="title2 font_pf">密码</view>
|
||||
<uv-input class="account_input" v-model="password" :adjustPosition="false" :maxlength="20"
|
||||
placeholder="请输入密码" :type="show_password ? 'text' : 'password'" :password-icon="true">
|
||||
<uv-input
|
||||
class="account_input"
|
||||
v-model="password"
|
||||
:adjustPosition="false"
|
||||
:maxlength="20"
|
||||
placeholder="请输入密码"
|
||||
:type="show_password ? 'text' : 'password'"
|
||||
:password-icon="true"
|
||||
>
|
||||
<template v-slot:suffix>
|
||||
<view class="show_password" @click="show_password = !show_password">
|
||||
<image v-if="show_password" class="img_100" src="@/static/images/login/show.png"></image>
|
||||
@@ -34,8 +45,9 @@
|
||||
<view class="fl1"></view>
|
||||
<view class="bottom_login_div">
|
||||
<view class="" @click="login_fun">
|
||||
<uv-button class="bottom_login_button" type="primary" :throttleTime="500"
|
||||
:disabled="login_button_status">登录</uv-button>
|
||||
<uv-button class="bottom_login_button" type="primary" :throttleTime="500" :disabled="login_button_status">
|
||||
登录
|
||||
</uv-button>
|
||||
</view>
|
||||
<view class="ysxy_div">
|
||||
<uv-checkbox-group v-model="read_text_state">
|
||||
@@ -64,7 +76,7 @@
|
||||
|
||||
import { useSocketStore } from '@/store/socket.js';
|
||||
import { storeToRefs } from 'pinia';
|
||||
import { getPhoneEnvBool } from '@/common/common.js'
|
||||
import { getPhoneEnvBool } from '@/common/common.js';
|
||||
// interface PageVueInstance {
|
||||
// refreshData?: () => Promise<void> | void;
|
||||
// }
|
||||
@@ -103,7 +115,7 @@
|
||||
}
|
||||
};
|
||||
// 登录方法
|
||||
const login_fun = () : void => {
|
||||
const login_fun = (): void => {
|
||||
// 验证
|
||||
if (login_button_status.value) return common.msg('请阅读并同意《隐私政策》');
|
||||
if (account.value === '') return common.msg('账号不能为空');
|
||||
@@ -120,26 +132,33 @@
|
||||
account: account.value,
|
||||
password: password.value
|
||||
});
|
||||
if (res['mascotState']) { // 判断是否跳转到选科技鹿页面
|
||||
if (res['mascotState']) {
|
||||
// 判断是否跳转到选科技鹿页面
|
||||
common.redirectTo('/pages/mascot/mascot_select_list');
|
||||
} else if (fromPagePath.value !== '') {
|
||||
common.redirectTo('/' + fromPagePath.value);
|
||||
} else {
|
||||
common.setValue('mascotState', false) // 清空科技鹿设置
|
||||
common.setValue('mascotState', false); // 清空科技鹿设置
|
||||
common.msg('登录成功');
|
||||
back_state.value = false;
|
||||
const pages = getCurrentPages();
|
||||
if (pages.length <= 1) { // 页面栈小于等于1,里面还有本身的login,说明就只有login页
|
||||
if (pages.length <= 1) {
|
||||
// 页面栈小于等于1,里面还有本身的login,说明就只有login页
|
||||
common.navigateTo('/pages/index/dialog', { animationType: 'slide-in-bottom' });
|
||||
return;
|
||||
}
|
||||
const prevPage = pages[pages.length - 2];
|
||||
if (prevPage.route === 'pages/index/dialog') { // 弹出页面特殊处理
|
||||
common.navigateBack(1, () => {
|
||||
if (prevPage.$vm && typeof prevPage.$vm.$?.exposed?.refreshData === 'function') {
|
||||
prevPage.$vm.$?.exposed?.refreshData();
|
||||
}
|
||||
}, { animationType: 'slide-in-bottom' });
|
||||
if (prevPage.route === 'pages/index/dialog') {
|
||||
// 弹出页面特殊处理
|
||||
common.navigateBack(
|
||||
1,
|
||||
() => {
|
||||
if (prevPage.$vm && typeof prevPage.$vm.$?.exposed?.refreshData === 'function') {
|
||||
prevPage.$vm.$?.exposed?.refreshData();
|
||||
}
|
||||
},
|
||||
{ animationType: 'slide-in-bottom' }
|
||||
);
|
||||
} else {
|
||||
common.navigateBack(1, () => {
|
||||
if (prevPage.$vm && typeof prevPage.$vm.$?.exposed?.refreshData === 'function') {
|
||||
@@ -148,7 +167,8 @@
|
||||
});
|
||||
}
|
||||
}
|
||||
}).catch((res) => {
|
||||
})
|
||||
.catch((res) => {
|
||||
console.log(res);
|
||||
common.hideLoading();
|
||||
if (res.rtnCode === '0002') {
|
||||
@@ -164,7 +184,7 @@
|
||||
|
||||
onLoad(() => {
|
||||
// fromPagePath.value = e?.path || ''
|
||||
})
|
||||
});
|
||||
onMounted(() => {
|
||||
let loginAccountData = common.getValue('loginAccountData');
|
||||
if (loginAccountData) {
|
||||
@@ -172,7 +192,6 @@
|
||||
password.value = loginAccountData.password;
|
||||
}
|
||||
back_state.value = true;
|
||||
|
||||
});
|
||||
// 跳进了登录页,禁止返回操作
|
||||
onBackPress(() => back_state.value);
|
||||
@@ -321,4 +340,4 @@
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -92,7 +92,7 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="scroll-view-item">
|
||||
<view class="item">
|
||||
<view class="item" @click="common.navigateTo('/pages/test/index')">
|
||||
<image class="icon" src="@/static/images/me/examination.png"></image>
|
||||
<view class="title">竞赛记录</view>
|
||||
</view>
|
||||
|
||||
@@ -202,6 +202,7 @@
|
||||
exrId: paperData.exrId,
|
||||
ossKey: '',
|
||||
qnsId: topic.value.qnsId,
|
||||
showOrder: questionNumber.value + 1,
|
||||
examLenTm: practiceTime.value, // 练习时长
|
||||
...answer
|
||||
})
|
||||
|
||||
@@ -90,7 +90,6 @@
|
||||
import { commonUploadVoiceFile } from '@/api/common.js';
|
||||
import { practiceExitIcon } from '@/common/imgSvg';
|
||||
import { practiceCommit, queryCrsPracticeAnswerResult } from '@/api/practice.js';
|
||||
|
||||
import { queryMistakesAnswerByMisId, mistakesCorrect } from '@/api/wrongQuestionRecord.js';
|
||||
const feedbackRef = ref(null);
|
||||
const dialogRef = ref(null);
|
||||
@@ -181,7 +180,7 @@
|
||||
topic.value.es_status = ''; // 取消转圈
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
// 单题回答
|
||||
const submitProblem = (answer) => {
|
||||
console.log('答题内容', answer);
|
||||
@@ -208,7 +207,6 @@
|
||||
traQnsInfoVo = res.body;
|
||||
}
|
||||
topic.value.isPreview = true; // 不能在点击了,打开预览模式
|
||||
console.log('给出来的traQnsInfoVo', traQnsInfoVo);
|
||||
common.hideLoading();
|
||||
topic.value.clearResult = false; // 不清除正确答案
|
||||
topic.value.analyContent = traQnsInfoVo.analyContent; // 答案解析
|
||||
@@ -406,12 +404,11 @@
|
||||
setupKeyboardHeightListener((height) => {
|
||||
popup_input_bottom.value = `${height}px`;
|
||||
});
|
||||
|
||||
|
||||
setTimeout(() => {
|
||||
addRequestProblem(0, () => {
|
||||
addProblem(0);
|
||||
});
|
||||
// addProblem(0, true);
|
||||
}, 10);
|
||||
});
|
||||
|
||||
@@ -425,9 +422,6 @@
|
||||
} else if (key === 'exit') {
|
||||
// 中途退出
|
||||
dialogRef.value.close();
|
||||
common.loading();
|
||||
await practiceCommit({ exrId: paperData.exrId, stat: 'U' });
|
||||
common.hideLoading();
|
||||
await nextTick();
|
||||
common.navigateBack();
|
||||
} else if (key === 'revert') {
|
||||
|
||||
Reference in New Issue
Block a user