diff --git a/src/main.js b/src/main.js index 7da2c8cf..66fff15a 100644 --- a/src/main.js +++ b/src/main.js @@ -202,6 +202,7 @@ async function VueInit() { // 获取版本信息 let PublishInfo = await getCurrentPublishInfo(); Vue.prototype.$version = PublishInfo.Result; + Vue.prototype.$companyInfo = PublishInfo.OtherInfo; // 获取检查部位 Vue.prototype.$getBodyPart = (id) => { return new Promise(async (resolve, reject) => { @@ -281,13 +282,13 @@ async function VueInit() { if (EmailRegexStr) { return { EmailRegexStr } } - } else if (PublishInfo.OtherInfo) { - let { EmailRegexStr } = PublishInfo.OtherInfo + } else if (Vue.prototype.$companyInfo) { + let { EmailRegexStr } = Vue.prototype.$companyInfo if (EmailRegexStr) { return { EmailRegexStr } } } - return { EmailRegexStr: '/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$/' }; + return { EmailRegexStr: '^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$' }; } Vue.prototype.$updateDictionary = function () { Vue.prototype.$d = function (code) {