完成一级页面
This commit is contained in:
parent
5fbd0a1a3f
commit
437b64698b
@ -50,11 +50,13 @@ def web_index(web_name, theme):
|
|||||||
wd = getParmas('wd')
|
wd = getParmas('wd')
|
||||||
pg = getParmas('pg') or '1'
|
pg = getParmas('pg') or '1'
|
||||||
tid = getParmas('tid')
|
tid = getParmas('tid')
|
||||||
|
tname = getParmas('tname')
|
||||||
ctx['vod_id'] = vod_id
|
ctx['vod_id'] = vod_id
|
||||||
ctx['vod_name'] = vod_name
|
ctx['vod_name'] = vod_name
|
||||||
ctx['wd'] = wd
|
ctx['wd'] = wd
|
||||||
ctx['pg'] = pg
|
ctx['pg'] = pg
|
||||||
ctx['tid'] = tid
|
ctx['tid'] = tid
|
||||||
|
ctx['tname'] = tname
|
||||||
|
|
||||||
try:
|
try:
|
||||||
if vod_id and vod_name:
|
if vod_id and vod_name:
|
||||||
|
|||||||
@ -1 +1 @@
|
|||||||
3.9.41beta19
|
3.9.41beta20
|
||||||
File diff suppressed because one or more lines are too long
@ -161,7 +161,7 @@ const app = createApp({
|
|||||||
|
|
||||||
console.log('---setup---');
|
console.log('---setup---');
|
||||||
//获取当前实例
|
//获取当前实例
|
||||||
// const {ctx, proxy} = getCurrentInstance();
|
const {self, proxy} = getCurrentInstance();
|
||||||
const web_name = '{{ctx.web_name}}';
|
const web_name = '{{ctx.web_name}}';
|
||||||
const pwd = '{{ctx.pwd}}';
|
const pwd = '{{ctx.pwd}}';
|
||||||
const vod_id = '{{ctx.vod_id}}';
|
const vod_id = '{{ctx.vod_id}}';
|
||||||
|
|||||||
@ -40,7 +40,7 @@
|
|||||||
<div class="stui-pannel">
|
<div class="stui-pannel">
|
||||||
<div class="stui-pannel__hd">
|
<div class="stui-pannel__hd">
|
||||||
<!--vue组件-头部导航-->
|
<!--vue组件-头部导航-->
|
||||||
<stu-header :ctx="ctx" :items="items" :hotsuggs="hotsuggs"></stu-header>
|
<stu-header :ctx="ctx" :items="items" :hotsuggs="hotsuggs" :isHome="isHome"></stu-header>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!--vue组件-轮播图-->
|
<!--vue组件-轮播图-->
|
||||||
@ -260,7 +260,7 @@ const app = createApp({
|
|||||||
|
|
||||||
console.log('---setup---');
|
console.log('---setup---');
|
||||||
//获取当前实例
|
//获取当前实例
|
||||||
// const {ctx, proxy} = getCurrentInstance();
|
const {self, proxy} = getCurrentInstance();
|
||||||
const web_name = '{{ctx.web_name}}';
|
const web_name = '{{ctx.web_name}}';
|
||||||
const pwd = '{{ctx.pwd}}';
|
const pwd = '{{ctx.pwd}}';
|
||||||
console.log(web_name);
|
console.log(web_name);
|
||||||
@ -280,6 +280,7 @@ const app = createApp({
|
|||||||
const hotsuggs = ref({
|
const hotsuggs = ref({
|
||||||
data:[]
|
data:[]
|
||||||
});
|
});
|
||||||
|
const isHome = ref(true);
|
||||||
try {
|
try {
|
||||||
items.value = JSON.parse(sessionStorage.getItem('items'))||items.value;
|
items.value = JSON.parse(sessionStorage.getItem('items'))||items.value;
|
||||||
hotsuggs.value = JSON.parse(sessionStorage.getItem('hotsuggs'))||hotsuggs.value;
|
hotsuggs.value = JSON.parse(sessionStorage.getItem('hotsuggs'))||hotsuggs.value;
|
||||||
@ -288,7 +289,8 @@ const app = createApp({
|
|||||||
ctx:ctx,
|
ctx:ctx,
|
||||||
items:items,
|
items:items,
|
||||||
hotsuggs:hotsuggs,
|
hotsuggs:hotsuggs,
|
||||||
web_name:web_name
|
web_name:web_name,
|
||||||
|
isHome:isHome,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
@ -114,9 +114,9 @@ const stuheaderComponent = {
|
|||||||
<li>
|
<li>
|
||||||
<a href="javascript:;"><i class="iconfont icon-viewgallery"></i></a>
|
<a href="javascript:;"><i class="iconfont icon-viewgallery"></i></a>
|
||||||
<ul class="dropdown type clearfix">
|
<ul class="dropdown type clearfix">
|
||||||
<li class="active"><a :href="ctx.path">首页</a></li>
|
<li :class="{ active: !!isHome }"><a :href="ctx.path">首页</a></li>
|
||||||
<li v-for="item in items.class">
|
<li v-for="item in items.class" :class="{ active: tid == item.type_id }">
|
||||||
<a :href="ctx.path+'?tid='+item.type_id">{[item.type_name]}</a>
|
<a :href="ctx.path+'?tid='+item.type_id+'&tname='+item.type_name">{[item.type_name]}</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
@ -144,9 +144,9 @@ const stuheaderComponent = {
|
|||||||
<a class="logo" :href="ctx.path"></a>
|
<a class="logo" :href="ctx.path"></a>
|
||||||
</div>
|
</div>
|
||||||
<ul class="stui-header__menu">
|
<ul class="stui-header__menu">
|
||||||
<li class="active"><a :href="ctx.path">首页</a></li>
|
<li :class="{ active: !!isHome }"><a :href="ctx.path">首页</a></li>
|
||||||
<li v-for="item in items.class">
|
<li v-for="item in items.class" :class="{ active: tid == item.type_id }">
|
||||||
<a :href="ctx.path+'?tid='+item.type_id">{[item.type_name]}</a>
|
<a :href="ctx.path+'?tid='+item.type_id+'&tname='+item.type_name">{[item.type_name]}</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
@ -163,6 +163,8 @@ const stuheaderComponent = {
|
|||||||
ctx:{},
|
ctx:{},
|
||||||
items:{class:[],list:[]},
|
items:{class:[],list:[]},
|
||||||
hotsuggs:{data:[]},
|
hotsuggs:{data:[]},
|
||||||
|
tid:String,
|
||||||
|
isHome:Boolean,
|
||||||
}, //配置需要传入的属性
|
}, //配置需要传入的属性
|
||||||
delimiters: ['{[', ']}'],//delimiters:改变默认的插值符号
|
delimiters: ['{[', ']}'],//delimiters:改变默认的插值符号
|
||||||
};
|
};
|
||||||
@ -203,6 +205,49 @@ const stubannerComponent = {
|
|||||||
delimiters: ['{[', ']}'],//delimiters:改变默认的插值符号
|
delimiters: ['{[', ']}'],//delimiters:改变默认的插值符号
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const stufilterComponent = {
|
||||||
|
template:`
|
||||||
|
<div class="item" id="screenbox" style="display: none;">
|
||||||
|
<!-- 筛选 -->
|
||||||
|
<ul class="clearfix" v-for="filters in now_filters">
|
||||||
|
<li>
|
||||||
|
<span>按{[filters.name]}:</span>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li v-for="obj in filters.value">
|
||||||
|
<a :href="ctx.path+'?tid='+item.type_id+'&tname='+item.type_name+'&filter='+obj.v">{[obj.n]}</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
<!-- end 筛选 -->
|
||||||
|
</div>
|
||||||
|
`,
|
||||||
|
setup(props, context) {
|
||||||
|
console.log('stufilter组件加载完毕');
|
||||||
|
// console.log(props);
|
||||||
|
const items = props.items;
|
||||||
|
const tid = props.tid;
|
||||||
|
const now_filters = computed(() => {
|
||||||
|
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);
|
||||||
|
return now_filters
|
||||||
|
});
|
||||||
|
return {
|
||||||
|
now_filters:now_filters
|
||||||
|
}
|
||||||
|
},
|
||||||
|
props:{
|
||||||
|
items:{},
|
||||||
|
now_filters:[],
|
||||||
|
tid:String,
|
||||||
|
ctx:{},
|
||||||
|
item:{},
|
||||||
|
}, //配置需要传入的属性
|
||||||
|
delimiters: ['{[', ']}'],//delimiters:改变默认的插值符号
|
||||||
|
}
|
||||||
|
|
||||||
//下面的注册组件方法无法使用,需要在app里去注册
|
//下面的注册组件方法无法使用,需要在app里去注册
|
||||||
// Vue.component('copy-right', copyrightComponent);
|
// Vue.component('copy-right', copyrightComponent);
|
||||||
// Vue.component('foot-button', footbuttonComponent);
|
// Vue.component('foot-button', footbuttonComponent);
|
||||||
|
|||||||
@ -139,7 +139,7 @@ const app = createApp({
|
|||||||
|
|
||||||
console.log('---setup---');
|
console.log('---setup---');
|
||||||
//获取当前实例
|
//获取当前实例
|
||||||
// const {ctx, proxy} = getCurrentInstance();
|
const {self, proxy} = getCurrentInstance();
|
||||||
const web_name = '{{ctx.web_name}}';
|
const web_name = '{{ctx.web_name}}';
|
||||||
const pwd = '{{ctx.pwd}}';
|
const pwd = '{{ctx.pwd}}';
|
||||||
const wd = '{{ctx.wd}}';
|
const wd = '{{ctx.wd}}';
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user