<template>
    <div class="page">
        <view class="search-form">
            <image class="search-icon" src="@/static/image/icon/search.png"></image>
            <input placeholder="请输入要查询的内容" placeholder-class="log-input-p" type="text" />
        </view>
        <view class="list">
            <view class="item flex-between" v-for="v in platformList" :key="v.id">
                <view class="com flex-align-center">
                    <image :src="evn.APP_IMAGE_BASE_API + v.logo" />
                    <view class="text">
                        <view class="title">{{ v.name }}</view>
                        <view class="describe">点击跳转平台</view>
                    </view>
                </view>
                <view class="arrow"></view>
            </view>
        </view>
    </div>
</template>

<script setup>
import { getPlatformPageList } from "@/api/postion.js";
import { reactive } from "vue";
import evn from "@/utils/config.js";
let type = 1;
let pageNo = 1;
const platformList = reactive([]);
const getData = () => {
    getPlatformPageList({
        type,
        pageSize: 10,
        pageNo: pageNo++
    }).then(res => {
        console.log(res);
        platformList.push(...res.data);
    });
};
onLoad(opstion => {
    console.log(opstion);
    if (opstion.type == "零工专区") {
        type = 1;
    } else {
        type = 2;
    }
    uni.setNavigationBarTitle({
        title: opstion.type
    });
    getData();
});
</script>

<style lang="scss" scoped>
.page {
    background-color: #ffffff;
}
.search-form {
    position: relative;
    box-sizing: content-box;
    width: 686rpx;
    height: 72rpx;
    padding-top: 27rpx;
    margin: 0 32rpx;
    overflow: hidden;
    border-top: 1px solid #f3f4f8;

    // background: rgba(245, 245, 245, 1);
    border-radius: 2px;
    .search-icon {
        position: absolute;
        top: 46rpx;
        left: 42rpx;
        z-index: 10;
        width: 28rpx;
        height: 28rpx;
    }
    input {
        // background-color: #F7F7F7;
        position: absolute;
        right: 0rpx;
        left: 0rpx;
        z-index: 9;
        box-sizing: border-box;
        width: 100%;
        width: auto;
        height: 72rpx;
        padding: 0 88rpx;
        background-color: #f2f3f5;
    }
}
.list {
    padding: 0 32rpx;
    margin-top: 6rpx;
    .item {
        padding: 30rpx 0;
        border-bottom: 2rpx solid #f3f4f8;
    }
    .com {
        color: #1b2026;
        image {
            width: 80rpx;
            height: 80rpx;
            margin-right: 24rpx;
            border-radius: 50%;
        }
        .title {
            font-size: 28rpx;
            font-weight: 600;
        }
        .describe {
            font-size: 24rpx;
        }
    }
}
</style>
