diff --git a/src/main.js b/src/main.js index 7eeea82..97551d8 100644 --- a/src/main.js +++ b/src/main.js @@ -6,8 +6,8 @@ import router from './router' import './assets/css/reset.css' // 引入公共样式 -import h5Popup from 'vue-h5-popup' // 引入弹窗 -Vue.use(h5Popup) +// import h5Popup from 'vue-h5-popup' // 引入弹窗 +// Vue.use(h5Popup) // import MintUI from 'mint-ui' @@ -42,6 +42,9 @@ Vue.prototype.$utils = utils import common from './utils/common' // 公共 Vue.prototype.$common = common +import variables from './utils/variables' // 公共验证 +Vue.prototype.$variables = variables + import Mint from 'mint-ui'; import 'mint-ui/lib/style.css' Vue.use(Mint); diff --git a/src/router/index.js b/src/router/index.js index 852264e..bd4ad48 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -103,12 +103,12 @@ export default new Router({ - // //---------------- 个人页面导航 - // { - // path: '/selfNav', - // name: 'selfNav', - // component: () => import("@/views/mySelf/selfNav.vue") - // }, + //---------------- 个人页面导航 + { + path: '/selfNav', + name: 'selfNav', + component: () => import("@/views/mySelf/selfNav.vue") + }, // // // ------------------------建议反馈 // { @@ -125,13 +125,13 @@ export default new Router({ // }, // // - // // ------------------------停车记录 - // { - // path: '/binDing', - // name: 'binDing', - // component: () => import("@/views/binding/binDing.vue") - // }, - // + // ------------------------绑定手机 + { + path: '/binDing', + name: 'binDing', + component: () => import("@/views/binding/binDing.vue") + }, + // // // ------------------------购买会员卡提示 // { diff --git a/src/utils/variables.js b/src/utils/variables.js index e69de29..e44dfd0 100644 --- a/src/utils/variables.js +++ b/src/utils/variables.js @@ -0,0 +1,16 @@ +export default { + /* 是否手机号码*/ + isPhone: function(rule, value, callback) { + const reg = /^[1][3,4,5,7,8][0-9]{9}$/; + if (value == "" || value == undefined || value == null) { + callback(); + } else { + if ((!reg.test(value)) && value != "") { + callback(new Error("请输入正确的电话号码")); + } else { + callback(); + } + } + } +}; + diff --git a/src/views/binding/binDing.vue b/src/views/binding/binDing.vue index a7fe640..fe1e223 100644 --- a/src/views/binding/binDing.vue +++ b/src/views/binding/binDing.vue @@ -3,7 +3,7 @@ - + {{timeNum}} @@ -21,7 +21,8 @@ export default { codeText: '', phone: '', timeText: '获取验证码', - timeNum: 60, + time: 0, + disabled:false } }, created(){ @@ -29,17 +30,33 @@ export default { }, methods: { getCode: function () { - var _this = this - // this.timeText = this.timeNum+'S' - let Num = 5 - var timer = setInterval(function () { - _this.timeNum = Num-- +'s' - if(Num== -1){ - _this.timeNum = '获取验证码' - clearInterval(timer) - } - }, 1000) - } + var reg=11 && /^((13|14|15|17|18)[0-9]{1}\d{8})$/; + //var url="/nptOfficialWebsite/apply/sendSms?mobile="+this.ruleForm.phone; + if(this.phone==''){ + this.$vux.toast.text('请输入手机号码', 'top') + }else if(!reg.test(this.phone)){ + this.$vux.toast.text('手机格式不正确', 'top') + }else{ + this.time=60; + this.disabled=true; + this.timer(); + /*axios.post(url).then( + res=>{ + this.phonedata=res.data; + })*/ + } + }, + timer() { + if (this.time > 0) { + this.time--; + this.btntxt=this.time+"s后重新获取"; + setTimeout(this.timer, 1000); + } else{ + this.time=0; + this.btntxt="获取验证码"; + this.disabled=false; + } + }, } } diff --git a/src/views/eInvoice/invoiceRecord/exchange.vue b/src/views/eInvoice/invoiceRecord/exchange.vue index b3d8789..94c51c7 100644 --- a/src/views/eInvoice/invoiceRecord/exchange.vue +++ b/src/views/eInvoice/invoiceRecord/exchange.vue @@ -1,7 +1,7 @@ - + {{i.carNumber}} diff --git a/src/views/eInvoice/invoiceRecord/invoiceRecord.vue b/src/views/eInvoice/invoiceRecord/invoiceRecord.vue index 7d4a1dc..e3a9379 100644 --- a/src/views/eInvoice/invoiceRecord/invoiceRecord.vue +++ b/src/views/eInvoice/invoiceRecord/invoiceRecord.vue @@ -3,7 +3,7 @@ + v-for="(i, index) in list" :key="index"> {{i.invoiceState | invoiceStateFilter}} ¥ {{(i.invoiceTotalFee/100).toFixed(2)}}
{{i.invoiceState | invoiceStateFilter}}
¥ {{(i.invoiceTotalFee/100).toFixed(2)}}