|
@@ -793,8 +793,8 @@ export default {
|
|
DESC: "startTime"
|
|
DESC: "startTime"
|
|
};
|
|
};
|
|
this.$api.lessonRecord.getLessonListAll(params).then(
|
|
this.$api.lessonRecord.getLessonListAll(params).then(
|
|
- (res) => {
|
|
|
|
- this.recentRcdList = res.lessonRecords;
|
|
|
|
|
|
+ async (res) => {
|
|
|
|
+ this.recentRcdList = await this.getCoverImg(res.lessonRecords)
|
|
|
|
|
|
let schoolSasInfo = {};
|
|
let schoolSasInfo = {};
|
|
let sBlobInfo = this.$store.state.user.schoolProfile;
|
|
let sBlobInfo = this.$store.state.user.schoolProfile;
|
|
@@ -809,12 +809,11 @@ export default {
|
|
// privateSasInfo.name = listType === 'school' ? this.$store.state.userInfo.schoolCode : this.$store.state.userInfo.TEAMModelId
|
|
// privateSasInfo.name = listType === 'school' ? this.$store.state.userInfo.schoolCode : this.$store.state.userInfo.TEAMModelId
|
|
// privateSasInfo.url = pBlobInfo.blob_uri.slice(0, pBlobInfo.blob_uri.lastIndexOf(privateSasInfo.name) - 1)
|
|
// privateSasInfo.url = pBlobInfo.blob_uri.slice(0, pBlobInfo.blob_uri.lastIndexOf(privateSasInfo.name) - 1)
|
|
privateSasInfo.url = pBlobInfo.blob_uri;
|
|
privateSasInfo.url = pBlobInfo.blob_uri;
|
|
- this.recentRcdList.forEach((item) => {
|
|
|
|
- let sasInfo =
|
|
|
|
- item.scope == "school" ? schoolSasInfo : privateSasInfo;
|
|
|
|
|
|
+ /* this.recentRcdList = .forEach((item) => {
|
|
|
|
+ let sasInfo = item.scope == "school" ? schoolSasInfo : privateSasInfo;
|
|
// item.poster = `${sasInfo.url}/${sasInfo.name}/records/${item.id}/Record/CoverImage.jpg${sasInfo.sas}`
|
|
// item.poster = `${sasInfo.url}/${sasInfo.name}/records/${item.id}/Record/CoverImage.jpg${sasInfo.sas}`
|
|
- item.poster = `${sasInfo.url}/records/${item.id}/Record/CoverImage.jpg${sasInfo.sas}`;
|
|
|
|
- });
|
|
|
|
|
|
+ item.poster = `${sasInfo.url}/records/${item.id}/Memo/${item}.jpg${sasInfo.sas}`;
|
|
|
|
+ }); */
|
|
this.recentRcdList.sort((a, b) => {
|
|
this.recentRcdList.sort((a, b) => {
|
|
return b.startTime - a.startTime;
|
|
return b.startTime - a.startTime;
|
|
});
|
|
});
|
|
@@ -825,6 +824,42 @@ export default {
|
|
}
|
|
}
|
|
);
|
|
);
|
|
},
|
|
},
|
|
|
|
+ getCoverImg(lists) {
|
|
|
|
+ return new Promise(async (resolve, reject) => {
|
|
|
|
+ let promiseArr = []
|
|
|
|
+
|
|
|
|
+ let schoolSasInfo = {}
|
|
|
|
+ let sBlobInfo = this.$store.state.user.schoolProfile
|
|
|
|
+ schoolSasInfo.sas = "?" + sBlobInfo.blob_sas
|
|
|
|
+ schoolSasInfo.url = sBlobInfo.blob_uri
|
|
|
|
+
|
|
|
|
+ let privateSasInfo = {}
|
|
|
|
+ let pBlobInfo = this.$store.state.user.userProfile
|
|
|
|
+ privateSasInfo.sas = "?" + pBlobInfo.blob_sas
|
|
|
|
+ privateSasInfo.url = pBlobInfo.blob_uri
|
|
|
|
+
|
|
|
|
+ lists.forEach((item, index) => {
|
|
|
|
+ promiseArr.push(new Promise(async (r, j) => {
|
|
|
|
+ let imageCover = ''
|
|
|
|
+ let sasInfo = item.scope == "school" ? schoolSasInfo : privateSasInfo
|
|
|
|
+ try {
|
|
|
|
+ let url = `${sasInfo.url}/records/${item.id}/IES/TimeLine.json${sasInfo.sas}`
|
|
|
|
+ let res = JSON.parse(await this.$tools.getFile(url))
|
|
|
|
+ let pgids = res.PgIdList || []
|
|
|
|
+ imageCover = `${sasInfo.url}/records/${item.id}/Memo/${pgids[0]}.jpg${sasInfo.sas}`
|
|
|
|
+ } catch (e) {
|
|
|
|
+ }
|
|
|
|
+ item.poster = imageCover
|
|
|
|
+ r(item)
|
|
|
|
+ }))
|
|
|
|
+ })
|
|
|
|
+ Promise.all(promiseArr).then(res => {
|
|
|
|
+ resolve(res)
|
|
|
|
+ }).catch(err => {
|
|
|
|
+ reject(err)
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+ },
|
|
openPlatform(index) {
|
|
openPlatform(index) {
|
|
let url = this.platformList[index].url;
|
|
let url = this.platformList[index].url;
|
|
window.open(/^(http:|https:)/i.test(url) ? url : "http://" + url);
|
|
window.open(/^(http:|https:)/i.test(url) ? url : "http://" + url);
|