Commit 310caaa8 by 李伟康

Merge branch 'SAAS+V5.7.0' of http://192.168.3.233:8090/glsx/gl_tape into SAAS+V5.7.0

2 parents 8efa7378 08afab23
......@@ -523,6 +523,14 @@ module.exports = {
...data
})
},
// 新 学习中心 - 推荐课程
getRecommendCourseList(data) {
return http.post({
method: 'dj.api.pad.learning.center.myself.course.recommend',
projectName: 'pad',
...data
})
},
// 新 学习中心 - 查询考试分页接口
getExamPage(data) {
return http.post({
......
const target = ['ip', 'dev', 'uat', 'prod', 'beta']
const index = 3
const index = 2
/**
*
0本地
......
......@@ -11,6 +11,7 @@ class SQLite {
this.db = null
//注意:
this.dbPath = `_doc/${name}.db` // 存储数据库的完整路径
this.dbPath = `_doc/${name}.db` // 存储数据库的完整路径
// 初始化该数据库的队列(如果不存在)
if (!SQLite._queues[name]) {
SQLite._queues[name] = new TaskQueue(`SQLite:${name}`)
......
......@@ -91,7 +91,7 @@ export default {
pageSize
}
const res = await uni.$api.commonApi.getMyCourseList(params)
console.log("已完成课程",res);
if (pageNum == 1) {
this.completedCourseList = res.list
} else {
......@@ -128,6 +128,12 @@ export default {
}
let { pageNum, total, nothing = 'nothing', pageSize } = this;
// uni.$track.add({ eventCode: 'app_recommend_course', businessId: item.id, pagePath: '/pages/equity/index' })
let businessParam = {
courseId:item.courseId,
title:item.title
}
console.log("businessParamC",businessParam);
uni.$track.add({ eventCode: 'app_studyCourse_click', businessParam: businessParam })
uni.navigateTo({
url: `/pages/common/studyCenter/courseDetail?apiType=getMyCourseList&index=${index}&courseList=${encodeURIComponent(JSON.stringify(this.completedCourseList))}&pageNum=${pageNum}&pageSize=${pageSize}&total=${total}&learnStatus=2`
})
......
......@@ -128,6 +128,7 @@ export default {
} else {
this.taskList = this.taskList.concat(newList)
}
console.log("taskList",this.taskList);
uni.hideLoading()
this.total = res.total
this.nothing = res.length ? true : false
......@@ -164,7 +165,12 @@ export default {
return
}
let { pageNum, total, nothing = 'nothing', pageSize } = this;
// uni.$track.add({ eventCode: 'app_recommend_course', businessId: item.id, pagePath: '/pages/equity/index' })
let businessParam = {
courseId:item.courseId,
title:item.title
}
console.log("businessParam",businessParam);
uni.$track.add({ eventCode: 'app_studyCourse_click', businessParam: businessParam })
uni.navigateTo({
url: `/pages/common/studyCenter/courseDetail?apiType=getMyCourseList&index=${index}&courseList=${encodeURIComponent(JSON.stringify(this.taskList))}&pageNum=${pageNum}&pageSize=${pageSize}&total=${total}&learnStatus=1`
})
......
......@@ -179,6 +179,12 @@ export default {
}
let { pageNum, total, nothing = 'nothing', pageSize } = this;
// uni.$track.add({ eventCode: 'app_recommend_course', businessId: item.id, pagePath: '/pages/equity/index' })
let businessParam = {
courseId:item.courseId,
title:item.title
}
console.log("businessParam",businessParam);
uni.$track.add({ eventCode: 'app_studyCourse_click', businessParam: businessParam })
uni.navigateTo({
url: `/pages/common/studyCenter/courseDetail?apiType=getMyCourseList&index=${index}&courseList=${encodeURIComponent(JSON.stringify(this.recommendCourseList))}&pageNum=${pageNum}&pageSize=${pageSize}&total=${total}&learnStatus=0`
})
......
......@@ -37,6 +37,8 @@
<Studying v-else-if="currentTab === 1" ref="studying" :cardWidth="530" />
<!-- 已学完 tab:使用 CompletedCourse 组件 -->
<CompletedCourse v-else-if="currentTab === 2" ref="completedCourse" :cardWidth="530" />
<!-- 推荐学习 tab:使用 CompletedCourse 组件 -->
<RecommendClass v-else-if="currentTab === 3" ref="completedCourse" :cardWidth="530" />
</view>
</view>
</template>
......@@ -45,13 +47,15 @@
import ToLearnCourse from './components/ToLearnCourse.vue'
import Studying from './components/Studying.vue'
import CompletedCourse from './components/CompletedCourse.vue'
import RecommendClass from './components/RecommendClass.vue'
export default {
name: 'MyCoursePage',
components: {
ToLearnCourse,
Studying,
CompletedCourse
CompletedCourse,
RecommendClass
},
data() {
return {
......@@ -59,7 +63,8 @@ export default {
tabList: [
{ label: '待学习', count: '0', key: 'unLearnCount' },
{ label: '正在学习', count: '0', key: 'learningCount' },
{ label: '已学完', count: '0', key: 'completedCount' }
{ label: '已学完', count: '0', key: 'completedCount' },
{ label: '推荐学习', count: '0', key: 'recommendCount' }
],
residueInfo: {
remindType: 0
......
......@@ -841,17 +841,11 @@ export default {
// priceHistory 字段废弃:统一使用 priceHistoryByRound(按轮分组)
if (!Array.isArray(data.priceHistoryByRound)) data.priceHistoryByRound = []
// 规范化每轮数据:保证 priceHistoryList 为数组,且按 quoteTime 倒序(同一轮最新在前)
// 不再改变后端轮次顺序,保持后端返回的倒序(最新轮在最上方)
// 规范化每轮数据:保证 priceHistoryList 为数组,并保持接口返回的原始顺序
// 如需按时间排序,请在后端/调用方显式处理;这里不做二次排序,避免影响展示顺序
data.priceHistoryByRound = data.priceHistoryByRound.map(r => {
const list = Array.isArray(r?.priceHistoryList) ? r.priceHistoryList.filter(Boolean) : []
list.sort((a, b) => {
const ta = a?.quoteTime || ''
const tb = b?.quoteTime || ''
if (ta === tb) return 0
return ta < tb ? 1 : -1
})
const quoteTime = list[0]?.quoteTime || r?.quoteTime || ''
const quoteTime = r?.quoteTime || list[list.length - 1]?.quoteTime || ''
return {
...r,
roundNo: r?.roundNo,
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!