mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-13 12:56:43 +08:00
修改
This commit is contained in:
@@ -16,7 +16,7 @@ VUE_APP_CESOURCE_BASE_API = '/socialApi'
|
|||||||
VUE_APP_STAT_BASE_API = '/statApi'
|
VUE_APP_STAT_BASE_API = '/statApi'
|
||||||
|
|
||||||
# BOE系统网址
|
# BOE系统网址
|
||||||
VUE_APP_BOE_WEB_URL = 'http://127.0.0.1'
|
VUE_APP_BOE_WEB_URL = 'https://u-pre.boe.com'
|
||||||
|
|
||||||
# BOE 移动端url
|
# BOE 移动端url
|
||||||
VUE_APP_BOE_MOBILE_URL = 'http://127.0.0.1:8082/mobile'
|
VUE_APP_BOE_MOBILE_URL = 'http://127.0.0.1:8082/mobile'
|
||||||
|
|||||||
@@ -6,6 +6,8 @@ const baseURL = '/activityApi';
|
|||||||
const saveOpinion = (data = {}) => ajax.postJson(baseURL, '/xboe/m/boe/opinion/save', data);
|
const saveOpinion = (data = {}) => ajax.postJson(baseURL, '/xboe/m/boe/opinion/save', data);
|
||||||
//工具列表
|
//工具列表
|
||||||
const toolList = (data = {}) => ajax.postJson(baseURL, '/xboe/m/boe/tools/list', data);
|
const toolList = (data = {}) => ajax.postJson(baseURL, '/xboe/m/boe/tools/list', data);
|
||||||
|
//工具下载
|
||||||
|
const toolDown = ({ urlStr, fileName }) => ajax.get('/systemapi', `/xboe/sys/xuploader/url/download?urlStr=${urlStr}&fileName=${fileName}`);
|
||||||
//通知列表
|
//通知列表
|
||||||
const noticeList = (data = {}) => ajax.postJson(baseURL, '/xboe/m/boe/notice/list', data);
|
const noticeList = (data = {}) => ajax.postJson(baseURL, '/xboe/m/boe/notice/list', data);
|
||||||
//通知列表
|
//通知列表
|
||||||
@@ -24,6 +26,7 @@ const carouselList = (data = {}) => ajax.postJson(baseURL, '/xboe/m/boe/rotation
|
|||||||
export {
|
export {
|
||||||
saveOpinion,
|
saveOpinion,
|
||||||
toolList,
|
toolList,
|
||||||
|
toolDown,
|
||||||
noticeList,
|
noticeList,
|
||||||
noticeDataById,
|
noticeDataById,
|
||||||
courselList,
|
courselList,
|
||||||
|
|||||||
@@ -73,8 +73,8 @@
|
|||||||
</div>
|
</div>
|
||||||
<ul>
|
<ul>
|
||||||
<li v-for="(item, index) in courseList.toolList" :key="index"
|
<li v-for="(item, index) in courseList.toolList" :key="index"
|
||||||
style="cursor: pointer;line-height: 22px;" class="title-line-ellipsis liList">
|
style="cursor: pointer;line-height: 22px;" class="title-line-ellipsis liList"
|
||||||
<router-link to='/grateful/toolDown'>
|
@click="downTool(item)">
|
||||||
<span class="portal-right-text orange-one" v-if="index == 0">
|
<span class="portal-right-text orange-one" v-if="index == 0">
|
||||||
<img :src="`${webBaseUrl}/images/list-01.png`" alt="">
|
<img :src="`${webBaseUrl}/images/list-01.png`" alt="">
|
||||||
</span>
|
</span>
|
||||||
@@ -94,7 +94,6 @@
|
|||||||
<img :src="`${webBaseUrl}/images/listblue06.png`" alt="">
|
<img :src="`${webBaseUrl}/images/listblue06.png`" alt="">
|
||||||
</span>
|
</span>
|
||||||
<span class="portal-title-desc" style="font-size: 14px;">{{ item.name.split('.')[0] }}</span>
|
<span class="portal-title-desc" style="font-size: 14px;">{{ item.name.split('.')[0] }}</span>
|
||||||
</router-link>
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
@@ -185,7 +184,7 @@
|
|||||||
import apiCourseStudy from "@/api/modules/courseStudy.js";
|
import apiCourseStudy from "@/api/modules/courseStudy.js";
|
||||||
import courseImage from "@/components/Course/courseImage.vue";
|
import courseImage from "@/components/Course/courseImage.vue";
|
||||||
import { toScore, formatUserNumber } from "@/utils/tools.js";
|
import { toScore, formatUserNumber } from "@/utils/tools.js";
|
||||||
import { saveOpinion, noticeList, courselList, toolList, carouselList } from '@/api/modules/grateful.js'
|
import { saveOpinion, noticeList, courselList, toolList, carouselList, toolDown } from '@/api/modules/grateful.js'
|
||||||
export default {
|
export default {
|
||||||
name: "Grateful",
|
name: "Grateful",
|
||||||
components: {
|
components: {
|
||||||
@@ -242,6 +241,23 @@ export default {
|
|||||||
this.getToolData()
|
this.getToolData()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
downTool(toolInfo) {
|
||||||
|
console.log(toolInfo);
|
||||||
|
toolDown({
|
||||||
|
urlStr: `${process.env.VUE_APP_BOE_WEB_URL}/upload${toolInfo.filePath}`,
|
||||||
|
fileName: toolInfo.name
|
||||||
|
}).then((result) => {
|
||||||
|
const link = document.createElement('a');// 创建a标签
|
||||||
|
let blob = new Blob([result.data], { type: '' }); // 设置文件类型
|
||||||
|
link.style.display = "none";
|
||||||
|
link.href = URL.createObjectURL(blob); // 创建URL
|
||||||
|
link.setAttribute("download", `${toolInfo.name}`);
|
||||||
|
document.body.appendChild(link);
|
||||||
|
link.click();
|
||||||
|
URL.revokeObjectURL(link.href);
|
||||||
|
document.body.removeChild(link);
|
||||||
|
})
|
||||||
|
},
|
||||||
couresreso() {
|
couresreso() {
|
||||||
carouselList().then((res) => {
|
carouselList().then((res) => {
|
||||||
console.log(res);
|
console.log(res);
|
||||||
@@ -486,6 +502,7 @@ export default {
|
|||||||
right: 0;
|
right: 0;
|
||||||
bottom: 50%;
|
bottom: 50%;
|
||||||
z-index: 999;
|
z-index: 999;
|
||||||
|
cursor: pointer;
|
||||||
|
|
||||||
.content {
|
.content {
|
||||||
width: 152px;
|
width: 152px;
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<div class="modules xcontent2">
|
<div class="modules xcontent2">
|
||||||
<div class="xcontent2-main">
|
<div class="xcontent2-main">
|
||||||
<div class="navTop">
|
<div class="navTop">
|
||||||
<router-link to="/grateful">首页</router-link> > <span style="cursor: pointer;">通知</span>
|
<router-link to="/grateful">首页</router-link> > <span style="cursor: pointer;">通知列表</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -124,7 +124,7 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.modules-list {
|
.modules-list {
|
||||||
// min-height: 555px;
|
min-height: 682px;
|
||||||
background: #ffffff;
|
background: #ffffff;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
|
|
||||||
@@ -142,8 +142,8 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.toolEvery {
|
.toolEvery {
|
||||||
height: 80px;
|
height: 56px;
|
||||||
line-height: 80px;
|
line-height: 56px;
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
color: #333333;
|
color: #333333;
|
||||||
|
|||||||
@@ -6,8 +6,7 @@
|
|||||||
<div class="xcontent2-main">
|
<div class="xcontent2-main">
|
||||||
<div class="navTop">
|
<div class="navTop">
|
||||||
<div>
|
<div>
|
||||||
<router-link to="/grateful">首页</router-link> >
|
<router-link to="/grateful">首页</router-link> > <router-link to="/grateful/gratefulNotice">通知列表</router-link> > <span style="cursor: pointer;">通知详情</span>
|
||||||
<span style="cursor: pointer;">通知详情</span>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -59,7 +59,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="list.length !== 0">
|
<div v-if="list.length !== 0" style="margin-bottom: 45px;">
|
||||||
<pagination :size="param.pageSize" :total="total" :page="param.pageNo" @change-size="changePageSize"
|
<pagination :size="param.pageSize" :total="total" :page="param.pageNo" @change-size="changePageSize"
|
||||||
@change-page="loadData" style="background-color: rgba(0, 0, 0, 0);" :autoScroll="false"
|
@change-page="loadData" style="background-color: rgba(0, 0, 0, 0);" :autoScroll="false"
|
||||||
:pageSizes="[12, 24, 36, 48]"></pagination>
|
:pageSizes="[12, 24, 36, 48]"></pagination>
|
||||||
|
|||||||
@@ -49,7 +49,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { toolList } from '../../api/modules/grateful';
|
import { toolList, toolDown } from '../../api/modules/grateful';
|
||||||
export default {
|
export default {
|
||||||
data: () => {
|
data: () => {
|
||||||
return {
|
return {
|
||||||
@@ -73,10 +73,22 @@ export default {
|
|||||||
this.total = total
|
this.total = total
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
downLoad({ filePath }) {
|
downLoad(toolInfo) {
|
||||||
if (!filePath) return;
|
console.log(toolInfo);
|
||||||
console.log(process.env.VUE_APP_FILE_RELATIVE_PATH + filePath);
|
toolDown({
|
||||||
window.open(process.env.VUE_APP_FILE_RELATIVE_PATH + filePath)
|
urlStr: `${process.env.VUE_APP_BOE_WEB_URL}/upload${toolInfo.filePath}`,
|
||||||
|
fileName: toolInfo.name
|
||||||
|
}).then((result) => {
|
||||||
|
const link = document.createElement('a');// 创建a标签
|
||||||
|
let blob = new Blob([result.data], { type: '' }); // 设置文件类型
|
||||||
|
link.style.display = "none";
|
||||||
|
link.href = URL.createObjectURL(blob); // 创建URL
|
||||||
|
link.setAttribute("download", `${toolInfo.name}`);
|
||||||
|
document.body.appendChild(link);
|
||||||
|
link.click();
|
||||||
|
URL.revokeObjectURL(link.href);
|
||||||
|
document.body.removeChild(link);
|
||||||
|
})
|
||||||
},
|
},
|
||||||
getPic(index) {
|
getPic(index) {
|
||||||
return this.webBaseUrl + "/images/listblue0" + (index + 1) + ".png";
|
return this.webBaseUrl + "/images/listblue0" + (index + 1) + ".png";
|
||||||
@@ -139,7 +151,7 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.modules-list {
|
.modules-list {
|
||||||
// min-height: 555px;
|
min-height: 682px;
|
||||||
background: #ffffff;
|
background: #ffffff;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
|
|
||||||
@@ -151,8 +163,8 @@ export default {
|
|||||||
|
|
||||||
|
|
||||||
.toolEvery {
|
.toolEvery {
|
||||||
height: 80px;
|
height: 56px;
|
||||||
line-height: 80px;
|
line-height: 56px;
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
color: #333333;
|
color: #333333;
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="main">
|
<div class="main">
|
||||||
|
<!-- <div class="mianRouter"> -->
|
||||||
<router-view></router-view>
|
<router-view></router-view>
|
||||||
|
<!-- </div> -->
|
||||||
<!-- 底部 -->
|
<!-- 底部 -->
|
||||||
<div class="grateful">
|
<div class="grateful">
|
||||||
<img src="../../assets/images/grateful/gratefulFooter.png" alt="" />
|
<img src="../../assets/images/grateful/gratefulFooter.png" alt="" />
|
||||||
@@ -21,12 +23,21 @@ export default {
|
|||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.main {
|
.main {
|
||||||
background-color: #f2F5F7;
|
background-color: #f2F5F7;
|
||||||
|
// height: 100%;
|
||||||
|
// display: flex;
|
||||||
|
// flex-direction: column;
|
||||||
|
|
||||||
|
// .mianRouter {
|
||||||
|
// flex: 1;
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
.grateful {
|
.grateful {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
||||||
img {
|
img {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -34,6 +45,7 @@ export default {
|
|||||||
height: 240px;
|
height: 240px;
|
||||||
background: url('../../../public/images/courseBg.png') no-repeat;
|
background: url('../../../public/images/courseBg.png') no-repeat;
|
||||||
background-size: 100% 100%;
|
background-size: 100% 100%;
|
||||||
|
|
||||||
.portal-header {
|
.portal-header {
|
||||||
height: 72px;
|
height: 72px;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
Reference in New Issue
Block a user