main
王家东 5 months ago
parent 9f34bab874
commit d3810bf3cc
  1. 6
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/cms/controller/CmsHomePageController.java
  2. 33
      jeecgboot-vue3-master/src/api/demo/mainHome.ts
  3. 173
      jeecgboot-vue3-master/src/views/demo/main-home/components/homePage/index.vue
  4. 17
      jeecgboot-vue3-master/src/views/demo/main-home/components/matchEvaluation/components/LesserCh.vue
  5. 28
      jeecgboot-vue3-master/src/views/demo/main-home/components/matchEvaluation/components/MCh.vue
  6. 15
      jeecgboot-vue3-master/src/views/demo/main-home/index.vue

@ -73,7 +73,7 @@ public class CmsHomePageController /*extends JeecgController<CmsColumn, ICmsColu
@GetMapping(value = "/getindexnew")
public Result<?> getindexnew(CmsArticle cmsArticle,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
@RequestParam(name = "pageSize", defaultValue = "6") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<CmsArticle> queryWrapper = QueryGenerator.initQueryWrapper(cmsArticle, req.getParameterMap());
queryWrapper.eq("status", "1");
@ -88,7 +88,7 @@ public class CmsHomePageController /*extends JeecgController<CmsColumn, ICmsColu
@GetMapping(value = "/getindexcomp")
public Result<?> getindexcomp(CmsArticle cmsArticle,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
@RequestParam(name = "pageSize", defaultValue = "8") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<CmsArticle> queryWrapper = QueryGenerator.initQueryWrapper(cmsArticle, req.getParameterMap());
queryWrapper.eq("status", "1");
@ -104,7 +104,7 @@ public class CmsHomePageController /*extends JeecgController<CmsColumn, ICmsColu
@GetMapping(value = "/getindexaward")
public Result<?> getindexaward(CmsArticle cmsArticle,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
@RequestParam(name = "pageSize", defaultValue = "3") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<CmsArticle> queryWrapper = QueryGenerator.initQueryWrapper(cmsArticle, req.getParameterMap());
queryWrapper.eq("status", "1");

@ -2,7 +2,11 @@ import { defHttp } from '/@/utils/http/axios';
enum Api {
DEMO_NAV_LIST = '/cms/front/getColumnList',
DEMO_ARTICLE_LIST = 'cms/front/getArticleListByColumn'
DEMO_ARTICLE_LIST = 'cms/front/getArticleListByColumn',
DEMO_ARTICLE_ITEM = '/cms/front/getByArticleTitle',
getindexcomp = '/cms/front/getindexcomp',
getindexnews = '/cms/front/getindexnew',
getindexaward = '/cms/front/getindexaward',
}
/**
@ -23,13 +27,38 @@ export const demoArticleListApi = (params:any) =>
url: Api.DEMO_ARTICLE_LIST,
params
});
/**
*
* @returns
*/
export const getindexnews = (params:any) =>
defHttp.get({
url: Api.getindexnews,
params
});
export const getindexcomp = (params:any) =>
defHttp.get({
url: Api.getindexcomp,
params
});
export const getindexaward = (params:any) =>
defHttp.get({
url: Api.getindexaward,
params
});
/**
*
* @returns
*/
export const demoArticleApi = (id:string) =>
defHttp.get({
url: Api.DEMO_ARTICLE_LIST,
url: Api.DEMO_ARTICLE_ITEM,
params:{ id }
});

@ -22,147 +22,53 @@
<img src="../../../../../assets/images/mainHome/div.png" alt="">
</div>
<ul class="right_">
<li class="">
<span class="le_">首发黄淮学院普通本科院校教师教学发展指数2022版发布</span>
<span class="re_">2023-01-06</span>
</li>
<li class="">
<span class="le_">首发黄淮学院普通本科院校教师教学发展指数2022版发布</span>
<span class="re_">2023-01-06</span>
</li>
<li class="">
<span class="le_">首发黄淮学院普通本科院校教师教学发展指数2022版发布</span>
<span class="re_">2023-01-06</span>
</li>
<li class="">
<span class="le_">首发黄淮学院普通本科院校教师教学发展指数2022版发布</span>
<span class="re_">2023-01-06</span>
</li>
<li class="">
<span class="le_">首发黄淮学院普通本科院校教师教学发展指数2022版发布</span>
<span class="re_">2023-01-06</span>
</li>
<li class="">
<span class="le_">首发黄淮学院普通本科院校教师教学发展指数2022版发布</span>
<span class="re_">2023-01-06</span>
<li class="" v-for="o in data" :key="o.columnId"
@click="$router.push(`/main-home/MatchEvaluation/LesserCh/${o.id}`)">
<span class="le_">{{ o.title}}</span>
<span class="re_">{{o.publishTime}}</span>
</li>
</ul>
</div>
</div>
<!-- <div class="if-item" v-if="activeNavNew.text === navNews[1].text">待定...</div>
<div class="if-item" v-if="activeNavNew.text === navNews[2].text">待定...</div>
<div class="if-item" v-if="activeNavNew.text === navNews[3].text">待定...</div>
<div class="if-item" v-if="activeNavNew.text === navNews[4].text">待定...</div>-->
<div class="look-more">
<div class="look-more" @click="lookMore(1)">
<span>查看更多>></span>
</div>
</div>
<!-- 竞赛导航 -->
<div class="race-navigation">
<div class="title_">竞赛导航</div>
<div class="title_">比赛信息</div>
<div class="content_">
<div class="card_">
<div class="img-box">
<img src="../../../../../assets/images/mainHome/image15.png" alt="">
</div>
<div class="text">
互联网+大学生创新创业大赛
</div>
</div>
<div class="card_">
<div class="img-box">
<img src="../../../../../assets/images/mainHome/image15.png" alt="">
</div>
<div class="text">
互联网+大学生创新创业大赛
</div>
</div>
<div class="card_">
<div class="img-box">
<img src="../../../../../assets/images/mainHome/image15.png" alt="">
</div>
<div class="text">
互联网+大学生创新创业大赛
</div>
</div>
<div class="card_">
<div class="img-box">
<img src="../../../../../assets/images/mainHome/image15.png" alt="">
</div>
<div class="text">
互联网+大学生创新创业大赛
</div>
</div>
<div class="card_">
<div class="img-box">
<img src="../../../../../assets/images/mainHome/image15.png" alt="">
</div>
<div class="text">
互联网+大学生创新创业大赛
</div>
</div>
<div class="card_">
<div class="card_" v-for="o in data2" :key="o.columnId"
@click="$router.push(`/main-home/MatchEvaluation/LesserCh/${o.id}`)">
<div class="img-box">
<img src="../../../../../assets/images/mainHome/image15.png" alt="">
<img :src="o.comimg" alt="">
</div>
<div class="text">
互联网+大学生创新创业大赛
</div>
</div>
<div class="card_">
<div class="img-box">
<img src="../../../../../assets/images/mainHome/image15.png" alt="">
</div>
<div class="text">
互联网+大学生创新创业大赛
</div>
</div>
<div class="card_">
<div class="img-box">
<img src="../../../../../assets/images/mainHome/image15.png" alt="">
</div>
<div class="text">
互联网+大学生创新创业大赛
{{ o.title}}
</div>
</div>
</div>
<div class="look-more">查看更多>></div>
<div class="look-more" @click="lookMore(2)">查看更多>></div>
</div>
<!-- 研究成果 -->
<div class="research-result">
<div class="re_title">研究成</div>
<div class="re_title">比赛结果</div>
<div class="re_card_box">
<div class="re_card">
<div class="re_card_img_box">
<img src="../../../../../assets/images/mainHome/Group18.png" alt="">
</div>
<div class="fot_text">
专题研究
</div>
</div>
<div class="re_card">
<div class="re_card_img_box">
<img src="../../../../../assets/images/mainHome/image14.png" alt="">
<div class="re_card_img_box" v-for="o in data3" :key="o.columnId"
@click="$router.push(`/main-home/MatchEvaluation/LesserCh/${o.id}`)">
<img :src="o.comimg" alt="">
<div class="text">
{{ o.title}}
</div>
</div>
<div class="fot_text">
竞赛评估
</div>
</div>
<div class="re_card">
<div class="re_card_img_box">
<img src="../../../../../assets/images/mainHome/image15.png" alt="">
</div>
<div class="fot_text">
学生发展
</div>
</div>
</div>
<div class="look-more" @click="lookMore(3)">查看更多>></div>
</div>
</div>
</div>
@ -170,7 +76,42 @@
<script lang="ts" setup>
import * as n from './newsImgs'
import { ref } from 'vue';
import {reactive, ref} from 'vue';
import { getindexnews ,getindexcomp,getindexaward} from '/@/api/demo/mainHome';
import {useRouter} from 'vue-router'
const router = useRouter()
const props = defineProps(['navList'])
const data3 = reactive<any[]>([])
const data2 = reactive<any[]>([])
const data = reactive<any[]>([])
//
function getData() {
getindexnews({ }).then(res => {
data.length = 0
data.push(...res.records as any[])
})
}
function getData2() {
getindexcomp({ }).then(res => {
data2.length = 0
data2.push(...res.records as any[])
})
}
function getData3() {
getindexaward({ }).then(res => {
data3.length = 0
data3.push(...res.records as any[])
})
}
getData();
getData2();
getData3();
const navNews = [
{ img: n.Frame, text: '全部' },
@ -181,6 +122,10 @@ const navNews = [
]
const activeNavNew = ref(navNews[0])
function lookMore(i){
const item = props.navList[i]
router.push(item.path+'?id='+item.id)
}
</script>
<style lang="less" scoped>

@ -5,19 +5,19 @@
<div class="item">
<RouterLink to="/main-home">首页</RouterLink>
</div>
<div class="item">专业概括</div>
<div class="item">历史沿革</div>
<div class="item">详情</div>
<!-- <div class="item">历史沿革</div>-->
</div>
</div>
</div>
<div class="main-content">
<p class="content" v-for="i in 3" :key="i">
<!-- <p class="content" v-for="i in 3" :key="i">
文本文本文本文本文本文本文本文本文本文本文本文本文本文本文本文本文本文本文本文文本文本文本文本文本文本文本文本文本文本文本文本文本文本文文本文本文本文本文本文本文本文本文本文本文本文本文本文本文文本文本文本文本文本文本文本文本文本文本文本文本文本文本文
</p>
<div class="img-box"></div>
<div class="img-box"></div>
<p class="content" v-for="i in 3" :key="i">
文本文本文本文本文本文本文本文本文本文本文本文本文本文本文本文本文本文本文本文文本文本文本文本文本文本文本文本文本文本文本文本文本文本文文本文本文本文本文本文本文本文本文本文本文本文本文本文本文文本文本文本文本文本文本文本文本文本文本文本文本文本文本文
<div class="img-box"></div>-->
<p class="content" v-html="data">
</p>
</div>
</template>
@ -26,8 +26,11 @@
import { useRoute } from 'vue-router';
import { demoArticleApi } from '/@/api/demo/mainHome';
const route =useRoute()
import {ref} from 'vue'
const data = ref()
demoArticleApi(route.params.id as string).then(res => {
console.log("🚀 ~ demoArticleApi ~ res:", res)
data.value = res[0].content
})
</script>

@ -5,7 +5,7 @@
<div class="item">
<RouterLink to="/main-home">首页</RouterLink>
</div>
<div class="item">成果展示</div>
<div class="item">列表</div>
<!-- <div class="item">优秀毕业生</div>-->
</div>
</div>
@ -16,12 +16,12 @@
@click="$router.push(`/main-home/MatchEvaluation/LesserCh/${o.id}`)">
<div class="card">
<div class="card_left">
<img :src="o.comimg" />
</div>
<div class="card_right">
<p class="tit">{{ o.title }}</p>
<p class="text">
<span>文本文本文本文本文本文本文本文本文本文本文本文本文本文本文本文本文本文本文本文本文本文本文本文本文本文本文本文本文本文本文本文本文本文本</span>
<span>{{ o.info }}</span>
</p>
</div>
</div>
@ -47,11 +47,12 @@
</div>
</div>
<div class="message-box">
<div class="msg-item" v-for="i in 8" :key="i">
<div class="msg-date">02.03</div>
<div class="msg-item" v-for="o in data" :key="o.columnId"
@click="$router.push(`/main-home/MatchEvaluation/LesserCh/${o.id}`)">
<div class="msg-date">{{o.publishTime}}</div>
<div class="msg-date_"></div>
<div class="text">
文本文本文本文本文本文本文本文本文本文本文本文本文本文本文
{{o.info}}
</div>
</div>
</div>
@ -69,16 +70,16 @@ const data = reactive<any[]>([])
//
function getData(columnId: string) {
demoArticleListApi({ columnId: columnId, pageNo: current.value, pageSize: pageSize.value }).then(res => {
data.length = 0
data.push(...res.records as any[])
total.value = res.total
})
demoArticleListApi({ columnId: columnId, pageNo: current.value, pageSize: pageSize.value }).then(res => {
data.length = 0
data.push(...res.records as any[])
total.value = res.total
})
}
//
const current = ref(1);
const pageSize = ref(10);
const pageSize = ref(5);
const total = ref(0)
function pagChange(page: number, pageSizeP: number) {
current.value = page
@ -257,7 +258,7 @@ const onSearch = (searchValue: string) => {
flex-direction: column;
justify-content: space-between;
@msg_width: 59px;
@msg_width: 180px;
@msg_height: 26px;
.msg-date,
@ -269,6 +270,7 @@ const onSearch = (searchValue: string) => {
.msg-date {
width: @msg_width;
height: @msg_height;
padding-left: 20px;
display: flex;
justify-content: center;
align-items: center;

@ -13,9 +13,9 @@
{{ item.name }}
</div>
</div>
<div class="login">
<!-- <div class="login">
登录
</div>
</div>-->
</div>
</div>
</div>
@ -31,7 +31,10 @@
</div>
</div>
<router-view></router-view>
<router-view v-slot="{ Component }">
<component :is="Component" :navList="navItems" />
</router-view>
<!-- 脚部 -->
@ -43,8 +46,8 @@
<img src="../../../assets/images/mainHome/2641675928551_3.png" alt="">
</div>
<div class="text">
<div class="item">主办单位黄淮学院</div>
<div class="item">技术支持原点科技有限公司</div>
<!-- <div class="item">主办单位黄淮学院</div>-->
<div class="item">河南机电</div>
</div>
</div>
<div class="con_center">
@ -52,7 +55,7 @@
<li>
<div class="tit">友情链接</div>
<div class="box">
<div class="item">黄淮学院官网</div>
<div class="item">河南机电</div>
<div class="item">中国高等教育博览会</div>
</div>
</li>

Loading…
Cancel
Save