新版本官网优化完成

This commit is contained in:
2025-02-12 16:37:07 +08:00
parent 43a2e17a80
commit 3efdbfc662
547 changed files with 23001 additions and 28169 deletions

View File

@@ -1,60 +1,20 @@
<template>
<div v-if="title" class="text-center flex flex-col items-center py-12 z-100 relative">
<h2 class="text-3xl font-bold tracking-tight text-gray-900 dark:text-white sm:text-4xl lg:text-5xl">
{{ title }}
</h2>
<div class="sub-title">
<p class="text-gray-500 dark:text-gray-400 py-3">
{{ comments }}
</p>
</div>
</div>
<div class="xl:w-screen-xl sm:flex xl:p-0 p-4 m-auto relative">
<el-row :gutter="24" class="flex">
<template v-for="(item,index) in list" :key="index">
<el-col :span="6" :xs="24" class="mb-5 min-w-xs">
<el-card shadow="hover" :body-style="{ padding: '0px' }" class="hover:bg-gray-50 cursor-pointer" @click="openSpmUrl(`/item`, item,item.companyId,true)">
<el-image
:src="item.image"
:fit="fit" :lazy="true" class="w-full md:h-[150px] h-[199px] cursor-pointer bg-gray-50"/>
<div class="flex-1 px-4 py-5 sm:p-6 !p-4">
<div class="text-gray-700 dark:text-white text-base font-semibold flex flex-col gap-1.5">
<div class="flex-1 text-xl cursor-pointer flex items-center">
{{ item.shortName }}
<el-tag v-if="item.chargingMethod === 0" size="small" type="success" class="text-white ml-2" effect="dark">免费</el-tag>
<div class="lg:w-screen-lg sm:flex xl:p-0 p-4 mb-10 m-auto relative">
<el-row :gutter="24" class="flex w-full">
<el-col v-for="(item,index) in list" :key="index" :span="6" :xs="24" class="mb-6">
<nuxt-link :to="item.path">
<el-card shadow="hover" :body-style="{ padding: '0px' }" class="hover:bg-green-50 cursor-pointer h-[200px] flex items-center justify-center">
<div class="flex-1 px-4 py-5 sm:p-6 !p-4">
<div class="text-gray-700 dark:text-white text-base font-semibold flex flex-col gap-1.5">
<el-space class="flex-1 cursor-pointer flex items-center flex-col">
<el-image v-if="item.icon" :src="item.icon" class="w-[40px]" />
<span class="py-3 text-lg">{{ item.title }}</span>
</el-space>
</div>
</div>
<div class="flex items-center gap-1.5 py-2 text-gray-500 justify-between">
<div class="text-gray-500 line-clamp-2">{{ item.comments }}</div>
</div>
<div class="button-group flex justify-between items-center mt-3">
<el-space class="flex items-end">
<el-avatar size="small" :src="item.companyLogo" />
<span class="text-gray-400 line-clamp-1 pr-2">{{ item.companyName }}</span>
</el-space>
<template v-if="item.isBuy">
<el-button v-if="item.installed" type="primary" @click.stop="loginDeveloperCenterByToken(item)">控制台</el-button>
<el-button v-else type="primary" @click.stop="loginDeveloperCenterByToken(item)">控制台</el-button>
</template>
<template v-else>
<el-button v-if="item.chargingMethod == 0" type="primary" @click.stop="loginDeveloperCenterByToken(item)">控制台</el-button>
<el-button v-else type="warning" @click.stop="openSpmUrl(`/product/create`,item,item.companyId,true)">立即开通
</el-button>
</template>
<!-- <el-button type="warning" v-if="item.price" @click.stop="openSpmUrl(`/product/create`,item,item.companyId,true)">-->
<!-- <div class="flex items-center">-->
<!-- <span>{{ item.price * 0.1 }}</span>-->
<!-- <span v-if="item.chargingMethod == 2">/</span>-->
<!-- <span v-if="item.chargingMethod == 3">/</span>-->
<!-- <span v-if="item.chargingMethod == 4">/</span>-->
<!-- </div>-->
<!-- </el-button>-->
</div>
</div>
</el-card>
</el-card>
</nuxt-link>
</el-col>
</template>
<!-- <div class="more flex justify-center w-full"><el-button>查看更多</el-button></div>-->
</el-row>
</div>
<div v-if="disabled" class="px-1 text-center text-gray-500 min-h-xs">
@@ -63,10 +23,14 @@
</template>
<script setup lang="ts">
import {loginAdminByToken, loginByToken, loginDeveloperCenterByToken, openSpmUrl} from "~/utils/common";
import {loginAdminByToken} from "~/utils/common";
import {useServerRequest} from "~/composables/useServerRequest";
import type {ApiResult, PageResult} from "~/api";
import type {Company, CompanyParam} from "~/api/system/company/model";
import {pageCompanyAll} from "~/api/system/company";
import {listCmsNavigation} from "~/api/cms/cmsNavigation";
import type {CmsNavigation} from "~/api/cms/cmsNavigation/model";
import {navigateTo} from "#imports";
const props = withDefaults(
defineProps<{
@@ -85,18 +49,15 @@ const emit = defineEmits<{
(e: 'done'): void;
}>();
const list = ref<Company[]>([]);
const list = ref<CmsNavigation[]>([]);
// 请求数据
const reload = async () => {
const {data: response} = await useServerRequest<ApiResult<PageResult<Company>>>('/system/company/page', {
params: props.param
listCmsNavigation({
parentId: 2828
}).then(data => {
list.value = data;
})
if (response.value?.data) {
if (response.value?.data.list) {
list.value = response.value?.data.list;
}
}
}
reload();
</script>