<template>
<div class="requirements-type-container">
    <div class="requirements-type-title">请选择一种需求类型：</div>
    <div class="requirements-type-list">
        <div class="requirements-type-item" :class="type == 1?'cur':''" @click="selectType(1)">
            <div class="requirements-type-title-area">
                <div class="requirements-type-icon type1"></div>
                <div class="requirements-type-title">云端工作：</div>
            </div>
            <div class="requirements-type-purpose">我想明确找个人</div>
            <ul class="requirements-type-purpose-list">
                <li>我需要个前端开发者？</li>
                <li>我需要个java开发者？</li>
                <li>我需要个爬虫工程师？</li>
                <li>我需要个安卓/IOS开发者？</li>
            </ul>
            <div class="requirements-type-payment">按月付费</div>
        </div>
        <div class="requirements-type-item" :class="type == 2?'cur':''" @click="selectType(2)">
            <div class="requirements-type-title-area">
                <div class="requirements-type-icon type2"></div>
                <div class="requirements-type-title">项目整包</div>
            </div>
            <div class="requirements-type-purpose">我有个项目要开发：</div>

            <ul class="requirements-type-purpose-list">
                <li>我要开发个网站？我要开发个小程序？</li>
                <li>我要开发个APP？</li>
                <li>我要做个游戏？我要爬个网站？</li>
            </ul>
            <div class="requirements-type-payment">按项目付费</div>
        </div>
        <div class="requirements-type-item" :class="type == 3?'cur':''" @click="selectType(3)">
            <div class="requirements-type-title-area">
                <div class="requirements-type-icon type3"></div>
                <div class="requirements-type-title">需求梳理</div>
            </div>
            <div class="requirements-type-purpose">
                我有个idea需要请产品经理梳理：
            </div>

            <ul class="requirements-type-purpose-list">
                <li>我的想法要落地，需要产品结构图和流程图？</li>
                <li>用户交互怎么设计？</li>
                <li>原型图不会画？</li>
            </ul>
            <div class="requirements-type-payment">固定付费￥1980</div>
        </div>
    </div>
    <div class="requirements-type-submit">
        <el-button :disabled="!type" type="primary" @click="submit" round>下一步</el-button>
    </div>
</div>
</template>

<script>
export default {
    data() {
        return {
            type: ""
        }
    },
    methods: {
        selectType(type) {
            this.type = type
            this.$emit('formChange', 1,'process')
        },
        async submit() {
           var bool=await this.checkMobile();
           if(bool)  this.$emit('formSubmit',1, this.type)
        }
    }
}
</script>

<style lang="scss" scoped>
.requirements-type-container {
    margin: 80px 80px 0;
}

.requirements-type-container {
    font-size: 22px;
    font-weight: 500;
    color: #0b121a;
    line-height: 30px;
}

.requirements-type-list {
    margin-top: 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.requirements-type-item {
    box-sizing: border-box;
    width: 286px;
    height: 246px;
    cursor: pointer;
    position: relative;

    &::after {
        content: "";
        position: absolute;
        width: 100%;
        height: 100%;
        left: 0;
        top: 0;
        border-radius: 16px;
        border: 1px solid #ced3d9;
        // transition: all 0.3s;
    }

    &.cur {
        &::after {
            border: 2px solid #308EFF;
        }
    }
}

.requirements-type-title-area {
    margin-top: 17px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.requirements-type-icon {
    width: 36px;
    height: 36px;
    margin-right: 8px;
    background-position: 50% 50%;
    background-repeat: no-repeat;
    background-size: 36px auto;

    &.type1 {
        background-image: url("~@/assets/img/account/type1.png");
    }

    &.type2 {
        background-image: url("~@/assets/img/account/type2.png");
    }

    &.type3 {
        background-image: url("~@/assets/img/account/type3.png");
    }
}

.requirements-type-title {
    font-size: 16px;
    font-weight: 500;
    color: #0b121a;
    line-height: 22px;
}

.requirements-type-purpose {
    margin-left: 24px;
    margin-top: 17px;
    font-size: 14px;
    font-weight: 500;
    color: #0b121a;
    line-height: 20px;
}

.requirements-type-purpose-list {
    margin-top: 6px;
    margin-left: 24px;

    li {
        width: 224px;
        margin-left: 20px;
        list-style: disc;
        font-size: 14px;
        font-family: PingFangSC-Regular, PingFang SC;
        font-weight: 400;
        color: #828c99;
        line-height: 20px;
    }
}

.requirements-type-payment {
    margin-left: 24px;
    margin-top: 20px;
    font-size: 14px;
    font-family: PingFangSC-Regular, PingFang SC;
    font-weight: 400;
    color: #828c99;
    line-height: 20px;
}

.requirements-type-submit {
    text-align: center;
    margin-top: 80px;
}
</style>
