diff --git a/.env.development b/.env.development
index 8d53a6b2..781bd773 100644
--- a/.env.development
+++ b/.env.development
@@ -6,25 +6,29 @@ 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:7002'
+#VITE_APP_BASE_API_Url = 'http://25.16.122.65:7001'
#VITE_APP_BASE_API_Url = 'http://25.16.122.91:9786'
#VITE_APP_BASE_API_Url = 'http://25.18.122.66:9786'
# h5专用地址
-VITE_APP_BASE_H5_API_Url = 'https://aitstest.jlbank.com.cn:7002'
+
+VITE_APP_BASE_H5_API_Url = 'https://aitstest.jlbank.com.cn:7001'
#VITE_APP_BASE_H5_API_Url = 'https://aitstest.jlbank.com.cn:7002'
# sit
#VITE_APP_BASE_H5_API_Url = 'http://25.18.122.91:9786'
-#VITE_APP_BASE_H5_API_Url = 'http://25.18.122.116:7001'
+
+# sit
+# 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_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_TRAASK = 'http://25.64.16.144:9605'
@@ -35,4 +39,6 @@ VITE_APP_BASE_H5_API_Url_TRASTUDY = 'http://25.64.16.130:9602'
# VITE_APP_BASE_H5_API_Url_TRAEXAM = 'http://25.64.16.143:9604'
# 孙宇
# VITE_APP_BASE_H5_API_Url_TRAEXAM = 'http://25.64.16.139:9604'
+# 付丙鑫
+# VITE_APP_BASE_H5_API_Url_TRASTUDY = 'http://25.64.16.145:9602'
diff --git a/src/api/common.js b/src/api/common.js
index df3c82fa..5fc53db5 100644
--- a/src/api/common.js
+++ b/src/api/common.js
@@ -12,10 +12,11 @@ export const uploadFile = (file, data) => {
const base_url = get_base_url(url);
const token = getToken();
const header = {};
+ console.log('file', file);
if (token)
header['summary'] = token
return new Promise((resolve, reject) => {
- uni.uploadFile({
+ uni.uploadFile({
url: `${base_url}${url}`,
header: header,
filePath: file,
@@ -34,6 +35,7 @@ export const uploadFile = (file, data) => {
}
},
fail(error) {
+ console.log('error', error);
reject(new Error('Upload failed'));
}
});
@@ -142,7 +144,7 @@ export function downloadVoiceFile(url) {
};
if (token)
header['summary'] = token
- let baseUrl = get_base_url();
+ let baseUrl = get_base_url(url);
return new Promise((resolve, reject) => {
uni.downloadFile({
url: `${baseUrl}${url}`,
diff --git a/src/api/examination.js b/src/api/examination.js
index cb4f6734..0e683358 100644
--- a/src/api/examination.js
+++ b/src/api/examination.js
@@ -22,7 +22,7 @@ export const commitPaperExam = (data) => {
});
};
-// 试卷考试查分
+// 考试中心考试查分
export const queryPaperExamScore = (data) => {
return request({
url: base_url + '/traExamPapers/queryPaperExamScore',
diff --git a/src/api/login.js b/src/api/login.js
index 9b9644e4..203be84b 100644
--- a/src/api/login.js
+++ b/src/api/login.js
@@ -61,7 +61,6 @@ export const useAccountLoginApp = (data) => request({
...userInfo,
'mascotInfo': mascotInfo
})
- console.log(mascotInfo);
return {
mascotState:!mascotInfo.mascotId
}
@@ -112,21 +111,21 @@ export const queryCurrentUser = (data) => request({
// userId: "USER001"
// userName: "ADMIN" / todo name
// userStatus: "01"
- const userInfo = getUserInfo()
+ const userInfo = getUserInfo() ?? {}
setUserInfo({
...userInfo,
...res.body
})
-
- console.log('预加载头像');
+ // console.log('预加载头像');
const base_url = get_base_url()
// 预加载头像
// #ifdef APP-PLUS
// 更新用户信息中的头像路径
const updateUserAvatar = (imagePath) => {
-
+ const _userInfo = getUserInfo() ?? {}
setUserInfo({
- ...userInfo,
+ ..._userInfo,
+ ...res.body,
'imagePath': imagePath
})
}
@@ -215,7 +214,7 @@ export const queryCurrentUser = (data) => request({
const exists = await checkFileExists(localFilePath)
if (exists) {
- console.log('头像已存在,无需下载')
+ // console.log('头像已存在,无需下载')
updateUserAvatar(localFilePath)
} else {
const savedPath = await downloadAndSaveAvatar(fileUrl, localFilePath)
diff --git a/src/api/socket.js b/src/api/socket.js
index 03bb31f0..0869f8d8 100644
--- a/src/api/socket.js
+++ b/src/api/socket.js
@@ -42,10 +42,10 @@ export default class WebSocketUtil {
header: this.options.header || {},
protocols: this.options.protocols || [],
success: () => {
- console.log('WebSocket连接创建成功');
+ // console.log('WebSocket连接创建成功');
},
fail: (err) => {
- console.error('WebSocket连接创建失败', err);
+ // console.error('WebSocket连接创建失败', err);
this.triggerEvent('error', err);
this.tryReconnect(); // 连接失败时尝试重连
}
@@ -53,7 +53,7 @@ export default class WebSocketUtil {
// 监听WebSocket连接打开事件
this.socketTask.onOpen(() => {
- console.log('WebSocket连接已打开');
+ // console.log('WebSocket连接已打开');
this.reconnectCount = 0; // 重置重连计数
clearInterval(this.reconnectTimer); // 清除重连计时器
// this.startHeartbeat(); // 启动心跳机制
@@ -83,7 +83,7 @@ export default class WebSocketUtil {
// 监听WebSocket连接关闭事件
this.socketTask.onClose((res) => {
- console.log('WebSocket连接已关闭', res);
+ // console.log('WebSocket连接已关闭', res);
clearInterval(this.heartbeatTimer); // 清除心跳计时器
this.triggerEvent('close', res); // 触发连接关闭事件
this.tryReconnect(); // 尝试重连
@@ -146,7 +146,7 @@ export default class WebSocketUtil {
this.socketTask.send({
data: typeof message === 'string' ? message : JSON.stringify(message),
success: () => {
- console.log('WebSocket消息发送成功');
+ // console.log('WebSocket消息发送成功');
},
fail: (err) => {
console.error('WebSocket消息发送失败', err);
diff --git a/src/components/avatar-cropper/avatar-cropper.vue b/src/components/avatar-cropper/avatar-cropper.vue
index c66776b9..920a424a 100644
--- a/src/components/avatar-cropper/avatar-cropper.vue
+++ b/src/components/avatar-cropper/avatar-cropper.vue
@@ -1,1300 +1,1238 @@
-
-
-
-
+
+
+
+
-
-
-
-
-
- touchStart(e, 'body')"
- @touchmove="touchMove"
- @touchend="touchEnd"
- @touchcancel="touchCancel"
- >
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- touchStart(e, 'left-top')"
- >
- touchStart(e, 'left-bottom')"
- >
- touchStart(e, 'right-top')"
- >
- touchStart(e, 'right-bottom')"
- >
-
-
-
-
- 取消
-
-
-
- 确定
-
-
-
+
+
+
+
+
+ touchStart(e, 'body')"
+ @touchmove="touchMove"
+ @touchend="touchEnd"
+ @touchcancel="touchCancel"
+ >
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ touchStart(e, 'left-top')">
+ touchStart(e, 'left-bottom')">
+ touchStart(e, 'right-top')">
+ touchStart(e, 'right-bottom')">
+
+
+
+
+ 取消
+
+
+
+ 确定
+
+
+
diff --git a/src/components/examination/radio-subject-item.vue b/src/components/examination/radio-subject-item.vue
index 260cd231..edd889ed 100644
--- a/src/components/examination/radio-subject-item.vue
+++ b/src/components/examination/radio-subject-item.vue
@@ -36,12 +36,11 @@
}
});
const select_status = computed(() => {
- // 只要是正确答案 就是绿色
- if (props.analysisVo.correctFlag === 'R') return 'success';
// 是错误答案但是被用户错误选中的为红
const my_answer_array = props.my_answer;
if(my_answer_array.includes(props.analysisVo.itemId) && props.analysisVo.correctFlag === 'E') return 'error';
-
+ // 是正确答案 被用户错误选中的为绿色
+ if(my_answer_array.includes(props.analysisVo.itemId) && props.analysisVo.correctFlag === 'R') return 'success';
// 只有被我选中,不知是正确还是错误的为蓝
if(my_answer_array.includes(props.analysisVo.itemId)) return 'primary';
// 什么都不是者为灰色
diff --git a/src/components/examination/subject.vue b/src/components/examination/subject.vue
index eb2c27cf..4d23ef20 100644
--- a/src/components/examination/subject.vue
+++ b/src/components/examination/subject.vue
@@ -99,8 +99,7 @@
参考答案:
{{ subject_data.itemVos[0]?.itemAnswer ?? '' }}
-
- 题目解析:{{ subject_data?.analyContent }}
+ 试题解析:{{ subject_data?.analyContent }}
diff --git a/src/pages/course/components/talkingItem.vue b/src/pages/course/components/talkingItem.vue
index f93874d6..081cf3b1 100644
--- a/src/pages/course/components/talkingItem.vue
+++ b/src/pages/course/components/talkingItem.vue
@@ -31,9 +31,19 @@
+
+
+ 参考答案:{{ dataInfo.itemAnswer }}
+
+
+
+
+
+
+
- {{ showContent }}
+ {{type === 5?'试题解析:':''}}{{ showContent }}
@@ -53,16 +63,6 @@
-
-
-
-
-
-
-
-
- 参考答案:{{ dataInfo.itemAnswer }}
-
举例:{{ dataInfo.exampie }}
@@ -70,11 +70,11 @@
-
+
-
+
storageStore.audioObj)
else if(props.type === 3) return unref(dataInfo)?.chatContent || unref(dataInfo)?.pgrphContent
else if(props.type === 4) return unref(dataInfo)?.chatContent || unref(dataInfo)?.qnsContent
else if(props.type === 5) return unref(dataInfo)?.chatContent || unref(dataInfo)?.analyContent
+ else if(props.type === 8) return unref(subjectInfo)?.chatContent || unref(subjectInfo)?.qnsContent
else if(props.type === 9) return unref(dataInfo)?.chatContent || unref(dataInfo)?.analyContent
else if(props.type === 0) return unref(dataInfo)?.chatContent || unref(dataInfo)?.talkingContent
else return unref(dataInfo)?.chatContent || unref(dataInfo)?.talkingContent
@@ -434,8 +435,18 @@ const audioCacheObj = computed(() => storageStore.audioObj)
},100)
}else{
voiceLoading.value = true
- let _type = props.type == 2 ? 'ans' : props.type == 3 ? 'pgrh' : props.type == 4 ? 'qns' : ''
- let _readId = props.type == 2 ? unref(dataInfo)?.intrctId : props.type == 3 ? unref(dataInfo)?.pgrphId : props.type == 4 ? unref(dataInfo)?.qnsId : ''
+ let _type = props.type == 2 ? 'ans'
+ : props.type == 3 ? 'pgrh'
+ : props.type == 4 ? 'qns'
+ : props.type == 5 ? 'analysis'
+ : props.type == 8 ? 'stemAnalysis'
+ : ''
+ let _readId = props.type == 2 ? unref(dataInfo)?.intrctId
+ : props.type == 3 ? unref(dataInfo)?.pgrphId
+ : props.type == 4 ? unref(dataInfo)?.qnsId
+ : props.type == 5 ? unref(dataInfo)?.qnsId
+ : props.type == 8 ? unref(dataInfo)?.qnsId
+ : ''
let _params = {
crsId: unref(dataInfo)?.crsId || '',
pgrphId: unref(dataInfo)?.pgrphId || '',
@@ -704,10 +715,10 @@ const audioCacheObj = computed(() => storageStore.audioObj)
}
.next-learn-btn{
float: left;
- padding: 0 60rpx 0 20rpx;
+ padding: 0 60rpx 0 15rpx;
height: 62rpx;
line-height: 62rpx;
- font-size: 30rpx;
+ font-size: 28rpx;
background-color: #06f;
color: #fff;
border-radius: 8rpx;
@@ -716,6 +727,7 @@ const audioCacheObj = computed(() => storageStore.audioObj)
position: relative;
&.replay-study-btn{
float: right;
+ margin-right: 0;
}
&.restart{
background-color: #eaf2ff;
diff --git a/src/pages/course/index.vue b/src/pages/course/index.vue
index d164e13b..25652b4a 100644
--- a/src/pages/course/index.vue
+++ b/src/pages/course/index.vue
@@ -514,12 +514,13 @@ import { onShow } from "@dcloudio/uni-app"
}
.model-filter-list{
position: fixed;
- width: 100vw;
- height: 100vh;
+ width: calc(100vw - 33rpx);
+ height: 80vh;
overflow: hidden;
- top: 0;
- left: 0;
+ top: 500rpx;
+ left: 17rpx;
z-index: 1;
+ background-color: rgba(0,0,0,.2);
}
.filter-list,
.model-filter-list{
diff --git a/src/pages/courseDetail/components/comment.vue b/src/pages/courseDetail/components/comment.vue
index befb52ba..68523f84 100644
--- a/src/pages/courseDetail/components/comment.vue
+++ b/src/pages/courseDetail/components/comment.vue
@@ -89,7 +89,7 @@
这里什么都没有
-
+
+ 暂无数据
diff --git a/src/pages/examination/index.vue b/src/pages/examination/index.vue
index 56442649..3f1c8108 100644
--- a/src/pages/examination/index.vue
+++ b/src/pages/examination/index.vue
@@ -268,7 +268,7 @@
// 录音按钮提交
const touchBtnSubmit = (type, submitObj) => {
- const old_text = touchBtnRef.value?.clearinputText(); // 清除发送框数据
+ // const old_text = touchBtnRef.value?.clearinputText(); // 清除发送框数据
if (type === 'voice') {
topic.value.es_status = '00'; // 00转圈
const voicePath = submitObj;
@@ -276,19 +276,26 @@
.then((res) => {
let _res = JSON.parse(res.data);
if (_res.rtnCode === '0000') {
- topic.value.es_status = '02';
- topic.value.my_answer = {
- anserResult: _res.body.transContent,
- ossKey: _res.body.fileId,
- ossAddr: _res.body.ossFileAddr,
- voicePath: voicePath
- };
+ const _content = _res.body.transContent.trim();
+ console.log('_content', _content);
+ if (_content === '') {
+ topic.value.es_status = ''; // 取消转圈
+ return common.msg('未识别到文字');
+ } else {
+ topic.value.es_status = '02';
+ topic.value.my_answer = {
+ anserResult: _res.body.transContent,
+ ossKey: _res.body.fileId,
+ ossAddr: _res.body.ossFileAddr,
+ voicePath: voicePath
+ };
+ }
}
})
.catch((err) => {
topic.value.es_status = ''; // 取消转圈
// 失败了再把发送框数据还原回去
- touchBtnRef.value?.clearinputText(old_text); // 清除发送框数据
+ // touchBtnRef.value?.clearinputText(old_text); // 清除发送框数据
common.msg('系统异常,请联系管理员');
});
} else if (type === 'text') {
@@ -466,7 +473,7 @@
}
func.then((res) => {
// 判断是否需要查分
- const flagQueryDetail = res.body.flagQueryDetail===''?res.body.flagQuery:res.body.flagQueryDetail
+ const flagQueryDetail = res.body.flagQueryDetail === '' ? res.body.flagQuery : res.body.flagQueryDetail;
common.redirectTo(
`/pages/examination/result?execId=${res.body.execId}&flagQuery=${res.body.flagQuery}&flagQueryDetail=${flagQueryDetail}&examLenTm=${examLenTm}&papersName=${paperData.papersName}&papersId=${paperData.papersId}&mode=${mode}&crsId=${paperData.crsId}`
);
diff --git a/src/pages/examination/result.vue b/src/pages/examination/result.vue
index fa7d966c..a06439da 100644
--- a/src/pages/examination/result.vue
+++ b/src/pages/examination/result.vue
@@ -123,7 +123,8 @@
import { onLoad, onUnload } from '@dcloudio/uni-app';
import { ref, reactive, computed, onMounted, nextTick, getCurrentInstance } from 'vue';
- import { queryPaperExamScore } from '@/api/examination.js';
+ import { queryPaperExamScore, queryCrsExamScore } from '@/api/examination.js';
+
import Subject from '@/components/examination/subject.vue';
import common from '@/common/common';
const pass_status = ref(0);
@@ -208,7 +209,7 @@
const scroll = (event) => {};
- // 跳转到去考试页面
+ // 考试排行榜
const goExamRanking = () => {
// 首先判断是课程跳入还是考试中心跳入
if (result.crsId !== '') {
@@ -243,11 +244,17 @@
console.log('已达到最大请求次数(15次),停止请求');
return;
}
-
+ let req
+ if (result.crsId !== '') { // 试卷跳入
+ req = queryCrsExamScore
+ } else {
+ req = queryPaperExamScore
+ }
+
timerId.value = setTimeout(() => {
// 每次请求前计数器+1
requestCount.value++;
- queryPaperExamScore({
+ req({
execId: result.execId
})
.then(({ body }) => {
@@ -289,7 +296,6 @@
result.papersName = e.papersName;
result.examLenTm = e.examLenTm;
result.mode = e.mode || '';
-
result.papersId = e.papersId;
flagQueryDetail.value = e.flagQueryDetail;
flagQuery.value = e.flagQuery;
@@ -305,7 +311,6 @@
}
});
const formatSecondsToText = (milliseconds) => {
- console.log('milliseconds', milliseconds);
if (milliseconds === undefined) return '--';
// 尝试将输入转换为数字(处理字符串形式的数字)
const num = Number(milliseconds);
diff --git a/src/pages/examinationRecord/components/examRecordItem.vue b/src/pages/examinationRecord/components/examRecordItem.vue
index 919000dd..2686bbbc 100644
--- a/src/pages/examinationRecord/components/examRecordItem.vue
+++ b/src/pages/examinationRecord/components/examRecordItem.vue
@@ -57,8 +57,7 @@
diff --git a/src/pages/examinationRecord/components/examRecordList.vue b/src/pages/examinationRecord/components/examRecordList.vue
index 162fe3b8..0f9ffedc 100644
--- a/src/pages/examinationRecord/components/examRecordList.vue
+++ b/src/pages/examinationRecord/components/examRecordList.vue
@@ -2,8 +2,8 @@
-
-
+ 暂无记录
+
diff --git a/src/pages/favorites/components/favoritesCourse.vue b/src/pages/favorites/components/favoritesCourse.vue
index abcdc616..d1836fff 100644
--- a/src/pages/favorites/components/favoritesCourse.vue
+++ b/src/pages/favorites/components/favoritesCourse.vue
@@ -33,7 +33,7 @@
- 暂无数据
+ 暂无数据
diff --git a/src/pages/favorites/components/favoritesTask.vue b/src/pages/favorites/components/favoritesTask.vue
index 33417dd5..b2e0076f 100644
--- a/src/pages/favorites/components/favoritesTask.vue
+++ b/src/pages/favorites/components/favoritesTask.vue
@@ -41,7 +41,7 @@
- 暂无数据
+ 暂无数据
diff --git a/src/pages/index/index.vue b/src/pages/index/index.vue
index a0ed0b4a..229f329a 100644
--- a/src/pages/index/index.vue
+++ b/src/pages/index/index.vue
@@ -438,6 +438,7 @@
return;
}
const userInfo = getUserInfo();
+ console.log('首页userInfo', userInfo);
if (userInfo) {
mascotInfo.value = userInfo?.mascotInfo;
}
diff --git a/src/pages/learningTasks/components/content-item.vue b/src/pages/learningTasks/components/content-item.vue
index b54c2f37..ebd6cffe 100644
--- a/src/pages/learningTasks/components/content-item.vue
+++ b/src/pages/learningTasks/components/content-item.vue
@@ -45,9 +45,15 @@
};
// 跳转到详情
const click_item = (item) => {
- if(item.isTimeOut === '00') {
- common.msg('任务已结束')
- return ;
+ 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) {
+ return common.msg('任务未开始');
+ } else if(currentTimestamp > endTm) {
+ return common.msg('任务已结束');
+ }
}
setPageCache('learning_tasks_details', item);
common.navigateTo('/pages/learningTasks/details');
diff --git a/src/pages/learningTasks/components/content.vue b/src/pages/learningTasks/components/content.vue
index 6e4c9f29..137859e4 100644
--- a/src/pages/learningTasks/components/content.vue
+++ b/src/pages/learningTasks/components/content.vue
@@ -2,8 +2,8 @@
-
-
+ 暂无学习任务
+
@@ -23,7 +23,7 @@
required: true
}
});
-
+
const getData = (from = '', searchText = '') => {
if (from == 'first') {
if (total.value !== -1) {
diff --git a/src/pages/learningTasks/details.vue b/src/pages/learningTasks/details.vue
index 7409b86b..49deb5d6 100644
--- a/src/pages/learningTasks/details.vue
+++ b/src/pages/learningTasks/details.vue
@@ -113,7 +113,7 @@
-
+ 暂无数据
我的积分
-
+
徽章墙
-
+
@@ -243,13 +233,22 @@
const avatarCropperStatus = ref(true);
const avatarCropperUrl = ref('');
// 点击修改头像
- const click_update_avatar = (value) => {
+ const click_update_avatar = () => {
uni.chooseImage({
count: 1,
sizeType: ['compressed'],
- success: (res) => {
- avatarCropperUrl.value = res.tempFilePaths[0];
- avatarCropperStatus.value = true;
+ success: (resPicture) => {
+ uni.getFileInfo({
+ filePath: resPicture.tempFilePaths[0],
+ success: function (resSize) {
+ if (resSize.size > 10 * 1024 * 1024) return common.msg('图片过大,请重新选择');
+ avatarCropperUrl.value = resPicture.tempFilePaths[0];
+ avatarCropperStatus.value = true;
+ },
+ fail: function (err) {
+ common.msg('获取图片失败,请选择其他图片');
+ }
+ });
}
});
};
@@ -280,7 +279,8 @@
common.msg('修改成功');
user_info.imageAddr = userData.imageAddr;
user_info.imagePath = '';
- } catch {
+ } catch (e) {
+ console.log('sss', e);
common.msg('修改失败');
}
common.hideLoading();
diff --git a/src/pages/messageNotification/index.vue b/src/pages/messageNotification/index.vue
index 727d9213..17887bd8 100644
--- a/src/pages/messageNotification/index.vue
+++ b/src/pages/messageNotification/index.vue
@@ -49,7 +49,7 @@
- 暂无数据
+ 暂无数据
diff --git a/src/pages/messageNotification/index2.vue b/src/pages/messageNotification/index2.vue
index 2ca74603..56a35c72 100644
--- a/src/pages/messageNotification/index2.vue
+++ b/src/pages/messageNotification/index2.vue
@@ -26,22 +26,22 @@
"
>
-
+
-
+
diff --git a/src/pages/preview/components/previewCourse.vue b/src/pages/preview/components/previewCourse.vue
index 7a7334e1..01e42a85 100644
--- a/src/pages/preview/components/previewCourse.vue
+++ b/src/pages/preview/components/previewCourse.vue
@@ -13,7 +13,7 @@
- 暂无数据
+ 暂无数据
diff --git a/src/pages/search/result.vue b/src/pages/search/result.vue
index 49cf01b5..5e3bf419 100644
--- a/src/pages/search/result.vue
+++ b/src/pages/search/result.vue
@@ -21,14 +21,15 @@
{{ hasMore ? '滚动加载更多' : '加载完成' }}
- 暂无数据
+
+ 暂无数据
-
+
@@ -58,6 +59,9 @@
+
+ {{ hasMore ? '滚动加载更多' : '加载完成' }}
+
暂无数据
@@ -68,6 +72,9 @@
+
+ {{ hasMore ? '滚动加载更多' : '加载完成' }}
+
暂无数据
@@ -86,6 +93,9 @@
+
+ {{ hasMore ? '滚动加载更多' : '加载完成' }}
+
暂无数据
@@ -150,7 +160,7 @@ const tabList = ref([
])
const abilityListShow = computed(() => {
if (searchValue.value) {
- let _arr = abilityList.value.filter(t => t.title.includes(searchValue.value))
+ let _arr = abilityList.value.filter(t => t.title.includes(searchValue.value.toUpperCase()))
let _sum = 4 - (_arr.length % 4)
if (_sum !== 4) {
for (let i = 0; i < _sum; i++) {
@@ -219,22 +229,29 @@ const changeTab = item => {
if (!item) return
activeTab.value = item.type
console.log(item)
- switch (item.name) {
+ switch (item.type) {
case 'all':
+ pageInfo.value.limit = 3
break
case 'ability':
break
case 'course':
+ pageInfo.value.limit = 15
break
case 'task':
+ pageInfo.value.limit = 15
break
case 'test':
+ pageInfo.value.limit = 15
break
case 'exam':
+ pageInfo.value.limit = 15
break
default:
+ pageInfo.value.limit = 3
break
}
+ getData(1)
}
const clickAbility = item => {
if (item.isTab) {
@@ -262,23 +279,55 @@ const search = () => {
getData(1)
}
+const getMore = () => {
+ if(activeTab.value && activeTab.value !== 'all'){
+ getData()
+ }
+}
const getData = (flag = null) => {
if (flag) {
pageInfo.value.page = 1
courseList.value = []
+ examList.value = []
+ taskList.value = []
}
+ let _isCourse = fromType.value === 'course' || activeTab.value==='course'
appSearchCrsApi({
- type: fromType.value === 'course' ? '01' : '00', //00 首页搜索 01课程搜索
+ type: _isCourse ? '01'
+ : activeTab.value==='exam' ? '02'
+ : activeTab.value==='task' ? '03'
+ : '00', //00 首页搜索 01课程搜索 '02' 考试搜索 '03' 任务搜索
searchName: searchValue.value,
page: pageInfo.value.page,
limit: pageInfo.value.limit
}).then(res => {
- pageInfo.value.total = res.total || 0
courseList.value = courseList.value.concat(res.body.traCrsInfoVoList || [])
if (fromType.value !== 'course') {
- examList.value = res.body.traExamPapersExtVoList || []
- taskList.value = res.body.traTaskInfoExtVoList || []
+ examList.value = examList.value.concat(res.body.traExamPapersExtVoList || [])
+ taskList.value = taskList.value.concat(res.body.traTaskInfoExtVoList || [])
}
+ pageInfo.value.total = res.total || 0
+ // switch (activeTab.value) {
+ // case 'all':
+ // break
+ // case 'ability':
+ // break
+ // case 'course':
+ // pageInfo.value.total = res.total || 0
+ // break
+ // case 'task':
+ // pageInfo.value.total = res.total || 0
+ // break
+ // case 'test':
+ // pageInfo.value.total = res.total || 0
+ // break
+ // case 'exam':
+ // pageInfo.value.total = res.total || 0
+ // break
+ // default:
+ // pageInfo.value.total = res.total || 0
+ // break
+ // }
})
}
const hasMore = computed(() => {
@@ -319,6 +368,7 @@ const toCourseDetail = item => {
height: 100rpx;
line-height: 100rpx;
color: #999;
+ font-size: 26rpx;
}
.view-tips {
width: 100%;
diff --git a/src/pages/setting/index.vue b/src/pages/setting/index.vue
index ffd28297..ec75df00 100644
--- a/src/pages/setting/index.vue
+++ b/src/pages/setting/index.vue
@@ -153,14 +153,23 @@
}
})
// 点击修改头像
- const click_update_avatar = (value) => {
+ const click_update_avatar = () => {
uni.chooseImage({
count: 1,
- sizeType: ["compressed"],
- success: (res) => {
- avatarCropperUrl.value = res.tempFilePaths[0];
- avatarCropperStatus.value = true
- },
+ sizeType: ['compressed'],
+ success: (resPicture) => {
+ uni.getFileInfo({
+ filePath: resPicture.tempFilePaths[0],
+ success: function (resSize) {
+ if (resSize.size > 10 * 1024 * 1024) return common.msg('图片过大,请重新选择');
+ avatarCropperUrl.value = resPicture.tempFilePaths[0];
+ avatarCropperStatus.value = true;
+ },
+ fail: function (err) {
+ common.msg('获取图片失败,请选择其他图片');
+ }
+ });
+ }
});
};
// 选择头像取消
diff --git a/src/pages/testingHall/components/content.vue b/src/pages/testingHall/components/content.vue
index 5a783e2a..98cb7f23 100644
--- a/src/pages/testingHall/components/content.vue
+++ b/src/pages/testingHall/components/content.vue
@@ -10,7 +10,7 @@
- 暂无数据
+ 暂无考试任务
@@ -77,7 +77,6 @@
getData();
};
const search = (value) => {
- console.log('searchvalue', value);
total.value = -1;
getData('first', value);
};
diff --git a/src/pages/wrongQuestionRecord/components/correct.vue b/src/pages/wrongQuestionRecord/components/correct.vue
index 1e2bd0f7..761613dd 100644
--- a/src/pages/wrongQuestionRecord/components/correct.vue
+++ b/src/pages/wrongQuestionRecord/components/correct.vue
@@ -4,8 +4,8 @@
-
-
+ 暂无错题
+
diff --git a/src/pages/wrongQuestionRecord/components/favorites-course.vue b/src/pages/wrongQuestionRecord/components/favorites-course.vue
index 2257c235..2ebc228e 100644
--- a/src/pages/wrongQuestionRecord/components/favorites-course.vue
+++ b/src/pages/wrongQuestionRecord/components/favorites-course.vue
@@ -4,8 +4,8 @@
-
-
+ 暂无错题
+