Commit b11c0c97 by 严立

注册上传图片判定显示

parent f7af6819
let output = {
// 测试环境
// base: 'http://bid-server.meiqicloud.com/', // 开发路径
base: 'http://bid-server.meiqicloud.com/', // 开发路径
// base: '/Api/', // 部署路径
// resources: 'http://bid-web.meiqicloud.com',
// agentSignIn: 'http://bid-vue.meiqicloud.com/'
resources: 'http://bid-web.meiqicloud.com',
agentSignIn: 'http://bid-vue.meiqicloud.com/'
// -正式环境
base: '/Api/',
resources: 'https://www.fjbidding.com',
agentSignIn: 'https://www.fjbidding.com/admin/'
// base: '/Api/',
// resources: 'https://www.fjbidding.com',
// agentSignIn: 'https://www.fjbidding.com/admin/'
}
output.uploadFile = output.base + 'bid/common/webupload/upload'
......
......@@ -187,7 +187,6 @@
</el-form-item>
</template>
<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="onNext()">下一步</el-button>
......@@ -470,7 +469,7 @@
* @returns
*/
reset: function () {
this.state = 1
this.state = 3
this.formRegister = {
// 基本信息
companyName: '',
......@@ -775,7 +774,7 @@
'password': this.formRegister.password,
}
console.log(JSON.stringify(funcParam))
iRequest.request(iHost.base + 'bid/zUserCompany/registerCompany', funcParam, 'json', 'post')
.then((funcResponse) => {
this.state = 11
......@@ -789,7 +788,6 @@
* @returns
*/
onLoadStatement: function () {
console.log('onLoadStatement')
window.location.href = '../../static/quote.zip'
},
......@@ -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++) {
if (this.uploadOption.quote.image[i].status === 'ready') {
this.$refs.uploadQuote.submit()
......@@ -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
}
})
......@@ -958,15 +974,14 @@
this.$message.error('图片仅支持JPG、PNG格式')
return false
}
if (funcFile.size >= 6291456) {
if (funcFile.size >= 1024 * 1024 * 6) {
this.$message.error('文件大小不超过5MB')
return false
}
break
case 'quote':
console.log('quote', funcFile)
if (funcFile.size >= 6291456) {
if (funcFile.size >= 1024 * 1024 * 6) {
this.$message.error('文件大小不超过5MB')
return false
}
......@@ -1102,8 +1117,6 @@
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