Browse Source

feat DP-1311

pull/4/head
Wangwei 2 years ago
parent
commit
5ccdae015c
  1. 18
      public/index.html
  2. 7
      src/api/user.js
  3. BIN
      src/assets/fine_logo_dynamic.gif
  4. 146
      src/components/AvatarDropDown.vue
  5. 905
      src/components/Header-old.vue
  6. 624
      src/components/Header.vue
  7. 305
      src/components/TeacherApply/TeacherApplyModal - old.vue
  8. 354
      src/components/TeacherApply/TeacherApplyModal.vue
  9. 26
      src/main.js
  10. 1
      src/views/class/class.vue
  11. 5
      src/views/class/play.vue
  12. 2
      src/views/video/play.vue

18
public/index.html

@ -267,12 +267,18 @@
<script> <script>
var _hmt = _hmt || []; var _hmt = _hmt || [];
(function() { (function(c, l, a, r, i, t, y) {
var hm = document.createElement("script"); c[a] =
hm.src = "https://hm.baidu.com/hm.js?f4d7d83c565e698bd7cedfe9c6297055"; c[a] ||
var s = document.getElementsByTagName("script")[0]; function() {
s.parentNode.insertBefore(hm, s); (c[a].q = c[a].q || []).push(arguments);
})(); };
t = l.createElement(r);
t.async = 1;
t.src = "https://www.clarity.ms/tag/" + i;
y = l.getElementsByTagName(r)[0];
y.parentNode.insertBefore(t, y);
})(window, document, "clarity", "script", "h6euw7u8lp");
</script> </script>
</body> </body>
</html> </html>

7
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接口) // 获取用户资料(转发通行证v2接口)
export function getUserInfo() { export function getUserInfo() {

BIN
src/assets/fine_logo_dynamic.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 474 KiB

146
src/components/AvatarDropDown.vue

@ -0,0 +1,146 @@
<template>
<div class="user-pop-index">
<ul>
<div class="dr-nav-popover-inner-section">
<div class="avatar-wrapper">
<div class="detail-wrapper">
<div class="username-info">{{ user.username }}</div>
<div class="ant-space css-1me4733 ant-space-horizontal ant-space-align-center uid-info" style="gap: 8px">
<div class="ant-space-item" style="">uid:</div>
<div class="ant-space-item">{{ uid }}</div>
</div>
<div class="ant-space css-1me4733 ant-space-horizontal ant-space-align-center" style="gap: 40px">
<div class="ant-space-item" style="">
<a href="https://fanruanclub.com/#/info/" target="_blank" class="col167">个人资料</a>
</div>
<div class="ant-space-item">
<a href="https://fanruanclub.com/#/info/auth" target="_blank" class="col167">账号认证</a>
</div>
</div>
</div>
<div>
<img class="dr-nav-popover-inner-logo-big" :src="'https://bbs.fanruan.com/uc_server/avatar.php?uid=' + uid + '&amp;size=small'" />
</div>
</div>
</div>
<div class="dr-nav-popover-inner-section">
<div class="ant-row css-1me4733">
<div class="ant-col ant-col-12 css-1me4733">
<a class="section-item" :href="'https://bbs.fanruan.com/u/' + uid" target="_blank"> <img class="section-item-icon" src="https://hwobs.fanruan.com/ui/digit-fe/header/header-user.png" />我的主页 </a>
</div>
<div class="ant-col ant-col-12 css-1me4733">
<a class="section-item" href="https://bbs.fanruan.com/task-my.html" target="_blank"> <img class="section-item-icon" src="https://hwobs.fanruan.com/ui/digit-fe/header/header-calendar.png" />我的任务 </a>
</div>
<div class="ant-col ant-col-12 css-1me4733">
<a class="section-item" href="https://edu.fanruan.com/class" target="_blank"> <img class="section-item-icon" src="https://hwobs.fanruan.com/ui/digit-fe/header/header-report.png" />我的班级 </a>
</div>
</div>
</div>
<div class="dr-nav-popover-inner-section" style="border-bottom: none;">
<a class="section-item" :href="com_id_url + '/login/token/logout?referrer=' + com_edu_url + $route.fullPath"> <img class="section-item-icon" src="https://hwobs.fanruan.com/ui/digit-fe/header/header-logout.png" />退出登录 </a>
</div>
</ul>
</div>
</template>
<script>
import { reactive, toRefs } from "vue";
import { getUid } from "@/utils/cookie";
import { getUserInfoShequ } from "@/api/user";
export default {
setup() {
const state = reactive({
uid: getUid(),
user: {},
});
const resGetUserInfoShequ = async () => {
const res = await getUserInfoShequ(state.uid);
if (res.code === 200) {
state.user = res.data;
console.log(state.user);
}
};
resGetUserInfoShequ();
return {
...toRefs(state),
};
},
};
</script>
<style lang="scss">
.user-pop-index {
line-height: 1.5714285714285714;
}
.dr-nav-popover-inner-section {
padding: 20px 0;
border-bottom: 1px solid #e8eaed;
}
.dr-nav-popover-inner-section .avatar-wrapper {
display: flex;
align-items: center;
justify-content: space-between;
}
.dr-nav-popover-inner-section .avatar-wrapper .detail-wrapper {
width: 160px;
}
.dr-nav-popover-inner-section .avatar-wrapper .detail-wrapper .username-info {
width: 100%;
font-size: 14px;
color: #333;
color: var(--dr-text-black);
margin-bottom: 4px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.dr-nav-popover-inner-section .avatar-wrapper .detail-wrapper .uid-info {
color: #c5c7ce;
margin-bottom: 4px;
}
.ant-space {
display: inline-flex;
align-items: cente;
.ant-space-item {
font-size: 14px;
}
}
.dr-nav-popover-inner-logo-big {
width: 72px;
height: 72px;
border-radius: 50%;
}
.col167 {
color: #1677ff !important;
}
.ant-row {
display: flex;
flex-flow: row wrap;
min-width: 0;
}
.ant-col:not(:nth-last-of-type(-n + 2)) {
margin-bottom: 16px !important;
display: block;
flex: 0 0 50%;
max-width: 50%;
}
.dr-nav-popover-inner-section .section-item {
color: #8097ad;
font-size: 14px;
cursor: pointer;
transition: all 0.3s;
display: flex;
align-items: center;
}
.dr-nav-popover-inner-section .section-item-icon {
width: 16px;
height: 16px;
margin-right: 5px;
}
.dr-nav-popover-inner-section:not(:first-child) {
padding: 15px 0;
}
</style>

905
src/components/Header-old.vue

@ -0,0 +1,905 @@
<template>
<header class="header" id="myheader">
<div class="wrapper">
<!-- left -->
<nav class="nav">
<a class="nav-item item-lf" v-for="item in leftMenu" :key="item.id" :href="item.url" :class="{ active: item.name === '学院' }">{{ item.name }}</a>
</nav>
<!-- center -->
<div class="search-box flex-1">
<form class="searchform" method="get" autocomplete="off" action="https://search.fanruan.com/?q=" target="_blank" v-if="is_search">
<div class="el-input el-input--small el-input--suffix topsearch flex-1">
<input class="el-input__inner" name="q" type="text" autocomplete="off" tabindex="" aria-label="" placeholder="请输入关键词" @focus="isfocus('focus')" @blur="isfocus('blur')" v-on:input="isinput" />
<button class="el-input__suffix search_sub" type="submit" :class="{ active_btn: kwbtn }">
<span class="el-input__suffix-inner search_btn">
<i class="iconfont icon-icon_icon-53 icon-ss" :class="{ active: kwfocus }"></i>
</span>
</button>
</div>
</form>
<div class="searchform" v-else>
<div class="el-input el-input--small el-input--suffix topsearch flex-1">
<div class="el-input__inner" style="color: #B5C1D0; line-height: 30px;">登录后方可搜索</div>
<button class="el-input__suffix search_sub" type="submit" :class="{ active_btn: kwbtn }">
<span class="el-input__suffix-inner search_btn">
<i class="iconfont icon-icon_icon-53 icon-ss" :class="{ active: kwfocus }"></i>
</span>
</button>
</div>
</div>
</div>
<!-- rigt -->
<nav class="infomation">
<template v-for="item in rightMenu" :key="item.id">
<template v-if="!item.children">
<a class="nav-item item-rt" :href="item.url">{{ item.name }}</a>
</template>
<template v-else>
<el-dropdown :show-timeout="0">
<span class="el-dropdown-link item-rt"> {{ item.name }}<i class="el-icon-arrow-down el-icon--right"></i> </span>
<template #dropdown>
<el-dropdown-menu>
<el-dropdown-item v-for="child in item.children" :key="child.id" style="padding: 0;">
<a class="nav-item" :href="child.url" style="display:block;">{{ child.name }}</a>
</el-dropdown-item>
</el-dropdown-menu>
</template>
</el-dropdown>
</template>
</template>
<!-- <div class="app_qrcode_box">
<el-dropdown trigger="hover">
<div class="toptxt flex-1">
<i class="el-dropdown-link iconfont icon-M-phone"></i>
<span>下载APP</span>
</div>
<template #dropdown>
<el-dropdown-menu>
<div class="qrcode-box">
<div class="top-txt flex-4">
<span>帆软社区APP</span>
<a href="https://bbs.fanruan.com/thread-135870-1-1.html" target="_blank">更新说明</a>
</div>
<img class="codeimg" width="162"
src="https://bbs.fanruan.com/source/plugin/app_download/img/new_ios_qrcode.png" />
<div class="foot-txt-gift flex-4">
<img class="img-gift" width="24" src="https://bbs.fanruan.com/static/img/icon_fundction_gift.png" />
<a href="https://bbs.fanruan.com/thread-135868-1-1.html" target="_blank">连续签到,赢取千元大奖</a>
</div>
</div>
</el-dropdown-menu>
</template>
</el-dropdown>
</div> -->
<div class="notice_box">
<el-dropdown trigger="hover">
<el-badge :is-dot="is_dot" class="item badge" type="danger">
<i class="el-dropdown-link iconfont icon-icon_icon-66"></i>
</el-badge>
<template #dropdown>
<el-dropdown-menu class="i_item">
<a :href="com_shequ_url + '/home.php?mod=space&do=notice&view=system'" target="_blank">
<el-dropdown-item class="clearfix">
<span class="i_txt">我的通知</span>
<el-badge class="mark" :value="u_notice" type="danger" />
</el-dropdown-item>
</a>
</el-dropdown-menu>
</template>
</el-dropdown>
</div>
<el-dropdown v-if="com_user_token" class="personal" ref="userDropdown">
<span class="el-dropdown-link">
<el-avatar :src="avatarUrl + uid" :size="32" fit="cover" icon="el-icon-user-solid"></el-avatar>
<i class="el-icon-arrow-down el-icon--right"></i>
</span>
<template #dropdown>
<el-dropdown-menu class="avatar_down">
<el-dropdown-item v-for="(item, i) in avatarMenu.baseMenu" :key="i" :icon="item.icon">
<a class="item-nav" :href="item.url">{{ item.name }}</a>
</el-dropdown-item>
<el-divider></el-divider>
<el-dropdown-item v-for="(item, i) in avatarMenu.navMenu" :key="i" :icon="item.icon">
<a class="item-nav" :href="item.url">{{ item.name }}</a>
</el-dropdown-item>
<el-divider></el-divider>
<el-dropdown>
<teacherApplyModal :uid="uid" />
</el-dropdown>
<el-divider></el-divider>
<el-dropdown-item v-for="(item, i) in avatarMenu.adminMenu" :key="i" :icon="item.icon">
<a class="item-nav" :href="item.url">{{ item.name }}</a>
</el-dropdown-item>
<el-divider v-if="avatarMenu.adminMenu?.length > 0"></el-divider>
<el-dropdown-item v-for="(item, i) in avatarMenu.footerMenu" :key="i" :icon="item.icon">
<a class="item-nav" :href="item.url">{{ item.name }}</a>
</el-dropdown-item>
</el-dropdown-menu>
</template>
</el-dropdown>
<div v-else class="loginReg flex-1">
<a class="loginbtn" :href="com_id_url + '/cas/login?service=' + com_edu_url + '/v1/user/cas/edu/login/?redirect=' + $route.fullPath">登录</a>
</div>
</nav>
</div>
</header>
<div class="edu-nav-box" v-if="isPc">
<div class="mainbox">
<div class="edu-head">
<router-link class="logo" to="/"><img src="@/assets/logo.png"/></router-link>
<div class="edu-nav">
<router-link to="/">首页</router-link>
<router-link to="/studypath/finereport" :class="$route.meta.active == 'studypath' ? 'active' : ''">学习路径 </router-link>
<router-link to="/video" :class="$route.meta.active == 'video' ? 'active' : ''">视频课</router-link>
<router-link to="/class" :class="$route.meta.active == 'class' ? 'active' : ''">学习班</router-link>
<router-link to="/live" :class="$route.meta.active == 'live' ? 'active' : ''">直播</router-link>
<router-link to="/cityclass" :class="$route.meta.active == 'cityclass' ? 'active' : ''">城市课堂</router-link>
<!-- <router-link to="/more" :class="$route.meta.active == 'more' ? 'active' : ''">资源导航</router-link> -->
</div>
</div>
</div>
</div>
<!-- 移动端 -->
<div class="edu-nav-box-m dn" v-else>
<!-- search -->
<div class="ss-main-box dn" :class="{ showss: ssOpen }">
<div class="search-box-m">
<form class="searchform" method="get" autocomplete="off" action="https://search.fanruan.com/?q=" target="_blank" v-if="is_search">
<div class="el-input el-input--small el-input--suffix topsearch flex-1">
<input class="el-input__inner" name="q" type="text" autocomplete="off" tabindex="" aria-label="" placeholder="请输入关键词" @focus="isfocus('focus')" @blur="isfocus('blur')" v-on:input="isinput" />
<button class="el-input__suffix search_sub" type="submit" :class="{ active_btn: kwbtn }">
<span class="el-input__suffix-inner search_btn">
<i class="iconfont icon-search icon-ss" :class="{ active: kwfocus }"></i>
</span>
</button>
</div>
</form>
<div class="searchform" v-else>
<div class="el-input el-input--small el-input--suffix topsearch flex-1">
<div class="el-input__inner" style="color: #B5C1D0; line-height: 30px;">登录后方可搜索</div>
<button class="el-input__suffix search_sub" type="submit" :class="{ active_btn: kwbtn }">
<span class="el-input__suffix-inner search_btn">
<i class="iconfont icon-search icon-ss" :class="{ active: kwfocus }"></i>
</span>
</button>
</div>
</div>
</div>
</div>
<div class="m-box flex-2">
<div class="flex-3 flex-1">
<!-- left -->
<div @click="drawer = true">
<i class="iconfont icon-zhankai1 ff18" style="margin-right: 10px;"></i>
<span class="f18">帆软学院</span>
</div>
<!-- right -->
<div class="flex-1">
<!-- search-btn -->
<div class="ss-btn-m">
<i v-if="!ssOpen" class="iconfont icon-search ff18 col617 cur-p" @click="funssOpen(false)"></i>
<i
v-else
class="iconfont icon-cuohao1 ff18 col617 cur-p"
@click="
funssOpen(true);
isfocus('blur');
"
></i>
</div>
<el-dropdown v-if="com_user_token" class="personal" ref="userDropdown" trigger="click" style="margin-left: 26px;">
<span class="el-dropdown-link">
<el-avatar :src="avatarUrl + uid" :size="32" fit="cover" icon="el-icon-user-solid"></el-avatar>
</span>
<template #dropdown>
<el-dropdown-menu class="avatar_down">
<el-dropdown-item v-for="(item, i) in avatarMenu.baseMenu" :key="i" :icon="item.icon">
<a class="item-nav" :href="item.url">{{ item.name }}</a>
</el-dropdown-item>
<el-divider></el-divider>
<el-dropdown-item v-for="(item, i) in avatarMenu.navMenu" :key="i" :icon="item.icon">
<a class="item-nav" :href="item.url">{{ item.name }}</a>
</el-dropdown-item>
<el-divider></el-divider>
<el-dropdown>
<teacherApplyModal :uid="uid" />
</el-dropdown>
<el-divider></el-divider>
<el-dropdown-item v-for="(item, i) in avatarMenu.adminMenu" :key="i" :icon="item.icon">
<a class="item-nav" :href="item.url">{{ item.name }}</a>
</el-dropdown-item>
<el-divider v-if="avatarMenu.adminMenu?.length > 0"></el-divider>
<el-dropdown-item v-for="(item, i) in avatarMenu.footerMenu" :key="i" :icon="item.icon">
<a class="item-nav" :href="item.url">{{ item.name }}</a>
</el-dropdown-item>
</el-dropdown-menu>
</template>
</el-dropdown>
<div v-else class="loginReg flex-1">
<a class="loginbtn" :href="com_login_url">登录</a>
</div>
</div>
</div>
</div>
</div>
<el-drawer v-model="drawer" title="我的帆软" direction="ltr" custom-class="drawerHead" size="55%">
<div class="lf-nav-box-m">
<el-scrollbar style="height: 100%; width: 99%; position: absolute;">
<el-menu default-active="2-1" class="el-menu-lf" @open="handleOpen" @close="handleClose">
<li v-for="item in allMenu" :key="item.id">
<el-submenu index="item.id" v-if="item.ident === 'edu'">
<template #title>
<span class="col008 f16">
{{ item.name }}
</span>
</template>
<el-menu-item-group>
<el-menu-item index="2-1">
<router-link to="/" class="lfnav-item" @click="drawer = false">学院首页</router-link>
</el-menu-item>
<el-menu-item index="2-2">
<router-link to="/studypath/finereport" @click="drawer = false" class="lfnav-item" :class="$route.meta.active == 'studypath' ? 'active' : ''">学习路径 </router-link>
</el-menu-item>
<el-menu-item>
<router-link to="/video" @click="drawer = false" class="lfnav-item" :class="$route.meta.active == 'video' ? 'active' : ''">视频课 </router-link>
</el-menu-item>
<el-menu-item>
<router-link to="/class" @click="drawer = false" class="lfnav-item" :class="$route.meta.active == 'class' ? 'active' : ''">学习班 </router-link>
</el-menu-item>
<el-menu-item>
<router-link to="/live" @click="drawer = false" class="lfnav-item" :class="$route.meta.active == 'live' ? 'active' : ''">直播 </router-link>
</el-menu-item>
<el-menu-item>
<router-link to="/cityclass" @click="drawer = false" class="lfnav-item" :class="$route.meta.active == 'cityclass' ? 'active' : ''"> 城市课堂</router-link>
</el-menu-item>
<!-- <el-menu-item>
<router-link to="/more" @click="drawer = false" class="lfnav-item" :class="$route.meta.active == 'more' ? 'active' : ''">资源导航 </router-link>
</el-menu-item> -->
</el-menu-item-group>
</el-submenu>
<el-menu-item :index="item.id" v-if="!item.children && item.ident != 'edu'">
<template #title>
<a class="lfnav-item" :href="item.url">{{ item.name }}</a>
</template>
</el-menu-item>
<el-submenu :index="item.id" v-else-if="item.ident != 'edu'">
<template #title>
<span>{{ item.name }}</span>
</template>
<el-menu-item-group>
<el-menu-item v-for="child in item.children" :key="child.id">
<a class="lfnav-item" :href="child.url">{{ child.name }}</a>
</el-menu-item>
</el-menu-item-group>
</el-submenu>
</li>
</el-menu>
</el-scrollbar>
</div>
</el-drawer>
</template>
<script>
import { defineComponent, reactive, toRefs, ref, getCurrentInstance } from "vue";
import teacherApplyModal from "@/components/TeacherApply/TeacherApplyModal";
import { getMenuList } from "@/api/nav";
import { getNotice, avatarMenu } from "@/api/user";
import store from "@/store";
import { onBeforeRouteUpdate } from "vue-router";
export default defineComponent({
components: {
teacherApplyModal,
},
name: "Header",
setup() {
const { proxy } = getCurrentInstance();
const state = reactive({
isPc: document.body.clientWidth > 1200,
allMenu: [],
leftMenu: [],
rightMenu: [],
userInfo: {},
kwfocus: 0,
kwbtn: 0,
u_notice: 0,
is_dot: false,
avatarMenu: [],
is_search: false,
drawer: false,
ssOpen: false,
avatarUrl: "https://bbs.fanruan.com/uc_server/avatar.php?uid=",
uid: 0,
wwwUrl: "",
});
state.wwwUrl = window.location.href;
onBeforeRouteUpdate((to) => {
state.wwwUrl = proxy.$root.com_edu_url + to.path;
});
window.addEventListener("resize", function() {
state.isPc = document.body.clientWidth > 1200;
});
const fetchMenuList = async () => {
const res = await getMenuList();
if (res.code === 1) {
state.menuList = res.data;
const arr = res.data;
state.allMenu = arr;
arr.forEach((item) => {
if (item.position) {
state.rightMenu.push(item);
} else {
state.leftMenu.push(item);
}
});
}
};
fetchMenuList();
//
const fetchavatarMenu = async () => {
const res = await avatarMenu();
if (res.code === 200) {
state.avatarMenu = res.data;
}
};
//
const resNotice = async () => {
const res = await getNotice();
if (res.code === 200) {
state.u_notice = res.data.system;
if (state.u_notice > 0) {
state.is_dot = true;
}
}
};
if (store.getters.get_uid) {
resNotice();
state.uid = store.getters.get_uid;
state.is_search = true;
setTimeout(function() {
fetchavatarMenu();
}, 500);
} else {
state.is_search = false;
}
function isfocus(k) {
if (k == "focus") {
state.kwfocus = 1;
} else {
state.kwfocus = 0;
}
}
function isinput(e) {
const { value } = e.target;
if (value) {
state.kwbtn = 1;
} else {
state.kwbtn = 0;
}
}
function funssOpen(o) {
if (o == true) {
state.ssOpen = false;
} else {
state.ssOpen = true;
}
}
return {
...toRefs(state),
input: ref(""),
isfocus,
isinput,
funssOpen,
};
},
});
</script>
<style lang="scss" scoped>
.el-divider--horizontal {
margin: 8px 0;
}
.app_qrcode_box {
.toptxt {
i {
font-size: 20px;
margin-top: 3px;
}
span {
font-size: 16px;
}
}
}
.qrcode-box {
width: 220px;
font-size: 14px;
.codeimg {
display: block;
margin: 0 auto;
}
.top-txt {
height: 40px;
a {
color: #8c8c8c;
margin-left: 12px;
}
}
.foot-txt-gift {
height: 40px;
a {
color: #ff7a45;
margin-left: 8px;
}
}
}
.header {
height: 48px;
background: #fff;
padding: 0 40px 0 20px;
.wrapper {
height: 100%;
background: #fff;
min-width: 1100px;
display: flex;
align-items: flex-start;
justify-content: space-between;
.nav {
min-width: 400px;
}
.nav {
position: relative;
height: 100%;
display: flex;
align-items: center;
font-size: 16px;
.nav-item {
font-size: 16px;
color: #333;
&:hover {
color: #0082fc;
}
}
.item-lf {
margin-left: 26px;
&.active {
color: #0082fc;
}
}
.item-rt {
margin-right: 26px;
}
}
.infomation {
position: relative;
height: 100%;
display: flex;
align-items: center;
justify-content: flex-end;
font-size: 16px;
.nav-item {
font-size: 16px;
color: #333;
&:hover {
color: #0082fc;
}
}
.item-lf {
margin-right: 20px;
}
.item-rt {
margin-right: 26px;
}
::v-deep .el-dropdown.personal {
width: 32px;
height: 32px;
margin-left: 24px;
border-radius: 50%;
overflow: hidden;
z-index: 99;
}
}
.search-box {
height: 48px;
margin: 0 auto;
width: 40%;
transition: all 0.2s;
.searchform {
width: 100%;
}
.search_sub {
border-radius: 0px 20px 20px 0px;
height: 32px;
cursor: pointer;
background: none;
border: none;
right: 0;
}
.search_btn {
display: inline-block;
color: #617288;
width: 48px;
.active {
color: #0082fc;
}
}
.active_btn {
background-color: #0082fc;
.icon-ss {
color: #fff;
}
}
.el-input__inner {
border: none;
border: 1px solid #eef3fa;
background-color: #eef3fa;
border-radius: 100px;
font-size: 14px;
}
.el-input__inner:focus {
border: 1px solid #0082fc;
background-color: #fff;
}
::placeholder {
color: #8496ab !important;
}
}
}
}
/*响应式-小屏幕*/
@media screen and (max-width: 1800px) {
.search-box {
width: 36% !important;
}
}
@media screen and (max-width: 1700px) {
.search-box {
width: 32% !important;
}
}
@media screen and (max-width: 1600px) {
.search-box {
width: 28% !important;
}
}
@media screen and (max-width: 1500px) {
.search-box {
width: 25% !important;
}
}
@media screen and (max-width: 1400px) {
.search-box {
width: 20% !important;
}
}
@media screen and (max-width: 1300px) {
.search-box {
width: 15% !important;
}
}
.el-popper {
.nav-item {
padding: 0 20px;
color: #8496ab;
&:hover {
color: #0082fc;
}
}
}
.el-dropdown-selfdefine {
font-size: 16px;
color: #333;
}
.avatar_down {
width: 234px;
display: flex;
justify-content: space-between;
flex-wrap: wrap;
.item-nav {
display: inline-block;
}
}
.avatar_down li:hover {
background: none;
}
.loginReg {
padding-left: 26px;
span {
color: #ddd;
padding: 0 8px;
}
.loginbtn {
border-radius: 20px;
font-size: 14px;
color: #fff;
padding: 5px 20px;
background: linear-gradient(270deg, #0082fc 0%, #00bbfe 100%);
@keyframes gradientBG {
0% {
background-position: 0% 50%;
}
50% {
background-position: 100% 50%;
}
100% {
background-position: 0% 50%;
}
}
&:hover {
color: #fff;
background: linear-gradient(60deg, #0070d8, #0082fc, #00bbfe, #0ec4fc, #0082fc, #0070d8);
background-size: 400% 400%;
animation: gradientBG 4s ease infinite;
}
}
a {
color: #8496ab;
}
a:hover {
color: #0082fc;
}
}
.notice_box {
padding: 4px 0 0 0px;
.icon-icon_icon-66 {
font-size: 26px;
color: #333;
margin: 0;
}
}
.i_item {
.i_txt {
padding-right: 30px;
}
}
::v-deep .el-badge__content {
background-color: #ff3d23 !important;
border: none;
margin: 6px 4px 0 0;
}
</style>
<style lang="scss">
.edu-head {
height: 70px;
background: #fff;
display: flex;
justify-content: space-between;
align-items: center;
}
.edu-head .logo img {
height: 34px;
}
.edu-nav a {
margin-left: 40px;
font-size: 18px;
}
.edu-nav-box {
background: #fff;
box-shadow: 0px 4px 6px -3px rgba(179, 193, 211, 0.3);
z-index: 6;
position: relative;
}
.el-dropdown-menu__item {
min-width: 117px;
}
</style>
<style lang="scss">
/*响应式-移动端*/
.edu-nav-box-m {
background: #fff;
box-shadow: 0px 4px 6px -3px rgba(179, 193, 211, 0.3);
z-index: 6;
position: relative;
height: 50px;
}
.m-box {
height: 50px;
padding: 0 20px;
}
.ss-main-box {
position: absolute;
background-color: #fff;
width: 100%;
padding: 0 20px;
transition: all 0.3s;
margin-top: 0;
box-shadow: 0px 4px 6px -3px rgba(179, 193, 211, 0.3);
z-index: -1px;
}
.showss {
transition: all 0.3s;
margin-top: 50px;
display: block !important;
}
.search-box-m {
height: 48px;
padding-top: 3px;
width: 100%;
transition: all 0.2s;
.searchform {
width: 100%;
}
.search_sub {
border-radius: 0px 20px 20px 0px;
height: 32px;
cursor: pointer;
background: none;
border: none;
right: 0;
}
.search_btn {
display: inline-block;
color: #617288;
width: 48px;
.active {
color: #0082fc;
}
}
.active_btn {
background-color: #0082fc;
.icon-ss {
color: #fff;
}
}
.el-input__inner {
border: none;
border: 1px solid #eef3fa;
background-color: #eef3fa;
border-radius: 100px;
font-size: 14px;
}
.el-input__inner:focus {
border: 1px solid #0082fc;
background-color: #fff;
}
::placeholder {
color: #8496ab !important;
}
}
/* 导航 */
.lfnav-item {
display: block;
font-size: 15px;
}
.drawerHead {
text-align: left;
.el-submenu__icon-arrow,
.el-icon-arrow-down,
.el-icon-close {
font-size: 16px;
}
.el-drawer__header {
margin-bottom: 0;
border-bottom: 1px solid #eee;
padding-top: 10px;
padding-bottom: 10px;
font-weight: 700;
color: #333;
letter-spacing: 2px;
}
.el-menu-item,
.el-submenu__title {
height: 48px;
line-height: 48px;
}
.el-menu-item-group__title {
padding: 0;
}
.el-menu {
border: none;
}
}
</style>

624
src/components/Header.vue

@ -2,148 +2,101 @@
<header class="header" id="myheader"> <header class="header" id="myheader">
<div class="wrapper"> <div class="wrapper">
<!-- left --> <!-- left -->
<nav class="nav"> <div class="nav-lf flex-1">
<a class="nav-item item-lf" v-for="item in leftMenu" :key="item.id" :href="item.url" :class="{ active: item.name === '学院' }">{{ item.name }}</a> <div class="nav-logo">
</nav> <a href="https://home.fanruan.com/"><img src="@/assets/fine_logo_dynamic.gif" class="logo-img"/></a>
<!-- center -->
<div class="search-box flex-1">
<form class="searchform" method="get" autocomplete="off" action="https://search.fanruan.com/?q=" target="_blank" v-if="is_search">
<div class="el-input el-input--small el-input--suffix topsearch flex-1">
<input class="el-input__inner" name="q" type="text" autocomplete="off" tabindex="" aria-label="" placeholder="请输入关键词" @focus="isfocus('focus')" @blur="isfocus('blur')" v-on:input="isinput" />
<button class="el-input__suffix search_sub" type="submit" :class="{ active_btn: kwbtn }">
<span class="el-input__suffix-inner search_btn">
<i class="iconfont icon-icon_icon-53 icon-ss" :class="{ active: kwfocus }"></i>
</span>
</button>
</div>
</form>
<div class="searchform" v-else>
<div class="el-input el-input--small el-input--suffix topsearch flex-1">
<div class="el-input__inner" style="color: #B5C1D0; line-height: 30px;">登录后方可搜索</div>
<button class="el-input__suffix search_sub" type="submit" :class="{ active_btn: kwbtn }">
<span class="el-input__suffix-inner search_btn">
<i class="iconfont icon-icon_icon-53 icon-ss" :class="{ active: kwfocus }"></i>
</span>
</button>
</div>
</div> </div>
<div class="nav-line"></div>
<router-link to="/" class="nav-title">帆软学院</router-link>
</div> </div>
<!-- rigt --> <!-- rigt -->
<nav class="infomation"> <div class="nav-rt">
<template v-for="item in rightMenu" :key="item.id"> <!-- search -->
<template v-if="!item.children"> <div class="search-box flex-1">
<a class="nav-item item-rt" :href="item.url">{{ item.name }}</a> <form class="searchform" method="get" autocomplete="off" action="https://search.fanruan.com/?q=" target="_blank" v-if="is_search">
</template> <div class="el-input el-input--small el-input--suffix topsearch flex-1">
<template v-else> <input class="el-input__inner" name="q" type="text" autocomplete="off" tabindex="" aria-label="" placeholder="请输入关键词" @focus="isfocus('focus')" @blur="isfocus('blur')" v-on:input="isinput" />
<el-dropdown :show-timeout="0"> <button class="el-input__suffix search_sub" type="submit" :class="{ active_btn: kwbtn }">
<span class="el-dropdown-link item-rt"> {{ item.name }}<i class="el-icon-arrow-down el-icon--right"></i> </span> <span class="el-input__suffix-inner search_btn">
<template #dropdown> <i class="iconfont icon-icon_icon-53 icon-ss" :class="{ active: kwfocus }"></i>
<el-dropdown-menu> </span>
<el-dropdown-item v-for="child in item.children" :key="child.id" style="padding: 0;"> </button>
<a class="nav-item" :href="child.url" style="display:block;">{{ child.name }}</a>
</el-dropdown-item>
</el-dropdown-menu>
</template>
</el-dropdown>
</template>
</template>
<!-- <div class="app_qrcode_box">
<el-dropdown trigger="hover">
<div class="toptxt flex-1">
<i class="el-dropdown-link iconfont icon-M-phone"></i>
<span>下载APP</span>
</div> </div>
<template #dropdown> </form>
<el-dropdown-menu>
<div class="qrcode-box"> <div class="searchform" v-else>
<div class="top-txt flex-4"> <div class="el-input el-input--small el-input--suffix topsearch flex-1">
<span>帆软社区APP</span> <div class="el-input__inner" style="color: #B5C1D0; line-height: 30px;">登录后方可搜索</div>
<a href="https://bbs.fanruan.com/thread-135870-1-1.html" target="_blank">更新说明</a> <button class="el-input__suffix search_sub" type="submit" :class="{ active_btn: kwbtn }">
</div> <span class="el-input__suffix-inner search_btn">
<img class="codeimg" width="162" <i class="iconfont icon-icon_icon-53 icon-ss" :class="{ active: kwfocus }"></i>
src="https://bbs.fanruan.com/source/plugin/app_download/img/new_ios_qrcode.png" /> </span>
<div class="foot-txt-gift flex-4"> </button>
<img class="img-gift" width="24" src="https://bbs.fanruan.com/static/img/icon_fundction_gift.png" /> </div>
<a href="https://bbs.fanruan.com/thread-135868-1-1.html" target="_blank">连续签到,赢取千元大奖</a> </div>
</div> </div>
</div>
</el-dropdown-menu>
</template>
</el-dropdown>
</div> -->
<div class="notice_box"> <nav class="infomation">
<el-dropdown trigger="hover"> <el-dropdown v-if="com_user_token" class="personal" placement="bottom-end" popper-class="new-dropdown" show-timeout="0">
<el-badge :is-dot="is_dot" class="item badge" type="danger"> <span class="el-dropdown-link">
<i class="el-dropdown-link iconfont icon-icon_icon-66"></i> <el-avatar :src="avatarUrl + uid" :size="32" fit="cover" icon="el-icon-user-solid"></el-avatar>
</el-badge> <i class="el-icon-arrow-down el-icon--right"></i>
</span>
<template #dropdown> <template #dropdown>
<el-dropdown-menu class="i_item"> <el-dropdown-menu class="avatar_down">
<a :href="com_shequ_url + '/home.php?mod=space&do=notice&view=system'" target="_blank"> <avatarDropDown />
<el-dropdown-item class="clearfix">
<span class="i_txt">我的通知</span>
<el-badge class="mark" :value="u_notice" type="danger" />
</el-dropdown-item>
</a>
</el-dropdown-menu> </el-dropdown-menu>
</template> </template>
</el-dropdown> </el-dropdown>
</div> <div v-else class="loginReg flex-1">
<a class="loginbtn" :href="com_id_url + '/cas/login?service=' + com_edu_url + '/v1/user/cas/edu/login/?redirect=' + $route.fullPath">登录</a>
</div>
<el-dropdown v-if="com_user_token" class="personal" ref="userDropdown"> <!-- 消息 -->
<span class="el-dropdown-link"> <a class="nav-icon-item my-icon-msg" href="https://home.fanruan.com/message" target="_blank" v-if="com_user_token">
<el-avatar :src="avatarUrl + uid" :size="32" fit="cover" icon="el-icon-user-solid"></el-avatar> <div class="icon-wrapper">
<i class="el-icon-arrow-down el-icon--right"></i> <span class="nav-badge">
</span> <span class="anticon anticon-bell icon">
<template #dropdown> <svg viewBox="64 64 896 896" focusable="false" data-icon="bell" width="1em" height="1em" fill="currentColor" aria-hidden="true">
<el-dropdown-menu class="avatar_down"> <path d="M816 768h-24V428c0-141.1-104.3-257.7-240-277.1V112c0-22.1-17.9-40-40-40s-40 17.9-40 40v38.9c-135.7 19.4-240 136-240 277.1v340h-24c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h216c0 61.8 50.2 112 112 112s112-50.2 112-112h216c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM512 888c-26.5 0-48-21.5-48-48h96c0 26.5-21.5 48-48 48zM304 768V428c0-55.6 21.6-107.8 60.9-147.1S456.4 220 512 220c55.6 0 107.8 21.6 147.1 60.9S720 372.4 720 428v340H304z"></path>
<el-dropdown-item v-for="(item, i) in avatarMenu.baseMenu" :key="i" :icon="item.icon"> </svg>
<a class="item-nav" :href="item.url">{{ item.name }}</a> </span>
</el-dropdown-item> <sup id="sub_num_box" class="nav-badge-count-sm" v-if="is_dot">
<el-divider></el-divider> <span>{{ u_notice }}</span>
</sup>
<el-dropdown-item v-for="(item, i) in avatarMenu.navMenu" :key="i" :icon="item.icon"> </span>
<a class="item-nav" :href="item.url">{{ item.name }}</a> </div>
</el-dropdown-item> <div class="icon-wrapper-tips">通知</div>
<el-divider></el-divider> </a>
<el-dropdown>
<teacherApplyModal :uid="uid" /> <!-- 账户 -->
</el-dropdown> <a class="nav-icon-item" href="https://fanruanclub.com/" target="_blank" v-if="com_user_token">
<el-divider></el-divider> <div class="icon-wrapper">
<el-dropdown-item v-for="(item, i) in avatarMenu.adminMenu" :key="i" :icon="item.icon"> <span role="img" aria-label="idcard" class="anticon anticon-idcard icon">
<a class="item-nav" :href="item.url">{{ item.name }}</a> <svg viewBox="64 64 896 896" focusable="false" data-icon="idcard" width="1em" height="1em" fill="currentColor" aria-hidden="true">
</el-dropdown-item> <path d="M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 632H136V232h752v560zM610.3 476h123.4c1.3 0 2.3-3.6 2.3-8v-48c0-4.4-1-8-2.3-8H610.3c-1.3 0-2.3 3.6-2.3 8v48c0 4.4 1 8 2.3 8zm4.8 144h185.7c3.9 0 7.1-3.6 7.1-8v-48c0-4.4-3.2-8-7.1-8H615.1c-3.9 0-7.1 3.6-7.1 8v48c0 4.4 3.2 8 7.1 8zM224 673h43.9c4.2 0 7.6-3.3 7.9-7.5 3.8-50.5 46-90.5 97.2-90.5s93.4 40 97.2 90.5c.3 4.2 3.7 7.5 7.9 7.5H522a8 8 0 008-8.4c-2.8-53.3-32-99.7-74.6-126.1a111.8 111.8 0 0029.1-75.5c0-61.9-49.9-112-111.4-112s-111.4 50.1-111.4 112c0 29.1 11 55.5 29.1 75.5a158.09 158.09 0 00-74.6 126.1c-.4 4.6 3.2 8.4 7.8 8.4zm149-262c28.5 0 51.7 23.3 51.7 52s-23.2 52-51.7 52-51.7-23.3-51.7-52 23.2-52 51.7-52z"></path>
<el-divider v-if="avatarMenu.adminMenu?.length > 0"></el-divider> </svg>
</span>
<el-dropdown-item v-for="(item, i) in avatarMenu.footerMenu" :key="i" :icon="item.icon"> </div>
<a class="item-nav" :href="item.url">{{ item.name }}</a> <div>账户</div>
</el-dropdown-item> </a>
</el-dropdown-menu> </nav>
</template> </div>
</el-dropdown>
<div v-else class="loginReg flex-1">
<a class="loginbtn" :href="com_id_url + '/cas/login?service=' + com_edu_url + '/v1/user/cas/edu/login/?redirect=' + $route.fullPath">登录</a>
</div>
</nav>
</div> </div>
</header> </header>
<div class="edu-nav-box" v-if="isPc"> <div class="edu-nav-box" v-if="isPc">
<div class="mainbox"> <div class="mainbox">
<div class="edu-head"> <div class="edu-head">
<router-link class="logo" to="/"><img src="@/assets/logo.png"/></router-link>
<div class="edu-nav"> <div class="edu-nav">
<router-link to="/">首页</router-link> <router-link class="item" to="/">首页</router-link>
<router-link to="/studypath/finereport" :class="$route.meta.active == 'studypath' ? 'active' : ''">学习路径 </router-link> <router-link class="item" to="/studypath/finereport" :class="$route.meta.active == 'studypath' ? 'active' : ''">学习路径 </router-link>
<router-link to="/video" :class="$route.meta.active == 'video' ? 'active' : ''">视频课</router-link> <router-link class="item" to="/video" :class="$route.meta.active == 'video' ? 'active' : ''">视频课</router-link>
<router-link to="/class" :class="$route.meta.active == 'class' ? 'active' : ''">学习班</router-link> <router-link class="item" to="/class" :class="$route.meta.active == 'class' ? 'active' : ''">学习班</router-link>
<router-link to="/live" :class="$route.meta.active == 'live' ? 'active' : ''">直播</router-link> <router-link class="item" to="/live" :class="$route.meta.active == 'live' ? 'active' : ''">直播</router-link>
<router-link to="/cityclass" :class="$route.meta.active == 'cityclass' ? 'active' : ''">城市课堂</router-link> <router-link class="item" to="/cityclass" :class="$route.meta.active == 'cityclass' ? 'active' : ''">城市课堂</router-link>
<!-- <router-link to="/more" :class="$route.meta.active == 'more' ? 'active' : ''">资源导航</router-link> --> <teacherApplyModal :uid="uid" />
</div> </div>
</div> </div>
</div> </div>
@ -201,33 +154,13 @@
></i> ></i>
</div> </div>
<el-dropdown v-if="com_user_token" class="personal" ref="userDropdown" trigger="click" style="margin-left: 26px;"> <el-dropdown v-if="com_user_token" class="personal" popper-class="new-dropdown" trigger="click" style="margin-left: 26px;">
<span class="el-dropdown-link"> <span class="el-dropdown-link">
<el-avatar :src="avatarUrl + uid" :size="32" fit="cover" icon="el-icon-user-solid"></el-avatar> <el-avatar :src="avatarUrl + uid" :size="32" fit="cover" icon="el-icon-user-solid"></el-avatar>
</span> </span>
<template #dropdown> <template #dropdown>
<el-dropdown-menu class="avatar_down"> <el-dropdown-menu class="avatar_down">
<el-dropdown-item v-for="(item, i) in avatarMenu.baseMenu" :key="i" :icon="item.icon"> <avatarDropDown />
<a class="item-nav" :href="item.url">{{ item.name }}</a>
</el-dropdown-item>
<el-divider></el-divider>
<el-dropdown-item v-for="(item, i) in avatarMenu.navMenu" :key="i" :icon="item.icon">
<a class="item-nav" :href="item.url">{{ item.name }}</a>
</el-dropdown-item>
<el-divider></el-divider>
<el-dropdown>
<teacherApplyModal :uid="uid" />
</el-dropdown>
<el-divider></el-divider>
<el-dropdown-item v-for="(item, i) in avatarMenu.adminMenu" :key="i" :icon="item.icon">
<a class="item-nav" :href="item.url">{{ item.name }}</a>
</el-dropdown-item>
<el-divider v-if="avatarMenu.adminMenu?.length > 0"></el-divider>
<el-dropdown-item v-for="(item, i) in avatarMenu.footerMenu" :key="i" :icon="item.icon">
<a class="item-nav" :href="item.url">{{ item.name }}</a>
</el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</template> </template>
</el-dropdown> </el-dropdown>
@ -306,10 +239,13 @@ import { getMenuList } from "@/api/nav";
import { getNotice, avatarMenu } from "@/api/user"; import { getNotice, avatarMenu } from "@/api/user";
import store from "@/store"; import store from "@/store";
import { onBeforeRouteUpdate } from "vue-router"; import { onBeforeRouteUpdate } from "vue-router";
import axios from "axios";
import avatarDropDown from "@/components/AvatarDropDown";
export default defineComponent({ export default defineComponent({
components: { components: {
teacherApplyModal, teacherApplyModal,
avatarDropDown,
}, },
name: "Header", name: "Header",
setup() { setup() {
@ -369,14 +305,15 @@ export default defineComponent({
// //
const resNotice = async () => { const resNotice = async () => {
const res = await getNotice(); const res = await axios.get("https://home.fanruan.com/message/open/api/unread/" + store.getters.get_uid);
if (res.code === 200) { if (res.status === 200) {
state.u_notice = res.data.system; state.u_notice = res.data.data;
if (state.u_notice > 0) { if (state.u_notice > 0) {
state.is_dot = true; state.is_dot = true;
} }
} }
}; };
if (store.getters.get_uid) { if (store.getters.get_uid) {
resNotice(); resNotice();
state.uid = store.getters.get_uid; state.uid = store.getters.get_uid;
@ -425,224 +362,205 @@ export default defineComponent({
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.el-divider--horizontal {
margin: 8px 0;
}
.app_qrcode_box {
.toptxt {
i {
font-size: 20px;
margin-top: 3px;
}
span {
font-size: 16px;
}
}
}
.qrcode-box {
width: 220px;
font-size: 14px;
.codeimg {
display: block;
margin: 0 auto;
}
.top-txt {
height: 40px;
a {
color: #8c8c8c;
margin-left: 12px;
}
}
.foot-txt-gift {
height: 40px;
a {
color: #ff7a45;
margin-left: 8px;
}
}
}
.header { .header {
height: 48px; height: 48px;
background: #fff; background: #fff;
padding: 0 40px 0 20px; z-index: 201;
.wrapper { .wrapper {
height: 100%; width: 1200px;
background: #fff; background: #fff;
min-width: 1100px; margin: 0 auto;
display: flex; display: flex;
align-items: flex-start; align-items: center;
justify-content: space-between; justify-content: space-between;
.nav { .nav-lf {
min-width: 400px; .nav-line {
} width: 1px;
height: 24px;
.nav { background-color: #dbe3ea;
position: relative; margin: 0 20px;
height: 100%;
display: flex;
align-items: center;
font-size: 16px;
.nav-item {
font-size: 16px;
color: #333;
&:hover {
color: #0082fc;
}
} }
.nav-logo {
.item-lf { width: 128px;
margin-left: 26px; height: 36px;
overflow: hidden;
&.active { .logo-img {
color: #0082fc; width: 100%;
height: 100%;
} }
} }
.nav-title {
.item-rt { font-size: 18px;
margin-right: 26px; color: #17243e;
font-weight: 500;
text-decoration: none !important;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
} }
} }
.nav-rt {
.infomation { display: inline-flex;
position: relative;
height: 100%;
display: flex;
align-items: center; align-items: center;
justify-content: flex-end; .search-box {
font-size: 16px; height: 48px;
margin: 0 auto;
.nav-item { width: 460px;
font-size: 16px; transition: all 0.2s;
color: #333;
.searchform {
&:hover { width: 100%;
color: #0082fc;
} }
}
.item-lf {
margin-right: 20px;
}
.item-rt {
margin-right: 26px;
}
::v-deep .el-dropdown.personal { .search_sub {
width: 32px; border-radius: 0px 20px 20px 0px;
height: 32px; height: 32px;
margin-left: 24px; cursor: pointer;
border-radius: 50%; background: none;
overflow: hidden; border: none;
z-index: 99; right: 0;
} }
}
.search-box { .search_btn {
height: 48px; display: inline-block;
margin: 0 auto; color: #617288;
width: 40%; width: 48px;
transition: all 0.2s;
.searchform { .active {
width: 100%; color: #0082fc;
} }
}
.search_sub { .active_btn {
border-radius: 0px 20px 20px 0px; background-color: #0082fc;
height: 32px;
cursor: pointer;
background: none;
border: none;
right: 0;
}
.search_btn { .icon-ss {
display: inline-block; color: #fff;
color: #617288; }
width: 48px; }
.active { .el-input__inner {
color: #0082fc; border: none;
border: 1px solid #eef3fa;
background-color: #eef3fa;
border-radius: 100px;
font-size: 14px;
} }
}
.active_btn { .el-input__inner:focus {
background-color: #0082fc; border: 1px solid #0082fc;
background-color: #fff;
}
.icon-ss { ::placeholder {
color: #fff; color: #8496ab !important;
} }
} }
.el-input__inner { .infomation {
border: none; position: relative;
border: 1px solid #eef3fa; height: 100%;
background-color: #eef3fa; display: flex;
border-radius: 100px; align-items: center;
font-size: 14px; justify-content: flex-end;
} font-size: 16px;
gap: 24px;
.nav-icon-item {
font-size: 12px;
line-height: 15px;
cursor: pointer;
color: #5f7188;
text-decoration: none !important;
&.my-icon-msg {
line-height: 13px;
}
.icon {
font-size: 18px;
color: #5f7188;
}
.icon-wrapper {
color: #5f7188;
display: flex;
align-items: center;
justify-content: center;
}
.el-input__inner:focus { .nav-badge {
border: 1px solid #0082fc; position: relative;
background-color: #fff; }
} .nav-badge-count-sm {
position: absolute;
top: 0px;
inset-inline-end: 0;
transform: translate(50%, -50%);
transform-origin: 100% 0%;
min-width: 14px;
height: 14px;
font-size: 12px;
line-height: 14px;
border-radius: 7px;
background: #ff4d4f;
color: #fff;
text-align: center;
}
}
::placeholder { ::v-deep .el-dropdown.personal {
color: #8496ab !important; width: 32px;
height: 32px;
margin-left: 24px;
border-radius: 50%;
overflow: hidden;
z-index: 99;
}
} }
} }
} }
} }
/*响应式-小屏幕*/ .el-divider--horizontal {
@media screen and (max-width: 1800px) { margin: 8px 0;
.search-box {
width: 36% !important;
}
} }
@media screen and (max-width: 1700px) { .app_qrcode_box {
.search-box { .toptxt {
width: 32% !important; i {
} font-size: 20px;
} margin-top: 3px;
}
@media screen and (max-width: 1600px) { span {
.search-box { font-size: 16px;
width: 28% !important; }
} }
} }
@media screen and (max-width: 1500px) { .qrcode-box {
.search-box { width: 220px;
width: 25% !important; font-size: 14px;
.codeimg {
display: block;
margin: 0 auto;
} }
}
@media screen and (max-width: 1400px) { .top-txt {
.search-box { height: 40px;
width: 20% !important;
a {
color: #8c8c8c;
margin-left: 12px;
}
} }
}
@media screen and (max-width: 1300px) { .foot-txt-gift {
.search-box { height: 40px;
width: 15% !important;
a {
color: #ff7a45;
margin-left: 8px;
}
} }
} }
@ -663,14 +581,10 @@ export default defineComponent({
} }
.avatar_down { .avatar_down {
width: 234px; width: 340px;
display: flex; padding: 0 20px;
justify-content: space-between; background-color: #ffffff;
flex-wrap: wrap; background-clip: padding-box;
.item-nav {
display: inline-block;
}
} }
.avatar_down li:hover { .avatar_down li:hover {
@ -747,28 +661,30 @@ export default defineComponent({
</style> </style>
<style lang="scss"> <style lang="scss">
.edu-head {
height: 70px;
background: #fff;
display: flex;
justify-content: space-between;
align-items: center;
}
.edu-head .logo img { .edu-head .logo img {
height: 34px; height: 34px;
} }
.edu-nav a {
margin-left: 40px;
font-size: 18px;
}
.edu-nav-box { .edu-nav-box {
background: #fff; background: #fff;
box-shadow: 0px 4px 6px -3px rgba(179, 193, 211, 0.3); box-shadow: 0px 5px 6px -3px rgba(179, 193, 211, 0.3);
z-index: 6; z-index: 200;
position: relative; position: relative;
.edu-head {
height: 48px;
background: #fff;
display: flex;
align-items: center;
.edu-nav {
display: inline-flex;
align-items: center;
gap: 24px;
.item {
font-size: 16px;
}
}
}
} }
.el-dropdown-menu__item { .el-dropdown-menu__item {
@ -903,3 +819,21 @@ export default defineComponent({
} }
} }
</style> </style>
<style lang="scss">
@media screen and (max-width: 600px) {
.avatar_down {
width: 300px !important;
}
}
</style>
<style>
.new-dropdown {
position: absolute !important;
z-index: 2003 !important;
border: none !important;
border-radius: 8px;
box-shadow: 0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 9px 28px 8px rgba(0, 0, 0, 0.05);
}
</style>

305
src/components/TeacherApply/TeacherApplyModal - old.vue

@ -0,0 +1,305 @@
<template>
<a :href="com_edu_url + '/v2'" class="til f16 fw600" v-if="isTeacher" target="_blank">
<div class="item-nav apply_trigger_btn">
<i class="iconfont icon-icon_icon-37" />
讲师工作台
</div>
</a>
<div @click="showModal" class="item-nav apply_trigger_btn" v-else>
<i class="iconfont icon-icon_icon-37" />
讲师入驻
<span class="apply_trigger_btn_watting_text" v-if="form.teacherId && form.status === 0">审核中</span>
</div>
<el-dialog custom-class="teacher-apply-dialog" v-model="qrDialogVisible">
<template #title>
<p class="success-dialog__title">
<img src="../../assets/teacherapply/watting.png" class="icon" />
申请已提交待管理员审核
</p>
</template>
<div>
<p>请联系管理员 放大镜微信号frfangdajing</p>
<img src="@/assets/teacherapply/fangdajing_qrcode.png" class="qrimg"/>
<p>微信扫一扫添加管理员微信</p>
<el-button class="success-dialog__btn" type="primary" @click="qrDialogVisible = false">我知道了</el-button>
</div>
</el-dialog>
<el-dialog :width="640" :close-on-click-modal="false" custom-class="teacher-apply-dialog" v-model="dialogVisible" title="申请讲师入驻">
<div class="teacher-apply-dialog_tips">
<i class="iconfont icon-tanhao1" />提交申请后请联系放大镜微信号frfangdajing</div>
<div class="teacher-apply-dialog_form">
<el-form label-suffix=":" :rules="rules" :model="form" ref="ruleFormRef">
<el-form-item label="讲师名称" :label-width="formLabelWidth" required prop="name">
<el-input show-word-limit v-model="form.name" autocomplete="off" placeholder="请输入" maxlength="50"/>
</el-form-item>
<el-form-item label="讲师头像" :label-width="formLabelWidth" prop="avatar">
<teacherApplyUpload @onDelete="deleteAvatar" @onUpload="handleFileSuccess" :default-avatar="form.avatar"/>
</el-form-item>
<el-form-item label="联系电话" :label-width="formLabelWidth" prop="phone">
<div class="mobile_row">
{{form.avatar}}
<span v-if="form.phone" class="mobile_number">
{{form.phone}}
</span>
<span v-else>请先绑定手机号</span>
仅对管理员可见便于管理员联系您
</div>
<div class="mobile_row tips_text" v-if="form.phone">
手机号不对请至<a :href="com_id_url+'/#/info/'" target="_blank">账号中心</a>修改
</div>
</el-form-item>
<el-form-item label="讲师介绍" :label-width="formLabelWidth" required prop="introduction">
<el-input type="textarea" show-word-limit v-model="form.introduction" autocomplete="off" placeholder="请输入" maxlength="500"/>
</el-form-item>
</el-form>
</div>
<template #footer>
<span class="dialog-footer">
<el-button @click="dialogVisible = false">取消</el-button>
<el-button :loading="submitLoading" type="primary" @click="submitForm(ruleFormRef)"
>确定</el-button
>
</span>
</template>
</el-dialog>
</template>
<script lang="ts">
import {defineComponent, reactive, ref} from 'vue'
import teacherApplyUpload from './Upload/TeacherApplyUpload';
import { ElMessage } from 'element-plus'
import { addTeacher, getTeacherInfo, editTeacher, judgeIsTeacher } from "../../api/teacher"
export default defineComponent({
name: 'TeacherApplyModal',
props:{
uid:undefined
},
components:{
teacherApplyUpload
},
setup(props) {
const isTeacher = ref(false);
const dialogVisible = ref(false);
const qrDialogVisible = ref(false);
const submitLoading = ref(false);
const ruleFormRef = ref();
const form = reactive({
status: 0,
teacherId: '',
name: '',
phone: '',
introduction: '',
avatar:'',
})
const judgeIfTeacher = async () => {
const judgeRes = await judgeIsTeacher(props.uid)
if (judgeRes.code === 200){
isTeacher.value = judgeRes.data;
}
}
judgeIfTeacher();
const getInfo = async () => {
console.log('获取用户资料');
const res = await getTeacherInfo();
if (res.code === 200 && res.data){
const {name = '', avatar = '',introduction = '', id= '', phone=''} = res.data;
form.phone = phone;
form.name = name;
form.avatar = avatar;
form.introduction = introduction;
form.teacherId = id;
form.status=res.data.approvalState;
}
}
const showModal = () => {
getInfo();
dialogVisible.value = true
}
//
const rules = reactive({
name: [
{ required: true, message: '请输入讲师姓名', trigger: 'blur' },
{ min: 0, max: 50, message: '字符长度在0-50', trigger: 'blur' },
],
introduction: [
{ required: true, message: '请输入讲师介绍', trigger: 'blur' },
{ min: 0, max: 500, message: '字符长度在0-500', trigger: 'blur' },
],
phone: [
{ required: true, message: '请填写手机号', trigger: 'blur' },
],
})
const handleFileSuccess = (response) => {
console.log('上传成功收到回调');
console.log(response);
form.avatar = response.path;
}
const deleteAvatar = () => {
form.avatar = '';
}
const submitForm = async (formEl) => {
if (!formEl) return
await formEl.validate(async (valid) => {
if (valid) {
console.log('submit!');
console.log(form);
submitLoading.value=true;
try {
let res;
if (form.teacherId){
res = await editTeacher(form.teacherId,{...form});
} else {
res = await addTeacher({...form});
}
if (res.code === 200 && res.message === 'success'){
submitLoading.value=false;
dialogVisible.value = false;
qrDialogVisible.value=true;
} else {
ElMessage({
message: '提交申请失败,请稍后重试',
type: 'warning',
})
submitLoading.value=false;
}
} catch (e) {
ElMessage({
message: '提交申请失败,请稍后重试',
type: 'warning',
})
submitLoading.value=false;
}
}
})
}
return {
isTeacher,
dialogVisible,
form,
ruleFormRef,
formLabelWidth: 140,
submitForm,
rules,
qrDialogVisible,
submitLoading,
handleFileSuccess,
deleteAvatar,
showModal,
}
}
})
</script>
<style lang="scss">
.apply_trigger_btn{
font-size: 14px;
font-weight: 400;
color: #606266;
cursor: pointer;
display: flex;
align-items: center;
margin: 10px 0;
margin-left: 20px;
user-select: none;
i{
margin-right: 5px;
}
&:hover{
color: #0082FC;
}
&_watting_text{
color: #FFA940;
margin-left: 5px;
}
}
.teacher-apply-dialog{
&_tips{
background-color: #FFFBE6;
height: 40px;
display: flex;
align-items: center;
font-size: 14px;
color: #515a6e;
padding-left: 24px;
i{
margin-right: 16px;
color: #FFA940;
}
}
.el-dialog__body{
padding: 0;
}
.el-dialog__header{
text-align: left;
}
.el-dialog__footer{
border-top:1px solid #E8E8E8;
padding: 10px 16px;
}
.success-dialog__title{
font-size: 16px;
font-weight: bold;
color: #17243e;
line-height: 22px;
display: flex;
align-items: center;
justify-content: center;
.icon{
margin-right: 10px;
width: 20px;
height: 20px;
}
}
.success-dialog__btn{
margin: 24px 0;
}
.qrimg{
margin-top: 16px;
width: 115px;
height: 115px;
margin-bottom: 8px;
}
&_form{
padding-left: 24px;
padding-right: 120px;
padding-top: 16px;
.tips_text{
color: #c5c7ce;
}
.el-upload-dragger{
border: none;
width: auto;
height: auto;
//position: relative;
//right: 25px;
}
.el-upload__tip{
color: #c5c7ce;
margin-top: 0;
text-align: left;
line-height: 20px;
flex: 1;
.delete_btn{
color: #0082fc;
cursor: pointer;
margin-top: 20px;
&:hover{
opacity: 0.6;
}
}
}
.mobile_row{
display: flex;
align-items: center;
font-size:14px;
a{
color: #0082FC;
}
.mobile_number{
color: #262626;
margin-right: 10px;
}
}
}
}
</style>

354
src/components/TeacherApply/TeacherApplyModal.vue

@ -1,15 +1,16 @@
<template> <template>
<a :href="com_edu_url + '/v2'" class="til f16 fw600" v-if="isTeacher" target="_blank"> <div v-if="com_user_token">
<div class="item-nav apply_trigger_btn"> <a :href="com_edu_url + '/v2'" class="讲师工作台" v-if="isTeacher">
<i class="iconfont icon-icon_icon-37" />
讲师工作台 讲师工作台
</div> </a>
</a> <a href="javascript:;" @click="showModal" class="item" v-else>
<div @click="showModal" class="item-nav apply_trigger_btn" v-else> 讲师入驻
<i class="iconfont icon-icon_icon-37" /> </a>
讲师入驻 </div>
<span class="apply_trigger_btn_watting_text" v-if="form.teacherId && form.status === 0">审核中</span> <div v-else>
<a class="item" :href="com_login_url">讲师入驻</a>
</div> </div>
<el-dialog custom-class="teacher-apply-dialog" v-model="qrDialogVisible"> <el-dialog custom-class="teacher-apply-dialog" v-model="qrDialogVisible">
<template #title> <template #title>
<p class="success-dialog__title"> <p class="success-dialog__title">
@ -19,63 +20,59 @@
</template> </template>
<div> <div>
<p>请联系管理员 放大镜微信号frfangdajing</p> <p>请联系管理员 放大镜微信号frfangdajing</p>
<img src="@/assets/teacherapply/fangdajing_qrcode.png" class="qrimg"/> <img src="@/assets/teacherapply/fangdajing_qrcode.png" class="qrimg" />
<p>微信扫一扫添加管理员微信</p> <p>微信扫一扫添加管理员微信</p>
<el-button class="success-dialog__btn" type="primary" @click="qrDialogVisible = false">我知道了</el-button> <el-button class="success-dialog__btn" type="primary" @click="qrDialogVisible = false">我知道了</el-button>
</div> </div>
</el-dialog> </el-dialog>
<el-dialog :width="640" :close-on-click-modal="false" custom-class="teacher-apply-dialog" v-model="dialogVisible" title="申请讲师入驻"> <el-dialog :width="640" :close-on-click-modal="false" custom-class="teacher-apply-dialog" v-model="dialogVisible" title="申请讲师入驻">
<div class="teacher-apply-dialog_tips"> <div class="teacher-apply-dialog_tips"><i class="iconfont icon-tanhao1" />提交申请后请联系放大镜微信号frfangdajing</div>
<i class="iconfont icon-tanhao1" />提交申请后请联系放大镜微信号frfangdajing</div>
<div class="teacher-apply-dialog_form"> <div class="teacher-apply-dialog_form">
<el-form label-suffix=":" :rules="rules" :model="form" ref="ruleFormRef"> <el-form label-suffix=":" :rules="rules" :model="form" ref="ruleFormRef">
<el-form-item label="讲师名称" :label-width="formLabelWidth" required prop="name"> <el-form-item label="讲师名称" :label-width="formLabelWidth" required prop="name">
<el-input show-word-limit v-model="form.name" autocomplete="off" placeholder="请输入" maxlength="50"/> <el-input show-word-limit v-model="form.name" autocomplete="off" placeholder="请输入" maxlength="50" />
</el-form-item> </el-form-item>
<el-form-item label="讲师头像" :label-width="formLabelWidth" prop="avatar"> <el-form-item label="讲师头像" :label-width="formLabelWidth" prop="avatar">
<teacherApplyUpload @onDelete="deleteAvatar" @onUpload="handleFileSuccess" :default-avatar="form.avatar"/> <teacherApplyUpload @onDelete="deleteAvatar" @onUpload="handleFileSuccess" :default-avatar="form.avatar" />
</el-form-item> </el-form-item>
<el-form-item label="联系电话" :label-width="formLabelWidth" prop="phone"> <el-form-item label="联系电话" :label-width="formLabelWidth" prop="phone">
<div class="mobile_row"> <div class="mobile_row">
{{form.avatar}} {{ form.avatar }}
<span v-if="form.phone" class="mobile_number"> <span v-if="form.phone" class="mobile_number">
{{form.phone}} {{ form.phone }}
</span> </span>
<span v-else>请先绑定手机号</span> <span v-else>请先绑定手机号</span>
仅对管理员可见便于管理员联系您 仅对管理员可见便于管理员联系您
</div> </div>
<div class="mobile_row tips_text" v-if="form.phone"> <div class="mobile_row tips_text" v-if="form.phone">手机号不对请至<a :href="com_id_url + '/#/info/'" target="_blank">账号中心</a>修改</div>
手机号不对请至<a :href="com_id_url+'/#/info/'" target="_blank">账号中心</a>修改
</div>
</el-form-item> </el-form-item>
<el-form-item label="讲师介绍" :label-width="formLabelWidth" required prop="introduction"> <el-form-item label="讲师介绍" :label-width="formLabelWidth" required prop="introduction">
<el-input type="textarea" show-word-limit v-model="form.introduction" autocomplete="off" placeholder="请输入" maxlength="500"/> <el-input type="textarea" show-word-limit v-model="form.introduction" autocomplete="off" placeholder="请输入" maxlength="500" />
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
<template #footer> <template #footer>
<span class="dialog-footer"> <span class="dialog-footer">
<el-button @click="dialogVisible = false">取消</el-button> <el-button @click="dialogVisible = false">取消</el-button>
<el-button :loading="submitLoading" type="primary" @click="submitForm(ruleFormRef)" <el-button :loading="submitLoading" type="primary" @click="submitForm(ruleFormRef)">确定</el-button>
>确定</el-button
>
</span> </span>
</template> </template>
</el-dialog> </el-dialog>
</template> </template>
<script lang="ts"> <script lang="ts">
import {defineComponent, reactive, ref} from 'vue' import { defineComponent, reactive, ref } from "vue";
import teacherApplyUpload from './Upload/TeacherApplyUpload'; import teacherApplyUpload from "./Upload/TeacherApplyUpload";
import { ElMessage } from 'element-plus' import { ElMessage } from "element-plus";
import { addTeacher, getTeacherInfo, editTeacher, judgeIsTeacher } from "../../api/teacher" import { addTeacher, getTeacherInfo, editTeacher, judgeIsTeacher } from "../../api/teacher";
export default defineComponent({ export default defineComponent({
name: 'TeacherApplyModal', name: "TeacherApplyModal",
props:{ props: {
uid:undefined uid: undefined,
}, },
components:{ components: {
teacherApplyUpload teacherApplyUpload,
}, },
setup(props) { setup(props) {
const isTeacher = ref(false); const isTeacher = ref(false);
@ -85,94 +82,92 @@ export default defineComponent({
const ruleFormRef = ref(); const ruleFormRef = ref();
const form = reactive({ const form = reactive({
status: 0, status: 0,
teacherId: '', teacherId: "",
name: '', name: "",
phone: '', phone: "",
introduction: '', introduction: "",
avatar:'', avatar: "",
}) });
const judgeIfTeacher = async () => { const judgeIfTeacher = async () => {
const judgeRes = await judgeIsTeacher(props.uid) const judgeRes = await judgeIsTeacher(props.uid);
if (judgeRes.code === 200){ if (judgeRes.code === 200) {
isTeacher.value = judgeRes.data; isTeacher.value = judgeRes.data;
} }
} };
judgeIfTeacher(); judgeIfTeacher();
const getInfo = async () => { const getInfo = async () => {
console.log('获取用户资料'); console.log("获取用户资料");
const res = await getTeacherInfo(); const res = await getTeacherInfo();
if (res.code === 200 && res.data){ if (res.code === 200 && res.data) {
const {name = '', avatar = '',introduction = '', id= '', phone=''} = res.data; const { name = "", avatar = "", introduction = "", id = "", phone = "" } = res.data;
form.phone = phone; form.phone = phone;
form.name = name; form.name = name;
form.avatar = avatar; form.avatar = avatar;
form.introduction = introduction; form.introduction = introduction;
form.teacherId = id; form.teacherId = id;
form.status=res.data.approvalState; form.status = res.data.approvalState;
} }
} };
const showModal = () => { const showModal = () => {
getInfo(); getInfo();
dialogVisible.value = true dialogVisible.value = true;
} };
// //
const rules = reactive({ const rules = reactive({
name: [ name: [
{ required: true, message: '请输入讲师姓名', trigger: 'blur' }, { required: true, message: "请输入讲师姓名", trigger: "blur" },
{ min: 0, max: 50, message: '字符长度在0-50', trigger: 'blur' }, { min: 0, max: 50, message: "字符长度在0-50", trigger: "blur" },
], ],
introduction: [ introduction: [
{ required: true, message: '请输入讲师介绍', trigger: 'blur' }, { required: true, message: "请输入讲师介绍", trigger: "blur" },
{ min: 0, max: 500, message: '字符长度在0-500', trigger: 'blur' }, { min: 0, max: 500, message: "字符长度在0-500", trigger: "blur" },
],
phone: [
{ required: true, message: '请填写手机号', trigger: 'blur' },
], ],
}) phone: [{ required: true, message: "请填写手机号", trigger: "blur" }],
});
const handleFileSuccess = (response) => { const handleFileSuccess = (response) => {
console.log('上传成功收到回调'); console.log("上传成功收到回调");
console.log(response); console.log(response);
form.avatar = response.path; form.avatar = response.path;
} };
const deleteAvatar = () => { const deleteAvatar = () => {
form.avatar = ''; form.avatar = "";
} };
const submitForm = async (formEl) => { const submitForm = async (formEl) => {
if (!formEl) return if (!formEl) return;
await formEl.validate(async (valid) => { await formEl.validate(async (valid) => {
if (valid) { if (valid) {
console.log('submit!'); console.log("submit!");
console.log(form); console.log(form);
submitLoading.value=true; submitLoading.value = true;
try { try {
let res; let res;
if (form.teacherId){ if (form.teacherId) {
res = await editTeacher(form.teacherId,{...form}); res = await editTeacher(form.teacherId, { ...form });
} else { } else {
res = await addTeacher({...form}); res = await addTeacher({ ...form });
} }
if (res.code === 200 && res.message === 'success'){ if (res.code === 200 && res.message === "success") {
submitLoading.value=false; submitLoading.value = false;
dialogVisible.value = false; dialogVisible.value = false;
qrDialogVisible.value=true; qrDialogVisible.value = true;
} else { } else {
ElMessage({ ElMessage({
message: '提交申请失败,请稍后重试', message: "提交申请失败,请稍后重试",
type: 'warning', type: "warning",
}) });
submitLoading.value=false; submitLoading.value = false;
} }
} catch (e) { } catch (e) {
ElMessage({ ElMessage({
message: '提交申请失败,请稍后重试', message: "提交申请失败,请稍后重试",
type: 'warning', type: "warning",
}) });
submitLoading.value=false; submitLoading.value = false;
} }
} }
}) });
} };
return { return {
isTeacher, isTeacher,
dialogVisible, dialogVisible,
@ -186,120 +181,121 @@ export default defineComponent({
handleFileSuccess, handleFileSuccess,
deleteAvatar, deleteAvatar,
showModal, showModal,
} };
} },
}) });
</script> </script>
<style lang="scss"> <style lang="scss">
.apply_trigger_btn{ .apply_trigger_btn {
font-size: 14px; font-size: 14px;
font-weight: 400; font-weight: 400;
color: #606266; color: #606266;
cursor: pointer; cursor: pointer;
display: flex;
align-items: center;
margin: 10px 0;
margin-left: 20px;
user-select: none;
i {
margin-right: 5px;
}
&:hover {
color: #0082fc;
}
&_watting_text {
color: #ffa940;
margin-left: 5px;
}
}
.teacher-apply-dialog {
z-index: 100;
&_tips {
background-color: #fffbe6;
height: 40px;
display: flex; display: flex;
align-items: center; align-items: center;
margin: 10px 0; font-size: 14px;
margin-left: 20px; color: #515a6e;
user-select: none; padding-left: 24px;
i{ i {
margin-right: 5px; margin-right: 16px;
} color: #ffa940;
&:hover{
color: #0082FC;
} }
&_watting_text{ }
color: #FFA940; .el-dialog__body {
margin-left: 5px; padding: 0;
}
.el-dialog__header {
text-align: left;
}
.el-dialog__footer {
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
}
.success-dialog__title {
font-size: 16px;
font-weight: bold;
color: #17243e;
line-height: 22px;
display: flex;
align-items: center;
justify-content: center;
.icon {
margin-right: 10px;
width: 20px;
height: 20px;
} }
} }
.teacher-apply-dialog{ .success-dialog__btn {
&_tips{ margin: 24px 0;
background-color: #FFFBE6; }
height: 40px; .qrimg {
display: flex; margin-top: 16px;
align-items: center; width: 115px;
font-size: 14px; height: 115px;
color: #515a6e; margin-bottom: 8px;
padding-left: 24px; }
i{ &_form {
margin-right: 16px; padding-left: 24px;
color: #FFA940; padding-right: 120px;
} padding-top: 16px;
.tips_text {
color: #c5c7ce;
} }
.el-dialog__body{ .el-upload-dragger {
padding: 0; border: none;
width: auto;
height: auto;
//position: relative;
//right: 25px;
} }
.el-dialog__header{ .el-upload__tip {
color: #c5c7ce;
margin-top: 0;
text-align: left; text-align: left;
line-height: 20px;
flex: 1;
.delete_btn {
color: #0082fc;
cursor: pointer;
margin-top: 20px;
&:hover {
opacity: 0.6;
}
}
} }
.el-dialog__footer{ .mobile_row {
border-top:1px solid #E8E8E8;
padding: 10px 16px;
}
.success-dialog__title{
font-size: 16px;
font-weight: bold;
color: #17243e;
line-height: 22px;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; font-size: 14px;
.icon{ a {
margin-right: 10px; color: #0082fc;
width: 20px;
height: 20px;
}
}
.success-dialog__btn{
margin: 24px 0;
}
.qrimg{
margin-top: 16px;
width: 115px;
height: 115px;
margin-bottom: 8px;
}
&_form{
padding-left: 24px;
padding-right: 120px;
padding-top: 16px;
.tips_text{
color: #c5c7ce;
}
.el-upload-dragger{
border: none;
width: auto;
height: auto;
//position: relative;
//right: 25px;
}
.el-upload__tip{
color: #c5c7ce;
margin-top: 0;
text-align: left;
line-height: 20px;
flex: 1;
.delete_btn{
color: #0082fc;
cursor: pointer;
margin-top: 20px;
&:hover{
opacity: 0.6;
}
}
} }
.mobile_row{ .mobile_number {
display: flex; color: #262626;
align-items: center; margin-right: 10px;
font-size:14px;
a{
color: #0082FC;
}
.mobile_number{
color: #262626;
margin-right: 10px;
}
} }
} }
} }
}
</style> </style>

26
src/main.js

@ -33,17 +33,17 @@ app.use(VueWechatTitle)
app.use(jsSeamlessScroll) app.use(jsSeamlessScroll)
app.mount('#app') app.mount('#app')
router.afterEach(() => { router.afterEach(() => {
setTimeout(() => { // setTimeout(() => {
//百度统计 // //百度统计
var _hmt = _hmt || []; // var _hmt = _hmt || [];
(function () { // (function () {
//每次执行前,先移除上次插入的代码 // //每次执行前,先移除上次插入的代码
document.getElementById('baidu_tj') && document.getElementById('baidu_tj').remove(); // document.getElementById('baidu_tj') && document.getElementById('baidu_tj').remove();
var hm = document.createElement("script"); // var hm = document.createElement("script");
hm.src = "https://hm.baidu.com/hm.js?f4d7d83c565e698bd7cedfe9c6297055"; // hm.src = "https://hm.baidu.com/hm.js?f4d7d83c565e698bd7cedfe9c6297055";
hm.id = "baidu_tj" // hm.id = "baidu_tj"
var s = document.getElementsByTagName("script")[0]; // var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s); // s.parentNode.insertBefore(hm, s);
})(); // })();
}, 0); // }, 0);
}); });

1
src/views/class/class.vue

@ -237,6 +237,7 @@ export default {
} }
.end_time { .end_time {
white-space: nowrap;
height: 22px !important; height: 22px !important;
padding: 0 8px !important; padding: 0 8px !important;
border-radius: 4px; border-radius: 4px;

5
src/views/class/play.vue

@ -10,6 +10,7 @@
<div class="viewtil" style="min-height:8%"> <div class="viewtil" style="min-height:8%">
<el-page-header @back="goBack" title="返回班级" :content="video.title"> </el-page-header> <el-page-header @back="goBack" title="返回班级" :content="video.title"> </el-page-header>
</div> </div>
<div :class="{ affix: is_scroll }"></div>
<div id="VideoPlay" style=" width:100%; height: 92%; margin-top: auto;" :class="{ affixcss: is_scroll }"></div> <div id="VideoPlay" style=" width:100%; height: 92%; margin-top: auto;" :class="{ affixcss: is_scroll }"></div>
<div class="autotime" v-show="showAutoBox"> <div class="autotime" v-show="showAutoBox">
@ -39,7 +40,7 @@
</div> </div>
<div class="navbox" id="videoList"> <div class="navbox" id="videoList">
<div class="classtil"> <div class="classtil m-dn">
<router-link :to="'/class/' + classid">{{ video.className }}</router-link> <router-link :to="'/class/' + classid">{{ video.className }}</router-link>
</div> </div>
@ -578,7 +579,7 @@ body {
.main { .main {
position: absolute; position: absolute;
top: 118px; top: 96px;
left: 0; left: 0;
bottom: 0; bottom: 0;
right: 0; right: 0;

2
src/views/video/play.vue

@ -583,7 +583,7 @@ body {
.main { .main {
position: absolute; position: absolute;
top: 118px; top: 96px;
left: 0; left: 0;
bottom: 0; bottom: 0;
right: 0; right: 0;

Loading…
Cancel
Save