- 蒙
+ 京
赣
@@ -480,6 +480,7 @@ export default {
return
}
+ this.carNum = plateLicense
}
if (this.formData.commonCard === '2') {
plateLicense = this.plate_license_2
@@ -489,6 +490,7 @@ export default {
return
}
+ this.carNum = plateLicense
}
console.log(plateLicense)
if (this.formData.commonCard === '3') {
@@ -499,11 +501,12 @@ export default {
return
}
+ this.carNum = this.carNum+'111'
}
//
// this.$emit('getPlateLicense', plateLicense)
console.log(plateLicense);
- this.carNum = plateLicense
+
// this.$router.push({
// path: 'pay',
// query: {
diff --git a/src/main.js b/src/main.js
index 3ba0db2..57bbb85 100644
--- a/src/main.js
+++ b/src/main.js
@@ -16,6 +16,8 @@ import 'mint-ui/lib/style.css'
import { MessageBox } from 'mint-ui'
import { Toast } from 'mint-ui';
+import { Field } from 'mint-ui';
+Vue.component(Field.name, Field);
Vue.prototype.$msgbox = MessageBox
Vue.prototype.$toast = Toast
@@ -29,6 +31,9 @@ for (let key in vueFilter){
Vue.filter(key,vueFilter[key])
}
+
+
+
Vue.config.productionTip = false
/* eslint-disable no-new */
diff --git a/src/router/index.js b/src/router/index.js
index 3d76e4d..f2e8023 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -3,15 +3,16 @@ import Router from 'vue-router'
import plateNumber from '@/components/plateNumber'
// import parkRecord from '@/components/parkRecord'
import dynCodePay from '@/components/dynCodePay'
+import parkEnter from '@/components/parkEnter'
Vue.use(Router)
-export default new Router({
+const router = new Router({
routes: [
{
path: '/',
redirect: {
- name: 'plateNumber'
+ name: 'parkEnter'
}
},
// {
@@ -20,9 +21,20 @@ export default new Router({
// component: navigation
// },
{
+ path: '/parkEnter',
+ name: 'parkEnter',
+ component: parkEnter,
+ meta: {
+ title: '入场码'
+ }
+ },
+ {
path: '/plateNumber',
name: 'plateNumber',
- component: plateNumber
+ component: plateNumber,
+ meta: {
+ title: '静态码'
+ }
},
// {
// path: '/parkRecord',
@@ -45,7 +57,10 @@ export default new Router({
{
path: '/dynCodePay',
name: 'dynCodePay',
- component: () => import("@/components/dynCodePay.vue")
+ component: () => import("@/components/dynCodePay.vue"),
+ meta: {
+ title: '动态码'
+ }
},
{
@@ -63,3 +78,15 @@ export default new Router({
]
})
+
+router.beforeEach((to, from, next) => {
+ /* 路由发生变化修改页面title */
+ if (to.meta.title) {
+ document.title = to.meta.title
+ }
+ next()
+})
+
+export default router
+
+
diff --git a/src/utils/utils.js b/src/utils/utils.js
index 3992d83..b59fe29 100644
--- a/src/utils/utils.js
+++ b/src/utils/utils.js
@@ -11,6 +11,22 @@ export default {
console.log(pwd);
return pwd;
},
+ getQueryString: function(location) {
+ //var url = location.search; //获取url中"?"符后的字串
+ console.log(location)
+ var url = location.href.split("?")[1];
+ var theRequest = new Object();
+ if (url) {
+ // var str = url.substr(1);
+ var strs = url.split("&");
+ for (var i = 0; i < strs.length; i++) {
+ theRequest[strs[i].split("=")[0]] = decodeURIComponent(strs[i].split("=")[1]);
+ }
+ } else {
+ theRequest = null;
+ }
+ return theRequest;
+ },
parseParams: function (data) {
try {
--
libgit2 0.21.4