Commit 67ceea923500df9b26bab35e940f9061972883a5
1 parent
be4a7903
新增预约前台保存方法
Showing
2 changed files
with
24 additions
and
23 deletions
ant-design-vue-jeecg/src/api/api.js
... | ... | @@ -93,6 +93,10 @@ const checkRuleByCode = (params) => getAction('/sys/checkRule/checkByCode', para |
93 | 93 | //加载我的通告信息 |
94 | 94 | const getUserNoticeInfo= (params)=>getAction("/sys/sysAnnouncementSend/getMyAnnouncementSend",params); |
95 | 95 | const getTransitURL = url => `/sys/common/transitRESTful?url=${encodeURIComponent(url)}` |
96 | + | |
97 | +//保存预约信息 | |
98 | +export const addTest = (params)=>postAction('/api/test', params); | |
99 | + | |
96 | 100 | // 中转HTTP请求 |
97 | 101 | export const transitRESTful = { |
98 | 102 | get: (url, parameter) => getAction(getTransitURL(url), parameter), |
... | ... |
ant-design-vue-jeecg/src/views/reserve/submit/reservationapplication.vue
1 | 1 | <template> |
2 | - <div class="from_box"> | |
2 | + <div class="from_box" id="Step1"> | |
3 | 3 | <form action=""> |
4 | 4 | <a-form style="max-width: 800px; margin: 40px auto 0;"> |
5 | 5 | <font color="#272727" size="3">1. 预计到达时间 </font> |
... | ... | @@ -25,7 +25,7 @@ |
25 | 25 | |
26 | 26 | <a-form-item> |
27 | 27 | <font color="#272727" size="3">4. 车牌号码</font> |
28 | - <a-input placeholder="请输入车牌号码" /> | |
28 | + <a-input placeholder="请输入车牌号码" v-model="formMess.message" /> | |
29 | 29 | </a-form-item> |
30 | 30 | |
31 | 31 | |
... | ... | @@ -100,7 +100,7 @@ |
100 | 100 | |
101 | 101 | <script> |
102 | 102 | import JDate from '@/components/jeecg/JDate.vue' |
103 | -import axios from 'axios'; | |
103 | +import {addTest} from '@api/api' | |
104 | 104 | |
105 | 105 | export default { |
106 | 106 | name: "Step1", |
... | ... | @@ -109,8 +109,11 @@ import axios from 'axios'; |
109 | 109 | }, |
110 | 110 | data() { |
111 | 111 | return { |
112 | + | |
113 | + dataStr:"", | |
112 | 114 | formMess:{ |
113 | - "account":"" | |
115 | + account:"", | |
116 | + message:"", | |
114 | 117 | } |
115 | 118 | } |
116 | 119 | }, |
... | ... | @@ -118,26 +121,20 @@ import axios from 'axios'; |
118 | 121 | methods: { |
119 | 122 | onSubmit() { |
120 | 123 | /* json格式提交: */ |
121 | - // let formData = JSON.stringify(this.formMess); | |
122 | - | |
123 | - /* formData格式提交: */ | |
124 | - let formData = new FormData(); | |
125 | - for(var key in this.formMess){ | |
126 | - formData.append(key,this.formMess[key]); | |
124 | + addTest(this.formMess); | |
125 | + | |
126 | + // axios({ | |
127 | + // method:"post", | |
128 | + // url:"http://127.0.0.1:3000/jeecg-boot/api/examine", | |
129 | + // headers: { | |
130 | + // "Content-Type": "multipart/form-data" | |
131 | + // }, | |
132 | + // withCredentials:true, | |
133 | + // data:formData | |
134 | + // }).then((res)=>{ | |
135 | + // console.log(res); | |
136 | + // }); | |
127 | 137 | } |
128 | - | |
129 | - axios({ | |
130 | - method:"post", | |
131 | - url:"http://127.0.0.1:3000/jeecg-boot/api/examine", | |
132 | - headers: { | |
133 | - "Content-Type": "multipart/form-data" | |
134 | - }, | |
135 | - withCredentials:true, | |
136 | - data:formData | |
137 | - }).then((res)=>{ | |
138 | - console.log(res); | |
139 | - }); | |
140 | - } | |
141 | 138 | } |
142 | 139 | |
143 | 140 | } |
... | ... |