Commit 8b7b9046 by 胡悦

提交学习中心

1 parent ab1102a4

2.41 MB | W: | H:

2.41 MB | W: | H:

assets/images/sprite.png
assets/images/sprite.png
assets/images/sprite.png
assets/images/sprite.png
  • 2-up
  • Swipe
  • Onion skin
...@@ -263,8 +263,10 @@ export default { ...@@ -263,8 +263,10 @@ export default {
} }
if (this.firstIndex === 1) { if (this.firstIndex === 1) {
params.readFlag = false params.readFlag = false
params.statusList = [1,2,3,4]
} else if (this.firstIndex === 2) { } else if (this.firstIndex === 2) {
params.readFlag = true params.readFlag = true
params.statusList = [5]
} }
if (search) params.search = search if (search) params.search = search
const res = await uni.$api.commonApi.getStudyCenterList(params) const res = await uni.$api.commonApi.getStudyCenterList(params)
...@@ -529,7 +531,6 @@ export default { ...@@ -529,7 +531,6 @@ export default {
flex-wrap: wrap; flex-wrap: wrap;
gap: toRpx(48); gap: toRpx(48);
padding: 0 toRpx(64) toRpx(24); padding: 0 toRpx(64) toRpx(24);
margin-top: toRpx(24);
} }
.message-list { .message-list {
...@@ -537,6 +538,7 @@ export default { ...@@ -537,6 +538,7 @@ export default {
background-color: #fff; background-color: #fff;
border-radius: 0 0 toRpx(48) toRpx(48); border-radius: 0 0 toRpx(48) toRpx(48);
// height: calc(100% - #{toRpx(400)}); // height: calc(100% - #{toRpx(400)});
margin-top: toRpx(24);
&.scroll-list { &.scroll-list {
height: calc(100% - #{toRpx(400)}); height: calc(100% - #{toRpx(400)});
} }
...@@ -544,6 +546,7 @@ export default { ...@@ -544,6 +546,7 @@ export default {
&.class-scroll { &.class-scroll {
height: calc(100% - #{toRpx(336)}); height: calc(100% - #{toRpx(336)});
} }
.message-item { .message-item {
width: calc((100% - #{toRpx(144)}) / 4); width: calc((100% - #{toRpx(144)}) / 4);
border-radius: toRpx(24); border-radius: toRpx(24);
...@@ -640,7 +643,7 @@ export default { ...@@ -640,7 +643,7 @@ export default {
/deep/ { /deep/ {
.uni-scroll-view-content { .uni-scroll-view-content {
height: calc(100% - #{toRpx(10)}); height: calc(100% - #{toRpx(20)});
} }
} }
</style> </style>
...@@ -201,6 +201,7 @@ export default { ...@@ -201,6 +201,7 @@ export default {
} }
}, },
handleOperation(val, data) { handleOperation(val, data) {
console.log(val, data, 'val, data')
const { type } = val; const { type } = val;
// 提取公共的webview设置逻辑 // 提取公共的webview设置逻辑
...@@ -224,7 +225,7 @@ export default { ...@@ -224,7 +225,7 @@ export default {
// 处理课程详情 // 处理课程详情
const handleCourseDetail = () => { const handleCourseDetail = () => {
const COURSE_ID = '80cb90d7-1609-4360-8f23-6c47ddba41c0'; const COURSE_ID = val.data.courseId;
const baseUrl = 'https://cloud.italent.cn/PageHome/Index'; const baseUrl = 'https://cloud.italent.cn/PageHome/Index';
const params = { const params = {
product: 'Learning', product: 'Learning',
...@@ -247,18 +248,19 @@ export default { ...@@ -247,18 +248,19 @@ export default {
case 'openCourse': case 'openCourse':
this.showBeisen = true; this.showBeisen = true;
setWebviewStyle(); setWebviewStyle();
this.getStudyCenterRead(data.id)
break; break;
case 'courseDetail': case 'courseDetail':
handleCourseDetail(); handleCourseDetail();
this.showBeisen = true; this.showBeisen = true;
setWebviewStyle(); setWebviewStyle();
this.getStudyCenterRead(val.data.id)
break; break;
} }
}, },
// 学习中心修改阅读状态,打开后才修改 // 学习中心修改阅读状态,打开后才修改
async getStudyCenterRead(id) { async getStudyCenterRead(id) {
console.log(id, 'getStudyCenterRead')
const res = await uni.$api.commonApi.getStudyCenterRead({ id }) const res = await uni.$api.commonApi.getStudyCenterRead({ id })
console.log(res) console.log(res)
} }
......
...@@ -95,7 +95,8 @@ const PAGE_NUM = 1 ...@@ -95,7 +95,8 @@ const PAGE_NUM = 1
const CONTRNT_TYPE = { const CONTRNT_TYPE = {
1: '图文', 1: '图文',
2: '视频', 2: '视频',
3: 'PDF' 3: 'PDF',
5: '学习任务'
} }
import dayjs from 'dayjs' import dayjs from 'dayjs'
export default { export default {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!