Commit 9e013cf0 authored by songrui's avatar songrui

接收链接参数

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