flat: 暂存

This commit is contained in:
Apcallover
2024-03-24 23:38:33 +08:00
parent c0bed3ad7f
commit fb6772bf81
6 changed files with 303 additions and 39 deletions

View File

@@ -41,14 +41,14 @@
<view v-if="activeTab == 0" class="u-demo-block" style="padding: 20rpx;padding-bottom: 140rpx;">
<!-- <view>发布任务</view> -->
<Task></Task>
<Task :company="companyInfo"></Task>
</view>
<view v-if="activeTab == 1" class="u-demo-block" style="padding: 20rpx;padding-bottom: 140rpx;">
<!-- <view>发布岗位</view> -->
<Work></Work>
<Work :company="companyInfo"></Work>
</view>
<view v-if="activeTab == 2" class="u-demo-block" style="padding: 20rpx;padding-bottom: 140rpx;">
<Person></Person>
<Person :company="companyInfo"></Person>
</view>
</view>
<!-- <view style="font-size: 36rpx;color: #000;font-weight: bold;padding: 0 20rpx;">招工指引</view>
@@ -84,6 +84,7 @@
import Work from './work.vue' // 发布岗位
import Person from './person.vue' // 个体户招工
import { mapState } from 'vuex'
import {getUserCompanyInfo} from '@/api/userrecruit.js'
export default {
components: {CustomTabbar, CustomNavbar, Task, Work, Person},
data() {
@@ -93,6 +94,7 @@
fileList1: [],
nonReactiveArray: ["发布任务", "发布岗位", "个体户招工"],
activeTab: 0,
companyInfo: null,
}
},
onLoad({type}) {
@@ -103,9 +105,13 @@
this.activeTab = 2
}
// this.getList('refresh')
this.getInfo()
},
computed: {
...mapState({enterprise: (state) => state.user.seeEnterprise}),
...mapState({
enterprise: (state) => state.user.seeEnterprise,
idNumber: (state) => state.auth.authInfo.idNumber
})
},
methods: {
back() {
@@ -116,6 +122,13 @@
changeTab: function (e) {
this.activeTab = e;
},
async getInfo() {
let resData = await getUserCompanyInfo({idNumber: this.idNumber})
if(resData.data.code === 200) {
if(!resData.data.data.length) return;
this.companyInfo = resData.data.data[0]
}
}
}
}
</script>