提交 008e24c5 authored 作者: 王鹏飞's avatar 王鹏飞

bug fixes

上级 51248155
...@@ -118,6 +118,14 @@ export default { ...@@ -118,6 +118,14 @@ export default {
payVisible: false payVisible: false
} }
}, },
watch: {
'$route.query': {
immediate: true,
handler(query) {
this.payVisible = query.pay === '1'
}
}
},
computed: { computed: {
productId() { productId() {
const found = this.productList.find(item => item.value === this.ruleForm.number) const found = this.productList.find(item => item.value === this.ruleForm.number)
...@@ -128,7 +136,7 @@ export default { ...@@ -128,7 +136,7 @@ export default {
handleSubmitSuccess(response) { handleSubmitSuccess(response) {
if (!this.isEdit) { if (!this.isEdit) {
this.$router this.$router
.replace({ name: 'pareportEdit', params: { id: response.data.id }, query: { id: this.affairId } }) .replace({ name: 'pareportEdit', params: { id: response.data.id }, query: { id: this.affairId, pay: '1' } })
.then(this.getDetail) .then(this.getDetail)
} }
this.handlePay() this.handlePay()
...@@ -140,7 +148,6 @@ export default { ...@@ -140,7 +148,6 @@ export default {
// 支付成功 // 支付成功
handlePaySuccess() { handlePaySuccess() {
api.paySuccess(this.pid).then(response => { api.paySuccess(this.pid).then(response => {
// this.$router.replace({ name: 'pareportView', params: { id: this.pid }, query: { id: this.affairId } })
this.getDetail() this.getDetail()
this.payVisible = false this.payVisible = false
}) })
......
...@@ -202,8 +202,6 @@ export default { ...@@ -202,8 +202,6 @@ export default {
handlePaySuccess() { handlePaySuccess() {
api.paySuccess(this.pid).then(response => { api.paySuccess(this.pid).then(response => {
this.$router.replace({ name: 'retakeView', params: { id: this.pid }, query: { id: this.affairId } }) this.$router.replace({ name: 'retakeView', params: { id: this.pid }, query: { id: this.affairId } })
this.getDetail()
this.payVisible = false
}) })
} }
}, },
......
<template> <template>
<!-- // 整体网站结构 --> <!-- // 整体网站结构 -->
<el-container :style="{height: containerStyle.height}"> <el-container :style="{ height: containerStyle.height }">
<el-header><navigation /></el-header> <el-header><navigation /></el-header>
<el-container> <el-container>
<sidebar :obj="sidebar" /> <sidebar :obj="sidebar" />
<el-main><router-view></router-view></el-main> <el-main><router-view :key="$route.fullPath"></router-view></el-main>
</el-container>
</el-container> </el-container>
</el-container>
</template> </template>
<script> <script>
...@@ -15,7 +15,7 @@ import Sidebar from '@/components/learnSysLayout/sidebar.vue' ...@@ -15,7 +15,7 @@ import Sidebar from '@/components/learnSysLayout/sidebar.vue'
export default { export default {
components: { Navigation, Sidebar }, components: { Navigation, Sidebar },
data () { data() {
const clientHeight = document.documentElement.clientHeight - 1 + 'px' const clientHeight = document.documentElement.clientHeight - 1 + 'px'
const clientWidth = document.documentElement.clientWidth + 'px' const clientWidth = document.documentElement.clientWidth + 'px'
return { return {
...@@ -42,12 +42,12 @@ export default { ...@@ -42,12 +42,12 @@ export default {
} }
} }
}, },
mounted () { mounted() {
this.sidebar.containerStyle = this.containerStyle this.sidebar.containerStyle = this.containerStyle
/* 监听侧边栏的当前状态 */ /* 监听侧边栏的当前状态 */
this.$root.$on('updateStatus', (status) => { this.$root.$on('updateStatus', status => {
this.sidebar.status = status this.sidebar.status = status
this.sidebar.sidebarStyle.width = (status ? 'auto' : '200px') this.sidebar.sidebarStyle.width = status ? 'auto' : '200px'
}) })
} }
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论