组件页面bug修复
This commit is contained in:
parent
437b64698b
commit
023ba362e6
@ -57,6 +57,7 @@ def web_index(web_name, theme):
|
||||
ctx['pg'] = pg
|
||||
ctx['tid'] = tid
|
||||
ctx['tname'] = tname
|
||||
print('tid:',tid)
|
||||
|
||||
try:
|
||||
if vod_id and vod_name:
|
||||
|
||||
@ -1 +1 @@
|
||||
3.9.41beta20
|
||||
3.9.41beta21
|
||||
@ -491,7 +491,7 @@ a {
|
||||
font-weight: bold;
|
||||
font-size: 1rem;
|
||||
width: 290px;
|
||||
height: 26;
|
||||
height: 26px;
|
||||
border-radius: 25px;
|
||||
color: #eeeff9;
|
||||
background-color: rgb(71, 143, 250);
|
||||
|
||||
@ -195,6 +195,16 @@
|
||||
$('#lives').click(function () {
|
||||
location.href = '/admin/lives'
|
||||
});
|
||||
$("summary").click(function() {
|
||||
// console.log('summary被点击');
|
||||
const details = $('details');
|
||||
if(details.attr("open")){
|
||||
$(this).text('数据列表已隐藏 点击展开详情');
|
||||
}else{
|
||||
$(this).text('数据列表已展开 点击隐藏详情');
|
||||
}
|
||||
details.click();
|
||||
});
|
||||
|
||||
});
|
||||
function getFileSize(fileObj) {
|
||||
|
||||
@ -2,9 +2,10 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>{{ctx.tname}} - {{ctx.web_name}}</title>
|
||||
<meta name="referrer" content="no-referrer" />
|
||||
<meta name="keywords" content="电影,电影大全,电影天堂,最新电影,好看的电影,电影排行榜" />
|
||||
<meta name="description" content="为您提供更新电影、好看的电影排行榜及电影迅雷下载,免费在线观看伦理电影、动作片、喜剧片、爱情片、搞笑片等全新电影。" />
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE10" />
|
||||
<meta name="renderer" content="webkit|ie-comp|ie-stand">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
|
||||
@ -23,6 +24,7 @@
|
||||
<script src="/static/js/eruda.js"></script>
|
||||
|
||||
<script src="/web/cms/mxpro/js/commonUI.js"></script>
|
||||
<link rel="stylesheet" href="/web/cms/mxpro/css/commonUI.css" type="text/css"/>
|
||||
<script>var maccms={"path":"","mid":"1","url":"5imv.cc","wapurl":"www.5imv.cc","mob_status":"2"};</script>
|
||||
<!--[if lt IE 9]>
|
||||
<script src="/web/cms/mxpro/js/html5shiv.min.js"></script>
|
||||
@ -36,7 +38,7 @@
|
||||
<div class="stui-pannel">
|
||||
<div class="stui-pannel__hd">
|
||||
<!--vue组件-头部导航-->
|
||||
<stu-header :ctx="ctx" :items="items" :hotsuggs="hotsuggs" :tid="tid" :isHome="isHome"></stu-header>
|
||||
<stu-header :ctx="ctx" :items="items" :hotsuggs="hotsuggs" :tid="tid" :is_home="is_home"></stu-header>
|
||||
</div>
|
||||
|
||||
<div class="stui-pannel__bd clearfix">
|
||||
@ -56,13 +58,13 @@
|
||||
<ul class="stui-vodlist clearfix">
|
||||
<li v-for="item in sitems.list">
|
||||
<div class="stui-vodlist__box">
|
||||
<a class="stui-vodlist__thumb lazyload" :href="'{{ctx.path}}?vod_id='+item.vod_id+'&vod_name='+item.vod_name" :title="item.vod_name" :data-original="item.vod_pic">
|
||||
<a class="stui-vodlist__thumb lazyload" :href="'{{ctx.path}}?vod_id='+item.vod_id+'&vod_name='+item.vod_name+'&tid='+tid" :title="item.vod_name" :data-original="item.vod_pic">
|
||||
<span class="play hidden-xs"></span>
|
||||
<span class="pic-text1 text-right"><b>{[item.type_name]}</b></span>
|
||||
<span class="pic-text text-right"><b>{[item.vod_remarks]}</b></span>
|
||||
</a>
|
||||
<div class="stui-vodlist__detail">
|
||||
<h4 class="title text-overflow"><a :href="'{{ctx.path}}?vod_id='+item.vod_id+'&vod_name='+item.vod_name" :title="item.vod_name">{[item.vod_name]}</a></h4>
|
||||
<h4 class="title text-overflow"><a :href="'{{ctx.path}}?vod_id='+item.vod_id+'&vod_name='+item.vod_name+'&tid='+tid" :title="item.vod_name">{[item.vod_name]}</a></h4>
|
||||
<p class="text text-overflow text-muted hidden-xs">{[item.vod_content]}</p>
|
||||
</div>
|
||||
</div>
|
||||
@ -178,15 +180,15 @@ const app = createApp({
|
||||
});
|
||||
|
||||
const now_pages = computed(() => {
|
||||
console.log('计算now_pages:',(Number(pg)+10));
|
||||
// console.log('计算now_pages:',(Number(pg)+10));
|
||||
let start = (Number(pg)-5)>0?(Number(pg)-5):1;
|
||||
let end = (Number(pg)+5) > start+5?start+5:(Number(pg)+5);
|
||||
let end = (Number(pg)+5) > start+10?start+10:(Number(pg)+5);
|
||||
let rangeArr = Array.from({ length: end - start + 1 }, (_, i) => start + i);
|
||||
console.log(rangeArr);
|
||||
// console.log(rangeArr);
|
||||
return rangeArr
|
||||
});
|
||||
|
||||
const isHome = ref(false);
|
||||
const is_home = ref(false);
|
||||
|
||||
try {
|
||||
items.value = JSON.parse(sessionStorage.getItem('items'))||items.value;
|
||||
@ -208,7 +210,7 @@ const app = createApp({
|
||||
next_page:next_page,
|
||||
vod_id:vod_id,
|
||||
vod_name:vod_name,
|
||||
isHome:isHome,
|
||||
is_home:is_home,
|
||||
}
|
||||
},
|
||||
});
|
||||
@ -221,11 +223,11 @@ axios.defaults.headers.post['Content-Type'] = 'application/json';
|
||||
axios.defaults.timeout = 5000;
|
||||
app.config.globalProperties.$http = axios;
|
||||
console.log('---这里最先执行---');
|
||||
app.component('copy-right', copyrightComponent);
|
||||
app.component('foot-button', footbuttonComponent);
|
||||
app.component('note-popup', notepopupComponent);
|
||||
app.component('stu-header', stuheaderComponent);
|
||||
app.component('stu-filter', stufilterComponent);
|
||||
app.component('copy-right', copyRightComponent);
|
||||
app.component('foot-button', footButtonComponent);
|
||||
app.component('note-popup', notePopup);
|
||||
app.component('stu-header', stuHeaderComponent);
|
||||
app.component('stu-filter', stuFilterComponent);
|
||||
app.mount('#app');
|
||||
eruda.init();
|
||||
|
||||
|
||||
3
templates/cms/mxpro/css/commonUI.css
Normal file
3
templates/cms/mxpro/css/commonUI.css
Normal file
@ -0,0 +1,3 @@
|
||||
a.links{
|
||||
margin-right: 5px;
|
||||
}
|
||||
@ -2,6 +2,7 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>{{ctx.vod_name}}详情介绍-{{ctx.vod_name}}在线观看-{{ctx.vod_name}}迅雷下载 - {{ctx.web_name}}</title>
|
||||
<meta name="referrer" content="no-referrer" />
|
||||
<meta name="keywords" content="{{ctx.vod_name}}在线收看,{{ctx.vod_name}}迅雷下载" />
|
||||
<meta name="description" content="{{ctx.vod_name}}剧情:" />
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
@ -22,6 +23,7 @@
|
||||
<script src="/static/js/eruda.js"></script>
|
||||
|
||||
<script src="/web/cms/mxpro/js/commonUI.js"></script>
|
||||
<link rel="stylesheet" href="/web/cms/mxpro/css/commonUI.css" type="text/css" />
|
||||
<script>var maccms={"path":"","mid":"1","url":"5imv.cc","wapurl":"www.5imv.cc","mob_status":"2"};</script>
|
||||
<!--[if lt IE 9]>
|
||||
<script src="/web/cms/mxpro/js/html5shiv.min.js"></script>
|
||||
@ -32,7 +34,7 @@
|
||||
<body>
|
||||
<div id="app">
|
||||
<!--vue组件-头部导航-->
|
||||
<stu-header :ctx="ctx" :items="items" :hotsuggs="hotsuggs"></stu-header>
|
||||
<stu-header :ctx="ctx" :items="items" :hotsuggs="hotsuggs" :is_home="is_home" :tid="tid"></stu-header>
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
@ -164,6 +166,7 @@ const app = createApp({
|
||||
const {self, proxy} = getCurrentInstance();
|
||||
const web_name = '{{ctx.web_name}}';
|
||||
const pwd = '{{ctx.pwd}}';
|
||||
const tid = '{{ctx.tid}}';
|
||||
const vod_id = '{{ctx.vod_id}}';
|
||||
const vod_name = '{{ctx.vod_name}}';
|
||||
console.log(web_name);
|
||||
@ -220,7 +223,7 @@ const app = createApp({
|
||||
console.log('fast_play');
|
||||
return vod_urls.value&&vod_urls.value.length>0?vod_urls.value[0][0].url:'';
|
||||
});
|
||||
|
||||
const is_home = ref(true);
|
||||
try {
|
||||
items.value = JSON.parse(sessionStorage.getItem('items'))||items.value;
|
||||
hotsuggs.value = JSON.parse(sessionStorage.getItem('hotsuggs'))||hotsuggs.value;
|
||||
@ -228,8 +231,10 @@ const app = createApp({
|
||||
return {
|
||||
ctx:ctx,
|
||||
items:items,
|
||||
is_home:is_home,
|
||||
hotsuggs:hotsuggs,
|
||||
web_name:web_name,
|
||||
tid:tid,
|
||||
vod_id:vod_id,
|
||||
vod_name:vod_name,
|
||||
details:details,
|
||||
@ -250,10 +255,10 @@ axios.defaults.headers.post['Content-Type'] = 'application/json';
|
||||
axios.defaults.timeout = 5000;
|
||||
app.config.globalProperties.$http = axios;
|
||||
console.log('---这里最先执行---');
|
||||
app.component('copy-right', copyrightComponent);
|
||||
app.component('foot-button', footbuttonComponent);
|
||||
app.component('note-popup', notepopupComponent);
|
||||
app.component('stu-header', stuheaderComponent);
|
||||
app.component('copy-right', copyRightComponent);
|
||||
app.component('foot-button', footButtonComponent);
|
||||
app.component('note-popup', notePopup);
|
||||
app.component('stu-header', stuHeaderComponent);
|
||||
app.mount('#app');
|
||||
eruda.init();
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -1,4 +1,4 @@
|
||||
const copyrightComponent = {
|
||||
const copyRightComponent = {
|
||||
template:`
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
@ -27,8 +27,8 @@ const copyrightComponent = {
|
||||
</div>
|
||||
`,
|
||||
setup(props, context) {
|
||||
console.log('copyright组件加载完毕');
|
||||
console.log(props);
|
||||
console.log('copyRight组件加载完毕');
|
||||
// console.log(props);
|
||||
},
|
||||
props:{
|
||||
path:'',
|
||||
@ -37,7 +37,7 @@ const copyrightComponent = {
|
||||
delimiters: ['{[', ']}'],//delimiters:改变默认的插值符号
|
||||
};
|
||||
|
||||
const footbuttonComponent = {
|
||||
const footButtonComponent = {
|
||||
template: `
|
||||
<div class="fixed_right_bar">
|
||||
<div style="margin-top:3px;cursor: pointer;" class="copylink" >
|
||||
@ -54,14 +54,14 @@ const footbuttonComponent = {
|
||||
</div>
|
||||
`,
|
||||
setup(props, context) {
|
||||
console.log('footbutton组件加载完毕');
|
||||
console.log('footButton组件加载完毕');
|
||||
// console.log(props);
|
||||
},
|
||||
props:{}, //配置需要传入的属性
|
||||
delimiters: ['{[', ']}'],//delimiters:改变默认的插值符号
|
||||
};
|
||||
|
||||
const notepopupComponent = {
|
||||
const notePopup = {
|
||||
template: `
|
||||
<div class="hide"></div>
|
||||
<div class="popup" id="note" style="display: none;">
|
||||
@ -79,8 +79,8 @@ const notepopupComponent = {
|
||||
<div class="popup-footer"><span class="popup-btn" onclick="closeclick()">我记住啦</span></div>
|
||||
</div>`,
|
||||
setup(props, context) {
|
||||
console.log('note-popup组件加载完毕');
|
||||
console.log(props);
|
||||
console.log('notePopup组件加载完毕');
|
||||
// console.log(props);
|
||||
},
|
||||
props:{
|
||||
path:'',
|
||||
@ -89,7 +89,7 @@ const notepopupComponent = {
|
||||
delimiters: ['{[', ']}'],//delimiters:改变默认的插值符号
|
||||
};
|
||||
|
||||
const stuheaderComponent = {
|
||||
const stuHeaderComponent = {
|
||||
template: `
|
||||
<header class="stui-header clearfix">
|
||||
<div class="container">
|
||||
@ -114,7 +114,7 @@ const stuheaderComponent = {
|
||||
<li>
|
||||
<a href="javascript:;"><i class="iconfont icon-viewgallery"></i></a>
|
||||
<ul class="dropdown type clearfix">
|
||||
<li :class="{ active: !!isHome }"><a :href="ctx.path">首页</a></li>
|
||||
<li :class="{ active: !!is_home && !tid }"><a :href="ctx.path">首页</a></li>
|
||||
<li v-for="item in items.class" :class="{ active: tid == item.type_id }">
|
||||
<a :href="ctx.path+'?tid='+item.type_id+'&tname='+item.type_name">{[item.type_name]}</a>
|
||||
</li>
|
||||
@ -144,7 +144,7 @@ const stuheaderComponent = {
|
||||
<a class="logo" :href="ctx.path"></a>
|
||||
</div>
|
||||
<ul class="stui-header__menu">
|
||||
<li :class="{ active: !!isHome }"><a :href="ctx.path">首页</a></li>
|
||||
<li :class="{ active: !!is_home }"><a :href="ctx.path">首页</a></li>
|
||||
<li v-for="item in items.class" :class="{ active: tid == item.type_id }">
|
||||
<a :href="ctx.path+'?tid='+item.type_id+'&tname='+item.type_name">{[item.type_name]}</a>
|
||||
</li>
|
||||
@ -156,20 +156,57 @@ const stuheaderComponent = {
|
||||
|
||||
`,
|
||||
setup(props, context) {
|
||||
console.log('stuheader组件加载完毕');
|
||||
console.log(props);
|
||||
console.log('stuHeader组件加载完毕');
|
||||
// console.log(props);
|
||||
},
|
||||
props:{
|
||||
ctx:{},
|
||||
items:{class:[],list:[]},
|
||||
hotsuggs:{data:[]},
|
||||
tid:String,
|
||||
isHome:Boolean,
|
||||
is_home:Boolean,
|
||||
}, //配置需要传入的属性
|
||||
delimiters: ['{[', ']}'],//delimiters:改变默认的插值符号
|
||||
};
|
||||
|
||||
const stubannerComponent = {
|
||||
const stuCategoryComponent = {
|
||||
template: `
|
||||
<v v-for="item in items.class">
|
||||
<div class="stui-vodlist__head">
|
||||
<a class="pull-right" :href="ctx.path+'?tid='+item.type_id+'&tname='+item.type_name">更多 <i class="iconfont icon-more"></i></a>
|
||||
<p>
|
||||
</p>
|
||||
<h3><a :href="ctx.path+'?tid='+item.type_id+'&tname='+item.type_name"><i class="iconfont icon-all"></i> {[item.type_name]}</a></h3>
|
||||
</div>
|
||||
<ul class="stui-vodlist clearfix">
|
||||
<li style="display: none">
|
||||
<div class="stui-vodlist__box">
|
||||
<a class="stui-vodlist__thumb lazyload" href="/v/107952/" title="侠盗之簪花乱" data-original="">
|
||||
<span class="play hidden-xs"></span>
|
||||
<span class="pic-text1 text-right"><b>电影</b></span>
|
||||
<span class="pic-text text-right"><b>HD国语</b></span>
|
||||
</a>
|
||||
<div class="stui-vodlist__detail">
|
||||
<h4 class="title text-overflow"><a href="/v/107952/" title="侠盗之簪花乱">侠盗之簪花乱</a></h4>
|
||||
<p class="text text-overflow text-muted hidden-xs">冯建宇林妍柔</p>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</v>
|
||||
`,
|
||||
setup(props, context) {
|
||||
console.log('stuCategory组件加载完毕');
|
||||
// console.log(props);
|
||||
},
|
||||
props:{
|
||||
ctx:{},
|
||||
items:{class:[],list:[]},
|
||||
}, //配置需要传入的属性
|
||||
delimiters: ['{[', ']}'],//delimiters:改变默认的插值符号
|
||||
};
|
||||
|
||||
const stuBannerComponent = {
|
||||
template:`
|
||||
<div class="stui-pannel__bd">
|
||||
<div class="carousel carousel_default flickity-page">
|
||||
@ -194,8 +231,8 @@ const stubannerComponent = {
|
||||
|
||||
`,
|
||||
setup(props, context) {
|
||||
console.log('stubanner组件加载完毕');
|
||||
console.log(props);
|
||||
console.log('stuBanner组件加载完毕');
|
||||
// console.log(props);
|
||||
},
|
||||
props:{
|
||||
ctx:{},
|
||||
@ -203,9 +240,9 @@ const stubannerComponent = {
|
||||
hotsuggs:{data:[]},
|
||||
}, //配置需要传入的属性
|
||||
delimiters: ['{[', ']}'],//delimiters:改变默认的插值符号
|
||||
}
|
||||
};
|
||||
|
||||
const stufilterComponent = {
|
||||
const stuFilterComponent = {
|
||||
template:`
|
||||
<div class="item" id="screenbox" style="display: none;">
|
||||
<!-- 筛选 -->
|
||||
@ -223,15 +260,15 @@ const stufilterComponent = {
|
||||
</div>
|
||||
`,
|
||||
setup(props, context) {
|
||||
console.log('stufilter组件加载完毕');
|
||||
console.log('stuFilter组件加载完毕');
|
||||
// console.log(props);
|
||||
const items = props.items;
|
||||
const tid = props.tid;
|
||||
const now_filters = computed(() => {
|
||||
console.log('计算now_filters');
|
||||
// console.log('计算now_filters');
|
||||
// items.value.class.find(it=>it.type_id===tid);
|
||||
let now_filters = items&&items.filters? items.filters[tid]:[];
|
||||
console.log(now_filters);
|
||||
// console.log(now_filters);
|
||||
return now_filters
|
||||
});
|
||||
return {
|
||||
@ -246,11 +283,52 @@ const stufilterComponent = {
|
||||
item:{},
|
||||
}, //配置需要传入的属性
|
||||
delimiters: ['{[', ']}'],//delimiters:改变默认的插值符号
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
const stuTopicComponent = {
|
||||
template:`
|
||||
<div class="stui-vodlist__head">
|
||||
<h3><a :href="link"><i class="iconfont icon-all"></i> 最新专题</a></h3>
|
||||
</div>
|
||||
<ul class="stui-vodlist clearfix">
|
||||
</ul>
|
||||
`,
|
||||
setup(props, context) {
|
||||
console.log('stuTopic组件加载完毕');
|
||||
// console.log(props);
|
||||
},
|
||||
props:{
|
||||
link:'',
|
||||
}, //配置需要传入的属性
|
||||
delimiters: ['{[', ']}'],//delimiters:改变默认的插值符号
|
||||
};
|
||||
|
||||
const stuLinksComponent = {
|
||||
template:`
|
||||
<ul class="stui-link__text clearfix">
|
||||
<li><span>友情链接:</span>
|
||||
<a v-for='link in links' :href="link.url" class="links" target="_blank">{[link.name]}</a>
|
||||
</li>
|
||||
</ul>
|
||||
`,
|
||||
setup(props, context) {
|
||||
console.log('stuLinks组件加载完毕');
|
||||
// console.log(props);
|
||||
},
|
||||
props:{
|
||||
links:[],
|
||||
}, //配置需要传入的属性
|
||||
delimiters: ['{[', ']}'],//delimiters:改变默认的插值符号
|
||||
};
|
||||
|
||||
//下面的注册组件方法无法使用,需要在app里去注册
|
||||
// Vue.component('copy-right', copyrightComponent);
|
||||
// Vue.component('foot-button', footbuttonComponent);
|
||||
// Vue.component('note-popup', notepopupComponent);
|
||||
// Vue.component('stu-header', stuheaderComponent);
|
||||
// Vue.component('stu-banner', stubannerComponent);
|
||||
// Vue.component('copy-right', copyRightComponent);
|
||||
// Vue.component('foot-button', footButtonComponent);
|
||||
// Vue.component('note-popup', notePopup);
|
||||
// Vue.component('stu-header', stuHeaderComponent);
|
||||
// Vue.component('stu-banner', stuBannerComponent);
|
||||
|
||||
/*注意事项
|
||||
封装组件过程中传递属性名称一定不能含有大写,比如isHome会被强制识别为is-home,所以应该传递为is_home
|
||||
*/
|
||||
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user