|
|
@@ -75,9 +75,9 @@
|
|
|
typeList: [],
|
|
|
inputList: [
|
|
|
{ name: 'name', title: '公司全称', value: '', type: "text" },
|
|
|
- { name: 'register_number', title: '公司简称', value: '', type: "text" },
|
|
|
- { name: 'phone', title: '公司链接', value: '', type: "text" },
|
|
|
- { name: 'desc', title: '公司简介', value: '', type: "textarea"},
|
|
|
+ { name: 'short_name', title: '公司简称', value: '', type: "text" },
|
|
|
+ { name: 'website', title: '公司链接', value: '', type: "text" },
|
|
|
+ { name: 'description', title: '公司简介', value: '', type: "textarea"},
|
|
|
],
|
|
|
imageUrl: '',
|
|
|
dataInfo: {},
|
|
|
@@ -91,17 +91,7 @@
|
|
|
mobile: app.$deviceType.isMobile(),
|
|
|
}
|
|
|
},
|
|
|
- computed: {
|
|
|
- isSubmit() {
|
|
|
- const { verify_status } = this.dataInfo || {}
|
|
|
- if ([ 1, 2 ].indexOf(Number(verify_status)) !== -1) {
|
|
|
- return false
|
|
|
- }
|
|
|
- return true
|
|
|
- },
|
|
|
- },
|
|
|
async created() {
|
|
|
-
|
|
|
},
|
|
|
async mounted() {
|
|
|
await this.needLogin()
|
|
|
@@ -110,9 +100,9 @@
|
|
|
methods: {
|
|
|
/** 获取展示状态 */
|
|
|
getInfo(isRefresh=false) {
|
|
|
- this.$axios.get('/api/remote/get_company_verify_info_for_apply').then(res => {
|
|
|
+ this.$axios.post('/api/kaifawu/get_current_step').then(res => {
|
|
|
if (res.data.status === 1) {
|
|
|
- this.dataInfo = res.data.data
|
|
|
+ this.dataInfo = res.data.data.com_info || {}
|
|
|
// status: "0" 未认证 1认证中 2已成功 3被拒绝
|
|
|
this.inputList.forEach(item => {
|
|
|
let value = this.dataInfo[ item.name ]
|
|
|
@@ -120,83 +110,62 @@
|
|
|
item.value = value
|
|
|
}
|
|
|
})
|
|
|
- const {need_pay, verify_status} = res.data.data
|
|
|
- if (res.data.data && (Number(need_pay) !== 1 || verify_status) && isRefresh) {
|
|
|
- this.$message.success("您已提交企业认证,请耐心等待审核结果!")
|
|
|
- clearInterval(this.interval)
|
|
|
- this.loadingStatus && this.loadingStatus.close()
|
|
|
+ const {step} = this.dataInfo
|
|
|
+ if (step === 2) {
|
|
|
+ location.href = "/kaifain/add"
|
|
|
+ } else if (step === 1) {
|
|
|
+
|
|
|
}
|
|
|
this.inputList = [ ...this.inputList ]
|
|
|
- // this.imageUrl = this.dataInfo.photo_url || ''
|
|
|
+ this.imageUrl = this.dataInfo.logo || ''
|
|
|
console.log('ist', this.inputList)
|
|
|
}
|
|
|
+ }).finally(()=>{
|
|
|
+ this.loadingStatus && this.loadingStatus.close()
|
|
|
})
|
|
|
},
|
|
|
|
|
|
/** 提交 **/
|
|
|
submitForm() {
|
|
|
-
|
|
|
- //认证中 已认证 不能再次提交
|
|
|
- if (!this.isSubmit) {
|
|
|
- this.$message.warning('你已提交企业认证信息,修改请联系客服')
|
|
|
- return
|
|
|
- }
|
|
|
- let p = {
|
|
|
- name: '',
|
|
|
- register_number: '',
|
|
|
- phone: '',
|
|
|
- photo_url: ''
|
|
|
+ let p = {}
|
|
|
+ if (this.dataInfo.id) {
|
|
|
+ this.dataInfo.logo = this.imageUrl
|
|
|
+ p = this.dataInfo
|
|
|
}
|
|
|
- p.photo_url = this.imageUrl
|
|
|
this.inputList.forEach(item => {
|
|
|
p[ item.name ] = item.value
|
|
|
})
|
|
|
-
|
|
|
if (!p.name) {
|
|
|
- this.$message.warning('请输入企业名称');
|
|
|
+ this.$message.warning('请输入公司全称');
|
|
|
return;
|
|
|
}
|
|
|
- if (!p.register_number) {
|
|
|
- this.$message.warning('请输入工商执照注册号');
|
|
|
+ if (!p.short_name) {
|
|
|
+ this.$message.warning('请输入公司简称');
|
|
|
return;
|
|
|
}
|
|
|
- if (!p.phone) {
|
|
|
- this.$message.warning('请输入手机号码');
|
|
|
+ if (!p.website) {
|
|
|
+ this.$message.warning('请输入公司链接');
|
|
|
return;
|
|
|
}
|
|
|
- if (!p.photo_url) {
|
|
|
- this.$message.warning('请上传加盖公章的营业执照');
|
|
|
+ if (!p.description) {
|
|
|
+ this.$message.warning('请输入公司简介');
|
|
|
return;
|
|
|
}
|
|
|
-
|
|
|
- this.$axios.post('/api/remote/save_company_verify_apply', p).then(res => {
|
|
|
+ if (!p.logo) {
|
|
|
+ this.$message.warning('请上传logo图片');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ this.$axios.post('/api/company_info/update_info', p).then(res => {
|
|
|
let data = res.data
|
|
|
if (data.status === 1) {
|
|
|
- //跳转到支付58元钱,之后提交
|
|
|
- if (Number(this.dataInfo.need_pay) === 1) {
|
|
|
- this.$message.success('提交成功,正在跳转...')
|
|
|
- let appUrl = "proginn://pay?product_type=5&product_id=0"
|
|
|
- let url = '/pay?product_type=5'
|
|
|
- if (!this.$deviceType.app) {
|
|
|
- window.open(url, '_black')
|
|
|
- } else {
|
|
|
- console.log('跳转到移动端支付...', url)
|
|
|
- location.href = appUrl
|
|
|
- }
|
|
|
- setTimeout(()=>{
|
|
|
- this.loadingStatus = this.$loading({ fullscreen: true, text: '正在查询支付状态...' });
|
|
|
- this.getPayStatus()
|
|
|
- }, 1500)
|
|
|
- } else {
|
|
|
- this.$message.success('您已提交企业认证,请耐心等待审核结果!')
|
|
|
- setTimeout(() => {
|
|
|
- if (this.$deviceType.app) {
|
|
|
- history.back()
|
|
|
- } else {
|
|
|
- location.href = '/wo/work_todo'
|
|
|
- }
|
|
|
- }, 1000)
|
|
|
- }
|
|
|
+ this.$message.success('您已提交企业信息')
|
|
|
+ setTimeout(() => {
|
|
|
+ // if (this.$deviceType.app) {
|
|
|
+ // history.back()
|
|
|
+ // } else {
|
|
|
+ location.href = '/kaifain/add'
|
|
|
+ // }
|
|
|
+ }, 1000)
|
|
|
} else {
|
|
|
this.$message.error('提交失败')
|
|
|
}
|
|
|
@@ -233,19 +202,6 @@
|
|
|
handleDeleteFile() {
|
|
|
this.imageUrl = ''
|
|
|
},
|
|
|
- async getPayStatus() {
|
|
|
- let maxTime = 30
|
|
|
- this.interval = setInterval(()=>{
|
|
|
- this.getInfo(true)
|
|
|
- maxTime--
|
|
|
- if (maxTime < 0) {
|
|
|
- this.loadingStatus && this.loadingStatus.close()
|
|
|
- this.$message.error("支付结果查询超时,请刷新页面或重试。")
|
|
|
- clearInterval(this.interval)
|
|
|
- return
|
|
|
- }
|
|
|
- }, 3000)
|
|
|
- }
|
|
|
},
|
|
|
|
|
|
}
|