|
@@ -179,7 +179,10 @@ export default defineComponent({
|
|
|
const material = materialList[j];
|
|
|
//请求本地缓存
|
|
|
if (browserInfo.isApp && ['VIDEO', 'IMG'].includes(material.typeCode)) {
|
|
|
- const localData = await getCacheFilePath(material);
|
|
|
+ const localData: any =
|
|
|
+ state.platformType === 'STUDENT'
|
|
|
+ ? await getCacheFilePath(material)
|
|
|
+ : {};
|
|
|
if (localData?.content?.localPath) {
|
|
|
material.url = material.content;
|
|
|
material.content = localData.content.localPath;
|
|
@@ -340,18 +343,20 @@ export default defineComponent({
|
|
|
await getDetail();
|
|
|
const hasFree = String(data.detail?.accessScope) === '0';
|
|
|
if (!hasFree) {
|
|
|
- const hasVip = handleCheckVip();
|
|
|
- if (!hasVip) {
|
|
|
- nextTick(() => {
|
|
|
- postMessage({
|
|
|
- api: 'courseLoading',
|
|
|
- content: {
|
|
|
- show: false,
|
|
|
- type: 'fullscreen'
|
|
|
- }
|
|
|
+ if (state.platformType === 'STUDENT') {
|
|
|
+ const hasVip = handleCheckVip();
|
|
|
+ if (!hasVip) {
|
|
|
+ nextTick(() => {
|
|
|
+ postMessage({
|
|
|
+ api: 'courseLoading',
|
|
|
+ content: {
|
|
|
+ show: false,
|
|
|
+ type: 'fullscreen'
|
|
|
+ }
|
|
|
+ });
|
|
|
});
|
|
|
- });
|
|
|
- return;
|
|
|
+ return;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
// getCourseSchedule();
|