Commit 3a8c0e47 authored by 王's avatar

商品列表标题链接到期数

parent 809de9f0
...@@ -37,7 +37,6 @@ ...@@ -37,7 +37,6 @@
:data="periodList" :data="periodList"
style="width: 100%"> style="width: 100%">
<el-table-column <el-table-column
prop="title"
label="期数标题"> label="期数标题">
<template slot-scope="scope"> <template slot-scope="scope">
<router-link :to="{name:'class', query: { goods_id: scope.row.goods_id, periods_id: scope.row.id}}" > <router-link :to="{name:'class', query: { goods_id: scope.row.goods_id, periods_id: scope.row.id}}" >
...@@ -252,6 +251,10 @@ ...@@ -252,6 +251,10 @@
} }
}, },
mounted(){ mounted(){
let _query = this.$route.query;
if (_query && _query.goods_id) {
this.goodsId = parseInt(_query.goods_id);
}
this.onSearch(); this.onSearch();
this.getGoodsOption(); this.getGoodsOption();
this.getLessonOption(); this.getLessonOption();
......
...@@ -22,13 +22,18 @@ ...@@ -22,13 +22,18 @@
<el-table <el-table
:data="userList" :data="userList"
style="width: 100%"> style="width: 100%">
<el-table-column <!--<el-table-column-->
prop="id" <!--prop="id"-->
label="商品ID"> <!--label="商品ID">-->
</el-table-column> <!--</el-table-column>-->
<el-table-column <el-table-column
prop="name" prop="name"
label="名称"> label="名称">
<template slot-scope="scope">
<router-link :to="{name:'periods', query: { goods_id: scope.row.id}}" >
{{scope.row.name}}
</router-link>
</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="商品类型"> label="商品类型">
......
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