前后端补正

This commit is contained in:
xiao-fajia 2024-08-05 17:02:01 +08:00
parent e522044ed6
commit dc467d9327
26 changed files with 514 additions and 744 deletions

View File

@ -37,6 +37,24 @@ public class CMSCategoryAPI extends BaseController {
*/ */
@PostMapping("/content") @PostMapping("/content")
public AjaxResult getContentById(@RequestBody CmsContentQuery contentQuery){ public AjaxResult getContentById(@RequestBody CmsContentQuery contentQuery){
if (contentQuery.getCategoryId() == null) return success();
return success(categoryService.getContentById(contentQuery)); return success(categoryService.getContentById(contentQuery));
} }
/**
* 获取某个子栏目的内容
*/
@PostMapping("/contentPart")
public AjaxResult getContentByIdPart(@RequestBody CmsContentQuery contentQuery){
if (contentQuery.getCategoryId() == null) return success();
return success(categoryService.getContentByIdPart(contentQuery));
}
/**
* 获取某个栏目的子栏目
*/
@GetMapping("/{id}")
public AjaxResult getCategoryIdByParentId(@PathVariable Long id){
return success(categoryService.getCategoryIdByParentId(id));
}
} }

View File

@ -41,9 +41,7 @@ public class CMSContentAPI extends BaseController {
*/ */
@GetMapping("/listById/{id}") @GetMapping("/listById/{id}")
public AjaxResult getListById(@PathVariable Long id){ public AjaxResult getListById(@PathVariable Long id){
return success(contentService.list(new QueryWrapper<CmsContent>().and(item -> { return success(contentService.selectCmsContentAllById(id));
item.eq("category_id", id).eq("del_flag", 0);
})));
} }
} }

View File

@ -30,6 +30,14 @@ public interface CmsContentMapper extends BaseMapper<CmsContent>
*/ */
public List<CmsContent> selectCmsContentList(CmsContent cmsContent); public List<CmsContent> selectCmsContentList(CmsContent cmsContent);
/**
* 查询内容列表
*
* @param cmsContent 内容
* @return 内容集合
*/
public List<CmsContent> selectCmsContentPart(CmsContent cmsContent);
/** /**
* 新增内容 * 新增内容
* *

View File

@ -113,6 +113,12 @@ public interface ICmsCategoryService extends IService<CmsCategory>
*/ */
public PageInfo<CmsContent> getContentById(CmsContentQuery contentQuery); public PageInfo<CmsContent> getContentById(CmsContentQuery contentQuery);
/**
* 按ID查文章
* @return
*/
public PageInfo<CmsContent> getContentByIdPart(CmsContentQuery contentQuery);
/** /**
* 获取所有的叶子节点 * 获取所有的叶子节点
* @return * @return
@ -123,4 +129,9 @@ public interface ICmsCategoryService extends IService<CmsCategory>
* 按ID查询所有文章 * 按ID查询所有文章
*/ */
List<CmsContent> getLeavesContentList(Long id); List<CmsContent> getLeavesContentList(Long id);
/**
* 获取某个栏目的子栏目
*/
List<CmsCategory> getCategoryIdByParentId(Long id);
} }

View File

@ -79,4 +79,9 @@ public interface ICmsContentService extends IService<CmsContent>
* @return * @return
*/ */
List<CmsContent> searchContent(String query); List<CmsContent> searchContent(String query);
/**
* 二级栏目下的所有
*/
List<CmsContent> selectCmsContentAllById(Long id);
} }

View File

@ -28,6 +28,8 @@ import com.ruoyi.cms.mapper.CmsCategoryMapper;
import com.ruoyi.cms.domain.CmsCategory; import com.ruoyi.cms.domain.CmsCategory;
import com.ruoyi.cms.service.ICmsCategoryService; import com.ruoyi.cms.service.ICmsCategoryService;
import javax.annotation.Resource;
/** /**
* 栏目Service业务层处理 * 栏目Service业务层处理
* *
@ -36,10 +38,10 @@ import com.ruoyi.cms.service.ICmsCategoryService;
*/ */
@Service @Service
public class CmsCategoryServiceImpl extends ServiceImpl<CmsCategoryMapper, CmsCategory> implements ICmsCategoryService { public class CmsCategoryServiceImpl extends ServiceImpl<CmsCategoryMapper, CmsCategory> implements ICmsCategoryService {
@Autowired @Resource
private Snowflake snowflake; private Snowflake snowflake;
@Autowired @Resource
private CmsContentMapper contentMapper; private CmsContentMapper contentMapper;
/** /**
@ -247,6 +249,17 @@ public class CmsCategoryServiceImpl extends ServiceImpl<CmsCategoryMapper, CmsCa
return new PageInfo<CmsContent>(contents); return new PageInfo<CmsContent>(contents);
} }
@Override
public PageInfo<CmsContent> getContentByIdPart(CmsContentQuery contentQuery) {
PageHelper.startPage(contentQuery.getPageNum(), contentQuery.getPageSize());
CmsContent content = new CmsContent();
content.setCategoryId(contentQuery.getCategoryId());
content.setStatus("1");
content.setDelFlag(0);
List<CmsContent> contents = contentMapper.selectCmsContentPart(content);
return new PageInfo<CmsContent>(contents);
}
/** /**
* 获取所有的叶子节点 * 获取所有的叶子节点
* *
@ -267,4 +280,12 @@ public class CmsCategoryServiceImpl extends ServiceImpl<CmsCategoryMapper, CmsCa
.eq("del_flag", 0); .eq("del_flag", 0);
})); }));
} }
/**
* 获取某个栏目的子栏目
*/
@Override
public List<CmsCategory> getCategoryIdByParentId(Long id){
return baseMapper.selectList(new QueryWrapper<CmsCategory>().eq("parent_id", id));
}
} }

View File

@ -181,4 +181,16 @@ public class CmsContentServiceImpl extends ServiceImpl<CmsContentMapper, CmsCont
); );
return list; return list;
} }
/**
* 二级栏目下的所有
*/
@Override
public List<CmsContent> selectCmsContentAllById(Long id){
CmsContent content = new CmsContent();
content.setCategoryId(id);
content.setDelFlag(0);
content.setStatus("1");
return baseMapper.selectCmsContentPart(content);
}
} }

View File

@ -101,6 +101,61 @@
where id = #{id} where id = #{id}
</select> </select>
<sql id="selectCmsContentVoNew">
select id,
category_id,
content_type,
image_url,
video_url,
content_title,
content_img,
source,
source_url,
original,
author,
editor,
summary,
status,
publish_date,
offline_date,
is_accessory,
accessory_url,
remark,
del_flag,
create_time,
create_by,
update_time,
update_by,
link_type,
link,
count
from cms_content
</sql>
<select id="selectCmsContentPart" resultMap="CmsContentResult">
<include refid="selectCmsContentVoNew"></include>
<where>
<if test="categoryId != null ">and category_id = #{categoryId}</if>
<if test="contentType != null ">and content_type = #{contentType}</if>
<if test="contentTitle != null and contentTitle != ''">and content_title like concat('%', #{contentTitle},
'%')
</if>
<if test="contentImg != null and contentImg != ''">and content_img = #{contentImg}</if>
<if test="source != null and source != ''">and source = #{source}</if>
<if test="sourceUrl != null and sourceUrl != ''">and source_url = #{sourceUrl}</if>
<if test="original != null ">and original = #{original}</if>
<if test="author != null and author != ''">and author = #{author}</if>
<if test="editor != null and editor != ''">and editor = #{editor}</if>
<if test="summary != null and summary != ''">and summary = #{summary}</if>
<if test="status != null ">and status = #{status}</if>
<if test="publishDate != null ">and publish_date = #{publishDate}</if>
<if test="offlineDate != null ">and offline_date = #{offlineDate}</if>
<if test="isAccessory != null ">and is_accessory = #{isAccessory}</if>
<if test="accessoryUrl != null and accessoryUrl != ''">and accessory_url = #{accessoryUrl}</if>
<if test="delFlag != null">and del_flag = #{delFlag}</if>
</where>
order by create_time desc, update_time desc
</select>
<insert id="insertCmsContent" parameterType="CmsContent"> <insert id="insertCmsContent" parameterType="CmsContent">
insert into cms_content insert into cms_content
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">

View File

@ -25,6 +25,15 @@ export function getinfo(data) {
}) })
} }
// 获取二级内容
export function getinfoPart(data) {
return request({
url: '/api/category/contentPart',
method: 'post',
data
})
}
export function getBaseInfo(){ export function getBaseInfo(){
return request({ return request({
url: "/api/baseInfo", url: "/api/baseInfo",

View File

@ -35,3 +35,10 @@ export function getListById(id){
method: "get" method: "get"
}) })
} }
export function getCategoryByParentId(id){
return request({
url: "/api/category/" + id,
method: "get"
})
}

View File

@ -1,7 +1,7 @@
<template> <template>
<div class="container"> <div class="container">
<div class="top-box"> <div class="top-box">
<headers :msg='Serial' ></headers> <headers></headers>
<div style="overflow: hidden;position: relative;" class="mySwiper"> <div style="overflow: hidden;position: relative;" class="mySwiper">
<swiper ref="mySwiper" :options="swiperOptions" style="width: 100%"> <swiper ref="mySwiper" :options="swiperOptions" style="width: 100%">
@ -27,18 +27,18 @@
<!-- new --> <!-- new -->
<div class="new-box"> <div class="new-box">
<div class="new-title"> <div class="new-title">
{{ indexList[0].categoryName }} {{ indexList[0].label }}
</div> </div>
<div class="new-gang"></div> <div class="new-gang"></div>
<div class="new-container"> <div class="new-container">
<div class="new-list"> <div class="new-list">
<div class="list-box" v-for="(item, index) in this.newList[0]" :key="index" @click="goDeatail(item)" > <div class="list-box" v-for="(item, index) in newList[0]" :key="index" @click="goDeatail(item)">
<div class="list-bs"> <div class="list-bs">
<img :src="item.contentImg" style=" "> <img :src="item.contentImg" style=" ">
<div class="new-wb">{{ item.contentTitle }}</div> <div class="new-wb">{{ item.contentTitle }}</div>
</div> </div>
<div class="list-bs" style="margin-top: 15px;"> <div class="list-bs" style="margin-top: 15px;">
<div class="icon-title">{{ indexList[0].categoryName }}</div> <div class="icon-title">{{ indexList[0].label }}</div>
<div class="time-">{{ parseTime(item.createTime, "{y}-{m}-{d}") }}</div> <div class="time-">{{ parseTime(item.createTime, "{y}-{m}-{d}") }}</div>
</div> </div>
</div> </div>
@ -60,12 +60,13 @@
</swiper-slide> </swiper-slide>
</swiper> </swiper>
<div class="swiper-pagination"></div> <div class="swiper-pagination"></div>
<div style=" width: 156px;height: 42px;position: absolute;bottom: 30px; z-index: 99 " @click="golist(indexList[0])" > <div style=" width: 156px;height: 42px;position: absolute;bottom: 30px; z-index: 99 "
<img src="../assets/gw/anniu.png" style=" width: 156px;height: 42px" > @click="golist(indexList[0])">
<img src="../assets/gw/anniu.png" style=" width: 156px;height: 42px">
</div> </div>
</div> </div>
<div class="new-list"> <div class="new-list">
<div class="list-box" v-for="(item, index) in this.newList[1]" :key="index" @click="goDeatail(item)" > <div class="list-box" v-for="(item, index) in newList[1]" :key="index" @click="goDeatail(item)">
<div class="list-bs"> <div class="list-bs">
<img :src="item.contentImg" style=""> <img :src="item.contentImg" style="">
<div class="new-wb">{{ item.contentTitle }}</div> <div class="new-wb">{{ item.contentTitle }}</div>
@ -78,71 +79,72 @@
</div> </div>
</div> </div>
</div> </div>
<div class="gongao"> <div class="gongao">
<div class="new-title"> <div class="new-title">
{{ indexList[1].categoryName }} {{ indexList[1].label }}
</div>
<div class="new-gang"></div>
<div class="list">
<swiper ref="mySwiper" :options="swiperOptions1" style="width: 100%">
<swiper-slide class="gongao-item" v-for="item in this.noticeList" @click="goDeatail(item)">
<div class="bj" @click="goDeatail(item)">
<div class="tt">{{ item.contentTitle }}</div>
<div class="p">
<div class="tags">
{{ indexList[1].categoryName }}
</div>
<div class="time">
{{ parseTime(item.createTime, "{y}-{m}-{d}") }}
</div>
</div>
<div class="desc">
{{ item.summary }}
</div>
</div>
</swiper-slide>
</swiper>
<div class="page">
<div class="swiper-button-prev"></div>
<div class="swiper-button-next"></div>
</div>
</div>
</div>
<div class="news11">
<div class="new-title">
{{ indexList[2].categoryName }}
</div>
<div class="new-gang"></div>
<div class="news11-list">
<div class="news11-list-item" v-for="(item, index) in this.xlist" :key="index" @click="goDeatails(item)">
<div class="img">
<div class="yl-right" v-if="item.imitationType == 1" > 国一流</div>
<div class="yl-right" v-if="item.imitationType == 2" > 省一流</div>
<img :src=" imgurl + item.imitationImage" class="imgWO" style="width: 100%; height: 100% ">
</div> </div>
<div class="tt"> <div class="new-gang"></div>
{{ item.imitationTitle }} <div class="list">
</div> <swiper ref="mySwiper" :options="swiperOptions1" style="width: 100%">
<div class="tags"> <swiper-slide class="gongao-item" v-for="item in noticeList" @click="goDeatail(item)">
<div class="p">{{ item.imitationSchool }} | {{item.imitationTeach}} </div> <div class="bj" @click="goDeatail(item)">
<div class="icon"><i class="el-icon-user"></i> <div class="tt">{{ item.contentTitle }}</div>
{{ item.imitationCount }} <div class="p">
<div class="tags">
{{ indexList[1].label }}
</div>
<div class="time">
{{ parseTime(item.createTime, "{y}-{m}-{d}") }}
</div>
</div>
<div class="desc">
{{ item.summary }}
</div>
</div>
</swiper-slide>
</swiper>
<div class="page">
<div class="swiper-button-prev"></div>
<div class="swiper-button-next"></div>
</div> </div>
</div> </div>
<div class="backmo"> </div>
<p>{{ item.imitationTitle }}</p>
<div style="color: #54a3fd">{{ item.imitationSchool }} | {{item.imitationTeach}}</div> <div class="news11">
<p class="psize"> {{item.imitationSummary}}</p> <div class="new-title">
{{ indexList[2].label }}
</div>
<div class="new-gang"></div>
<div class="news11-list">
<div class="news11-list-item" v-for="(item, index) in this.xlist" :key="index" @click="goDeatails(item)">
<div class="img">
<div class="yl-right" v-if="item.imitationType == 1" > 国一流</div>
<div class="yl-right" v-if="item.imitationType == 2" > 省一流</div>
<img :src=" imgurl + item.imitationImage" class="imgWO" style="width: 100%; height: 100% ">
</div>
<div class="tt">
{{ item.imitationTitle }}
</div>
<div class="tags">
<div class="p">{{ item.imitationSchool }} | {{item.imitationTeach}} </div>
<div class="icon"><i class="el-icon-user"></i>
{{ item.imitationCount }}
</div>
</div>
<div class="backmo">
<p>{{ item.imitationTitle }}</p>
<div style="color: #54a3fd">{{ item.imitationSchool }} | {{item.imitationTeach}}</div>
<p class="psize"> {{item.imitationSummary}}</p>
</div>
</div>
<!-- 动画-->
</div>
<div style=" width: 156px;height: 42px;margin: 50px auto;cursor: pointer" @click="godx()" >
<img src="../assets/gw/anniu.png" style=" width: 156px;height: 42px">
</div> </div>
</div> </div>
<!-- 动画-->
</div>
<div style=" width: 156px;height: 42px;margin: 50px auto;cursor: pointer" @click="godx()" >
<img src="../assets/gw/anniu.png" style=" width: 156px;height: 42px">
</div>
</div>
<footers></footers> <footers></footers>
</div> </div>
</template> </template>
@ -150,7 +152,7 @@
<script> <script>
import {Swiper, SwiperSlide} from "vue-awesome-swiper"; import {Swiper, SwiperSlide} from "vue-awesome-swiper";
import "swiper/css/swiper.min.css"; import "swiper/css/swiper.min.css";
import { getTab, getbanner, getBaseInfo, imitationList, imitationId } from '@/api/gw/home' import {getTab, getbanner, getBaseInfo, imitationList, imitationId, getinfo, getinfoPart} from '@/api/gw/home'
import headers from '@/views/officialWebsite/Components/header.vue' import headers from '@/views/officialWebsite/Components/header.vue'
import footers from '@/views/officialWebsite/Components/footer.vue' import footers from '@/views/officialWebsite/Components/footer.vue'
@ -162,39 +164,27 @@ export default {
footers footers
}, },
name: 'HelloWorld', name: 'HelloWorld',
props: { // props: {
msg: String // msg: String
}, // },
data() { data() {
return { return {
imgurl:process.env.VUE_APP_BASE_API, imgurl: process.env.VUE_APP_BASE_API,
Serial:0, Serial: 0,
baseInfo:"", baseInfo: "",
categoryQuery: { categoryQuery: {
categoryId: "", categoryId: "",
pageNum: 1, pageNum: 1,
pageSize: 10 pageSize: 10
}, },
input4:'', input4: '',
xlist:[], xlist: [],
indexList:[], indexList: [],
newList:[[], []], newList: [[], []],
noticeList: [], noticeList: [],
show_search: true, show_search: true,
nationalVirtualLass: [], nationalVirtualLass: [],
tablist: [ tablist: [
{name: '首页'},
{name: '中心概括'},
{name: '教学资源'},
{name: '教学平台'},
{name: '教学团队'},
{name: '专业委员会'},
{name: '教学研讨活动'},
{name: '虚仿专业频道'},
{name: '大赛风采'},
{name: '实践平台'},
{name: '合作企业'},
{name: '联系我们'},
], ],
bannerlist: [], bannerlist: [],
isMounted: false, isMounted: false,
@ -267,10 +257,11 @@ export default {
"http://124.221.227.225:1255/assets/banner.png", "http://124.221.227.225:1255/assets/banner.png",
"http://124.221.227.225:1255/assets/banner.png" "http://124.221.227.225:1255/assets/banner.png"
], ],
newList2: [],
} }
}, },
mounted() { mounted() {
console.log(this.$route.query.id) // console.log(this.$route.query.id)
// //
this.tabLsit(); this.tabLsit();
this.getWebBaseInfo() this.getWebBaseInfo()
@ -289,43 +280,41 @@ export default {
} }
}, },
methods: { methods: {
godx(){ godx() {
this.$router.push({ this.$router.push({
name: 'xufang', name: 'xufang',
query:{ id: '1813829868593483776' } query: {id: '1813829868593483776'}
}); });
}, },
golist(row){ golist(row) {
// console.log('',id) // console.log('',id)
console.log(row)
this.$router.push({ this.$router.push({
name: 'list', name: 'list',
query:{ id: row.id, categoryTitle: row.categoryName } query: {id: row.id, categoryTitle: row.label}
}); });
}, },
tabClick(item){ tabClick(item) {
if(item.label=="联系我们"){ if (item.label == "联系我们") {
this.$router.push('/contact'); this.$router.push('/contact');
} }
}, },
goDeatails(data){ goDeatails(data) {
imitationId(data.id).then(res=>{ imitationId(data.id).then(res => {
console.log(res,'调用成功') // console.log(res,'')
}) })
window.open(data.imitationLink, '_blank'); window.open(data.imitationLink, '_blank');
}, },
goDeatail(data){ goDeatail(data) {
console.log(data) // console.log(data)
if(data.linkType == 0){ if (data.linkType == 0) {
this.$router.push({ this.$router.push({
name: 'details', name: 'details',
query:{ id: data.id } query: {id: data.id}
}); });
} }
if(data.linkType == 1){ if (data.linkType == 1) {
imitationId(data.id).then(res=>{ imitationId(data.id).then(res => {
console.log(res,'调用成功')
}) })
window.open(data.link, '_blank'); window.open(data.link, '_blank');
} }
@ -335,45 +324,32 @@ export default {
getTab().then(response => { getTab().then(response => {
if (response.code == 200) { if (response.code == 200) {
this.tablist = response.data; this.tablist = response.data;
console.log('所有id',this.tablist) let indexIds = this.tablist[0].children;
this.categoryQuery.categoryId = this.tablist[0].id this.categoryQuery.categoryId = indexIds[3].id
getbanner(this.categoryQuery).then(res => { getinfo(this.categoryQuery).then(res => {
if (res.code == 200) { res.data.list.forEach(item => {
this.indexList = res.data this.bannerlist.push(process.env.VUE_APP_BASE_API + item.imageUrl)
console.log('indexList',this.indexList) })
res.data[3].children.list.forEach(item => { })
this.bannerlist.push(process.env.VUE_APP_BASE_API + item.imageUrl[0]) this.indexList = indexIds
}) this.categoryQuery.categoryId = indexIds[0].id
getinfoPart(this.categoryQuery).then(res => {
// res.data.list.forEach(item => {
let index = 0; item.contentImg = process.env.VUE_APP_BASE_API + item.contentImg
res.data[0].children.list.forEach(item => { })
item.contentImg = process.env.VUE_APP_BASE_API + item.contentImg this.newList[0] = res.data.list.slice(0, 4)
if (index < 4) { this.newList[1] = res.data.list.slice(4, 8)
this.newList[0].push(item) })
} else if (index < 8) { this.categoryQuery.categoryId = indexIds[1].id
this.newList[1].push(item) getinfoPart(this.categoryQuery).then(res => {
} this.noticeList = res.data.list
index += 1 })
})
console.log('newList',this.newList)
//
this.noticeList = res.data[1].children.list
//
this.nationalVirtualLass = res.data[2].children.list
console.log( '362', this.nationalVirtualLass)
this.nationalVirtualLass.forEach(item => {
item.contentImg = process.env.VUE_APP_BASE_API + item.contentImg
})
}
});
} }
}) })
}, },
getWebBaseInfo() { getWebBaseInfo() {
imitationList().then(res =>{ imitationList().then(res => {
console.log(res,'虚') // console.log(res,'')
var firstEightItems = res.rows.slice(0, 8); var firstEightItems = res.rows.slice(0, 8);
firstEightItems.forEach(item => { firstEightItems.forEach(item => {
this.xlist.push(item); this.xlist.push(item);
@ -421,7 +397,8 @@ export default {
height: 50px; height: 50px;
background: #fff; background: #fff;
} }
.logo-box img{
.logo-box img {
width: 50px; width: 50px;
height: 50px; height: 50px;
} }
@ -737,12 +714,15 @@ export default {
height: 240px; height: 240px;
background: #FFFFFF; background: #FFFFFF;
} }
.gongao .list .gongao-item .bj { .gongao .list .gongao-item .bj {
padding: 20px; padding: 20px;
} }
.bj:hover{
.bj:hover {
cursor: pointer; cursor: pointer;
} }
.gongao .list .gongao-item .tt { .gongao .list .gongao-item .tt {
font-size: 20px; font-size: 20px;
line-height: 28px; line-height: 28px;
@ -900,7 +880,7 @@ export default {
} }
.backmo{ .backmo {
width: 0%; width: 0%;
height: 0%; height: 0%;
position: absolute; position: absolute;
@ -920,7 +900,7 @@ export default {
margin-right: 10px; margin-right: 10px;
} }
.news11 .news11-list .news11-list-item:hover>.backmo { .news11 .news11-list .news11-list-item:hover > .backmo {
width: 100%; width: 100%;
height: 100%; height: 100%;
box-sizing: border-box; box-sizing: border-box;
@ -931,16 +911,18 @@ export default {
border-radius: 10px; border-radius: 10px;
} }
.news11 .news11-list .news11-list-item .img { .news11 .news11-list .news11-list-item .img {
width: 100%; width: 100%;
height: 194px; height: 194px;
border-radius: 10px ; border-radius: 10px;
overflow: hidden; overflow: hidden;
margin-bottom: 15px; margin-bottom: 15px;
position: relative; position: relative;
overflow: hidden; overflow: hidden;
} }
.yl-right{
.yl-right {
position: absolute; position: absolute;
background: #da4925; background: #da4925;
left: 0px; left: 0px;
@ -948,7 +930,7 @@ export default {
color: #fff; color: #fff;
border-radius: 0px 0px 10px 0px; border-radius: 0px 0px 10px 0px;
font-size: 12px; font-size: 12px;
padding: 5px ; padding: 5px;
} }
.news11 .news11-list .news11-list-item .img img { .news11 .news11-list .news11-list-item .img img {
@ -971,7 +953,8 @@ export default {
-webkit-line-clamp: 2; -webkit-line-clamp: 2;
/** 显示的行数 **/ /** 显示的行数 **/
} }
.psize{
.psize {
overflow: hidden; overflow: hidden;
/** 隐藏超出的内容 **/ /** 隐藏超出的内容 **/
word-break: break-all; word-break: break-all;

View File

@ -29,7 +29,7 @@
</div> </div>
</template> </template>
<script> <script>
import { getbanner, getBaseInfo, getTab } from '@/api/gw/home' import { getBaseInfo, getTab } from '@/api/gw/home'
export default { export default {
data() { data() {
@ -54,9 +54,6 @@ export default {
], ],
} }
}, },
props: {
msg: String
},
mounted() { mounted() {
// //
this.tabLsit(); this.tabLsit();

View File

@ -16,7 +16,7 @@
</template> </template>
<script> <script>
import {getPageData} from "@/api/officialWebsite/getPageData"; import {getinfoPart} from "@/api/gw/home";
export default { export default {
name: "index", name: "index",
@ -65,11 +65,14 @@ export default {
// console.log(1, this.queryParams) // console.log(1, this.queryParams)
// console.log(this.queryParams.pageNum) // console.log(this.queryParams.pageNum)
if (this.queryParams.categoryId !== ''){ if (this.queryParams.categoryId !== ''){
getPageData(this.queryParams).then(res => { getinfoPart(this.queryParams).then(res => {
// console.log('',res) if (res.data){
this.listinfo = res.data.list; this.listinfo = res.data.list;
this.total =res.data.total; this.total =res.data.total;
this.$emit('event-message', this.listinfo) this.$emit('event-message', this.listinfo)
}else{
this.$emit('event-message', [])
}
}) })
}else { }else {
this.$emit('event-message', []) this.$emit('event-message', [])

View File

@ -10,12 +10,12 @@
<!-- new --> <!-- new -->
<div class="navigation"> <div class="navigation">
<div class="content"> <div class="content">
<div class="left"> <img src="../../assets/gw/home.png" alt=""> <div class="left"><img src="../../assets/gw/home.png" alt="">
<p><a href="/gw">首页</a><i class="el-icon-arrow-right"></i> <span href="">中心概况</span></p> <p><a href="/gw">首页</a><i class="el-icon-arrow-right"></i> <span href="">中心概况</span></p>
</div> </div>
<div class="right"> <div class="right">
<div class="nav-item" v-for="(item, index) in nav" v-bind:class="[index === currentActive ? 'active' : '']" <div class="nav-item" v-for="(item, index) in nav" v-bind:class="[index === currentActive ? 'active' : '']"
@click="getCurrentActive(index)"> @click="getCurrentActive(index)">
{{ item.categoryName }} {{ item.categoryName }}
</div> </div>
</div> </div>
@ -25,72 +25,17 @@
<!-- main --> <!-- main -->
<div v-for="(item, index) in nav " :key=index> <div v-for="(item, index) in nav " :key=index>
<div class="about-conts-item1" v-if="currentActive == index && currentActive !== 1"> <div class="about-conts-item1" v-if="currentActive == index && currentActive !== 1">
<div class="neirong" v-html="pageContextList[index]"></div> <div class="neirong" v-html="pageContext"></div>
</div> </div>
<div class="about-conts-item1" v-if="currentActive == index && currentActive === 1"> <div class="about-conts-item1" v-if="currentActive == index && currentActive === 1">
<div class="dataClass"> <div class="dataClass">
<div v-for="(item, index) in dataList"> <div v-for="(item, index) in dataList">
{{item.contentTitle}} {{ item.contentTitle }}
</div>
</div> </div>
</div>
</div> </div>
</div> </div>
<!-- 中心简介 -->
<!-- <div class="about-conts-item1" v-if="currentActive == 0"> -->
<!-- <div class="neirong" v-html="content"></div> -->
<!-- </div> -->
<!-- 组织机构 -->
<!-- <div class="about-conts-item1" v-if="currentActive == 1"> -->
<!-- <div class="div" v-for="(item, index) in orgList">
{{ item.contentDetail }}
</div> -->
<!-- <div class="neirong" v-html="orgList"></div> -->
<!-- </div> -->
<!-- 现任领导 -->
<!-- <div class="about-conts-item1" v-if="currentActive == 2"> -->
<!-- <div class="about-conts-item3-div" v-for="postList">
<div class="left">
主任
</div>
<div class="right">
<div class="divs" v-for="(item, index) in 2">
<div class="img">
<img src="https://www.guanwenw.com/uploads/images/20240618/7cf62814ae1ceaaffb6a60b1f0a7075a.jpg" alt="">
</div>
<div class="tt">钟离</div>
</div>
</div>
</div> -->
<!-- <div class="about-conts-item3-div">
<div class="left">
主任
</div>
<div class="right">
<div class="divs" v-for="(item, index) in 1">
<div class="img">
<img src="https://www.guanwenw.com/uploads/images/20240618/7cf62814ae1ceaaffb6a60b1f0a7075a.jpg" alt="">
</div>
<div class="tt">钟离</div>
</div>
</div>
</div>
<div class="about-conts-item3-div">
<div class="left">
主任
</div>
<div class="right">
<div class="divs" v-for="(item, index) in 4">
<div class="img">
<img src="https://www.guanwenw.com/uploads/images/20240618/7cf62814ae1ceaaffb6a60b1f0a7075a.jpg" alt="">
</div>
<div class="tt">钟离</div>
</div>
</div>
</div> -->
<!-- <div class="neirong" v-html="leaderList"></div> -->
<!-- </div> -->
</div> </div>
<footers></footers> <footers></footers>
@ -98,9 +43,10 @@
</template> </template>
<script> <script>
import { Swiper, SwiperSlide } from "vue-awesome-swiper"; import {Swiper, SwiperSlide} from "vue-awesome-swiper";
import "swiper/css/swiper.min.css"; import "swiper/css/swiper.min.css";
import { getPageData, getPageColumn, getListById } from "@/api/officialWebsite/getPageData"; import { getListById, getCategoryByParentId} from "@/api/officialWebsite/getPageData";
import {getinfo} from "@/api/gw/home";
import headers from '@/views/officialWebsite/Components/header.vue' import headers from '@/views/officialWebsite/Components/header.vue'
import footers from '@/views/officialWebsite/Components/footer.vue' import footers from '@/views/officialWebsite/Components/footer.vue'
@ -122,38 +68,26 @@ export default {
data() { data() {
return { return {
dataList: [], dataList: [],
pageContextList: [], pageContext: "",
nav: [ nav: [
// { name: '' },
// { name: '' },
// { name: '' },
], ],
currentActive: 0, currentActive: 0,
isMounted: false, isMounted: false,
orgList: "", orgList: "",
postList: [], postList: [],
// content: `<p style="box-sizing: inherit; text-align: justify; text-indent: 2em; margin-bottom: 5px; margin-top: 5px; line-height: 1.75em;">
// <span style="font-family: , &quot;Microsoft YaHei&quot;; font-size: 18px;">20065000300<br/></span>
// </p>
// <p style="text-indent: 2em; margin-bottom: 5px; margin-top: 5px; line-height: 1.75em;">
// <span style="font-family: , &quot;Microsoft YaHei&quot;; font-size: 18px;">:220线:线</span>
// </p>
// <p style="text-indent: 2em; margin-bottom: 5px; margin-top: 5px; line-height: 1.75em;">
// <span style="font-family: , &quot;Microsoft YaHei&quot;; font-size: 18px;">广</span>
// </p>
// <p style="box-sizing: inherit; margin-top: 0px; text-align: justify; text-indent: 2em; margin-bottom: 5px; line-height: 1.75em;">
// <span style="box-sizing: inherit; font-family: , MicrosoftYaHei;"></span><br/>
// </p>`
content: "", content: "",
leaderList: "", leaderList: "",
queryForm:{
categoryId: this.$route.query.id || "",
pageNum: 1,
pageSize: 10
}
} }
}, },
computed: { computed: {},
},
mounted() { mounted() {
// //
debugger; // debugger;
this.initPageData(); this.initPageData();
}, },
@ -164,76 +98,31 @@ export default {
return return
} }
this.currentActive = value this.currentActive = value
if (value === 1){ if (value === 1) {
this.getContentByCategoryId(this.nav[value].id) this.getContentByCategoryId(this.nav[value].id)
}else {
this.getContent()
} }
}, },
getContentByCategoryId(id){ getContentByCategoryId(id) {
getListById(id).then(res => { getListById(id).then(res => {
this.dataList = res.data this.dataList = res.data
}) })
}, },
initPageData() { initPageData() {
console.log("123123", this.$route.query.id); getCategoryByParentId(this.queryForm.categoryId).then(res => {
this.nav = res.data
let routeParam = { if (this.currentActive === 0){
"categoryId": this.$route.query.id, this.getContent()
"pageNum": 1, }
"pageSize": 10 })
}
getPageColumn(routeParam).then(response => {
response.data.forEach(cloumnItem => {
this.nav.push(cloumnItem);
let context = "";
cloumnItem.children.list.forEach(element => {
context += element.contentDetail;
});
this.pageContextList.push(context);
// cloumnItem.categoryName
});
});
// let introduction_center_param = {
// "categoryId": "1813827591224823808",
// "pageNum": 1,
// "pageSize": 1000
// };
// getPageData(introduction_center_param).then(response => {
// response.data.list.forEach(element => {
// this.content += element.contentDetail;
// });
// });
// let organizational_structure_param = {
// "categoryId": "1813827750121836544",
// "pageNum": 1,
// "pageSize": 1000
// };
// getPageData(organizational_structure_param).then(response => {
// response.data.list.forEach(element => {
// // this.orgList.push(element);
// this.orgList += element.contentDetail;
// });
// });
// let current_leader_param = {
// "categoryId": "1813827861774209024",
// "pageNum": 1,
// "pageSize": 1000
// };
// getPageData(current_leader_param).then(response => {
// response.data.list.forEach(element => {
// this.leaderList += element.contentDetail;
// });
// });
}, },
getContent(){
this.queryForm.categoryId = this.nav[this.currentActive].id
getinfo(this.queryForm).then(res => {
this.pageContext = res.data.list[0].contentDetail
})
}
} }
} }
@ -519,7 +408,8 @@ export default {
/* align-items: center; */ /* align-items: center; */
} }
.index-footer .footer .logo .footer-contact {} .index-footer .footer .logo .footer-contact {
}
.index-footer .footer .logo .footer-contact .p { .index-footer .footer .logo .footer-contact .p {
display: inline-block; display: inline-block;
@ -629,11 +519,13 @@ export default {
line-height: 18px; line-height: 18px;
} }
.dataClass{
.dataClass {
display: grid; display: grid;
grid-template-columns: repeat(4, 1fr); grid-template-columns: repeat(4, 1fr);
gap: 10px; gap: 10px;
} }
.dataClass > div { .dataClass > div {
border: 1px solid black; border: 1px solid black;
font-size: 18px; font-size: 18px;

View File

@ -69,10 +69,10 @@
<script> <script>
import {Swiper, SwiperSlide} from "vue-awesome-swiper"; import {Swiper, SwiperSlide} from "vue-awesome-swiper";
import "swiper/css/swiper.min.css"; import "swiper/css/swiper.min.css";
import {getPageData, getPageColumn} from "@/api/officialWebsite/getPageData"; import {getPageData, getListById,getCategoryByParentId} from "@/api/officialWebsite/getPageData";
import headers from '@/views/officialWebsite/Components/header.vue' import headers from '@/views/officialWebsite/Components/header.vue'
import footers from '@/views/officialWebsite/Components/footer.vue' import footers from '@/views/officialWebsite/Components/footer.vue'
import {getTab, getbanner, getinfo} from "@/api/gw/home"; import {getTab, getinfo} from "@/api/gw/home";
import PageUtil from '@/views/officialWebsite/Components/page' import PageUtil from '@/views/officialWebsite/Components/page'
export default { export default {
@ -122,22 +122,13 @@ export default {
"pageNum": 1, "pageNum": 1,
"pageSize": 10 "pageSize": 10
} }
getPageColumn(routeParam).then(response => { getCategoryByParentId(routeParam.categoryId).then(res => {
// this.categoryId = response.data[0].id getListById(res.data[0].id).then(response => {
response.data.forEach(cloumnItem => { this.teachingAchievements = response.data
this.nav.push(cloumnItem); })
})
cloumnItem.children.list.forEach(element => {
this.teachingAchievements.push(element);
});
// cloumnItem.categoryName
});
});
}, },
handleDataFromPage(data){ handleDataFromPage(data){
// this.nav[this.currentActive].children.list = data
// console.log(data)
this.teachingAchievements = data this.teachingAchievements = data
} }
} }

View File

@ -36,14 +36,9 @@
<div> <div>
<div class="about-conts-item1" v-if="currentActive == 2"> <div class="about-conts-item1" v-if="currentActive == 2">
<div class="noticeRsr" v-html="twolist[0].contentDetail" > <div class="noticeRsr" v-html="twolist" >
<!-- <div >{{item.contentTitle}}</div>-->
<!-- <div >{{item.publishDate}}</div>-->
</div> </div>
</div> </div>
<!-- <div v-show="currentActive == 2">-->
<!-- <page-util :category-id="categoryId" @event-message="handleDataFromPage" />-->
<!-- </div>-->
<div class="about-conts-item1" v-if="currentActive == 1"> <div class="about-conts-item1" v-if="currentActive == 1">
<div class="dataClass"> <div class="dataClass">
<div v-for="(item, index) in dataList"> <div v-for="(item, index) in dataList">
@ -52,9 +47,6 @@
</div> </div>
</div> </div>
</div> </div>
<!-- <div v-show="currentActive !== 1 && currentActive !== 2">-->
<!-- -->
<!-- </div>-->
</div> </div>
<footers></footers> <footers></footers>
@ -64,7 +56,7 @@
<script> <script>
import { Swiper, SwiperSlide } from "vue-awesome-swiper"; import { Swiper, SwiperSlide } from "vue-awesome-swiper";
import "swiper/css/swiper.min.css"; import "swiper/css/swiper.min.css";
import {getPageData, getPageColumn, getListById} from "@/api/officialWebsite/getPageData"; import {getPageData, getCategoryByParentId, getListById} from "@/api/officialWebsite/getPageData";
import footers from '@/views/officialWebsite/Components/footer.vue' import footers from '@/views/officialWebsite/Components/footer.vue'
import headers from '@/views/officialWebsite/Components/header.vue' import headers from '@/views/officialWebsite/Components/header.vue'
import PageUtil from '@/views/officialWebsite/Components/page/index.vue' import PageUtil from '@/views/officialWebsite/Components/page/index.vue'
@ -94,7 +86,12 @@ export default {
], ],
currentActive: 0, currentActive: 0,
isMounted: false, isMounted: false,
input4: "" input4: "",
routeParam : {
"categoryId": this.$route.query.id,
"pageNum": 1,
"pageSize": 10
}
} }
}, },
created() { created() {
@ -106,23 +103,19 @@ export default {
}, },
methods: { methods: {
getContentDetail(){
this.routeParam.categoryId = this.nav[this.currentActive].id
getPageData(this.routeParam).then(res => {
this.twolist = res.data.list[0].contentDetail
})
},
handleDataFromPage(data){ handleDataFromPage(data){
console.log(data)
if (this.currentActive === 0){ if (this.currentActive === 0){
this.onelist = data this.onelist = data
} }
if (this.currentActive === 2){
this.twolist = data
}
// if (this.currentActive == 0){
// this.onelist = data
// }
// if (this.currentActive == 2){
// this.twolist = data
// }
}, },
goDeatail(data){ goDeatail(data){
// console.log(data)
if(data.linkType == 0){ if(data.linkType == 0){
this.$router.push({ this.$router.push({
name: 'details', name: 'details',
@ -140,16 +133,8 @@ export default {
}, },
// //
getCurrentActive(value) { getCurrentActive(value) {
// console.log(1,value, this.currentActive, this.categoryId) // if (value !== 1){
if (this.value !== 1){ // this.categoryId = this.nav[value].id
this.categoryId = this.nav[value].id
}
// console.log(2, this.currentActive, this.categoryId)
// if (this.currentActive === 0){
// this.categoryId = this.oneid
// }
// if (this.currentActive === 1){
// this.categoryId = this.twoid
// } // }
if (this.currentActive == value) { if (this.currentActive == value) {
return return
@ -158,37 +143,15 @@ export default {
if (value === 1){ if (value === 1){
this.getContentByCategoryId(this.nav[value].id) this.getContentByCategoryId(this.nav[value].id)
} }
if (value === 2){
this.getContentDetail()
}
}, },
initPageData() { initPageData() {
getCategoryByParentId(this.routeParam.categoryId).then(res => {
let routeParam = { this.nav = res.data
"categoryId": this.$route.query.id, this.categoryId = this.nav[0].id
"pageNum": 1, })
"pageSize": 10
}
getPageColumn(routeParam).then(response => {
console.log('routeParam',response)
this.onelist = response.data[0].children.list
this.oneid = response.data[0].id
this.twolist = response.data[2].children.list
this.twoid = response.data[2].id
this.categoryId = response.data[0].id
response.data.forEach(cloumnItem => {
this.nav.push(cloumnItem);
let context = "";
cloumnItem.children.list.forEach(element => {
context += element.contentDetail;
});
this.pageContextList.push(context);
// cloumnItem.categoryName
});
});
}, },
} }

View File

@ -211,25 +211,25 @@
</el-form> </el-form>
</div> </div>
<!-- main --> <!-- main -->
<div v-if="currentActive == 3" v-html="nav[currentActive].children.list[0].contentDetail"></div> <div v-show="currentActive == 3" v-html="pageContext"></div>
<div v-for="(item, index) in nav " :key=index> <div v-for="(item, index) in nav " :key=index>
<div class="about-conts-item1" v-if="currentActive == index"> <div class="about-conts-item1" v-show="currentActive == index">
<div v-if="currentActive == 0 || currentActive == 1 " class="neirong" v-html="pageContextList[index]"></div> <div v-show="currentActive == 0 || currentActive == 1 " class="neirong" v-html="pageContext"></div>
</div> </div>
</div> </div>
<div v-if="currentActive == 2 " class="wrapbox"> <div v-show="currentActive == 2 " class="wrapbox">
<div class="rsr" v-for="(item,index) in nav[currentActive].children.list" @click="goDeatail(item)" > <div class="rsr" v-for="(item,index) in otherList" @click="goDeatail(item)" >
<img :src=" imgurl + item.contentImg" style="width: 255px;height: 220px"> <img :src=" imgurl + item.contentImg" style="width: 255px;height: 220px">
<div class="size-t">{{item.contentTitle}}</div> <div class="size-t">{{item.contentTitle}}</div>
</div> </div>
</div> </div>
<div v-if="currentActive == 4 " class="wrapbox"> <div v-show="currentActive == 4 " class="wrapbox">
<div class="newRsr" v-for="(item,index) in nav[currentActive].children.list" @click="goDeatail(item)" > <div class="newRsr" v-for="(item,index) in otherList" @click="goDeatail(item)" >
<img :src=" imgurl + item.contentImg" style="width: 255px;height: 220px"> <img :src=" imgurl + item.contentImg" style="width: 255px;height: 220px">
<div class="size-t">{{item.contentTitle}}</div> <div class="size-t">{{item.contentTitle}}</div>
</div> </div>
</div> </div>
<div v-if="currentActive == 5 " class="wrapbox"> <div v-show="currentActive == 5 " class="wrapbox">
<div class="noticeRsr" v-for="(item,index) in noticeList" @click="goDeatail(item)" > <div class="noticeRsr" v-for="(item,index) in noticeList" @click="goDeatail(item)" >
<div >{{item.contentTitle}}</div> <div >{{item.contentTitle}}</div>
<div >{{item.publishDate}}</div> <div >{{item.publishDate}}</div>
@ -238,7 +238,7 @@
<div v-show="currentActive == 2 || currentActive == 4 || currentActive === 5" > <div v-show="currentActive == 2 || currentActive == 4 || currentActive === 5" >
<page-util :category-id="categoryId" @event-message="handleDataFromPage" /> <page-util :category-id="categoryId" @event-message="handleDataFromPage" />
</div> </div>
<div class="anniu" v-if="registerStatus == 1 && currentActive == 0" @click="toRegister" >去报名</div> <div class="anniu" v-show="registerStatus == 1 && currentActive == 0" @click="toRegister" >去报名</div>
</div> </div>
<footers></footers> <footers></footers>
@ -248,7 +248,7 @@
<script> <script>
import { Swiper, SwiperSlide } from "vue-awesome-swiper"; import { Swiper, SwiperSlide } from "vue-awesome-swiper";
import "swiper/css/swiper.min.css"; import "swiper/css/swiper.min.css";
import { getPageData, getPageColumn,getbaseInfo } from "@/api/officialWebsite/getPageData"; import { getPageData, getCategoryByParentId,getbaseInfo } from "@/api/officialWebsite/getPageData";
import footers from '@/views/officialWebsite/Components/footer.vue' import footers from '@/views/officialWebsite/Components/footer.vue'
import headers from '@/views/officialWebsite/Components/header.vue' import headers from '@/views/officialWebsite/Components/header.vue'
import PageUtil from '@/views/officialWebsite/Components/page' import PageUtil from '@/views/officialWebsite/Components/page'
@ -340,19 +340,20 @@ export default {
{ required: true, message: "邮寄地址不能为空", trigger: "blur" } { required: true, message: "邮寄地址不能为空", trigger: "blur" }
], ],
}, },
pageContextList: [], pageContext: '',
nav: [ nav: [
// { name: '' },
// { name: '' },
// { name: '' },
// { name: '' },
// { name: '' },
], ],
currentActive: 0, currentActive: 0,
isMounted: false, isMounted: false,
input4: "", input4: "",
categoryId: "", categoryId: "",
noticeList:[], noticeList:[],
routeParam : {
"categoryId": this.$route.query.id,
"pageNum": 1,
"pageSize": 10
},
otherList:[],
} }
}, },
mounted() { mounted() {
@ -408,40 +409,29 @@ export default {
if (value === 5){ if (value === 5){
this.categoryId = this.getNoticeId() this.categoryId = this.getNoticeId()
}else { }else if (value === 0 || value === 1 || value === 3) {
this.pageContext = ""
this.getContentDetail()
}else{
this.otherList = []
this.categoryId = this.nav[value].id; this.categoryId = this.nav[value].id;
} }
// console.log(this.nav,'nav' )
}, },
initPageData() { initPageData() {
getbaseInfo().then(res=>{ getbaseInfo().then(res=>{
this.registerStatus = res.data.registerStatus this.registerStatus = res.data.registerStatus
console.log(res,'5')
}) })
this.categoryId = this.$route.query.id this.categoryId = this.$route.query.id
// console.log(this.$route.query.id, this.categoryId) getCategoryByParentId(this.routeParam.categoryId).then(res => {
let routeParam = { this.nav = res.data
"categoryId": this.$route.query.id, this.getContentDetail()
"pageNum": 1, })
"pageSize": 10 },
} getContentDetail(){
getPageColumn(routeParam).then(response => { this.routeParam.categoryId = this.nav[this.currentActive].id
response.data.forEach(cloumnItem => { getPageData(this.routeParam).then(response => {
this.nav.push(cloumnItem); this.pageContext = response.data.list[0].contentDetail
})
let context = "";
cloumnItem.children.list.forEach(element => {
context += element.contentDetail;
});
this.pageContextList.push(context);
// cloumnItem.categoryName
});
});
}, },
getNoticeId(){ getNoticeId(){
getTab().then(res => { getTab().then(res => {
@ -450,14 +440,14 @@ export default {
"pageNum": 1, "pageNum": 1,
"pageSize": 10 "pageSize": 10
} }
getbanner(query).then(res => { getCategoryByParentId(query.categoryId).then(res => {
this.categoryId = res.data[1].id this.categoryId = res.data[1].id
}) })
}) })
}, },
handleDataFromPage(data){ handleDataFromPage(data){
if (this.currentActive === 2 || this.currentActive == 4){ if (this.currentActive === 2 || this.currentActive == 4){
this.nav[this.currentActive].children.list = data this.otherList = data
} }
if (this.currentActive === 5){ if (this.currentActive === 5){
this.noticeList = data this.noticeList = data

View File

@ -29,7 +29,7 @@
<div class="info-item" v-for="(item,index) in fourlist" :key="index"> <div class="info-item" v-for="(item,index) in fourlist" :key="index">
<img :src="imgurl + item.contentImg" alt=""> <img :src="imgurl + item.contentImg" alt="">
<div class="p">{{item.contentTitle}}</div> <div class="p">{{item.contentTitle}}</div>
<div class="desc" v-html="item.contentDetail"></div> <div class="desc" v-html="item.summary"></div>
</div> </div>
</div> </div>
@ -42,10 +42,10 @@
</template> </template>
<script> <script>
import { getTab, getbanner, getinfo } from "@/api/gw/home";
import { Swiper, SwiperSlide } from "vue-awesome-swiper"; import { Swiper, SwiperSlide } from "vue-awesome-swiper";
import "swiper/css/swiper.min.css"; import "swiper/css/swiper.min.css";
import { getPageData, getPageColumn } from "@/api/officialWebsite/getPageData"; import {getCategoryByParentId} from "@/api/officialWebsite/getPageData";
import {getinfo} from "@/api/gw/home";
import footers from '@/views/officialWebsite/Components/footer.vue' import footers from '@/views/officialWebsite/Components/footer.vue'
import headers from '@/views/officialWebsite/Components/header.vue' import headers from '@/views/officialWebsite/Components/header.vue'
export default { export default {
@ -95,16 +95,23 @@ export default {
"pageNum": 1, "pageNum": 1,
"pageSize": 10 "pageSize": 10
} }
debugger; getCategoryByParentId(routeParam.categoryId).then(res => {
getPageColumn(routeParam).then(response => { routeParam.categoryId = res.data[0].id
debugger; getinfo(routeParam).then(response => {
this.fourlist = response.data.list
response.data[0].children.list.forEach(cloumnItem => { })
this.fourlist.push(cloumnItem); })
// getinfoPart(routeParam).then(res => {
// cloumnItem.categoryName // console.log(res.data)
}); // })
}); // getPageColumn(routeParam).then(response => {
//
// response.data[0].children.list.forEach(cloumnItem => {
// this.fourlist.push(cloumnItem);
//
// // cloumnItem.categoryName
// });
// });
}, },
} }

View File

@ -33,7 +33,7 @@
<script> <script>
import { Swiper, SwiperSlide } from "vue-awesome-swiper"; import { Swiper, SwiperSlide } from "vue-awesome-swiper";
import "swiper/css/swiper.min.css"; import "swiper/css/swiper.min.css";
import { getContent, getPageColumn } from "@/api/officialWebsite/getPageData"; import { getContent } from "@/api/officialWebsite/getPageData";
import headers from '@/views/officialWebsite/Components/header.vue' import headers from '@/views/officialWebsite/Components/header.vue'
import footers from '@/views/officialWebsite/Components/footer.vue' import footers from '@/views/officialWebsite/Components/footer.vue'
@ -88,20 +88,20 @@ export default {
this.currentActive = value this.currentActive = value
}, },
initPageData() { initPageData() {
console.log("文章", this.$route.query.id); // console.log("", this.$route.query.id);
let id = this.$route.query.id let id = this.$route.query.id
getContent(id).then(response => { getContent(id).then(response => {
console.log(response) // console.log(response)
this.info = response.data; this.info = response.data;
if(response.data.contentType == 0){ if(response.data.contentType == 0){
console.log('文章') // console.log('')
} }
if(response.data.contentType == 1){ if(response.data.contentType == 1){
console.log('图片') // console.log('')
} }
if(response.data.contentType == 2){ if(response.data.contentType == 2){
console.log('视频') // console.log('')
} }
}); });

View File

@ -33,7 +33,7 @@
<script> <script>
import { Swiper, SwiperSlide } from "vue-awesome-swiper"; import { Swiper, SwiperSlide } from "vue-awesome-swiper";
import "swiper/css/swiper.min.css"; import "swiper/css/swiper.min.css";
import { getPageData, getPageColumn } from "@/api/officialWebsite/getPageData"; import { getPageData, } from "@/api/officialWebsite/getPageData";
import headers from '@/views/officialWebsite/Components/header.vue' import headers from '@/views/officialWebsite/Components/header.vue'
import footers from '@/views/officialWebsite/Components/footer.vue' import footers from '@/views/officialWebsite/Components/footer.vue'
@ -85,7 +85,7 @@ export default {
methods: { methods: {
goDeatail(data){ goDeatail(data){
console.log(data) // console.log(data)
if(data.linkType == 0){ if(data.linkType == 0){
this.$router.push({ this.$router.push({
name: 'details', name: 'details',
@ -111,7 +111,7 @@ export default {
// console.log(this.queryParams) // console.log(this.queryParams)
if (!this.queryParams.categoryId) return; if (!this.queryParams.categoryId) return;
getPageData(this.queryParams).then(res => { getPageData(this.queryParams).then(res => {
console.log('列表',res) // console.log('',res)
this.listinfo = res.data.list; this.listinfo = res.data.list;
this.total =res.data.total; this.total =res.data.total;
}) })

View File

@ -22,13 +22,13 @@
</div> </div>
</div> </div>
<div class="news"> <div class="news">
<div v-if="currentActive == 0"> <div v-show="currentActive == 0">
<div class="noticeRsr" v-for="(item,index) in onelist" @click="goDeatail(item)" > <div class="noticeRsr" v-for="(item,index) in onelist" @click="goDeatail(item)" >
<div >{{item.contentTitle}}</div> <div >{{item.contentTitle}}</div>
<div >{{item.publishDate}}</div> <div >{{item.publishDate}}</div>
</div> </div>
</div> </div>
<div v-if="currentActive == 1"> <div class="noticeRsr" v-for="(item,index) in twolist" @click="goDeatail(item)" > <div v-show="currentActive == 1"> <div class="noticeRsr" v-for="(item,index) in twolist" @click="goDeatail(item)" >
<div >{{item.contentTitle}}</div> <div >{{item.contentTitle}}</div>
<div >{{item.publishDate}}</div> <div >{{item.publishDate}}</div>
</div></div> </div></div>
@ -50,7 +50,7 @@
<script> <script>
import { Swiper, SwiperSlide } from "vue-awesome-swiper"; import { Swiper, SwiperSlide } from "vue-awesome-swiper";
import "swiper/css/swiper.min.css"; import "swiper/css/swiper.min.css";
import { getPageData, getPageColumn } from "@/api/officialWebsite/getPageData"; import { getPageData, getCategoryByParentId } from "@/api/officialWebsite/getPageData";
import footers from '@/views/officialWebsite/Components/footer.vue' import footers from '@/views/officialWebsite/Components/footer.vue'
import headers from '@/views/officialWebsite/Components/header.vue' import headers from '@/views/officialWebsite/Components/header.vue'
import PageUtil from '@/views/officialWebsite/Components/page' import PageUtil from '@/views/officialWebsite/Components/page'
@ -83,7 +83,7 @@ export default {
} }
}, },
mounted() { created() {
// //
this.initPageData(); this.initPageData();
}, },
@ -106,12 +106,7 @@ export default {
return return
} }
this.currentActive = value this.currentActive = value
if (this.currentActive === 0){ this.categoryId = this.nav[value].id
this.categoryId = this.oneid
}
if (this.currentActive === 1){
this.categoryId = this.twoid
}
}, },
goDeatail(data){ goDeatail(data){
// console.log(data) // console.log(data)
@ -131,28 +126,10 @@ export default {
"pageNum": 1, "pageNum": 1,
"pageSize": 10 "pageSize": 10
} }
getCategoryByParentId(routeParam.categoryId).then(res => {
getPageColumn(routeParam).then(response => { this.nav = res.data
console.log(response,"97") this.categoryId = res.data[0].id
this.onelist = response.data[0].children.list })
this.oneid = response.data[0].id
this.twolist = response.data[1].children.list
this.twoid = response.data[1].id
this.categoryId = response.data[0].id
response.data.forEach(cloumnItem => {
this.nav.push(cloumnItem);
let context = "";
cloumnItem.children.list.forEach(element => {
context += element.contentDetail;
});
this.pageContextList.push(context);
// cloumnItem.categoryName
});
});
}, },
} }

View File

@ -26,7 +26,7 @@
<!-- main --> <!-- main -->
<div v-for="(item, index) in nav " :key=index> <div v-for="(item, index) in nav " :key=index>
<div class="about-conts-item1" v-show="currentActive == 1"> <div class="about-conts-item1" v-show="currentActive == 1">
<div class="neirong" v-html="pageContextList[1]"></div> <div class="neirong" v-html="pageContext"></div>
</div> </div>
</div> </div>
<!-- 专业平台介绍 --> <!-- 专业平台介绍 -->
@ -66,7 +66,7 @@
<script> <script>
import { Swiper, SwiperSlide } from "vue-awesome-swiper"; import { Swiper, SwiperSlide } from "vue-awesome-swiper";
import "swiper/css/swiper.min.css"; import "swiper/css/swiper.min.css";
import { getPageData, getPageColumn } from "@/api/officialWebsite/getPageData"; import { getPageData, getCategoryByParentId } from "@/api/officialWebsite/getPageData";
import footers from '@/views/officialWebsite/Components/footer.vue' import footers from '@/views/officialWebsite/Components/footer.vue'
import headers from '@/views/officialWebsite/Components/header.vue' import headers from '@/views/officialWebsite/Components/header.vue'
import PageUtil from '@/views/officialWebsite/Components/page/index.vue' import PageUtil from '@/views/officialWebsite/Components/page/index.vue'
@ -88,7 +88,7 @@ export default {
categoryId:'', categoryId:'',
onelist:[], onelist:[],
dataList: [], dataList: [],
pageContextList: [], pageContext:"",
nav: [ nav: [
// { name: '' }, // { name: '' },
// { name: '' }, // { name: '' },
@ -97,10 +97,14 @@ export default {
isMounted: false, isMounted: false,
professionalResources: "", professionalResources: "",
content: "", content: "",
routeParam : {
"categoryId": this.$route.query.id,
"pageNum": 1,
"pageSize": 10
}
} }
}, },
mounted() { created() {
// //
this.initPageData(); this.initPageData();
}, },
@ -121,7 +125,7 @@ export default {
} }
}, },
handleDataFromPage(data){ handleDataFromPage(data){
console.log(data) // console.log(data)
this.onelist = data this.onelist = data
}, },
// //
@ -130,32 +134,22 @@ export default {
return return
} }
this.currentActive = value this.currentActive = value
if (value === 1){
this.getContentDetail();
}
},
getContentDetail() {
this.routeParam.categoryId = this.nav[this.currentActive].id
getPageData(this.routeParam).then(response => {
console.log(response)
this.pageContext = response.data.list[0].contentDetail
})
}, },
initPageData() { initPageData() {
getCategoryByParentId(this.routeParam.categoryId).then(res => {
let routeParam = { this.nav = res.data
"categoryId": this.$route.query.id, this.categoryId = res.data[0].id
"pageNum": 1, })
"pageSize": 10
}
getPageColumn(routeParam).then(response => {
console.log(response,'119')
this.onelist = response.data[0].children.list
this.categoryId = response.data[0].id
response.data.forEach(cloumnItem => {
this.nav.push(cloumnItem);
let context = "";
cloumnItem.children.list.forEach(element => {
context += element.contentDetail;
});
this.pageContextList.push(context);
// cloumnItem.categoryName
});
});
}, },
} }

View File

@ -38,37 +38,9 @@
</div> </div>
</div> </div>
<!-- 实践项目 -->
<!-- <div v-else-if="currentActive === 2" class="swiper-list">-->
<!-- <div class="item" v-for="(item, index) in teachingAchievements2" :key="index">-->
<!-- <div class="img">-->
<!-- <img :src="imgurl + item.contentImg" alt="" class="imgWO">-->
<!-- </div>-->
<!-- <div class="tt">{{ item.contentTitle }}</div>-->
<!-- <div class="desc">-->
<!-- {{ item.summary }}-->
<!-- </div>-->
<!-- <div class="time">{{ item.publishDate }}</div>-->
<!-- </div>-->
<!-- </div>-->
<!-- 自制仪器设备 -->
<!-- <div v-else-if="currentActive === 3" class="swiper-list">-->
<!-- <div class="item" v-for="(item, index) in teachingAchievements3" :key="index">-->
<!-- <div class="img">-->
<!-- <img :src="imgurl + item.contentImg" alt="">-->
<!-- </div>-->
<!-- <div class="tt">{{ item.contentTitle }}</div>-->
<!-- &lt;!&ndash; <div class="desc">-->
<!-- {{ item.summary }}-->
<!-- </div> &ndash;&gt;-->
<!-- </div>-->
<!-- </div>-->
<!-- 通用 --> <!-- 通用 -->
<div class="neirong" v-html="pageContextList[index]" v-else></div> <div class="neirong" v-html="pageContext" v-else></div>
<!-- 详情数据穿透 --> <!-- 详情数据穿透 -->
<div class="team" v-if="currentActive == 999 && isShowDetails"> <div class="team" v-if="currentActive == 999 && isShowDetails">
@ -152,7 +124,7 @@
<script> <script>
import { Swiper, SwiperSlide } from "vue-awesome-swiper"; import { Swiper, SwiperSlide } from "vue-awesome-swiper";
import "swiper/css/swiper.min.css"; import "swiper/css/swiper.min.css";
import { getPageData, getPageColumn } from "@/api/officialWebsite/getPageData"; import { getPageData, getCategoryByParentId } from "@/api/officialWebsite/getPageData";
import footers from '@/views/officialWebsite/Components/footer.vue' import footers from '@/views/officialWebsite/Components/footer.vue'
import headers from '@/views/officialWebsite/Components/header.vue' import headers from '@/views/officialWebsite/Components/header.vue'
import PageUtil from '@/views/officialWebsite/Components/page' import PageUtil from '@/views/officialWebsite/Components/page'
@ -176,7 +148,7 @@ export default {
teachingAchievements: [], teachingAchievements: [],
teachingAchievements2: [], teachingAchievements2: [],
teachingAchievements3: [], teachingAchievements3: [],
pageContextList: [], pageContext: "",
categoryId: "", categoryId: "",
pageNum: 1, pageNum: 1,
input4: "", input4: "",
@ -201,6 +173,11 @@ export default {
<p style="box-sizing: inherit; margin-top: 0px; text-align: justify; text-indent: 2em; margin-bottom: 5px; line-height: 1.75em;"> <p style="box-sizing: inherit; margin-top: 0px; text-align: justify; text-indent: 2em; margin-bottom: 5px; line-height: 1.75em;">
<span style="box-sizing: inherit; font-family: 微软雅黑, MicrosoftYaHei;"></span><br/> <span style="box-sizing: inherit; font-family: 微软雅黑, MicrosoftYaHei;"></span><br/>
</p>`, </p>`,
routeParam : {
"categoryId": this.$route.query.id,
"pageNum": 1,
"pageSize": 10
}
} }
}, },
mounted() { mounted() {
@ -230,45 +207,16 @@ export default {
this.isShowDetails = false; this.isShowDetails = false;
}, },
initPageData() { initPageData() {
getCategoryByParentId(this.routeParam.categoryId).then(res => {
let routeParam = { this.nav = res.data
"categoryId": this.$route.query.id, this.getContentDetail()
"pageNum": 1, })
"pageSize": 10 },
} getContentDetail(){
getPageColumn(routeParam).then(response => { this.routeParam.categoryId = this.nav[this.currentActive].id
response.data.forEach(cloumnItem => { getPageData(this.routeParam).then(response => {
this.nav.push(cloumnItem); this.pageContext = response.data.list[0].contentDetail
})
let context = "";
cloumnItem.children.list.forEach(element => {
context += element.contentDetail;
});
this.pageContextList.push(context);
// //
// if (cloumnItem.id == "1813831828977618944") {
// cloumnItem.children.list.forEach(element => {
// this.teachingAchievements.push(element);
// });
// }
// //
// if (cloumnItem.id == "1813831932748894208") {
// cloumnItem.id
// cloumnItem.children.list.forEach(element => {
// this.teachingAchievements2.push(element);
// });
// }
// //
// if (cloumnItem.id == "1813832045458231296") {
// cloumnItem.children.list.forEach(element => {
// this.teachingAchievements3.push(element);
// });
// }
// cloumnItem.categoryName
});
});
}, },
handleDataFromPage(data){ handleDataFromPage(data){
if (this.currentActive !== 0){ if (this.currentActive !== 0){

View File

@ -24,14 +24,14 @@
<div class="teaching" v-bind:class="[currentActive == 0 ? 'bj' : '']"> <div class="teaching" v-bind:class="[currentActive == 0 ? 'bj' : '']">
<!-- main --> <!-- main -->
<div class="wrap-box"> <div class="wrap-box">
<div class="box-l" v-if="currentActive == 0" v-for="(item,index) in onelist" :key="index"> <div class="box-l" v-if="currentActive == 0" v-for="(item,index) in dataList" :key="index">
<div class="img-s"> <div class="img-s">
<img :src="imgurl+item.contentImg" style="width: 100%;height: 195px;"> <img :src="imgurl+item.contentImg" style="width: 100%;height: 195px;">
</div> </div>
<div class="kuang"> <div class="kuang">
<div class="time_">{{item.publishDate}}</div> <div class="time_">{{item.publishDate}}</div>
<div class="size_">{{item.contentTitle}}</div> <div class="size_">{{item.contentTitle}}</div>
<div class="d-s" style="justify-content: space-between"> <div class="d-s" style="justify-content: right ">
<!-- <el-button type="primary" style="background:#015375 " >在线预览</el-button>--> <!-- <el-button type="primary" style="background:#015375 " >在线预览</el-button>-->
<el-button @click="goDeatail(item)" >查看详情</el-button> <el-button @click="goDeatail(item)" >查看详情</el-button>
@ -39,14 +39,14 @@
</div> </div>
</div> </div>
</div> </div>
<div class="box-l" v-if="currentActive == 1" v-for="(item,index) in twolist" :key="index"> <div class="box-l" v-if="currentActive == 1" v-for="(item,index) in dataList" :key="index">
<div class="img-s"> <div class="img-s">
<img :src="imgurl+item.contentImg" style="width: 100%;height: 195px;"> <img :src="imgurl+item.contentImg" style="width: 100%;height: 195px;">
</div> </div>
<div class="kuang"> <div class="kuang">
<div class="time_">{{item.publishDate}}</div> <div class="time_">{{item.publishDate}}</div>
<div class="size_">{{item.contentTitle}}</div> <div class="size_">{{item.contentTitle}}</div>
<div class="d-s" style="justify-content: space-between"> <div class="d-s" style="justify-content: right">
<!-- <el-button type="primary" style="background:#015375 " >在线预览</el-button>--> <!-- <el-button type="primary" style="background:#015375 " >在线预览</el-button>-->
<el-button @click="goDeatail(item)" >查看详情</el-button> <el-button @click="goDeatail(item)" >查看详情</el-button>
@ -54,14 +54,14 @@
</div> </div>
</div> </div>
</div> </div>
<div class="box-l" v-if="currentActive == 2" v-for="(item,index) in threelist" :key="index"> <div class="box-l" v-if="currentActive == 2" v-for="(item,index) in dataList" :key="index">
<div class="img-s"> <div class="img-s">
<img :src="imgurl+item.contentImg" style="width: 100%;height: 195px;"> <img :src="imgurl+item.contentImg" style="width: 100%;height: 195px;">
</div> </div>
<div class="kuang"> <div class="kuang">
<div class="time_">{{item.publishDate}}</div> <div class="time_">{{item.publishDate}}</div>
<div class="size_">{{item.contentTitle}}</div> <div class="size_">{{item.contentTitle}}</div>
<div class="d-s" style="justify-content: space-between"> <div class="d-s" style="justify-content: right">
<!-- <el-button type="primary" style="background:#015375 " >在线预览</el-button>--> <!-- <el-button type="primary" style="background:#015375 " >在线预览</el-button>-->
<el-button @click="goDeatail(item)" >查看详情</el-button> <el-button @click="goDeatail(item)" >查看详情</el-button>
@ -81,7 +81,7 @@
<script> <script>
import { Swiper, SwiperSlide } from "vue-awesome-swiper"; import { Swiper, SwiperSlide } from "vue-awesome-swiper";
import "swiper/css/swiper.min.css"; import "swiper/css/swiper.min.css";
import { getPageData, getPageColumn } from "@/api/officialWebsite/getPageData"; import { getPageData, getCategoryByParentId } from "@/api/officialWebsite/getPageData";
import footers from '@/views/officialWebsite/Components/footer.vue' import footers from '@/views/officialWebsite/Components/footer.vue'
import headers from '@/views/officialWebsite/Components/header.vue' import headers from '@/views/officialWebsite/Components/header.vue'
@ -120,10 +120,15 @@ export default {
resourceSharing: "", resourceSharing: "",
guideBook: "", guideBook: "",
syllabus: "", syllabus: "",
routeParam : {
"categoryId": this.$route.query.id,
"pageNum": 1,
"pageSize": 10
},
dataList: [],
} }
}, },
mounted() { created() {
// //
this.initPageData(); this.initPageData();
}, },
@ -145,15 +150,7 @@ export default {
} }
}, },
handleDataFromPage(data){ handleDataFromPage(data){
if (this.currentActive == 0){ this.dataList = data
this.onelist = data
}
if (this.currentActive == 1){
this.twolist = data
}
if (this.currentActive == 2){
this.threelist = data
}
}, },
// //
getCurrentActive(value) { getCurrentActive(value) {
@ -161,71 +158,14 @@ export default {
return return
} }
this.currentActive = value this.currentActive = value
this.categoryId = this.nav[value].id
this.dataList = []
}, },
initPageData() { initPageData() {
getCategoryByParentId(this.routeParam.categoryId).then(res => {
let routeParam = { this.nav = res.data
"categoryId": this.$route.query.id, this.categoryId = this.nav[0].id
"pageNum": 1, })
"pageSize": 10
}
getPageColumn(routeParam).then(response => {
console.log(response)
this.onelist = response.data[0].children.list
this.oneid = response.data[0].id
this.twolist = response.data[1].children.list
this.twoid = response.data[1].id
this.threelist = response.data[2].children.list
this.threeid = response.data[2].id
this.categoryId = response.data[0].id
response.data.forEach(cloumnItem => {
this.nav.push(cloumnItem);
let context = "";
cloumnItem.children.list.forEach(element => {
context += element.contentDetail;
});
this.pageContextList.push(context);
// cloumnItem.categoryName
});
});
// //
// let resourceSharingParam = {
// "categoryId": "1816771402032877568",
// "pageNum": 1,
// "pageSize": 10
// }
// getPageData(resourceSharingParam).then(response => {
// response.data.list.forEach(element => {
// this.resourceSharing += element.contentDetail;
// });
// })
// //
// let guideBookParam = {
// "categoryId": "1813828546838269952",
// "pageNum": 1,
// "pageSize": 10
// }
// getPageData(guideBookParam).then(response => {
// response.data.list.forEach(element => {
// this.guideBook += element.contentDetail;
// });
// })
// //
// let syllabusParam = {
// "categoryId": "1813828322673692672",
// "pageNum": 1,
// "pageSize": 10
// }
// getPageData(syllabusParam).then(response => {
// response.data.list.forEach(element => {
// this.syllabus += element.contentDetail;
// });
// })
}, },
} }

View File

@ -50,13 +50,7 @@
<div class="team" v-if="currentActive == 0"> <div class="team" v-if="currentActive == 0">
<div class="tt">教学团队</div> <div class="tt">教学团队</div>
<div class="team-list"> <div class="team-list">
<div v-html="teachingTeam[0].contentDetail"></div> <div v-html="teachingTeam"></div>
<!-- <div class="item" v-for="(item, index) in teachingTeam" :key="index">-->
<!-- <div class="img">-->
<!-- <img :src="imgurl + item.contentImg" alt="" class="imgWO">-->
<!-- </div>-->
<!-- <div class="tts">{{ item.contentTitle }}</div>-->
<!-- </div>-->
</div> </div>
</div> </div>
@ -78,7 +72,7 @@
<script> <script>
import { Swiper, SwiperSlide } from "vue-awesome-swiper"; import { Swiper, SwiperSlide } from "vue-awesome-swiper";
import "swiper/css/swiper.min.css"; import "swiper/css/swiper.min.css";
import { getPageData, getPageColumn } from "@/api/officialWebsite/getPageData"; import {getCategoryByParentId, getPageData} from "@/api/officialWebsite/getPageData";
import footers from '@/views/officialWebsite/Components/footer.vue' import footers from '@/views/officialWebsite/Components/footer.vue'
import headers from '@/views/officialWebsite/Components/header.vue' import headers from '@/views/officialWebsite/Components/header.vue'
import PageUtil from "@/views/officialWebsite/Components/page" import PageUtil from "@/views/officialWebsite/Components/page"
@ -108,7 +102,12 @@ export default {
], ],
currentActive: 0, currentActive: 0,
isMounted: false, isMounted: false,
categoryId: "0" categoryId: "",
routeParam : {
"categoryId": this.$route.query.id,
"pageNum": 1,
"pageSize": 10
}
} }
}, },
created() { created() {
@ -137,48 +136,18 @@ export default {
} }
}, },
initPageData() { initPageData() {
getCategoryByParentId(this.routeParam.categoryId).then(res => {
let routeParam = { this.nav = res.data
"categoryId": this.$route.query.id, this.routeParam.categoryId = this.nav[0].id
"pageNum": 1, getPageData(this.routeParam).then(response => {
"pageSize": 10 this.teachingTeam = response.data.list[0].contentDetail
} })
getPageColumn(routeParam).then(response => { })
response.data.forEach(cloumnItem => {
this.nav.push(cloumnItem);
//
if (cloumnItem.id == "1816773589098172416") {
cloumnItem.children.list.forEach(element => {
this.teachingAchievements.push(element);
});
}
//
if (cloumnItem.id == "1816773517664980992") {
cloumnItem.children.list.forEach(element => {
this.teachingTeam.push(element);
});
}
// cloumnItem.categoryName
});
});
}, },
handleDataFromPage(data){ handleDataFromPage(data){
if (this.currentActive !== 0){ if (this.currentActive !== 0){
this.teachingAchievements = data this.teachingAchievements = data
} }
// if (this.currentActive === 2 || this.currentActive == 4){
// this.nav[this.currentActive].children.list = data
// }
// if (this.currentActive === 5){
// this.noticeList = data
// }
}, },
} }

View File

@ -61,7 +61,6 @@
<script> <script>
import { Swiper, SwiperSlide } from "vue-awesome-swiper"; import { Swiper, SwiperSlide } from "vue-awesome-swiper";
import "swiper/css/swiper.min.css"; import "swiper/css/swiper.min.css";
import { getPageData, getPageColumn } from "@/api/officialWebsite/getPageData";
import { getTab, getbanner, getBaseInfo, imitationList, imitationId } from '@/api/gw/home' import { getTab, getbanner, getBaseInfo, imitationList, imitationId } from '@/api/gw/home'
import headers from '@/views/officialWebsite/Components/header.vue' import headers from '@/views/officialWebsite/Components/header.vue'
import footers from '@/views/officialWebsite/Components/footer.vue' import footers from '@/views/officialWebsite/Components/footer.vue'
@ -137,7 +136,7 @@ export default {
goDeatail(data){ goDeatail(data){
imitationId(data.id).then(res=>{ imitationId(data.id).then(res=>{
console.log(res,'调用成功') // console.log(res,'')
}) })
window.open(data.imitationLink, '_blank'); window.open(data.imitationLink, '_blank');
@ -163,33 +162,6 @@ export default {
"pageNum": 1, "pageNum": 1,
"pageSize": 10 "pageSize": 10
} }
getPageColumn(routeParam).then(response => {
response.data.forEach(cloumnItem => {
this.nav.push(cloumnItem);
let context = "";
cloumnItem.children.list.forEach(element => {
context += element.contentDetail;
});
this.pageContextList.push(context);
//
if (cloumnItem.id == "1818243334464999424") {
if (cloumnItem.children) {
//
// this.topSwiperData = cloumnItem.children.list[0];
//
for (let i = 0; i < cloumnItem.children.list.length; i++) {
this.teachingAchievements.push(cloumnItem.children.list[i]);
};
}
}
// cloumnItem.categoryName
});
});
}, },
} }