Commit f8c6e46a authored by gengchunlei's avatar gengchunlei

push

parent d0a9f513
NODE_ENV=dev NODE_ENV=dev
VUE_APP_BASE_URL1 = http://192.168.3.9:8889 VUE_APP_BASE_URL1 = http://192.168.1.116:8889
VUE_APP_BASE_URL = https://beta-yjservice.yiboshi.com VUE_APP_BASE_URL = https://beta-yjservice.yiboshi.com
VUE_APP_BASE_URL1 = https://yaoju-service.yiboshi.com VUE_APP_BASE_URL1 = https://yaoju-service.yiboshi.com
...@@ -3,11 +3,13 @@ export function getQueryVariable(variable, urlInfo) { ...@@ -3,11 +3,13 @@ export function getQueryVariable(variable, urlInfo) {
let url = decodeURI(decodeURI(urlInfo || window.location.href)) let url = decodeURI(decodeURI(urlInfo || window.location.href))
console.log(url) console.log(url)
let i = url.indexOf('?') let i = url.indexOf('?')
let queryStr = url.substr(i+1) let queryStr = url.substr(i + 1)
let vars = queryStr.split("&"); let vars = queryStr.split("&");
for (let i=0;i<vars.length;i++) { for (let i = 0; i < vars.length; i++) {
let pair = vars[i].split("="); let pair = vars[i].split("=");
if(pair[0] == variable){return pair[1];} if (pair[0] == variable) {
return pair[1];
}
} }
return ''; return '';
} }
...@@ -99,6 +101,7 @@ export const womenIdCardReg = /(^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11 ...@@ -99,6 +101,7 @@ export const womenIdCardReg = /(^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11
export const idCardValidator = (value) => { export const idCardValidator = (value) => {
const reg = [idCardReg, menIdCardReg, womenIdCardReg][0]; const reg = [idCardReg, menIdCardReg, womenIdCardReg][0];
if (value) {
const val = value.trim(); const val = value.trim();
const flag = validateIdCard(value); const flag = validateIdCard(value);
if ((!flag || !reg.test(value)) && val) { if ((!flag || !reg.test(value)) && val) {
...@@ -106,6 +109,7 @@ export const idCardValidator = (value) => { ...@@ -106,6 +109,7 @@ export const idCardValidator = (value) => {
resolve(false) resolve(false)
}) })
} }
}
new Promise(resolve => { new Promise(resolve => {
resolve(true) resolve(true)
}) })
...@@ -113,13 +117,15 @@ export const idCardValidator = (value) => { ...@@ -113,13 +117,15 @@ export const idCardValidator = (value) => {
}; };
//身份证方法校验 //身份证方法校验
export const idCardV = (value, type = 0)=> { export const idCardV = (value, type = 0) => {
const reg = [idCardReg, menIdCardReg, womenIdCardReg][type]; const reg = [idCardReg, menIdCardReg, womenIdCardReg][type];
if (value) {
const val = value.trim(); const val = value.trim();
const flag = validateIdCard(value); const flag = validateIdCard(value);
if ((!flag || !reg.test(value)) && val) { if ((!flag || !reg.test(value)) && val) {
return false return false
} }
}
return true return true
} }
......
const IsProd = process.env.NODE_ENV === 'prod'; const IsProd = process.env.NODE_ENV === 'prod';
const date = new Date(); const date = new Date();
const Version=''+date .getFullYear()+date .getMonth()+date .getDate()+date.getHours(); const Version=''+date .getFullYear()+date .getMonth()+date .getDate()+date.getHours()+date.getTime();
module.exports = { module.exports = {
runtimeCompiler: true, runtimeCompiler: true,
indexPath: "index.html", indexPath: "index.html",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment