diff --git a/.env.development b/.env.development
index 74c32d10..70932bc1 100644
--- a/.env.development
+++ b/.env.development
@@ -11,7 +11,7 @@ VITE_APP_BASE_API_Url = 'https://aitstest.jlbank.com.cn:7001'
# app入口
-# VITE_APP_BASE_API_Url = 'http://25.16.122.65:7001'
+#VITE_APP_BASE_API_Url = 'http://25.16.122.65:7001'
# VITE_APP_BASE_API_Url = 'http://25.16.122.92:9786'
# VITE_APP_BASE_API_Url = 'http://25.18.122.66:9786'
diff --git a/src/api/common.js b/src/api/common.js
index 6b581b7d..cb7c54b9 100644
--- a/src/api/common.js
+++ b/src/api/common.js
@@ -95,6 +95,8 @@ export const commonUploadVoiceFile = (file, url, data = {}, fileKey = 'voice') =
} else if (REQUES_ERROR_CODES['NO_LOGIN'].includes(res.rtnCode)) {
goto_login_fun()
return reject('NO_LOGIN');
+ }else if(res.rtnCode === '0004') {
+ return reject('N');
}
return reject('Other');
} catch (error) {
@@ -102,7 +104,6 @@ export const commonUploadVoiceFile = (file, url, data = {}, fileKey = 'voice') =
}
},
fail(error) {
- console.log('err', error);
return reject('Other');
}
});
diff --git a/src/api/request.js b/src/api/request.js
index 389c0e6c..df5aceb1 100644
--- a/src/api/request.js
+++ b/src/api/request.js
@@ -50,7 +50,8 @@ export const goto_login_fun = (from = 'http') => {
if (from === 'socket' && page_route !== '') {
common.redirectTo('/pages/login/login?path=' + page_route)
} else {
- common.navigateTo('/pages/login/login')
+ common.redirectTo('/pages/login/login')
+ // common.navigateTo('/pages/login/login')
}
}).finally(() => {
diff --git a/src/common/recordPermission.js b/src/common/recordPermission.js
index e2fc0672..3e17d4ed 100644
--- a/src/common/recordPermission.js
+++ b/src/common/recordPermission.js
@@ -75,12 +75,13 @@ const RecordPermission = {
// 安卓需要再次请求权限
const permResult = await permission.requestAndroidPermission(
'android.permission.RECORD_AUDIO');
- console.log('permResultx', permResult);
if(permResult === 1) {
-
+ resolve('need_request');
+ } else {
+ reject('permResultx')
}
} else {
- reject('need_request');
+ resolve('need_request');
}
// #endif
}
diff --git a/src/components/examination/es-analysis.vue b/src/components/examination/es-analysis.vue
index 375e7be7..169031ba 100644
--- a/src/components/examination/es-analysis.vue
+++ b/src/components/examination/es-analysis.vue
@@ -3,7 +3,7 @@
维度评分:
{{ dimension_all_score }}
-
+
@@ -11,8 +11,9 @@
{{ item.gradeDimens }}:
{{ item.anlyGrade }}
-
-
+
+ 关键词:{{ passKeyword }}
+
@@ -33,13 +34,9 @@
type: Boolean,
default: false,
required: false
- },
- answerText: {
- type: String,
- default: '',
- required: false
}
});
+ const passKeyword = computed(() => props.value.passKeyword);
const evalSettingVos = computed(() => props.value.evalSettingVos);
const status = computed(() => (props.judgeResult ? 'success' : 'error'));
const select_status_icon = computed(() => {
@@ -54,19 +51,19 @@
return props.value.relKeyword.split(/[,、]/).map((key) => key.trim());
});
- const highlightedText = computed(() => {
- // 如果没有关键词,直接返回原文本
- if (!keywords.value.length) return '你的答案:' + props.answerText;
- // 构建正则表达式,匹配所有关键词(不区分大小写)
- // 对关键词进行转义,避免特殊字符影响正则
- const escapedKeywords = keywords.value.map((keyword) => keyword.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'));
+ // const highlightedText = computed(() => {
+ // // 如果没有关键词,直接返回原文本
+ // if (!keywords.value.length) return '你的答案:' + props.answerText;
+ // // 构建正则表达式,匹配所有关键词(不区分大小写)
+ // // 对关键词进行转义,避免特殊字符影响正则
+ // const escapedKeywords = keywords.value.map((keyword) => keyword.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'));
- // 创建正则表达式,g表示全局匹配,i表示不区分大小写
- const regex = new RegExp(`(${escapedKeywords.join('|')})`, 'gi');
+ // // 创建正则表达式,g表示全局匹配,i表示不区分大小写
+ // const regex = new RegExp(`(${escapedKeywords.join('|')})`, 'gi');
- // 替换匹配到的关键词,用span包裹并添加高亮样式
- return '你的答案:' + props.answerText.replace(regex, (match) => `${match}`);
- });
+ // // 替换匹配到的关键词,用span包裹并添加高亮样式
+ // return '你的答案:' + props.answerText.replace(regex, (match) => `${match}`);
+ // });
const dimension_all_score = computed(() => {
return (
evalSettingVos.value
@@ -76,9 +73,7 @@
.reduce((total, current) => total + current, 0)
);
});
- watch(evalSettingVos.value, (newVal) => {
- console.log('newVal2', newVal);
- });
+
const click_option = () => {
emit('click_option', props.analysisVo);
};
diff --git a/src/components/examination/subject.vue b/src/components/examination/subject.vue
index f8ff04c1..e8b7f603 100644
--- a/src/components/examination/subject.vue
+++ b/src/components/examination/subject.vue
@@ -90,11 +90,14 @@
{{ myResultLabel.join('') }}
+
+ 你的答案:
+ {{ subject_data.anserResult ?? '' }}
+
@@ -174,7 +177,7 @@
get: () => props.modelValue,
set: (val) => emit('update:modelValue', val)
});
-
+
let answerText = props.item?.my_answer || props.item.anserResult || [];
// item_answer 是答题结果,可以是对象 数组 字符串类型
const item_answer = ref(typeof answerText === 'string' ? answerText.split(',') : answerText);
@@ -186,15 +189,15 @@
item_answer.value = typeof newVal === 'string' ? newVal.split(',') : newVal;
}
);
- watch(
- item_answer,
- (newVal) => {
- console.log('item_answer', newVal);
- emit('update:modelValue', newVal);
- },
- { deep: true }
- );
-
+ // watch(
+ // item_answer,
+ // (newVal) => {
+ // console.log('item_answer', newVal);
+ // emit('update:modelValue', newVal);
+ // },
+ // { deep: true }
+ // );
+
const feedback_click = () => {
emit('subject_click', 'feedback', props.item);
};
@@ -294,7 +297,7 @@
// 无论什么类型如果表里已经有了,再次点击就是弹出
if (item_answer.value.includes(analysisVo.itemId)) {
item_answer.value = item_answer.value.filter((id) => id !== analysisVo.itemId);
- // modelValue.value = item_answer.value;
+ modelValue.value = item_answer.value;
if (!['study'].includes(props.mode)) {
muCheckbox('choose');
}
@@ -302,13 +305,13 @@
// 单选
// 单选插入,并且移除其他
item_answer.value[0] = analysisVo.itemId;
- // modelValue.value = item_answer.value;
+ modelValue.value = item_answer.value;
muCheckbox('choose');
} else if (props.item.qnsTyp === 'MU') {
// 多选题
// 多选直接插入
item_answer.value.push(analysisVo.itemId);
- // modelValue.value = item_answer.value;
+ modelValue.value = item_answer.value;
if (!['study'].includes(props.mode)) {
muCheckbox('choose');
}
@@ -316,7 +319,7 @@
// 判断题
// 判断插入,并且移除其他
item_answer.value = [analysisVo.itemId];
- // modelValue.value = item_answer.value;
+ modelValue.value = item_answer.value;
muCheckbox('choose');
}
};
diff --git a/src/components/examination/touchBtn.vue b/src/components/examination/touchBtn.vue
index 1ef71c68..613c08ff 100644
--- a/src/components/examination/touchBtn.vue
+++ b/src/components/examination/touchBtn.vue
@@ -163,10 +163,6 @@
const endTime = Date.now();
const times = Math.max(500 - endTime + startTime, 0);
setTimeout(() => {
- console.log('延迟数据', times);
- // nextTick(() => {
-
- // });
popupRef.value.close();
console.log('停止录音');
recorderManager.stop();
@@ -177,7 +173,6 @@
onMounted(async () => {
// #ifdef APP-PLUS
recorderManager.onStop(function (res) {
- console.log('recorder stop' + JSON.stringify(res));
console.log('录音文件临时位置', res.tempFilePath, isOut.value);
if (isOut.value) return; // 被划掉的语音
const endTime = Date.now();
diff --git a/src/components/image-preview/image-preview.vue b/src/components/image-preview/image-preview.vue
index 8f26911a..fc31780c 100644
--- a/src/components/image-preview/image-preview.vue
+++ b/src/components/image-preview/image-preview.vue
@@ -1,52 +1,51 @@
-
-
-
+
+
-
\ No newline at end of file
+
diff --git a/src/pages/courseRecord/components/examRecordItem.vue b/src/pages/courseRecord/components/examRecordItem.vue
index f34125eb..1ca4dd81 100644
--- a/src/pages/courseRecord/components/examRecordItem.vue
+++ b/src/pages/courseRecord/components/examRecordItem.vue
@@ -2,7 +2,7 @@
-
+
@@ -128,13 +128,13 @@
.img_div {
position: relative;
- width: 226rpx;
+ width: 224rpx;
height: 168rpx;
overflow: hidden;
border-radius: 22rpx;
.img {
- width: 226rpx;
+ width: 224rpx;
height: 168rpx;
}
diff --git a/src/pages/courseRecord/components/practiceRecordItem.vue b/src/pages/courseRecord/components/practiceRecordItem.vue
index 7b0b5d0c..94d44492 100644
--- a/src/pages/courseRecord/components/practiceRecordItem.vue
+++ b/src/pages/courseRecord/components/practiceRecordItem.vue
@@ -2,7 +2,7 @@
-
+
@@ -127,13 +127,13 @@
.img_div {
position: relative;
- width: 226rpx;
+ width: 224rpx;
height: 168rpx;
overflow: hidden;
border-radius: 22rpx;
.img {
- width: 226rpx;
+ width: 224rpx;
height: 168rpx;
}
diff --git a/src/pages/courseRecord/components/studyRecordItem.vue b/src/pages/courseRecord/components/studyRecordItem.vue
index 76f9dea8..7941a248 100644
--- a/src/pages/courseRecord/components/studyRecordItem.vue
+++ b/src/pages/courseRecord/components/studyRecordItem.vue
@@ -2,7 +2,7 @@
-
+
@@ -128,13 +128,13 @@
.img_div {
position: relative;
- width: 226rpx;
+ width: 224rpx;
height: 168rpx;
overflow: hidden;
border-radius: 22rpx;
.img {
- width: 226rpx;
+ width: 224rpx;
height: 168rpx;
}
diff --git a/src/pages/examRanking/index.vue b/src/pages/examRanking/index.vue
index 91165c6a..56271072 100644
--- a/src/pages/examRanking/index.vue
+++ b/src/pages/examRanking/index.vue
@@ -87,6 +87,13 @@
this.getExamList()
}
},
+ onShow(){
+ if(this.crsId){
+ this.getList()
+ }else{
+ this.getExamList()
+ }
+ },
methods: {
getList(){
queryTraCrsRankingList({
diff --git a/src/pages/examination/index.vue b/src/pages/examination/index.vue
index 8e403499..4a1afd8d 100644
--- a/src/pages/examination/index.vue
+++ b/src/pages/examination/index.vue
@@ -303,12 +303,13 @@
const topic = topicList[questionNumber.value];
touchBtnRef.value?.clearinputText(); // 清除发送框数据
if (type === 'voice') {
- if(topic.es_status == '00') return;
+ if (topic.es_status == '00') return;
topic.es_status = '00'; // 00转圈
const voicePath = submitObj;
commonUploadVoiceFile(voicePath, '/traask/traAskchat/voiceTrans', {})
.then((res) => {
let _res = JSON.parse(res.data);
+ console.log('voicePath_res_res_res', _res);
if (_res.rtnCode === '0000') {
const _content = _res.body.transContent.trim();
if (_content === '') {
@@ -351,6 +352,7 @@
// 添加试题答案缓存
const addTopicAnswerCache = () => {
const my_answer = topic.value.my_answer;
+ console.log('my_answer', my_answer);
const qnsId = topic.value.qnsId;
console.log('asdsadas', answerCacheList.value);
const newCache = { ...answerCacheList.value };
@@ -611,6 +613,7 @@
addTopicAnswerCache();
const answerDtoList = getAnswerDtoList();
+ console.log('answerDtoList', answerDtoList);
commitPaperCache({
examTyp: paperData.examId ? 'PAPERS' : 'CRS',
papersId: paperData.papersId,
diff --git a/src/pages/favorites/components/favoritesCourse.vue b/src/pages/favorites/components/favoritesCourse.vue
index 5a90ada4..84e422e2 100644
--- a/src/pages/favorites/components/favoritesCourse.vue
+++ b/src/pages/favorites/components/favoritesCourse.vue
@@ -19,7 +19,7 @@
>
-
+
{{ item.evalGrade ?? 0 }}分
diff --git a/src/pages/favorites/components/favoritesTask.vue b/src/pages/favorites/components/favoritesTask.vue
index 4182f43a..e61b7c8e 100644
--- a/src/pages/favorites/components/favoritesTask.vue
+++ b/src/pages/favorites/components/favoritesTask.vue
@@ -19,7 +19,7 @@
>
-
+
已完成
未完成
@@ -204,7 +204,7 @@
border-radius: 22rpx;
.img {
- width: 226rpx;
+ width: 224rpx;
height: 168rpx;
}
diff --git a/src/pages/index/components/class_scroll.vue b/src/pages/index/components/class_scroll.vue
new file mode 100644
index 00000000..ad235a0f
--- /dev/null
+++ b/src/pages/index/components/class_scroll.vue
@@ -0,0 +1,280 @@
+
+
+
+
+
+
+ {{ title }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.crsName }}
+
+ 更新:{{ (item.mtTime || '').substr(0, 10) }}
+
+ 已学:{{ item.accmStdyCnt }}人次
+ 去学习
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/pages/index/index.vue b/src/pages/index/index.vue
index b1dc275f..bc124d6d 100644
--- a/src/pages/index/index.vue
+++ b/src/pages/index/index.vue
@@ -103,8 +103,7 @@
:useEasing="true"
ref="accmExamCntRef"
>
-
-
+
次
@@ -153,15 +152,12 @@
-
-
-
-
-
- 热门课程
-
-
-
+
+
+
+
+
+
-
-
-
-
- 推荐课程
-
-
-
-
-
-
-
-
-
-
-
-
- {{ item.crsName }}
-
- 更新:{{ (item.mtTime || '').substr(0, 10) }}
-
-
-
- 已学:{{ item.accmStdyCnt }}人次
-
- 去学习
-
-
-
-
-
-
-
-
-
-
-
-
-
- 最新课程
-
-
-
-
-
-
-
-
-
-
-
-
- {{ item.crsName }}
-
- 更新:{{ (item.mtTime || '').substr(0, 10) }}
-
-
-
- 已学:{{ item.accmStdyCnt }}人次
-
- 去学习
-
-
-
-
-
-
-
-
+ -->
+
@@ -295,11 +202,13 @@
import { getUserInfo } from '@/common/common';
import common from '@/common/common';
import { setMascot } from '@/common/mascot.js';
- import { getStatisticsData, queryCrsInfoByLastnew, queryCrsInfoByPopular, queryCrsInfoByRecmd } from '@/api/index.js';
+ import { getStatisticsData } from '@/api/index.js';
import { noticeMessageCount } from '@/api/messageNotification.js';
-
+ import classScroll from './components/class_scroll.vue';
const scrollTop = ref(0);
const no_read_message_num = ref(0);
+ const classScrollRef = ref([]);
+
// 处理显示的消息数量文本
const messageDisplayText = computed(() => {
return no_read_message_num.value > 99 ? '99+' : no_read_message_num.value;
@@ -314,14 +223,13 @@
const stdtTmLenRef = ref(null);
const accmPracticeCntRef = ref(null);
const accmExamCntRef = ref(null);
- const three_list_request_time = ref(0); // 三个列表更新时间
// 计算透明度
const opacity = computed(() => {
if (scrollTop.value <= 130) return 0;
return Math.min(3, (scrollTop.value - 130) / 30);
});
-
+
const bgOpacity = computed(() => {
return `rgba(246,248,255,${opacity.value})`;
});
@@ -332,27 +240,9 @@
});
// 滚动消息
const notice_text = ref(['绿色金融政策解析与商业银行绿色水水水水水水水水水水水水水', '绿色金融政策解析与商业银行红色']);
- const init_class_data = [
- {
- crsNum: '',
- img: '',
- crsName: '',
- issuTm: '',
- accmStdyCnt: ''
- },
- {
- crsNum: '',
- img: '',
- crsName: '',
- issuTm: '',
- accmStdyCnt: ''
- }
- ];
- // 热门课程
- const hot_class_list = ref([...init_class_data]);
- const new_class_list = ref([...init_class_data]);
- const recommend_class_list = ref([...init_class_data]);
+
const mascotInfo = ref({});
+
const statistics_data = reactive({
stdtTmLen: 0, // 学习
accmPracticeCnt: 0, // 训练
@@ -416,43 +306,19 @@
}
}
});
-
- const index = ref(0);
- const ai_test = () => {
- index.value++;
- if (index.value == 4) {
- index.value = 1;
- }
- uni.setTabBarStyle({
- midButton: {
- iconPath: '/static/images/icon/fawn-' + index.value + '.png',
- width: '86px',
- height: '86px',
- iconWidth: '90px'
- }
- });
- };
-
+
// 进入搜索页
const goto_search_page = () => {
common.navigateTo('/pages/search/search?from=index');
};
- // 进入课程详情页
- const goto_course_detail = (crsId) => {
- common.navigateTo('/pages/courseDetail/index?crsId=' + crsId);
- };
- const scrolltolower = () => {
- common.navigateTo('/pages/index/dialog', {
- animationType: 'slide-in-bottom'
- });
- };
+
onLoad(() => {
statistics_data['init'](); // 初始化数据
// 检测如果没设置吉祥物,跳转到吉祥物界面
// 判断下如果没有设置吉祥物就跳转到吉祥物页面
const userInfo = getUserInfo();
if (userInfo?.mascotInfo.mascotId === null) {
- //说明这人在上次选吉祥物的时候退出了,没有选到吉祥物
+ //说明这人在上次选吉祥物的时候退出了,没有选到吉祥物(概率很低)
common.redirectTo('/pages/mascot/mascot_select_list');
return;
}
@@ -469,18 +335,12 @@
}
setMascot();
statistics_data['get_statistics_data'](); // 获取统计数据
- queryCrsInfoByLastnew().then((res) => {
- new_class_list.value = res.body;
- });
- queryCrsInfoByPopular().then((res) => {
- hot_class_list.value = res.body;
- });
- queryCrsInfoByRecmd().then((res) => {
- recommend_class_list.value = res.body;
+ nextTick(() => {
+ classScrollRef.value.forEach((item) => item?.get_data());
});
+
noticeMessageCount().then((res) => {
no_read_message_num.value = res.body;
- // no_read_message_num.value = 109;
});
});
onHide(() => {});
@@ -489,11 +349,11 @@
\ No newline at end of file
diff --git a/src/uni_modules/uv-skeletons/package.json b/src/uni_modules/uv-skeletons/package.json
new file mode 100644
index 00000000..9a362990
--- /dev/null
+++ b/src/uni_modules/uv-skeletons/package.json
@@ -0,0 +1,88 @@
+{
+ "id": "uv-skeletons",
+ "displayName": "uv-skeletons 骨架屏 全面兼容小程序、nvue、vue2、vue3等多端",
+ "version": "1.0.1",
+ "description": "全新升级骨架屏,更加灵活,体验更加,强烈推荐使用新版骨架屏。一般用于页面在请求远程数据尚未完成时,在内容加载出来前展示与内容布局结构一致的灰白块,提升用户视觉体验。",
+ "keywords": [
+ "uv-skeletons",
+ "uvui",
+ "uv-ui",
+ "skeleton",
+ "骨架屏"
+],
+ "repository": "",
+ "engines": {
+ "HBuilderX": "^3.1.0"
+ },
+ "dcloudext": {
+ "type": "component-vue",
+ "sale": {
+ "regular": {
+ "price": "0.00"
+ },
+ "sourcecode": {
+ "price": "0.00"
+ }
+ },
+ "contact": {
+ "qq": ""
+ },
+ "declaration": {
+ "ads": "无",
+ "data": "插件不采集任何数据",
+ "permissions": "无"
+ },
+ "npmurl": ""
+ },
+ "uni_modules": {
+ "dependencies": [
+ "uv-ui-tools",
+ "uv-text"
+ ],
+ "encrypt": [],
+ "platforms": {
+ "cloud": {
+ "tcb": "y",
+ "aliyun": "y"
+ },
+ "client": {
+ "Vue": {
+ "vue2": "y",
+ "vue3": "y"
+ },
+ "App": {
+ "app-vue": "y",
+ "app-nvue": "y"
+ },
+ "H5-mobile": {
+ "Safari": "y",
+ "Android Browser": "y",
+ "微信浏览器(Android)": "y",
+ "QQ浏览器(Android)": "y"
+ },
+ "H5-pc": {
+ "Chrome": "y",
+ "IE": "y",
+ "Edge": "y",
+ "Firefox": "y",
+ "Safari": "y"
+ },
+ "小程序": {
+ "微信": "y",
+ "阿里": "y",
+ "百度": "y",
+ "字节跳动": "y",
+ "QQ": "y",
+ "钉钉": "u",
+ "快手": "u",
+ "飞书": "u",
+ "京东": "u"
+ },
+ "快应用": {
+ "华为": "u",
+ "联盟": "u"
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/uni_modules/uv-skeletons/readme.md b/src/uni_modules/uv-skeletons/readme.md
new file mode 100644
index 00000000..a08cec12
--- /dev/null
+++ b/src/uni_modules/uv-skeletons/readme.md
@@ -0,0 +1,23 @@
+# Skeletons 新版骨架屏
+
+> **组件名:uv-skeletons**
+
+骨架屏一般用于页面在请求远程数据尚未完成时,在内容加载出来前展示与内容布局结构一致的灰白块,提升用户视觉体验。
+
+新版骨架屏与老版本使用参数有很大的区别,所以才有了新版本,无法替换老版本。
+
+新版骨架屏比老版本骨架屏更加灵活,理论上简单的左右上下布局结构均可以轻松实现,样式自由度较高,只要你会写css,推荐使用新版。
+
+# 查看文档
+
+## [下载完整示例项目](https://ext.dcloud.net.cn/plugin?name=uv-ui) (请不要 下载插件ZIP)
+
+### [更多插件,请关注uv-ui组件库](https://ext.dcloud.net.cn/plugin?name=uv-ui)
+
+
+
+
+
+
+
+#### 如使用过程中有任何问题反馈,或者您对uv-ui有一些好的建议,欢迎加入uv-ui官方交流群:官方QQ群
\ No newline at end of file