yujialong 1 year ago
parent 4544cb7d95
commit ce8cd2d0a7
  1. 1233
      src/pages/match/manage/matchInfo.vue
  2. 21
      src/pages/product/list/index.vue
  3. 98
      src/pages/product/show/index.vue

File diff suppressed because it is too large Load Diff

@ -47,14 +47,19 @@
</div> </div>
<div class="filter"> <div class="filter">
<dl v-if="curTab == 1"> <dl v-if="curTab == 1">
<dt>学科专业</dt> <dt>学科类别</dt>
<div class="vals"> <div class="vals">
<dd :class="{active: categoryId === ''}" <dd :class="{active: categoryId === ''}"
@click="catetoryClick('')">全部</dd> @click="catetoryClick('')">全部</dd>
<dd :class="{active: categoryId === 1}" <dd :class="{active: categoryId === 1}"
style="margin-right: 20px" style="margin-right: 20px"
@click="catetoryClick(1)">不限</dd> @click="catetoryClick(1)">不限</dd>
<div v-for="(item, i) in category" <dd v-for="(item, i) in category"
:key="i"
:class="{active: categoryId === item.value}"
@click="categoryClick(item, 1)">{{ item.label }}</dd>
<!-- <div v-for="(item, i) in category"
:key="i" :key="i"
:class="['category-item', {active: item.disciplineId == categoryId}]"> :class="['category-item', {active: item.disciplineId == categoryId}]">
<span class="name" <span class="name"
@ -65,8 +70,8 @@
:options="item.list" :options="item.list"
:props="{ checkStrictly: true }" :props="{ checkStrictly: true }"
placeholder="" placeholder=""
@change="id => categoryChange(id, item, i)"></el-cascader> @change="id => categoryChange(id, item, i)"></el-cascader> -->
</div> <!-- </div> -->
</div> </div>
</dl> </dl>
<dl v-if="curTab == 3"> <dl v-if="curTab == 3">
@ -425,6 +430,14 @@ export default {
e.val = [] e.val = []
}) })
}, },
categoryClick (item, i) {
this.clearCategory()
item.val = val
this[i === 1 ? 'categoryId' : i === 2 ? 'professionalCategoryId' : 'professionalId'] = item.disciplineId
this.professionalCategoryId = val[0] || ''
this.professionalId = val[1] || ''
this.initData()
},
categoryChange (val, item, i) { categoryChange (val, item, i) {
const name = this.$refs['category' + i][0].getCheckedNodes()[0].pathLabels const name = this.$refs['category' + i][0].getCheckedNodes()[0].pathLabels
console.log("🚀 ~ file: index.vue:431 ~ categoryChange ~ val, item:", val, item, name) console.log("🚀 ~ file: index.vue:431 ~ categoryChange ~ val, item:", val, item, name)

@ -90,7 +90,8 @@
@click="toSystem">进入系统</button> @click="toSystem">进入系统</button>
</div> </div>
</div> </div>
<div class="course"> <div class="course"
id="part0">
<div class="detail"> <div class="detail">
<ul class="tab"> <ul class="tab">
<li v-for="(tab, i) in tabs" <li v-for="(tab, i) in tabs"
@ -99,51 +100,48 @@
@click="tabChange(tab)">{{ tab.name }}</li> @click="tabChange(tab)">{{ tab.name }}</li>
</ul> </ul>
<div class="courses"> <div class="courses">
<template v-if="!curTab"> <div class="des"
<div class="des" v-html="form.mall.detailedIntroduction"></div>
v-html="form.mall.detailedIntroduction"></div> <div class="chapter"
</template> id="part1"
<template v-else> v-for="(item, i) in chapterList"
<div class="chapter" :key="i">
v-for="(item, i) in chapterList" <div class="chapterName">{{ item.name }}</div>
:key="i"> <div class="section"
<div class="chapterName">{{ item.name }}</div> v-if="item.subsectionList.length">
<div class="section" <div v-for="(section, j) in item.subsectionList"
v-if="item.subsectionList.length"> :key="j"
<div v-for="(section, j) in item.subsectionList" @click="toPreview(i, j)">
:key="j" <div class="sectionName"
@click="toPreview(i, j)"> :title="section.name"
<div class="sectionName" :class="{active: curLink === `${item.name}${section.name}`}">
:title="section.name" <div class="val">
:class="{active: curLink === `${item.name}${section.name}`}"> <img v-if="section.fileType === 'pptx'"
<div class="val"> src="@/assets/img/exts/ppt.png"
<img v-if="section.fileType === 'pptx'" alt="">
src="@/assets/img/exts/ppt.png" <img v-else-if="section.fileType === 'mp4'"
alt=""> src="@/assets/img/exts/video.png"
<img v-else-if="section.fileType === 'mp4'" alt="">
src="@/assets/img/exts/video.png" <img v-else-if="section.fileType === 'doc' || section.fileType === 'docx'"
alt=""> src="@/assets/img/exts/word.png"
<img v-else-if="section.fileType === 'doc' || section.fileType === 'docx'" alt="">
src="@/assets/img/exts/word.png" <img v-else-if="section.fileType === 'txt'"
alt=""> src="@/assets/img/exts/txt.png"
<img v-else-if="section.fileType === 'txt'" alt="">
src="@/assets/img/exts/txt.png" <img v-else-if="section.fileType === 'pdf'"
alt=""> src="@/assets/img/exts/pdf.png"
<img v-else-if="section.fileType === 'pdf'" alt="">
src="@/assets/img/exts/pdf.png" <img v-else
alt=""> src="@/assets/img/exts/pic.png"
<img v-else alt="">
src="@/assets/img/exts/pic.png" {{ section.name }}
alt="">
{{ section.name }}
</div>
<i v-if="!form.goodsRes.logoOfOurSchool && j"
class="icon el-icon-lock"></i>
</div> </div>
<i v-if="!form.goodsRes.logoOfOurSchool && j"
class="icon el-icon-lock"></i>
</div> </div>
</div> </div>
</div> </div>
</template> </div>
</div> </div>
</div> </div>
<div class="products"> <div class="products">
@ -304,6 +302,9 @@ export default {
// tab // tab
tabChange ({ id }) { tabChange ({ id }) {
this.curTab = id this.curTab = id
document.querySelector(`#part${id}`).scrollIntoView({
behavior: 'smooth'
})
}, },
// //
toPreview (i, j) { toPreview (i, j) {
@ -470,10 +471,12 @@ export default {
} }
} }
.tab { .tab {
z-index: 100;
position: sticky; position: sticky;
// top: 120px; top: 0;
display: inline-flex; display: flex;
margin-left: 10px; padding: 10px 10px 20px;
background-color: #fff;
li { li {
position: relative; position: relative;
margin-right: 20px; margin-right: 20px;
@ -503,11 +506,11 @@ export default {
padding: 20px 24px; padding: 20px 24px;
background-color: #fff; background-color: #fff;
border-radius: 10px; border-radius: 10px;
overflow: hidden;
} }
} }
.courses { .courses {
margin-top: 40px; padding-top: 10px;
overflow: hidden;
/deep/.des { /deep/.des {
div, div,
p, p,
@ -521,6 +524,7 @@ export default {
overflow: auto; overflow: auto;
} }
.chapter { .chapter {
padding-top: 60px;
margin-bottom: 20px; margin-bottom: 20px;
} }
.chapterName { .chapterName {

Loading…
Cancel
Save