|
@@ -3,7 +3,7 @@
|
|
<a-page-header :ghost="false" :backIcon="false" class="newProductDetail-back">
|
|
<a-page-header :ghost="false" :backIcon="false" class="newProductDetail-back">
|
|
<!-- 自定义的二级文字标题 -->
|
|
<!-- 自定义的二级文字标题 -->
|
|
<template slot="subTitle">
|
|
<template slot="subTitle">
|
|
- <a id="newProductDetail-back-btn" href="javascript:;" @click="$router.go(-1)">
|
|
|
|
|
|
+ <a id="newProductDetail-back-btn" href="javascript:;" @click="goBack">
|
|
<a-icon type="left" />
|
|
<a-icon type="left" />
|
|
返回
|
|
返回
|
|
</a>
|
|
</a>
|
|
@@ -57,7 +57,8 @@ export default {
|
|
data () {
|
|
data () {
|
|
return {
|
|
return {
|
|
itemId: null,
|
|
itemId: null,
|
|
- detailsData: null // 详情数据
|
|
|
|
|
|
+ detailsData: null, // 详情数据
|
|
|
|
+ prevPageInfo: null
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
@@ -71,6 +72,10 @@ export default {
|
|
this.detailsData = null
|
|
this.detailsData = null
|
|
}
|
|
}
|
|
})
|
|
})
|
|
|
|
+ },
|
|
|
|
+ // 返回
|
|
|
|
+ goBack () {
|
|
|
|
+ this.$router.push({ path: this.prevPageInfo && this.prevPageInfo.path, query: { closeLastOldTab: true } })
|
|
}
|
|
}
|
|
},
|
|
},
|
|
mounted () {
|
|
mounted () {
|
|
@@ -87,7 +92,9 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
beforeRouteEnter (to, from, next) {
|
|
beforeRouteEnter (to, from, next) {
|
|
- next(vm => {})
|
|
|
|
|
|
+ next(vm => {
|
|
|
|
+ vm.prevPageInfo = from
|
|
|
|
+ })
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|