mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-11 03:46:44 +08:00
修改
This commit is contained in:
@@ -16,7 +16,7 @@ VUE_APP_CESOURCE_BASE_API = '/socialApi'
|
||||
VUE_APP_STAT_BASE_API = '/statApi'
|
||||
|
||||
# BOE系统网址
|
||||
VUE_APP_BOE_WEB_URL = 'http://127.0.0.1'
|
||||
VUE_APP_BOE_WEB_URL = 'https://u-pre.boe.com'
|
||||
|
||||
# BOE 移动端url
|
||||
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 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);
|
||||
//通知列表
|
||||
@@ -24,6 +26,7 @@ const carouselList = (data = {}) => ajax.postJson(baseURL, '/xboe/m/boe/rotation
|
||||
export {
|
||||
saveOpinion,
|
||||
toolList,
|
||||
toolDown,
|
||||
noticeList,
|
||||
noticeDataById,
|
||||
courselList,
|
||||
|
||||
@@ -73,28 +73,27 @@
|
||||
</div>
|
||||
<ul>
|
||||
<li v-for="(item, index) in courseList.toolList" :key="index"
|
||||
style="cursor: pointer;line-height: 22px;" class="title-line-ellipsis liList">
|
||||
<router-link to='/grateful/toolDown'>
|
||||
<span class="portal-right-text orange-one" v-if="index == 0">
|
||||
<img :src="`${webBaseUrl}/images/list-01.png`" alt="">
|
||||
</span>
|
||||
<span class="portal-right-text orange-tow" v-if="index == 1">
|
||||
<img :src="`${webBaseUrl}/images/list02.png`" alt="">
|
||||
</span>
|
||||
<span class="portal-right-text orange-three" v-if="index == 2">
|
||||
<img :src="`${webBaseUrl}/images/list03.png`" alt="">
|
||||
</span>
|
||||
<span class="portal-right-text" v-if="index == 3">
|
||||
<img :src="`${webBaseUrl}/images/list04.png`" alt="">
|
||||
</span>
|
||||
<span class="portal-right-text" v-if="index == 4">
|
||||
<img :src="`${webBaseUrl}/images/list05.png`" alt="">
|
||||
</span>
|
||||
<span class="portal-right-text" v-if="index == 5">
|
||||
<img :src="`${webBaseUrl}/images/listblue06.png`" alt="">
|
||||
</span>
|
||||
<span class="portal-title-desc" style="font-size: 14px;">{{ item.name.split('.')[0] }}</span>
|
||||
</router-link>
|
||||
style="cursor: pointer;line-height: 22px;" class="title-line-ellipsis liList"
|
||||
@click="downTool(item)">
|
||||
<span class="portal-right-text orange-one" v-if="index == 0">
|
||||
<img :src="`${webBaseUrl}/images/list-01.png`" alt="">
|
||||
</span>
|
||||
<span class="portal-right-text orange-tow" v-if="index == 1">
|
||||
<img :src="`${webBaseUrl}/images/list02.png`" alt="">
|
||||
</span>
|
||||
<span class="portal-right-text orange-three" v-if="index == 2">
|
||||
<img :src="`${webBaseUrl}/images/list03.png`" alt="">
|
||||
</span>
|
||||
<span class="portal-right-text" v-if="index == 3">
|
||||
<img :src="`${webBaseUrl}/images/list04.png`" alt="">
|
||||
</span>
|
||||
<span class="portal-right-text" v-if="index == 4">
|
||||
<img :src="`${webBaseUrl}/images/list05.png`" alt="">
|
||||
</span>
|
||||
<span class="portal-right-text" v-if="index == 5">
|
||||
<img :src="`${webBaseUrl}/images/listblue06.png`" alt="">
|
||||
</span>
|
||||
<span class="portal-title-desc" style="font-size: 14px;">{{ item.name.split('.')[0] }}</span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -185,7 +184,7 @@
|
||||
import apiCourseStudy from "@/api/modules/courseStudy.js";
|
||||
import courseImage from "@/components/Course/courseImage.vue";
|
||||
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 {
|
||||
name: "Grateful",
|
||||
components: {
|
||||
@@ -242,6 +241,23 @@ export default {
|
||||
this.getToolData()
|
||||
},
|
||||
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() {
|
||||
carouselList().then((res) => {
|
||||
console.log(res);
|
||||
@@ -486,6 +502,7 @@ export default {
|
||||
right: 0;
|
||||
bottom: 50%;
|
||||
z-index: 999;
|
||||
cursor: pointer;
|
||||
|
||||
.content {
|
||||
width: 152px;
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<div class="modules xcontent2">
|
||||
<div class="xcontent2-main">
|
||||
<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>
|
||||
@@ -124,7 +124,7 @@ export default {
|
||||
}
|
||||
|
||||
.modules-list {
|
||||
// min-height: 555px;
|
||||
min-height: 682px;
|
||||
background: #ffffff;
|
||||
border-radius: 8px;
|
||||
|
||||
@@ -142,8 +142,8 @@ export default {
|
||||
}
|
||||
|
||||
.toolEvery {
|
||||
height: 80px;
|
||||
line-height: 80px;
|
||||
height: 56px;
|
||||
line-height: 56px;
|
||||
font-size: 18px;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
|
||||
@@ -6,8 +6,7 @@
|
||||
<div class="xcontent2-main">
|
||||
<div class="navTop">
|
||||
<div>
|
||||
<router-link to="/grateful">首页</router-link> >
|
||||
<span style="cursor: pointer;">通知详情</span>
|
||||
<router-link to="/grateful">首页</router-link> > <router-link to="/grateful/gratefulNotice">通知列表</router-link> > <span style="cursor: pointer;">通知详情</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
</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"
|
||||
@change-page="loadData" style="background-color: rgba(0, 0, 0, 0);" :autoScroll="false"
|
||||
:pageSizes="[12, 24, 36, 48]"></pagination>
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { toolList } from '../../api/modules/grateful';
|
||||
import { toolList, toolDown } from '../../api/modules/grateful';
|
||||
export default {
|
||||
data: () => {
|
||||
return {
|
||||
@@ -73,10 +73,22 @@ export default {
|
||||
this.total = total
|
||||
}
|
||||
},
|
||||
downLoad({ filePath }) {
|
||||
if (!filePath) return;
|
||||
console.log(process.env.VUE_APP_FILE_RELATIVE_PATH + filePath);
|
||||
window.open(process.env.VUE_APP_FILE_RELATIVE_PATH + filePath)
|
||||
downLoad(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);
|
||||
})
|
||||
},
|
||||
getPic(index) {
|
||||
return this.webBaseUrl + "/images/listblue0" + (index + 1) + ".png";
|
||||
@@ -139,7 +151,7 @@ export default {
|
||||
}
|
||||
|
||||
.modules-list {
|
||||
// min-height: 555px;
|
||||
min-height: 682px;
|
||||
background: #ffffff;
|
||||
border-radius: 8px;
|
||||
|
||||
@@ -151,8 +163,8 @@ export default {
|
||||
|
||||
|
||||
.toolEvery {
|
||||
height: 80px;
|
||||
line-height: 80px;
|
||||
height: 56px;
|
||||
line-height: 56px;
|
||||
font-size: 18px;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
<template>
|
||||
<div class="main">
|
||||
<!-- <div class="mianRouter"> -->
|
||||
<router-view></router-view>
|
||||
<!-- </div> -->
|
||||
<!-- 底部 -->
|
||||
<div class="grateful">
|
||||
<img src="../../assets/images/grateful/gratefulFooter.png" alt="" />
|
||||
@@ -19,14 +21,23 @@ export default {
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.main{
|
||||
.main {
|
||||
background-color: #f2F5F7;
|
||||
// height: 100%;
|
||||
// display: flex;
|
||||
// flex-direction: column;
|
||||
|
||||
// .mianRouter {
|
||||
// flex: 1;
|
||||
// }
|
||||
}
|
||||
|
||||
.grateful {
|
||||
width: 100%;
|
||||
|
||||
img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,6 +45,7 @@ export default {
|
||||
height: 240px;
|
||||
background: url('../../../public/images/courseBg.png') no-repeat;
|
||||
background-size: 100% 100%;
|
||||
|
||||
.portal-header {
|
||||
height: 72px;
|
||||
display: flex;
|
||||
|
||||
Reference in New Issue
Block a user