同步版本

This commit is contained in:
唐明明
2021-08-24 08:53:35 +08:00
parent bfea54eb8f
commit 9a2acd3813
256 changed files with 15703 additions and 1803 deletions

View File

@@ -11,18 +11,18 @@
</view>
<view class="inputs">
<label>企业类型</label>
<picker @change="changePicker" data-type="type">
<picker v-if="type.length > 0" :range="type" :value="typeIndex" range-key="name" @change="changePicker" data-type="type">
<view class="picker-text nowrap">
选择企业类型
{{type[typeIndex].name}}
<uni-icons class="picker-icon" type="arrowdown"></uni-icons>
</view>
</picker>
</view>
<view class="inputs">
<label>企业行业</label>
<picker @change="changePicker" data-type="industry">
<picker v-if="industry.length > 0" :range="industry" :value="industryIndex" range-key="title" @change="changePicker" data-type="industry">
<view class="picker-text nowrap">
选择企业行业
{{industry[industryIndex].title}}
<uni-icons class="picker-icon" type="arrowdown"></uni-icons>
</view>
</picker>
@@ -35,6 +35,7 @@
</template>
<script>
import { createConfig, inits } from '@/apis/interfaces/company'
export default {
data() {
return {
@@ -45,18 +46,34 @@
industryIndex: 0
};
},
created(){
createConfig().then(res=>{
this.type = res.type
this.industry = res.industries
})
},
methods:{
// 提交信息
next(){
console.log(this.name)
console.log('提交信息')
this.$Router.push({name: 'Prompt'})
inits({
name : this.name,
type : this.type[this.typeIndex].id,
industry_id : this.industry[this.industryIndex].industry_id
}).then(res => {
this.$Router.push({name: 'Prompt'})
}).catch(err => {
uni.showToast({
title: err.message,
icon : 'none'
})
})
},
//选择器
changePicker(e){
let changeType = e.target.dataset.type,
changeVlae = e.target.dataset.value
changeVlae = e.detail.value
switch(changeType){
case 'type':
this.typeIndex = changeVlae