init 初始化

This commit is contained in:
lwh 2023-06-29 19:19:30 +08:00
parent cd89013e62
commit 3942d0da9c
23 changed files with 680 additions and 33 deletions

View File

@ -3,6 +3,7 @@
}
.Carousel-container{
margin-top: 85px;
.carousel-box{
.carousel-items{
color: var(--swipercolor);

View File

@ -44,9 +44,10 @@
}
.Final-container {
background: #ededed;
// 底部背景颜色
background: #193066;
position: relative;
color: black;
color: white;
.Final-big-box {
width: 100%;
@ -81,7 +82,7 @@
.items {
margin-bottom: 10px;
color: black;
color: white;
font-size: 15px;
cursor: pointer;
@ -90,7 +91,7 @@
.items-title {
font-size: 22px;
margin-bottom: 20px;
color: black;
color: white;
font-weight: 600;
}
}
@ -130,10 +131,11 @@
justify-content: center;
align-items: center;
padding: 30px 0;
color: black;
color: white;
font-size: 15px;
font-weight: bold;
background-color: #ededed;
// 底部版权颜色
background-color:#193066;
}
}

View File

@ -20,6 +20,7 @@
//Header.scss
.Header{
margin-top: -85px;
position: relative;
width: 100%;
display: flex;

View File

@ -49,7 +49,7 @@ a {
display: flex;
align-items: center;
justify-content: center;
font-size: 18px;
font-size: 16px;
font-weight: 600;
// color: rgb(198, 198, 198);
color: black;

View File

@ -0,0 +1,101 @@
.news-container-box {
width: 100%;
// margin-top: 30px;
.news-big-box {
width: 105%;
display: flex;
// justify-content: center;
// flex-wrap: wrap;
.news-box {
padding: 20px;
transition: 0.4s;
.news-s-box {
height: 450px;
border-radius: 10px;
transition: 0.4s;
padding: 20px;
cursor: pointer;
.jump {
text-decoration: dashed;
color: black;
}
&:hover {
box-shadow: 0 0 15px 10px rgb(227, 225, 225);
}
.news-img-box {
width: 100%;
height: 70%;
overflow: hidden;
img {
width: 100%;
height: 100%;
object-fit: cover;
}
}
.news-content-box {
width: 100%;
height: 30%;
display: flex;
flex-direction: column;
justify-content: space-around;
margin-top: 10px;
.news-content-title {
font-size: 25px;
font-weight: bold;
}
.news-content-line {
width: 100%;
height: 1px;
background: rgba(204, 204, 204, 1);
}
}
}
}
}
}
// ted栏
.Top_navigation {
display: flex;
justify-content: center;
z-index: 9;
position: relative;
}
// 分页
.page-box {
width: 100%;
display: flex;
justify-content: center;
.page {
margin-bottom: 80px;
}
}
.news-content-sublevel {
display: flex;
justify-content: space-between;
}
.jump {
text-decoration: dashed;
color: black;
}
.ach-container {
float: left;
margin-top: 30px;
}

View File

@ -0,0 +1,41 @@
//media.scss
/*1440px*/
/*大于*/
@media screen and (min-width: 1440px) {
.container {
max-width: 1420px;
}
}
/*小于*/
@media screen and (min-width: 1440px) {}
/*1200px*/
/*大于*/
@media screen and (min-width: 1200px) {}
/*小于*/
@media screen and (max-width: 1200px) {}
/*880px*/
/*大于*/
@media screen and (min-width: 880px) {}
/*小于*/
@media screen and (max-width: 880px) {
.ach-container{
float: left;
margin-top: 120px;
}
}
/*480px*/
/*大于*/
@media screen and (min-width: 480px) {}
/*小于*/
@media screen and (max-width: 480px) {
.news-box{
padding: 0 !important;
}
}

View File

@ -0,0 +1,45 @@
.joint-details-pos-box {
padding-bottom: 15rem;
}
// 标题
.joint-details-title-box {
width: 100%;
display: flex;
align-items: center;
flex-direction: column;
padding: 0rem 0 2rem 0;
.joint-details-title {
font-size: 30px;
font-weight: bold;
font-family: '阿里妈妈数黑体';
}
.joint-details-time {
margin-top: 2rem;
}
}
.return {
width: 60px;
height: 50%;
// margin-left: 300px;
margin-top: 50px;
cursor: pointer;
}
// 翻页
.Turn-the-page {
line-height: 80px;
.Turn-the-page-box {
display: flex;
justify-content: space-between;
a {
text-decoration: dashed;
color: gray;
}
}
}

View File

@ -0,0 +1,34 @@
/*1440px*/
/*大于*/
@media screen and (min-width: 1440px) {}
/*小于*/
@media screen and (min-width: 1440px) {}
/*1200px*/
/*大于*/
@media screen and (min-width: 1200px) {}
/*小于*/
@media screen and (max-width: 1200px) {}
/*880px*/
/*大于*/
@media screen and (min-width: 880px) {}
/*小于*/
@media screen and (max-width: 880px) {}
/*480px*/
/*大于*/
@media screen and (min-width: 480px) {}
/*小于*/
@media screen and (max-width: 480px) {
.Turn-the-page-box{
flex-direction: column;
}
.return {
display: none;
}
}

View File

@ -0,0 +1,116 @@
.box{
width: 100%;
// background-color: black;
}
// 米尔产品
.product-big-box{
background-color: #f8f8f8;
padding: 100px 0 100px 0;
}
.product-pos-box {
margin: 0 auto;
width: 85%;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
}
.product-title-box {}
.product-title {
letter-spacing: 3px;
font-size: 35px;
font-weight: bold;
}
.product-type-box {
padding: 10px;
margin: 30px 0px;
display: flex;
justify-content: space-around;
align-items: center;
}
.product-typ-item {
font-size: 18px;
margin: 0px 50px 0px 0px;
cursor: pointer;
}
.product-content-box {
width: 72%;
display: flex;
justify-content: space-around;
align-items: center;
margin-top: 20px;
}
.product-content-left-box {
overflow: hidden;
height: 300px;
width: 45%;
box-shadow: rgb(219, 219, 219) 0px 0px 10px 1px;
border-radius: 10px;
// transform: translateY(-10px);
}
.product-content-left-box img {
width: 100%;
height: 100%;
}
.product-content-right-box {
height: 300px;
width: 50%;
}
.product-content-right-intro {
font-size: 16px;
color: rgb(155, 155, 155);
}
.product-advantage-pos-box {
display: flex;
justify-content: space-around;
align-items: center;
margin: 50px 0 0 0px;
}
.product-advantage-box {
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
}
.product-advantage-img-box {
height: 45px;
width: 45px;
margin: 0px 0px 10px;
}
.product-advantage-img-box img {
height: 100%;
width: 100%;
object-fit: contain;
}
.product-advantage-text {
width: 70px;
font-size: 16px;
color: rgb(130, 130, 130);
text-align: center;
}
.product-content-btn-box {
margin-top: 30px;
display: flex;
justify-content: center;
align-items: center;
}

View File

@ -4,6 +4,7 @@
position: relative;
height: 30vw;
width: 100%;
margin-top: 85px;
.Poster-img{
height: 100%;
width: 100%;
@ -11,7 +12,7 @@
left: 0 ;
bottom: 0 ;
object-fit: cover;
object-position: 0 40%;
// object-position: 0 40%;
}
.Poster-content-box{
position: relative;

View File

@ -1,12 +1,12 @@
$rootColor : #2196f3;
$rootColor : #193066;
body{
background-color: #0a0a0a;
// background-color: #0a0a0a;
font-family: Inter;
}
:root{
--rootColor:#2196f3;
--rootColor:#193066;
}
.dNone{
display: None!important;

View File

@ -41,7 +41,7 @@ import 'swiper/css/navigation'
//
const banner_list = ref([
{
banner_img:`/img/loading.gif`,
// banner_img:`/img/loading.gif`,
},
])
const params = reactive({
@ -62,20 +62,20 @@ const params = reactive({
// })()
// })
//
useFetch('/api/banner/getBanner').then(res => {
useFetch('/api/banner/getBanner',{ params: { banner_location: 1 } }).then(res => {
banner_list.value = JSON.parse(res.data.value).data
})
/**整体轮播图样式*/
let styleContainer = reactive({
height: '40vw'
height: '38vw',
})
const modules = ref([Pagination, Navigation, Autoplay])
const swiperStyle = conversionStyleVal(reactive({
/**轮播图样式*/
color: '', //
height: '40vw', //
height: '38vw', //
width: '100%', //
margin: '0', //margin
padding: '0', //padding

View File

@ -95,7 +95,7 @@
<div class="Final-middle-phone-box">
<div class="Final-middle-phone-title-box">
<div class="Final-middle-phone-title">全国报名热线</div>
<div class="Final-middle-phone-title">全国咨询热线</div>
<div class="Final-middle-phone-content-box">
<div v-for="(item, index) in bottomData.hoteline" class="Final-middle-phone-content">
{{ item.consulting_hotline_user }} : {{ item.consulting_hotline_phone }}

View File

@ -81,8 +81,8 @@ let navList = [
{
name: '新闻中心',
children: [],
href: 'https://github.com/Abbh1/AerwenTool',
alias: 'GitHub'
href: '/news/1',
alias: 'news'
},
{
name: '关于我们',

View File

@ -3,8 +3,8 @@
<div class="Poster-container" :style="posterStyle">
<img class="Poster-img" :src="posterInfo.imgSrc" alt="">
<div class="Poster-content-box">
<div class="Poster-title"> {{ posterInfo.title }} </div>
<div class="Poster-text">{{ posterInfo.text }}</div>
<!-- <div class="Poster-title"> {{ posterInfo.title }} </div> -->
<!-- <div class="Poster-text">{{ posterInfo.text }}</div> -->
</div>
</div>
</div>
@ -23,7 +23,7 @@ let posterInfo = ref({
// text: ''
}),
posterStyle = {
height: '40vw'
height: '23vw'
}
//

View File

@ -8,16 +8,16 @@ export default defineNuxtConfig({
nitro: {
devProxy: {
"/api-v": {
target: "http://192.168.1.105/Aerwen/houde_web/houde_web_api/public/api.php/", // 文豪
target: "http://192.168.1.102/zhiyun/.New/mr_web/mr_web_api/public/api.php/", // 文豪
// target: "http://192.168.1.18/ARW/houde_web/houde_web_api/public/api.php/", // 君豪
// target: "http://houde_web.back.aerwen.net/api", // 这里是线上接口地址
changeOrigin: true,
prependPath: true,
},
"/uploads": {
// target: "http://192.168.1.105/Aerwen/houde_web/houde_web_api/public/uploads", // 文豪
target: "http://192.168.1.102/zhiyun/.New/mr_web/mr_web_api/public/uploads", // 文豪
// target: "http://192.168.1.18/ARW/houde_web/houde_web_api/public/uploads", // 君豪
target: "https://houde.api.aerwen.net/uploads", // 这里是线上接口地址
// target: "https://houde.api.aerwen.net/uploads", // 这里是线上接口地址
changeOrigin: true,
prependPath: true,
},

View File

@ -3,18 +3,60 @@
<!-- <ImgDetail ref='ImgDetailRef' :imgList="imgList" :imgIdx="imgIdx"></ImgDetail> -->
<Head>
<Title></Title>
<Meta name="keywords" content="" />
<Meta name="description" content="" />
<Title>{{ tdk.tdk_title }}</Title>
<Meta :content=tdk.tdk_keyword name="keywords" />
<Meta :content=tdk.tdk_description name="description" />
<Meta name="baidu-site-verification" content="" />
</Head>
<Header></Header>
<Carousel></Carousel>
<div class="Home-main">
<!-- 米尔产品 -->
<div class="product-big-box">
<div class="product-pos-box">
<div class="product-title-box">
<h1 class="product-title">米尔产品 </h1>
</div>
<div class="product-type-box">
<div v-for="idx in 4" class="product-typ-item">
ARM开发工具
</div>
</div>
<div class="product-content-box op0" data-animation="animate__animated animate__fadeInUp animate__animated_slow">
<div class="product-content-left-box"><img src="https://www.myir-tech.com/public/images/index/product_02.jpg?1">
</div>
<div class="product-content-right-box" style="">
<div class="product-content-right-intro">
米尔通过与STTINXP全志Microchip等芯片原厂保持深度密切合作自主研发了系列应用于工业控制及物联网等相关领域的核心板和开发板等产品帮助客户实现产品及方案的快速开发
</div>
<div class="product-advantage-pos-box">
<div class="product-advantage-box" v-for="(item, idx) in 3">
<div class="product-advantage-img-box">
<img src="https://www.myir-tech.com/public/images/index/my_product_icon_04.png">
</div>
<div class="product-advantage-text">品质优良 性能卓越</div>
</div>
</div>
<div class="product-content-btn-box">
<el-button type="warning">查看产品</el-button>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- 图片预览示例 -->
<div class="top-show-box">
<!-- <div class="top-show-box">
<img @click="handleImg(0)" :src=openImg1 alt="">
</div>
</div> -->
<Final></Final>
</template>
@ -51,12 +93,23 @@ function handleImg(v) {
}
/**
* 接口对接
*/
// Tdk
let tdk = ref({})
useFetch('/api/tdk/getTdk', { params: { tdk_type: 1 } }).then(res => {
tdk.value = JSON.parse(res.data.value).data
})
/**onMounted**/
onMounted(() => {
// imgList.value.push(openImg1.value)
// htmlAddAnimations()
htmlAddAnimations({ tagDom: 'Home-main', preload: 1.3 })
})
/**export**/
defineExpose({

145
pages/news/[page].vue Normal file
View File

@ -0,0 +1,145 @@
<template>
<Head>
<Title>{{ tdk.tdk_title }}</Title>
<Meta :content=tdk.tdk_keyword name="keywords" />
<Meta :content=tdk.tdk_description name="description" />
</Head>
<Header></Header>
<Poster :type=1></Poster>
<div class="background_box">
<div class="About-main">
<div class="About-container">
<main class="container ">
<!--招生新闻-->
<div class="news-container-box container">
<!-- 模块渲染列表 -->
<div v-if="newsList.length != 0" class="news-big-box row animate__animated animate__fadeIn">
<div class="news-box col-lg-4 col-md-6 col-sm-12" v-for="(item, index) in newsList">
<div class="news-s-box">
<nuxt-link v-if="item.info_article_link" :to="item.info_article_link" class="jump">
<div class="news-img-box">
<img :src=item.info_article_cover alt="">
</div>
<div class="news-content-box">
<div class="news-content-title">{{ item.info_article_title }}</div>
<div class="news-content-line"></div>
<div class="news-content-sublevel">
<div class="news-content-more">现在阅读</div>
<div class="news-content-time">{{ item.info_article_create_time }}
</div>
</div>
</div>
</nuxt-link>
<nuxt-link v-else :to="'/news/details/' + item.info_article_id" class="jump">
<div class="news-img-box">
<img :src=item.info_article_cover alt="">
</div>
<div class="news-content-box">
<div class="news-content-title">{{ item.info_article_title }}</div>
<div class="news-content-line"></div>
<div class="news-content-sublevel">
<div class="news-content-more">现在阅读</div>
<div class="news-content-time">{{ item.info_article_create_time }}
</div>
</div>
</div>
</nuxt-link>
</div>
</div>
</div>
<div class="list_none" v-else>
<el-empty description="暂无数据" />
</div>
</div>
<!-- 分页 -->
<div class="page-box">
<pagination class="page" :total="total" v-model:page="queryParams.page"
v-model:limit="queryParams.limit" @pagination="routerJump()" />
</div>
</main>
</div>
</div>
</div>
<Final></Final>
</template>
<script setup>
let newsList = ref(
[
// {
// info_article_id: '1',
// info_article_title: "2023",
// info_article_cover: "/img/business/nuxt/@2x.png",
// info_article_create_time: "2023-02-23",
// },
]
)
const route = useRoute()
const router = useRouter()
onMounted(() => {
})
// --- ---
let total = ref(0)
const queryParams = reactive({
page: parseInt(route.params.page) || 1,
limit: 10
})
// --- ---
const routerJump = function () {
let { page } = queryParams
router.push(String(page))
}
/**
* 接口对接
*/
// Tdk
let tdk = ref({})
useFetch('/api/tdk/getTdk', { params: { tdk_type: 2 } }).then(res => {
tdk.value = JSON.parse(res.data.value).data
})
// //
// useFetch('/api/news/getinfoArticleList', { params: queryParams }).then(res => {
// total.value = JSON.parse(res.data.value).count || 0
// newsList.value = JSON.parse(res.data.value).data || []
// })
// // 访
// useFetch('/api/flow/addFlowRecord', { params: { flow_target: route.name } })
// fontSizeReactive({
// 880: 1,
// 480: 3,
// })
onMounted(() => {
htmlAddAnimations()
})
</script>
<style scoped src="~/assets/css/business/news/index.scss"></style>
<style scoped src="~/assets/css/business/news/media.scss"></style>

View File

@ -0,0 +1,86 @@
<template>
<Head>
<Title>{{ infoArticleInfo.info_article_title }}{{ tdk.tdk_title }}</Title>
<Meta :content=tdk.tdk_keyword name="keywords" />
<Meta :content=tdk.tdk_description name="description" />
</Head>
<Header></Header>
<!-- 艺考资讯详情大盒子 -->
<div class="joint-details-pos-box">
<div class="--box--">
<!-- 返回 -->
<div @click="router.back()">
<img class="return" src="/img/business/signUp/返回.png" alt="">
</div>
<!-- 标题 -->
<div class="joint-details-title-box" data-animation="animate__animated animate__zoomIn">
<div class="joint-details-title">{{ infoArticleInfo.info_article_title }}</div>
<div class="joint-details-time">{{ infoArticleInfo.info_article_create_time }}</div>
</div>
<hr>
<div class="joint-details-content-box op0" data-animation="animate__animated animate__fadeIn"
v-html=infoArticleInfo.info_article_content></div>
<!-- 翻篇 -->
<div class="Turn-the-page op0" data-animation="animate__animated animate__fadeIn">
<hr>
<div class="Turn-the-page-box">
<nuxt-link class="f1" v-if="infoArticleInfo.prve"
:to="'/news/details/' + infoArticleInfo.prve.info_article_id">上一篇: {{
infoArticleInfo.prve.info_article_title }}</nuxt-link>
<nuxt-link class="f1" v-if="infoArticleInfo.next"
:to="'/news/details/' + infoArticleInfo.next.info_article_id">下一篇: {{
infoArticleInfo.next.info_article_title }}</nuxt-link>
</div>
</div>
</div>
</div>
<Final></Final>
</template>
<script setup>
// --- ---
//
const route = useRoute()
const router = useRouter()
//
let infoArticleInfo = ref({})
//
useFetch('/api/news/getinfoArticleInfo', { params: { info_article_id: route.params.id } }).then(res => {
infoArticleInfo.value = JSON.parse(res.data.value).data
setTimeout(() => {
[...document.querySelectorAll('.joint-details-content-box img')].map(item => {
item.style.maxWidth = 100 + '%'
item.style.height = 0 + '%'
})
htmlAddAnimations()
});
})
// Tdk
let tdk = ref({})
useFetch('/api/tdk/getTdk', { params: { tdk_type: route.name } }).then(res => {
tdk.value = JSON.parse(res.data.value).data
})
// 访
useFetch('/api/flow/addFlowRecord', { params: { flow_target: route.name } })
</script>
<style scoped src="~/assets/css/business/news/news_details/index.scss"></style>
<style scoped src="~/assets/css/business/news/news_details/media.scss"></style>

View File

@ -10,7 +10,7 @@ export default defineEventHandler(async (event) => {
const method = getMethod(event).toUpperCase()
let body
if (method !== 'GET') body = await readRawBody(event)
const res = await $fetch("https://houde.api.aerwen.net/api.php/Banner.Banner/getBannerList", {
const res = await $fetch( baseURL + "/Banners.Banner/getBannerList", {
method,
baseURL: event.context.baseUrl,
headers: event.context.headers,

View File

@ -0,0 +1,21 @@
import {
readRawBody,
getQuery,
getMethod
} from 'h3'
export default defineEventHandler(async (event) => {
// 基础url
const baseURL = process.env.NUXT_PROXY_WEB_API
const method = getMethod(event).toUpperCase()
let body
if (method !== 'GET') body = await readRawBody(event)
const res = await $fetch(baseURL + "/Banners.Poster/getPoster", {
method,
baseURL: event.context.baseUrl,
headers: event.context.headers,
params: getQuery(event),
body
})
return res
})

View File

@ -10,7 +10,7 @@ export default defineEventHandler(async (event) => {
const method = getMethod(event).toUpperCase()
let body
if (method !== 'GET') body = await readRawBody(event)
const res = await $fetch("https://houde.api.aerwen.net/api.php/Tdk.Tdk/getTdkInfo", {
const res = await $fetch( baseURL + "/Tdk.Tdk/getTdkInfo", {
method,
baseURL: event.context.baseUrl,
headers: event.context.headers,

View File

@ -2,7 +2,7 @@
@forward 'element-plus/theme-chalk/src/common/var.scss' with (
$colors: (
'primary': (
'base': #a30000,
'base': #193066,
),
),
);