diff --git a/public/index.html b/public/index.html index 8838c1b..870c2e1 100644 --- a/public/index.html +++ b/public/index.html @@ -3,10 +3,11 @@ - - + + - + + \ No newline at end of file diff --git a/src/pages/aboutUs/index.vue b/src/pages/aboutUs/index.vue index e88c5c2..306260b 100644 --- a/src/pages/aboutUs/index.vue +++ b/src/pages/aboutUs/index.vue @@ -237,6 +237,12 @@ alt="">

扫一扫,关注公众号

+
+ +

扫一扫,登录职站商城

+
diff --git a/src/pages/index/list/index.vue b/src/pages/index/list/index.vue index 809497b..9db8599 100644 --- a/src/pages/index/list/index.vue +++ b/src/pages/index/list/index.vue @@ -76,30 +76,44 @@
-
-
学科专业
-
-
全部
-
不限
-
- {{ item.val.length ? item.name : item.categoryName }} - +
产品标签
@@ -282,13 +296,9 @@ export default { professionalCategoryId: '', professionalId: '', category: [], + professionalClasses: [], + professionals: [], labels: [], - subjectList: [], //专业学科 - professionalClassList: [], //专业类 - professionalList: [], //专业 - categoryName: '', - professionalCategoryName: '', - professionalName: '', types: [], classifications: [], status: [ @@ -411,6 +421,7 @@ export default { this.$post(this.api.schemeList, { pageNum: 1, pageSize: 10000, + classificationId: this.form.productClassification, querySource: 3, //查询来源(3.中台 4.合伙人平台) }).then(({ data }) => { this.schemes = data.records @@ -420,109 +431,41 @@ export default { async getSubject () { // 学科类别 this.$get(this.api.subjectCategoryCited).then(({ list }) => { - const result = [] - const promises = [] list = list.filter(e => e.disciplineId != 1) list.map((e, i) => { + e.id = e.disciplineId + e.name = e.disciplineName // 专业类 e.professionalClasses.map(e => { - e.value = e.professionalClassId - e.label = e.professionalClassName + e.id = e.professionalClassId + e.name = e.professionalClassName // 专业 e.professionals.map(e => { - e.value = e.professionalId - e.label = e.professionalName + e.id = e.professionalId + e.name = e.professionalName }) e.children = e.professionals }) - result.push({ - val: [], - disciplineId: e.disciplineId, - name: e.disciplineName, - categoryName: e.disciplineName, - list: e.professionalClasses - }) - }) - - Promise.all(promises).then(_ => { - console.log("🚀 ~ file: index.vue:378 ~ this.$get ~ result:", result) - this.category = result + e.children = e.professionalClasses }) + this.category = list }).catch(err => { }) }, - nameClick (item, i) { - this.categoryId = item.disciplineId - this.professionalCategoryId = '' - this.professionalId = '' - this.$refs['category' + i][0].toggleDropDownVisible() - this.clearCategory() - this.initData() - }, - // 清除所有学科所选 - clearCategory () { - const list = this.category - list.map(e => { - e.val = [] - }) - }, - categoryChange (val, item, i) { - const name = this.$refs['category' + i][0].getCheckedNodes()[0].pathLabels - console.log("🚀 ~ file: index.vue:431 ~ categoryChange ~ val, item:", val, item, name) - item.name = item.categoryName + '/' + name.join('/') - this.clearCategory() - item.val = val - this.categoryId = item.disciplineId - this.professionalCategoryId = val[0] || '' - this.professionalId = val[1] || '' - this.initData() - }, - // 返回学科name - handleCategoryName () { - if (this.subjectList.length) { - const id = this.categoryId - const list = this.subjectList - if (list.length) { - if (id === '' || id === 1) { - this.categoryName = list[0].disciplineName - } else { - const item = list.find(e => e.disciplineId == id) - this.categoryName = item ? item.disciplineName : '' - } - } - } - - if (this.professionalClassList.length) { - const id = this.professionalCategoryId - const list = this.professionalClassList - if (list.length) { - if (id === '' || id === 1) { - this.professionalCategoryName = list[0].professionalClassName - } else { - const item = list.find(e => e.professionalClassId == id) - this.professionalCategoryName = item ? item.professionalClassName : '' - } - } - } - if (this.professionalList.length) { - const id = this.professionalId - const list = this.professionalList - if (list.length) { - if (id === '' || id === 1) { - this.professionalName = list[0].professionalName - } else { - const item = list.find(e => e.professionalId == id) - this.professionalName = item ? item.professionalName : '' - } - } - } - }, // 学科点击回调 - catetoryClick (id) { - this.categoryId = id - this.professionalCategoryId = id - this.professionalId = id - this.clearCategory() + categoryClick (item, i) { + const { id, children } = item + this[i === 1 ? 'categoryId' : i === 2 ? 'professionalCategoryId' : 'professionalId'] = id + // 学科类别 + if (i === 1) { + this.professionalCategoryId = '' + this.professionalId = '' + if (children) this.professionalClasses = children + this.professionals = [] + } else if (i === 2) { // 专业类 + this.professionalId = '' + if (children) this.professionals = children + } this.initData() }, // 获取产品类型 @@ -549,6 +492,10 @@ export default { // 类型切换 filterChange (id, prop) { this.form[prop] = id + if (prop === 'productClassification') { + this.form.websiteMallId = '' + this.getSchemes() + } this.initData() }, // 发布时间排序 @@ -570,6 +517,7 @@ export default { \ No newline at end of file diff --git a/src/pages/index/show/index.vue b/src/pages/index/show/index.vue index 6ea7d18..4f16639 100644 --- a/src/pages/index/show/index.vue +++ b/src/pages/index/show/index.vue @@ -9,23 +9,19 @@
-
- - -
-
- - -
-
-
+ + + + + +
{{ form.mall.productName }}
@@ -87,7 +83,8 @@ @click="showQrcode">会员价采购
-
+
  • {{ tab.name }}
- - +
@@ -197,15 +190,15 @@
- -
-

请用微信扫描下方小程序二维码
加入职站商城会员进行采购吧!

- +
+
@@ -227,6 +220,7 @@ export default { }, ], form: { + pics: [], classificationIds: [], mall: { coverDrawing: '' @@ -237,7 +231,8 @@ export default { hots: [], linkVisible: false, height: '', - qrcodeVisible: false + qrcodeVisible: false, + qrcodeTop: '100px' }; }, computed: { @@ -281,6 +276,8 @@ export default { }, }, mounted () { + const height = (window.innerHeight - 758) / 2 + this.qrcodeTop = (height > 0 ? height : 0) + 'px' this.getData() this.getHot() }, @@ -311,6 +308,9 @@ export default { // tab切换 tabChange ({ id }) { this.curTab = id + document.querySelector(`#part${id}`).scrollIntoView({ + behavior: 'smooth' + }) }, // 跳转播放资源 toPreview (i, j) { @@ -396,33 +396,12 @@ export default { background-color: #fff; border-radius: 10px; .pics { - display: flex; - flex-wrap: wrap; - width: 502px; + width: 484px; margin-right: 20px; - .cover { - width: 370px; - height: 278px; - margin-right: 10px; - border-radius: 8px; - overflow: hidden; - &.full { - width: 100%; - } - } .pic { - width: 114px; - height: 86px; - margin-bottom: 10px; + width: 100%; + height: 100%; border-radius: 8px; - overflow: hidden; - .el-image { - width: 100%; - height: 100%; - } - &:last-child { - margin-bottom: 0; - } } } .right { @@ -494,8 +473,12 @@ export default { } } .tab { - display: inline-flex; - margin-left: 10px; + z-index: 100; + position: sticky; + top: 20px; + display: flex; + padding: 10px 10px 20px; + background-color: #fff; li { position: relative; margin-right: 20px; @@ -525,11 +508,11 @@ export default { padding: 20px 24px; background-color: #fff; border-radius: 10px; - overflow: hidden; } } .courses { - margin-top: 40px; + padding-top: 10px; + overflow: hidden; /deep/.des { div, p, @@ -543,6 +526,7 @@ export default { overflow: auto; } .chapter { + padding-top: 60px; margin-bottom: 20px; } .chapterName { @@ -694,4 +678,13 @@ export default { width: 85%; } } +/deep/.qrcode-dia { + .el-dialog__header, + .el-dialog__body { + padding: 0; + } + .el-dialog__headerbtn .el-dialog__close { + color: #fff; + } +} \ No newline at end of file diff --git a/src/pages/member/index.vue b/src/pages/member/index.vue index d9ab0af..24a8a0c 100644 --- a/src/pages/member/index.vue +++ b/src/pages/member/index.vue @@ -1,6 +1,7 @@