提交 0555bcbc authored 作者: 王鹏飞's avatar 王鹏飞

chore: 适配移动端

上级 01d76ad6
-----BEGIN RSA PRIVATE KEY----- -----BEGIN RSA PRIVATE KEY-----
MIIEpAIBAAKCAQEAucCbdPPyAp6vmnr5XObuPsctUhVLyXwqbIpgI5jWzjG7wmk8 MIIEpQIBAAKCAQEAwZGHX8Zg+EP5uwnEBWkQazq8DMnKz3QfcNRUjFsxsZjM/98r
V6z8WJKPO9KZM6D9ejtN/bbbd3j1cRiw7NSl8AUykiVHJWz9TXAflET2EpILLera oYYp+K6/i/b8JXAVMqjC9+X/ZajgbDPLTrgDJ4TQ70ajdusqG3swNqG0qLUogNgU
I1B2XAcBsc8dZBGGJD/LT97ZvNLYzuQOr7R1wytWH1uisAK5ClzgnSptMenXFyhw PcgVRKr2Pk+m79GD/nnxFgeaG6eBfLsb73G2cQUwsgi3bjf6mX6b9bjxjqzwX0PW
5Xw0Lm3zoeeqYF/KMQ1McAYMGxgu6s6dxXKiA0BcgWQ31yZey0c4HhCt7T7sA/UN es27yyqdS9uQFzV5KLTA2FJJjGGbg54ZLxVc01aVXx2gG0eLnOFcDSmgXUN4hBmN
ahUsxtCcSNSvdgXay5Pu/l3N88TwW2QzaCzrueILHWRFwkREhpqyrwjN3gkaa+1T gYF4FYHhOVXdMl2+yGGp6IvtIIrt+cp2/TQePnxB2QYwrlDMajHrKp0x7LsqWwZT
jLxzCsk/pTnPccxlFwc3YQ3hYLMl36NJ/OIpHwIDAQABAoIBACuMmaXYz6OHmroI jepPgGWWDssiSgTCYVaPx28ESbotpzR7D+LlHQIDAQABAoIBAQCCvXGrHcmXRgph
HNCIH9E+F0UIUyVg4/1gj9uoqKvdAx04WPphRyRo8AXhgSOWmfb/UnCqX1fqVvj2 62mrodgGJQioto82aZ9mzPNCTcIVyzgDRtAoa/7jSdx0g+CwxLB8pAH0ADPtjQ/v
BfzwehsEzO9wp/aBT/3IzM6RQHPoI5DXX98prSY0SlRqr4RXi3CSOFN4duoLMOOI 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6GAqm4VKQPNriiTsBhYscw== 6GAqm4VKQPNriiTsBhYscw==
-----END CERTIFICATE----- -----END CERTIFICATE-----
<script setup lang="ts">
import { useDevice } from '@/composables/useDevice'
const { mobile } = useDevice()
</script>
<template> <template>
<RouterView /> <router-view :class="{ 'is-h5': mobile, 'is-pc': !mobile }" />
</template> </template>
<style> <style>
......
...@@ -67,7 +67,7 @@ button, ...@@ -67,7 +67,7 @@ button,
select, select,
textarea { textarea {
-webkit-tap-highlight-color: rgba(0, 0, 0, 0); -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
-webkit-appearance: none; appearance: none;
border: 0; border: 0;
border-radius: 0; border-radius: 0;
font: inherit; font: inherit;
...@@ -81,9 +81,8 @@ textarea:focus { ...@@ -81,9 +81,8 @@ textarea:focus {
} }
.el-tabs__item { .el-tabs__item {
--el-font-size-base: 16px; --el-font-size-base: .16rem;
padding: 0 20px !important; padding: 0 20px !important;
min-width: 60px;
font-weight: 400; font-weight: 400;
text-align: center; text-align: center;
} }
...@@ -98,6 +97,53 @@ textarea:focus { ...@@ -98,6 +97,53 @@ textarea:focus {
height: 1px !important; height: 1px !important;
} }
.is-h5 .el-tabs__item {
--el-font-size-base: 14px;
padding: 0 5px !important;
}
.is-h5 .el-tabs__active-bar {
padding: 0 5px;
margin-left: -5px;
}
body { body {
font-size: 14px; font-size: 14px;
} }
html {
font-size: 100px;
}
@media (max-width: 767.98px) {
html {
font-size: 75px;
}
}
/*
@media (min-width: 768px) {
html {
font-size: 100px;
}
}
@media (min-width: 1920px) {
html {
font-size: 5.20833333vw;
}
}
.hidden {
display: none !important;
}
@media (max-width: 1023.5px) {
.hide_xs_sm {
display: none !important;
}
}
@media (max-width: 767.5px) {
.hide_xs {
display: none !important;
}
} */
...@@ -135,20 +135,9 @@ defineExpose({ refetch, tableRef }) ...@@ -135,20 +135,9 @@ defineExpose({ refetch, tableRef })
</template> </template>
<template v-else> <template v-else>
<!-- input --> <!-- input -->
<el-input <el-input v-model="params[item.prop]" v-bind="item" clearable @change="search" style="width: 200px" v-if="item.type === 'input'" />
v-model="params[item.prop]"
v-bind="item"
clearable
@change="search"
style="width: 200px"
v-if="item.type === 'input'" />
<!-- select --> <!-- select -->
<el-select <el-select v-model="params[item.prop]" v-bind="item" filterable @change="search" v-if="item.type === 'select'">
v-model="params[item.prop]"
v-bind="item"
filterable
@change="search"
v-if="item.type === 'select'">
<el-option <el-option
:label="option[item.labelKey] || option.label" :label="option[item.labelKey] || option.label"
:value="option[item.valueKey] || option.value" :value="option[item.valueKey] || option.value"
...@@ -171,13 +160,7 @@ defineExpose({ refetch, tableRef }) ...@@ -171,13 +160,7 @@ defineExpose({ refetch, tableRef })
<!-- 主体 --> <!-- 主体 -->
<div class="table-list-bd"> <div class="table-list-bd">
<slot name="body" v-bind="{ data: dataList }"> <slot name="body" v-bind="{ data: dataList }">
<el-table <el-table stripe :header-cell-style="{ background: '#ededed' }" :data="dataList" v-loading="loading" v-bind="$attrs" ref="tableRef">
stripe
:header-cell-style="{ background: '#ededed' }"
:data="dataList"
v-loading="loading"
v-bind="$attrs"
ref="tableRef">
<el-table-column align="center" v-bind="item || {}" v-for="item in columns" :key="item.prop"> <el-table-column align="center" v-bind="item || {}" v-for="item in columns" :key="item.prop">
<template #default="scope" v-if="item.slots || item.computed"> <template #default="scope" v-if="item.slots || item.computed">
<slot :name="item.slots" v-bind="scope" v-if="item.slots"></slot> <slot :name="item.slots" v-bind="scope" v-if="item.slots"></slot>
...@@ -255,4 +238,11 @@ defineExpose({ refetch, tableRef }) ...@@ -255,4 +238,11 @@ defineExpose({ refetch, tableRef })
margin: -8px -15px; margin: -8px -15px;
padding: 8px 15px; padding: 8px 15px;
} }
.is-h5 {
.el-pagination__total,
.el-pagination__sizes,
.el-pagination__jump {
display: none !important;
}
}
</style> </style>
...@@ -47,21 +47,13 @@ function handleClick(path: string) { ...@@ -47,21 +47,13 @@ function handleClick(path: string) {
<template #title> <template #title>
<el-icon><component :is="item.icon"></component></el-icon>{{ item.name }} <el-icon><component :is="item.icon"></component></el-icon>{{ item.name }}
</template> </template>
<el-menu-item <el-menu-item :index="subitem.path" v-for="subitem in item.children" :key="subitem.path" @click="handleClick(subitem.path)">
:index="subitem.path"
v-for="subitem in item.children"
:key="subitem.path"
@click="handleClick(subitem.path)"
>
{{ subitem.name }} {{ subitem.name }}
</el-menu-item> </el-menu-item>
</el-sub-menu> </el-sub-menu>
<el-menu-item :index="item.path" @click="handleClick(item.path)" v-else> <el-menu-item :index="item.path" @click="handleClick(item.path)" v-else>
<el-icon> <el-icon>
<img <img :src="item.iconImg" v-if="item.path.slice(1, item.path.length) !== route.path.slice(1, route.path.length).split('/')[0]" />
:src="item.iconImg"
v-if="item.path.slice(1, item.path.length) !== route.path.slice(1, route.path.length).split('/')[0]"
/>
<img :src="item.iconActiveImg" v-else /> </el-icon <img :src="item.iconActiveImg" v-else /> </el-icon
>{{ item.name }} >{{ item.name }}
</el-menu-item> </el-menu-item>
...@@ -118,4 +110,9 @@ function handleClick(path: string) { ...@@ -118,4 +110,9 @@ function handleClick(path: string) {
} }
} }
} }
.is-h5 {
.app-aside {
display: none;
}
}
</style> </style>
...@@ -19,7 +19,12 @@ const logout = async () => { ...@@ -19,7 +19,12 @@ const logout = async () => {
<div class="logo"> <div class="logo">
<router-link to="/"><img src="https://zws-imgs-pub.ezijing.com/pc/base/ezijing-logo.svg" /></router-link> <router-link to="/"><img src="https://zws-imgs-pub.ezijing.com/pc/base/ezijing-logo.svg" /></router-link>
</div> </div>
<h1 class="app-name">产业学院</h1> <h1 class="app-name">数字技能实训中心</h1>
</div>
<div class="app-header-center">
<a href="/" class="is-active">理论课程</a>
<a href="https://saas-lab.ezijing.com" target="_blank">商业数据分析</a>
<a href="https://saas-dml-web.ezijing.com" target="_blank">数字营销</a>
</div> </div>
<div class="app-header-right"> <div class="app-header-right">
<el-dropdown v-if="userInfo"> <el-dropdown v-if="userInfo">
...@@ -60,23 +65,34 @@ const logout = async () => { ...@@ -60,23 +65,34 @@ const logout = async () => {
background-color: #fff; background-color: #fff;
border-bottom: 1px solid #e6e6e6; border-bottom: 1px solid #e6e6e6;
.logo { .logo {
width: 120px; width: 1.2rem;
} }
} }
.app-header-left { .app-header-left {
display: flex; display: flex;
align-items: center; align-items: center;
.app-name { .app-name {
margin-left: 20px; margin-left: 0.2rem;
padding: 0 18px; padding: 0 0.18rem;
font-size: 24px; font-size: 0.24rem;
font-weight: 400; font-weight: 400;
line-height: 1; line-height: 1;
color: #333; color: #333;
border-left: 1px solid #707070; border-left: 1px solid #707070;
} }
} }
.app-header-center {
flex: 1;
margin: 0 10px;
a {
font-size: 20px;
color: #333333;
margin-left: 90px;
&.is-active {
color: var(--main-color);
}
}
}
.app-header-right { .app-header-right {
display: flex; display: flex;
...@@ -138,4 +154,9 @@ const logout = async () => { ...@@ -138,4 +154,9 @@ const logout = async () => {
.app-header-user-buttons { .app-header-user-buttons {
padding-top: 16px; padding-top: 16px;
} }
.is-h5 {
.app-header-center {
display: none;
}
}
</style> </style>
...@@ -14,7 +14,7 @@ export default { name: 'AppMain' } ...@@ -14,7 +14,7 @@ export default { name: 'AppMain' }
.app-main { .app-main {
position: relative; position: relative;
flex: 1; flex: 1;
margin: 20px; margin: 0.2rem;
overflow: hidden; overflow: hidden;
} }
.app-main-inner { .app-main-inner {
......
export function useDevice() {
const navigator = window.navigator
const userAgent = ref(navigator.userAgent)
const mobile = computed(() => {
return /iphone/i.test(userAgent.value) || (/android/i.test(userAgent.value) && /mobile/i.test(userAgent.value))
})
const wechat = computed(() => {
return /micromessenger/i.test(userAgent.value)
})
const alipay = computed(() => {
return /alipayclient/i.test(userAgent.value)
})
addEventListener('resize', () => {
if (navigator) userAgent.value = navigator.userAgent
})
return { userAgent, mobile, wechat, alipay }
}
...@@ -100,13 +100,7 @@ function handleSubmit() { ...@@ -100,13 +100,7 @@ function handleSubmit() {
<p class="discuss-item-form__title">回复本楼</p> <p class="discuss-item-form__title">回复本楼</p>
<el-form ref="formRef" :model="form" :rules="rules" hide-required-asterisk> <el-form ref="formRef" :model="form" :rules="rules" hide-required-asterisk>
<el-form-item prop="content"> <el-form-item prop="content">
<el-input <el-input type="textarea" show-word-limit :autosize="{ minRows: 6, maxRows: 6 }" :maxlength="100" v-model="form.content" ref="inputRef" />
type="textarea"
show-word-limit
:autosize="{ minRows: 6, maxRows: 6 }"
:maxlength="100"
v-model="form.content"
ref="inputRef" />
</el-form-item> </el-form-item>
<el-row justify="end"> <el-row justify="end">
<el-button round type="primary" @click="handleSubmit">发表回复</el-button> <el-button round type="primary" @click="handleSubmit">发表回复</el-button>
...@@ -125,8 +119,8 @@ function handleSubmit() { ...@@ -125,8 +119,8 @@ function handleSubmit() {
} }
.discuss-item__left { .discuss-item__left {
position: relative; position: relative;
width: 240px; width: 2.4rem;
padding: 40px; padding: 0.4rem;
text-align: center; text-align: center;
background-color: #f9f9fc; background-color: #f9f9fc;
box-sizing: border-box; box-sizing: border-box;
...@@ -135,8 +129,8 @@ function handleSubmit() { ...@@ -135,8 +129,8 @@ function handleSubmit() {
position: absolute; position: absolute;
left: 0; left: 0;
top: 0; top: 0;
width: 60px; width: 0.6rem;
height: 60px; height: 0.6rem;
color: #fff; color: #fff;
background-color: var(--main-color); background-color: var(--main-color);
z-index: 2000; z-index: 2000;
...@@ -158,8 +152,8 @@ function handleSubmit() { ...@@ -158,8 +152,8 @@ function handleSubmit() {
padding: 5px 10px; padding: 5px 10px;
} }
.discuss-item__avatar { .discuss-item__avatar {
width: 100px; width: 1rem;
height: 100px; height: 1rem;
margin: 0 auto; margin: 0 auto;
img { img {
width: 100%; width: 100%;
...@@ -175,7 +169,7 @@ function handleSubmit() { ...@@ -175,7 +169,7 @@ function handleSubmit() {
} }
.discuss-item__level { .discuss-item__level {
img { img {
width: 40px; width: 0.4rem;
} }
p { p {
font-size: 10px; font-size: 10px;
...@@ -233,4 +227,20 @@ function handleSubmit() { ...@@ -233,4 +227,20 @@ function handleSubmit() {
color: #333; color: #333;
line-height: 40px; line-height: 40px;
} }
.is-h5 {
.discuss-item__left {
width: 80px;
padding: 40px 20px;
}
.discuss-item__avatar {
width: 40px;
height: 40px;
}
.discuss-item__right {
padding: 10px;
.discuss-item__comment {
margin-right: 0;
}
}
}
</style> </style>
...@@ -28,11 +28,7 @@ function handleClick(data: TopPostItem, event: Event) { ...@@ -28,11 +28,7 @@ function handleClick(data: TopPostItem, event: Event) {
<template> <template>
<section class="pined-post" v-if="list.length"> <section class="pined-post" v-if="list.length">
<section class="pined-post-item" v-for="item in list" :key="item.id"> <section class="pined-post-item" v-for="item in list" :key="item.id">
<router-link <router-link :to="`/bbs/${item.id}`" target="_blank" class="pined-post-item__inner" @click="handleClick(item, $event)">
:to="`/bbs/${item.id}`"
target="_blank"
class="pined-post-item__inner"
@click="handleClick(item, $event)">
<p class="t1">置顶</p> <p class="t1">置顶</p>
<p class="t2">{{ item.title }}</p> <p class="t2">{{ item.title }}</p>
<p class="t3" v-if="!courseId"> <p class="t3" v-if="!courseId">
...@@ -53,7 +49,7 @@ function handleClick(data: TopPostItem, event: Event) { ...@@ -53,7 +49,7 @@ function handleClick(data: TopPostItem, event: Event) {
align-items: center; align-items: center;
} }
.pined-post-item { .pined-post-item {
padding: 14px 0; padding: 0.14rem 0;
&:hover { &:hover {
.t2 { .t2 {
color: var(--main-color); color: var(--main-color);
...@@ -98,4 +94,12 @@ function handleClick(data: TopPostItem, event: Event) { ...@@ -98,4 +94,12 @@ function handleClick(data: TopPostItem, event: Event) {
text-align: right; text-align: right;
} }
} }
.is-h5 {
.pined-post-item {
.t4 {
display: none;
}
}
}
</style> </style>
...@@ -153,4 +153,13 @@ function handleBack() { ...@@ -153,4 +153,13 @@ function handleBack() {
} }
} }
} }
.is-h5 {
.el-backtop {
width: 40px;
height: 40px;
.t1 {
font-size: 12px;
}
}
}
</style> </style>
...@@ -157,20 +157,13 @@ function genSubmitQuestion(questionList: PaperQuestionType[]) { ...@@ -157,20 +157,13 @@ function genSubmitQuestion(questionList: PaperQuestionType[]) {
<div class="course-exam-card-bd"> <div class="course-exam-card-bd">
<div class="course-exam-left"> <div class="course-exam-left">
<div class="course-exam-scroll"> <div class="course-exam-scroll">
<CourseExamQuestion <CourseExamQuestion :question="currentQuestion" :status="status" :index="questionIndex + 1" v-if="questionLength">
:question="currentQuestion"
:status="status"
:index="questionIndex + 1"
v-if="questionLength"
>
<template #index>{{ questionIndex + 1 }}/{{ questionLength }}</template> <template #index>{{ questionIndex + 1 }}/{{ questionLength }}</template>
</CourseExamQuestion> </CourseExamQuestion>
</div> </div>
<div class="course-exam-buttons"> <div class="course-exam-buttons">
<el-button size="large" :disabled="questionIndex === 0" @click="handlePrev">上一题</el-button> <el-button size="large" :disabled="questionIndex === 0" @click="handlePrev">上一题</el-button>
<el-button size="large" :disabled="questionIndex >= questionLength - 1" @click="handleNext"> <el-button size="large" :disabled="questionIndex >= questionLength - 1" @click="handleNext"> 下一题 </el-button>
下一题
</el-button>
</div> </div>
</div> </div>
<div class="course-exam-right"> <div class="course-exam-right">
...@@ -178,14 +171,7 @@ function genSubmitQuestion(questionList: PaperQuestionType[]) { ...@@ -178,14 +171,7 @@ function genSubmitQuestion(questionList: PaperQuestionType[]) {
<CourseExamQuestionNumbers :index="questionIndex" :status="status" /> <CourseExamQuestionNumbers :index="questionIndex" :status="status" />
</div> </div>
<div class="course-exam-buttons"> <div class="course-exam-buttons">
<el-button <el-button size="large" type="primary" auto-insert-space :disabled="disabled" @click="handleSubmit" style="width: 100%">
size="large"
type="primary"
auto-insert-space
:disabled="disabled"
@click="handleSubmit"
style="width: 100%"
>
{{ submitButtonText }} {{ submitButtonText }}
</el-button> </el-button>
</div> </div>
...@@ -207,17 +193,17 @@ function genSubmitQuestion(questionList: PaperQuestionType[]) { ...@@ -207,17 +193,17 @@ function genSubmitQuestion(questionList: PaperQuestionType[]) {
} }
.course-exam-card-hd { .course-exam-card-hd {
border-bottom: 1px solid #ccc; border-bottom: 1px solid #ccc;
height: 80px; height: 0.8rem;
background: #ffffff; background: #ffffff;
display: flex; display: flex;
align-items: center; align-items: center;
padding-left: 40px; padding-left: 0.4rem;
.title { .title {
padding-left: 20px; padding-left: 0.2rem;
font-size: 24px; font-size: 0.24rem;
font-weight: bold; font-weight: bold;
color: #222222; color: #222222;
line-height: 80px; line-height: 0.8rem;
} }
.right { .right {
width: 260px; width: 260px;
...@@ -242,10 +228,10 @@ function genSubmitQuestion(questionList: PaperQuestionType[]) { ...@@ -242,10 +228,10 @@ function genSubmitQuestion(questionList: PaperQuestionType[]) {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
.course-exam-scroll { .course-exam-scroll {
padding: 0 40px; padding: 0 0.4rem;
} }
.course-exam-buttons { .course-exam-buttons {
padding: 20px 40px; padding: 0.2rem 0.4rem;
border-top: 1px solid #ccc; border-top: 1px solid #ccc;
} }
} }
...@@ -256,7 +242,7 @@ function genSubmitQuestion(questionList: PaperQuestionType[]) { ...@@ -256,7 +242,7 @@ function genSubmitQuestion(questionList: PaperQuestionType[]) {
position: relative; position: relative;
width: 220px; width: 220px;
background: #fff; background: #fff;
padding: 0 20px; padding: 0 0.2rem;
} }
.course-exam-scroll { .course-exam-scroll {
flex: 1; flex: 1;
...@@ -264,6 +250,11 @@ function genSubmitQuestion(questionList: PaperQuestionType[]) { ...@@ -264,6 +250,11 @@ function genSubmitQuestion(questionList: PaperQuestionType[]) {
overflow-y: auto; overflow-y: auto;
} }
.course-exam-buttons { .course-exam-buttons {
padding: 20px 0; padding: 0.2rem 0;
}
.is-h5 {
.course-exam-right {
width: 80px;
}
} }
</style> </style>
...@@ -101,8 +101,7 @@ const checkboxValues = computed({ ...@@ -101,8 +101,7 @@ const checkboxValues = computed({
:disabled="disabled" :disabled="disabled"
:maxlength="500" :maxlength="500"
:show-word-limit="true" :show-word-limit="true"
v-model="value" v-model="value"></el-input>
></el-input>
</template> </template>
</div> </div>
<div class="question-item-ft" v-if="status === 3"> <div class="question-item-ft" v-if="status === 3">
...@@ -133,53 +132,53 @@ const checkboxValues = computed({ ...@@ -133,53 +132,53 @@ const checkboxValues = computed({
<style lang="scss" scoped> <style lang="scss" scoped>
.question-item { .question-item {
margin-bottom: 40px; margin-bottom: 0.4rem;
} }
.question-item-hd { .question-item-hd {
display: flex; display: flex;
} }
.question-item-hd__num { .question-item-hd__num {
font-size: 32px; font-size: 0.32rem;
font-weight: bold; font-weight: bold;
color: #222; color: #222;
line-height: 45px; line-height: 0.45rem;
margin-top: 5px; margin-top: 5px;
} }
.question-item-hd__title { .question-item-hd__title {
margin-left: 5px; margin-left: 5px;
padding-top: 18px; padding-top: 0.18rem;
font-size: 18px; font-size: 0.18rem;
font-weight: bold; font-weight: bold;
color: #222; color: #222;
line-height: 25px; line-height: 0.25rem;
} }
.question-option-item { .question-option-item {
margin-top: 20px; margin-top: 0.2rem;
width: 100%; width: 100%;
} }
.question-option-item__text { .question-option-item__text {
display: inline-block; display: inline-block;
font-size: 18px; font-size: 0.18rem;
color: #222; color: #222;
white-space: normal; white-space: normal;
} }
.question-item-ft { .question-item-ft {
margin-top: 20px; margin-top: 0.2rem;
} }
.question-item-ft__title { .question-item-ft__title {
font-size: 18px; font-size: 0.18rem;
font-weight: bold; font-weight: bold;
color: #222; color: #222;
line-height: 25px; line-height: 0.25rem;
} }
.answer-item { .answer-item {
margin-top: 10px; margin-top: 0.1rem;
margin-left: 28px; margin-left: 0.28rem;
display: flex; display: flex;
font-size: 18px; font-size: 0.18rem;
color: #222; color: #222;
line-height: 25px; line-height: 0.25rem;
} }
.answer-item-label { .answer-item-label {
white-space: nowrap; white-space: nowrap;
......
...@@ -56,13 +56,7 @@ function handleClick(index: number) { ...@@ -56,13 +56,7 @@ function handleClick(index: number) {
<!-- <div v-for="item in dataList" :key="item.question_item_id"> <!-- <div v-for="item in dataList" :key="item.question_item_id">
<div class="tit">{{ item.title }}</div> --> <div class="tit">{{ item.title }}</div> -->
<ul> <ul>
<li <li v-for="(item, index) in questionList" class="question-num-item" :class="genClass(item, index)" :key="index" @click="handleClick(index)">
v-for="(item, index) in questionList"
class="question-num-item"
:class="genClass(item, index)"
:key="index"
@click="handleClick(index)"
>
{{ index + 1 }} {{ index + 1 }}
</li> </li>
</ul> </ul>
...@@ -169,4 +163,12 @@ function handleClick(index: number) { ...@@ -169,4 +163,12 @@ function handleClick(index: number) {
background: #c01540; background: #c01540;
border-radius: 50%; border-radius: 50%;
} }
.is-h5 {
.question-num {
ul {
grid-template-columns: repeat(2, 1fr);
}
}
}
</style> </style>
...@@ -52,13 +52,7 @@ function handleClick(index: number) { ...@@ -52,13 +52,7 @@ function handleClick(index: number) {
<!-- <div v-for="item in dataList" :key="item.question_item_id"> <!-- <div v-for="item in dataList" :key="item.question_item_id">
<div class="tit">{{ item.title }}</div> --> <div class="tit">{{ item.title }}</div> -->
<ul> <ul>
<li <li v-for="(item, index) in questionList" class="question-num-item" :class="genClass(item)" :key="index" @click="handleClick(index)">
v-for="(item, index) in questionList"
class="question-num-item"
:class="genClass(item)"
:key="index"
@click="handleClick(index)"
>
{{ index + 1 }} {{ index + 1 }}
</li> </li>
</ul> </ul>
...@@ -161,4 +155,12 @@ function handleClick(index: number) { ...@@ -161,4 +155,12 @@ function handleClick(index: number) {
.is-info.is-success { .is-info.is-success {
color: #fff; color: #fff;
} }
.is-h5 {
.question-num {
ul {
grid-template-columns: repeat(8, 1fr);
}
}
}
</style> </style>
...@@ -32,9 +32,9 @@ const isActive = computed(() => props.data.course_id === courseId) ...@@ -32,9 +32,9 @@ const isActive = computed(() => props.data.course_id === courseId)
const targetUrlQuery = computed(() => { const targetUrlQuery = computed(() => {
let queryString = `course_id=${props.data.course_id}&semester_id=${props.data.semester_id}` let queryString = `course_id=${props.data.course_id}&semester_id=${props.data.semester_id}`
if (props.data.section && props.data.section?.watch_video_length) { if (props.data.section && props.data.section?.watch_video_length) {
queryString += `&chapter_id=${props.data.section?.chapter_id ?? ''}&section_id=${ queryString += `&chapter_id=${props.data.section?.chapter_id ?? ''}&section_id=${props.data.section?.section_id ?? ''}&resource_id=${
props.data.section?.section_id ?? '' props.data.section?.resource_id ?? ''
}&resource_id=${props.data.section?.resource_id ?? ''}` }`
} }
return queryString return queryString
...@@ -62,9 +62,7 @@ function handleTop(data: CourseListItemType) { ...@@ -62,9 +62,7 @@ function handleTop(data: CourseListItemType) {
<h2 class="course-item__name">{{ data.course_alias_name || data.name }}</h2> <h2 class="course-item__name">{{ data.course_alias_name || data.name }}</h2>
</div> </div>
</div> </div>
<div class="course-item-progress"> <div class="course-item-progress">总进度<el-progress :stroke-width="4" :percentage="parseFloat(data.schedule)" /></div>
总进度<el-progress :stroke-width="4" :percentage="parseFloat(data.schedule)" />
</div>
</router-link> </router-link>
<div class="course-item-ft"> <div class="course-item-ft">
<div class="course-item-playlist" v-if="data.section?.watch_video_length"> <div class="course-item-playlist" v-if="data.section?.watch_video_length">
...@@ -205,9 +203,8 @@ function handleTop(data: CourseListItemType) { ...@@ -205,9 +203,8 @@ function handleTop(data: CourseListItemType) {
border-bottom-left-radius: 0; border-bottom-left-radius: 0;
} }
} }
::v-deep {
.el-progress-bar__outer { :deep(.el-progress-bar__outer) {
background-color: #efefef; background-color: #efefef;
}
} }
</style> </style>
...@@ -173,7 +173,7 @@ const filterList = computed(() => { ...@@ -173,7 +173,7 @@ const filterList = computed(() => {
padding: 8px; padding: 8px;
} }
.course-filter { .course-filter {
padding: 8px; padding: 8px 0;
} }
.course-filter-item + .course-filter-item { .course-filter-item + .course-filter-item {
margin-top: 20px; margin-top: 20px;
......
...@@ -49,9 +49,7 @@ function formatDuration(duration: number | undefined) { ...@@ -49,9 +49,7 @@ function formatDuration(duration: number | undefined) {
<p>{{ item.name }}</p> <p>{{ item.name }}</p>
</dt> </dt>
<dd v-for="section in item.sections" :key="section.id" :class="{ 'is-active': section.id === sectionId }"> <dd v-for="section in item.sections" :key="section.id" :class="{ 'is-active': section.id === sectionId }">
<router-link <router-link :to="`/course/player?course_id=${courseId}&chapter_id=${item.id}&section_id=${section.id}&semester_id=${semesterId}`">
:to="`/course/player?course_id=${courseId}&chapter_id=${item.id}&section_id=${section.id}&semester_id=${semesterId}`"
>
{{ section.name }} {{ section.name }}
</router-link> </router-link>
</dd> </dd>
...@@ -59,12 +57,7 @@ function formatDuration(duration: number | undefined) { ...@@ -59,12 +57,7 @@ function formatDuration(duration: number | undefined) {
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="讲义" name="ppt" v-if="pptList && pptList.length"> <el-tab-pane label="讲义" name="ppt" v-if="pptList && pptList.length">
<ul class="lecture-list"> <ul class="lecture-list">
<li <li v-for="(item, index) in pptList" :class="{ 'is-active': index === pptIndex }" :key="item.url" @click="$emit('clickPPT', item)">
v-for="(item, index) in pptList"
:class="{ 'is-active': index === pptIndex }"
:key="item.url"
@click="$emit('clickPPT', item)"
>
<img :src="`${item.url}?x-oss-process=image/resize,m_fill,h_128,w_218`" loading="lazy" /> <img :src="`${item.url}?x-oss-process=image/resize,m_fill,h_128,w_218`" loading="lazy" />
<span>{{ formatDuration(item.point) }}</span> <span>{{ formatDuration(item.point) }}</span>
</li> </li>
...@@ -77,7 +70,7 @@ function formatDuration(duration: number | undefined) { ...@@ -77,7 +70,7 @@ function formatDuration(duration: number | undefined) {
<style lang="scss" scoped> <style lang="scss" scoped>
.course-player-chapter { .course-player-chapter {
height: 100%; height: 100%;
padding: 20px; padding: 0.2rem;
background-color: #1f1e24; background-color: #1f1e24;
box-sizing: border-box; box-sizing: border-box;
:deep(.el-tabs__nav) { :deep(.el-tabs__nav) {
...@@ -88,9 +81,9 @@ function formatDuration(duration: number | undefined) { ...@@ -88,9 +81,9 @@ function formatDuration(duration: number | undefined) {
display: none; display: none;
} }
:deep(.el-tabs__item) { :deep(.el-tabs__item) {
height: 40px; height: 0.4rem;
font-size: 16px; font-size: 0.16rem;
line-height: 40px; line-height: 0.4rem;
color: #89898b; color: #89898b;
&.is-active { &.is-active {
color: #fff; color: #fff;
...@@ -98,7 +91,7 @@ function formatDuration(duration: number | undefined) { ...@@ -98,7 +91,7 @@ function formatDuration(duration: number | undefined) {
} }
dl { dl {
color: #fff; color: #fff;
padding: 20px 0; padding: 0.2rem 0;
} }
dl + dl { dl + dl {
border-top: 1px dashed #b2b2b2; border-top: 1px dashed #b2b2b2;
...@@ -106,30 +99,30 @@ function formatDuration(duration: number | undefined) { ...@@ -106,30 +99,30 @@ function formatDuration(duration: number | undefined) {
dt { dt {
display: flex; display: flex;
align-items: center; align-items: center;
margin-bottom: 10px; margin-bottom: 0.1rem;
span { span {
display: inline-block; display: inline-block;
width: 26px; width: 0.26rem;
height: 26px; height: 0.26rem;
color: var(--main-color); color: var(--main-color);
line-height: 26px; line-height: 0.26rem;
text-align: center; text-align: center;
background-color: #fff; background-color: #fff;
border-radius: 50%; border-radius: 50%;
} }
p { p {
flex: 1; flex: 1;
margin-left: 8px; margin-left: 0.08rem;
font-size: 16px; font-size: 0.16rem;
font-weight: 500; font-weight: 500;
line-height: 26px; line-height: 0.26rem;
color: #fff; color: #fff;
} }
} }
dd { dd {
margin-left: 34px; margin-left: 0.34rem;
padding: 5px 0 5px 1em; padding: 5px 0 5px 1em;
font-size: 14px; font-size: 0.14rem;
font-weight: 400; font-weight: 400;
line-height: 24px; line-height: 24px;
color: #ffffff; color: #ffffff;
...@@ -141,7 +134,7 @@ function formatDuration(duration: number | undefined) { ...@@ -141,7 +134,7 @@ function formatDuration(duration: number | undefined) {
.lecture-list { .lecture-list {
li { li {
position: relative; position: relative;
margin: 10px 0; margin: 0.1rem 0;
height: 128px; height: 128px;
cursor: pointer; cursor: pointer;
&.is-active { &.is-active {
...@@ -154,8 +147,8 @@ function formatDuration(duration: number | undefined) { ...@@ -154,8 +147,8 @@ function formatDuration(duration: number | undefined) {
} }
span { span {
position: absolute; position: absolute;
left: 10px; left: 0.1rem;
top: 10px; top: 0.1rem;
padding: 0 5px; padding: 0 5px;
font-size: 12px; font-size: 12px;
background: rgba(255, 255, 255, 0.5); background: rgba(255, 255, 255, 0.5);
......
...@@ -11,6 +11,8 @@ import { Close } from '@element-plus/icons-vue' ...@@ -11,6 +11,8 @@ import { Close } from '@element-plus/icons-vue'
import AppVideoPlayer from '@/components/base/AppVideoPlayer.vue' import AppVideoPlayer from '@/components/base/AppVideoPlayer.vue'
import { getCoursePlayInfo, getVideoRecords, uploadVideoRecords } from '../api' import { getCoursePlayInfo, getVideoRecords, uploadVideoRecords } from '../api'
import { useLog } from '@/composables/useLog' import { useLog } from '@/composables/useLog'
import { useDevice } from '@/composables/useDevice'
const { mobile } = useDevice()
const log = useLog({ hasKey: true }) const log = useLog({ hasKey: true })
interface Props { interface Props {
...@@ -275,8 +277,8 @@ onUnmounted(() => { ...@@ -275,8 +277,8 @@ onUnmounted(() => {
<template> <template>
<div class="course-player-wrapper"> <div class="course-player-wrapper">
<div ref="playerWrapperRef" :style="resource ? `height: 510px` : ''"> <div class="course-player-box" ref="playerWrapperRef" :style="resource ? `height: 510px` : ''">
<div class="player-box" :class="{ 'is-pinned': !playerIsVisible && !miniPlayerClosed }"> <div class="player-box" :class="{ 'is-pinned': !playerIsVisible && !miniPlayerClosed && !mobile }">
<AppVideoPlayer <AppVideoPlayer
:options="options" :options="options"
:src="src" :src="src"
...@@ -286,8 +288,7 @@ onUnmounted(() => { ...@@ -286,8 +288,7 @@ onUnmounted(() => {
@seeked="onSeeked" @seeked="onSeeked"
@ended="onEnded" @ended="onEnded"
style="width: 100%; height: 100%" style="width: 100%; height: 100%"
v-if="src" v-if="src"></AppVideoPlayer>
></AppVideoPlayer>
<el-icon class="mini-player-close" @click="miniPlayerClosed = true"> <el-icon class="mini-player-close" @click="miniPlayerClosed = true">
<Close></Close> <Close></Close>
</el-icon> </el-icon>
...@@ -302,12 +303,7 @@ onUnmounted(() => { ...@@ -302,12 +303,7 @@ onUnmounted(() => {
</button> </button>
</template> </template>
<ul class="video-definition"> <ul class="video-definition">
<li <li v-for="(item, index) in currentPlayList" :key="index" :class="{ 'is-active': item.PlayURL === src.src }" @click="changeSrc(item)">
v-for="(item, index) in currentPlayList"
:key="index"
:class="{ 'is-active': item.PlayURL === src.src }"
@click="changeSrc(item)"
>
{{ item.DefinitionName }} {{ item.DefinitionName }}
</li> </li>
</ul> </ul>
...@@ -330,8 +326,7 @@ onUnmounted(() => { ...@@ -330,8 +326,7 @@ onUnmounted(() => {
:key="item.id" :key="item.id"
class="video-item" class="video-item"
:class="{ 'is-active': item.resource_id === resourceId }" :class="{ 'is-active': item.resource_id === resourceId }"
@click="changeResource(item)" @click="changeResource(item)">
>
<div class="video-item-pic"> <div class="video-item-pic">
<img :src="item.info?.cover" /> <img :src="item.info?.cover" />
</div> </div>
...@@ -343,7 +338,7 @@ onUnmounted(() => { ...@@ -343,7 +338,7 @@ onUnmounted(() => {
<style lang="scss" scoped> <style lang="scss" scoped>
.course-player-wrapper { .course-player-wrapper {
margin-bottom: 40px; margin-bottom: 0.4rem;
border-bottom: 1px solid #e2e2e2; border-bottom: 1px solid #e2e2e2;
} }
.player-box { .player-box {
...@@ -387,14 +382,14 @@ onUnmounted(() => { ...@@ -387,14 +382,14 @@ onUnmounted(() => {
} }
.video-item { .video-item {
position: relative; position: relative;
margin: 20px 0; margin: 0.2rem 0;
width: 238px; width: 2.38rem;
cursor: pointer; cursor: pointer;
box-sizing: border-box; box-sizing: border-box;
p { p {
padding: 0 8px; padding: 0 8px;
font-size: 14px; font-size: 0.14rem;
line-height: 30px; line-height: 30px;
color: #333; color: #333;
white-space: nowrap; white-space: nowrap;
...@@ -424,7 +419,7 @@ onUnmounted(() => { ...@@ -424,7 +419,7 @@ onUnmounted(() => {
} }
.video-item-pic { .video-item-pic {
width: 100%; width: 100%;
height: 148px; height: 1.48rem;
border-radius: 10px; border-radius: 10px;
box-sizing: border-box; box-sizing: border-box;
overflow: hidden; overflow: hidden;
...@@ -477,8 +472,8 @@ onUnmounted(() => { ...@@ -477,8 +472,8 @@ onUnmounted(() => {
:deep(.swiper-button-prev) { :deep(.swiper-button-prev) {
margin-top: -30px; margin-top: -30px;
--swiper-navigation-size: 14px; --swiper-navigation-size: 14px;
width: 34px; width: 0.34rem;
height: 34px; height: 0.34rem;
color: #fff; color: #fff;
background: #303133; background: #303133;
border-radius: 50%; border-radius: 50%;
......
...@@ -4,7 +4,8 @@ import type { CourseAssessChapterType } from '../types' ...@@ -4,7 +4,8 @@ import type { CourseAssessChapterType } from '../types'
import format from 'format-duration' import format from 'format-duration'
import { getChapterVideoTreeList } from '../api' import { getChapterVideoTreeList } from '../api'
import { useDevice } from '@/composables/useDevice'
const { mobile } = useDevice()
const { query } = useRoute() const { query } = useRoute()
const courseId = $ref(query.course_id as string) const courseId = $ref(query.course_id as string)
const semesterId = $ref(query.semester_id as string) const semesterId = $ref(query.semester_id as string)
...@@ -94,10 +95,10 @@ function formatDuration(duration: number | undefined) { ...@@ -94,10 +95,10 @@ function formatDuration(duration: number | undefined) {
<template v-else>{{ row.name }}</template> <template v-else>{{ row.name }}</template>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="watch_video_length" label="学习时长" width="180" align="center"> <el-table-column prop="watch_video_length" label="学习时长" :width="mobile ? '90' : '180'" align="center">
<template #default="{ row }">{{ formatDuration(row.watch_video_length) }}</template> <template #default="{ row }">{{ formatDuration(row.watch_video_length) }}</template>
</el-table-column> </el-table-column>
<el-table-column prop="name" label="百分比" width="180" align="center"> <el-table-column prop="name" label="百分比" :width="mobile ? '100' : '180'" align="center">
<template #default="{ row }"> <template #default="{ row }">
<el-progress :percentage="parseFloat(row.schedule)" /> <el-progress :percentage="parseFloat(row.schedule)" />
</template> </template>
...@@ -106,14 +107,14 @@ function formatDuration(duration: number | undefined) { ...@@ -106,14 +107,14 @@ function formatDuration(duration: number | undefined) {
</div> </div>
</template> </template>
<style lang="scss" scoped> <style lang="scss">
.course-assess-hd { .course-assess-hd {
padding-bottom: 20px; padding-bottom: 0.2rem;
display: flex; display: flex;
align-items: center; align-items: center;
.t1 { .t1 {
flex: 1; flex: 1;
font-size: 16px; font-size: 0.16rem;
font-weight: 400; font-weight: 400;
color: var(--main-color); color: var(--main-color);
} }
...@@ -121,19 +122,32 @@ function formatDuration(duration: number | undefined) { ...@@ -121,19 +122,32 @@ function formatDuration(duration: number | undefined) {
.course-assess-hd__aside { .course-assess-hd__aside {
display: flex; display: flex;
.t2 { .t2 {
padding: 0 20px; padding: 0 0.2rem;
font-size: 16px; font-size: 0.16rem;
color: #333333; color: #333333;
} }
} }
:deep(.el-table__row--level-0) { .course-assess {
font-size: 16px; .el-table__row--level-0 {
font-weight: 500; font-size: 0.16rem;
color: #333; font-weight: 500;
color: #333;
}
.el-table__row--level-1 {
font-size: 0.16rem;
font-weight: 400;
color: #333;
}
} }
:deep(.el-table__row--level-1) {
font-size: 16px; .is-h5 {
font-weight: 400; .course-assess {
color: #333; .course-assess-hd {
flex-direction: column;
}
.el-table__indent {
padding-left: 0 !important;
}
}
} }
</style> </style>
...@@ -23,4 +23,22 @@ const semesterId = route.query.semester_id as string ...@@ -23,4 +23,22 @@ const semesterId = route.query.semester_id as string
padding: 0; padding: 0;
} }
} }
.is-h5 {
.course-bbs {
.table-list-hd {
display: block;
.el-select {
width: 82px;
}
.el-form-item {
margin-right: 0;
}
.el-input__wrapper {
padding: 0;
padding-right: 5px;
box-shadow: none;
}
}
}
}
</style> </style>
...@@ -156,8 +156,7 @@ defineExpose({ ...@@ -156,8 +156,7 @@ defineExpose({
:to="`/course/exam/result?course_id=${courseId}&semester_id=${semesterId}&paper_id=${resource.resource_id}&type=2&paper_title=${resource.name}`" :to="`/course/exam/result?course_id=${courseId}&semester_id=${semesterId}&paper_id=${resource.resource_id}&type=2&paper_title=${resource.name}`"
target="_blank" target="_blank"
style="margin: 0 20px" style="margin: 0 20px"
v-if="resource.paper_status === 2 || resource.paper_status === 3" v-if="resource.paper_status === 2 || resource.paper_status === 3">
>
<el-button round size="small">查看报告</el-button> <el-button round size="small">查看报告</el-button>
</router-link> </router-link>
...@@ -174,8 +173,7 @@ defineExpose({ ...@@ -174,8 +173,7 @@ defineExpose({
class="icon-star" class="icon-star"
:class="!!resource.collection_count ? 'is-active' : ''" :class="!!resource.collection_count ? 'is-active' : ''"
@click="toggleCollection(resource, section, item)" @click="toggleCollection(resource, section, item)"
v-if="canCollection(resource)" v-if="canCollection(resource)"></i>
></i>
<i class="icon-download" @click="downloadFile(resource)" v-if="!!resource.can_download"> <i class="icon-download" @click="downloadFile(resource)" v-if="!!resource.can_download">
<Download /> <Download />
</i> </i>
...@@ -193,9 +191,9 @@ defineExpose({ ...@@ -193,9 +191,9 @@ defineExpose({
.course-resource-item { .course-resource-item {
display: flex; display: flex;
align-items: center; align-items: center;
padding: 0 48px 0 60px; padding: 0 0.28rem 0 0.4rem;
height: 48px; height: 0.48rem;
line-height: 48px; line-height: 0.48rem;
border-bottom: 1px solid #e6e6e6; border-bottom: 1px solid #e6e6e6;
p { p {
flex: 1; flex: 1;
...@@ -205,6 +203,9 @@ defineExpose({ ...@@ -205,6 +203,9 @@ defineExpose({
color: #666; color: #666;
} }
a { a {
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
&:hover { &:hover {
color: var(--main-color); color: var(--main-color);
} }
...@@ -214,7 +215,7 @@ defineExpose({ ...@@ -214,7 +215,7 @@ defineExpose({
} }
.actions { .actions {
min-width: 60px; min-width: 0.6rem;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
...@@ -226,8 +227,8 @@ defineExpose({ ...@@ -226,8 +227,8 @@ defineExpose({
} }
.icon-star { .icon-star {
display: inline-block; display: inline-block;
width: 16px; width: 0.16rem;
height: 16px; height: 0.16rem;
background: url(@/assets/images/icon_star.png) no-repeat; background: url(@/assets/images/icon_star.png) no-repeat;
background-size: contain; background-size: contain;
cursor: pointer; cursor: pointer;
...@@ -238,21 +239,21 @@ defineExpose({ ...@@ -238,21 +239,21 @@ defineExpose({
} }
.icon-download { .icon-download {
display: inline-block; display: inline-block;
width: 20px; width: 0.2rem;
height: 20px; height: 0.2rem;
cursor: pointer; cursor: pointer;
} }
.icon-chapter { .icon-chapter {
margin-right: 10px; margin-right: 0.1rem;
display: inline-block; display: inline-block;
width: 16px; width: 0.16rem;
height: 20px; height: 0.2rem;
background: url(@/assets/images/icon_chapter.png) no-repeat; background: url(@/assets/images/icon_chapter.png) no-repeat;
background-size: contain; background-size: contain;
} }
.course-chapters { .course-chapters {
:deep(.el-collapse-item__header) { :deep(.el-collapse-item__header) {
padding: 0 20px; padding: 0 0.2rem;
background-color: #e8e9eb; background-color: #e8e9eb;
border-bottom: none; border-bottom: none;
} }
...@@ -260,18 +261,18 @@ defineExpose({ ...@@ -260,18 +261,18 @@ defineExpose({
.course-sections { .course-sections {
margin-top: 10px; margin-top: 10px;
:deep(.el-collapse-item__header) { :deep(.el-collapse-item__header) {
padding: 0 40px; padding: 0 0.2rem 0 0.3rem;
background-color: #f7f8fa; background-color: #f7f8fa;
border-bottom: none; border-bottom: none;
} }
} }
.chapter-title { .chapter-title {
font-size: 16px; font-size: 0.16rem;
font-weight: 500; font-weight: 500;
color: #333333; color: #333333;
} }
.section-title { .section-title {
font-size: 14px; font-size: 0.1rrem;
font-weight: 400; font-weight: 400;
color: #333333; color: #333333;
} }
...@@ -288,4 +289,12 @@ defineExpose({ ...@@ -288,4 +289,12 @@ defineExpose({
:deep(.el-collapse-item) { :deep(.el-collapse-item) {
margin-bottom: 10px; margin-bottom: 10px;
} }
.is-h5 {
.video-duration {
display: none;
}
.actions {
min-width: unset;
}
}
</style> </style>
...@@ -35,6 +35,11 @@ defineProps<Props>() ...@@ -35,6 +35,11 @@ defineProps<Props>()
flex: 1; flex: 1;
line-height: 48px; line-height: 48px;
} }
a {
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
&:hover { &:hover {
color: var(--main-color); color: var(--main-color);
} }
...@@ -45,4 +50,10 @@ defineProps<Props>() ...@@ -45,4 +50,10 @@ defineProps<Props>()
justify-content: space-between; justify-content: space-between;
} }
} }
.is-h5 {
.actions {
display: none;
}
}
</style> </style>
...@@ -118,12 +118,7 @@ onMounted(() => { ...@@ -118,12 +118,7 @@ onMounted(() => {
</div> </div>
<div class="chart-box-bd"> <div class="chart-box-bd">
<div class="score"> <div class="score">
<el-progress <el-progress color="#ba143e" :stroke-width="8" :percentage="detail.score ? parseFloat(detail.score) : 0" style="width: 100%">
color="#ba143e"
:stroke-width="8"
:percentage="detail.score ? parseFloat(detail.score) : 0"
style="width: 100%"
>
<img src="@/assets/images/icon_exam_result.png" width="24" /> <img src="@/assets/images/icon_exam_result.png" width="24" />
</el-progress> </el-progress>
<template v-if="detail.status !== 3"> <template v-if="detail.status !== 3">
...@@ -152,11 +147,11 @@ onMounted(() => { ...@@ -152,11 +147,11 @@ onMounted(() => {
height: 100%; height: 100%;
background-color: #fff; background-color: #fff;
border-radius: 6px; border-radius: 6px;
padding: 20px; padding: 0.2rem;
box-sizing: border-box; box-sizing: border-box;
} }
.course-exam-card + .course-exam-card { .course-exam-card + .course-exam-card {
margin-left: 20px; margin-left: 0.2rem;
} }
.chart-box-hd { .chart-box-hd {
display: flex; display: flex;
...@@ -168,7 +163,7 @@ onMounted(() => { ...@@ -168,7 +163,7 @@ onMounted(() => {
border-bottom: 1px solid #ccc; border-bottom: 1px solid #ccc;
} }
.chart-box-bd { .chart-box-bd {
padding: 20px 0; padding: 0.2rem 0;
} }
.chart-wrapper { .chart-wrapper {
display: flex; display: flex;
...@@ -176,24 +171,24 @@ onMounted(() => { ...@@ -176,24 +171,24 @@ onMounted(() => {
justify-content: center; justify-content: center;
} }
.chart-item { .chart-item {
padding: 40px; padding: 0.4rem;
display: flex; display: flex;
align-items: center; align-items: center;
} }
.chart-item__title { .chart-item__title {
padding: 20px; padding: 0.2rem;
font-size: 22px; font-size: 0.22rem;
color: #333; color: #333;
} }
.chart-item__content { .chart-item__content {
p { p {
font-size: 22px; font-size: 0.22rem;
color: #333; color: #333;
} }
} }
.score { .score {
width: 300px; width: 3rem;
margin: 10px auto; margin: 0.1rem auto;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
...@@ -214,4 +209,18 @@ onMounted(() => { ...@@ -214,4 +209,18 @@ onMounted(() => {
margin: 50px 0 68px 0; margin: 50px 0 68px 0;
} }
} }
.is-h5 {
.course-exam-result {
flex-direction: column;
}
.course-exam-card {
margin-bottom: 0.2rem;
margin-left: 0;
}
.chart-item {
padding: 0;
}
}
</style> </style>
...@@ -5,6 +5,8 @@ import type { CourseListParamsType, CourseListItemType } from '../types' ...@@ -5,6 +5,8 @@ import type { CourseListParamsType, CourseListItemType } from '../types'
import { getCourseList } from '../api' import { getCourseList } from '../api'
import { useUserStore } from '@/stores/user' import { useUserStore } from '@/stores/user'
import { useLog } from '@/composables/useLog' import { useLog } from '@/composables/useLog'
import { useDevice } from '@/composables/useDevice'
const { mobile } = useDevice()
const log = useLog() const log = useLog()
const userStore = useUserStore() const userStore = useUserStore()
...@@ -23,7 +25,7 @@ function fetchList() { ...@@ -23,7 +25,7 @@ function fetchList() {
courseList = res.data.data courseList = res.data.data
const [first] = courseList const [first] = courseList
// 进入第一个课程详情页 // 进入第一个课程详情页
if (first && route.path === '/course') { if (first && route.path === '/course' && !mobile.value) {
router.push({ path: '/course/view', query: { course_id: first.course_id, semester_id: first.semester_id } }) router.push({ path: '/course/view', query: { course_id: first.course_id, semester_id: first.semester_id } })
} }
}) })
...@@ -44,7 +46,7 @@ log.upload({ ...@@ -44,7 +46,7 @@ log.upload({
</script> </script>
<template> <template>
<section class="course"> <section class="course" :class="route.path === '/course' ? 'is-list' : 'is-view'">
<div class="course-left"> <div class="course-left">
<CourseListSearch @change="handleSearch"></CourseListSearch> <CourseListSearch @change="handleSearch"></CourseListSearch>
<div class="course-list"> <div class="course-list">
...@@ -75,5 +77,24 @@ log.upload({ ...@@ -75,5 +77,24 @@ log.upload({
.course-right { .course-right {
flex: 1; flex: 1;
overflow: hidden; overflow: hidden;
margin-left: 20px;
}
.is-h5 {
.course-left {
flex: 1;
}
.course-right {
margin-left: 0;
}
.is-list {
.course-right {
display: none;
}
}
.is-view {
.course-left {
display: none;
}
}
} }
</style> </style>
...@@ -5,6 +5,8 @@ import CoursePlayerResourceList from '../components/CoursePlayerResourceList.vue ...@@ -5,6 +5,8 @@ import CoursePlayerResourceList from '../components/CoursePlayerResourceList.vue
import { ArrowLeftBold, ArrowRightBold } from '@element-plus/icons-vue' import { ArrowLeftBold, ArrowRightBold } from '@element-plus/icons-vue'
import type { VideoJsPlayer } from 'video.js' import type { VideoJsPlayer } from 'video.js'
import type { PptType } from '@/types' import type { PptType } from '@/types'
import { useDevice } from '@/composables/useDevice'
const { mobile } = useDevice()
const CoursePlayerVideo = defineAsyncComponent(() => import('../components/CoursePlayerVideo.vue')) const CoursePlayerVideo = defineAsyncComponent(() => import('../components/CoursePlayerVideo.vue'))
const CoursePlayerChapter = defineAsyncComponent(() => import('../components/CoursePlayerChapter.vue')) const CoursePlayerChapter = defineAsyncComponent(() => import('../components/CoursePlayerChapter.vue'))
...@@ -95,13 +97,8 @@ function toggleSidebar() { ...@@ -95,13 +97,8 @@ function toggleSidebar() {
</div> </div>
<div class="course-player-bd"> <div class="course-player-bd">
<div class="course-player-main" v-loading="loading"> <div class="course-player-main" v-loading="loading">
<CoursePlayerVideo <CoursePlayerVideo :chapterList="chapterList" :key="sectionId" @updateResource="onUpdateResource" @timeupdate="onTimeUpdate" />
:chapterList="chapterList" <el-tabs :stretch="mobile">
:key="sectionId"
@updateResource="onUpdateResource"
@timeupdate="onTimeUpdate"
/>
<el-tabs>
<el-tab-pane label="课件"> <el-tab-pane label="课件">
<CoursePlayerResourceList :list="detail.coursewares" /> <CoursePlayerResourceList :list="detail.coursewares" />
</el-tab-pane> </el-tab-pane>
...@@ -124,12 +121,7 @@ function toggleSidebar() { ...@@ -124,12 +121,7 @@ function toggleSidebar() {
</div> </div>
<div class="course-player-aside" :class="{ 'is-hidden': !sidebarVisible }"> <div class="course-player-aside" :class="{ 'is-hidden': !sidebarVisible }">
<div class="course-player-aside__inner"> <div class="course-player-aside__inner">
<CoursePlayerChapter <CoursePlayerChapter :chapterList="chapterList" :pptList="pptList" :pptIndex="pptIndex" @clickPPT="onClickPPT" />
:chapterList="chapterList"
:pptList="pptList"
:pptIndex="pptIndex"
@clickPPT="onClickPPT"
/>
</div> </div>
<div class="toggle-button" :class="{ 'is-hidden': !sidebarVisible }" @click="toggleSidebar"> <div class="toggle-button" :class="{ 'is-hidden': !sidebarVisible }" @click="toggleSidebar">
<el-icon> <el-icon>
...@@ -142,7 +134,7 @@ function toggleSidebar() { ...@@ -142,7 +134,7 @@ function toggleSidebar() {
</div> </div>
</template> </template>
<style lang="scss" scoped> <style lang="scss">
.course-player { .course-player {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
...@@ -222,4 +214,35 @@ function toggleSidebar() { ...@@ -222,4 +214,35 @@ function toggleSidebar() {
padding: 0 20px; padding: 0 20px;
margin-left: -20px; margin-left: -20px;
} }
.is-h5 {
.course-player {
padding: 0;
background-color: transparent;
}
.course-player-bd {
position: relative;
flex-direction: column;
}
.course-player-aside {
margin-top: 220px;
order: -1;
flex: 1;
width: 100%;
margin-left: 0;
}
.course-player-box {
position: absolute;
top: 0;
width: 100%;
height: 220px !important;
}
.toggle-button {
display: none;
}
.course-player-main {
.course-resource-item {
padding: 0;
}
}
}
</style> </style>
...@@ -2,6 +2,8 @@ ...@@ -2,6 +2,8 @@
import { useMapStore } from '@/stores/map' import { useMapStore } from '@/stores/map'
import type { CourseType } from '@/types' import type { CourseType } from '@/types'
import * as api from '../api' import * as api from '../api'
import { useDevice } from '@/composables/useDevice'
const { mobile } = useDevice()
const CourseViewChapter = defineAsyncComponent(() => import('../components/CourseViewChapter.vue')) const CourseViewChapter = defineAsyncComponent(() => import('../components/CourseViewChapter.vue'))
const CourseViewBBS = defineAsyncComponent(() => import('../components/CourseViewBBS.vue')) const CourseViewBBS = defineAsyncComponent(() => import('../components/CourseViewBBS.vue'))
...@@ -87,18 +89,18 @@ function handleStudy() { ...@@ -87,18 +89,18 @@ function handleStudy() {
<div class="btn" @click="handleStudy">立即学习</div> <div class="btn" @click="handleStudy">立即学习</div>
</div> </div>
<div class="course-view-r"> <div class="course-view-r">
<div class="name">{{ detail.course_alias_name || detail.name }}</div> <div class="course-view-r__info">
<div class="tag-box"> <div class="name">{{ detail.course_alias_name || detail.name }}</div>
<div class="tag">{{ electiveTypeText }}</div> <div class="tag-box">
<div class="tag">{{ detail.credit }}学分</div> <div class="tag">{{ electiveTypeText }}</div>
<div class="tag" v-if="detail.semester">{{ detail.semester.name }}</div> <div class="tag">{{ detail.credit }}学分</div>
<div class="tag" v-if="detail.semester">{{ detail.semester.name }}</div>
</div>
</div> </div>
<div class="view-content"> <div class="view-content">
<div class="view-content-hd"> <div class="view-content-hd">
<div :class="infoIndex === 0 ? 'btn active' : 'btn'" @click="showInfo(detail.represent, 0)">课程简介</div> <div :class="infoIndex === 0 ? 'btn active' : 'btn'" @click="showInfo(detail.represent, 0)">课程简介</div>
<div :class="infoIndex === 1 ? 'btn active' : 'btn'" @click="showInfo(detail.previous_preparation, 1)"> <div :class="infoIndex === 1 ? 'btn active' : 'btn'" @click="showInfo(detail.previous_preparation, 1)" v-if="false">预备知识</div>
预备知识
</div>
<div :class="infoIndex === 2 ? 'btn active' : 'btn'" @click="showInfo(detail.target, 2)">授课目标</div> <div :class="infoIndex === 2 ? 'btn active' : 'btn'" @click="showInfo(detail.target, 2)">授课目标</div>
</div> </div>
<div class="view-content_c" v-if="infoText === ''"> <div class="view-content_c" v-if="infoText === ''">
...@@ -145,7 +147,7 @@ function handleStudy() { ...@@ -145,7 +147,7 @@ function handleStudy() {
</section> --> </section> -->
<div class="course-view-content"> <div class="course-view-content">
<div class="course-view-bd"> <div class="course-view-bd">
<el-tabs> <el-tabs :stretch="mobile">
<el-tab-pane label="学习"> <el-tab-pane label="学习">
<CourseViewChapter ref="courseViewChapterRef" /> <CourseViewChapter ref="courseViewChapterRef" />
</el-tab-pane> </el-tab-pane>
...@@ -173,8 +175,10 @@ function handleStudy() { ...@@ -173,8 +175,10 @@ function handleStudy() {
<div class="teacher-hd">课程讲师</div> <div class="teacher-hd">课程讲师</div>
<div class="teacher-content" v-for="item in detail.lecturers" :key="item.id"> <div class="teacher-content" v-for="item in detail.lecturers" :key="item.id">
<img :src="item.avatar" class="lecturer-item__pic" /> <img :src="item.avatar" class="lecturer-item__pic" />
<div class="name">{{ item.name }}</div> <div class="box">
<div class="dec" v-html="item.summarize"></div> <div class="name">{{ item.name }}</div>
<div class="dec" v-html="item.summarize"></div>
</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -186,24 +190,23 @@ function handleStudy() { ...@@ -186,24 +190,23 @@ function handleStudy() {
<style lang="scss" scoped> <style lang="scss" scoped>
.course-view-h { .course-view-h {
position: relative;
background: #ab0a3d; background: #ab0a3d;
box-shadow: 0px 1px 12px 1px rgba(0, 0, 0, 0.1098); box-shadow: 0px 1px 12px 1px rgba(0, 0, 0, 0.1098);
border-radius: 10px 10px 10px 10px; border-radius: 10px 10px 10px 10px;
margin-left: 20px; padding: 0.2rem;
padding: 20px;
box-sizing: border-box; box-sizing: border-box;
display: flex; display: flex;
.view-h-l { .view-h-l {
margin-right: 20px; margin-right: 0.2rem;
width: 243px; width: 2.4rem;
img { img {
height: 151px; height: 1.5rem;
width: 100%; width: 100%;
display: block; display: block;
border-radius: 6px 6px 6px 6px; border-radius: 6px 6px 6px 6px;
} }
.btn { .btn {
width: 243px;
background: #ffffff; background: #ffffff;
border-radius: 6px 6px 6px 6px; border-radius: 6px 6px 6px 6px;
text-align: center; text-align: center;
...@@ -218,7 +221,7 @@ function handleStudy() { ...@@ -218,7 +221,7 @@ function handleStudy() {
.course-view-r { .course-view-r {
width: 100%; width: 100%;
.name { .name {
font-size: 18px; font-size: 0.18rem;
font-weight: bold; font-weight: bold;
color: #ffffff; color: #ffffff;
line-height: 100%; line-height: 100%;
...@@ -231,7 +234,7 @@ function handleStudy() { ...@@ -231,7 +234,7 @@ function handleStudy() {
line-height: 23px; line-height: 23px;
background: #e6b6c4; background: #e6b6c4;
border-radius: 4px 4px 4px 4px; border-radius: 4px 4px 4px 4px;
font-size: 12px; font-size: 0.12rem;
color: #ab0a3d; color: #ab0a3d;
margin-right: 10px; margin-right: 10px;
} }
...@@ -325,13 +328,13 @@ function handleStudy() { ...@@ -325,13 +328,13 @@ function handleStudy() {
overflow: hidden; overflow: hidden;
} }
.lecturer-item__pic { .lecturer-item__pic {
width: 146px; width: 1.46rem;
height: 106px; height: 1.06rem;
object-fit: cover; object-fit: cover;
display: block; display: block;
border-radius: 10px; border-radius: 10px;
overflow: hidden; overflow: hidden;
margin: 18px auto; margin: 0 auto;
} }
.lecturer-item__info { .lecturer-item__info {
flex: 1; flex: 1;
...@@ -359,9 +362,10 @@ function handleStudy() { ...@@ -359,9 +362,10 @@ function handleStudy() {
.course-view-bd { .course-view-bd {
flex: 1; flex: 1;
padding: 10px 20px; padding: 0.1rem 0.2rem;
background-color: #fff; background-color: #fff;
border-radius: 10px 10px 10px 10px; border-radius: 10px 10px 10px 10px;
overflow: hidden;
} }
.dialog-info { .dialog-info {
:deep(img) { :deep(img) {
...@@ -370,8 +374,7 @@ function handleStudy() { ...@@ -370,8 +374,7 @@ function handleStudy() {
} }
.course-view-content { .course-view-content {
display: flex; display: flex;
padding-left: 20px; margin-top: 0.2rem;
margin-top: 20px;
.course-view-teacher { .course-view-teacher {
width: 217px; width: 217px;
margin-left: 20px; margin-left: 20px;
...@@ -380,12 +383,12 @@ function handleStudy() { ...@@ -380,12 +383,12 @@ function handleStudy() {
padding: 0 13px 52px; padding: 0 13px 52px;
height: fit-content; height: fit-content;
.teacher-hd { .teacher-hd {
line-height: 55px; line-height: 0.55rem;
text-align: center; text-align: center;
position: relative; position: relative;
border-bottom: 1px solid #eaeaea; border-bottom: 1px solid #eaeaea;
font-size: 16px; font-size: 16px;
font-weight: bold; font-weight: 500;
color: #aa1941; color: #aa1941;
&::after { &::after {
content: ''; content: '';
...@@ -399,9 +402,11 @@ function handleStudy() { ...@@ -399,9 +402,11 @@ function handleStudy() {
} }
} }
.teacher-content { .teacher-content {
margin-top: 18px;
.name { .name {
margin-top: 18px;
text-align: center; text-align: center;
font-size: 16px; font-size: 0.16rem;
font-weight: bold; font-weight: bold;
line-height: 100%; line-height: 100%;
color: #333333; color: #333333;
...@@ -415,10 +420,54 @@ function handleStudy() { ...@@ -415,10 +420,54 @@ function handleStudy() {
} }
} }
} }
::v-deep { :deep(.el-empty__description) {
.el-empty__description { margin-top: 5px;
margin-top: 5px; font-size: 12px;
font-size: 12px; }
.is-h5 {
.course-view-h {
display: block;
}
.view-h-l {
width: 120px;
.btn {
position: absolute;
left: 145px;
top: 80px;
width: 2rem;
}
}
.course-view-r__info {
position: absolute;
right: 0;
top: 20px;
left: 145px;
}
.course-view-content {
flex-direction: column;
}
.course-view-teacher {
width: auto;
margin-left: 0;
margin-bottom: 0.2rem;
order: -1;
padding: 0 13px 13px;
}
.teacher-hd {
font-size: 14px;
}
.teacher-content {
display: flex;
.box {
margin-left: 10px;
flex: 1;
.name,
.desc {
margin: 0;
text-align: left;
}
}
} }
} }
</style> </style>
...@@ -49,7 +49,7 @@ const update = () => { ...@@ -49,7 +49,7 @@ const update = () => {
hide-required-asterisk hide-required-asterisk
label-width="100px" label-width="100px"
label-position="left" label-position="left"
style="width: 360px" style="max-width: 360px"
> >
<el-form-item label="旧密码" prop="old_password"> <el-form-item label="旧密码" prop="old_password">
<el-input type="password" v-model="form.old_password" /> <el-input type="password" v-model="form.old_password" />
......
...@@ -40,7 +40,7 @@ const update = () => { ...@@ -40,7 +40,7 @@ const update = () => {
hide-required-asterisk hide-required-asterisk
label-width="60px" label-width="60px"
label-position="left" label-position="left"
style="width: 360px" style="max-width: 360px"
> >
<el-form-item label="昵称" prop="real_name"> <el-form-item label="昵称" prop="real_name">
<el-input v-model="form.real_name" maxlength="10" /> <el-input v-model="form.real_name" maxlength="10" />
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论