企业认证新增编辑信息接口
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
<view class="white-box">
|
||||
<view class="inputs logo">
|
||||
<label>企业LOGO</label>
|
||||
<image class="logo-cover" :src="logo || require('@/static/icons/add-icon.png')" @click="updImg('logo')" mode="aspectFill"></image>
|
||||
<image class="logo-cover" :src="logo.showpath || require('@/static/icons/add-icon.png')" @click="updImg('logo')" mode="aspectFill"></image>
|
||||
</view>
|
||||
<view class="inputs">
|
||||
<label>企业名称</label>
|
||||
@@ -24,8 +24,11 @@
|
||||
</view>
|
||||
<view class="inputs">
|
||||
<label>经营类目</label>
|
||||
<view class="picker-text" @click="opnePopup">
|
||||
选择经营类目
|
||||
<view class="picker-text nowrap" @click="opnePopup">
|
||||
<block v-if="categorys.length > 0">
|
||||
<text class="text-item" v-for="(item, index) in category" :key="index" v-if="item.check">{{item.name}}</text>
|
||||
</block>
|
||||
<block v-else>选择经营类目</block>
|
||||
<uni-icons class="picker-icon" type="arrowdown"></uni-icons>
|
||||
</view>
|
||||
</view>
|
||||
@@ -43,7 +46,7 @@
|
||||
</view>
|
||||
<view class="inputs logo">
|
||||
<label>营业执照</label>
|
||||
<image class="license-cover" :src="license || require('@/static/icons/add-icon.png')" @click="updImg('license')" mode="aspectFill"></image>
|
||||
<image class="license-cover" :src="license.showpath || require('@/static/icons/add-icon.png')" @click="updImg('license')" mode="aspectFill"></image>
|
||||
</view>
|
||||
<view class="btns">
|
||||
<button type="default" size="default" @click="submitApplies">提交认证</button>
|
||||
@@ -68,7 +71,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { appliesCreate, applies, appliesInfo } from '@/apis/interfaces/company'
|
||||
import { appliesCreate, applies, appliesInfo, appliesCategory } from '@/apis/interfaces/company'
|
||||
import { uploads } from '@/apis/interfaces/uploading'
|
||||
export default {
|
||||
data() {
|
||||
@@ -78,8 +81,14 @@
|
||||
corporate : "",
|
||||
identity : "",
|
||||
org : "",
|
||||
logo : "",
|
||||
license : "",
|
||||
logo : {
|
||||
showpath: '',
|
||||
path : ''
|
||||
},
|
||||
license : {
|
||||
showpath: '',
|
||||
path : ''
|
||||
},
|
||||
industry : [],
|
||||
industryIndex: 0,
|
||||
reason : '',
|
||||
@@ -98,6 +107,12 @@
|
||||
this.category = res.info.categories
|
||||
if(this.formType === 'put'){
|
||||
appliesInfo().then(formValue => {
|
||||
console.log(formValue)
|
||||
for(let val of formValue.categories){
|
||||
if(val.check){
|
||||
this.categorys.push(val.category_id)
|
||||
}
|
||||
}
|
||||
this.corporate = formValue.certification.name
|
||||
this.identity = formValue.certification.idcard
|
||||
this.org = formValue.certification.code
|
||||
@@ -165,6 +180,16 @@
|
||||
// 选择器
|
||||
changePicker(e){
|
||||
this.industryIndex = e.detail.value
|
||||
appliesCategory({
|
||||
industry: this.industry[e.detail.value].industry_id,
|
||||
}).then(res => {
|
||||
this.category = res
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
icon : 'none'
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
// 上传图片
|
||||
@@ -175,7 +200,10 @@
|
||||
uploads([{
|
||||
uri : path.tempFilePaths[0]
|
||||
}]).then(res => {
|
||||
this[type] = res.url[0]
|
||||
this[type] = {
|
||||
showpath: res.url[0],
|
||||
path: res.path[0]
|
||||
}
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
@@ -243,6 +271,12 @@
|
||||
right: 0;
|
||||
top: 0;
|
||||
}
|
||||
.text-item{
|
||||
margin-left: 10rpx;
|
||||
&:first-child{
|
||||
margin-left: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.logo{
|
||||
|
||||
Reference in New Issue
Block a user