更改提示信息
Showing
1 changed file
with
11 additions
and
6 deletions
... | @@ -180,13 +180,19 @@ function checkAppointment() { | ... | @@ -180,13 +180,19 @@ function checkAppointment() { |
180 | }); | 180 | }); |
181 | return msg; | 181 | return msg; |
182 | } | 182 | } |
183 | function del(a){ | ||
184 | layui.use('layer',function(){ | ||
185 | var layer = layui.layer; | ||
186 | layer.msg(a); | ||
187 | }) | ||
188 | } | ||
183 | 189 | ||
184 | function handle(id) { | 190 | function handle(id) { |
185 | let bookingDateUL = $(".active1"); | 191 | let bookingDateUL = $(".active1"); |
186 | let msg = checkAppointment(); | 192 | let msg = checkAppointment(); |
187 | if (msg != undefined) { | 193 | if (msg != undefined) { |
188 | //layer.msg('hello'); | 194 | del(msg) |
189 | return; | 195 | return false |
190 | }; | 196 | }; |
191 | var input = $("#" + id); | 197 | var input = $("#" + id); |
192 | layui.use("layer", function () { | 198 | layui.use("layer", function () { |
... | @@ -240,9 +246,8 @@ function makeAppointment(id) { | ... | @@ -240,9 +246,8 @@ function makeAppointment(id) { |
240 | if (result.code == 200 && result.data !== null) { | 246 | if (result.code == 200 && result.data !== null) { |
241 | appointmentId = result.data | 247 | appointmentId = result.data |
242 | window.location.href = "./yyjg.html?appointmentId=" + appointmentId | 248 | window.location.href = "./yyjg.html?appointmentId=" + appointmentId |
243 | } | 249 | }else { |
244 | else { | 250 | del(result.message) |
245 | alert(result.message); | ||
246 | } | 251 | } |
247 | } | 252 | } |
248 | }); | 253 | }); |
... | @@ -265,7 +270,7 @@ function getAppointmentDetail(id) { | ... | @@ -265,7 +270,7 @@ function getAppointmentDetail(id) { |
265 | appointmentDetail(result.data); | 270 | appointmentDetail(result.data); |
266 | } | 271 | } |
267 | else { | 272 | else { |
268 | alert(result.message); | 273 | layer.msg(result.message, {icon: 6}) |
269 | } | 274 | } |
270 | }, | 275 | }, |
271 | }); | 276 | }); | ... | ... |
-
Please register or sign in to post a comment