<script setup lang="ts">
	import successfulDialog from '@/components/ConfirmDialog/successfulDialog.vue';
	import { getCurrentDateTime } from '@/utils/date'
	import * as HomeAPI from '@/api/model/home'
	import { useUserStore } from '@/store/modules/user'
	const userStore = useUserStore();
	const consultRecord = reactive({
	    id: "",
	    mobile: '',// 咨询人号码
		consultTime:"" ,// 咨询时间
		bizType:5, // 业务类型(1代理记账,2农资,3农机,4金融)
		enterpriseId:"2004840258270488953", // 意向企业
		feedbackRemark:"" // 反馈备注
	})
	const pageData = reactive({
	    showLogoutDialog: false,
		allpyMessageTitle:"",
		applyMessageText:"",
	})
	onShow(() => {
	    const { id, realname, phone } = userStore.getUserInfo;
	    consultRecord.id = id;
	    consultRecord.mobile = phone;
		consultRecord.feedbackRemark = realname;
	})
    // 洽谈合作
    function onCooperationClick() {
        // Message.alert('洽谈合作功能暂不可用，敬请期待~', '温馨提示')
		consultRecord.consultTime = getCurrentDateTime();
		HomeAPI.postConsultRecordAdd(consultRecord).then((res) => {
			pageData.allpyMessageTitle = "申请成功";
			pageData.applyMessageText = "平台已收到申请，将尽快与您取得联系！";
			pageData.showLogoutDialog = true;
		})
    }
</script>

<template>
    <view class="codefun-flex-col page">
        <view class="codefun-flex-col section">
            <view class="codefun-flex-row codefun-justify-between codefun-items-center codefun-self-stretch group">
                <view class="image" />
                <view class="codefun-flex-row group_2" />
            </view>
            <view class="codefun-self-start image_5 mt-17" />
        </view>
        <view class="codefun-flex-col codefun-relative group_3">
            <view class="codefun-flex-col section_2">
                <view class="codefun-flex-col">
                    <image
                        class="codefun-self-start image_6"
                        src="/static/images/codefun/208f8158735fdb34e03f9ac8186e689c.png"
                    />
                    <view
                        class="codefun-flex-col codefun-justify-start codefun-items-start codefun-self-stretch text-wrapper mt-13"
                    >
                        <text class="font text">主营：生鲜食品、餐饮体验、即时配送、全球精选</text>
                    </view>
                    <text class="codefun-self-stretch font_2 text_2 mt-13 indent-md">
                        盒马是中国首家以数据和技术驱动的新零售平台。通过重构零售产业
                        “人、货、场”，打造了“盒马鲜生”、“盒马X会员店”、“盒马奥莱”等业态，致力于满足消费者对美好生活的向往，用科技和创新引领万千家庭的“鲜·美·生活”。
                    </text>
                </view>
                <view class="codefun-flex-row codefun-justify-end codefun-items-baseline codefun-relative group_4">
                    <text class="font_2"><br /></text>
                    <text class="codefun-ml-2 font_2" />
                    <text class="codefun-ml-2 font_2 text_3 pos indent-md">
                        品牌优势:
                        线上线下深度融合，实现“到店+到家“双场景服务、全球直采，源头把控，品质可追溯、30分钟即时配送，覆盖核心城市、支持餐饮现制、现场体验，提升消费互动
                    </text>
                </view>
            </view>
            <view class="codefun-mt-12 codefun-flex-col section_3">
                <view class="codefun-flex-col codefun-items-start">
                    <text class="font_3 text_4">市场服务</text>
                    <view class="codefun-mt-12 section_4" />
                </view>
                <view class="codefun-mt-16 grid">
                    <view class="codefun-flex-col codefun-items-center grid-item">
                        <image class="image_7" src="/static/images/codefun/1c894d991cb2f0bc70d7b3800e700423.png" />
                        <text class="codefun-mt-8 font">仓储服务</text>
                    </view>
                    <view class="codefun-flex-col codefun-items-center grid-item_2">
                        <image class="image_7" src="/static/images/codefun/bcef1c15592bbd3c1cea02585ab7df5e.png" />
                        <text class="codefun-mt-8 font">冷链服务</text>
                    </view>
                    <view class="codefun-flex-col codefun-items-center grid-item_3">
                        <image class="image_7" src="/static/images/codefun/4c062022080fd91d26f0e788b0c7bcc3.png" />
                        <text class="codefun-mt-8 font text_5">本地化适配</text>
                    </view>
                    <view class="codefun-flex-col codefun-items-center grid-item_4">
                        <image class="image_7" src="/static/images/codefun/1fea922d5a84f1606c718ff6f84dd2d5.png" />
                        <text class="font text_6 mt-9">物流服务</text>
                    </view>
                    <view class="codefun-flex-col codefun-items-center grid-item_5">
                        <image class="image_7" src="/static/images/codefun/992b9452dc42a5ce3e7ba8e8331e04b6.png" />
                        <text class="codefun-mt-8 font text_7">合作稳定</text>
                    </view>
                    <view class="codefun-flex-col codefun-items-center grid-item_6">
                        <image class="image_7" src="/static/images/codefun/28e6ba6a7044ff17819971d0ee111232.png" />
                        <text class="font text_8 mt-9">价格竞争力</text>
                    </view>
                </view>
            </view>
            <view class="codefun-mt-12 codefun-flex-col section_5">
                <text class="codefun-self-start font_3 text_9">合作伙伴</text>
                <view
                    class="codefun-mt-8 codefun-flex-col codefun-justify-start codefun-self-stretch codefun-relative group_5"
                >
                    <view class="grid_2">
                        <image class="grid-item_7" src="/static/images/codefun/48edf00a85636a92b686c4b83a773f8a.png" />
                        <image class="grid-item_7" src="/static/images/codefun/2eb99e490e41110301dffff56f00eb0f.png" />
                        <image class="grid-item_7" src="/static/images/codefun/1938c7ebbcde6e39a6d26953c95f8efe.png" />
                        <image class="grid-item_7" src="/static/images/codefun/01c9b13a235c598ed1fd50049ca43f33.png" />
                    </view>
                    <view
                        class="codefun-flex-row codefun-justify-center codefun-items-center section_6 pos_2"
                        @click="onCooperationClick"
                    >
                        <image class="image_8" src="/static/images/codefun/3e23931a51dff8d555bc053a33133be1.png" />
                        <text class="text_10 ml-9">洽谈合作</text>
                    </view>
                </view>
            </view>
        </view>
		<successfulDialog
		    v-model:show="pageData.showLogoutDialog"
		    :title="pageData.allpyMessageTitle"
		    :content="pageData.applyMessageText"
		    confirmText="我知道了"
		    @confirm="pageData.showLogoutDialog = false"
		/>
    </view>
</template>

<style scoped lang="scss">
    .ml-5 {
        margin-left: 10rpx;
    }
    .mt-17 {
        margin-top: 34rpx;
    }
    .mt-13 {
        margin-top: 26rpx;
    }
    .mt-9 {
        margin-top: 18rpx;
    }
    .ml-9 {
        margin-left: 18rpx;
    }
    page {
        background-color: #e6f5e8;
    }
    .page {
        padding-bottom: 140rpx;
        background-color: #e6f5e8;
        mix-blend-mode: NOTTHROUGH;
        height: 100%;
        width: 100%;
        overflow-y: auto;
        overflow-x: hidden;
        .section {
            padding: 28rpx 38rpx 382rpx;
            background-image: url('/static/images/codefun/7f3f04389e8c4f41e9cf97f290ffa85d.png');
            background-size: 100% 100%;
            background-repeat: no-repeat;
            .group {
                padding: 0 2rpx;
                .image {
                    border-radius: 64rpx;
                    width: 108rpx;
                    height: 42rpx;
                }
                .group_2 {
                    margin-right: 16rpx;
                    .image_2 {
                        mix-blend-mode: NOTTHROUGH;
                        width: 34rpx;
                        height: 22rpx;
                    }
                    .image_3 {
                        mix-blend-mode: NOTTHROUGH;
                        width: 30rpx;
                        height: 22rpx;
                    }
                    .image_4 {
                        width: 48rpx;
                        height: 22rpx;
                    }
                }
            }
            .image_5 {
                mix-blend-mode: NOTTHROUGH;
                width: 14rpx;
                height: 26rpx;
            }
        }
        .group_3 {
            margin-top: -188rpx;
            padding: 0 24rpx;
            .section_2 {
                margin-right: 8rpx;
                padding: 34rpx 16rpx 148rpx 28rpx;
                background-color: #ffffff;
                border-radius: 16rpx;
                mix-blend-mode: NOTTHROUGH;
                .image_6 {
                    width: 250rpx;
                    height: 76rpx;
                }
                .text-wrapper {
                    margin-right: 12rpx;
                    padding: 16rpx 0;
                    background-image: linear-gradient(275.2deg, #1fc6ff 0%, #63d8ff 97.2%);
                    border-radius: 8rpx;
                    .text {
                        margin-left: 20rpx;
                        color: #ffffff;
                        line-height: 22.66rpx;
                    }
                }
                .font_2 {
                    font-size: 24rpx;
                    font-family: SourceHanSansCN;
                    line-height: 40rpx;
                    color: #333333;
                }
                .text_2 {
                    text-align: justify;
                }
                .group_4 {
                    margin-right: 12rpx;
                    padding: 0 48rpx;
                    .text_3 {
                        text-align: justify;
                    }
                    .pos {
                        position: absolute;
                        left: 0;
                        right: 0;
                        top: 0;
                        bottom: 0;
                    }
                }
            }
            .section_3 {
                margin-right: 8rpx;
                padding: 24rpx 28rpx 28rpx;
                background-color: #ffffff;
                border-radius: 16rpx;
                mix-blend-mode: NOTTHROUGH;
                .text_4 {
                    line-height: 30.04rpx;
                }
                .section_4 {
                    background-image: linear-gradient(272deg, #5cb56e 0%, #64d63e 100%);
                    width: 128rpx;
                    height: 6rpx;
                }
                .grid {
                    height: 276rpx;
                    display: grid;
                    grid-template-rows: repeat(2, minmax(0, 1fr));
                    grid-template-columns: repeat(3, minmax(0, 1fr));
                    row-gap: 22rpx;
                    column-gap: 22rpx;
                    .grid-item {
                        padding: 28rpx 0;
                        background-color: #eefaeb;
                        border-radius: 8rpx;
                    }
                    .grid-item_2 {
                        padding: 28rpx 0;
                        background-color: #eff1ff;
                        border-radius: 8rpx;
                    }
                    .image_7 {
                        width: 32rpx;
                        height: 32rpx;
                    }
                    .grid-item_3 {
                        padding: 28rpx 0;
                        background-color: #fff3f1;
                        border-radius: 8rpx;
                        .text_5 {
                            line-height: 22.32rpx;
                        }
                    }
                    .grid-item_4 {
                        padding: 26rpx 0 32rpx;
                        background-color: #e8f7f7;
                        border-radius: 8rpx;
                        .text_6 {
                            line-height: 22.34rpx;
                        }
                    }
                    .grid-item_5 {
                        padding: 26rpx 0 32rpx;
                        background-color: #fff3e7;
                        border-radius: 8rpx;
                        .text_7 {
                            line-height: 22.54rpx;
                        }
                    }
                    .grid-item_6 {
                        padding: 28rpx 0;
                        background-color: #faf8ea;
                        border-radius: 8rpx;
                        .text_8 {
                            line-height: 22.6rpx;
                        }
                    }
                }
            }
            .font {
                font-size: 24rpx;
                font-family: SourceHanSansCN;
                line-height: 22.4rpx;
                color: #333333;
            }
            .section_5 {
                margin-right: 8rpx;
                padding: 24rpx;
                background-color: #ffffff;
                border-radius: 16.14rpx;
                mix-blend-mode: NOTTHROUGH;
                .text_9 {
                    margin-left: 4rpx;
                }
                .group_5 {
                    padding-top: 38rpx;
                    .grid_2 {
                        margin-left: 12rpx;
                        margin-right: 32rpx;
                        height: 152rpx;
                        display: grid;
                        grid-template-rows: repeat(2, minmax(0, 1fr));
                        grid-template-columns: repeat(2, minmax(0, 1fr));
                        row-gap: 26rpx;
                        column-gap: 0;
                        .grid-item_7 {
                            filter: drop-shadow(0rpx 4rpx 4rpx #0e421829);
                            width: 242rpx;
                            height: 64rpx;
                        }
                    }
                    .section_6 {
                        padding: 20rpx 0;
                        background-color: #ff9800;
                        border-radius: 198rpx;
                        .image_8 {
                            width: 30rpx;
                            height: 30rpx;
                        }
                        .text_10 {
                            color: #ffffff;
                            font-size: 28rpx;
                            font-family: SourceHanSansCN;
                            line-height: 25.92rpx;
                        }
                    }
                    .pos_2 {
                        position: fixed;
                        left: 40rpx;
                        right: 40rpx;
                        bottom: 40rpx;
                        z-index: 1;
                    }
                }
            }
            .font_3 {
                font-size: 32rpx;
                font-family: SourceHanSansCN;
                line-height: 29.82rpx;
                color: #333333;
            }
        }
    }
</style>
