Commit d31cf9ad authored by “yiyousong”'s avatar “yiyousong”

pref:修改跳转详情页

parent 9da7db52
......@@ -18,6 +18,13 @@ export default {
linkDom: null, // 换皮
};
},
watch: {
"$route.path"(newVal) {
if (newVal == "/" || newVal == "/home") {
this.getHomeInfo();
}
},
},
created() {
this.getInfo();
// 开发环境
......
......@@ -18,9 +18,9 @@
>
<div
class="matterDatumList-item flex flexc aic"
v-for="(v, i) in matterInfo.matterDatumList"
v-for="v in matterInfo.matterDatumList"
:key="v.id"
@click="handleCheck(i)"
@click="handleCheck(v)"
>
<div class="pic-box">
<div class="pic-img-box">
......@@ -84,13 +84,13 @@ export default {
},
},
methods: {
handleCheck(index) {
handleCheck(row) {
this.$router.push({
path: "/showMaterials",
query: {
matterName: this.matterInfo.matterName,
matterId: this.matterInfo.id,
index,
id: row.id,
},
});
},
......
......@@ -98,7 +98,7 @@
<img v-if="i < 3" :src="checkTopImg(i)" />
<span v-else>{{ i + 1 }}.</span>
</div>
<p class="flex1" v-ellipsis @click="checkMaterial(i, v)">
<p class="flex1" v-ellipsis @click="checkMaterial(v)">
{{ v.materialName ? v.materialName : v.materiaFullName }}
</p>
</div>
......@@ -299,12 +299,12 @@ export default {
this.visible = true;
},
// 查看材料
checkMaterial(index, row) {
checkMaterial(row) {
this.$router.push({
path: "/showmaterials",
query: {
matterId: row.matterId,
index,
id: row.id,
},
});
},
......
......@@ -72,7 +72,7 @@
:key="v.id"
@click="active = i"
>
{{ v.materiaFullName }}
{{ v.materialName ? v.materialName : v.materiaFullName }}
<div class="line"></div>
</div>
</div>
......@@ -145,7 +145,8 @@ export default {
};
});
this.materailsList = data;
this.active = +this.$route.query.index;
let id = this.$route.query.id;
this.active = this.materailsList.findIndex((v) => v.id == id);
},
// 放大
......
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