<template>
    <view class="app-container">
        <view class="nav-hidden hidden-animation" :class="{ 'hidden-height': isScrollingDown }">
            <view class="container-search">
                <view class="search-input button-click" @click="navTo('/pages/search/search')">
                    <my-icons class="iconsearch" color="#666666" type="search" size="32"></my-icons>
                    <text class="inpute">职位名称、薪资要求等</text>
                </view>
                <!-- <view class="chart button-click">职业图谱</view> -->
            </view>
            <view class="cards">
                <view class="card press-button" @click="navTo('/pages/nearby/nearby')">
                    <view class="card-title">附近工作</view>
                    <view class="card-text">好岗职等你来</view>
                </view>
                <view class="card press-button" @click="navTo('/packageA/pages/choiceness/choiceness')">
                    <view class="card-title">精选企业</view>
                    <view class="card-text">优选职得信赖</view>
                </view>
            </view>
        </view>
        <view class="nav-filter">
            <view class="filter-top" @touchmove.stop.prevent>
                <scroll-view :scroll-x="true" :show-scrollbar="false" class="tab-scroll">
                    <view class="jobs-left">
                        <view
                            class="job button-click"
                            :class="{ active: state.tabIndex === 'all' }"
                            @click="choosePosition('all')"
                        >
                            全部
                        </view>
                        <view
                            class="job button-click"
                            :class="{ active: state.tabIndex === index }"
                            v-for="(item, index) in userInfo.jobTitle"
                            :key="index"
                            @click="choosePosition(index)"
                        >
                            {{ item }}
                        </view>
                    </view>
                </scroll-view>
                <view class="jobs-add button-click" @click="navTo('/packageA/pages/addPosition/addPosition')">
                    <my-icons class="iconsearch" color="#666D7F" type="plusempty" size="32"></my-icons>
                    <text>添加</text>
                </view>
            </view>
            <view class="filter-bottom">
                <view class="btm-left">
                    <view
                        class="button-click filterbtm"
                        :class="{ active: pageState.search.order === item.value }"
                        v-for="item in rangeOptions"
                        @click="handelHostestSearch(item)"
                        :key="item.value"
                    >
                        {{ item.text }}
                    </view>
                </view>
                <view class="btm-right button-click" @click="openFilter">
                    筛选
                    <image class="right-sx" :class="{ active: showFilter }" src="@/static/icon/shaixun.png"></image>
                </view>
            </view>
        </view>
        <view class="table-list">
            <scroll-view :scroll-y="true" class="falls-scroll" @scroll="handleScroll" @scrolltolower="scrollBottom">
                <view class="falls">
                    <custom-waterfalls-flow
                        :column="columnCount"
                        :columnSpace="columnSpace"
                        ref="waterfallsFlowRef"
                        :value="list"
                    >
                        <template v-slot:default="job">
                            <view class="item btn-feel" v-if="!job.recommend">
                                <view class="falls-card" @click="nextDetail(job)">
                                    <view class="falls-card-pay">
                                        <view class="pay-text">
                                            <Salary-Expectation
                                                :max-salary="job.maxSalary"
                                                :min-salary="job.minSalary"
                                                :is-month="true"
                                            ></Salary-Expectation>
                                        </view>
                                        <image v-if="job.isHot" class="flame" src="/static/icon/flame.png"></image>
                                    </view>
                                    <view class="falls-card-title">{{ job.jobTitle }}</view>
                                    <view class="fl_box fl_warp">
                                        <view class="falls-card-education mar_ri10" v-if="job.education">
                                            <dict-Label dictType="education" :value="job.education"></dict-Label>
                                        </view>
                                        <view class="falls-card-experience" v-if="job.experience">
                                            <dict-Label dictType="experience" :value="job.experience"></dict-Label>
                                        </view>
                                    </view>
                                    <view class="falls-card-company">
                                        青岛
                                        <dict-Label dictType="area" :value="job.jobLocationAreaCode"></dict-Label>
                                    </view>
                                    <view class="falls-card-pepleNumber">
                                        <view>
                                            <image class="point2" src="/static/icon/pintDate.png"></image>
                                            <view class="fl_1">
                                                {{ job.postingDate || '发布日期' }}
                                            </view>
                                        </view>
                                        <view>
                                            <image class="point3" src="/static/icon/pointpeople.png"></image>
                                            <view class="fl_1">
                                                {{ vacanciesTo(job.vacancies) }}
                                            </view>
                                        </view>
                                    </view>
                                    <view class="falls-card-company2">
                                        <image class="point3" src="/static/icon/point3.png"></image>
                                        <view class="fl_1">
                                            {{ job.companyName }}
                                        </view>
                                    </view>
                                    <!--  <view class="falls-card-matchingrate">
                                        <view class=""><matchingDegree :job="job"></matchingDegree></view>
                                        <my-icons type="star" size="60"></my-icons>
                                    </view> -->
                                </view>
                            </view>
                            <view class="item" :class="{ isBut: job.isBut }" v-else>
                                <view class="recommend-card">
                                    <view class="card-content">
                                        <view class="recommend-card-title">在找「{{ job.jobCategory }}」工作吗？</view>
                                        <view class="recommend-card-tip">{{ job.tip }}</view>
                                        <view class="recommend-card-line"></view>
                                        <view class="recommend-card-controll">
                                            <view class="controll-no" @click="clearfindJob(job)">不是</view>
                                            <view class="controll-yes" @click="findJob(job)">是的</view>
                                        </view>
                                    </view>
                                </view>
                            </view>
                        </template>
                    </custom-waterfalls-flow>
                    <loadmore ref="loadmoreRef"></loadmore>
                </view>
                <empty v-if="!list.length"></empty>
            </scroll-view>
        </view>
        <!-- 筛选 -->
        <select-filter ref="selectFilterModel"></select-filter>

               <view class="maskFristEntry" v-if="maskFristEntry">
            <view class="entry-content">
                <text class="text1">左滑查看视频</text>
                <text class="text2">左滑查看视频</text>
                <view class="goExperience">去体验</view>
                <view class="maskFristEntry-Close" @click="closeFristEntry">1</view>
            </view>
        </view>
    </view>
</template>

<script setup>
import { reactive, inject, watch, ref, onMounted, watchEffect, nextTick } from 'vue';
import img from '@/static/icon/filter.png';
import dictLabel from '@/components/dict-Label/dict-Label.vue';
const { $api, navTo, vacanciesTo, formatTotal } = inject('globalFunction');
import { onLoad, onShow } from '@dcloudio/uni-app';
import { storeToRefs } from 'pinia';
import useUserStore from '@/stores/useUserStore';
const { userInfo } = storeToRefs(useUserStore());
import useDictStore from '@/stores/useDictStore';
const { getTransformChildren, oneDictData } = useDictStore();
import useLocationStore from '@/stores/useLocationStore';
import selectFilter from '@/components/selectFilter/selectFilter.vue';
import { useRecommedIndexedDBStore, jobRecommender } from '@/stores/useRecommedIndexedDBStore.js';
import { useScrollDirection } from '@/hook/useScrollDirection';
import { useColumnCount } from '@/hook/useColumnCount';
const { isScrollingDown, handleScroll } = useScrollDirection();
const recommedIndexDb = useRecommedIndexedDBStore();
const emits = defineEmits(['onShowTabbar']);

const waterfallsFlowRef = ref(null);
const loadmoreRef = ref(null);
const conditionSearch = ref({});
const waterfallcolumn = ref(2);
const maskFristEntry = ref(true);
const state = reactive({
    tabIndex: 'all',
});
const list = ref([]);
const pageState = reactive({
    page: 0,
    total: 0,
    maxPage: 2,
    pageSize: 10,
    search: {
        order: 0,
    },
});
const inputText = ref('');
const showFilter = ref(false);
const selectFilterModel = ref(null);
const showModel = ref(false);
const rangeOptions = ref([
    { value: 0, text: '推荐' },
    { value: 1, text: '最热' },
    { value: 2, text: '最新发布' },
]);
const isLoaded = ref(false);

const { columnCount, columnSpace } = useColumnCount(() => {
    pageState.pageSize = 10 * (columnCount.value - 1);
    getJobRecommend('refresh');
    nextTick(() => {
        waterfallsFlowRef.value?.refresh?.();
        useLocationStore().getLocation();
    });
});

async function loadData() {
    try {
        if (isLoaded.value) return;
        isLoaded.value = true;
    } catch (err) {
        isLoaded.value = false; // 重置状态允许重试
        throw err;
    }
}

function scrollBottom() {
    loadmoreRef.value.change('loading');
    if (state.tabIndex === 'all') {
        getJobRecommend();
    } else {
        getJobList();
    }
}

function findJob(job) {
    if (job.isBut) {
        $api.msg('已确认');
    } else {
        list.value = list.value.map((item) => {
            if (item.recommend && item.jobCategory === job.jobCategory) {
                return {
                    ...item,
                    isBut: true,
                };
            }
            return item;
        });
        const jobstr = job.jobCategory;
        const jobsObj = {
            地区: 'area',
            岗位: 'jobTitle',
            经验: 'experience',
        };
        const [name, value] = jobstr.split(':');
        const nameAttr = jobsObj[name];
        if (name === '岗位') {
            conditionSearch.value[nameAttr] = value;
        } else {
            const valueAttr = oneDictData(nameAttr).filter((item) => item.label === value);
            if (valueAttr.length) {
                const val = valueAttr[0].value;
                conditionSearch.value[nameAttr] = val;
            }
        }
    }
}

function clearfindJob(job) {
    if (job.isBut) {
        $api.msg('已确认');
    } else {
        list.value = list.value.map((item) => {
            if (item.recommend && item.jobCategory === job.jobCategory) {
                return {
                    ...item,
                    isBut: true,
                };
            }
            return item;
        });
        recommedIndexDb.deleteRecords(job);
    }
}

function nextDetail(job) {
    // 记录岗位类型，用作数据分析
    if (job.jobCategory) {
        const recordData = recommedIndexDb.JobParameter(job);
        recommedIndexDb.addRecord(recordData);
    }
    navTo(`/packageA/pages/post/post?jobId=${btoa(job.jobId)}`);
}

function openFilter() {
    showFilter.value = true;
    emits('onShowTabbar', false);
    uni.hideTabBar();
    selectFilterModel.value?.open({
        title: '筛选',
        maskClick: true,
        success: (values) => {
            pageState.search = {
                ...pageState.search,
            };
            for (const [key, value] of Object.entries(values)) {
                pageState.search[key] = value.join(',');
            }
            showFilter.value = false;
            getJobList('refresh');
            uni.showTabBar();
        },
        cancel: () => {
            showFilter.value = false;
            emits('onShowTabbar', true);
            uni.showTabBar();
        },
    });
}

function handleFilterConfirm(e) {
    console.log(e);
}

function choosePosition(index) {
    state.tabIndex = index;
    list.value = [];
    if (index === 'all') {
        pageState.search = {
            order: pageState.search.order,
        };
        inputText.value = '';
        getJobRecommend('refresh');
    } else {
        // const id = useUserStore().userInfo.jobTitleId.split(',')[index];
        pageState.search.jobTitle = userInfo.value.jobTitle[index];
        inputText.value = '';
        getJobList('refresh');
    }
}

function handelHostestSearch(val) {
    pageState.search.order = val.value;
    if (state.tabIndex === 'all') {
        getJobRecommend('refresh');
    } else {
        getJobList('refresh');
    }
}

function getJobRecommend(type = 'add') {
    if (type === 'refresh') {
        list.value = [];
        if (waterfallsFlowRef.value) waterfallsFlowRef.value.refresh();
    }
    let params = {
        pageSize: pageState.pageSize,
        sessionId: useUserStore().seesionId,
        ...pageState.search,
        ...conditionSearch.value,
    };
    let comd = {
        recommend: true,
        jobCategory: '',
        tip: '确认你的兴趣，为您推荐更多合适的岗位',
    };
    $api.createRequest('/app/job/recommend', params).then((resData) => {
        const { data, total } = resData;
        pageState.total = 0;
        if (type === 'add') {
            // 记录系统
            recommedIndexDb.getRecord().then((res) => {
                if (res.length) {
                    // 数据分析系统
                    const resultData = recommedIndexDb.analyzer(res);
                    const { sort, result } = resultData;
                    // 岗位询问系统
                    const conditionCounts = Object.fromEntries(
                        sort.filter((item) => item[1] > 1) // 过滤掉次数为 1 的项
                    );
                    jobRecommender.updateConditions(conditionCounts);

                    const question = jobRecommender.getNextQuestion();

                    if (question) {
                        comd.jobCategory = question;
                        // 生成随机插入位置，排除前两个和最后两个位置
                        let insertIndex;
                        if (data.length <= 4) {
                            // 如果数据长度小于等于4，直接插入到中间位置
                            insertIndex = Math.floor(data.length / 2);
                        } else {
                            // 生成2到data.length-2之间的随机位置
                            insertIndex = Math.floor(Math.random() * (data.length - 4)) + 2;
                        }
                        data.splice(insertIndex, 0, comd);
                    }
                }
                const reslist = dataToImg(data);
                list.value.push(...reslist);
            });
        } else {
            list.value = dataToImg(data);
        }
        // 切换状态
        if (loadmoreRef.value && typeof loadmoreRef.value.change === 'function') {
            if (data.length < pageState.pageSize) {
                loadmoreRef.value.change('noMore');
            } else {
                loadmoreRef.value.change('more');
            }
        }
        // 当没有岗位，刷新sessionId重新啦
        if (!data.length) {
            useUserStore().initSeesionId();
        }
    });
}

function getJobList(type = 'add') {
    if (type === 'add' && pageState.page < pageState.maxPage) {
        pageState.page += 1;
    }
    if (type === 'refresh') {
        list.value = [];
        pageState.page = 1;
        pageState.maxPage = 2;
        // waterfallsFlowRef.value.refresh();
        if (waterfallsFlowRef.value) waterfallsFlowRef.value.refresh();
    }
    let params = {
        current: pageState.page,
        pageSize: pageState.pageSize,
        ...pageState.search,
        // ...conditionSearch.value,
    };

    $api.createRequest('/app/job/list', params).then((resData) => {
        const { rows, total } = resData;
        if (type === 'add') {
            const str = pageState.pageSize * (pageState.page - 1);
            const end = list.value.length;
            const reslist = dataToImg(rows);
            list.value.splice(str, end, ...reslist);
        } else {
            list.value = dataToImg(rows);
        }
        pageState.total = resData.total;
        pageState.maxPage = Math.ceil(pageState.total / pageState.pageSize);
        // 切换状态
        if (loadmoreRef.value && typeof loadmoreRef.value.change === 'function') {
            if (rows.length < pageState.pageSize) {
                loadmoreRef.value?.change('noMore');
            } else {
                loadmoreRef.value?.change('more');
            }
        }
    });
}

function dataToImg(data) {
    return data.map((item) => ({
        ...item,
        image: img,
        hide: true,
    }));
}

defineExpose({ loadData });
</script>

<style lang="stylus" scoped>
// .maskFristEntry
//     position: fixed;
//     // right: 20rpx;
//     // bottom: calc(50% - 200rpx);
//     height: 100vh
//     width: 100vw
//     background: rgba(0,0,0,0.3)
//     .entry-content
//         display: flex;
//         align-items: center
//         position: absolute
//         left: 50%
//         top: 40%
//         transform: translate(-50%, -50%)
//         flex-direction: column
//         background: url('@/static/imgs/fristEntry.png') 0 0 no-repeat;
//         background-size: 100% 100%;
//         width: 480rpx
//         height: 584rpx
//         // padding-left: 80rpx
//         .text1
//             margin-top: 370rpx
//             font-size: 36rpx
//             background: linear-gradient(273.34deg, #356CFA 3.58%, #A47FFD 85.84%);
//             -webkit-background-clip: text;
//             -webkit-text-fill-color: transparent;
//             background-clip: text; /* 有些浏览器兼容用 */
//             text-fill-color: transparent;
//             padding-left: 28rpx
//         .text2
//             padding-left: 28rpx
//             margin-top: 8rpx
//             font-size: 20rpx;
//             color: #666666;
//             text-align: center;
//         .indicateArrow
//             height: 76rpx
//             width: 68rpx
//         .indicatefristEntry
//             width: 244rpx
//             height: 244rpx
//         .goExperience
//             margin-left: 28rpx
//             margin-top: 28rpx
//             width: 160rpx;
//             height: 60rpx;
//             background: linear-gradient( 180deg, #9974FD 0%, #286BFA 100%);
//             border-radius: 12rpx 12rpx 12rpx 12rpx;
//             font-size: 28rpx;
//             color: #FFFFFF;
//             text-align: center;
//             line-height: 60rpx
//         .maskFristEntry-Close
//             position: absolute;
//             left: calc(50% - 10rpx);
//             bottom: -130rpx
//             width: 42rpx
//             height: 42rpx
//             background: linear-gradient(273.34deg, #356CFA 3.58%, #A47FFD 85.84%);
//             border-radius: 50%;
//         .maskFristEntry-Close::before
//             position: absolute;
//             left: calc( 50% - 2rpx)
//             top: calc( 50% - 10rpx)
//             transform: rotate(45deg);
//             content: ''
//             background: #FFFFFF
//             width: 4rpx
//             height: 20rpx
//         .maskFristEntry-Close::after
//             position: absolute;
//             left: calc( 50% - 2rpx)
//             top: calc( 50% - 10rpx)
//             transform: rotate(-45deg);
//             content: ''
//             background: #FFFFFF
//             width: 4rpx
//             height: 20rpx


.app-container
    width: 100%;
    height: calc(100vh - var(--window-top) - var(--status-bar-height) - var(--window-bottom));
    background: url('@/static/icon/background2.png') 0 0 no-repeat;
    background-size: 100% 728rpx;
    background-color: #FFFFFF;
    display: flex;
    flex-direction: column
    .hidden-animation
        max-height: 1000px;
        transition: all 0.3s ease;
        overflow: hidden;
    .hidden-height
        max-height: 0;
        padding-top: 0;
        padding-bottom: 0;
.container-search
    padding: 16rpx 24rpx
    display: flex
    justify-content: space-between
    .search-input
        display: flex
        align-items: center;
        width: 100%
        height: 80rpx;
        line-height: 80rpx
        // margin-right: 24rpx
        background: #FFFFFF;
        border-radius: 75rpx 75rpx 75rpx 75rpx;
        .iconsearch
            padding-left: 36rpx
        .inpute
            margin-left: 20rpx
            font-weight: 400;
            font-size: 28rpx;
            color: #B5B5B5;
            width: 100%
    .chart
        font-family: 'PingFangSC-Medium', 'PingFang SC', 'Helvetica Neue', Helvetica, Arial, 'Microsoft YaHei', sans-serif;
        width: 170rpx;
        background: radial-gradient( 0% 56% at 87% 61%, rgba(255,255,255,0.82) 0%, rgba(255,255,255,0.47) 100%);
        box-shadow: 0rpx 8rpx 40rpx 0rpx rgba(210,210,210,0.14);
        border-radius: 80rpx 80rpx 80rpx 80rpx;
        border: 2rpx solid #FFFFFF;
        text-align: center
        font-weight: 500;
        font-size: 28rpx;
        height: 36rpx;
        color: #000000;
        padding: 20rpx 30rpx
.cards
    padding: 10rpx 28rpx
    display: grid
    grid-gap: 38rpx;
    grid-template-columns: 1fr 1fr;
    .card
        height: calc(158rpx - 40rpx);
        padding: 22rpx 26rpx
        box-shadow: 0rpx 8rpx 40rpx 0rpx rgba(210,210,210,0.14);
        border-radius: 16rpx 16rpx 16rpx 16rpx;
        border: 2rpx solid #FFFFFF;
        .card-title
            font-family: 'PingFangSC-Medium', 'PingFang SC', 'Helvetica Neue', Helvetica, Arial, 'Microsoft YaHei', sans-serif;
            font-weight: 600;
            font-size: 32rpx;
            color: #000000;
        .card-text
            font-weight: 400;
            font-size: 24rpx;
            color: #9E9E9E;
            margin-top: 4rpx
    .card:first-child
        background: radial-gradient( 0% 56% at 87% 61%, rgba(255,255,255,0.82) 0%, rgba(255,255,255,0.47) 100%),
            url('@/static/icon/fujin.png');
        background-size: 100%, 100%
    .card:last-child
        background: radial-gradient( 0% 56% at 87% 61%, rgba(255,255,255,0.82) 0%, rgba(255,255,255,0.47) 100%),
            url('@/static/icon/jinxuan.png');
        background-size: 100%, 100%
        background-size: cover;
        background-position: center;

.nav-filter
    padding: 16rpx 28rpx 0 28rpx
    font-family: 'PingFangSC-Medium', 'PingFang SC', 'Helvetica Neue', Helvetica, Arial, 'Microsoft YaHei', sans-serif;
    .filter-top
        display: flex
        justify-content: space-between;
        .tab-scroll
            flex: 1;
            overflow: hidden;
            margin-right: 20rpx
            white-space: nowrap;
            overflow: hidden;
            text-overflow: clip;
            -webkit-mask-image: linear-gradient(to right, black 60%, transparent);
            mask-image: linear-gradient(to right, black 60%, transparent);
            .jobs-left
                display: flex
                flex-wrap: nowrap
                .job
                    font-weight: 400;
                    font-size: 36rpx;
                    color: #666D7F;
                    margin-right: 32rpx;
                    white-space: nowrap
                .active
                    font-weight: 500;
                    font-size: 36rpx;
                    color: #000000;
        .jobs-add
            font-family: 'PingFangSC-Regular', 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
            display: flex
            align-items: center;
            justify-content: center;
            font-weight: 400;
            font-size: 32rpx;
            color: #666D7F;
            line-height: 38rpx;
    .filter-bottom
        display: flex
        justify-content: space-between
        padding: 24rpx 0
        .btm-left
            display: flex
            font-family: 'PingFangSC-Regular', 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
            .filterbtm
                font-weight: 400;
                font-size: 32rpx;
                color: #666D7F;
                margin-right: 24rpx
                padding: 0rpx 16rpx
            .active
                font-weight: 500;
                font-size: 32rpx;
                color: #256BFA;
        .btm-right
            font-family: 'PingFangSC-Regular', 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
            font-weight: 400;
            font-size: 32rpx;
            color: #6C7282;
            .right-sx
                width: 26rpx;
                height: 26rpx;
            .active
                transform: rotate(180deg)
.table-list
    background: #F4F4F4
    flex: 1
    overflow: hidden
    .falls-scroll
        width: 100%
        height: 100%
        .falls
            padding: 28rpx 28rpx;
            .item
                position: relative;
                // background: linear-gradient( 180deg, rgba(19, 197, 124, 0.4) 0%, rgba(255, 255, 255, 0) 30%), rgba(255, 255, 255, 0);
                .falls-card
                    padding: 30rpx;
                    .falls-card-title
                        font-family: 'PingFangSC-Medium', 'PingFang SC', 'Helvetica Neue', Helvetica, Arial, 'Microsoft YaHei', sans-serif;
                        color: #606060;
                        text-align: left;
                        word-break:break-all
                        font-weight: 500;
                        font-size: 30rpx;
                        color: #333333;
                        margin-top: 10rpx
                    .falls-card-pay
                        // height: 50rpx;
                        word-break:break-all
                        color: #002979;
                        text-align: left;
                        display: flex;
                        align-items: end;
                        position: relative
                        .pay-text
                            font-family: DIN-Medium;
                            color: #4C6EFB;
                            padding-right: 10rpx
                            font-weight: 500;
                            font-size: 28rpx;
                            color: #4C6EFB;
                            line-height: 45rpx;
                            text-align: left;
                        .flame
                            position: absolute
                            bottom: 0
                            right: -10rpx
                            transform: translate(0, -30%)
                            width: 24rpx
                            height: 31rpx
                    .falls-card-education,.falls-card-experience
                        width: fit-content;
                        height: 30rpx;
                        background: #F4F4F4;
                        border-radius: 4rpx;
                        padding: 6rpx 20rpx;
                        line-height: 30rpx;
                        font-weight: 400;
                        font-size: 24rpx;
                        color: #6C7282;
                        text-align: center;
                        margin-top: 20rpx;
                        white-space: nowrap

                    .falls-card-company,.falls-card-pepleNumber
                        margin-top: 20rpx;
                        font-size: 24rpx;
                        color: #999999;
                        line-height: 25rpx;
                        text-align: left;
                    .falls-card-pepleNumber
                        display: flex;
                        justify-content: space-between;
                        flex-wrap: wrap
                        margin-top: 10rpx;
                        font-weight: 400;
                        font-size: 24rpx;
                        color: #999999;
                        line-height: 46rpx
                        view
                            display:flex
                            align-items: center
                            white-space: nowrap;
                            .point2
                                margin: 0rpx 6rpx 0 2rpx
                                height: 22rpx
                                width: 22rpx
                            .point3
                                margin: 0rpx 4rpx 0 0
                                height: 28rpx
                                width: 28rpx
                    .falls-card-matchingrate
                        margin-top: 10rpx;
                        display: flex;
                        justify-content: space-between;
                        align-items: center;
                        font-size: 21rpx;
                        color: #4778EC;
                        text-align: left;
                    .falls-card-company2
                        margin-top: 4rpx;
                        font-size: 24rpx;
                        color: #999999;
                        text-align: left;
                        display: flex
                        .point3
                            margin: 4rpx 4rpx 0 0
                            height: 26rpx
                            width: 26rpx
// 推荐卡片
.recommend-card::before
    position: absolute
    left: 0
    top: 0
    content: ''
    height: 60rpx
    width: 100%
    height: 8rpx;
    background: linear-gradient( to left, #9E74FD 0%, #256BFA 100%);
    box-shadow: 0rpx 8rpx 40rpx 0rpx rgba(0,54,170,0.15);
.recommend-card::after
    content ''
    position absolute
    z-index 0
    left 50%
    top 40%
    transform: translate(-50%, -50%)
    width 250rpx
    height 250rpx
    background url('@/static/icon/backAI.png') no-repeat center center
    opacity 0.6
    background-size contain
    pointer-events none
    filter: blur(3rpx)
.recommend-card
    padding 36rpx 24rpx
    background: linear-gradient( 360deg, #DFE9FF 0%, #FFFFFF 52%, #FFFFFF 100%);
    border-radius: 20rpx 20rpx 20rpx 20rpx;
    position relative
    box-shadow 0rpx 4rpx 8rpx 0rpx rgba(72, 89, 123, 0.3)
    .card-content
        position: relative;
        z-index: 2;
        .recommend-card-title
            font-weight: 500;
            font-size: 28rpx;
            color: #333333;
        .recommend-card-tip
            font-weight: 400;
            font-size: 28rpx;
            color: #6C7282;
            margin-top: 28rpx
        .recommend-card-line
            width: calc(100%);
            height: 0rpx;
            border-radius: 0rpx 0rpx 0rpx 0rpx;
            border: 2rpx dashed rgba(0,0,0,0.14);
            margin-top: 50rpx
            position: relative
        // .recommend-card-line::before
        //     position: absolute
        //     content: ''
        //     left: 0
        //     top: 0
        //     transform: translate(-50% - 90rpx, -50%)
        //     width: 28rpx;
        //     height: 28rpx;
        //     background: #F4F4F4;
        //     border-radius: 50%;
        // .recommend-card-line::after
        //     position: absolute
        //     content: ''
        //     right: 0
        //     top: 0
        //     transform: translate(50% + 90rpx, -50%)
        //     width: 28rpx;
        //     height: 28rpx;
        //     background: #F4F4F4;
        //     border-radius: 50%;
        .recommend-card-controll
            display: flex
            align-items: center
            justify-content: space-between
            margin-top: 40rpx
            padding: 0 6rpx;
            .controll-yes
                width: 124rpx;
                height: 60rpx;
                background: rgba(37,107,250,0.1);
                border-radius: 12rpx 12rpx 12rpx 12rpx;
                text-align: center;
                line-height: 60rpx
                color: #256BFA
            .controll-no
                width: 124rpx;
                height: 56rpx;
                line-height: 56rpx
                border-radius: 12rpx 12rpx 12rpx 12rpx;
                border: 2rpx solid #DEDEDE;
                font-weight: 400;
                font-size: 28rpx;
                color: #333333;
                text-align: center;
            .controll-yes:active, .controll-no:active
                width: 120rpx;
                height: 66rpx;
                line-height: 66rpx
                background: #e8e8e8
                border: 2rpx solid #e8e8e8
.isBut{
    filter: grayscale(100%);
}
</style>
