Commit 2947f4d1f9a9abe72f97ac36d8a4d60e6cbf0a5b

Authored by liuqimichale
1 parent 402b26c9

市医院静态码 +弹窗样式

package.json
... ... @@ -16,6 +16,8 @@
16 16 "less-loader": "^4.1.0",
17 17 "sass-loader": "^7.3.1",
18 18 "vue": "^2.5.2",
  19 + "mint-ui": "^2.2.13",
  20 +
19 21 "vue-h5-popup": "^1.0.2",
20 22 "vue-router": "^3.0.1"
21 23 },
... ...
src/components/dynCodePay.vue
... ... @@ -54,7 +54,7 @@
54 54  
55 55 <script>
56 56  
57   -let Base64 = require('js-base64').Base64
  57 +// let Base64 = require('js-base64').Base64
58 58  
59 59 import {aliPay, getOpenId, vxPayQuery, bankH5Pay} from '@/api/orderPay/orderPay'
60 60  
... ... @@ -202,7 +202,7 @@ export default {
202 202  
203 203 }
204 204 } else {
205   - alert('支付失败')
  205 + me.$msgbox('提示', '支付失败')
206 206 }
207 207  
208 208 // console.log(_token)
... ... @@ -227,10 +227,10 @@ export default {
227 227 if (res.code == 0) {
228 228 me.vxPay(res.data, this.orderId)
229 229 } else if (res.code == 40163) { //code been used, hints[重复code问题]
230   - alert('请重新扫码')
  230 + me.$msgbox('提示', '请重新扫码')
231 231 console.log(res.message);
232 232 } else {
233   - alert('请重新扫码')
  233 + me.$msgbox('提示', '请重新扫码')
234 234 }
235 235 })
236 236  
... ... @@ -267,11 +267,11 @@ export default {
267 267 vm.onBridgeReady(data)
268 268 }
269 269 } else {
270   - alert("没有找到返回值");
  270 + vm.$msgbox('提示', '没有找到返回值')
271 271 }
272 272 } else {
273 273 console.log(res.message);
274   - alert(res.message);
  274 + vm.$msgbox('提示', res.message)
275 275 }
276 276 })
277 277 },
... ... @@ -293,10 +293,10 @@ export default {
293 293 // 使用以上方式判断前端返回,微信团队郑重提示:res.err_msg将在用户支付成功后返回ok,但并不保证它绝对可靠。
294 294 if (res.err_msg === 'get_brand_wcpay_request:ok') {
295 295 console.log('成功')
296   - alert('支付成功')
  296 + me.$msgbox('提示', '支付成功')
297 297 } else {
298 298 console.log('失败')
299   - alert('支付失败')
  299 + me.$msgbox('提示', '支付失败')
300 300 me.$router.go(-2);
301 301 }
302 302 }
... ...
src/components/pay.vue
... ... @@ -214,7 +214,7 @@ export default {
214 214  
215 215 }
216 216 } else {
217   - alert('支付失败')
  217 + me.$msgbox('提示', '支付失败')
218 218 }
219 219  
220 220 // console.log(_token)
... ... @@ -239,10 +239,10 @@ export default {
239 239 if (res.code == 0) {
240 240 me.vxPay(res.data, this.orderId)
241 241 } else if (res.code == 40163) { //code been used, hints[重复code问题]
242   - alert('请重新扫码')
  242 + me.$msgbox('提示', '请重新扫码')
243 243 console.log(res.message);
244 244 } else {
245   - alert('请重新扫码')
  245 + me.$msgbox('提示', '请重新扫码')
246 246 }
247 247 })
248 248  
... ... @@ -279,11 +279,11 @@ export default {
279 279 vm.onBridgeReady(data)
280 280 }
281 281 } else {
282   - alert("没有找到返回值");
  282 + vm.$msgbox('提示', '没有找到返回值')
283 283 }
284 284 } else {
285 285 console.log(res.message);
286   - alert(res.message);
  286 + vm.$msgbox('提示', res.message)
287 287 }
288 288 })
289 289 },
... ... @@ -305,10 +305,11 @@ export default {
305 305 // 使用以上方式判断前端返回,微信团队郑重提示:res.err_msg将在用户支付成功后返回ok,但并不保证它绝对可靠。
306 306 if (res.err_msg === 'get_brand_wcpay_request:ok') {
307 307 console.log('成功')
308   - alert('支付成功')
  308 + me.$msgbox('提示', '支付成功')
  309 +
309 310 } else {
310 311 console.log('失败')
311   - alert('支付失败')
  312 + me.$msgbox('提示', '支付失败')
312 313 me.$router.go(-2);
313 314 }
314 315 }
... ...
src/components/plateNumber.vue
... ... @@ -248,14 +248,6 @@
248 248 </div>
249 249  
250 250  
251   - <modal-alert ref="alert">
252   - <div class="trave-tip-content txt-l" slot="content">
253   - <div class="confirm-text">
254   - <p>请输入正确的{{tip}}</p>
255   - </div>
256   - </div>
257   - <span slot="button">知道了</span>
258   - </modal-alert>
259 251 </div>
260 252 </template>
261 253 <script>
... ... @@ -320,6 +312,7 @@ export default {
320 312 }
321 313 },
322 314 mounted() {
  315 +
323 316 console.log(window.location)
324 317 console.log(this.$route.query)
325 318 if (this.$utils.clientBrowser() == "微信") {
... ... @@ -388,36 +381,32 @@ export default {
388 381 console.log(tmpObj)
389 382 //判断是否需要支付
390 383 if (tmpObj.needPay) {
391   - if(tmpObj.channelEnable){
392   - var queryParams = this.$utils.parseParams(tmpObj);
393   - console.log(queryParams)
394   - // //
395   - this.$router.push({
396   - path: 'pay',
397   - query: tmpObj
398   - })
399   - }else{
400   - sessionStorage.setItem('noPassText',tmpObj.alertMessage)
401   - this.$router.push({
402   - path: 'noPass'
403   - // query: tmpObj.message
404   - })
405   - }
  384 + var queryParams = this.$utils.parseParams(tmpObj);
  385 + console.log(queryParams)
  386 + // //
  387 + this.$router.push({
  388 + path: 'pay',
  389 + query: tmpObj
  390 + })
406 391 // window.location.href = "../pay.html?" + queryParams;
407 392 } else {
408   - alert('无需缴费,欢迎下次光临')
409   -
  393 + this.$msgbox('提示', '无需缴费,欢迎下次光临')
410 394 }
411   - //var tel = document.getElementById("inputPhoneNum").value.replace(/\s/g, "");//去除空格
412   - //var orderFee = keepTwoDecimalFull((tmpObj.orderFee / 100));//本次出场实际应付金额(减去折扣,优惠券等之后的应付金额)
413   - //var tmpUrl = "orderId=" + tmpObj.orderId + "&outtime=" + tmpObj.outtime + "&tel=" + tel + "&orderFee=" + orderFee;
414 395  
415 396 } else {
416   - alert("没有找到订单");
  397 + this.$msgbox('提示', '没有找到订单')
417 398 }
418   - } else {//其他情况如【该卡号场内已存在】
  399 + }
  400 + else if(res.code == 1031){
  401 + sessionStorage.setItem('noPassText',res.message)
  402 + this.$router.push({
  403 + path: 'noPass'
  404 + // query: tmpObj.message
  405 + })
  406 + }
  407 + else {//其他情况如【该卡号场内已存在】
419 408 console.log(res.message);
420   - alert(res.message);
  409 + this.$msgbox('提示', res.message)
421 410  
422 411 }
423 412  
... ... @@ -487,8 +476,8 @@ export default {
487 476 plateLicense = this.plate_license_1
488 477 plateLicense = this.palindrome(plateLicense)
489 478 if (plateLicense.length < 7) {
490   - this.tip = '车牌号'
491   - this.$refs.alert.open()
  479 + this.$msgbox('提示', '请输入正确车牌号')
  480 +
492 481 return
493 482 }
494 483 }
... ... @@ -496,8 +485,8 @@ export default {
496 485 plateLicense = this.plate_license_2
497 486 plateLicense = this.palindrome(plateLicense)
498 487 if (plateLicense.length < 8) {
499   - this.tip = '车牌号'
500   - this.$refs.alert.open()
  488 + this.$msgbox('提示', '请输入正确车牌号')
  489 +
501 490 return
502 491 }
503 492 }
... ... @@ -507,7 +496,8 @@ export default {
507 496 plateLicense = this.palindrome(plateLicense)
508 497 if (plateLicense.length < 11) {
509 498 this.tip = '手机号'
510   - this.$refs.alert.open()
  499 + this.$msgbox('提示', '请输入正确手机号')
  500 +
511 501 return
512 502 }
513 503 }
... ...
src/main.js
... ... @@ -6,13 +6,21 @@ import router from &#39;./router&#39;
6 6  
7 7 import './assets/css/reset.css' // 引入公共样式
8 8  
9   -import h5Popup from 'vue-h5-popup'; // 引入弹窗
10   -Vue.use(h5Popup)
  9 +
11 10  
12 11 import utils from './utils/utils' // 工具类
13 12 Vue.prototype.$utils = utils
14 13  
15 14  
  15 +import 'mint-ui/lib/style.css'
  16 +
  17 +import { MessageBox } from 'mint-ui'
  18 +import { Toast } from 'mint-ui';
  19 +
  20 +Vue.prototype.$msgbox = MessageBox
  21 +Vue.prototype.$toast = Toast
  22 +
  23 +
16 24 import 'swiper/dist/css/swiper.min.css' // 轮播
17 25 import 'swiper/dist/js/swiper.min'
18 26  
... ...