|
@@ -3,7 +3,7 @@
|
|
<li v-for="(item,index) in data" :key="index">
|
|
<li v-for="(item,index) in data" :key="index">
|
|
<p class="parent-node"><span class="number">{{item.number}}</span><b class="title">{{item.title}}</b></p>
|
|
<p class="parent-node"><span class="number">{{item.number}}</span><b class="title">{{item.title}}</b></p>
|
|
<ul v-if="item.children&&item.children.length>0">
|
|
<ul v-if="item.children&&item.children.length>0">
|
|
- <li :class="[isBuy||index===0?'children-buy':'children-no','children']" v-for="(items,indexs) in item.children" :key="indexs" @click="handleLink(items,isBuy||index===0,indexs)">
|
|
|
|
|
|
+ <li :class="[isBuy||index===0?'children-buy':'children-no','children']" v-for="(items,indexs) in item.children" :key="indexs" @click="handleLink(items,isBuy||index===0,index)">
|
|
<p class="children-node"><span class="number">{{items.number}}</span><b class="title">{{items.title}}</b><i class="el-icon-lock" v-if="!(isBuy||index===0)"></i></p>
|
|
<p class="children-node"><span class="number">{{items.number}}</span><b class="title">{{items.title}}</b><i class="el-icon-lock" v-if="!(isBuy||index===0)"></i></p>
|
|
</li>
|
|
</li>
|
|
</ul>
|
|
</ul>
|
|
@@ -18,7 +18,7 @@
|
|
export default {
|
|
export default {
|
|
//import引入的组件需要注入到对象中才能使用
|
|
//import引入的组件需要注入到对象中才能使用
|
|
components: { },
|
|
components: { },
|
|
- props: ["data", "isBuy","LoginNavIndex","userBg","headerBorder","headerBg"],
|
|
|
|
|
|
+ props: ["data", "isBuy","LoginNavIndex","userBg","headerBorder","headerBg","cardType"],
|
|
data() {
|
|
data() {
|
|
//这里存放数据
|
|
//这里存放数据
|
|
return {
|
|
return {
|
|
@@ -36,29 +36,44 @@ export default {
|
|
// 跳转
|
|
// 跳转
|
|
handleLink(item,flag,index){
|
|
handleLink(item,flag,index){
|
|
let url = this.LoginNavIndex +'&&&'+ this.userBg +'&&&'+ this.headerBorder +'&&&'+ this.headerBg
|
|
let url = this.LoginNavIndex +'&&&'+ this.userBg +'&&&'+ this.headerBorder +'&&&'+ this.headerBg
|
|
- if(index===0){
|
|
|
|
|
|
+ if(this.cardType==='baozhi'){
|
|
this.$router.push({
|
|
this.$router.push({
|
|
path: "/articleDetail",
|
|
path: "/articleDetail",
|
|
- });
|
|
|
|
- }else if(index===1){
|
|
|
|
- this.$router.push({
|
|
|
|
- path: "/magazineDetail",
|
|
|
|
- });
|
|
|
|
- }else if(index===2){
|
|
|
|
- this.$router.push({
|
|
|
|
- path: "/videoDetail",
|
|
|
|
query: {
|
|
query: {
|
|
- headerConfig: encodeURIComponent(url)
|
|
|
|
- },
|
|
|
|
|
|
+ type:index+1
|
|
|
|
+ },
|
|
|
|
+
|
|
});
|
|
});
|
|
- }else if(index===3){
|
|
|
|
|
|
+ }else{
|
|
this.$router.push({
|
|
this.$router.push({
|
|
- path: "/courseDetail",
|
|
|
|
- query: {
|
|
|
|
- headerConfig: encodeURIComponent(url)
|
|
|
|
- },
|
|
|
|
|
|
+ path: "/magazineDetail",
|
|
});
|
|
});
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ // if(index===0){
|
|
|
|
+ // this.$router.push({
|
|
|
|
+ // path: "/articleDetail",
|
|
|
|
+ // type:index
|
|
|
|
+ // });
|
|
|
|
+ // }else if(index===1){
|
|
|
|
+ // this.$router.push({
|
|
|
|
+ // path: "/magazineDetail",
|
|
|
|
+ // });
|
|
|
|
+ // }else if(index===2){
|
|
|
|
+ // this.$router.push({
|
|
|
|
+ // path: "/videoDetail",
|
|
|
|
+ // query: {
|
|
|
|
+ // headerConfig: encodeURIComponent(url)
|
|
|
|
+ // },
|
|
|
|
+ // });
|
|
|
|
+ // }else if(index===3){
|
|
|
|
+ // this.$router.push({
|
|
|
|
+ // path: "/courseDetail",
|
|
|
|
+ // query: {
|
|
|
|
+ // headerConfig: encodeURIComponent(url)
|
|
|
|
+ // },
|
|
|
|
+ // });
|
|
|
|
+ // }
|
|
// if(flag){
|
|
// if(flag){
|
|
// let url = this.LoginNavIndex +'&&&'+ this.userBg +'&&&'+ this.headerBorder +'&&&'+ this.headerBg
|
|
// let url = this.LoginNavIndex +'&&&'+ this.userBg +'&&&'+ this.headerBorder +'&&&'+ this.headerBg
|
|
// this.$router.push({
|
|
// this.$router.push({
|