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