diff --git a/.env.development b/.env.development index da4d7e9..29fd295 100644 --- a/.env.development +++ b/.env.development @@ -2,6 +2,8 @@ ENV = 'development' # base api '/dev-api' +#VUE_APP_BASE_API = 'http://test.renniting.cn/bcp/' + VUE_APP_BASE_API = 'http://127.0.0.1:8099' diff --git a/src/api/cardticket.js b/src/api/cardticket.js new file mode 100644 index 0000000..60cd3b1 --- /dev/null +++ b/src/api/cardticket.js @@ -0,0 +1,11 @@ +import request from '@/utils/request' + +/** + * 车主查询自己的卡券信息 + */ +export function getCouponPerson() { + return request({ + url: '/personCouponPc/getCouponPerson', + method: 'post' + }) +} diff --git a/src/api/mycar.js b/src/api/mycar.js new file mode 100644 index 0000000..f7a3d88 --- /dev/null +++ b/src/api/mycar.js @@ -0,0 +1,11 @@ +import request from '@/utils/request' + +/** + * 车主查询自己的车牌信息 + */ +export function getPersonCarNumPC() { + return request({ + url: '/personCarNumPc/getPersonCarNumPC', + method: 'post' + }) +} diff --git a/src/api/user.js b/src/api/user.js index cfa4a42..ae6a71d 100644 --- a/src/api/user.js +++ b/src/api/user.js @@ -9,7 +9,6 @@ export function login(data) { } export function getInfo(token) { - debugger return request({ url: '/personPc/getUserInfo', method: 'post', diff --git a/src/filters/index.js b/src/filters/index.js new file mode 100644 index 0000000..d533459 --- /dev/null +++ b/src/filters/index.js @@ -0,0 +1,237 @@ +// import parseTime, formatTime and set to filter +export { parseTime, formatTime } from '@/utils' +let moment = require("moment"); +/** + * Show plural label if time is plural number + * @param {number} time + * @param {string} label + * @return {string} + */ +function pluralize(time, label) { + if (time === 1) { + return time + label + } + return time + label + 's' +} + +/** + * @param {number} time + */ +export function timeAgo(time) { + const between = Date.now() / 1000 - Number(time) + if (between < 3600) { + return pluralize(~~(between / 60), ' minute') + } else if (between < 86400) { + return pluralize(~~(between / 3600), ' hour') + } else { + return pluralize(~~(between / 86400), ' day') + } +} + +/** + * Number formatting + * like 10000 => 10k + * @param {number} num + * @param {number} digits + */ +export function numberFormatter(num, digits) { + const si = [ + { value: 1E18, symbol: 'E' }, + { value: 1E15, symbol: 'P' }, + { value: 1E12, symbol: 'T' }, + { value: 1E9, symbol: 'G' }, + { value: 1E6, symbol: 'M' }, + { value: 1E3, symbol: 'k' } + ] + for (let i = 0; i < si.length; i++) { + if (num >= si[i].value) { + return (num / si[i].value + 0.1).toFixed(digits).replace(/\.0+$|(\.[0-9]*[1-9])0+$/, '$1') + si[i].symbol + } + } + return num.toString() +} + +/** + * 10000 => "10,000" + * @param {number} num + */ +export function toThousandFilter(num) { + return (+num || 0).toString().replace(/^-?\d+/g, m => m.replace(/(?=(?!\b)(\d{3})+$)/g, ',')) +} + +/** + * 分转元 + * @param {number} num + */ +export function fen2Yuan(num) { + if(num == undefined || num == null){ + return 0; + } + num = num / 100; + return (+num || 0).toString().replace(/^-?\d+/g, m => m.replace(/(?=(?!\b)(\d{3})+$)/g, ',')) +} + +/** + * Upper case first char + * @param {String} string + */ +export function uppercaseFirst(string) { + return string.charAt(0).toUpperCase() + string.slice(1) +} + +/** + * 将制定格式的时间字符串转换成long + *
  • 0-yyyyMMdd
  • + *
  • 1-yyyy-MM-dd
  • + *
  • 2-HHmmss
  • + *
  • 3-HH:mm:ss
  • + *
  • 4-HHmmssSSS
  • + *
  • 5-HH:mm:ss.SSS
  • + *
  • 6-yyyyMMddHHmmss
  • + *
  • 7-yyyy-MM-dd HH:mm:ss
  • + *
  • 8-yyyyMMddHHmmssSSS
  • + *
  • 9-yyyy-MM-dd HH:mm:ss.SSS
  • + *
  • 10-yyyy/MM/dd HH:mm
  • + *
  • 11-yyyy/MM/dd HH:mm:ss
  • + * + */ +export function string2Long(str, format) { + if (str == null || str == "") { + return ""; + } + return date2Long(string2Date(str, format)); +} + +export function date2Long (date) { + return date.getTime(); +} + +/** + * 将字符串转化为相应时间 + * + * @param {} + * dateStr 时间字符串 + * @param {} + * formatType 指定格式: + * + * @return 解析后的Date对象 + */ +export function string2Date(date,formatType) { + let dateTime; + switch (formatType) { + case 0 : + dateTime= moment(date).format("YYYYMMDD"); + break; + case 1 : + dateTime= moment(date).format("YYYY-MM-DD"); + break; + case 2 : + dateTime= moment(date).format("HHmmss"); + break; + case 3 : + dateTime= moment(date).format("HH:mm:ss"); + break; + case 4 : + dateTime= moment(date).format("HHmmssSSS"); + break; + case 5 : + dateTime= moment(date).format("HH:mm:ss.SSS"); + break; + case 6 : + dateTime= moment(date).format("YYYY-MM-DDHHmmss"); + break; + case 7 : + dateTime= moment(date).format("YYYY-MM-DD HH:mm:ss"); + + break; + case 8 : + dateTime= moment(date).format("yyyyMMddHHmmssSSS"); + break; + case 9 : + dateTime= moment(date).format("yyyy-MM-dd HH:mm:ss.SSS"); + break; + case 10 ://yyyy/MM/dd HH:mm + dateTime= moment(date).format("yyyy/MM/dd HH:mm"); + break; + case 11 ://yyyy/MM/dd HH:mm:ss + dateTime= moment(date).format("yyyy/MM/dd HH:mm:ss"); + break; + } + return dateTime; +} + +/**类型转换*/ +export function busTypeFomatter(value){ + //业务类型: 1:收入 2:退款 3:支出 + if(value == 1){ + return '交易'; + }else if(value == 2){ + return '退款'; + }else if(value == 3){ + return '支出'; + }else{ + return '未知'; + } +}; +export function payTypeFomatter(value){ + //业务类型: 1:收入 2:退款 3:支出 + if(value == 1){ + return '支付宝'; + }else if(value == 2){ + return '微信'; + }else if(value == 3){ + return '银联'; + }else if(value == 4){ + return '服务号'; + }else{ + return '未知'; + } +}; +export function payOrderTypeFomatter(row,value){ + //101:停车付款单,102:停车预付单,103:停车补缴单,104:共享车位;201:余额充值单,202:押金充值;301:会员卡购买单,302:会员卡续费 + if(value == 101){ + return '交易-临停支付'; + }else if(value == 102){ + return '交易-停车预付'; + }else if(value == 103){ + return '交易-停车补缴'; + }else if(value == 104){ + return '交易-共享车位预定'; + }else if(value == 201){ + if(row.terminalSource!='' ||row.terminalSource!=null ||row.terminalSource!=undefined||row.terminalSource!='null'){ + if(row.terminalSource == 1){ + return '交易-余额充值'; + } else if(row.terminalSource == 2){ + return '交易-收费员充值'; + }else { + return '交易-余额充值'; + } + } + else{ + return '交易-余额充值'; + } + + }else if(value == 202){ + return '交易-押金充值'; + }else if(value == 301){ + return '交易-会员卡购买'; + }else if(value == 302){ + return '交易-会员卡续费'; + }else{ + return '未知'; + } +}; diff --git a/src/main.js b/src/main.js index 611654e..4bca80f 100644 --- a/src/main.js +++ b/src/main.js @@ -11,6 +11,7 @@ import '@/styles/index.scss' // global css import App from './App' import store from './store' import router from './router' +import * as filters from './filters' // global filters import '@/icons' // icon import '@/permission' // permission control @@ -28,6 +29,10 @@ import '@/permission' // permission control // mockXHR() // } +// register global utility filters +Object.keys(filters).forEach(key => { + Vue.filter(key, filters[key]) +}) // set ElementUI lang to EN Vue.use(ElementUI, { locale }) diff --git a/src/store/modules/user.js b/src/store/modules/user.js index cbdfac6..2dc78df 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -45,7 +45,6 @@ const actions = { // get user info getInfo({ commit, state }) { return new Promise((resolve, reject) => { - debugger getInfo(state.token).then(response => { const { data } = response diff --git a/src/utils/DateUtils.js b/src/utils/DateUtils.js new file mode 100755 index 0000000..8d5c547 --- /dev/null +++ b/src/utils/DateUtils.js @@ -0,0 +1,494 @@ +/** + * 时间处理工具 + * + * @type + * @author miaofc + */ +export default { + + /** + * 日期对象转换为毫秒数 + */ + + date2Long: function (date) { + return date.getTime(); + }, + /** + * 毫秒转换为日期对象 + * @param dateVal number 日期的毫秒数 + */ + long2Date: function (dateVal) { + return new Date(dateVal); + }, + + /** + * 将制定格式的时间字符串转换成long + *
  • 0-yyyyMMdd
  • + *
  • 1-yyyy-MM-dd
  • + *
  • 2-HHmmss
  • + *
  • 3-HH:mm:ss
  • + *
  • 4-HHmmssSSS
  • + *
  • 5-HH:mm:ss.SSS
  • + *
  • 6-yyyyMMddHHmmss
  • + *
  • 7-yyyy-MM-dd HH:mm:ss
  • + *
  • 8-yyyyMMddHHmmssSSS
  • + *
  • 9-yyyy-MM-dd HH:mm:ss.SSS
  • + *
  • 10-yyyy/MM/dd HH:mm
  • + *
  • 11-yyyy/MM/dd HH:mm:ss
  • + * + */ + string2Long: function (str, format) { + if (str == null || str == "") { + return ""; + } + return this.date2Long(this.string2Date(str, format)); + }, + + + /** + * 毫秒转换为日期对象 + * + * @param dateVal + * + + */ + long2String: function (dateVal, formatType) { + if (dateVal == undefined || dateVal == null) { + return '-' + } + return this.date2String(new Date(dateVal), formatType); + }, + + + /** + * 将时间转化为相应字符串 + * + * @param {} + * date 待格式化的Date对象 + * @param {} + * formatType 指定格式: + * + * @return string 格式化后的字符串 + */ + date2String: function (date, formatType) { + if (undefined == date || null == date) { + return '-'; + } + // 格式化字符串数组 + var patterns = ["yyyyMMdd", "yyyy-MM-dd", "HHmmss", "HH:mm:ss", "HHmmssSSS", "HH:mm:ss.SSS", "yyyyMMddHHmmss", "yyyy-MM-dd HH:mm:ss", "yyyyMMddHHmmssSSS", "yyyy-MM-dd HH:mm:ss.SSS", "yyyy/MM/dd HH:mm", "yyyy/MM/dd HH:mm:ss", "yyyy/MM/dd", "yyyy-MM", "HH:mm"]; + return this.formatDate(date, patterns[formatType]); + }, + + /** + * 将字符串转化为相应时间 + * + * @param {} + * dateStr 时间字符串 + * @param {} + * formatType 指定格式: + * + * @return 解析后的Date对象 + */ + string2Date:function (date,formatType) { + let dateTime; + switch (formatType) { + case 0 : + dateTime= moment(date).format("YYYYMMDD"); + break; + case 1 : + dateTime= moment(date).format("YYYY-MM-DD"); + break; + case 2 : + dateTime= moment(date).format("HHmmss"); + break; + case 3 : + dateTime= moment(date).format("HH:mm:ss"); + break; + case 4 : + dateTime= moment(date).format("HHmmssSSS"); + break; + case 5 : + dateTime= moment(date).format("HH:mm:ss.SSS"); + break; + case 6 : + dateTime= moment(date).format("YYYY-MM-DDHHmmss"); + break; + case 7 : + dateTime= moment(date).format("YYYY-MM-DD HH:mm:ss"); + + break; + case 8 : + dateTime= moment(date).format("yyyyMMddHHmmssSSS"); + break; + case 9 : + dateTime= moment(date).format("yyyy-MM-dd HH:mm:ss.SSS"); + break; + case 10 ://yyyy/MM/dd HH:mm + dateTime= moment(date).format("yyyy/MM/dd HH:mm"); + break; + case 11 ://yyyy/MM/dd HH:mm:ss + dateTime= moment(date).format("yyyy/MM/dd HH:mm:ss"); + break; + } + return dateTime; + }, + /** + * 格式化时间 + * + * @param {} + * date 待格式化的Date对象 + * @param {} + * pattern 格式化模式,可能包含下列字母 + * + * @return 格式化后的字符串 + */ + formatDate: function (date, pattern) { + var dateStr = new String(pattern); + // 格式化公元信息 + dateStr = dateStr.replace("G", date.getFullYear() >= 0 ? "AD" : "BC"); + // 格式化年份信息 + var year = new String(date.getFullYear()); + dateStr = dateStr.replace("yyyy", year); + dateStr = dateStr.replace("yy", year.substring(year.length - 2, year.length)); + // 格式化月份信息 + var month = date.getMonth(); + var monthFullNames = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]; + var monthShortNames = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]; + dateStr = dateStr.replace("MMMM", monthFullNames[month]); + dateStr = dateStr.replace("MMM", monthShortNames[month]); + dateStr = dateStr.replace("MM", month < 9 ? "0" + (month + 1) : month + 1); + // 格式化月份中的日期 + var day = date.getDate(); + dateStr = dateStr.replace("dd", day < 10 ? "0" + day : day); + // 格式化上下午 + dateStr = dateStr.replace("a", date.getHours() < 12 ? "AM" : "PM"); + // 格式化小时 + var hour = date.getHours(); + dateStr = dateStr.replace("HH", hour < 10 ? "0" + hour : hour); + var khour = hour > 11 ? hour - 12 : hour; + dateStr = dateStr.replace("KK", khour < 10 ? "0" + khour : khour); + // 格式化分钟 + var minute = date.getMinutes(); + dateStr = dateStr.replace("mm", minute < 10 ? "0" + minute : minute); + // 格式化秒钟 + var second = date.getSeconds(); + dateStr = dateStr.replace("ss", second < 10 ? "0" + second : second); + // 格式化毫秒 + var millisecond = date.getMilliseconds(); + dateStr = dateStr.replace("SSS", millisecond < 10 ? "00" + millisecond : (millisecond < 100 ? "0" + millisecond : millisecond)); + return dateStr; + }, + + /** + * 取得date在域field上偏移amount后的值 + * + * @param {} + * date 原始时间 + * @param {} + * field 偏移域,可能的取值: + * + * @param {} + * amount 偏移量 + * @return 偏移后的时间 + */ + dateOffset: function (date, field, amount) { + var mount = 0; + switch (field) { + // 以年为单位位移 + case "year", "y": + mount = 31536000 * 1000; + // newDate.setFullYear(date.getFullYear()+amount); + break; + // 以月份为单位位移 + case "month", "M": + mount = 30 * 24 * 60 * 60 * 1000; + // newDate.setMonth(date.getMonth()+amount); + break; + // 以天为单位位移 + case "day", "d": + mount = 24 * 60 * 60 * 1000; + // newDate.setDate(date.getDate()+amount); + break; + // 以小时为单位位移 + case "hour", "h": + mount = 60 * 60 * 1000; + // newDate.setHours(date.getHours()+amount); + break; + // 以分钟为单位位移 + case "minute", "m": + mount = 60 * 1000; + // newDate.setMinutes(date.getMinutes()+amount); + break; + // 以秒为单位位移 + case "second", "s": + mount = 1000; + // newDate.setSeconds(date.getSeconds+amount); + break; + // 以毫秒为单位位移 + case "millisecond", "ms", "S": + mount = 1; + // newDate.setMilliseconds(date.getMilliseconds+amount); + break; + } + var newDate = new Date(date.getTime() + Number(mount) * Number(amount)); + return newDate; + }, + + /** + * 求两个日期间相差的毫秒数 + * + * @param {} + * date1 时间1 + * @param {} + * date2 时间2 + * @return 两个时间相差的毫秒数 + */ + getDiffMillis: function (date1, date2) { + return date1.getTime() - date2.getTime(); + }, + + /** + * 求两个日期间相差的秒数 + * + * @param {} + * date1 时间1 + * @param {} + * date2 时间2 + * @return 两个时间相差的秒数 + */ + getDiffSeconds: function (date1, date2) { + return Math.floor(this.getDiffMillis(date1, date2) / 1000); + }, + + /** + * 求两个日期间相差的分钟数目 + * + * @param {} + * date1 时间1 + * @param {} + * date2 时间2 + * @return 两个时间相差的分钟数 + */ + getDiffMinutes: function (date1, date2) { + return Math.floor(this.getDiffSeconds(date1, date2) / 60); + }, + + /** + * 求两个日期间相差的小时数目 + * + * @param {} + * date1 时间1 + * @param {} + * date2 时间2 + * @return 两个时间相差的小时数 + */ + getDiffHours: function (date1, date2) { + return Math.floor(this.getDiffMinutes(date1, date2) / 60); + }, + + /** + * 求两个日期间相差的天数 + * + * @param {} + * date1 时间1 + * @param {} + * date2 时间2 + * @return 两个时间相差的天数 + */ + getDiffDays: function (date1, date2) { + return Math.floor(this.getDiffHours(date1, date2) / 24); + }, + + /** + * 求两个日期间相差的月数目。认为每个月均为30天。 + * + * @param {} + * date1 时间1 + * @param {} + * date2 时间2 + * @return 两个时间相差的月树 + */ + getDiffMonths: function (date1, date2) { + return Math.floor(this.getDiffDays(date1, date2) / 30); + }, + + /** + * 求两个日期间相差的自然月数目 + * + * @param {} + * date1 时间1 + * @param {} + * date2 时间2 + * @return 两个时间相差的自然月数 + */ + getDiffNaturalMonth: function (date1, date2) { + var month1 = date1.getMonth(); + var month2 = date2.getMonth(); + return this.getDiffYears(date1, date2) * 12 - (month2 - month1); + }, + + /** + * 求两个日期间相差的年数目 + * + * @param {} + * date1 时间1 + * @param {} + * date2 时间2 + * @return 两个时间相差的年数 + */ + getDiffYears: function (date1, date2) { + return date1.getFullYear() - date2.getFullYear(); + }, + + /** + * 求日期为其所在月份的第几天 + * + * @param {} + * day 目标日 + * @return 目标日是第几天。天数从1开始 + */ + getOrinalOfDayInYear: function (day) { + // 得到一年中的第一天 + var firstDay = new Date(day.getFullYear, 0, 1); + // 计算与第一天的差值 + return this.getDiffDays(day, firstDay) + 1; + }, + + /** + * 求日期为其所在月份的第几天 + * + * @param {} + * day 目标日 + * @return 目标日是第几天。天数从1开始 + */ + getOrinalOfDayInMonth: function (day) { + // 得到一个月中的第一天 + var firstDay = new Date(day.getFullYear, day.getMonth(), 1); + // 计算与第一天的差值 + return this.getDiffDays(day, firstDay) + 1; + }, + + /** + * 求日期为其所在周的第几天 + * + * @param {} + * day 目标日 + * @return 目标日是第几天。天数从1开始 + */ + getOrinalOfDayInWeek: function (day) { + return day.getDay() + 1; + }, + + /** + * 求某年共有多少天 + * + * @param {} + * year 年份 + * @return 该年份共有多少天 + */ + getNumberOfDaysInYear: function (year) { + // 若该年份为闰年,返回366 + if ((year % 100 != 0 && year % 4 == 0) || (year % 400 == 0)) { + return 366; + } + // 普通年份返回365 + return 365; + }, + + /** + * 求某月共有多少天 + * + * @param {} + * year 年份 + * @param {} + * month 月份 + * @return 该月内共有多少天 + */ + getNumberOfDaysInMonth: function (year, month) { + // 得到该月份的第一天 + var date1 = new Date(year, month - 1, 1); + // 得到后一个月份的第一天 + var date2 = ""; + if (month != 11) { + date2 = new Date(year, month, 1); + } else { + date2 = new Date(year - 1, 0, 1); + } + return this.getDiffDays(date1, date2); + }, + + /** + * 得到当前年份一共有多少天 + * + * @return 当前年份共有多少天 + */ + getNumberOfDaysInCurrentYear: function () { + var date = new Date(); + return this.getNumberOfDaysInYear(date.getYear()); + }, + + /** + * 得到当前月份一共有多少天 + * + * @return 当前月份共有多少天 + */ + getNumberOfDaysInCurrentMonth: function () { + var date = new Date(); + return this.getNumberOfDaysInMonth(date.getYear(), date.getMonth() + 1); + }, + +// 金钱格式处理 + moneyFormatter: function (value) { + if (value == '0' || value == undefined || value == null || value === '') { + return '0.00'; + } else { + return (value / 100).toFixed(2); + } + } + +}; diff --git a/src/utils/request.js b/src/utils/request.js index 54d8a77..3d392d7 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -58,7 +58,6 @@ service.interceptors.response.use( } }, error => { - debugger console.log('err' + error) // for debug Message({ message: error.message, diff --git a/src/utils/utils.js b/src/utils/utils.js new file mode 100644 index 0000000..253b5b1 --- /dev/null +++ b/src/utils/utils.js @@ -0,0 +1,81 @@ +import DateUtils from './DateUtils.js'; + +/** + * 将制定格式的时间字符串转换成long + *
  • 0-yyyyMMdd
  • + *
  • 1-yyyy-MM-dd
  • + *
  • 2-HHmmss
  • + *
  • 3-HH:mm:ss
  • + *
  • 4-HHmmssSSS
  • + *
  • 5-HH:mm:ss.SSS
  • + *
  • 6-yyyyMMddHHmmss
  • + *
  • 7-yyyy-MM-dd HH:mm:ss
  • + *
  • 8-yyyyMMddHHmmssSSS
  • + *
  • 9-yyyy-MM-dd HH:mm:ss.SSS
  • + *
  • 10-yyyy/MM/dd HH:mm
  • + *
  • 11-yyyy/MM/dd HH:mm:ss
  • + */ +// 日期格式处理 精确到时分秒 如:2018-10-24 08:41:33 +export function timeFormatter(value, row, index) { + if (value == null || value == undefined || value == '') { + return "-"; + } else { + return DateUtils.long2String(value, 7); + } +} + +// 日期格式处理 精确到年月日 如:2018-10-24 +export function timeOneFormatter(value, row, index) { + if (value == null || value == undefined || value == '') { + return "-"; + } else { + return DateUtils.long2String(value, 1); + } +} + +// 时间处理,获取日期的当天开始时间:'2019-06-01 00:00:00' +export function getBeginOfTheDay(value) { + if (value == null || value == undefined || value == '') { + return new Date(new Date(new Date().toLocaleDateString()).getTime()); + } else { + return new Date(new Date(value.toLocaleDateString()).getTime()); + } +} + +// 时间处理,获取日期的当天开始时间:'2019-06-01 23:59:59 +export function getEndOfTheDay(value) { + if (value == null || value == undefined || value == '') { + return new Date(new Date(new Date().toLocaleDateString()).getTime()+24*60*60*1000-1); + } else { + return new Date(new Date(value.toLocaleDateString()).getTime()+24*60*60*1000-1); + } +} + +// 日期格式处理 精确到年月 如:2018-10 +export function yearMonthFormatter(value, row, index) { + if (value == null || value == undefined || value == '') { + return "-"; + } else { + var str = DateUtils.long2String(value, 1); + return str.substr(0, 7); + } +} + +// 金钱格式处理 +export function moneyFormatter(value) { + if (value == '0' || value == undefined || value == null || value === '') { + return '0.00'; + } else { + return (value / 100).toFixed(2); + } +} + + + + + + + + + + diff --git a/src/views/cardticket/index.vue b/src/views/cardticket/index.vue index 896c929..553a402 100644 --- a/src/views/cardticket/index.vue +++ b/src/views/cardticket/index.vue @@ -5,17 +5,18 @@ -
    -
    -
    {{ticket.plname}}
    -
    {{ticket.pname}}
    +
    +
    +
    {{ticket.orgName}}-{{ticket.cardName}}
    +
    有效
    -
    -
    {{ticket.pmoney}}
    +
    +
    {{ticket.fullCutValue | fen2Yuan}}
    +
    元 优惠券
    -
    有效时间:{{ticket.ptime}}
    +
    有效时间:{{ticket.endTime | string2Date(1)}}
    @@ -24,82 +25,34 @@ diff --git a/src/views/login/index.vue b/src/views/login/index.vue index 0c60727..597d99c 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -109,14 +109,17 @@ export default { //获取验证码 else { sendValidatorCode(phone).then(response =>{ - if(response.code=='8888'){ + let data = response.data; + debugger; + if(data.code=='8888'){ this.$message({ type: 'success', message: '验证码发送成功!' }); } }); - this.validateBtn(); + //this.validateBtn(); + } }, validateBtn(){ @@ -136,7 +139,6 @@ export default { }, handleLogin() { this.$refs.loginForm.validate(valid => { - debugger if (valid) { this.loading = true this.$store.dispatch('user/login', this.loginForm).then(() => { diff --git a/src/views/mycar/index.vue b/src/views/mycar/index.vue index 5648780..e478eb8 100644 --- a/src/views/mycar/index.vue +++ b/src/views/mycar/index.vue @@ -5,113 +5,163 @@ - - + + + + + + +
    + + + +
    + 车牌绑定 +
    + + + + + + + + + 绑定车牌 + + + + + +
    +
    + + +
    + 解绑车牌 +
    + + + + + + + + + 解绑车牌 + + + + + +
    +
    +
    + - -
    - 我的车牌 - 绑定车牌 -
    - - - - - - - - - - - 解绑 - - -
    - - - - - - - - - - -