|
|
@@ -263,13 +263,15 @@
|
|
|
</div>-->
|
|
|
<div class="row btn-area">
|
|
|
<span @click="sectionChange(2)">上一步</span>
|
|
|
- <span @click="selectFlag == 'open'?submitApply():goProduct()">提交申请</span>
|
|
|
+ <span @click="btnDisabled?'':selectFlag == 'open'?submitApply():goProduct()" :class="btnDisabled?'btn-disabled':''">提交申请</span>
|
|
|
+ </div>
|
|
|
+ <div class="loading" v-if="showLoading">
|
|
|
+ <img src="/images/all/loading.gif" alt="">
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
import Upload from '~components/common/upload/upload.vue'
|
|
|
- import { Loading } from 'element-ui'
|
|
|
export default {
|
|
|
data () {
|
|
|
return {
|
|
|
@@ -293,7 +295,9 @@
|
|
|
},
|
|
|
showFlag: false,
|
|
|
isSelfRegisterSuccess: true,
|
|
|
- selectFlag: 'open'
|
|
|
+ selectFlag: 'open',
|
|
|
+ showLoading: false,
|
|
|
+ btnDisabled: false
|
|
|
}
|
|
|
},
|
|
|
props: [
|
|
|
@@ -435,11 +439,11 @@
|
|
|
})
|
|
|
},
|
|
|
storeApply: function (enuu) {
|
|
|
- let loadingInstance = Loading.service({ fullscreen: true })
|
|
|
+ this.showLoading = true
|
|
|
let validCode = 0
|
|
|
if (this.businessLicenseUrl === '') {
|
|
|
- loadingInstance.close()
|
|
|
this.$message.error('请上传营业执照')
|
|
|
+ this.showLoading = false
|
|
|
} else {
|
|
|
if (this.brands[0].name === '') {
|
|
|
validCode = 1
|
|
|
@@ -479,8 +483,9 @@
|
|
|
qualifications: qualifications,
|
|
|
type: this.tab
|
|
|
}).then(response => {
|
|
|
+ this.showLoading = false
|
|
|
if (response.data.success) {
|
|
|
- loadingInstance.close()
|
|
|
+ this.btnDisabled = true
|
|
|
this.$message.success('感谢您对优软商城的支持,我们会尽快对您提交的信息进行审核,预计审核时间为3个工作日,审核结果将以站内消息及邮件形式通知您!')
|
|
|
this.$http.post('/basic/enterprise/openVendor/' + enuu)
|
|
|
.then(() => {
|
|
|
@@ -496,23 +501,22 @@
|
|
|
window.location.href = '/vendor#/store-apply/wait'
|
|
|
}, 3000)
|
|
|
} else {
|
|
|
- loadingInstance.close()
|
|
|
this.$http.post('/basic/enterprise/openVendorSetRead/' + enuu)
|
|
|
this.$message.error('开通店铺失败')
|
|
|
}
|
|
|
}, err => {
|
|
|
console.log(err)
|
|
|
- loadingInstance.close()
|
|
|
this.$http.post('/basic/enterprise/openVendorSetRead/' + enuu)
|
|
|
this.$message.error('开通店铺失败')
|
|
|
+ this.showLoading = false
|
|
|
})
|
|
|
} else {
|
|
|
if (validCode === 1) {
|
|
|
- loadingInstance.close()
|
|
|
this.$message.error('请添加品牌信息')
|
|
|
+ this.showLoading = false
|
|
|
} else if (validCode === 2) {
|
|
|
- loadingInstance.close()
|
|
|
this.$message.error('请上传品牌图片')
|
|
|
+ this.showLoading = false
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -1074,4 +1078,22 @@
|
|
|
/* .btn-area span:hover {
|
|
|
|
|
|
}*/
|
|
|
+ .loading {
|
|
|
+ position: fixed;
|
|
|
+ top: 0;
|
|
|
+ left: 0;
|
|
|
+ right: 0;
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ z-index: 1000;
|
|
|
+ text-align: center;
|
|
|
+ }
|
|
|
+ .loading img {
|
|
|
+ position: relative;
|
|
|
+ top: 40%;
|
|
|
+ }
|
|
|
+ .btn-area .btn-disabled {
|
|
|
+ cursor: not-allowed;
|
|
|
+ opacity: .5;
|
|
|
+ }
|
|
|
</style>
|