Compare commits
10 Commits
fe348ae97b
...
f3b88d48c5
| Author | SHA1 | Date | |
|---|---|---|---|
| f3b88d48c5 | |||
| bdcb779cf8 | |||
| 370dc69948 | |||
| c4d6657148 | |||
| 7b43a20d43 | |||
| e37c9640a8 | |||
| e97d08f410 | |||
| 1062d2d9f4 | |||
| fa370af4fe | |||
| 7078da29f2 |
@@ -1,6 +1,6 @@
|
|||||||
# 应用模块接口
|
# 应用模块接口
|
||||||
VITE_SERVER_URL=https://server.gxwebsoft.com/api
|
VITE_SERVER_URL=https://server.gxbsnx.com/api
|
||||||
API_BASE=https://cms-api.websoft.top/api
|
#API_BASE=https://server.gxbsnx.com/api
|
||||||
|
|
||||||
#API_BASE=http://127.0.0.1:9001/api
|
API_BASE=http://127.0.0.1:9001/api
|
||||||
#VITE_SERVER_URL=http://127.0.0.1:8000/api
|
#VITE_SERVER_URL=http://127.0.0.1:8000/api
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# 基础模块
|
# 基础模块
|
||||||
VITE_SERVER_URL=https://server.gxwebsoft.com/api
|
VITE_SERVER_URL=https://server.gxbsnx.com/api
|
||||||
# 应用模块
|
# 应用模块
|
||||||
API_BASE=https://cms-api.websoft.top/api
|
API_BASE=https://server.gxbsnx.com/api
|
||||||
|
|||||||
@@ -12,6 +12,8 @@ export interface CmsAd {
|
|||||||
type?: number;
|
type?: number;
|
||||||
// 广告位名称
|
// 广告位名称
|
||||||
name?: string;
|
name?: string;
|
||||||
|
// 样式
|
||||||
|
style?: string;
|
||||||
// 宽
|
// 宽
|
||||||
width?: string;
|
width?: string;
|
||||||
// 高
|
// 高
|
||||||
|
|||||||
@@ -28,6 +28,8 @@ export interface CmsArticle {
|
|||||||
categoryName?: string;
|
categoryName?: string;
|
||||||
// 封面图
|
// 封面图
|
||||||
image?: string;
|
image?: string;
|
||||||
|
// 版本号
|
||||||
|
version?: number;
|
||||||
// 缩列图
|
// 缩列图
|
||||||
thumbnail?: string;
|
thumbnail?: string;
|
||||||
// 来源
|
// 来源
|
||||||
@@ -119,6 +121,7 @@ export interface CmsArticleParam extends PageParam {
|
|||||||
articleIds?: string;
|
articleIds?: string;
|
||||||
parentId?: number;
|
parentId?: number;
|
||||||
status?: number;
|
status?: number;
|
||||||
|
hasImage?: boolean;
|
||||||
// 是否推荐
|
// 是否推荐
|
||||||
recommend?: number;
|
recommend?: number;
|
||||||
keywords?: string;
|
keywords?: string;
|
||||||
|
|||||||
@@ -19,6 +19,21 @@ export async function pageCmsOrder(params: CmsOrderParam) {
|
|||||||
return Promise.reject(new Error(res.message));
|
return Promise.reject(new Error(res.message));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export async function displayCmsOrder(params: CmsOrderParam) {
|
||||||
|
const res = await request.get<ApiResult<PageResult<CmsOrder>>>(
|
||||||
|
'/cms/cms-order/display',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.code === 0) {
|
||||||
|
return res.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询订单列表
|
* 查询订单列表
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -72,5 +72,7 @@ export interface CmsOrder {
|
|||||||
export interface CmsOrderParam extends PageParam {
|
export interface CmsOrderParam extends PageParam {
|
||||||
orderId?: number;
|
orderId?: number;
|
||||||
websiteId?: number;
|
websiteId?: number;
|
||||||
|
isSettled?: boolean;
|
||||||
|
sceneType?: string;
|
||||||
keywords?: string;
|
keywords?: string;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,10 +11,18 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.head-bg {
|
.head-bg {
|
||||||
background: url(../images/nav1.jpg) repeat-x top center;
|
width: 100% !important;
|
||||||
height: 124px;
|
background: url('http://img.gxbsnx.com/Temp/images/new/imgimg4.png');
|
||||||
|
height: 39px;
|
||||||
|
display: flex;
|
||||||
|
justify-items: center;
|
||||||
|
clear: both;
|
||||||
|
}
|
||||||
|
.menu-bg{
|
||||||
|
background: url('http://img.gxbsnx.com/Temp/images/background/back_green.png') repeat-x top center;
|
||||||
|
background-size: 100% 100%;
|
||||||
|
clear: both;
|
||||||
}
|
}
|
||||||
|
|
||||||
.wel {
|
.wel {
|
||||||
line-height: 36px;
|
line-height: 36px;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
|
|||||||
BIN
assets/default-avatar.png
Executable file
BIN
assets/default-avatar.png
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 2.6 KiB |
@@ -16,8 +16,11 @@ const config = useConfigInfo();
|
|||||||
<span>Copyright © {{ new Date().getFullYear() }} {{ config?.copyright }}</span>
|
<span>Copyright © {{ new Date().getFullYear() }} {{ config?.copyright }}</span>
|
||||||
<nuxt-link to="https://beian.miit.gov.cn/" class="visited:text-gray-400 hover:text-gray-200" target="_blank"> <span>备案号:{{ config?.icpNo }}</span></nuxt-link>
|
<nuxt-link to="https://beian.miit.gov.cn/" class="visited:text-gray-400 hover:text-gray-200" target="_blank"> <span>备案号:{{ config?.icpNo }}</span></nuxt-link>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="text-gray-400 sm:gap-xs text-sm leading-7 flex flex-col sm:flex-row">
|
||||||
|
{{ config.tel }}
|
||||||
|
</div>
|
||||||
<div class="tools flex items-center opacity-80 hover:opacity-90 text-gray-400 text-xs">
|
<div class="tools flex items-center opacity-80 hover:opacity-90 text-gray-400 text-xs">
|
||||||
Powered by <a rel="nofollow" href="https://site.websoft.top" target="_blank" class="visited:text-gray-400 hover:text-gray-200 ml-1">云·企业官网</a>
|
Powered by <a rel="nofollow" href="https://site.gxbsnx.com" target="_blank" class="visited:text-gray-400 hover:text-gray-200 ml-1">云·企业官网</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -29,12 +32,18 @@ const config = useConfigInfo();
|
|||||||
<Link />
|
<Link />
|
||||||
<!-- 版权信息 -->
|
<!-- 版权信息 -->
|
||||||
<div class="w-full xl:w-screen-xl xl:px-0 px-4 w-full m-auto flex flex-col sm:justify-between justify-center items-center py-3 text-center text-sm">
|
<div class="w-full xl:w-screen-xl xl:px-0 px-4 w-full m-auto flex flex-col sm:justify-between justify-center items-center py-3 text-center text-sm">
|
||||||
|
<div class="my-4">
|
||||||
|
<el-avatar :src="config?.wxQrcode" shape="square" :size="100" />
|
||||||
|
</div>
|
||||||
|
<div class="text-gray-400 sm:gap-xs text-sm leading-7 flex flex-col sm:flex-row">
|
||||||
|
{{ config.tel }}
|
||||||
|
</div>
|
||||||
<div class="text-gray-400 sm:gap-xs leading-7 flex flex-col sm:flex-row">
|
<div class="text-gray-400 sm:gap-xs leading-7 flex flex-col sm:flex-row">
|
||||||
<span>Copyright © {{ new Date().getFullYear() }} {{ config?.copyright }}</span>
|
<span>Copyright © {{ new Date().getFullYear() }} {{ config?.copyright }}</span>
|
||||||
<nuxt-link to="https://beian.miit.gov.cn/" class="visited:text-gray-400 hover:text-gray-200" target="_blank"> <span>备案号:{{ config?.icpNo }}</span></nuxt-link>
|
<nuxt-link to="https://beian.miit.gov.cn/" target="_blank"> <span class="text-gray-400 visited:text-gray-400 hover:text-gray-200">备案号:{{ config?.icpNo }}</span></nuxt-link>
|
||||||
</div>
|
</div>
|
||||||
<div class="tools flex items-center opacity-80 hover:opacity-90 text-gray-300 text-xs mt-5">
|
<div class="tools flex items-center opacity-80 hover:opacity-90 text-gray-300 text-xs mt-5">
|
||||||
Powered by <a rel="nofollow" href="https://site.websoft.top" target="_blank" class="visited:text-gray-300 hover:text-gray-200 ml-1">云·企业官网</a>
|
Powered by <a rel="nofollow" href="https://site.gxbsnx.com" target="_blank" class="visited:text-gray-300 hover:text-gray-200 ml-1">云·企业官网</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ import {listCmsLink, pageCmsLink} from "~/api/cms/cmsLink";
|
|||||||
import type {CmsLink} from "~/api/cms/cmsLink/model";
|
import type {CmsLink} from "~/api/cms/cmsLink/model";
|
||||||
|
|
||||||
const list = ref<CmsLink[]>([])
|
const list = ref<CmsLink[]>([])
|
||||||
pageCmsLink({limit: 10}).then(res => {
|
pageCmsLink({limit: 8}).then(res => {
|
||||||
list.value = res?.list || [];
|
list.value = res?.list || [];
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<div class="flex flex-col text-base">
|
<div class="flex flex-col text-base">
|
||||||
<p class="text-base text-gray-400 py-2 font-bold">APP客户端</p>
|
<p class="text-base text-[#83adf6ff] font-bold">扫一扫关注公众号</p>
|
||||||
<el-avatar :src="config.wxQrcode" shape="square" :size="120" />
|
<el-avatar :src="config.wxQrcode" shape="square" :size="120" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,14 +1,23 @@
|
|||||||
<template>
|
<template>
|
||||||
<!-- 头部组件 -->
|
<!-- 头部组件 -->
|
||||||
<div class="sm:p-0 px-4 shadow-sm fixed z-100 top-0 w-full bg-white">
|
<div class="shadow-sm fixed z-100 top-0 left-0 w-full bg-white">
|
||||||
<!-- 顶部通栏 -->
|
<!-- 顶部通栏 -->
|
||||||
<TopBar />
|
<TopBar />
|
||||||
<!-- 导航栏 -->
|
<!-- 导航栏 -->
|
||||||
<div class="flex justify-between xl:w-screen-xl m-auto">
|
<div class="flex justify-between clear-both hidden-sm-and-down">
|
||||||
<el-space>
|
<div class="flex flex-col w-full">
|
||||||
|
<div class="flex justify-between menu-bg w-full py-3">
|
||||||
|
<div class="xl:w-screen-xl m-auto flex justify-between">
|
||||||
<Logo />
|
<Logo />
|
||||||
|
<img src="http://img.gxbsnx.com/Temp/images/background/title_right.png" width="291" height="88" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="w-full bg-white">
|
||||||
|
<div class="xl:w-screen-xl m-auto">
|
||||||
<Menu :data="navigations" />
|
<Menu :data="navigations" />
|
||||||
</el-space>
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<Login />
|
<Login />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -72,16 +72,6 @@
|
|||||||
<el-menu-item v-else :index="`${index}`"><a :href="navTo(item)">{{ item.title }}</a></el-menu-item>
|
<el-menu-item v-else :index="`${index}`"><a :href="navTo(item)">{{ item.title }}</a></el-menu-item>
|
||||||
</template>
|
</template>
|
||||||
</el-menu>
|
</el-menu>
|
||||||
<!-- <div v-if="setting.searchBtn" class="search-tools flex justify-center p-4 mt-5">-->
|
|
||||||
<!-- <el-input v-model="keywords" placeholder="请输入关键词..." :suffix-icon="Search" @change="onSearch"/>-->
|
|
||||||
<!-- </div>-->
|
|
||||||
<!-- <div v-if="setting.langBtn" class="lang flex justify-center text-center">-->
|
|
||||||
<!-- <el-space>-->
|
|
||||||
<!-- <a @click="onLang(`zh`)" class="text-sm text-gray-500">中文版</a>-->
|
|
||||||
<!-- <el-divider direction="vertical" />-->
|
|
||||||
<!-- <a @click="onLang(`en`)" class="text-sm text-gray-400">English</a>-->
|
|
||||||
<!-- </el-space>-->
|
|
||||||
<!-- </div>-->
|
|
||||||
</div>
|
</div>
|
||||||
</el-drawer>
|
</el-drawer>
|
||||||
</div>
|
</div>
|
||||||
@@ -96,6 +86,7 @@ import {listCmsLangLog} from "~/api/cms/cmsLangLog";
|
|||||||
const token = useToken();
|
const token = useToken();
|
||||||
const user = useUser();
|
const user = useUser();
|
||||||
const navigations = useMenu();
|
const navigations = useMenu();
|
||||||
|
const config = useConfigInfo();
|
||||||
const setting = useSetting();
|
const setting = useSetting();
|
||||||
const keywords = ref<string>();
|
const keywords = ref<string>();
|
||||||
const drawer = ref<boolean>(false);
|
const drawer = ref<boolean>(false);
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<nuxt-link to="/" class="flex items-center cursor-pointer gap-sm mr-7" v-if="website">
|
<nuxt-link to="/" class="flex items-center cursor-pointer gap-sm mr-7" v-if="website">
|
||||||
<el-image v-if="website.websiteLogo || logo?.value" :style="`${logo?.style}`" :src="logo?.value || website?.websiteLogo" class="rounded-sm rounded-sm sm:w-[158px] sm:h-[54px] h-[50px] py-1 sm:py-0"/>
|
<el-image v-if="website.websiteLogo || logo?.value" :style="`${logo?.style}`" :src="logo?.value || website?.websiteLogo" class="rounded-sm rounded-sm sm:w-[360px] sm:h-[80px] h-[80px] py-1 sm:py-0"/>
|
||||||
<h4 v-else class="text-gray-700 text-xl font-bold" :style="`${logo?.style}`">{{ website?.websiteName }}</h4>
|
<h4 v-else class="text-gray-700 text-xl font-bold" :style="`${logo?.style}`">{{ website?.websiteName }}</h4>
|
||||||
</nuxt-link>
|
</nuxt-link>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -57,9 +57,9 @@ const handleSelect = (index: any,keyPath: string[]) => {
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.el-menu--horizontal > .el-menu-item:nth-child(1) {
|
//.el-menu--horizontal > .el-menu-item:nth-child(1) {
|
||||||
margin-right: auto;
|
// margin-right: auto;
|
||||||
}
|
//}
|
||||||
.el-menu{
|
.el-menu{
|
||||||
border-bottom: none;
|
border-bottom: none;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,28 +1,75 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import {useConfigInfo} from "~/composables/configState";
|
import {useConfigInfo, useMenu} from "~/composables/configState";
|
||||||
import { Search } from '@element-plus/icons-vue'
|
import { Search,Message, Fold, Phone } from '@element-plus/icons-vue'
|
||||||
const config = useConfigInfo();
|
const config = useConfigInfo();
|
||||||
const keyword = ref<string>('');
|
const keyword = ref<string>('');
|
||||||
const i18n = useI18n();
|
const i18n = useI18n();
|
||||||
|
const navigations = useMenu();
|
||||||
|
const drawer = ref<boolean>(false);
|
||||||
|
|
||||||
const onSearch = () => {
|
const onSearch = () => {
|
||||||
window.location.href = `/${i18n.locale.value}/search/${keyword.value}`;
|
window.location.href = `/${i18n.locale.value}/search/${keyword.value}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const route = useRoute();
|
||||||
|
watch(
|
||||||
|
() => route.params.keywords,
|
||||||
|
(text) => {
|
||||||
|
if(text){
|
||||||
|
keyword.value = String(text);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{ immediate: true }
|
||||||
|
);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class=" bg-blue-50 text-gray-400 px-2 py-1" v-if="config.showTopBar == 'true'">
|
<div class="head-bg bg-blue-50 text-gray-400 px-2">
|
||||||
<div class="w1200 flex justify-between items-center">
|
<div class=" flex justify-between items-center xl:w-screen-xl m-auto sm:px-0 w-full">
|
||||||
<span>{{ config?.topWelcomeInfo }}</span>
|
<span class="text-white text-sm hidden-sm-and-down">{{ config?.topWelcomeInfo }}</span>
|
||||||
|
<span class="text-white text-sm hidden-sm-and-up">{{ config?.tel }}</span>
|
||||||
<div class="lang flex justify-center text-center items-center">
|
<div class="lang flex justify-center text-center items-center">
|
||||||
|
<el-space size="large">
|
||||||
|
<a class="text-sm flex items-center hidden-sm-and-down"><el-icon color="#fff" size="17"><Phone /></el-icon><span class="text-white text-sm px-1">招生与就业办电话:0776-2696638</span></a>
|
||||||
|
<!-- <a href="mailto:1145119853@qq.com" class="text-sm flex items-center hidden-sm-and-down"><el-icon color="#fff" size="16"><Message /></el-icon><span class="text-white px-1">校长信箱</span></a>-->
|
||||||
|
<!-- <a href="/search/请输入搜索关键词" class="text-sm flex items-center hidden-sm-and-down"><el-icon color="#fff" size="16"><Search /></el-icon><span class="text-white px-1">站内搜搜</span></a>-->
|
||||||
|
<div class="search hidden-sm-and-down ml-5">
|
||||||
|
<div class="fl">
|
||||||
|
<el-input v-model="keyword" :placeholder="`${$t('searchKeywords')}...`" style="height: 28px;" :suffix-icon="Search" @change="onSearch" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- 移动端 -->
|
||||||
|
<div class="hidden-sm-and-up">
|
||||||
|
<div class="hidden-sm-and-up mx-5 sm:mx-0">
|
||||||
|
<div class="el-dropdown-link flex items-center" @click="drawer = true">
|
||||||
|
<el-icon color="white" :size="24"><Fold /></el-icon>
|
||||||
|
</div>
|
||||||
|
<el-drawer
|
||||||
|
v-model="drawer"
|
||||||
|
:size="290"
|
||||||
|
>
|
||||||
|
<div id="menu">
|
||||||
|
<el-menu
|
||||||
|
currentIndex="/product"
|
||||||
|
:unique-opened="true"
|
||||||
|
>
|
||||||
|
<template v-for="(item,index) in navigations" :key="index">
|
||||||
|
<el-sub-menu v-if="item?.children && item.children.length > 0" :index="`${index}`">
|
||||||
|
<template #title><span>{{ item.title }}</span></template>
|
||||||
|
<el-menu-item v-for="(sub,subIndex) in item.children" :index="`${subIndex}`">
|
||||||
<el-space>
|
<el-space>
|
||||||
<div class="search">
|
<el-avatar v-if="sub.icon" :src="sub.icon" shape="square" size="small"></el-avatar>
|
||||||
<div class="fl mr-5">
|
<a :href="navTo(sub)">{{ sub.title }}</a>
|
||||||
<el-input v-model="keyword" :placeholder="`${$t('searchKeywords')}...`" :suffix-icon="Search" @change="onSearch" />
|
</el-space>
|
||||||
|
</el-menu-item>
|
||||||
|
</el-sub-menu>
|
||||||
|
<el-menu-item v-else :index="`${index}`"><a :href="navTo(item)">{{ item.title }}</a></el-menu-item>
|
||||||
|
</template>
|
||||||
|
</el-menu>
|
||||||
|
</div>
|
||||||
|
</el-drawer>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<a :href="`/zh?spm=zh_CN`" class="text-sm"><span class="text-gray-500">中文版</span></a>
|
|
||||||
<el-divider direction="vertical" />
|
|
||||||
<a :href="`/en?spm=en_US`" class="text-sm"><span class="text-gray-500">English</span></a>
|
|
||||||
</el-space>
|
</el-space>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<!-- 自定义banner -->
|
<!-- 自定义banner -->
|
||||||
<div v-if="layout?.banner" class="banner m-auto relative sm:flex hidden-sm-and-down flex justify-center">
|
<div v-if="layout?.banner" class="banner m-auto relative sm:flex hidden-sm-and-down flex justify-center mt-[220px]">
|
||||||
<el-image :src="layout?.banner" class="min-h-sm sm:h-auto w-full"></el-image>
|
<el-image :src="layout?.banner" class="w-screen-xl"></el-image>
|
||||||
<div class="banner-bar absolute top-0 w-full sm:flex hidden">
|
<div class="banner-bar absolute top-10 w-full sm:flex hidden">
|
||||||
<div class="banner-text py-12 md:w-screen-xl m-auto opacity-90 flex flex-col justify-center">
|
<div class="banner-text py-12 md:w-screen-xl m-auto opacity-90 flex flex-col justify-center">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ const props = withDefaults(
|
|||||||
<div class="n-right fr">
|
<div class="n-right fr">
|
||||||
<h3><a :href="detail(item)" :title="item.title">{{ item.title }}</a></h3>
|
<h3><a :href="detail(item)" :title="item.title">{{ item.title }}</a></h3>
|
||||||
<div v-html="item.comments" class="line-clamp-2"></div>
|
<div v-html="item.comments" class="line-clamp-2"></div>
|
||||||
<div class="date">{{ $t('createTime') }}:{{ dayjs(item.createTime).format('YYYY-MM-DD') }}</div>
|
<div class="date">{{ $t('createTime') }}:{{ dayjs(item.createTime).format('YYYY.MM.DD') }}</div>
|
||||||
<div class="n-more" ><a :href="detail(item)" >{{ $t('seeMore') }}>></a></div>
|
<div class="n-more" ><a :href="detail(item)" >{{ $t('seeMore') }}>></a></div>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div v-if="editor === 1" v-html="data"></div>
|
<div v-html="data"></div>
|
||||||
<MdPreview v-else :id="id" :modelValue="data" />
|
<!-- <MdPreview v-else :id="id" :modelValue="data" />-->
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
|||||||
35
components/Index/Ad421.vue
Normal file
35
components/Index/Ad421.vue
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
<script setup lang="ts">
|
||||||
|
|
||||||
|
import type {CmsAd} from "~/api/cms/cmsAd/model";
|
||||||
|
import {getCmsAd} from "~/api/cms/cmsAd";
|
||||||
|
|
||||||
|
const ad421 = ref<CmsAd>();
|
||||||
|
const isMobile = useIsMobile();
|
||||||
|
|
||||||
|
// 请求数据
|
||||||
|
const reload = async () => {
|
||||||
|
getCmsAd(421).then(res => {
|
||||||
|
if (isMobile.value) {
|
||||||
|
res.height = '67';
|
||||||
|
}
|
||||||
|
ad421.value = res;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
reload();
|
||||||
|
});
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div v-if="ad421" v-for="(item,index) in ad421.imageList" :key="index">
|
||||||
|
<nuxt-link :to="ad421.style" class="flex justify-center items-center relative my-4">
|
||||||
|
<el-image class="absolute" :src="item.url" :style="`width: ${ad421.width ? ad421.width + 'px' : 'auto'}; height: ${ad421.height ? ad421.height + 'px' : 'auto'};`" />
|
||||||
|
</nuxt-link>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
|
||||||
|
</style>
|
||||||
35
components/Index/Ad422.vue
Normal file
35
components/Index/Ad422.vue
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
<script setup lang="ts">
|
||||||
|
|
||||||
|
import type {CmsAd} from "~/api/cms/cmsAd/model";
|
||||||
|
import {getCmsAd} from "~/api/cms/cmsAd";
|
||||||
|
|
||||||
|
const ad422 = ref<CmsAd>();
|
||||||
|
const isMobile = useIsMobile();
|
||||||
|
|
||||||
|
// 请求数据
|
||||||
|
const reload = async () => {
|
||||||
|
getCmsAd(422).then(res => {
|
||||||
|
if (isMobile.value) {
|
||||||
|
res.height = '123';
|
||||||
|
}
|
||||||
|
ad422.value = res;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
reload();
|
||||||
|
});
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div v-if="ad422" v-for="(item,index) in ad422.imageList" :key="index">
|
||||||
|
<nuxt-link :to="ad422.style" class="flex justify-center items-center relative my-4">
|
||||||
|
<el-image class="absolute" :src="item.url" :style="`width: ${ad422.width ? ad422.width + 'px' : 'auto'}; height: ${ad422.height ? ad422.height + 'px' : 'auto'};`" />
|
||||||
|
</nuxt-link>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
|
||||||
|
</style>
|
||||||
68
components/Index/BNNews.vue
Normal file
68
components/Index/BNNews.vue
Normal file
@@ -0,0 +1,68 @@
|
|||||||
|
<template>
|
||||||
|
<div class="xl:w-screen-xl m-auto py-4 px-4 lg:px-0">
|
||||||
|
<div class="text-center flex justify-between items-center z-0 relative my-5">
|
||||||
|
<el-space class="text-3xl font-bold text-green-600 flex items-center"><el-icon><Tickets /></el-icon>百农新闻</el-space>
|
||||||
|
<nuxt-link to="/article/4151.html">
|
||||||
|
<span class="text-lg font-bold tracking-tight text-gray-800 hover:text-red-500 dark:text-white">{{ '进入新闻中心' }}</span>
|
||||||
|
</nuxt-link>
|
||||||
|
</div>
|
||||||
|
<el-card shadow="hover">
|
||||||
|
<el-row :gutter="24">
|
||||||
|
<el-col :lg="10" :xs="24">
|
||||||
|
<HotNewsCarousel v-if="imgList.length > 0" :data="imgList" />
|
||||||
|
</el-col>
|
||||||
|
<el-col :lg="14" :xs="24" class="w-full h-auto">
|
||||||
|
<template v-for="(item, index) in list" :key="index">
|
||||||
|
<nuxt-link :to="`/detail/${item.articleId}.html`" class="item">
|
||||||
|
<div class="text-lg my-3 flex justify-between">
|
||||||
|
<span class="title text-gray-800 hover:text-green-700 text-sm lg:text-lg">{{ item.title }}</span>
|
||||||
|
<span class="text-gray-400 text-sm text-right w-[100px]">{{
|
||||||
|
dayjs(item.createTime).format('YYYY.MM.DD')
|
||||||
|
}}</span>
|
||||||
|
</div>
|
||||||
|
</nuxt-link>
|
||||||
|
</template>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-card>
|
||||||
|
</div>
|
||||||
|
<div v-if="list.length == 0" class="px-1 text-center text-gray-500 min-h-xs">没有更多了</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts" setup>
|
||||||
|
import { navigateTo } from '#imports';
|
||||||
|
import {
|
||||||
|
ArrowRight,
|
||||||
|
Tickets
|
||||||
|
} from '@element-plus/icons-vue'
|
||||||
|
import dayjs from 'dayjs';
|
||||||
|
import type { CmsArticle } from '~/api/cms/cmsArticle/model';
|
||||||
|
import { pageCmsArticle } from '~/api/cms/cmsArticle';
|
||||||
|
import HotNewsCarousel from "~/components/Index/HotNewsCarousel.vue";
|
||||||
|
|
||||||
|
const list = ref<CmsArticle[]>([]);
|
||||||
|
const imgList = ref<CmsArticle[]>([]);
|
||||||
|
|
||||||
|
// 请求数据
|
||||||
|
const reload = async () => {
|
||||||
|
pageCmsArticle({
|
||||||
|
limit: 8,
|
||||||
|
recommend: 1,
|
||||||
|
parentId: 4131
|
||||||
|
}).then(res => {
|
||||||
|
list.value = res?.list || [];
|
||||||
|
});
|
||||||
|
|
||||||
|
pageCmsArticle({
|
||||||
|
recommend: 1,
|
||||||
|
limit: 5,
|
||||||
|
hasImage: true,
|
||||||
|
lang: getLang()
|
||||||
|
}).then(res => {
|
||||||
|
imgList.value = res?.list || [];
|
||||||
|
})
|
||||||
|
};
|
||||||
|
onMounted(() => {
|
||||||
|
reload();
|
||||||
|
});
|
||||||
|
</script>
|
||||||
@@ -1,31 +1,29 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div style="margin-top: 210px;" class="w-full bg-white mb-3 hidden-sm-and-down" v-if="ad">
|
||||||
<div class="w-full bg-white mb-3 hidden-sm-and-down" v-if="ad">
|
<el-carousel id="flash1" :height="`${ad?.height || '500'}px`">
|
||||||
<el-carousel :height="`${ad?.height || '500'}px`">
|
|
||||||
<el-carousel-item v-for="(item,index) in ad?.imageList" :key="index">
|
<el-carousel-item v-for="(item,index) in ad?.imageList" :key="index">
|
||||||
<div class="item relative flex justify-center items-center">
|
<div class="item relative flex justify-center items-center">
|
||||||
<el-image :src="item.url" fit="cover" class="w-full" :style="`height: ${ad?.height}px;`" />
|
<el-image :src="item.url" fit="fill" class="w-full" :style="`height: ${ad?.height}px;`" />
|
||||||
<!-- fit: '' | 'fill' | 'contain' | 'cover' | 'none' | 'scale-down'-->
|
<!-- fit: '' | 'fill' | 'contain' | 'cover' | 'none' | 'scale-down'-->
|
||||||
</div>
|
</div>
|
||||||
{{ad.height}}==
|
|
||||||
</el-carousel-item>
|
</el-carousel-item>
|
||||||
</el-carousel>
|
</el-carousel>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 移动端 -->
|
<!-- 移动端 -->
|
||||||
<div class="sm:hidden w-full bg-white mt-[48px] mb-3 hidden-sm-and-up" v-if="ad">
|
<div class="sm:hidden w-full bg-white mt-[38px] mb-3 hidden-sm-and-up" v-if="ad">
|
||||||
<el-carousel indicator-position="none" height="150">
|
<el-carousel indicator-position="none" height="200">
|
||||||
<el-carousel-item v-for="(item,index) in ad?.imageList" :key="index">
|
<el-carousel-item v-for="(item,index) in ad?.imageList" :key="index">
|
||||||
<el-image :src="item.url" />
|
<el-image :src="item.url" />
|
||||||
</el-carousel-item>
|
</el-carousel-item>
|
||||||
</el-carousel>
|
</el-carousel>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import type {CompanyParam} from "~/api/system/company/model";
|
import type {CompanyParam} from "~/api/system/company/model";
|
||||||
import type {CmsAd} from "~/api/cms/cmsAd/model";
|
import type {CmsAd} from "~/api/cms/cmsAd/model";
|
||||||
import {pageCmsAd} from "~/api/cms/cmsAd";
|
import {getCmsAd, pageCmsAd} from "~/api/cms/cmsAd";
|
||||||
|
|
||||||
const props = withDefaults(
|
const props = withDefaults(
|
||||||
defineProps<{
|
defineProps<{
|
||||||
@@ -47,6 +45,9 @@ const emit = defineEmits<{
|
|||||||
|
|
||||||
const ad = ref<CmsAd>();
|
const ad = ref<CmsAd>();
|
||||||
|
|
||||||
|
const ad421 = ref<CmsAd>();
|
||||||
|
const ad422 = ref<CmsAd>();
|
||||||
|
|
||||||
// 搜索表单
|
// 搜索表单
|
||||||
const where = reactive<CompanyParam>({
|
const where = reactive<CompanyParam>({
|
||||||
keywords: ''
|
keywords: ''
|
||||||
@@ -63,6 +64,12 @@ const reload = async () => {
|
|||||||
ad.value = res.list[0];
|
ad.value = res.list[0];
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
getCmsAd(421).then(res => {
|
||||||
|
ad421.value = res;
|
||||||
|
});
|
||||||
|
getCmsAd(422).then(res => {
|
||||||
|
ad422.value = res;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
|
|||||||
88
components/Index/Carousel2.vue
Normal file
88
components/Index/Carousel2.vue
Normal file
@@ -0,0 +1,88 @@
|
|||||||
|
<template>
|
||||||
|
<div v-if="list" style="margin-top: 210px;" class="w-full bg-white mb-3 hidden-sm-and-down">
|
||||||
|
<el-carousel id="flash1" :height="flashHeight + 'px'" :interval="2000">
|
||||||
|
<el-carousel-item v-for="(item,index) in list" :key="index">
|
||||||
|
<div class="item relative flex justify-center items-center">
|
||||||
|
{{item.version }}
|
||||||
|
<el-image :src="`${item.version == 1 ? config.FILE_SERVER : ''}${item.image}`" fit="fill" class="w-full" :style="`height: 300px;`" />
|
||||||
|
<!-- fit: '' | 'fill' | 'contain' | 'cover' | 'none' | 'scale-down'-->
|
||||||
|
</div>
|
||||||
|
</el-carousel-item>
|
||||||
|
</el-carousel>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 移动端 -->
|
||||||
|
<!-- <div class="sm:hidden w-full bg-white mt-[38px] mb-3 hidden-sm-and-up" v-if="ad">-->
|
||||||
|
<!-- <el-carousel indicator-position="none" height="200">-->
|
||||||
|
<!-- <el-carousel-item v-for="(item,index) in ad?.imageList" :key="index">-->
|
||||||
|
<!-- <el-image :src="item.url" />-->
|
||||||
|
<!-- </el-carousel-item>-->
|
||||||
|
<!-- </el-carousel>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import type {CompanyParam} from "~/api/system/company/model";
|
||||||
|
import type {CmsAd} from "~/api/cms/cmsAd/model";
|
||||||
|
import {getCmsAd, pageCmsAd} from "~/api/cms/cmsAd";
|
||||||
|
import {pageCmsArticle} from "~/api/cms/cmsArticle";
|
||||||
|
import type {CmsArticle} from "~/api/cms/cmsArticle/model";
|
||||||
|
import {FILE_SERVER} from "~/config";
|
||||||
|
import {useConfigInfo} from "~/composables/configState";
|
||||||
|
|
||||||
|
const props = withDefaults(
|
||||||
|
defineProps<{
|
||||||
|
config?: any;
|
||||||
|
list?: any[];
|
||||||
|
disabled?: boolean;
|
||||||
|
title?: string;
|
||||||
|
comments?: string;
|
||||||
|
}>(),
|
||||||
|
{
|
||||||
|
title: '卡片标题',
|
||||||
|
comments: '卡片描述'
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
const emit = defineEmits<{
|
||||||
|
(e: 'done'): void;
|
||||||
|
}>();
|
||||||
|
|
||||||
|
const config = useConfigInfo()
|
||||||
|
const isMobile = useIsMobile();
|
||||||
|
const list = ref<CmsArticle[]>([]);
|
||||||
|
const flashHeight = ref<number>(372)
|
||||||
|
|
||||||
|
// 搜索表单
|
||||||
|
const where = reactive<CompanyParam>({
|
||||||
|
keywords: ''
|
||||||
|
});
|
||||||
|
|
||||||
|
// 请求数据
|
||||||
|
const reload = async () => {
|
||||||
|
pageCmsArticle({
|
||||||
|
recommend: 1,
|
||||||
|
limit: 5,
|
||||||
|
lang: getLang()
|
||||||
|
}).then(res => {
|
||||||
|
list.value = res?.list || [];
|
||||||
|
})
|
||||||
|
if(isMobile.value){
|
||||||
|
flashHeight.value = 260;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
watch(
|
||||||
|
() => props.config,
|
||||||
|
() => {
|
||||||
|
reload();
|
||||||
|
},
|
||||||
|
{immediate: true}
|
||||||
|
);
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.hidden-sm-and-up .el-carousel{
|
||||||
|
height: 160px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -33,7 +33,7 @@
|
|||||||
</el-space>
|
</el-space>
|
||||||
<div class="text-gray-400">
|
<div class="text-gray-400">
|
||||||
<el-avatar v-if="item.avatar" :src="`${item.avatar}`" size="small" />
|
<el-avatar v-if="item.avatar" :src="`${item.avatar}`" size="small" />
|
||||||
{{ dayjs(item.createTime).format('YYYY-MM-DD') }}
|
{{ dayjs(item.createTime).format('YYYY.MM.DD') }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,12 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="w-full container-bg bg-blue-600 gap-10 flex justify-center items-center py-6">
|
<div class="w-full container-bg bg-blue-600 gap-10 flex justify-center items-center py-6">
|
||||||
<span class="text-xl text-white font-bold">联系我们,为您降本增效</span>
|
<el-button size="large" @click="openUrl(`http://sign.gxbsnx.com`)">在线报名</el-button>
|
||||||
<el-button size="large" @click="navigateTo(`/order/659.html`)">马上联系</el-button>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import {navigateTo} from "#imports";
|
import {navigateTo, openUrl} from "#imports";
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
|
|||||||
@@ -1,25 +1,29 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="xl:w-screen-xl m-auto py-4 px-4 sm:px-0">
|
<div class="xl:w-screen-xl m-auto py-4 px-4 sm:px-0">
|
||||||
<div class="text-center flex flex-col items-center z-0 relative">
|
<div class="text-center flex justify-between items-center z-0 relative my-5">
|
||||||
<h2 class="text-4xl font-bold tracking-tight text-gray-800 dark:text-white">
|
<el-space class="text-3xl font-bold text-green-600 flex items-center"><el-icon><CameraFilled /></el-icon>校园风光</el-space>
|
||||||
{{ title || '热点新闻' }}
|
<nuxt-link :to="`/article/4144.html`" class="font-normal text-sm text-gray-400 flex items-center cursor-pointer">查看更多<el-icon><ArrowRight /></el-icon></nuxt-link>
|
||||||
</h2>
|
</div>
|
||||||
|
<!-- <div class="text-center flex flex-col items-center z-0 relative">-->
|
||||||
|
<!-- <nuxt-link to="/article/4145.html">-->
|
||||||
|
<!-- <span class="text-4xl font-bold tracking-tight text-gray-800 dark:text-white">{{ title }}</span>-->
|
||||||
|
<!-- </nuxt-link>-->
|
||||||
<!-- <div class="sub-title">-->
|
<!-- <div class="sub-title">-->
|
||||||
<!-- <p class="text-gray-400 text-sm dark:text-gray-400 py-3">-->
|
<!-- <p class="text-gray-400 text-sm dark:text-gray-400 py-3">-->
|
||||||
<!-- {{ comments || '官方开发的应用' }}-->
|
<!-- {{ comments || 'Unlimited Scenery' }}-->
|
||||||
<!-- </p>-->
|
<!-- </p>-->
|
||||||
<!-- </div>-->
|
<!-- </div>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
<el-row :gutter="24" id="container" class="clearfix">
|
<el-row :gutter="24" class="clearfix">
|
||||||
<el-col v-for="(item,index) in list" :key="index" :xs="24" :span="6" class="left mb-6">
|
<el-col v-for="(item,index) in list" :key="index" :xs="12" :span="6" class="left mb-6">
|
||||||
<el-card shadow="hover" :body-style="{ padding: '0px' }" class=" hover:bg-gray-50 cursor-pointer" @click="navigateTo(`/detail/${item.articleId}.html`)">
|
<el-card shadow="hover" :body-style="{ padding: '0px' }" class=" hover:bg-gray-50 cursor-pointer" @click="navigateTo(`/detail/${item.articleId}.html`)">
|
||||||
<el-image
|
<el-image
|
||||||
:src="item.image"
|
:src="item.image"
|
||||||
fit="cover"
|
fit="cover"
|
||||||
:lazy="true" class="w-full md:h-[166px] h-[199px] cursor-pointer bg-gray-50"/>
|
:lazy="true" class="w-full md:h-[166px] h-[100px] lg:h-[199px] cursor-pointer bg-gray-50"/>
|
||||||
<div class="flex-1 px-4 py-5 sm:p-6 !p-4">
|
<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="text-gray-700 dark:text-white text-base font-semibold flex flex-col gap-1.5">
|
||||||
<div class="line-clamp-2 text-lg min-h-[54px]">
|
<div class="line-clamp-2 text-sm lg:text-lg lg:min-h-[54px] min-h-auto">
|
||||||
{{ item.title }}
|
{{ item.title }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -31,7 +35,7 @@
|
|||||||
<div class="text-gray-400 gap-1 flex items-center"><el-icon><View /></el-icon><span>{{ getViews(item) }}</span></div>
|
<div class="text-gray-400 gap-1 flex items-center"><el-icon><View /></el-icon><span>{{ getViews(item) }}</span></div>
|
||||||
</el-space>
|
</el-space>
|
||||||
<div class="text-gray-400">
|
<div class="text-gray-400">
|
||||||
{{ dayjs(item.createTime).format('YYYY-MM-DD') }}
|
{{ dayjs(item.createTime).format('YYYY.MM.DD') }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -47,9 +51,16 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import {navigateTo} from "#imports";
|
import {navigateTo} from "#imports";
|
||||||
import dayjs from "dayjs";
|
import dayjs from "dayjs";
|
||||||
|
import { View } from '@element-plus/icons-vue'
|
||||||
import type {CmsArticle} from "~/api/cms/cmsArticle/model";
|
import type {CmsArticle} from "~/api/cms/cmsArticle/model";
|
||||||
import {listCmsArticle} from "~/api/cms/cmsArticle";
|
import {listCmsArticle, pageCmsArticle} from "~/api/cms/cmsArticle";
|
||||||
import type {CmsArticleParam} from "~/api/cms/cmsArticle/model";
|
import type {CmsArticleParam} from "~/api/cms/cmsArticle/model";
|
||||||
|
import {getImage} from "~/utils/common";
|
||||||
|
import {
|
||||||
|
ArrowRight,
|
||||||
|
Tickets,
|
||||||
|
CameraFilled
|
||||||
|
} from '@element-plus/icons-vue'
|
||||||
|
|
||||||
const props = withDefaults(
|
const props = withDefaults(
|
||||||
defineProps<{
|
defineProps<{
|
||||||
@@ -74,12 +85,11 @@ const id = ref<number>(0);
|
|||||||
|
|
||||||
// 请求数据
|
// 请求数据
|
||||||
const reload = async () => {
|
const reload = async () => {
|
||||||
listCmsArticle({
|
pageCmsArticle({
|
||||||
limit: 8,
|
limit: 8,
|
||||||
recommend: 1,
|
|
||||||
categoryId: props.categoryId
|
categoryId: props.categoryId
|
||||||
}).then(data => {
|
}).then(res => {
|
||||||
list.value = data || [];
|
list.value = res?.list || [];
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
reload();
|
reload();
|
||||||
|
|||||||
75
components/Index/HotNewsCarousel.vue
Normal file
75
components/Index/HotNewsCarousel.vue
Normal file
@@ -0,0 +1,75 @@
|
|||||||
|
<template>
|
||||||
|
<div class="lg:my-3 my-0 relative">
|
||||||
|
<el-carousel :height="flashHeight + 'px'" :interval="2000" motion-blur indicator-position="none">
|
||||||
|
<el-carousel-item v-for="(item,index) in data" :key="index">
|
||||||
|
<nuxt-link :to="`/detail/${item.articleId}.html`" class="item flex justify-center items-center">
|
||||||
|
<el-image :src="`${item.image}`" class="w-[500px] h-[380px]" />
|
||||||
|
<div class="absolute bottom-0 z-100 w-[468px] bg-black opacity-80 font-bold px-4 line-clamp-1 text-sm lg:text-lg">
|
||||||
|
<span class="text-white">{{ item.title }}</span>
|
||||||
|
</div>
|
||||||
|
</nuxt-link>
|
||||||
|
</el-carousel-item>
|
||||||
|
</el-carousel>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import type {CompanyParam} from "~/api/system/company/model";
|
||||||
|
import type {CmsArticle} from "~/api/cms/cmsArticle/model";
|
||||||
|
import {useConfigInfo} from "~/composables/configState";
|
||||||
|
import {FILE_SERVER} from "~/config";
|
||||||
|
|
||||||
|
const isMobile = useIsMobile();
|
||||||
|
const config = useConfigInfo()
|
||||||
|
|
||||||
|
const props = withDefaults(
|
||||||
|
defineProps<{
|
||||||
|
data?: CmsArticle[];
|
||||||
|
disabled?: boolean;
|
||||||
|
title?: string;
|
||||||
|
comments?: string;
|
||||||
|
}>(),
|
||||||
|
{
|
||||||
|
title: '卡片标题',
|
||||||
|
comments: '卡片描述'
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
const emit = defineEmits<{
|
||||||
|
(e: 'done'): void;
|
||||||
|
}>();
|
||||||
|
const loading = ref(false);
|
||||||
|
const list = ref<CmsArticle[]>([]);
|
||||||
|
const flashHeight = ref<number>(372)
|
||||||
|
|
||||||
|
// 搜索表单
|
||||||
|
const where = reactive<CompanyParam>({
|
||||||
|
keywords: ''
|
||||||
|
});
|
||||||
|
|
||||||
|
// 请求数据
|
||||||
|
const reload = async () => {
|
||||||
|
loading.value = true;
|
||||||
|
if(isMobile.value){
|
||||||
|
flashHeight.value = 260;
|
||||||
|
}
|
||||||
|
setTimeout(() => {
|
||||||
|
list.value = props.data || [];
|
||||||
|
loading.value = false;
|
||||||
|
},500)
|
||||||
|
}
|
||||||
|
|
||||||
|
watch(
|
||||||
|
() => props.data,
|
||||||
|
() => {
|
||||||
|
reload();
|
||||||
|
},
|
||||||
|
{immediate: true}
|
||||||
|
);
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.hidden-sm-and-up .el-carousel{
|
||||||
|
height: 160px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -1,24 +1,40 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="xl:w-screen-xl m-auto py-4 px-4 sm:px-0">
|
<div class="xl:w-screen-xl m-auto py-4 px-4 sm:px-0">
|
||||||
<div class="text-center flex flex-col items-center z-0 relative">
|
<!-- <div class="text-center flex flex-col items-center z-0 relative">-->
|
||||||
<h2 class="text-4xl font-bold tracking-tight text-gray-800 dark:text-white">
|
<!-- <h2 class="text-4xl font-bold tracking-tight text-gray-800 dark:text-white">-->
|
||||||
{{ title || '合作伙伴' }}
|
<!-- {{ title || '友情链接' }}-->
|
||||||
</h2>
|
<!-- </h2>-->
|
||||||
<div class="sub-title">
|
<!-- <div class="sub-title">-->
|
||||||
<p class="text-gray-400 text-sm dark:text-gray-400 py-3">
|
<!-- <p class="text-gray-400 text-sm dark:text-gray-400 py-3">-->
|
||||||
{{ comments || '感谢所有合作伙伴和赞助商的支持!' }}
|
<!-- {{ comments || 'Link' }}-->
|
||||||
</p>
|
<!-- </p>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<div class="text-center flex justify-between items-center z-0 relative my-5">
|
||||||
|
<el-space class="text-3xl font-bold text-green-600 flex items-center"><el-icon><Link /></el-icon>友情链接</el-space>
|
||||||
</div>
|
</div>
|
||||||
<el-row id="container" :gutter="24" class="clearfix">
|
<el-row id="container" :gutter="24" class="clearfix">
|
||||||
<el-col v-for="(item,index) in list" :key="index" :sm="4" :xs="12" class="left mb-8">
|
<el-col v-for="(item,index) in list" :key="index" :sm="6" :xs="12" class="left mb-8 hidden-sm-and-down">
|
||||||
<nuxt-link :to="`${item.url}`" class="flex-1 cursor-pointer flex flex-col text-center" target="_blank">
|
<nuxt-link :to="`${item.url}`" class="flex-1 cursor-pointer flex flex-col text-center" target="_blank">
|
||||||
<el-card :body-style="{ padding: '0px' }" class="items-center flex justify-center" shadow="hover"
|
<el-card :body-style="{ padding: '0px' }" class="items-center flex justify-center" shadow="hover"
|
||||||
@mouseleave="hideMenu" @mouseover="showMenu(item)">
|
@mouseleave="hideMenu" @mouseover="showMenu(item)">
|
||||||
<div class="flex-1 py-5 sm:p-4 !p-4">
|
<div class="flex-1 py-5 sm:p-4 !p-4">
|
||||||
<el-space class="text-gray-700 dark:text-white text-base font-semibold h-[28px] flex justify-center items-center">
|
<el-space class="text-gray-700 dark:text-white text-base font-semibold h-[28px] flex justify-center items-center">
|
||||||
<el-image v-if="item.icon" :alt="item.name" :src="item.icon" style="height: 30px"/>
|
<el-image v-if="item.icon" :alt="item.name" :src="item.icon" style="height: 30px"/>
|
||||||
<span :title="item.name" class="text-lg line-clamp-1">{{ item.name }}</span>
|
<span :title="item.name" class="line-clamp-1 text-sm lg:text-lg">{{ item.name }}</span>
|
||||||
|
</el-space>
|
||||||
|
</div>
|
||||||
|
</el-card>
|
||||||
|
</nuxt-link>
|
||||||
|
</el-col>
|
||||||
|
<el-col v-for="(item,index) in list" :key="index" :sm="6" :xs="12" class="left mb-2 hidden-sm-and-up">
|
||||||
|
<nuxt-link :to="`${item.url}`" class="flex-1 cursor-pointer flex flex-col text-center" target="_blank">
|
||||||
|
<el-card :body-style="{ padding: '0px' }" class="items-center flex justify-center" shadow="hover"
|
||||||
|
@mouseleave="hideMenu" @mouseover="showMenu(item)">
|
||||||
|
<div class="flex-1 py-1 sm:p-0 !p-0">
|
||||||
|
<el-space class="text-gray-700 dark:text-white text-base font-semibold h-[28px] flex justify-center items-center">
|
||||||
|
<el-image v-if="item.icon" :alt="item.name" :src="item.icon" style="height: 30px"/>
|
||||||
|
<span :title="item.name" class="line-clamp-1 text-sm lg:text-lg">{{ item.name }}</span>
|
||||||
</el-space>
|
</el-space>
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
@@ -34,7 +50,11 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import {navigateTo} from "#imports";
|
import {navigateTo} from "#imports";
|
||||||
import type {CmsWebsite, CmsWebsiteParam} from "~/api/cms/cmsWebsite/model";
|
import type {CmsWebsite, CmsWebsiteParam} from "~/api/cms/cmsWebsite/model";
|
||||||
import {pageCmsWebsiteAll} from "~/api/cms/cmsWebsite";
|
import {
|
||||||
|
ArrowRight,
|
||||||
|
Tickets,
|
||||||
|
Link
|
||||||
|
} from '@element-plus/icons-vue'
|
||||||
import {pageCmsLink} from "~/api/cms/cmsLink";
|
import {pageCmsLink} from "~/api/cms/cmsLink";
|
||||||
import type {CmsLink} from "~/api/cms/cmsLink/model";
|
import type {CmsLink} from "~/api/cms/cmsLink/model";
|
||||||
|
|
||||||
@@ -68,7 +88,7 @@ const hideMenu = () => {
|
|||||||
|
|
||||||
// 请求数据
|
// 请求数据
|
||||||
const reload = async () => {
|
const reload = async () => {
|
||||||
pageCmsLink({limit: 6}).then(data => {
|
pageCmsLink({limit: 36}).then(data => {
|
||||||
list.value = data?.list || [];
|
list.value = data?.list || [];
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
134
components/Index/ZSNews.vue
Normal file
134
components/Index/ZSNews.vue
Normal file
@@ -0,0 +1,134 @@
|
|||||||
|
<template>
|
||||||
|
<div class="xl:w-screen-xl m-auto px-4 sm:px-0">
|
||||||
|
<el-row :gutter="24" id="container" class="clearfix">
|
||||||
|
<el-col :span="8" :xs="24">
|
||||||
|
<el-card shadow="hover" :body-style="{ padding: '0px' }" class=" hover:bg-gray-50 cursor-pointer mb-5" >
|
||||||
|
<template #header>
|
||||||
|
<div class="text-lg font-medium flex items-center justify-between cursor-text">
|
||||||
|
<el-space class="text-xl text-green-600 font-bold"><el-icon><Avatar /></el-icon>招生就业</el-space>
|
||||||
|
<nuxt-link :to="`/article/4155.html`" class="font-normal text-sm text-gray-400 flex items-center cursor-pointer">查看更多<el-icon><ArrowRight /></el-icon></nuxt-link>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<div class="px-5">
|
||||||
|
<template v-for="(item,index) in zsList" :key="index">
|
||||||
|
<nuxt-link :to="`/detail/${item.articleId}.html`" class="item">
|
||||||
|
<div class="text-lg my-3 flex justify-between">
|
||||||
|
<span class="title text-gray-800 hover:text-green-700 line-clamp-2 text-sm lg:text-lg">{{ item.title }}</span>
|
||||||
|
<span class="text-gray-400 text-sm text-right w-[100px]">{{ dayjs(item.createTime).format('YYYY.MM.DD') }}</span>
|
||||||
|
</div>
|
||||||
|
</nuxt-link>
|
||||||
|
</template>
|
||||||
|
</div>
|
||||||
|
</el-card>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8" :xs="24">
|
||||||
|
<el-card shadow="hover" :body-style="{ padding: '0px' }" class=" hover:bg-gray-50 cursor-pointer mb-5" >
|
||||||
|
<template #header>
|
||||||
|
<div class="text-lg font-medium flex items-center justify-between cursor-text">
|
||||||
|
<el-space class="text-xl text-green-600 font-bold"><el-icon><BellFilled /></el-icon>通知公告</el-space>
|
||||||
|
<nuxt-link :to="`/article/4152.html`" class="font-normal text-sm text-gray-400 flex items-center cursor-pointer">查看更多<el-icon><ArrowRight /></el-icon></nuxt-link>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<div class="px-5">
|
||||||
|
<template v-for="(item,index) in tzList" :key="index">
|
||||||
|
<nuxt-link :to="`/detail/${item.articleId}.html`" class="item">
|
||||||
|
<div class="text-lg my-3 flex justify-between">
|
||||||
|
<span class="title text-gray-800 hover:text-green-700 line-clamp-2 text-sm lg:text-lg">{{ item.title }}</span>
|
||||||
|
<span class="text-gray-400 text-sm text-right w-[100px]">{{ dayjs(item.createTime).format('YYYY.MM.DD') }}</span>
|
||||||
|
</div>
|
||||||
|
</nuxt-link>
|
||||||
|
</template>
|
||||||
|
</div>
|
||||||
|
</el-card>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8" :xs="24">
|
||||||
|
<el-card shadow="hover" :body-style="{ padding: '0px' }" class=" hover:bg-gray-50 cursor-pointer mb-5" >
|
||||||
|
<template #header>
|
||||||
|
<div class="text-lg font-medium flex items-center justify-between cursor-text">
|
||||||
|
<el-space class="text-xl text-green-600 font-bold"><el-icon><Finished /></el-icon>教学教研</el-space>
|
||||||
|
<nuxt-link :to="`/article/4159.html`" class="font-normal text-sm text-gray-400 flex items-center cursor-pointer">查看更多<el-icon><ArrowRight /></el-icon></nuxt-link>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<div class="px-5">
|
||||||
|
<template v-for="(item,index) in jyList" :key="index">
|
||||||
|
<nuxt-link :to="`/detail/${item.articleId}.html`" class="item">
|
||||||
|
<div class="text-lg my-3 flex justify-between">
|
||||||
|
<span class="title text-gray-800 hover:text-green-700 line-clamp-2 text-sm lg:text-lg">{{ item.title }}</span>
|
||||||
|
<span class="text-gray-400 text-sm text-right w-[100px]">{{ dayjs(item.createTime).format('YYYY.MM.DD') }}</span>
|
||||||
|
</div>
|
||||||
|
</nuxt-link>
|
||||||
|
</template>
|
||||||
|
</div>
|
||||||
|
</el-card>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</div>
|
||||||
|
<div v-if="disabled" class="px-1 text-center text-gray-500 min-h-xs">
|
||||||
|
没有更多了
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts" setup>
|
||||||
|
import {navigateTo} from "#imports";
|
||||||
|
import {
|
||||||
|
ArrowRight,
|
||||||
|
Tickets,
|
||||||
|
Avatar,
|
||||||
|
BellFilled,
|
||||||
|
Finished
|
||||||
|
|
||||||
|
} from '@element-plus/icons-vue'
|
||||||
|
import dayjs from "dayjs";
|
||||||
|
import type {CmsArticle} from "~/api/cms/cmsArticle/model";
|
||||||
|
import {listCmsArticle, pageCmsArticle} from "~/api/cms/cmsArticle";
|
||||||
|
import type {CmsArticleParam} from "~/api/cms/cmsArticle/model";
|
||||||
|
import Carousel from "~/components/Index/Carousel.vue";
|
||||||
|
import HotNewsCarousel from "~/components/Index/HotNewsCarousel.vue";
|
||||||
|
|
||||||
|
const props = withDefaults(
|
||||||
|
defineProps<{
|
||||||
|
param?: CmsArticleParam;
|
||||||
|
disabled?: boolean;
|
||||||
|
categoryId?: number;
|
||||||
|
title?: string;
|
||||||
|
comments?: string;
|
||||||
|
fit?: any;
|
||||||
|
}>(),
|
||||||
|
{
|
||||||
|
fit: 'cover'
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
const emit = defineEmits<{
|
||||||
|
(e: 'done'): void;
|
||||||
|
}>();
|
||||||
|
|
||||||
|
const zsList = ref<CmsArticle[]>([]);
|
||||||
|
const tzList = ref<CmsArticle[]>([]);
|
||||||
|
const jyList = ref<CmsArticle[]>([]);
|
||||||
|
|
||||||
|
// 请求数据
|
||||||
|
const reload = async () => {
|
||||||
|
pageCmsArticle({
|
||||||
|
limit: 8,
|
||||||
|
recommend: 1,
|
||||||
|
parentId: 4132
|
||||||
|
}).then(res => {
|
||||||
|
zsList.value = res?.list || [];
|
||||||
|
})
|
||||||
|
pageCmsArticle({
|
||||||
|
limit: 8,
|
||||||
|
recommend: 1,
|
||||||
|
categoryId: 4152
|
||||||
|
}).then(res => {
|
||||||
|
tzList.value = res?.list || [];
|
||||||
|
})
|
||||||
|
pageCmsArticle({
|
||||||
|
limit: 8,
|
||||||
|
parentId: 4133
|
||||||
|
}).then(res => {
|
||||||
|
jyList.value = res?.list || [];
|
||||||
|
})
|
||||||
|
}
|
||||||
|
reload();
|
||||||
|
</script>
|
||||||
@@ -24,8 +24,10 @@ export const useClientRequest = <T = unknown>(url: string, opts?: FetchOptions)
|
|||||||
const defaultOptions: FetchOptions = {
|
const defaultOptions: FetchOptions = {
|
||||||
baseURL: baseUrl.value,
|
baseURL: baseUrl.value,
|
||||||
onRequest({ options }) {
|
onRequest({ options }) {
|
||||||
|
// @ts-ignore
|
||||||
options.headers = (options.headers || {}) as { [key: string]: string };
|
options.headers = (options.headers || {}) as { [key: string]: string };
|
||||||
if (token.value) {
|
if (token.value) {
|
||||||
|
// @ts-ignore
|
||||||
options.headers.Authorization = token.value;
|
options.headers.Authorization = token.value;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -27,12 +27,15 @@ export const useServerRequest = <T>(url: string, opts?: UseFetchOptions<T, unkno
|
|||||||
const defaultOptions: UseFetchOptions<unknown> = {
|
const defaultOptions: UseFetchOptions<unknown> = {
|
||||||
baseURL: baseUrl.value,
|
baseURL: baseUrl.value,
|
||||||
onRequest({ options }) {
|
onRequest({ options }) {
|
||||||
|
// @ts-ignore
|
||||||
options.headers = (options.headers || {}) as { [key: string]: string };
|
options.headers = (options.headers || {}) as { [key: string]: string };
|
||||||
// TODO 0 默认租户ID
|
// TODO 0 默认租户ID
|
||||||
if(process.env.NODE_ENV === 'development') {
|
if(process.env.NODE_ENV === 'development') {
|
||||||
|
// @ts-ignore
|
||||||
options.headers.tenantid = `${runtimeConfig.public.tenantId}`;
|
options.headers.tenantid = `${runtimeConfig.public.tenantId}`;
|
||||||
}
|
}
|
||||||
if (token.value) {
|
if (token.value) {
|
||||||
|
// @ts-ignore
|
||||||
options.headers.Authorization = token.value;
|
options.headers.Authorization = token.value;
|
||||||
}
|
}
|
||||||
// TODO 1 从二级域名解构租户ID
|
// TODO 1 从二级域名解构租户ID
|
||||||
@@ -45,6 +48,7 @@ export const useServerRequest = <T>(url: string, opts?: UseFetchOptions<T, unkno
|
|||||||
}
|
}
|
||||||
// TODO 2 从绑定域名解构的租户ID
|
// TODO 2 从绑定域名解构的租户ID
|
||||||
if(localStorage.getItem('TenantId')){
|
if(localStorage.getItem('TenantId')){
|
||||||
|
// @ts-ignore
|
||||||
options.headers.tenantid = `${localStorage.getItem('TenantId')}`;
|
options.headers.tenantid = `${localStorage.getItem('TenantId')}`;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -5,12 +5,12 @@ export const APP_SECRET = 'ffd6eee985af45e4a75098422d1decbb';
|
|||||||
|
|
||||||
export const domain = 'https://websoft.top';
|
export const domain = 'https://websoft.top';
|
||||||
// 主节点
|
// 主节点
|
||||||
export const SERVER_API_URL = import.meta.env.VITE_SERVER_URL || 'https://server.gxwebsoft.com/api';
|
export const SERVER_API_URL = import.meta.env.VITE_SERVER_URL || 'https://server.gxbsnx.com/api';
|
||||||
// 模块节点
|
// 模块节点
|
||||||
export const MODULES_API_URL = import.meta.env.VITE_API_URL || 'https://cms-api.websoft.top/api';
|
export const MODULES_API_URL = import.meta.env.VITE_API_URL || 'https://cms-api.websoft.top/api';
|
||||||
export const COMMON_API_URL = import.meta.env.VITE_THINK_URL || 'https://common-api.websoft.top/api';
|
export const COMMON_API_URL = import.meta.env.VITE_THINK_URL || 'https://common-api.websoft.top/api';
|
||||||
// 文件服务器地址
|
// 文件服务器地址
|
||||||
export const FILE_SERVER = 'https://file.wsdns.cn';
|
export const FILE_SERVER = 'https://img.gxbsnx.com';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 以下配置一般不需要修改
|
* 以下配置一般不需要修改
|
||||||
|
|||||||
@@ -124,8 +124,8 @@
|
|||||||
"overview": "产品概述",
|
"overview": "产品概述",
|
||||||
"keyword": "关键词",
|
"keyword": "关键词",
|
||||||
"recentlyViewed": "最近浏览",
|
"recentlyViewed": "最近浏览",
|
||||||
"author": "作者",
|
"author": "发布员",
|
||||||
"click": "点击",
|
"click": "浏览",
|
||||||
"label": "标签",
|
"label": "标签",
|
||||||
"seeMore": "查看更多",
|
"seeMore": "查看更多",
|
||||||
"onlineInquiry": "在线询价",
|
"onlineInquiry": "在线询价",
|
||||||
|
|||||||
@@ -6,11 +6,11 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// 填租户ID
|
// 填租户ID
|
||||||
const appId = 10491;
|
const appId = 10490;
|
||||||
// 接口地址
|
// 接口地址
|
||||||
let apiBaseUrl = 'https://cms-api.websoft.top/api'
|
let apiBaseUrl = 'https://server.gxbsnx.com/api'
|
||||||
// 应用名称
|
// 应用名称
|
||||||
const appName = '工匠基地';
|
const appName = '广西百色农业学校';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -66,7 +66,7 @@ export default defineNuxtConfig({
|
|||||||
],
|
],
|
||||||
link: [{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }],
|
link: [{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }],
|
||||||
script: [
|
script: [
|
||||||
{ innerHTML: 'var备案号 = "备案号:桂ICP备13003666号";', type: 'text/javascript' }
|
{ innerHTML: 'var备案号 = "备案号:桂ICP备13005851";', type: 'text/javascript' }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -86,9 +86,9 @@ export default defineNuxtConfig({
|
|||||||
apiBaseUrl,
|
apiBaseUrl,
|
||||||
tenantId: appId,
|
tenantId: appId,
|
||||||
siteName: appName,
|
siteName: appName,
|
||||||
domain: 'websoft.top',
|
domain: 'gxbsnx.com',
|
||||||
// 核心接口
|
// 核心接口
|
||||||
apiServer: 'https://server.gxwebsoft.com/api',
|
apiServer: 'https://server.gxbsnx.com/api',
|
||||||
appSecret: '',
|
appSecret: '',
|
||||||
appName: '你的网站名称'
|
appName: '你的网站名称'
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<!-- 底部菜单 -->
|
<!-- 底部菜单 -->
|
||||||
<TabBar />
|
<TabBar class="bg-red-500" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
|
|
||||||
<!-- 主体部分 -->
|
<!-- 主体部分 -->
|
||||||
<div class="xl:w-screen-xl m-auto py-4 mt-12 px-4 sm:px-0 sm:mt-20">
|
<div class="xl:w-screen-xl m-auto py-4 mt-12 px-4 sm:px-0 sm:mt-[220px]">
|
||||||
<el-page-header :icon="ArrowLeft" @back="goBack">
|
<el-page-header :icon="ArrowLeft" @back="goBack">
|
||||||
<template #content>
|
<template #content>
|
||||||
<span class="text-large font-600"> {{ page.title }} </span>
|
<span class="text-large font-600"> {{ page.title }} </span>
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
</el-space>
|
</el-space>
|
||||||
<div class="text-gray-400">
|
<div class="text-gray-400">
|
||||||
<el-avatar v-if="item.avatar" size="small" :src="`${item.avatar}`" />
|
<el-avatar v-if="item.avatar" size="small" :src="`${item.avatar}`" />
|
||||||
{{ dayjs(item.createTime).format('YYYY-MM-DD') }}
|
{{ dayjs(item.createTime).format('YYYY.MM.DD') }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -41,7 +41,7 @@ import { ArrowLeft,View,Search } from '@element-plus/icons-vue'
|
|||||||
import {useLayout, usePage} from "~/composables/configState";
|
import {useLayout, usePage} from "~/composables/configState";
|
||||||
import type {CmsNavigation} from "~/api/cms/cmsNavigation/model";
|
import type {CmsNavigation} from "~/api/cms/cmsNavigation/model";
|
||||||
import type {CmsArticle, CmsArticleParam} from "~/api/cms/cmsArticle/model";
|
import type {CmsArticle, CmsArticleParam} from "~/api/cms/cmsArticle/model";
|
||||||
import {getNavIdByParamsId, getViews, paramsId} from "~/utils/common";
|
import {getImage, getNavIdByParamsId, getViews, paramsId} from "~/utils/common";
|
||||||
import dayjs from "dayjs";
|
import dayjs from "dayjs";
|
||||||
import {getCmsNavigation, listCmsNavigation} from "~/api/cms/cmsNavigation";
|
import {getCmsNavigation, listCmsNavigation} from "~/api/cms/cmsNavigation";
|
||||||
import {pageCmsArticle} from "~/api/cms/cmsArticle";
|
import {pageCmsArticle} from "~/api/cms/cmsArticle";
|
||||||
@@ -97,7 +97,7 @@ const reload = async () => {
|
|||||||
pageCmsArticle(where).then(response => {
|
pageCmsArticle(where).then(response => {
|
||||||
if(response){
|
if(response){
|
||||||
total.value = response?.count;
|
total.value = response?.count;
|
||||||
list.value = response?.list;
|
list.value = response?.list || [];
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -28,7 +28,7 @@
|
|||||||
</el-space>
|
</el-space>
|
||||||
<div class="text-gray-400">
|
<div class="text-gray-400">
|
||||||
<el-avatar v-if="item.avatar" :src="`${item.avatar}`" size="small" />
|
<el-avatar v-if="item.avatar" :src="`${item.avatar}`" size="small" />
|
||||||
{{ dayjs(item.createTime).format('YYYY-MM-DD') }}
|
{{ dayjs(item.createTime).format('YYYY.MM.DD') }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
<h1 class="pt-5 text-3xl">{{ form.title }}</h1>
|
<h1 class="pt-5 text-3xl">{{ form.title }}</h1>
|
||||||
<div class="flex items-center justify-between py-4">
|
<div class="flex items-center justify-between py-4">
|
||||||
<el-space class="text-gray-400" size="large">
|
<el-space class="text-gray-400" size="large">
|
||||||
<span>{{ $t('createTime') }}:{{ dayjs(form.createTime).format('YYYY-MM-DD') }}</span>
|
<span>{{ $t('createTime') }}:{{ dayjs(form.createTime).format('YYYY.MM.DD') }}</span>
|
||||||
<span>{{ $t('author') }}:{{ form.author }}</span>
|
<span>{{ $t('author') }}:{{ form.author }}</span>
|
||||||
<span>{{ $t('click') }}:{{ getViews(form) }}</span>
|
<span>{{ $t('click') }}:{{ getViews(form) }}</span>
|
||||||
<span v-if="form.source">文章来源:{{ form.source }}</span>
|
<span v-if="form.source">文章来源:{{ form.source }}</span>
|
||||||
@@ -62,12 +62,12 @@
|
|||||||
|
|
||||||
|
|
||||||
<!-- 最近浏览 -->
|
<!-- 最近浏览 -->
|
||||||
<CmsArticleRecently :data="form" type="article" />
|
<!-- <CmsArticleRecently :data="form" type="article" />-->
|
||||||
<!-- 相关产品和相关新闻 -->
|
<!-- 相关产品和相关新闻 -->
|
||||||
<div class="relate_list">
|
<!-- <div class="relate_list">-->
|
||||||
<CmsProductRelated :data="form" />
|
<!-- <CmsProductRelated :data="form" />-->
|
||||||
<CmsArticleRelated :data="form" />
|
<!-- <CmsArticleRelated :data="form" />-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
|
|
||||||
</el-page-header>
|
</el-page-header>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -28,7 +28,7 @@
|
|||||||
</el-space>
|
</el-space>
|
||||||
<div class="text-gray-400">
|
<div class="text-gray-400">
|
||||||
<el-avatar v-if="item.avatar" :src="`${item.avatar}`" size="small" />
|
<el-avatar v-if="item.avatar" :src="`${item.avatar}`" size="small" />
|
||||||
{{ dayjs(item.createTime).format('YYYY-MM-DD') }}
|
{{ dayjs(item.createTime).format('YYYY.MM.DD') }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -28,7 +28,7 @@
|
|||||||
</el-space>
|
</el-space>
|
||||||
<div class="text-gray-400">
|
<div class="text-gray-400">
|
||||||
<el-avatar v-if="item.avatar" size="small" :src="`${item.avatar}`" />
|
<el-avatar v-if="item.avatar" size="small" :src="`${item.avatar}`" />
|
||||||
{{ dayjs(item.createTime).format('YYYY-MM-DD') }}
|
{{ dayjs(item.createTime).format('YYYY.MM.DD') }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<!-- 文章详情 -->
|
<!-- 文章详情 -->
|
||||||
<template>
|
<template>
|
||||||
<!-- 主体部分 -->
|
<!-- 主体部分 -->
|
||||||
<div class="xl:w-screen-xl m-auto py-4 mt-12 px-4 sm:px-0 sm:mt-20">
|
<div class="xl:w-screen-xl m-auto py-4 mt-12 px-4 sm:px-0 sm:mt-[220px]">
|
||||||
<el-page-header :icon="ArrowLeft" @back="goBack">
|
<el-page-header :icon="ArrowLeft" @back="goBack">
|
||||||
<template #content>
|
<template #content>
|
||||||
<span class="font-600 mr-3"> 文章详情 </span>
|
<span class="font-600 mr-3"> 文章详情 </span>
|
||||||
@@ -13,11 +13,11 @@
|
|||||||
<div class=" bg-white">
|
<div class=" bg-white">
|
||||||
<h1 class="pt-5 text-3xl text-center">{{ form.title }}</h1>
|
<h1 class="pt-5 text-3xl text-center">{{ form.title }}</h1>
|
||||||
<div class="flex items-center justify-center py-4">
|
<div class="flex items-center justify-center py-4">
|
||||||
<el-space size="large" class="text-gray-400">
|
<el-space size="large" class="text-gray-400" style="font-size: 16px">
|
||||||
<span>{{ $t('createTime') }}:{{ dayjs(form.createTime).format('YYYY-MM-DD') }}</span>
|
<span v-if="form.author">作者:{{ form.author }}</span>
|
||||||
<span>{{ $t('author') }}:{{ form.author }}</span>
|
<span>{{ $t('createTime') }}:{{ dayjs(form.createTime).format('YYYY-MM-DD HH:mm') }}</span>
|
||||||
|
<span v-if="form.source">来源:{{ form.source }}</span>
|
||||||
<span>{{ $t('click') }}:{{ getViews(form) }}</span>
|
<span>{{ $t('click') }}:{{ getViews(form) }}</span>
|
||||||
<span v-if="form.source">文章来源:{{ form.source }}</span>
|
|
||||||
</el-space>
|
</el-space>
|
||||||
<!-- Baidu Button BEGIN -->
|
<!-- Baidu Button BEGIN -->
|
||||||
<el-space class="flex items-center">
|
<el-space class="flex items-center">
|
||||||
@@ -62,12 +62,12 @@
|
|||||||
|
|
||||||
|
|
||||||
<!-- 最近浏览 -->
|
<!-- 最近浏览 -->
|
||||||
<CmsArticleRecently :data="form" type="article" />
|
<!-- <CmsArticleRecently :data="form" type="article" />-->
|
||||||
<!-- 相关产品和相关新闻 -->
|
<!-- 相关产品和相关新闻 -->
|
||||||
<div class="relate_list">
|
<!-- <div class="relate_list">-->
|
||||||
<CmsProductRelated :data="form" />
|
<!-- <CmsProductRelated :data="form" />-->
|
||||||
<CmsArticleRelated :data="form" />
|
<!-- <CmsArticleRelated :data="form" />-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
|
|
||||||
</el-page-header>
|
</el-page-header>
|
||||||
</div>
|
</div>
|
||||||
@@ -88,6 +88,7 @@ import {listCmsNavigation} from "~/api/cms/cmsNavigation";
|
|||||||
import CmsArticleRecently from "~/components/CmsRecently.vue";
|
import CmsArticleRecently from "~/components/CmsRecently.vue";
|
||||||
import Tags from "~/components/Tags.vue";
|
import Tags from "~/components/Tags.vue";
|
||||||
import Content from "~/components/Content.vue";
|
import Content from "~/components/Content.vue";
|
||||||
|
import {FILE_SERVER} from "~/config";
|
||||||
|
|
||||||
// 引入状态管理
|
// 引入状态管理
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
@@ -213,6 +214,10 @@ const reload = async () => {
|
|||||||
category.value = list;
|
category.value = list;
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
// 拼接图片路径
|
||||||
|
// if(data.content){
|
||||||
|
// form.content = form.content?.replace(/src="\//g, 'src="' + FILE_SERVER + '/');
|
||||||
|
// }
|
||||||
|
|
||||||
if(form.permission === 1){
|
if(form.permission === 1){
|
||||||
console.log('登录可见')
|
console.log('登录可见')
|
||||||
|
|||||||
@@ -58,7 +58,7 @@
|
|||||||
<el-form-item label="插件图标" class="px-4" label-width="100" label-position="left">
|
<el-form-item label="插件图标" class="px-4" label-width="100" label-position="left">
|
||||||
<el-upload
|
<el-upload
|
||||||
v-model:file-list="avatar"
|
v-model:file-list="avatar"
|
||||||
action="https://server.gxwebsoft.com/api/oss/upload"
|
action="https://server.gxbsnx.com/api/oss/upload"
|
||||||
:headers="{
|
:headers="{
|
||||||
Authorization: token,
|
Authorization: token,
|
||||||
TenantId: '5'
|
TenantId: '5'
|
||||||
@@ -81,7 +81,7 @@
|
|||||||
<el-tab-pane label="插件截屏" name="files">
|
<el-tab-pane label="插件截屏" name="files">
|
||||||
<el-upload
|
<el-upload
|
||||||
v-model:file-list="files"
|
v-model:file-list="files"
|
||||||
action="https://server.gxwebsoft.com/api/oss/upload"
|
action="https://server.gxbsnx.com/api/oss/upload"
|
||||||
:headers="{
|
:headers="{
|
||||||
Authorization: token,
|
Authorization: token,
|
||||||
TenantId: '5'
|
TenantId: '5'
|
||||||
|
|||||||
@@ -28,7 +28,7 @@
|
|||||||
</el-space>
|
</el-space>
|
||||||
<div class="text-gray-400">
|
<div class="text-gray-400">
|
||||||
<el-avatar v-if="item.avatar" size="small" :src="`${item.avatar}`" />
|
<el-avatar v-if="item.avatar" size="small" :src="`${item.avatar}`" />
|
||||||
{{ dayjs(item.createTime).format('YYYY-MM-DD') }}
|
{{ dayjs(item.createTime).format('YYYY.MM.DD') }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -3,23 +3,17 @@
|
|||||||
<!-- 幻灯片轮播 -->
|
<!-- 幻灯片轮播 -->
|
||||||
<Carousel/>
|
<Carousel/>
|
||||||
|
|
||||||
<!-- 着陆页 -->
|
<Ad421 />
|
||||||
<!-- <LandingHero/>-->
|
|
||||||
|
|
||||||
<!-- 站点列表 -->
|
<Ad422 />
|
||||||
<!-- <SiteList/>-->
|
|
||||||
|
|
||||||
<!-- 插件列表 -->
|
|
||||||
<!-- <MarketList />-->
|
|
||||||
|
|
||||||
<!-- 热点新闻 -->
|
<!-- 热点新闻 -->
|
||||||
<HotNews title="热点新闻" :categoryId="650"/>
|
<BNNews title="百农新闻"/>
|
||||||
|
|
||||||
|
<ZSNews />
|
||||||
|
|
||||||
<!-- 媒体视角 -->
|
<!-- 媒体视角 -->
|
||||||
<HotNews title="媒体视角" :categoryId="652"/>
|
<HotNews title="校园风光" :categoryId="4144"/>
|
||||||
|
|
||||||
<!-- 客户案例 -->
|
|
||||||
<!-- <CaseList/>-->
|
|
||||||
|
|
||||||
<!-- 合作伙伴 -->
|
<!-- 合作伙伴 -->
|
||||||
<Partners/>
|
<Partners/>
|
||||||
@@ -41,13 +35,13 @@ import {pageCmsLink} from "~/api/cms/cmsLink";
|
|||||||
import {addCmsOrder} from "~/api/cms/cmsOrder";
|
import {addCmsOrder} from "~/api/cms/cmsOrder";
|
||||||
import {getCaptcha} from "~/api/passport/login";
|
import {getCaptcha} from "~/api/passport/login";
|
||||||
import Carousel from "~/components/Index/Carousel.vue";
|
import Carousel from "~/components/Index/Carousel.vue";
|
||||||
import LandingHero from "~/components/Index/LandingHero.vue";
|
|
||||||
import SiteList from "~/components/Index/SiteList.vue";
|
|
||||||
import MarketList from "~/components/Index/MarketList.vue";
|
|
||||||
import HotNews from "~/components/Index/HotNews.vue";
|
import HotNews from "~/components/Index/HotNews.vue";
|
||||||
import CaseList from "~/components/Index/CaseList.vue"
|
|
||||||
import Partners from "~/components/Index/Partners.vue";
|
import Partners from "~/components/Index/Partners.vue";
|
||||||
import Customized from "~/components/Index/Customized.vue";
|
import Customized from "~/components/Index/Customized.vue";
|
||||||
|
import BNNews from "~/components/Index/BNNews.vue";
|
||||||
|
import Ad421 from "~/components/Index/Ad421.vue";
|
||||||
|
import Ad422 from "~/components/Index/Ad422.vue";
|
||||||
|
import ZSNews from "~/components/Index/ZSNews.vue";
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const i18n = useI18n();
|
const i18n = useI18n();
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
|
|
||||||
<!-- 主体部分 -->
|
<!-- 主体部分 -->
|
||||||
<div class="xl:w-screen-xl m-auto py-4 mt-12 px-4 sm:px-0 sm:mt-20">
|
<div class="xl:w-screen-xl m-auto py-4 mt-12 px-4 sm:px-0 sm:mt-[220px]">
|
||||||
<el-page-header :icon="ArrowLeft" @back="goBack">
|
<el-page-header :icon="ArrowLeft" @back="goBack">
|
||||||
<template #content>
|
<template #content>
|
||||||
<span class="text-large font-600"> {{ page.title }} </span>
|
<span class="text-large font-600"> {{ page.title }} </span>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
|
|
||||||
<!-- 主体部分 -->
|
<!-- 主体部分 -->
|
||||||
<div class="xl:w-screen-xl m-auto py-4 mt-12 px-4 sm:px-0 sm:mt-20">
|
<div class="xl:w-screen-xl m-auto py-4 mt-12 px-4 sm:px-0 sm:mt-[220px]">
|
||||||
<el-page-header :icon="ArrowLeft" @back="goBack">
|
<el-page-header :icon="ArrowLeft" @back="goBack">
|
||||||
<template #content>
|
<template #content>
|
||||||
<span class="text-large font-600 line-clamp-1"> 网址导航 </span>
|
<span class="text-large font-600 line-clamp-1"> 网址导航 </span>
|
||||||
@@ -32,24 +32,15 @@
|
|||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
<el-row id="container" :gutter="24" class="clearfix">
|
<el-row id="container" :gutter="24" class="clearfix">
|
||||||
<el-col v-for="(item,index) in list" :key="index" :sm="4" :xs="12" class="left mb-8">
|
<el-col v-for="(item,index) in list" :key="index" :sm="6" :xs="12" class="left mb-8">
|
||||||
<nuxt-link :to="`${item.url}`" class="flex-1 cursor-pointer flex flex-col text-center" target="_blank">
|
<nuxt-link :to="`${item.url}`" class="flex-1 cursor-pointer flex flex-col text-center" target="_blank">
|
||||||
<el-card :body-style="{ padding: '0px' }" class="items-center flex justify-center" shadow="hover">
|
<el-card :body-style="{ padding: '0px' }" class="items-center flex justify-center" shadow="hover">
|
||||||
<el-popover
|
|
||||||
:content="item.comments"
|
|
||||||
:width="200"
|
|
||||||
placement="bottom"
|
|
||||||
trigger="hover"
|
|
||||||
>
|
|
||||||
<template #reference>
|
|
||||||
<div class="flex-1 py-5 sm:p-4 !p-4">
|
<div class="flex-1 py-5 sm:p-4 !p-4">
|
||||||
<el-space class="text-gray-700 dark:text-white text-base font-semibold h-[28px] flex justify-center items-center">
|
<el-space class="text-gray-700 dark:text-white text-base font-semibold h-[28px] flex justify-center items-center">
|
||||||
<el-image v-if="item.icon" :alt="item.name" :src="item.icon" style="height: 32px"/>
|
<el-image v-if="item.icon" :alt="item.name" :src="item.icon" style="height: 32px"/>
|
||||||
<span :title="item.name" class="text-lg line-clamp-1">{{ item.name }}</span>
|
<span :title="item.name" class="text-lg line-clamp-1">{{ item.name }}</span>
|
||||||
</el-space>
|
</el-space>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
|
||||||
</el-popover>
|
|
||||||
</el-card>
|
</el-card>
|
||||||
</nuxt-link>
|
</nuxt-link>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<!-- Banner -->
|
<!-- Banner -->
|
||||||
<Banner :layout="layout"/>
|
<Banner :layout="layout"/>
|
||||||
<!-- 主体部分 -->
|
<!-- 主体部分 -->
|
||||||
<div class="xl:w-screen-xl m-auto py-4 mt-12 px-4 sm:px-0 sm:mt-20">
|
<div class="xl:w-screen-xl m-auto py-4 mt-12 px-4 sm:px-0 sm:mt-[220px]">
|
||||||
<el-page-header :icon="ArrowLeft" @back="goBack">
|
<el-page-header :icon="ArrowLeft" @back="goBack">
|
||||||
<template #content>
|
<template #content>
|
||||||
<span class="text-large font-600"> {{ page.title }} </span>
|
<span class="text-large font-600"> {{ page.title }} </span>
|
||||||
@@ -11,10 +11,10 @@
|
|||||||
<template #extra>
|
<template #extra>
|
||||||
</template>
|
</template>
|
||||||
<el-card shadow="hover" class="my-5 sm:my-10 sm:px-2">
|
<el-card shadow="hover" class="my-5 sm:my-10 sm:px-2">
|
||||||
<div class="grid grid-cols-1 sm:grid-cols-3 gap-8">
|
<div class="grid grid-cols-1 sm:grid-cols-4 gap-8">
|
||||||
<div class="col-span-2">
|
<div class="col-span-2">
|
||||||
<div class="my-2">
|
<div class="my-2">
|
||||||
<el-alert title="填写您的需求,为您量身定制." type="warning"/>
|
<el-alert title="欢迎留言" type="warning"/>
|
||||||
</div>
|
</div>
|
||||||
<el-form
|
<el-form
|
||||||
ref="formRef"
|
ref="formRef"
|
||||||
@@ -24,57 +24,13 @@
|
|||||||
label-position="left"
|
label-position="left"
|
||||||
status-icon
|
status-icon
|
||||||
>
|
>
|
||||||
<el-form-item :label="$t('order.title')" prop="title" class="hover:bg-gray-50 p-2">
|
<el-form-item label="留言标题" class="hover:bg-gray-50 p-2" prop="reference">
|
||||||
<el-select
|
<el-input v-model="form.title" placeholder="留言标题"/>
|
||||||
v-model="form.title"
|
|
||||||
filterable
|
|
||||||
placeholder="选择产品"
|
|
||||||
@change="onWebsite"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="item in siteList"
|
|
||||||
:key="item.websiteId"
|
|
||||||
:label="item.websiteName"
|
|
||||||
:value="item.websiteId"
|
|
||||||
>
|
|
||||||
<div class="flex justify-between">
|
|
||||||
<span>{{ item.websiteName }}</span>
|
|
||||||
<span class="text-gray-300">
|
|
||||||
{{ `${item.websiteCode}.websoft.top` }}
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('order.content')" prop="content" class="hover:bg-gray-50 p-2">
|
<el-form-item :label="$t('order.content')" prop="content" class="hover:bg-gray-50 p-2">
|
||||||
<el-input type="textarea" :rows="5" cols="80" v-model="form.content"
|
<el-input type="textarea" :rows="5" cols="80" v-model="form.content"
|
||||||
placeholder="请填写您的项目需求"/>
|
placeholder="请填写留言内容"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('order.reference')" class="hover:bg-gray-50 p-2" prop="reference">
|
|
||||||
<el-input v-model="form.reference" :placeholder="$t('order.reference')"/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item :label="$t('order.files')" class="hover:bg-gray-50 p-2" prop="reference">
|
|
||||||
<el-upload
|
|
||||||
v-model:file-list="files"
|
|
||||||
:headers="{
|
|
||||||
Authorization: token,
|
|
||||||
TenantId: 5,
|
|
||||||
}"
|
|
||||||
:limit="2"
|
|
||||||
:on-preview="handlePictureCardPreview"
|
|
||||||
:on-remove="filesRemove"
|
|
||||||
:on-success="filesOnSuccess"
|
|
||||||
action="https://server.gxwebsoft.com/api/oss/upload"
|
|
||||||
list-type="picture-card"
|
|
||||||
>
|
|
||||||
<el-icon>
|
|
||||||
<Plus/>
|
|
||||||
</el-icon>
|
|
||||||
</el-upload>
|
|
||||||
</el-form-item>
|
|
||||||
<template v-if="token">
|
|
||||||
|
|
||||||
</template>
|
|
||||||
<template v-if="!token">
|
<template v-if="!token">
|
||||||
<el-form-item :label="$t('order.realName')" class="hover:bg-gray-50 p-2" prop="realName">
|
<el-form-item :label="$t('order.realName')" class="hover:bg-gray-50 p-2" prop="realName">
|
||||||
<el-input v-model="form.realName" :placeholder="$t('order.realName')"/>
|
<el-input v-model="form.realName" :placeholder="$t('order.realName')"/>
|
||||||
@@ -106,8 +62,39 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
<div class="hidden-sm-and-down">
|
<div class="w-full col-span-2">
|
||||||
<el-image class="py-2" v-if="page.icon" :src="page.icon"/>
|
<div class="p-3">
|
||||||
|
<div class="w-full text-lg font-bold">
|
||||||
|
最新留言
|
||||||
|
</div>
|
||||||
|
<div class="likes-list my2 w-full">
|
||||||
|
<div v-for="(item,index) in orders" :key="index" class="item flex justify-between bg-gray-50 p-4 mb-2">
|
||||||
|
<div class="text-sm">
|
||||||
|
<div class="avatar flex">
|
||||||
|
<el-avatar src="/assets/default-avatar.png"/>
|
||||||
|
<div class="nickname flex flex-col ml-2">
|
||||||
|
<span class="font-bold">{{ item.realName }}</span>
|
||||||
|
<span class="text-sm text-gray-400">{{ item.createTime }}</span>
|
||||||
|
<div class="content py-1">{{ item.content }}</div>
|
||||||
|
<div class="content py-1 text-red-500">{{ item.comments }}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="mt-4 flex justify-end" v-if="total > 0">
|
||||||
|
<el-pagination
|
||||||
|
:current-page="currentPage"
|
||||||
|
:page-size="pageSize"
|
||||||
|
:page-sizes="[5, 10, 20]"
|
||||||
|
background
|
||||||
|
layout="total, sizes, prev, pager, next"
|
||||||
|
:total="total"
|
||||||
|
@current-change="handlePageChange"
|
||||||
|
@size-change="handleSizeChange"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
@@ -127,7 +114,7 @@ import {useLayout, usePage, useUser} from "~/composables/configState";
|
|||||||
import {getNavIdByParamsId} from "~/utils/common";
|
import {getNavIdByParamsId} from "~/utils/common";
|
||||||
import type {CmsOrder} from "~/api/cms/cmsOrder/model";
|
import type {CmsOrder} from "~/api/cms/cmsOrder/model";
|
||||||
import useFormData from "~/utils/use-form-data";
|
import useFormData from "~/utils/use-form-data";
|
||||||
import {addCmsOrder} from "~/api/cms/cmsOrder";
|
import {addCmsOrder, pageCmsOrder } from "~/api/cms/cmsOrder";
|
||||||
import {getCaptcha} from "~/api/passport/login";
|
import {getCaptcha} from "~/api/passport/login";
|
||||||
import {getCmsNavigation, listCmsNavigation} from "~/api/cms/cmsNavigation";
|
import {getCmsNavigation, listCmsNavigation} from "~/api/cms/cmsNavigation";
|
||||||
import {listCmsWebsite, pageCmsWebsiteAll} from "~/api/cms/cmsWebsite";
|
import {listCmsWebsite, pageCmsWebsiteAll} from "~/api/cms/cmsWebsite";
|
||||||
@@ -157,6 +144,10 @@ const filesStr = ref<string[]>([])
|
|||||||
const captcha = ref('');
|
const captcha = ref('');
|
||||||
const text = ref<string>('');
|
const text = ref<string>('');
|
||||||
const loading = ref(false)
|
const loading = ref(false)
|
||||||
|
const orders = ref<CmsOrder[]>([])
|
||||||
|
const currentPage = ref(1)
|
||||||
|
const pageSize = ref(5)
|
||||||
|
const total = ref(0)
|
||||||
|
|
||||||
|
|
||||||
const {form, resetFields} = useFormData<CmsOrder>({
|
const {form, resetFields} = useFormData<CmsOrder>({
|
||||||
@@ -230,7 +221,7 @@ const rules = reactive<FormRules<CmsOrder>>({
|
|||||||
{required: true, message: '请输入联系人姓名', trigger: 'blur'},
|
{required: true, message: '请输入联系人姓名', trigger: 'blur'},
|
||||||
],
|
],
|
||||||
content: [
|
content: [
|
||||||
{required: true, message: '请输入您的开发需求', trigger: 'blur'},
|
{required: true, message: '请输入您的留言内容', trigger: 'blur'},
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -242,6 +233,24 @@ const changeCaptcha = async () => {
|
|||||||
})
|
})
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// 加载留言列表(带分页)
|
||||||
|
const loadOrders = async () => {
|
||||||
|
try {
|
||||||
|
const response = await pageCmsOrder({
|
||||||
|
isSettled: true,
|
||||||
|
page: currentPage.value,
|
||||||
|
limit: pageSize.value,
|
||||||
|
sort: 'createTime',
|
||||||
|
order: 'desc',
|
||||||
|
sceneType: 'display'
|
||||||
|
})
|
||||||
|
orders.value = response?.list || []
|
||||||
|
total.value = response?.count || 0
|
||||||
|
} catch (error) {
|
||||||
|
console.error('Failed to load orders:', error)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 将 SEO 相关的逻辑修改为
|
// 将 SEO 相关的逻辑修改为
|
||||||
const updateSeo = (data: any) => {
|
const updateSeo = (data: any) => {
|
||||||
const title = data?.title || '';
|
const title = data?.title || '';
|
||||||
@@ -287,6 +296,10 @@ const reload = async () => {
|
|||||||
form.email = user.value.email
|
form.email = user.value.email
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 重置分页并加载留言列表
|
||||||
|
currentPage.value = 1
|
||||||
|
await loadOrders()
|
||||||
|
|
||||||
changeCaptcha()
|
changeCaptcha()
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Failed to load page data:', error)
|
console.error('Failed to load page data:', error)
|
||||||
@@ -360,6 +373,18 @@ const goBack = () => {
|
|||||||
router.back();
|
router.back();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 分页切换
|
||||||
|
const handlePageChange = (pageNum: number) => {
|
||||||
|
currentPage.value = pageNum
|
||||||
|
loadOrders()
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleSizeChange = (size: number) => {
|
||||||
|
pageSize.value = size
|
||||||
|
currentPage.value = 1
|
||||||
|
loadOrders()
|
||||||
|
}
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => route.params.id,
|
() => route.params.id,
|
||||||
(id) => {
|
(id) => {
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<!-- Banner -->
|
<!-- Banner -->
|
||||||
<Banner :layout="layout"/>
|
<Banner :layout="layout"/>
|
||||||
<!-- 主体部分 -->
|
<!-- 主体部分 -->
|
||||||
<div class="xl:w-screen-xl m-auto py-4 mt-12 px-4 sm:px-0 sm:mt-20">
|
<div class="xl:w-screen-xl m-auto py-4 mt-12 px-4 sm:px-0 sm:mt-[220px]">
|
||||||
<el-page-header :icon="ArrowLeft" @back="goBack">
|
<el-page-header :icon="ArrowLeft" @back="goBack">
|
||||||
<template #content>
|
<template #content>
|
||||||
<span class="text-large font-600"> {{ page.title }} </span>
|
<span class="text-large font-600"> {{ page.title }} </span>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<!-- Banner -->
|
<!-- Banner -->
|
||||||
<Banner :layout="layout" />
|
<Banner :layout="layout" />
|
||||||
<!-- 主体部分 -->
|
<!-- 主体部分 -->
|
||||||
<div class="xl:w-screen-xl m-auto py-4 px-4 sm:px-0">
|
<div class="xl:w-screen-xl m-auto mt-12 py-4 px-4 sm:px-0">
|
||||||
<el-page-header :icon="ArrowLeft" @back="goBack">
|
<el-page-header :icon="ArrowLeft" @back="goBack">
|
||||||
<template #content>
|
<template #content>
|
||||||
<span class="text-large font-600"> {{ page.title || '页面标题' }} </span>
|
<span class="text-large font-600"> {{ page.title || '页面标题' }} </span>
|
||||||
|
|||||||
@@ -238,7 +238,7 @@ useHead({
|
|||||||
* 执行登录
|
* 执行登录
|
||||||
*/
|
*/
|
||||||
const onSubmit = async () => {
|
const onSubmit = async () => {
|
||||||
const {data: response} = await useServerRequest<ApiResult<LoginResult>>('/login',{baseURL: 'https://server.gxwebsoft.com/api',method: "post",body: form})
|
const {data: response} = await useServerRequest<ApiResult<LoginResult>>('/login',{baseURL: 'https://server.gxbsnx.com/api',method: "post",body: form})
|
||||||
// 登录成功
|
// 登录成功
|
||||||
if(response.value?.code == 0){
|
if(response.value?.code == 0){
|
||||||
ElMessage.success(response.value?.message)
|
ElMessage.success(response.value?.message)
|
||||||
|
|||||||
@@ -34,7 +34,7 @@
|
|||||||
</el-space>
|
</el-space>
|
||||||
<div class="text-gray-400">
|
<div class="text-gray-400">
|
||||||
<el-avatar v-if="item.avatar" :src="`${item.avatar}`" size="small" />
|
<el-avatar v-if="item.avatar" :src="`${item.avatar}`" size="small" />
|
||||||
{{ dayjs(item.createTime).format('YYYY-MM-DD') }}
|
{{ dayjs(item.createTime).format('YYYY.MM.DD') }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,22 +1,22 @@
|
|||||||
<template>
|
<template>
|
||||||
<!-- 主体部分 -->
|
<!-- 主体部分 -->
|
||||||
<div class="xl:w-screen-xl m-auto py-4 mt-20">
|
<div class="xl:w-screen-xl m-auto py-4 mt-[220px]">
|
||||||
<el-page-header :icon="ArrowLeft" @back="goBack">
|
<el-page-header :icon="ArrowLeft" @back="goBack">
|
||||||
<template #content>
|
<template #content>
|
||||||
<span class="text-large font-600"> {{ '站内搜索' }} </span>
|
<span class="text-large font-600"> {{ '站内搜索' }} </span>
|
||||||
</template>
|
</template>
|
||||||
<template #extra>
|
<template #extra>
|
||||||
<el-radio-group v-model="where.model" @change="reload">
|
<!-- <el-radio-group v-model="where.model" @change="reload">-->
|
||||||
<el-radio-button label="文档" value="docs" />
|
<!-- <el-radio-button label="文档" value="docs" />-->
|
||||||
<el-radio-button label="资讯" value="article" />
|
<!-- <el-radio-button label="资讯" value="article" />-->
|
||||||
</el-radio-group>
|
<!-- </el-radio-group>-->
|
||||||
</template>
|
</template>
|
||||||
<el-row :gutter="24" id="container" class="clearfix">
|
<el-row :gutter="24" id="container" class="clearfix">
|
||||||
<el-col v-for="(item,index) in list" :key="index" :span="6" class="left mb-6">
|
<el-col v-for="(item,index) in list" :key="index" :span="6" class="left mb-6">
|
||||||
<el-card shadow="hover" :body-style="{ padding: '0px' }" class=" hover:bg-gray-50 cursor-pointer">
|
<el-card shadow="hover" :body-style="{ padding: '0px' }" class=" hover:bg-gray-50 cursor-pointer">
|
||||||
<nuxt-link :to="`/${item.detail}/${item.articleId}.html`">
|
<nuxt-link :to="`/detail/${item.articleId}.html`">
|
||||||
<el-image
|
<el-image
|
||||||
:src="item.image"
|
:src="`${item.image}`"
|
||||||
fit="cover"
|
fit="cover"
|
||||||
:lazy="true" class="w-full md:h-[166px] h-[199px] cursor-pointer bg-gray-50"/>
|
:lazy="true" class="w-full md:h-[166px] h-[199px] cursor-pointer bg-gray-50"/>
|
||||||
<div class="flex-1 px-4 py-5 sm:p-6 !p-4">
|
<div class="flex-1 px-4 py-5 sm:p-6 !p-4">
|
||||||
@@ -30,7 +30,7 @@
|
|||||||
<div class="text-gray-400 gap-1 flex items-center"><el-icon><View /></el-icon><span>{{ getViews(item) }}</span></div>
|
<div class="text-gray-400 gap-1 flex items-center"><el-icon><View /></el-icon><span>{{ getViews(item) }}</span></div>
|
||||||
</el-space>
|
</el-space>
|
||||||
<div class="text-gray-400">
|
<div class="text-gray-400">
|
||||||
{{ dayjs(item.createTime).format('YYYY-MM-DD') }}
|
{{ dayjs(item.createTime).format('YYYY.MM.DD') }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -45,11 +45,13 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import Banner from "@/components/Banner.vue";
|
import Banner from "@/components/Banner.vue";
|
||||||
import { ArrowLeft,View,Search } from '@element-plus/icons-vue'
|
import { ArrowLeft,View,Search } from '@element-plus/icons-vue'
|
||||||
import {useLayout, usePage} from "~/composables/configState";
|
import {useConfigInfo, useLayout, usePage} from "~/composables/configState";
|
||||||
import type {CmsArticle, CmsArticleParam} from "~/api/cms/cmsArticle/model";
|
import type {CmsArticle, CmsArticleParam} from "~/api/cms/cmsArticle/model";
|
||||||
import dayjs from "dayjs";
|
import dayjs from "dayjs";
|
||||||
import {getViews} from "~/utils/common";
|
import {getViews} from "~/utils/common";
|
||||||
import {pageCmsArticle} from "~/api/cms/cmsArticle";
|
import {pageCmsArticle} from "~/api/cms/cmsArticle";
|
||||||
|
import {FILE_SERVER} from "~/config";
|
||||||
|
import {pageCmsArticleContent} from "~/api/cms/cmsArticleContent";
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
@@ -61,23 +63,24 @@ const total = ref(0);
|
|||||||
// 获取状态
|
// 获取状态
|
||||||
const page = usePage();
|
const page = usePage();
|
||||||
const layout = useLayout();
|
const layout = useLayout();
|
||||||
|
const config = useConfigInfo()
|
||||||
|
|
||||||
// 搜索表单
|
// 搜索表单
|
||||||
const where = reactive<CmsArticleParam>({
|
const where = reactive<CmsArticleParam>({
|
||||||
keywords: undefined,
|
keywords: undefined,
|
||||||
page: 1,
|
page: 1,
|
||||||
limit: 12,
|
limit: 12,
|
||||||
status: 0,
|
// status: 0,
|
||||||
parentId: undefined,
|
// parentId: undefined,
|
||||||
categoryId: undefined,
|
// categoryId: undefined,
|
||||||
lang: i18n.locale.value
|
// lang: i18n.locale.value
|
||||||
});
|
});
|
||||||
|
|
||||||
// 加载页面数据
|
// 加载页面数据
|
||||||
const reload = async () => {
|
const reload = async () => {
|
||||||
list.value = [];
|
list.value = [];
|
||||||
|
|
||||||
pageCmsArticle(where).then(response => {
|
pageCmsArticleContent(where).then(response => {
|
||||||
list.value = response?.list || [];
|
list.value = response?.list || [];
|
||||||
total.value = response?.count || 0;
|
total.value = response?.count || 0;
|
||||||
})
|
})
|
||||||
@@ -104,13 +107,17 @@ const goBack = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const replaceKeywords = (text: any) => {
|
const replaceKeywords = (text: any) => {
|
||||||
|
if(where.keywords){
|
||||||
return text.replace(`${where.keywords}`,'<font color=#ff0000>' + where.keywords + '</font>');
|
return text.replace(`${where.keywords}`,'<font color=#ff0000>' + where.keywords + '</font>');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => route.params.keywords,
|
() => route.params.keywords,
|
||||||
(keywords) => {
|
(keywords) => {
|
||||||
|
if(keywords){
|
||||||
where.keywords = String(keywords);
|
where.keywords = String(keywords);
|
||||||
|
}
|
||||||
if(where.keywords == '关键词不能为空!'){
|
if(where.keywords == '关键词不能为空!'){
|
||||||
where.keywords = undefined;
|
where.keywords = undefined;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
<div class="text-gray-400 gap-1 flex items-center"><el-icon><View /></el-icon><span>{{ getViews(item) }}</span></div>
|
<div class="text-gray-400 gap-1 flex items-center"><el-icon><View /></el-icon><span>{{ getViews(item) }}</span></div>
|
||||||
</el-space>
|
</el-space>
|
||||||
<div class="text-gray-400">
|
<div class="text-gray-400">
|
||||||
{{ dayjs(item.createTime).format('YYYY-MM-DD') }}
|
{{ dayjs(item.createTime).format('YYYY.MM.DD') }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
<div class="text-gray-400 gap-1 flex items-center"><el-icon><View /></el-icon><span>{{ getViews(item) }}</span></div>
|
<div class="text-gray-400 gap-1 flex items-center"><el-icon><View /></el-icon><span>{{ getViews(item) }}</span></div>
|
||||||
</el-space>
|
</el-space>
|
||||||
<div class="text-gray-400">
|
<div class="text-gray-400">
|
||||||
{{ dayjs(item.createTime).format('YYYY-MM-DD') }}
|
{{ dayjs(item.createTime).format('YYYY.MM.DD') }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
<div class="n-right fr">
|
<div class="n-right fr">
|
||||||
<h3><a :href="detail(item)" target="_blank" :title="item.title" v-html="replaceKeywords(item.title)"></a></h3>
|
<h3><a :href="detail(item)" target="_blank" :title="item.title" v-html="replaceKeywords(item.title)"></a></h3>
|
||||||
<div v-html="replaceKeywords(item.comments)" class="line-clamp-2"></div>
|
<div v-html="replaceKeywords(item.comments)" class="line-clamp-2"></div>
|
||||||
<div class="date">{{ $t('createTime') }}:{{ dayjs(item.createTime).format('YYYY-MM-DD') }}</div>
|
<div class="date">{{ $t('createTime') }}:{{ dayjs(item.createTime).format('YYYY.MM.DD') }}</div>
|
||||||
<div class="date">{{ $t('search.column') }}:{{ item.categoryName }}</div>
|
<div class="date">{{ $t('search.column') }}:{{ item.categoryName }}</div>
|
||||||
<div class="n-more"><a :href="detail(item)">{{ $t('seeMore') }}>></a></div>
|
<div class="n-more"><a :href="detail(item)">{{ $t('seeMore') }}>></a></div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -58,7 +58,7 @@
|
|||||||
<el-form-item label="身份证">
|
<el-form-item label="身份证">
|
||||||
<el-upload
|
<el-upload
|
||||||
v-model:file-list="sfzFile"
|
v-model:file-list="sfzFile"
|
||||||
action="https://server.gxwebsoft.com/api/oss/upload"
|
action="https://server.gxbsnx.com/api/oss/upload"
|
||||||
:headers="{
|
:headers="{
|
||||||
Authorization: token,
|
Authorization: token,
|
||||||
TenantId: 5,
|
TenantId: 5,
|
||||||
@@ -144,7 +144,7 @@
|
|||||||
<el-form-item label="营业执照" required>
|
<el-form-item label="营业执照" required>
|
||||||
<el-upload
|
<el-upload
|
||||||
v-model:file-list="yyzzFile"
|
v-model:file-list="yyzzFile"
|
||||||
action="https://server.gxwebsoft.com/api/oss/upload"
|
action="https://server.gxbsnx.com/api/oss/upload"
|
||||||
:headers="{
|
:headers="{
|
||||||
Authorization: token,
|
Authorization: token,
|
||||||
TenantId: 5,
|
TenantId: 5,
|
||||||
@@ -169,7 +169,7 @@
|
|||||||
<el-form-item label="门头照片">
|
<el-form-item label="门头照片">
|
||||||
<el-upload
|
<el-upload
|
||||||
v-model:file-list="image"
|
v-model:file-list="image"
|
||||||
action="https://server.gxwebsoft.com/api/oss/upload"
|
action="https://server.gxbsnx.com/api/oss/upload"
|
||||||
:headers="{
|
:headers="{
|
||||||
Authorization: token,
|
Authorization: token,
|
||||||
TenantId: 5,
|
TenantId: 5,
|
||||||
@@ -194,7 +194,7 @@
|
|||||||
<el-form-item label="其他证件">
|
<el-form-item label="其他证件">
|
||||||
<el-upload
|
<el-upload
|
||||||
v-model:file-list="files"
|
v-model:file-list="files"
|
||||||
action="https://server.gxwebsoft.com/api/oss/upload"
|
action="https://server.gxbsnx.com/api/oss/upload"
|
||||||
:headers="{
|
:headers="{
|
||||||
Authorization: token,
|
Authorization: token,
|
||||||
TenantId: 5,
|
TenantId: 5,
|
||||||
@@ -228,7 +228,7 @@
|
|||||||
<el-form-item label="身份证">
|
<el-form-item label="身份证">
|
||||||
<el-upload
|
<el-upload
|
||||||
v-model:file-list="sfzFile"
|
v-model:file-list="sfzFile"
|
||||||
action="https://server.gxwebsoft.com/api/oss/upload"
|
action="https://server.gxbsnx.com/api/oss/upload"
|
||||||
:headers="{
|
:headers="{
|
||||||
Authorization: token,
|
Authorization: token,
|
||||||
TenantId: 5,
|
TenantId: 5,
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
<el-form-item label="上传头像" class="px-4">
|
<el-form-item label="上传头像" class="px-4">
|
||||||
<el-upload
|
<el-upload
|
||||||
v-model:file-list="avatar"
|
v-model:file-list="avatar"
|
||||||
action="https://server.gxwebsoft.com/api/oss/upload"
|
action="https://server.gxbsnx.com/api/oss/upload"
|
||||||
:headers="{
|
:headers="{
|
||||||
Authorization: token,
|
Authorization: token,
|
||||||
TenantId: 5,
|
TenantId: 5,
|
||||||
|
|||||||
@@ -46,10 +46,10 @@
|
|||||||
|
|
||||||
|
|
||||||
<!-- 相关产品和相关新闻 -->
|
<!-- 相关产品和相关新闻 -->
|
||||||
<div class="relate_list">
|
<!-- <div class="relate_list">-->
|
||||||
<CmsProductRelated :data="form" />
|
<!-- <CmsProductRelated :data="form" />-->
|
||||||
<CmsArticleRelated :data="form" />
|
<!-- <CmsArticleRelated :data="form" />-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 635 B After Width: | Height: | Size: 698 B |
1
types/global.d.ts
vendored
1
types/global.d.ts
vendored
@@ -37,6 +37,7 @@ export interface Config {
|
|||||||
IndexAboutNum?: string;
|
IndexAboutNum?: string;
|
||||||
showTopBar?: string;
|
showTopBar?: string;
|
||||||
showLoginButton?: string;
|
showLoginButton?: string;
|
||||||
|
FILE_SERVER?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface BreadcrumbItem {
|
export interface BreadcrumbItem {
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import type {CmsArticle} from "~/api/cms/cmsArticle/model";
|
import type {CmsArticle} from "~/api/cms/cmsArticle/model";
|
||||||
|
import {FILE_SERVER} from "~/config";
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
/**
|
/**
|
||||||
* 判断是否为整数
|
* 判断是否为整数
|
||||||
@@ -142,6 +143,7 @@ export function navTo(d?: any, path?: string,spm?: boolean){
|
|||||||
* @param d
|
* @param d
|
||||||
*/
|
*/
|
||||||
export function detail(d?: any) {
|
export function detail(d?: any) {
|
||||||
|
// console.log(d.detail,'9999999')
|
||||||
return navTo(d,`/${d?.detail}/${d?.articleId}.html`);
|
return navTo(d,`/${d?.detail}/${d?.articleId}.html`);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -187,3 +189,12 @@ export const copyText = (text: string) => {
|
|||||||
// 复制成功后再将构造的标签 移除
|
// 复制成功后再将构造的标签 移除
|
||||||
document.body.removeChild(cInput);
|
document.body.removeChild(cInput);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
export const getImage = (text: any) => {
|
||||||
|
// 是否包含字符串
|
||||||
|
if(text.indexOf('/upfile') > -1){
|
||||||
|
return FILE_SERVER + text;
|
||||||
|
}
|
||||||
|
return `${text}`
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import type { UseFetchOptions } from '#app';
|
import type { UseFetchOptions } from '#app';
|
||||||
import {useToken} from "~/composables/configState";
|
import { useToken } from "~/composables/configState";
|
||||||
|
import { isProxy, toRaw } from 'vue';
|
||||||
|
|
||||||
export const request = <T>(url:string, options?: UseFetchOptions<T, unknown>) => {
|
export const request = <T>(url:string, options?: UseFetchOptions<T, unknown>) => {
|
||||||
const nuxtApp = useNuxtApp()
|
const nuxtApp = useNuxtApp()
|
||||||
@@ -70,9 +71,11 @@ export const get = <T>(url: string,options?: UseFetchOptions<T, unknown>) => {
|
|||||||
}
|
}
|
||||||
export const post = <T>(url:string,data?: any) => {
|
export const post = <T>(url:string,data?: any) => {
|
||||||
return <T>new Promise((resolve,reject) => {
|
return <T>new Promise((resolve,reject) => {
|
||||||
|
// 避免传入 reactive 对象导致 useFetch 监听变更重复发送请求
|
||||||
|
const payload = isProxy(data) ? toRaw(data) : data;
|
||||||
request(url,{
|
request(url,{
|
||||||
method: 'post',
|
method: 'post',
|
||||||
body: data
|
body: payload
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
resolve(res.data.value)
|
resolve(res.data.value)
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
@@ -82,9 +85,10 @@ export const post = <T>(url:string,data?: any) => {
|
|||||||
}
|
}
|
||||||
export const put = <T>(url:string,data?: any) => {
|
export const put = <T>(url:string,data?: any) => {
|
||||||
return <T>new Promise((resolve,reject) => {
|
return <T>new Promise((resolve,reject) => {
|
||||||
|
const payload = isProxy(data) ? toRaw(data) : data;
|
||||||
request(url,{
|
request(url,{
|
||||||
method: 'put',
|
method: 'put',
|
||||||
body: data
|
body: payload
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
resolve(res.data.value)
|
resolve(res.data.value)
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
|
|||||||
Reference in New Issue
Block a user