diff --git a/public/index.html b/public/index.html index ef18c32..e9ddc94 100644 --- a/public/index.html +++ b/public/index.html @@ -267,12 +267,18 @@ diff --git a/src/api/user.js b/src/api/user.js index 4f42679..21948d1 100644 --- a/src/api/user.js +++ b/src/api/user.js @@ -10,6 +10,13 @@ export function getTicketToken(params) { }) } +// 获取用户资料 +export function getUserInfoShequ(uid) { + return request({ + url: `/v1/user/getUserinfo/?uid=${uid}`, + method: "get", + }) +} // 获取用户资料(转发通行证v2接口) export function getUserInfo() { diff --git a/src/assets/css/base.css b/src/assets/css/base.css index d53cdd8..e4c9575 100644 --- a/src/assets/css/base.css +++ b/src/assets/css/base.css @@ -120,6 +120,14 @@ a:hover { flex-direction: row; } +/* 列表 */ + +.flex-7 { + display: flex; + justify-content: space-between; + flex-wrap: wrap; +} + /* 文字居中 */ .font-center { @@ -407,6 +415,9 @@ a:hover { .colf26 { color: #f26c4f; } +.colffa { + color: #ffa940; +} .col28c { color: #28c346; @@ -414,12 +425,21 @@ a:hover { .col27c { color: #27c346; } +.col52c { + color: #52c41a; +} .col333 { color: #333; } .col000 { color: #000; } +.col808 { + color: #808696; +} +.col515 { + color: #515a6e; +} .mt24 { margin-top: 24px; @@ -566,10 +586,10 @@ a:hover { width: 200px; height: 44px; line-height: 44px; - background: linear-gradient(270deg, #FF7C6B 0%, #FF4B72 100%); + background: linear-gradient(270deg, #ff7c6b 0%, #ff4b72 100%); border-radius: 8px; } -.btn-hot:hover{ +.btn-hot:hover { color: #fff; } diff --git a/src/assets/css/m.css b/src/assets/css/m.css index 263b17b..3d92742 100644 --- a/src/assets/css/m.css +++ b/src/assets/css/m.css @@ -1,61 +1,70 @@ @media screen and (max-width: 1200px) { - .mainbox { - width: 100%; - padding: 0 20px; - } - .m-pd20{ - padding: 0 20px; - } - - .w1200 { - width: 100%; - } - - /* 头部 */ - .header, - .edu-nav-box { - display: none !important; - } - - .edu-nav-box-m, - .ad-m { - display: block; - } - - /* end 头部 */ - - .m-dn { - display: none !important; - } - - .m-db { - display: block !important; - } - .m-f12{font-size: 12px !important;} - .m-f14{font-size: 14px !important;} + .mainbox { + width: 100%; + padding: 0 20px; + } + .m-pd20 { + padding: 0 20px; + } + + .w1200 { + width: 100%; + } + + /* 头部 */ + .header, + .edu-nav-box { + display: none !important; + } + + .edu-nav-box-m, + .ad-m { + display: block; + } + + /* end 头部 */ + + .m-dn { + display: none !important; + } + + .m-db { + display: block !important; + } + .m-f12 { + font-size: 12px !important; + } + .m-f14 { + font-size: 14px !important; + } + .m-bd-box { + width: 100%; + background: #fff; + border-radius: 8px; + border: 1px solid #ceddf2; + } } @media screen and (max-width: 800px) { - .m-dn-800 { - display: none !important; - } + .m-dn-800 { + display: none !important; + } - .m-db-800 { - display: block !important; - } + .m-db-800 { + display: block !important; + } } :root { - --van-red: #0082fc; + --van-red: #0082fc; } - // 移动端 @media screen and (max-width: 500px) { - .m-dn-500 { - display: none !important; - } + .m-dn-500 { + display: none !important; + } - .m-db-500 { - display: block !important; - } + .m-db-500 { + display: block !important; + } } diff --git a/src/assets/fine_logo_dynamic.gif b/src/assets/fine_logo_dynamic.gif new file mode 100644 index 0000000..8b5bf4a Binary files /dev/null and b/src/assets/fine_logo_dynamic.gif differ diff --git a/src/assets/img/fcrp2022.png b/src/assets/img/fcrp2022.png new file mode 100644 index 0000000..e1dfa8f Binary files /dev/null and b/src/assets/img/fcrp2022.png differ diff --git a/src/components/AvatarDropDown.vue b/src/components/AvatarDropDown.vue new file mode 100644 index 0000000..f288cf9 --- /dev/null +++ b/src/components/AvatarDropDown.vue @@ -0,0 +1,146 @@ + + + + + diff --git a/src/components/Header-old.vue b/src/components/Header-old.vue new file mode 100644 index 0000000..181e0e7 --- /dev/null +++ b/src/components/Header-old.vue @@ -0,0 +1,905 @@ + + + + + + + + diff --git a/src/components/Header.vue b/src/components/Header.vue index 181e0e7..a2c57a4 100644 --- a/src/components/Header.vue +++ b/src/components/Header.vue @@ -2,148 +2,101 @@
- - - -
-
- 首页 - 学习路径 - 视频课 - 学习班 - 直播 - 城市课堂 - + 首页 + 学习路径 + 视频课 + 学习班 + 直播 + 城市课堂 +
@@ -201,33 +154,13 @@ >
- + @@ -306,10 +239,13 @@ import { getMenuList } from "@/api/nav"; import { getNotice, avatarMenu } from "@/api/user"; import store from "@/store"; import { onBeforeRouteUpdate } from "vue-router"; +import axios from "axios"; +import avatarDropDown from "@/components/AvatarDropDown"; export default defineComponent({ components: { teacherApplyModal, + avatarDropDown, }, name: "Header", setup() { @@ -369,14 +305,15 @@ export default defineComponent({ // 消息 const resNotice = async () => { - const res = await getNotice(); - if (res.code === 200) { - state.u_notice = res.data.system; + const res = await axios.get("https://home.fanruan.com/message/open/api/unread/" + store.getters.get_uid); + if (res.status === 200) { + state.u_notice = res.data.data; if (state.u_notice > 0) { state.is_dot = true; } } }; + if (store.getters.get_uid) { resNotice(); state.uid = store.getters.get_uid; @@ -425,224 +362,205 @@ export default defineComponent({ + + + + diff --git a/src/components/TeacherApply/TeacherApplyModal - old.vue b/src/components/TeacherApply/TeacherApplyModal - old.vue new file mode 100644 index 0000000..bbddabd --- /dev/null +++ b/src/components/TeacherApply/TeacherApplyModal - old.vue @@ -0,0 +1,305 @@ + + + + diff --git a/src/components/TeacherApply/TeacherApplyModal.vue b/src/components/TeacherApply/TeacherApplyModal.vue index bbddabd..beb406d 100644 --- a/src/components/TeacherApply/TeacherApplyModal.vue +++ b/src/components/TeacherApply/TeacherApplyModal.vue @@ -1,15 +1,16 @@ diff --git a/src/components/banner.vue b/src/components/banner.vue index 18e83d8..2bfd671 100644 --- a/src/components/banner.vue +++ b/src/components/banner.vue @@ -112,15 +112,7 @@
- - - - - +
@@ -155,7 +147,20 @@ export default { // fetchgetCover(); // 新版版banner 我的帆软广告位 - window.fineAd.getAdvertisement({ adId: "1d4b2f969fcd43a99205e88c53b05d8d" }); + let needMobile = document.body.clientWidth < 1200; + if (needMobile) { + window.fineAd.getAdvertisement({ adId: "1d4b2f969fcd43a99205e88c53b05d8d", needMobile: needMobile, className: "ad-m-banner" }); + } else { + window.fineAd.getAdvertisement({ adId: "1d4b2f969fcd43a99205e88c53b05d8d" }); + } + window.addEventListener("resize", function() { + let needMobile = document.body.clientWidth < 1200; + if (needMobile) { + window.fineAd.getAdvertisement({ adId: "1d4b2f969fcd43a99205e88c53b05d8d", needMobile: needMobile, className: "ad-m-banner", resize: true }); + } else { + window.fineAd.getAdvertisement({ adId: "1d4b2f969fcd43a99205e88c53b05d8d", resize: true }); + } + }); const fetchgetcateHot = async (class1) => { const res = await getcateHot(class1); @@ -425,5 +430,10 @@ export default { margin: 0 auto; display: block; } + ::v-deep .ad-m-banner { + width: 100% !important; + height: auto !important; + border-radius: 8px; + } } diff --git a/src/main.js b/src/main.js index 4c278de..c0608d9 100644 --- a/src/main.js +++ b/src/main.js @@ -33,17 +33,17 @@ app.use(VueWechatTitle) app.use(jsSeamlessScroll) app.mount('#app') router.afterEach(() => { - setTimeout(() => { - //百度统计 - var _hmt = _hmt || []; - (function () { - //每次执行前,先移除上次插入的代码 - document.getElementById('baidu_tj') && document.getElementById('baidu_tj').remove(); - var hm = document.createElement("script"); - hm.src = "https://hm.baidu.com/hm.js?f4d7d83c565e698bd7cedfe9c6297055"; - hm.id = "baidu_tj" - var s = document.getElementsByTagName("script")[0]; - s.parentNode.insertBefore(hm, s); - })(); - }, 0); + // setTimeout(() => { + // //百度统计 + // var _hmt = _hmt || []; + // (function () { + // //每次执行前,先移除上次插入的代码 + // document.getElementById('baidu_tj') && document.getElementById('baidu_tj').remove(); + // var hm = document.createElement("script"); + // hm.src = "https://hm.baidu.com/hm.js?f4d7d83c565e698bd7cedfe9c6297055"; + // hm.id = "baidu_tj" + // var s = document.getElementsByTagName("script")[0]; + // s.parentNode.insertBefore(hm, s); + // })(); + // }, 0); }); diff --git a/src/router.js b/src/router.js index 61bcf46..ee6699f 100644 --- a/src/router.js +++ b/src/router.js @@ -73,6 +73,7 @@ const routes = [ component: () => import('@/views/class/indexClass.vue'), meta: { title: '学习班 - 帆软学院', + isMobile: 1, }, }, @@ -86,6 +87,7 @@ const routes = [ meta: { title: '课程章节 - 学习班', active: 'class', + isMobile: 1, }, children: [ { @@ -96,6 +98,7 @@ const routes = [ title: '课程章节 - 学习班', active: 'class', tab: 'class_lesson', + isMobile: 1, }, }, { @@ -105,6 +108,7 @@ const routes = [ meta: { title: '我的作业 - 学习班', active: 'class', + isMobile: 1, }, }, { @@ -115,6 +119,7 @@ const routes = [ title: '班级论坛 - 学习班', active: 'class', tab: 'class_forum', + isMobile: 1, }, }, { @@ -125,6 +130,7 @@ const routes = [ title: '班级论坛 - 学习班', active: 'class', tab: 'class_forum', + isMobile: 1, }, }, ], diff --git a/src/utils/advertisementSDK.js b/src/utils/advertisementSDK.js index 1c20015..d988692 100644 --- a/src/utils/advertisementSDK.js +++ b/src/utils/advertisementSDK.js @@ -32,11 +32,16 @@ const config = ({ debug = false, dev = false, adApiUrl }) => { * @param adId2 如果adId没有匹配到则显示第二个广告位 * @param top 顶边距 * @param bottom 底边距 + * @param needMobile 兼容移动端ID显示广告 + * @param className 样式名称 */ -const getAdvertisement = async ({adId, adId2, top, bottom}) => { +const getAdvertisement = async ({adId, adId2, top, bottom, needMobile, className, resize = false}) => { const { debug, dev } = fineAd.options; const dataPath = dev ? 'test' : 'prod'; - await axios.get("https://shequ-oss.obs.cn-east-2.myhuaweicloud.com/digit/ad/data/" + dataPath + "/advertisement.json?v=" + Date.now()) + const getClassName = className ? `class="${className}"` : ''; + const dateNow = resize ? '1' : Date.now(); + fineAd.options.domId = needMobile ? 'AD-M-' : 'AD-'; + await axios.get("https://shequ-oss.obs.cn-east-2.myhuaweicloud.com/digit/ad/data/" + dataPath + "/advertisement.json?v=" + dateNow) .then(function (res) { var isAdId = false; res.data.forEach((item) => { @@ -49,9 +54,11 @@ const getAdvertisement = async ({adId, adId2, top, bottom}) => { console.log('picSize',getSize); console.log('top',top); console.log('bottom',bottom); + console.log('className',className); + console.log('needMobile',needMobile); console.groupEnd(); } - let adDomId = document.getElementById('AD-' + adId); + let adDomId = document.getElementById(fineAd.options.domId + adId); adDomId.innerHTML=''; window.fineAd.adMargin({ adId:adId, top:top }); // 无链接图片广告 @@ -60,7 +67,7 @@ const getAdvertisement = async ({adId, adId2, top, bottom}) => { } // 有链接图片广告 if(item.adLink && item.type===1){ - adDomId.innerHTML+=``; + adDomId.innerHTML+=``; } // 有链接文本广告 if(item.adLink && item.type===2){ @@ -84,7 +91,7 @@ const getAdvertisement = async ({adId, adId2, top, bottom}) => { console.log('bottom',bottom); console.groupEnd(); } - let adDomId = document.getElementById('AD-' + adId2); + let adDomId = document.getElementById(fineAd.options.domId + adId2); adDomId.innerHTML=''; window.fineAd.adMargin({ adId:adId2, top:top }); // 有链接图片广告 @@ -112,7 +119,7 @@ const getAdvertisement = async ({adId, adId2, top, bottom}) => { * @param bottom 底边距 */ const adMargin = ({ adId, top = 0, bottom = 0 }) => { - let adDomId = document.getElementById('AD-' + adId); + let adDomId = document.getElementById(fineAd.options.domId + adId); if(top > 0){ adDomId.innerHTML+=`
`; }else if(bottom > 0){ diff --git a/src/views/class/class.vue b/src/views/class/class.vue index 96ee6a7..ffbd7c3 100644 --- a/src/views/class/class.vue +++ b/src/views/class/class.vue @@ -3,39 +3,54 @@
-

{{topInfo.class_title}}

-
{{topInfo.end_time}}
+

{{ topInfo.class_title }}

+
{{ topInfo.end_time }}
-

我的学习进度 {{topInfo.progress_learning.progress}}/{{topInfo.progress_learning.total}}

- - +

我的学习进度 {{ topInfo.progress_learning.progress }}/{{ topInfo.progress_learning.total }}

+
-

我的作业进度 {{topInfo.progress_homework.progress}}/{{topInfo.progress_homework.total}}

- - +

我的作业进度 {{ topInfo.progress_homework.progress }}/{{ topInfo.progress_homework.total }}

+
-
我的作业平均分 - {{topInfo.average}} +
+ 我的作业平均分 + {{ topInfo.average }} +
+
+ 班级排名 {{ topInfo.class_rank }}
-
班级排名 {{topInfo.class_rank}}
-
+
+
+
+ +
+
+
+

课程须知

+
@@ -47,43 +62,28 @@
-
- - - 课程章节 - - 学生管理 - 批改作业 - 教学进度管理 - 公告栏管理 +
+ + 课程章节 + 学生管理 + 批改作业 + 教学进度管理 + 公告栏管理
- - 课程章节 - - 我的作业 - 相关认证 + + 课程章节 + 我的作业 +
  • 相关认证
  • -
    - +
    +
    -
    @@ -91,88 +91,133 @@
    - - - + - .rt-box { - margin-top: 56px; + - .el-menu-item.is-active::after { - content: ""; - position: absolute; - width: 50%; - left: 50%; - margin-left: -25%; - bottom: -1px; - background-color: #0082fc; - height: 2px; - } + diff --git a/src/views/class/classMenu.vue b/src/views/class/classMenu.vue index 6582423..9d8963c 100644 --- a/src/views/class/classMenu.vue +++ b/src/views/class/classMenu.vue @@ -1,50 +1,49 @@ - \ No newline at end of file +.el-menu.el-menu--horizontal { + border-bottom: solid 1px #ceddf2; +} + diff --git a/src/views/class/class_homework.vue b/src/views/class/class_homework.vue index 6338848..c73afc4 100644 --- a/src/views/class/class_homework.vue +++ b/src/views/class/class_homework.vue @@ -1,5 +1,4 @@ - - td { - height: 60px; - padding: 16px 0 16px 18px; - text-align: left; - border-bottom: 1px solid #CEDDF2; - } + - tr:hover { - background-color: #F3F8FF; - } - } + \ No newline at end of file +.el-dialog__body { + padding: 20px 30px 30px 30px; +} + diff --git a/src/views/class/class_lesson.vue b/src/views/class/class_lesson.vue index 3fc9984..106acec 100644 --- a/src/views/class/class_lesson.vue +++ b/src/views/class/class_lesson.vue @@ -1,5 +1,4 @@ - - - .novideo { - padding: 18px 0 0 24px; - font-size: 16px; - } - + - .icon-bofang2 { - font-size: 14px; - color: #B3C1D3; - margin-right: 12px; - } + + + - .price::before { - content: ""; - position: absolute; - top: -15px; - width: 100%; - height: 1px; - background-color: #CEDDF2; + \ No newline at end of file +} + diff --git a/src/views/class/play.vue b/src/views/class/play.vue index 3dd5b17..4b38a11 100644 --- a/src/views/class/play.vue +++ b/src/views/class/play.vue @@ -10,7 +10,8 @@
    -
    +
    +
    @@ -39,7 +40,7 @@