Commit 37498856 by 严立

Signed-off-by: yanl <yanl@xmmakeit.com>

parent 8d92d56a
...@@ -5,14 +5,14 @@ let output = { ...@@ -5,14 +5,14 @@ let output = {
// agentSignIn: 'http://bid-vue.meiqicloud.com/' // agentSignIn: 'http://bid-vue.meiqicloud.com/'
// 测试环境 // 测试环境
base: '/Api/', // base: '/Api/',
resources: 'http://bid-web.meiqicloud.com', // resources: 'http://bid-web.meiqicloud.com',
agentSignIn: 'http://bid-vue.meiqicloud.com/' // agentSignIn: 'http://bid-vue.meiqicloud.com/'
// 正式环境 // 正式环境
// base: '/Api/', base: '/Api/',
// resources: 'https://www.fjbidding.com', resources: 'https://www.fjbidding.com',
// agentSignIn: 'https://www.fjbidding.com/admin/' agentSignIn: 'https://www.fjbidding.com/admin/'
} }
output.uploadFile = output.base + 'bid/common/webupload/upload' output.uploadFile = output.base + 'bid/common/webupload/upload'
......
let output = function (funcXMLHttpRequest, funcConfigure) { let output = function (funcXMLHttpRequest, funcConfigure) {
funcXMLHttpRequest.setRequestHeader('expires', '-10')
funcXMLHttpRequest.setRequestHeader('pragma', 'no-cache')
funcXMLHttpRequest.setRequestHeader('Cache-Control', 'no-cache')
switch (funcConfigure.sendType) { switch (funcConfigure.sendType) {
case 'json': case 'json':
funcXMLHttpRequest.setRequestHeader('Content-Type', 'application/json;') funcXMLHttpRequest.setRequestHeader('Content-Type', 'application/json;')
......
...@@ -43,7 +43,6 @@ let output = { ...@@ -43,7 +43,6 @@ let output = {
// 请求之前修改 // 请求之前修改
iHeader(funcXMLHttpRequest, funcConfigure) iHeader(funcXMLHttpRequest, funcConfigure)
iInterceptors.request(funcXMLHttpRequest, funcConfigure, funcUrl) iInterceptors.request(funcXMLHttpRequest, funcConfigure, funcUrl)
funcXMLHttpRequest.send() funcXMLHttpRequest.send()
funcXMLHttpRequest.onreadystatechange = function () { funcXMLHttpRequest.onreadystatechange = function () {
if (funcXMLHttpRequest.readyState !== 4) { if (funcXMLHttpRequest.readyState !== 4) {
......
...@@ -35,7 +35,7 @@ let output = { ...@@ -35,7 +35,7 @@ let output = {
}, },
email: function (rule, value, callback) { email: function (rule, value, callback) {
let funcRegExp = new RegExp(/^[A-Za-z0-9\u4e00-\u9fa5]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/, 'ig') let funcRegExp = new RegExp(/^[.A-Za-z0-9\u4e00-\u9fa5]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/, 'ig')
if (!funcRegExp.test(value)) { if (!funcRegExp.test(value)) {
callback(new Error(rule.message)) callback(new Error(rule.message))
return return
......
...@@ -424,6 +424,7 @@ ...@@ -424,6 +424,7 @@
}, },
registerInfo: function () { registerInfo: function () {
console.log(JSON.stringify( this.uploadOption))
let funcParam = { let funcParam = {
'companyName': this.formRegister.companyName, 'companyName': this.formRegister.companyName,
'companyCode': this.formRegister.companyCode, 'companyCode': this.formRegister.companyCode,
...@@ -431,7 +432,7 @@ ...@@ -431,7 +432,7 @@
'address': this.formRegister.companyAddress, 'address': this.formRegister.companyAddress,
'email': this.formRegister.email, 'email': this.formRegister.email,
'license': this.uploadOption.license.image[0].url, 'license': this.uploadOption.license.image[0].url,
'bidStatement': this.uploadOption.quote.image[0].url, 'bidStatement': this.formRegister.isQuote === '0' ? '' : this.uploadOption.quote.image[0].url,
'isJoinBid': this.formRegister.isQuote, 'isJoinBid': this.formRegister.isQuote,
'taxType': this.formRegister.companyTax, 'taxType': this.formRegister.companyTax,
'phone': this.formRegister.companyPhone, 'phone': this.formRegister.companyPhone,
...@@ -519,16 +520,23 @@ ...@@ -519,16 +520,23 @@
onUploadChange: function (funcType, funcFile, funcFileList) { onUploadChange: function (funcType, funcFile, funcFileList) {
if (funcFile.status === 'ready') { if (funcFile.status === 'ready') {
if (this.checkFileFormat(funcType, funcFile)) { if (this.checkFileFormat(funcType, funcFile)) {
// 重新定义上传文件名称 // 针对 ie 浏览器不支持 new file 功能直接放过
let funcFileFormat = funcFile.name.substring(funcFile.name.lastIndexOf('.'), funcFile.name.length) try {
let funcFileName = funcType + (new Date() - 0) + funcFileFormat // 重新定义上传文件名称
let funcCopyFile = new File([funcFile.raw], funcFileName, { type: funcFile.raw.type}) let funcFileFormat = funcFile.name.substring(funcFile.name.lastIndexOf('.'), funcFile.name.length)
funcCopyFile.uid = funcFile.raw.uid let funcFileName = funcType + (new Date() - 0) + funcFileFormat
funcFile.raw = funcCopyFile let funcCopyFile = new File([funcFile.raw], funcFileName, { type: funcFile.raw.type})
funcFile.name = funcFileName funcCopyFile.uid = funcFile.raw.uid
funcFile.raw = funcCopyFile
funcFile.name = funcFileName
} catch (err) {
}
this.formRegister[funcType + 'Image'] = 'image' this.formRegister[funcType + 'Image'] = 'image'
this.uploadOption[funcType].image.push(funcFile) this.uploadOption[funcType].image.push(funcFile)
console.log('push', this.uploadOption[funcType].image)
} else { } else {
let funcImageBuffer = JSON.stringify(this.uploadOption[funcType].image) let funcImageBuffer = JSON.stringify(this.uploadOption[funcType].image)
this.uploadOption[funcType].image = [] this.uploadOption[funcType].image = []
...@@ -644,6 +652,7 @@ ...@@ -644,6 +652,7 @@
} }
this.uploadOption[funcType].image = funcImageList this.uploadOption[funcType].image = funcImageList
console.log('this.uploadOption[funcType].image', this.uploadOption[funcType].image)
} }
}, },
......
...@@ -875,10 +875,16 @@ ...@@ -875,10 +875,16 @@
// 重新定义上传文件名称 // 重新定义上传文件名称
let funcFileFormat = funcFile.name.substring(funcFile.name.lastIndexOf('.'), funcFile.name.length) let funcFileFormat = funcFile.name.substring(funcFile.name.lastIndexOf('.'), funcFile.name.length)
let funcFileName = funcType + (new Date() - 0) + funcFileFormat let funcFileName = funcType + (new Date() - 0) + funcFileFormat
let funcCopyFile = new File([funcFile.raw], funcFileName, { type: funcFile.raw.type})
funcCopyFile.uid = funcFile.raw.uid // 针对 ie 浏览器不支持 new file 功能直接放过
funcFile.raw = funcCopyFile try {
funcFile.name = funcFileName let funcCopyFile = new File([funcFile.raw], funcFileName, { type: funcFile.raw.type})
funcCopyFile.uid = funcFile.raw.uid
funcFile.raw = funcCopyFile
funcFile.name = funcFileName
} catch (err) {
}
this.formRegister[funcType + 'Image'] = 'image' this.formRegister[funcType + 'Image'] = 'image'
this.uploadOption[funcType].image.push(funcFile) this.uploadOption[funcType].image.push(funcFile)
......
...@@ -925,11 +925,17 @@ ...@@ -925,11 +925,17 @@
// 重新定义上传文件名称 // 重新定义上传文件名称
let funcFileFormat = funcFile.name.substring(funcFile.name.lastIndexOf('.'), funcFile.name.length) let funcFileFormat = funcFile.name.substring(funcFile.name.lastIndexOf('.'), funcFile.name.length)
let funcFileName = funcType + (new Date() - 0) + funcFileFormat let funcFileName = funcType + (new Date() - 0) + funcFileFormat
let funcCopyFile = new File([funcFile.raw], funcFileName, { type: funcFile.raw.type})
funcCopyFile.uid = funcFile.raw.uid // 针对 ie 浏览器不支持 new file 功能直接放过
funcFile.raw = funcCopyFile try {
funcFile.name = funcFileName let funcCopyFile = new File([funcFile.raw], funcFileName, { type: funcFile.raw.type})
funcCopyFile.uid = funcFile.raw.uid
funcFile.raw = funcCopyFile
funcFile.name = funcFileName
} catch (err) {
}
this.formRegister[funcType + 'Image'] = 'image' this.formRegister[funcType + 'Image'] = 'image'
this.uploadOption[funcType].image.push(funcFile) this.uploadOption[funcType].image.push(funcFile)
} else { } else {
......
...@@ -703,10 +703,16 @@ ...@@ -703,10 +703,16 @@
// 重新定义上传文件名称 // 重新定义上传文件名称
let funcFileFormat = funcFile.name.substring(funcFile.name.lastIndexOf('.'), funcFile.name.length) let funcFileFormat = funcFile.name.substring(funcFile.name.lastIndexOf('.'), funcFile.name.length)
let funcFileName = funcType + (new Date() - 0) + funcFileFormat let funcFileName = funcType + (new Date() - 0) + funcFileFormat
let funcCopyFile = new File([funcFile.raw], funcFileName, { type: funcFile.raw.type})
funcCopyFile.uid = funcFile.raw.uid // 针对 ie 浏览器不支持 new file 功能直接放过
funcFile.raw = funcCopyFile try {
funcFile.name = funcFileName let funcCopyFile = new File([funcFile.raw], funcFileName, { type: funcFile.raw.type})
funcCopyFile.uid = funcFile.raw.uid
funcFile.raw = funcCopyFile
funcFile.name = funcFileName
} catch (err) {
}
this.formRegister[funcType + 'Image'] = 'image' this.formRegister[funcType + 'Image'] = 'image'
this.uploadOption[funcType].image.push(funcFile) this.uploadOption[funcType].image.push(funcFile)
......
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 sign in to comment