Commit 9e013cf0 authored by songrui's avatar songrui

接收链接参数

parent 8fa86e09
import 'vant/es/toast/style/index' import 'vant/es/toast/style/index'
import 'vant/es/notify/style/index'
// 自定义svg 图标组件 // 自定义svg 图标组件
import DocIcon from '@/components/docIcon/index' import DocIcon from '@/components/docIcon/index'
......
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
<script> <script>
import BaseForm from './base.vue' import BaseForm from './base.vue'
import QuestionForm from './Question.vue' import QuestionForm from './Question.vue'
import { showNotify } from 'vant'
export default { export default {
components: { components: {
...@@ -41,8 +42,17 @@ export default { ...@@ -41,8 +42,17 @@ export default {
}, },
computed: { computed: {
routeQuery() { routeQuery() {
return this.$route.query
},
doctorId() {
return this.routeQuery.doctorId
}
},
created() {
if (!this.doctorId) {
showNotify({ type: 'warning', message: '未获取到医生信息', duration: 0 })
} }
}, },
methods: { methods: {
init() { init() {
...@@ -52,6 +62,7 @@ export default { ...@@ -52,6 +62,7 @@ export default {
this.setp = 1 this.setp = 1
}, },
onNext() { onNext() {
if (!this.doctorId) return
this.$refs.base.submit().then(res => { this.$refs.base.submit().then(res => {
console.log(res) console.log(res)
this.baseInfo = res this.baseInfo = res
...@@ -63,12 +74,12 @@ export default { ...@@ -63,12 +74,12 @@ export default {
this.$refs.question.submit().then(res => { this.$refs.question.submit().then(res => {
const result = { const result = {
...this.baseInfo, ...this.baseInfo,
details: res details: res,
createdUserId: this.doctorId
} }
console.log(result) console.log(result)
}) })
} }
} }
} }
</script> </script>
......
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