Commit 9e270f28 authored by miaojiale's avatar miaojiale

问卷H5

parent c53149d1
...@@ -38,22 +38,27 @@ export default { ...@@ -38,22 +38,27 @@ export default {
} }
}, },
methods: { methods: {
login() { // login() {
this.$API.login().then((res) => { // this.$API.login().then((res) => {
console.log(res) // console.log(res)
}) // })
}, // },
getPatientInfo() { getPatientInfo() {
// let data = 'NfQ4zQ+wWuvnPfQQgL6wHMQb5XGNtIbxXUiYHs5NmhnI7tSHpQob3FCUx59D/nPWbmKlW7pp5d00I/P9L0q9skLoGpXaf10EAwXJjyT8JFWwu5FFapdBHsjV0KLq+erWns7g70e4wYH2eTxQHpMwxj7+GOuPL5LtPR0x2RLJDyY='
// data = data.replaceAll("+", "%2B")
let params = { let params = {
idCard: 111111111, // data: data
patientName: "张三", data: this.$route.query.data
phone: 18888888888
} }
this.$API this.$API
.getPatientInfo(params) .getPatientInfo(params)
.then((res) => { .then((res) => {
this.baseInfo = { if (res.code == 1) {
...res.data this.baseInfo = {
...res.data
}
this.getQuestionList()
this.getQuestionnaireRecords()
} }
}) })
.catch(() => { .catch(() => {
...@@ -84,7 +89,7 @@ export default { ...@@ -84,7 +89,7 @@ export default {
getQuestionnaireRecords() { getQuestionnaireRecords() {
this.$API this.$API
.getQuestionnaireRecords({ .getQuestionnaireRecords({
patientId: 1 patientId: this.baseInfo.id
}) })
.then((res) => { .then((res) => {
if (res.code == 1) { if (res.code == 1) {
...@@ -125,13 +130,12 @@ export default { ...@@ -125,13 +130,12 @@ export default {
} }
}, },
created() { created() {
this.login() // this.login()
this.getPatientInfo() if (this.$route.query.data) {
this.getQuestionList() this.getPatientInfo()
}, }
mounted() {
this.getQuestionnaireRecords()
}, },
mounted() {},
watch: {} watch: {}
} }
</script> </script>
......
...@@ -20,7 +20,7 @@ const page = [ ...@@ -20,7 +20,7 @@ const page = [
component: () => import("@/pages/feedback") component: () => import("@/pages/feedback")
}, },
{ {
path: `/questionnaire/:id`, path: `/questionnaire`,
meta: { index: 2, keepAlive: false }, meta: { index: 2, keepAlive: false },
name: "questionnaire", name: "questionnaire",
component: () => import("@/pages/questionnaire") component: () => import("@/pages/questionnaire")
......
...@@ -65,7 +65,7 @@ module.exports = { ...@@ -65,7 +65,7 @@ module.exports = {
proxy: { proxy: {
"/api": { "/api": {
// target: "https://ds.cixincloud.com/songjiang-api", // target: "https://ds.cixincloud.com/songjiang-api",
target: "http://192.168.0.105:11999/", target: "http://192.168.0.200:11999/",
// target: 'http://localhost:8201/', // target: 'http://localhost:8201/',
// target: 'http://192.168.3.221/8201/', // target: 'http://192.168.3.221/8201/',
changeOrigin: true, changeOrigin: true,
......
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