Commit b11c0c97 by 严立

注册上传图片判定显示

parent f7af6819
let output = { let output = {
// 测试环境 // 测试环境
// base: 'http://bid-server.meiqicloud.com/', // 开发路径 base: 'http://bid-server.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'
......
...@@ -187,7 +187,6 @@ ...@@ -187,7 +187,6 @@
</el-form-item> </el-form-item>
</template> </template>
<el-form-item class="register-info-button row con-c"> <el-form-item class="register-info-button row con-c">
<el-button type="primary" @click.prevent="onPrevious()">上一步</el-button> <el-button type="primary" @click.prevent="onPrevious()">上一步</el-button>
<el-button type="primary" @click.prevent="onNext()">下一步</el-button> <el-button type="primary" @click.prevent="onNext()">下一步</el-button>
...@@ -470,7 +469,7 @@ ...@@ -470,7 +469,7 @@
* @returns * @returns
*/ */
reset: function () { reset: function () {
this.state = 1 this.state = 3
this.formRegister = { this.formRegister = {
// 基本信息 // 基本信息
companyName: '', companyName: '',
...@@ -775,7 +774,7 @@ ...@@ -775,7 +774,7 @@
'password': this.formRegister.password, 'password': this.formRegister.password,
} }
console.log(JSON.stringify(funcParam))
iRequest.request(iHost.base + 'bid/zUserCompany/registerCompany', funcParam, 'json', 'post') iRequest.request(iHost.base + 'bid/zUserCompany/registerCompany', funcParam, 'json', 'post')
.then((funcResponse) => { .then((funcResponse) => {
this.state = 11 this.state = 11
...@@ -789,7 +788,6 @@ ...@@ -789,7 +788,6 @@
* @returns * @returns
*/ */
onLoadStatement: function () { onLoadStatement: function () {
console.log('onLoadStatement')
window.location.href = '../../static/quote.zip' window.location.href = '../../static/quote.zip'
}, },
...@@ -878,7 +876,7 @@ ...@@ -878,7 +876,7 @@
} }
} }
if (this.uploadOption.license.image.length > 0) { if (this.uploadOption.quote.image.length > 0) {
for (let i = 0, len = this.uploadOption.quote.image.length; i < len; i++) { for (let i = 0, len = this.uploadOption.quote.image.length; i < len; i++) {
if (this.uploadOption.quote.image[i].status === 'ready') { if (this.uploadOption.quote.image[i].status === 'ready') {
this.$refs.uploadQuote.submit() this.$refs.uploadQuote.submit()
...@@ -887,6 +885,24 @@ ...@@ -887,6 +885,24 @@
} }
} }
// 校验图片是否完全上传完毕,避免快速点击下一步中断上传。
if (this.uploadOption.license.image.length > 0) {
for (let i = 0, len = this.uploadOption.license.image.length; i < len; i++) {
if (this.uploadOption.license.image[i].status === 'uploading') {
this.$message.error('正在上传图片,请稍后。')
return
}
}
}
if (this.uploadOption.quote.image.length > 0) {
for (let i = 0, len = this.uploadOption.quote.image.length; i < len; i++) {
if (this.uploadOption.quote.image[i].status === 'uploading') {
this.$message.error('正在上传图片,请稍后。')
return
}
}
}
this.state = 5 this.state = 5
} }
}) })
...@@ -958,15 +974,14 @@ ...@@ -958,15 +974,14 @@
this.$message.error('图片仅支持JPG、PNG格式') this.$message.error('图片仅支持JPG、PNG格式')
return false return false
} }
if (funcFile.size >= 6291456) { if (funcFile.size >= 1024 * 1024 * 6) {
this.$message.error('文件大小不超过5MB') this.$message.error('文件大小不超过5MB')
return false return false
} }
break break
case 'quote': case 'quote':
console.log('quote', funcFile) if (funcFile.size >= 1024 * 1024 * 6) {
if (funcFile.size >= 6291456) {
this.$message.error('文件大小不超过5MB') this.$message.error('文件大小不超过5MB')
return false return false
} }
...@@ -1102,8 +1117,6 @@ ...@@ -1102,8 +1117,6 @@
this.uploadOption[funcType].image = funcImageList this.uploadOption[funcType].image = funcImageList
} }
console.log(this.uploadOption[funcType].image)
}, },
/** /**
......
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