<template>
  <div class="bg-white md:min-w-bodySet mx-auto">
    <div class="banner bg-gradient-to-r from-white to-bannerBgEndColor">
      <div class="w-bodySet mx-auto pt-24 flex items-center">
        <div class="w-1/2 pl-36 py-36">
          <div class="text-4xl font-semibold text-headerMain">通证版商城-上链购</div>
          <div
            class="text-base text-contentMain mt-5"
          >结合区块链技术，打破传统电商模式，集成商品数字化+商品溯源+区块链提货券+区块链商家积分+数字资产交易模块，构建数字商务全新业态。</div>
          <div class="flex flex-row mt-6">
            <MainButton size="large" text="立即体验" />
          </div>
        </div>
        <div class="w-1/2 px-24">
          <img :src="getImgUrl('mailBanner')" />
        </div>
      </div>
    </div>
    <div class="functions py-16">
      <div class="text-4xl font-semibold text-headerMain text-center">产品特色</div>
      <div class="flex flex-row w-7/12 mx-auto py-14">
        <div v-for="func in productCharacters" :key="func.id" class="px-12 w-1/3 justify-around">
          <svg-icon :iconClass="func.icon" class="w-12 h-12 mx-auto" />
          <div class="text-center text-base font-semibold pt-1">{{ func.title }}</div>
          <div class="text-sm text-gray-500 text-center pt-2">{{ func.detail }}</div>
        </div>
      </div>
    </div>
    <div class="advantages bg-secondaryBlue pb-20 pt-4">
      <div class="text-4xl font-semibold text-headerMain text-center pt-12">产品优势</div>
      <div class="flex flex-row w-8/12 flex-wrap mx-auto pt-8">
        <div class="w-1/2 px-6 py-6" v-for="i in advantageList" :key="i.id">
          <div class="bg-white border-l-4 border-mainBlue px-6 h-48 shadow-lg">
            <div class="pt-8 text-gray-800 text-lg font-semibold">{{ i.title }}</div>
            <div class="text-sm text-gray-500 text-justify pt-2">{{ i.detail }}</div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script setup lang="ts">
import MainButton from '@/components/mainButton.vue';
import { computed } from 'vue';
import { productCharacters, advantageList } from "@/context/mail"

const getImgUrl = computed(() => {
  return (url: string) => {
    return require(`@/assets/${url}.png`)
  }
})

</script>