123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990 |
- <template>
- <view>
- <!-- 头部 -->
- <view class="bg-white header flex row-center">
- <block v-if="cate_id">
- <u-icon name="file-text-fill" color="#DD4250" size="32"></u-icon>
- <view class="cate-title m-l-10">{{ cate.title }}</view>
- </block>
- <block v-else-if="keyword">
- <u-icon name="search" color="#DD4250" size="32"></u-icon>
- <view class="cate-title m-l-10">搜索关键字:{{ keyword }}</view>
- </block>
- <block v-else>
- <u-icon name="file-text-fill" color="#DD4250" size="32"></u-icon>
- <view class="cate-title m-l-10">人才列表</view>
- </block>
- </view>
- <view>
- <!-- 列表 -->
- <talents-list :cid="cate_id" :keyword="keyword"></talents-list>
- </view>
- </view>
- </template>
- <script>
- import {
- mapActions,
- mapGetters
- } from 'vuex'
- import {
- getCategoryDetail
- } from '@/api/app';
- export default {
- data() {
- return {
- statusBarHeight: 0,
- cate_id: null, //分类id
- keyword: '',
- cate: {
- title: ''
- }
- };
- },
- created() {
- uni.getSystemInfo({
- success: (res) => {
- this.statusBarHeight = res.statusBarHeight;
- }
- });
- },
- onLoad() {
- this.cate_id = this.$Route.query.cate_id;
- this.keyword = this.$Route.query.keyword;
- if (this.cate_id) {
- this.getCategoryFun()
- }
- },
- onShow() {
- this.getUser();
- },
- methods: {
- ...mapActions(['getUser']),
- async getCategoryFun() {
- const {
- status,
- data
- } = await getCategoryDetail({
- id: this.cate_id
- });
- if (status == 1) {
- this.cate = data
- }
- },
- },
- computed: {
- ...mapGetters(['appConfig']),
- }
- };
- </script>
- <style lang="scss">
- .header {
- padding: 30rpx;
- .cate-title {
- font-size: 32rpx;
- font-weight: 400;
- }
- }
- </style>
|