交互优化

This commit is contained in:
zxy
2024-03-09 19:22:11 +08:00
parent fabcf37716
commit c34e08e780

View File

@@ -20,7 +20,7 @@
<u-sticky offset-top="0">
<view class="u-demo-block" style="background-color: #fff;padding: 20rpx 0;">
<view class="u-demo-block__content">
<view class="typeButtonWrapper">
<view class="typeButtonWrapper" v-if="pageType === 'enterprise'">
<view class="typeButtonLeft">
<view v-for="(item, index) in nonReactiveArray" :key="index"
@@ -28,6 +28,13 @@
}}</view>
</view>
</view>
<view class="typeButtonWrapper" v-else>
<view class="typeButtonLeft">
<view v-for="(item, index) in nonReactiveArray" :key="index" v-show="index == 2"
:class="['typeButton', index == activeTab ? 'activeButton' : '']" @click="changeTab(index)">{{ item
}}</view>
</view>
</view>
</view>
</view>
</u-sticky>
@@ -76,16 +83,30 @@
import Task from './task.vue' // 发布任务
import Work from './work.vue' // 发布岗位
import Person from './person.vue' // 个人招工
import { mapState } from 'vuex'
export default {
components: {CustomTabbar, CustomNavbar, Task, Work, Person},
data() {
return {
value2: '招工内容',
pageType: null, // null 个人 enterprise 企业
fileList1: [],
nonReactiveArray: ["发布任务", "发布岗位", "个人招工"],
activeTab: 0,
}
},
onLoad({type}) {
if(this.enterprise){
this.pageType = 'enterprise'
// this.currentArrTitleID = 0
} else {
this.activeTab = 2
}
// this.getList('refresh')
},
computed: {
...mapState({enterprise: (state) => state.user.seeEnterprise}),
},
methods: {
back() {
uni.reLaunch({