This commit is contained in:
愉快的大福 2024-08-13 18:57:38 +08:00
parent 8cae219306
commit 4ad941d8d9
14 changed files with 240 additions and 257 deletions

View File

@ -48,6 +48,8 @@ public class CmsContent extends BaseEntity
/** 内容 */
@Excel(name = "内容")
private String contentDetail;
//标签名称
private String tagName;
/** 来源 */
@Excel(name = "来源")

View File

@ -95,7 +95,9 @@ token:
# 令牌密钥
secret: abcdefghijklmnopqrstuvwxyz
# 令牌有效期默认30分钟
expireTime: 30
expireTime: 999999999
## MyBatis配置
#mybatis:

View File

@ -17,6 +17,7 @@
<result property="author" column="author"/>
<result property="editor" column="editor"/>
<result property="summary" column="summary"/>
<result property="tagName" column="tag_name"/>
<result property="status" column="status"/>
<result property="publishDate" column="publish_date"/>
<result property="offlineDate" column="offline_date"/>
@ -53,6 +54,7 @@
author,
editor,
summary,
tag_name,
status,
publish_date,
offline_date,
@ -111,6 +113,7 @@
content_img,
source,
source_url,
tag_name,
original,
author,
editor,
@ -170,6 +173,7 @@
<if test="original != null and original != ''">original,</if>
<if test="author != null and author != ''">author,</if>
<if test="editor != null and editor != ''">editor,</if>
<if test="tagName != null and tagName != ''">tag_name,</if>
<if test="summary != null and summary != ''">summary,</if>
<if test="status != null and status != ''">status,</if>
<if test="publishDate != null">publish_date,</if>
@ -199,6 +203,7 @@
<if test="original != null and original != ''">#{original},</if>
<if test="author != null and author != ''">#{author},</if>
<if test="editor != null and editor != ''">#{editor},</if>
<if test="tagName != null and tagName != ''">#{tagName},</if>
<if test="summary != null and summary != ''">#{summary},</if>
<if test="status != null and status != ''">#{status},</if>
<if test="publishDate != null">#{publishDate},</if>
@ -236,6 +241,7 @@
source_url = #{sourceUrl},
original = #{original},
author = #{author},
tag_name = #{tagName},
editor = #{editor},
summary = #{summary},
status = #{status},

View File

@ -115,7 +115,7 @@ public class SecurityConfig
// 静态资源可匿名访问
.antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**").permitAll()
.antMatchers("/swagger-ui.html", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**").permitAll()
.antMatchers("/api/**", "/ueditor/**","/system/dict/data/type/sys_user_sex").permitAll()
.antMatchers("/api/**", "/ueditor/**","/system/dict/data/type/sys_user_sex","/system/dict/data/type/imitation_type").permitAll()
// 除上面外的所有请求全部需要鉴权认证
.anyRequest().authenticated();
})

View File

@ -150,7 +150,7 @@ public class TokenService
loginUser.setExpireTime(loginUser.getLoginTime() + expireTime * MILLIS_MINUTE);
// 根据uuid将loginUser缓存
String userKey = getTokenKey(loginUser.getToken());
redisCache.setCacheObject(userKey, loginUser, expireTime, TimeUnit.MINUTES);
redisCache.setCacheObject(userKey, loginUser);
}
/**

View File

@ -1,4 +1,5 @@
import request from '@/utils/request'
import {imitationId} from "@/api/gw/home";
// 查询字典数据列表
export function listData(query) {
@ -24,7 +25,22 @@ export function getDicts(dictType) {
method: 'get'
})
}
export function goDeatail(data) {
if (data.linkType == 0) {
const routeUrl = this.$router.resolve({ name: 'details', query: {id: data.link} });
window.open(routeUrl.href);
}
if (data.linkType == 1) {
imitationId(data.id).then(res => {
})
window.open(data.link);
}
if (data.linkType == 2) {
const routeUrl = this.$router.resolve({ name: 'details', query: {id: data.id} });
window.open(routeUrl.href);
}
}
// 新增字典数据
export function addData(data) {
return request({

View File

@ -16,7 +16,7 @@ import { download } from '@/utils/request'
import './assets/icons' // icon
import './permission' // permission control
import { getDicts } from "@/api/system/dict/data";
import {getDicts, goDeatail} from "@/api/system/dict/data";
import { getConfigKey } from "@/api/system/config";
import { parseTime, resetForm, addDateRange, selectDictLabel, selectDictLabels, handleTree } from "@/utils/ruoyi";
// 分页组件
@ -52,7 +52,7 @@ Vue.prototype.selectDictLabel = selectDictLabel
Vue.prototype.selectDictLabels = selectDictLabels
Vue.prototype.download = download
Vue.prototype.handleTree = handleTree
Vue.prototype.goDeatail = goDeatail
// 全局组件挂载
Vue.component('DictTag', DictTag)
Vue.component('Pagination', Pagination)

View File

@ -53,20 +53,7 @@
style="width: 200px"
@keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item prop="contentType">
<el-select
v-model="queryParams.contentType"
placeholder="内容类型"
clearable
style="width: 125px">
<el-option
v-for="dict in dict.type.cms_content_type"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item prop="status">
<el-select
v-model="queryParams.status"
@ -96,11 +83,14 @@
@selection-change="handleSelectionChange">
<el-table-column type="selection" width="50" align="center"/>
<el-table-column label="内容标题" align="center" prop="contentTitle"/>
<el-table-column label="内容类型" align="center" prop="contentType">
<el-table-column label="封面图" align="center" prop="contentImg">
<template slot-scope="scope">
<dict-tag :options="dict.type.cms_content_type" :value="scope.row.contentType"/>
<ImagePreview :src="scope.row.contentImg"></ImagePreview>
</template>
</el-table-column>
<el-table-column label="标签" align="center" prop="tagName"/>
<el-table-column label="状态" align="center" prop="status">
<template slot-scope="scope">
<dict-tag :options="dict.type.cms_content_status" :value="scope.row.status"/>
@ -143,16 +133,23 @@
:disabled="scope.row.status !== '1'"
@click="handleOffline(scope.row)">下线</el-button>
</span>
<el-dropdown size="small">
<el-link :underline="false" class="row-more-btn" icon="el-icon-more"></el-link>
<el-dropdown-menu slot="dropdown">
<!-- 修改-->
<el-dropdown-item icon="el-icon-edit" @click.native="handleEdit(scope.row)">修改</el-dropdown-item>
<!-- 删除-->
<el-dropdown-item icon="el-icon-delete" @click.native="handleDelete(scope.row)">删除</el-dropdown-item>
<!-- 下线-->
</el-dropdown-menu>
</el-dropdown>
<span class="btn-cell-wrap">
<el-button
size="small"
type="text"
icon="el-icon-edit"
@click="handleEdit(scope.row)">修改</el-button>
</span>
<span class="btn-cell-wrap">
<el-button
size="small"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)">删除</el-button>
</span>
</template>
</el-table-column>
</el-table>

View File

@ -2,7 +2,7 @@
<div class="app-container">
<el-row>
<el-col :span="24">
<div class="grid-btn-bar bg-purple-white">
<div style="margin-bottom: 5px" class="grid-btn-bar bg-purple-white">
<el-button plain type="success" size="mini" icon="el-icon-edit" @click="handlerSaveBefore">保存</el-button>
<el-button plain type="primary" size="mini" icon="el-icon-s-promotion" @click="handlePublish">发布</el-button>
</div>
@ -10,95 +10,6 @@
</el-row>
<el-row class="art-editor-container" :gutter="10">
<el-form ref="form" :model="form" :rules="rules" label-width="110px">
<el-col :span="16">
<el-row>
<el-col class="pr10" style="margin: 15px 0 20px 0 ">
<el-card shadow="always" class="card-title">
<div class="art-title bg-purple-white">
<el-form-item label="内容标题" prop="contentTitle">
<el-input
v-model="form.contentTitle"
maxlength="360"
show-word-limit>
</el-input>
</el-form-item>
</div>
<div class="art-title bg-purple-white">
<el-form-item label="简介" prop="summary">
<el-input
v-model="form.summary"
maxlength="360"
show-word-limit>
</el-input>
</el-form-item>
</div>
<div class="art-title bg-purple-white">
<el-form-item label="链接类型" prop="linkType">
<el-radio-group v-model="form.linkType" @change="handleChangeLinkType">
<el-radio-button
v-for="dict in dict.type.cms_link_type"
:key="dict.value"
:label="dict.value"
>
{{ dict.label }}
</el-radio-button>
</el-radio-group>
</el-form-item>
</div>
<div v-if="linkType === '0'" class="art-title bg-purple-white">
<el-form-item label="链接地址" prop="link">
<el-cascader
v-model="chooseValue"
:options="linkList"
@change="handleChange"></el-cascader>
</el-form-item>
</div>
<div v-if="linkType === '1'" class="art-title bg-purple-white">
<el-form-item label="链接地址" prop="link">
<el-input
v-model="form.link"
maxlength="360"
placeholder="http(s)://"
show-word-limit>
</el-input>
</el-form-item>
</div>
<div class="art-title bg-purple-white">
<el-form-item label="内容类型" prop="contentType">
<el-radio-group v-model="form.contentType" @change="handleChangeType">
<el-radio-button
v-for="dict in dict.type.cms_content_type"
:key="dict.value"
:label="dict.value"
>
{{ dict.label }}
</el-radio-button>
</el-radio-group>
</el-form-item>
</div>
</el-card>
</el-col>
</el-row>
<el-row>
<el-col class="pr10">
<el-card shadow="always" class="card-editor">
<div v-show="isType === '0'" class="content bg-purple-white">
<vue-ueditor-wrap v-model="form.contentDetail"
editor-id="editor"
:config="editorConfig"
:editorDependencies="['ueditor.config.js','ueditor.all.js']"
/>
</div>
<div v-show="isType === '1'" class="content bg-purple-white btn-add-image">
<image-upload v-model="form.imageUrl"/>
</div>
<div v-show="isType === '2'" class="content bg-purple-white btn-add-image">
<video-upload v-model="form.videoUrl"></video-upload>
</div>
</el-card>
</el-col>
</el-row>
</el-col>
<el-col :span="8">
<div class="bg-purple-white">
<el-card shadow="always">
@ -114,36 +25,122 @@
</el-option>
</el-select>
</el-form-item>
<el-form-item label="缩略图" prop="contentImg">
<el-form-item label="标题" prop="contentTitle">
<el-input
type="textarea"
v-model="form.contentTitle"
maxlength="360"
show-word-limit>
</el-input>
</el-form-item>
<el-form-item label="封面图" prop="contentImg">
<image-upload :limit="1" v-model="form.contentImg"></image-upload>
</el-form-item>
<el-form-item label="作者" prop="author">
<el-input v-model="form.author"/>
</el-form-item>
<el-form-item label="编辑" prop="editor">
<el-input v-model="form.editor"/>
</el-form-item>
<!-- <el-form-item label="原创" prop="original">-->
<!-- <el-switch-->
<!-- v-model="form.original"-->
<!-- active-value="0"-->
<!-- inactive-value="1"-->
<!-- ></el-switch>-->
<!-- <el-form-item label="作者" prop="author">-->
<!-- <el-input v-model="form.author"/>-->
<!-- </el-form-item>-->
<el-form-item label="来源" prop="source">
<el-input v-model="form.source"/>
</el-form-item>
<el-form-item label="来源地址" prop="sourceUrl">
<el-input v-model="form.sourceUrl" placeholder="http(s)://"/>
</el-form-item>
<el-form-item label="附件" prop="accessoryUrl">
<file-upload v-model="form.accessoryUrl"/>
</el-form-item>
<!-- <el-form-item label="编辑" prop="editor">-->
<!-- <el-input v-model="form.editor"/>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="来源" prop="source">-->
<!-- <el-input v-model="form.source"/>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="来源地址" prop="sourceUrl">-->
<!-- <el-input v-model="form.sourceUrl" placeholder="http(s)://"/>-->
<!-- </el-form-item>-->
<div class="art-title bg-purple-white">
<el-form-item label="标签" prop="tagName">
<el-input
v-model="form.tagName"
maxlength="8"
show-word-limit>
</el-input>
</el-form-item>
</div>
<div class="art-title bg-purple-white">
<el-form-item label="简介" prop="summary">
<el-input
type="textarea"
v-model="form.summary"
maxlength="360"
show-word-limit>
</el-input>
</el-form-item>
</div>
<!-- <el-form-item label="附件" prop="accessoryUrl">-->
<!-- <file-upload v-model="form.accessoryUrl"/>-->
<!-- </el-form-item>-->
<div class="art-title bg-purple-white">
<el-form-item label="内容类型" prop="linkType">
<el-radio-group v-model="form.linkType" @change="handleChangeLinkType">
<el-radio-button
v-for="dict in dict.type.cms_link_type"
:key="dict.value"
:label="dict.value"
>
{{ dict.label }}
</el-radio-button>
</el-radio-group>
</el-form-item>
</div>
<div v-if="linkType === '0'" class="art-title bg-purple-white">
<el-form-item label="链接地址" prop="link">
<el-cascader
v-model="chooseValue"
:options="linkList"
@change="handleChange"></el-cascader>
</el-form-item>
</div>
<div v-if="linkType === '1'" class="art-title bg-purple-white">
<el-form-item label="链接地址" prop="link">
<el-input
v-model="form.link"
maxlength="360"
placeholder="http(s)://"
show-word-limit>
</el-input>
</el-form-item>
</div>
<!-- <div class="art-title bg-purple-white">-->
<!-- <el-form-item label="内容类型" prop="contentType">-->
<!-- <el-radio-group v-model="form.contentType" @change="handleChangeType">-->
<!-- <el-radio-button-->
<!-- v-for="dict in dict.type.cms_content_type"-->
<!-- :key="dict.value"-->
<!-- :label="dict.value"-->
<!-- >-->
<!-- {{ dict.label }}-->
<!-- </el-radio-button>-->
<!-- </el-radio-group>-->
<!-- </el-form-item>-->
<!-- </div>-->
</el-tab-pane>
</el-tabs>
</el-card>
</div>
</el-col>
<el-col :span="16">
<el-row>
<el-col class="pr10">
<el-card shadow="always" v-show="linkType === '2'" class="card-editor">
<div class="content bg-purple-white">
<vue-ueditor-wrap v-model="form.contentDetail"
editor-id="editor"
:config="editorConfig"
:editorDependencies="['ueditor.config.js','ueditor.all.js']"
/>
</div>
<!-- <div v-show="isType === '1'" class="content bg-purple-white btn-add-image">-->
<!-- <image-upload v-model="form.imageUrl"/>-->
<!-- </div>-->
<!-- <div v-show="isType === '2'" class="content bg-purple-white btn-add-image">-->
<!-- <video-upload v-model="form.videoUrl"></video-upload>-->
<!-- </div>-->
</el-card>
</el-col>
</el-row>
</el-col>
</el-form>
</el-row>
</div>
@ -209,7 +206,7 @@ export default {
status: '0',
isAccessory: '0',
accessoryUrl: [],
linkType: "0",
linkType: "2",
link: ''
},
rules: {
@ -226,7 +223,7 @@ export default {
UEDITOR_CORS_URL: '/static/UEditorPlus/',
},
categoryList: "",
linkType: "0",
linkType: "2",
linkList: [],
}
},
@ -251,7 +248,7 @@ export default {
isAccessory: '0',
accessoryUrl: [],
id: "",
linkType: "0",
linkType: "2",
link: ''
}
},

View File

@ -1,10 +1,10 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="课程标题" prop="imitationTitle">
<el-form-item label="课程名称" prop="imitationTitle">
<el-input
v-model="queryParams.imitationTitle"
placeholder="请输入课程标题"
placeholder="请输入课程名称"
clearable
@keyup.enter.native="handleQuery"
/>
@ -17,24 +17,24 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="课程老师" prop="imitationTeach">
<el-form-item label="老师" prop="imitationTeach">
<el-input
v-model="queryParams.imitationTeach"
placeholder="请输入课程老师"
placeholder="请输入老师"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="课程学校" prop="imitationSchool">
<el-form-item label="学校" prop="imitationSchool">
<el-input
v-model="queryParams.imitationSchool"
placeholder="请输入课程学校"
placeholder="请输入学校"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="课程类别" prop="imitationType">
<el-select v-model="queryParams.imitationType" placeholder="请选择课程类别" clearable>
<el-form-item label="类别" prop="imitationType">
<el-select v-model="queryParams.imitationType" placeholder="请选择类别" clearable>
<el-option
v-for="dict in dict.type.imitation_type"
:key="dict.value"
@ -97,18 +97,18 @@
<el-table v-loading="loading" :data="imitationList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="课程标题" align="center" prop="imitationTitle" />
<el-table-column label="课程名称" align="center" prop="imitationTitle" />
<el-table-column :show-overflow-tooltip="true" label="课程简介" align="center" prop="imitationSummary" />
<el-table-column label="课程老师" align="center" prop="imitationTeach" />
<el-table-column label="课程学校" align="center" prop="imitationSchool" />
<el-table-column label="老师" align="center" prop="imitationTeach" />
<el-table-column label="学校" align="center" prop="imitationSchool" />
<el-table-column label="课程链接" align="center" prop="imitationLink" />
<el-table-column label="课程阅览量" align="center" prop="imitationCount" />
<el-table-column label="课程类别" align="center" prop="imitationType">
<el-table-column label="类别" align="center" prop="imitationType">
<template slot-scope="scope">
<dict-tag :options="dict.type.imitation_type" :value="scope.row.imitationType"/>
</template>
</el-table-column>
<el-table-column label="缩略图" align="center" prop="imitationImage" width="100">
<el-table-column label="封面图" align="center" prop="imitationImage" width="100">
<template slot-scope="scope">
<image-preview :src="scope.row.imitationImage" :width="50" :height="50"/>
</template>
@ -144,22 +144,25 @@
<!-- 添加或修改虚仿真课对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="课程标题" prop="imitationTitle">
<el-form-item label="课程名称" prop="imitationTitle">
<el-input v-model="form.imitationTitle" placeholder="请输入课程标题" />
</el-form-item>
<el-form-item label="封面图" prop="imitationImage">
<image-upload :limit="1" v-model="form.imitationImage"/>
</el-form-item>
<el-form-item label="课程简介" prop="imitationSummary">
<el-input v-model="form.imitationSummary" placeholder="请输入课程简介" />
</el-form-item>
<el-form-item label="课程老师" prop="imitationTeach">
<el-form-item label="老师" prop="imitationTeach">
<el-input v-model="form.imitationTeach" placeholder="请输入课程老师" />
</el-form-item>
<el-form-item label="课程学校" prop="imitationSchool">
<el-form-item label="学校" prop="imitationSchool">
<el-input v-model="form.imitationSchool" placeholder="请输入课程学校" />
</el-form-item>
<el-form-item label="课程链接" prop="imitationLink">
<el-input v-model="form.imitationLink" placeholder="请输入课程链接" />
</el-form-item>
<el-form-item label="课程类别" prop="imitationType">
<el-form-item label="类别" prop="imitationType">
<el-select v-model="form.imitationType" placeholder="请选择课程类别">
<el-option
v-for="dict in dict.type.imitation_type"
@ -169,9 +172,6 @@
></el-option>
</el-select>
</el-form-item>
<el-form-item label="缩略图" prop="imitationImage">
<image-upload :limit="1" v-model="form.imitationImage"/>
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" placeholder="请输入备注" />
</el-form-item>
@ -299,7 +299,7 @@ export default {
handleAdd() {
this.reset();
this.open = true;
this.title = "添加虚仿真课";
this.title = "添加";
},
/** 修改按钮操作 */
handleUpdate(row) {
@ -308,7 +308,7 @@ export default {
getImitation(id).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改虚仿真课";
this.title = "修改";
});
},
/** 提交按钮 */

View File

@ -5,8 +5,8 @@
<div style="overflow: hidden;position: relative;" class="mySwiper">
<swiper ref="mySwiper" :options="swiperOptions" style="width: 100%">
<swiper-slide v-for="(item,index) in bannerlist" :key="index">
<img ref="swiperImg" style="width: 100%; height: 1000px" :src="item"/>
<swiper-slide v-for="(item,index) in bannerlist" :key="index">
<img @click="goDeatail(item)" ref="swiperImg" style="width: 100%; height: 1000px" :src="item.imgUrl"/>
</swiper-slide>
</swiper>
@ -27,26 +27,26 @@
<!-- new -->
<div class="new-box">
<div class="new-title">
{{ indexList[0].label }}
{{ indexList[1].label||'' }}
</div>
<div class="new-gang"></div>
<div class="new-container">
<div class="new-list">
<div class="list-box" v-for="(item, index) in newList[0]" :key="index" @click="goDeatail(item)">
<div class="list-box" v-for="(item, index) in newList1" :key="index" @click="goDeatail(item)">
<div class="list-bs">
<img :src="item.contentImg" style=" ">
<div class="new-wb">{{ item.contentTitle }}</div>
</div>
<div class="list-bs" style="margin-top: 15px;">
<div class="icon-title">{{ indexList[0].label }}</div>
<div class="icon-title" v-if="item.tagName">{{ item.tagName||'' }}</div>
<div class="time-">{{ parseTime(item.createTime, "{y}-{m}-{d}") }}</div>
</div>
</div>
</div>
<div class="new-banner">
<swiper ref="mySwiper" :options="swiperOptions2" style="width: 100%">
<swiper-slide class="banner-box" v-for="(item, index) in [...this.newList[0], ...this.newList[1]]">
<div>
<swiper-slide class="banner-box" v-for="(item, index) in [...this.newList1, ...this.newList2]">
<div @click="goDeatail(item)">
<img :src="item.contentImg" style="">
<div class="list-bs">
<div class="banner-title">{{ item.contentTitle }}</div>
@ -61,18 +61,18 @@
</swiper>
<div class="swiper-pagination"></div>
<div style=" width: 156px;height: 42px;position: absolute;bottom: 30px; z-index: 99 "
@click="golist(indexList[0])">
@click="golist(indexList[1])">
<img src="../assets/gw/anniu.png" style=" width: 156px;height: 42px">
</div>
</div>
<div class="new-list">
<div class="list-box" v-for="(item, index) in newList[1]" :key="index" @click="goDeatail(item)">
<div class="list-box" v-for="(item, index) in newList2" :key="index" @click="goDeatail(item)">
<div class="list-bs">
<img :src="item.contentImg" style="">
<div class="new-wb">{{ item.contentTitle }}</div>
</div>
<div class="list-bs" style="margin-top: 15px;">
<div class="icon-title">{{ indexList[0].categoryName }}</div>
<div class="icon-title" v-if="item.tagName">{{ item.tagName }}</div>
<div class="time-">{{ parseTime(item.createTime, "{y}-{m}-{d}") }}</div>
</div>
</div>
@ -81,7 +81,7 @@
</div>
<div class="gongao">
<div class="new-title">
{{ indexList[1].label }}
{{ indexList[2].label||'' }}
</div>
<div class="new-gang"></div>
<div class="list">
@ -91,7 +91,7 @@
<div class="tt">{{ item.contentTitle }}</div>
<div class="p">
<div class="tags">
{{ indexList[1].label }}
{{ indexList[2].label||'' }}
</div>
<div class="time">
{{ parseTime(item.createTime, "{y}-{m}-{d}") }}
@ -114,14 +114,13 @@
<div class="news11">
<div class="new-title">
{{ indexList[2].label }}
{{ indexList[3].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>
<div class="yl-right" > <dict-tag :options="dict.type.imitation_type" :value="item.imitationType"/></div>
<img :src=" imgurl + item.imitationImage" class="imgWO" style="width: 100%; height: 100% ">
</div>
<div class="tt">
@ -164,6 +163,7 @@ export default {
footers
},
name: 'HelloWorld',
dicts: ['imitation_type'],
// props: {
// msg: String
// },
@ -179,8 +179,15 @@ export default {
},
input4: '',
xlist: [],
indexList: [],
newList: [[], []],
indexList: [
{},
{},
{},
{},
{}
],
newList1: [],
newList2: [],
noticeList: [],
show_search: true,
nationalVirtualLass: [],
@ -257,7 +264,6 @@ export default {
"http://124.221.227.225:1255/assets/banner.png",
"http://124.221.227.225:1255/assets/banner.png"
],
newList2: [],
}
},
mounted() {
@ -269,8 +275,6 @@ export default {
computed: {
customswiper() {
let swiper;
// @4.1.1 使 .$swiper
// @3.1.3 .swiper
if (this.isMounted) swiper = this.$refs.mySwiper.$swiper;
return swiper;
},
@ -299,58 +303,53 @@ export default {
}
},
goDeatails(data) {
imitationId(data.id).then(res => {
// console.log(res,'')
})
window.open(data.imitationLink, '_blank');
},
goDeatail(data) {
// console.log(data)
if (data.linkType == 0) {
this.$router.push({
name: 'details',
query: {id: data.id}
});
}
if (data.linkType == 1) {
imitationId(data.id).then(res => {
})
window.open(data.link, '_blank');
}
window.open(data.imitationLink);
},
/** 顶部tab列表 */
tabLsit() {
getTab().then(response => {
if (response.code == 200) {
this.tablist = response.data;
let indexIds = this.tablist[0].children;
this.categoryQuery.categoryId = indexIds[3].id
getinfo(this.categoryQuery).then(res => {
getinfo(
{categoryId:indexIds[0].id,
pageNum: 1,
pageSize: 10}).then(res => {
res.data.list.forEach(item => {
this.bannerlist.push(process.env.VUE_APP_BASE_API + item.imageUrl)
this.bannerlist.push({
imgUrl:process.env.VUE_APP_BASE_API + item.contentImg,
link:item.link,
linkType:item.linkType,
id:item.id
})
})
})
this.indexList = indexIds
this.categoryQuery.categoryId = indexIds[0].id
getinfoPart(this.categoryQuery).then(res => {
getinfoPart({categoryId:indexIds[1].id,
pageNum: 1,
pageSize: 10}).then(res => {
res.data.list.forEach(item => {
item.contentImg = process.env.VUE_APP_BASE_API + item.contentImg
})
this.newList[0] = res.data.list.slice(0, 4)
this.newList[1] = res.data.list.slice(4, 8)
this.newList1 = res.data.list.slice(0, 4)
this.newList2 = res.data.list.slice(4, 8)
})
this.categoryQuery.categoryId = indexIds[1].id
getinfoPart(this.categoryQuery).then(res => {
getinfoPart({categoryId:indexIds[2].id,
pageNum: 1,
pageSize: 10}).then(res => {
this.noticeList = res.data.list
})
}
})
},
getWebBaseInfo() {
imitationList().then(res => {
// console.log(res,'')
var firstEightItems = res.rows.slice(0, 8);
imitationList({pageNum:1,pageSize:8}).then(res => {
var firstEightItems = res.rows;
firstEightItems.forEach(item => {
this.xlist.push(item);
});

View File

@ -73,6 +73,7 @@ export default {
this.baseInfo = res.data
this.baseInfo.webImg = process.env.VUE_APP_BASE_API + this.baseInfo.webImg
})
},
toTop(){
window.scrollTo({ top: 0, behavior: 'smooth' });

View File

@ -13,43 +13,15 @@
<div class="left"><img src="../../assets/gw/home.png" alt="">
<p><span href="/">首页</span><i class="el-icon-arrow-right"></i> <span href="">合作企业</span></p>
</div>
<!-- <div class="nav-item" v-for="(item, index) in nav" v-bind:class="[index === currentActive ? 'active' : '']"
@click="getCurrentActive(index)">
{{ item.categoryName }}
</div> -->
</div>
</div>
<div class="list">
<!-- main -->
<!-- <div v-for="(item, index) in nav " :key=index>
<div class="about-conts-item1" v-if="currentActive == index">
<div class="neirong" v-html="pageContextList[index]"></div>
</div>
</div> -->
<!-- 教学成果 -->
<!-- <div class="ayptjs" >
<div class="tt">教学成果</div>
<div class="ayptjs-list">
<div class="item" v-for="(item, index) in teachingAchievements" :key="index" @click="showDetails(item)">
<div class="img">
<img :src="imgurl + item.contentImg" alt="">
<img src="../../assets/gw/Snipaste_2024-07-23_22-51-23.jpg" alt="">
</div>
<div class="text">
<div class="tts">{{ item.contentTitle }}</div>
<div class="desc">
<div class="desc" v-html="item.summary"></div>
</div>
</div>
</div>
</div>
</div> -->
<div class="item" v-for="(item, index) in teachingAchievements" :key="index">
<div class="img">
<img :src="imgurl + item.imageUrl" alt="">
<img :src="imgurl + item.contentImg" alt="">
</div>
<div class="tt">{{ item.contentTitle }}</div>

View File

@ -54,7 +54,7 @@ export default {
},
data() {
return {
info:null,
info:{},
imgurl:process.env.VUE_APP_BASE_API,
pageContextList: [],
nav: [],
@ -72,7 +72,6 @@ export default {
},
mounted() {
//
debugger;
this.initPageData();
},
@ -94,15 +93,7 @@ export default {
getContent(id).then(response => {
// console.log(response)
this.info = response.data;
if(response.data.contentType == 0){
// console.log('')
}
if(response.data.contentType == 1){
// console.log('')
}
if(response.data.contentType == 2){
// console.log('')
}
});
// let introduction_center_param = {