<template>
    <div class="page1">
        <NavBar :showIcon="true" :showTitle="true" title="岗位信息" backgroundBox="#FFFFFF"></NavBar>
        <div class="title1">填写企业信息</div>
        <div class="form">
            <formItem title="企业（单位）名称">
                <input :disabled="true" type="text" v-model="enterpriseInformation.name" placeholder="请填写单位名称" />
            </formItem>
            <formItem title="信用代码">
                <input :disabled="true" type="text" v-model="enterpriseInformation.creditCode" placeholder="请填信用代码" />
            </formItem>
            <formItem title="联系地址">
                <textarea
                    auto-height
                    :disabled="true"
                    type="text"
                    v-model="enterpriseInformation.location"
                    placeholder="请填联系地址"
                />
            </formItem>
        </div>
        <wd-tabbar
            @tap="next"
            custom-style="display: flex;justify-content: center !important;z-index:1;"
            fixed
            placeholder
            safeAreaInsetBottom
        >
            <view class="footer"> <button class="foot-btn" @click="next">下一步</button></view>
        </wd-tabbar>
    </div>
</template>

<script setup>
import { ref } from "vue";
import formItem from "./formItem.vue";
import { getCompanyInfoApi } from "@/api/user";
import { useStore } from "./store";
const pinias = useStore();
const enterpriseInformation = ref({});
const articleIds = ref("");
onLoad(({ articleId }) => {
    articleIds.value = articleId;
    getCompanyInfoApi().then(res => {
        enterpriseInformation.value = res.data;
    });
});
const next = () => {
    uni.navigateTo({
        url: `/pages/signUp/addPost?articleId=${articleIds.value}`
    });
};
</script>

<style lang="scss" scoped>
@import "./index.scss";
.page1 {
    background: #fff;
    box-sizing: border-box;
    padding: 0 32rpx;

    .title1 {
        padding: 32rpx 0;
        font-size: 48rpx;
        font-weight: normal;
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        line-height: 54rpx;
        white-space: nowrap;
        color: #1b2026;
    }

    .foot-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 622rpx;
        height: 80rpx;
        color: #ffffff;
        background: #1f86ff;
        border-radius: 12rpx;
    }
}
textarea {
    width: 100%;
    height: 216rpx;
}
</style>
