@@ -78,7 +80,7 @@
{[vod_tab]}
@@ -228,7 +230,26 @@ const app = createApp({
items.value = JSON.parse(sessionStorage.getItem('items'))||items.value;
hotsuggs.value = JSON.parse(sessionStorage.getItem('hotsuggs'))||hotsuggs.value;
}catch (e) {}
+
+ const iframeSrc = ref('');
+ const iframeShow = ref(false);
+
+ const methods = {
+ async lazyPlay(url){
+ iframeShow.value = true;
+ console.log('准备处理播放地址:'+url);
+ try {
+ const res = await axios.get(url,{maxRedirects: 0});
+ console.log(res.data);
+ }catch (e) {
+ console.log('抓到了错误:'+e.message);
+ console.log('iframeSrc.value:',iframeSrc.value);
+ iframeSrc.value = url;
+ }
+ },
+ };
return {
+ ...methods,
ctx:ctx,
items:items,
is_home:is_home,
@@ -243,6 +264,8 @@ const app = createApp({
vod_tabs:vod_tabs,
vod_urls:vod_urls,
fast_play:fast_play,
+ iframeSrc:iframeSrc,
+ iframeShow:iframeShow,
}
},
});
diff --git a/templates/cms/mxpro/homeContent.html b/templates/cms/mxpro/homeContent.html
index 69819dd..070e317 100644
--- a/templates/cms/mxpro/homeContent.html
+++ b/templates/cms/mxpro/homeContent.html
@@ -157,7 +157,7 @@ const app = createApp({
const ctx_str = "ctxObj={{ctx|safe}}";
eval(ctx_str);
- // console.log(ctxObj)
+ console.log(ctxObj)
const ctx = ref(ctxObj);
const items = ref({
@@ -175,7 +175,9 @@ const app = createApp({
try {
items.value = JSON.parse(sessionStorage.getItem('items'))||items.value;
hotsuggs.value = JSON.parse(sessionStorage.getItem('hotsuggs'))||hotsuggs.value;
- }catch (e) {}
+ }catch (e) {
+ console.log(e.message)
+ }
return {
ctx:ctx,
items:items,
diff --git a/templates/cms/mxpro/js/commonUI.js b/templates/cms/mxpro/js/commonUI.js
index 8814cda..f3fa53a 100644
--- a/templates/cms/mxpro/js/commonUI.js
+++ b/templates/cms/mxpro/js/commonUI.js
@@ -171,7 +171,7 @@ const stuHeaderComponent = {
const stuCategoryComponent = {
template: `
-
+
更多
@@ -193,7 +193,7 @@ const stuCategoryComponent = {
-
+
`,
setup(props, context) {
console.log('stuCategory组件加载完毕');
@@ -317,7 +317,7 @@ const stuLinksComponent = {
// console.log(props);
},
props:{
- links:[],
+ links:Array,
}, //配置需要传入的属性
delimiters: ['{[', ']}'],//delimiters:改变默认的插值符号
};