Commit b7e27080 authored by 黄奎's avatar 黄奎

增加下拉

parent 84d1071f
This diff is collapsed.
<template> <template>
<view class="side-box" :style="{ background: bg }"> <view class="side-box" :style="{ background: bg }">
<view>
<view
class="item"
:style="{
color: !currentIndex2 ? textColor : activeColor,
'border-color': !currentIndex2 ? 'transparent' : activeColor,
'border-bottom': border ? '1rpx solid #eee' : 'none',
'text-align': textAlign,
'background':currentIndex==i?'#FFF':''
}"
@click="change2()"
> 全部 </view
>
</view>
<view <view
v-for="(x, i) in list" v-for="(x, i) in list"
:key="i" :key="i"
...@@ -50,11 +64,12 @@ export default { ...@@ -50,11 +64,12 @@ export default {
}, },
active: { active: {
type: Number, type: Number,
default: 0, default: -1,
}, },
}, },
data() { data() {
return { return {
currentIndex2:true,
currentIndex:this.active currentIndex:this.active
}; };
}, },
...@@ -73,7 +88,14 @@ export default { ...@@ -73,7 +88,14 @@ export default {
methods: { methods: {
change(i) { change(i) {
this.$emit("change", i); this.$emit("change", i);
this.currentIndex2 = false
}, },
change2() {
this.$emit("change2", 0);
this.currentIndex2 = !this.currentIndex2
this.currentIndex = -1
// console.log('4555555555',this.currentIndex)
},
}, },
}; };
</script> </script>
......
...@@ -21,10 +21,16 @@ ...@@ -21,10 +21,16 @@
:h="(navHeight+54)" :h="(navHeight+54)"
></style3> ></style3>
<style4 <style4
v-if="cstyle.Type == 1 && cstyle.Style == 4" v-if="cstyle.Type == 1 && cstyle.Style == 4 &&u.TenantId!=27"
:d="types" :d="types"
:h="(navHeight+54)" :h="(navHeight+54)"
></style4> ></style4>
<!-- 新增进阶教育id27 -->
<style44
v-if="cstyle.Type == 1 && cstyle.Style == 4&&u.TenantId==27"
:d="types"
:h="(navHeight+54)"
></style44>
<style5 <style5
v-if="cstyle.Type == 2 && cstyle.Style == 1" v-if="cstyle.Type == 2 && cstyle.Style == 1"
:d="types" :d="types"
...@@ -72,6 +78,7 @@ import style1 from "@/components/cats/style1"; ...@@ -72,6 +78,7 @@ import style1 from "@/components/cats/style1";
import style2 from "@/components/cats/style2"; import style2 from "@/components/cats/style2";
import style3 from "@/components/cats/style3"; import style3 from "@/components/cats/style3";
import style4 from "@/components/cats/style4"; import style4 from "@/components/cats/style4";
import style44 from "@/components/cats/style44";//进阶教育id为27
import style5 from "@/components/cats/style5"; import style5 from "@/components/cats/style5";
import style6 from "@/components/cats/style6"; import style6 from "@/components/cats/style6";
import style7 from "@/components/cats/style7"; import style7 from "@/components/cats/style7";
...@@ -83,6 +90,7 @@ import style11 from "@/components/cats/style11"; ...@@ -83,6 +90,7 @@ import style11 from "@/components/cats/style11";
export default { export default {
data() { data() {
return { return {
u:{},
cat_style:2, cat_style:2,
isloading: true, isloading: true,
pageTitle: "分类", pageTitle: "分类",
...@@ -112,6 +120,7 @@ export default { ...@@ -112,6 +120,7 @@ export default {
style2, style2,
style3, style3,
style4, style4,
style44,
style5, style5,
style6, style6,
style7, style7,
...@@ -121,6 +130,7 @@ export default { ...@@ -121,6 +130,7 @@ export default {
style11, style11,
}, },
onLoad(option) { onLoad(option) {
this.u = uni.getStorageSync('mall_UserInfo');
this.navHeight = this.$navHeight - 2; this.navHeight = this.$navHeight - 2;
// this.cstyle = uni.getStorageSync("basedata") // this.cstyle = uni.getStorageSync("basedata")
// ? uni.getStorageSync("basedata").cat_style // ? uni.getStorageSync("basedata").cat_style
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment