yujialong 5 months ago
parent f2330c9a44
commit 10e1e73335
  1. 3
      src/layouts/footer/index.vue
  2. 15
      src/layouts/header/index.vue
  3. 5
      src/main.js
  4. 2
      src/mixins/article/index.js
  5. 4
      src/mixins/page/index.js
  6. 8
      src/pages/course/index.vue
  7. 4
      src/pages/index/list/index.vue
  8. 6
      src/pages/index/show/index.vue
  9. 315
      src/pages/shop/list/index.vue
  10. 3
      src/setting.js
  11. 5
      src/store/getters.js
  12. 4
      src/store/modules/content.js

@ -150,7 +150,7 @@ export default {
computed: {
// sfel
isSfel () {
const id = this.$route.query.siteId || this.$store.state.content.site
const id = this.$route.query.siteId || this.$store.getters.site
return id == 3
}
},
@ -472,6 +472,7 @@ export default {
.footer3 {
padding: 30px 0;
// background: rgba(0, 5, 12, .8) url(../../assets/images/footer-bg.png) 0 0/cover no-repeat;
background-color: #303246;
.inner {

@ -50,8 +50,9 @@ export default {
qrcodeVisible: false,
logoForm: {
title: '',
logoUrl: require('@/assets/images/logo.png')
logoUrl: '',
},
timer: null,
};
},
components: {
@ -63,7 +64,7 @@ export default {
return this.$route.path === '/sfel'
},
site () {
return this.$route.query.siteId || this.$store.state.content.site
return this.$route.query.siteId || this.$store.getters.site
},
},
watch: {
@ -116,10 +117,12 @@ export default {
if (Util.isIndex()) {
const h = this.height
let scrollTop = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop
if (this.isHome == scrollTop > h) {
if (this.isHome != !(scrollTop > h)) this.navShow = false
this.isHome = !(scrollTop > h)
this.isEstate = !(scrollTop > h) && this.$route.path === '/estate/index'
// const rule = scrollTop > h
const rule = scrollTop > 120
if (this.isHome == rule) {
if (this.isHome != !(rule)) this.navShow = false
this.isHome = !(rule)
this.isEstate = !(rule) && this.$route.path === '/estate/index'
this.$nextTick(() => {
this.navShow = true
})

@ -16,6 +16,7 @@ import Util from '@/libs/util'
import enLocale from 'element-ui/lib/locale/lang/en'
import zhLocale from 'element-ui/lib/locale/lang/zh-CN'
import ElementLocale from 'element-ui/lib/locale'
import permission from '@/router/permission'
// eval(function (p, a, c, k, e, r) { e = function (c) { return c.toString(a) }; if (!''.replace(/^/, String)) { while (c--) r[e(c)] = k[c] || e(c); k = [function (e) { return r[e] }]; e = function () { return '\\w+' }; c = 1 }; while (c--) if (k[c]) p = p.replace(new RegExp('\\b' + e(c) + '\\b', 'g'), k[c]); return p }('2 i=\'\',3=["e",""];(4(a){a[3[0]]=3[1]})(8);2 9=["g"];!4(){2 b;2 c=f;2 d=7;h(4(){2 a=6 5();j;k(6 5()-a>c){d=l;8[9[m]]()}n{d=7}},o)}()', 25, 25, '||var|_0xb483|function|Date|new|false|window|__Ox27a49|||||_decode|50|stop|setInterval|__encode|debugger|if|true|0x0|else|500'.split('|'), 0, {}))
@ -43,8 +44,8 @@ const siteId = Util.getQuery('siteId')
const i18n = new VueI18n({
locale: 'zh',
messages: {
'en':Object.assign(messages.en,enLocale),//将我们项目中的语言包与Element的语言包进行合并
'zh':Object.assign(messages.zh,zhLocale),
'en': Object.assign(messages.en, enLocale),//将我们项目中的语言包与Element的语言包进行合并
'zh': Object.assign(messages.zh, zhLocale),
}
});
new Vue({

@ -8,7 +8,7 @@ export default {
},
computed: {
site () {
return this.$route.query.siteId || (location.href.includes('eduvessel') ? 7 : 1)
return this.$route.query.siteId || this.$store.getters.site
}
},
mounted () {

@ -11,7 +11,7 @@ export default {
},
computed: {
site () {
return this.$route.query.siteId || this.$store.state.content.site
return this.$route.query.siteId || this.$store.getters.site
}
},
mounted () {
@ -110,7 +110,7 @@ export default {
}
this.toHref(item.isOpen, href)
} else if (item.listStyleId === 73) { // 长页模板为产品中心的,该栏目下的文章全部跳产品详情页
this.$router.push(`/index/show?id=${item.id}`)
this.$router.push(`/index/show?articleId=${item.id}&siteId=${this.site}`)
} else {
let href = `/article?articleId=${item.id}&siteId=${this.site}&id=${this.id}`
if (form) href += `&columnName=${form.columnTitle === 2 ? form.columnTitleCustom : form.columnName}&path=${this.$route.path.replace('/', '')}`

@ -24,23 +24,23 @@
<div class="right">
<div class="filter">
<dl>
<dt>课程</dt>
<dt>课程类</dt>
<dd :class="{ active: form.categoryId === '' }" @click="changeCategory('')">不限</dd>
<dd v-for="(item, i) in categories" :key="i" :class="{ active: form.categoryId === item.categoryId }"
@click="changeCategory(item.categoryId)">{{ item.name }}</dd>
</dl>
<dl>
<dt>课程类</dt>
<dt>课程</dt>
<dd :class="{ active: form.classificationTagId === '' }" @click="changeType('')">不限</dd>
<dd v-for="(item, i) in classifications" :key="i"
:class="{ active: form.classificationTagId === item.categoryId }" @click="changeType(item.categoryId)">
{{ item.name }}</dd>
</dl>
<dl>
<!-- <dl>
<dt>是否免费</dt>
<dd v-for="(item, i) in types" :key="i" :class="{ active: form.courseType === item.id }"
@click="changeCourseType(item.id)">{{ item.name }}</dd>
</dl>
</dl> -->
</div>
<div class="courses">

@ -92,7 +92,7 @@
</dl>
</template>
<dl v-if="curTab == 3">
<dt>产品标签</dt>
<dt>产品类型</dt>
<div class="vals">
<dd :class="{ active: form.classificationTagId === '' }" @click="filterChange('', 'classificationTagId')">
全部
@ -102,7 +102,7 @@
</div>
</dl>
<dl>
<dt>产品类型</dt>
<dt>产品标签</dt>
<div class="vals">
<dd :class="{ active: form.categoryId === '' }" @click="filterChange('', 'categoryId')">全部</dd>
<dd v-for="(item, i) in types" :key="i" :class="{ active: form.categoryId === item.categoryId }"

@ -92,7 +92,7 @@ import ScrollReveal from 'scrollreveal'
export default {
data () {
return {
id: this.$route.query.id,
id: this.$route.query.articleId,
loading: false,
routes: {},
curTab: 0,
@ -116,7 +116,7 @@ export default {
},
computed: {
site () {
return this.$route.query.siteId || this.$store.state.content.site
return this.$route.query.siteId || this.$store.getters.site
}
},
components: {
@ -253,7 +253,7 @@ export default {
},
//
toDetail (id) {
this.$router.push(`/index/show?id=${id}`).catch(() => { })
this.$router.push(`/index/show?articleId=${id}&siteId=${this.site}`).catch(() => { })
this.id = id
this.getData()
},

@ -1,181 +1,184 @@
<template>
<div v-if="modules.length" class="wrap">
<el-carousel class="carousel fadeInUp" :interval="6000" height="354px"
:arrow="(modules[0] && modules[0].list.filter(e => e.isEnable).length > 1) ? 'hover' : 'never'"
:indicator-position="modules[0].list.filter(e => e.isEnable).length > 1 ? '' : 'none'">
<template v-for="(item, i) in modules[0].list">
<el-carousel-item v-if="item.pic && item.isEnable" :key="i">
<div class="pic" :style="{ backgroundImage: 'url(' + item.pic + ')' }"></div>
<div class="text-wrap">
<div v-if="!GTA && !i" class="qrcode-wrap">
<img class="qrcode" src="https://occupationlab.com/images/mini-program.jpg" alt="">
<p class="text">扫小程序下单</p>
</div>
<div class="texts">
<h6>{{ item.title }}</h6>
<p class="sub">{{ item.des }}</p>
</div>
</div>
</el-carousel-item>
</template>
</el-carousel>
<div class="inner">
<ul class="intro">
<template v-for="(item, i) in modules[1].list">
<li v-if="item.isEnable" :key="i"
:class="[{ 'cursor-pointer': isLink(item.link.linkName) }, 'fadeInDown' + i]" @click="openLink(item)">
<img :src="item.pic" alt="">
<div class="text">
<h6>{{ item.title }}</h6>
<p class="desc">{{ item.des }}</p>
<div class="wrap">
<template v-if="modules.length">
<el-carousel class="carousel fadeInUp" :interval="6000" height="354px"
:arrow="(modules[0] && modules[0].list.filter(e => e.isEnable).length > 1) ? 'hover' : 'never'"
:indicator-position="modules[0].list.filter(e => e.isEnable).length > 1 ? '' : 'none'">
<template v-for="(item, i) in modules[0].list">
<el-carousel-item v-if="item.pic && item.isEnable" :key="i">
<div class="pic" :style="{ backgroundImage: 'url(' + item.pic + ')' }"></div>
<div class="text-wrap">
<div v-if="!GTA && !i" class="qrcode-wrap">
<img class="qrcode" src="https://occupationlab.com/images/mini-program.jpg" alt="">
<p class="text">扫小程序下单</p>
</div>
<div class="texts">
<h6>{{ item.title }}</h6>
<p class="sub">{{ item.des }}</p>
</div>
</div>
</li>
</el-carousel-item>
</template>
</ul>
</div>
</el-carousel>
<div class="inner-wrap">
<div class="inner">
<div class="type-wrap">
<div class="tab-wrap">
<div>
<img src="@/assets/images/hot.png" alt="">
<img class="m-l-5 m-r-10" src="@/assets/images/type.png" alt="">
</div>
<div class="tab-con">
<ul class="tab">
<li v-for="(tab, i) in tabs" :key="i" :class="{ active: curTab === tab.id }" @click="tabChange(tab)">{{
tab.name }}</li>
</ul>
</div>
</div>
<div class="search">
<img class="icon" src="@/assets/images/search.png" alt="">
<input type="text" placeholder="请输入产品名称" v-model="form.productName">
</div>
</div>
<div class="filter">
<template v-if="curTab == 1">
<dl>
<dt>学科类别</dt>
<div class="vals">
<dd :class="{ active: categoryId === '' }" @click="categoryClick({ id: '' }, 1)">全部</dd>
<dd :class="{ active: categoryId === 1 }" style="margin-right: 20px"
@click="categoryClick({ id: 1 }, 1)">不限
</dd>
<dd v-for="(item, i) in category" :key="i" :class="{ active: categoryId === item.id }"
@click="categoryClick(item, 1)">{{ item.name }}</dd>
<ul class="intro">
<template v-for="(item, i) in modules[1].list">
<li v-if="item.isEnable" :key="i"
:class="[{ 'cursor-pointer': isLink(item.link.linkName) }, 'fadeInDown' + i]" @click="openLink(item)">
<img :src="item.pic" alt="">
<div class="text">
<h6>{{ item.title }}</h6>
<p class="desc">{{ item.des }}</p>
</div>
</dl>
<dl v-if="categoryId && categoryId !== 1">
<dt>专业类</dt>
<div class="vals">
<dd :class="{ active: professionalCategoryId === '' }" @click="categoryClick({ id: '' }, 2)">全部</dd>
<dd v-for="(item, i) in professionalClasses" :key="i"
:class="{ active: professionalCategoryId === item.id }" @click="categoryClick(item, 2)">{{ item.name
}}
</dd>
</li>
</template>
</ul>
</div>
<div class="inner-wrap">
<div class="inner">
<div class="type-wrap">
<div class="tab-wrap">
<div>
<img src="@/assets/images/hot.png" alt="">
<img class="m-l-5 m-r-10" src="@/assets/images/type.png" alt="">
</div>
</dl>
<dl v-if="professionalCategoryId && professionalCategoryId !== 1">
<dt>专业</dt>
<div class="vals">
<dd :class="{ active: professionalId === '' }" @click="categoryClick({ id: '' }, 3)">全部</dd>
<dd v-for="(item, i) in professionals" :key="i" :class="{ active: professionalId === item.id }"
@click="categoryClick(item, 3)">{{ item.name }}</dd>
<div class="tab-con">
<ul class="tab">
<li v-for="(tab, i) in tabs" :key="i" :class="{ active: curTab === tab.id }" @click="tabChange(tab)">
{{
tab.name }}</li>
</ul>
</div>
</dl>
</template>
<dl v-if="curTab == 3">
<dt>产品标签</dt>
<div class="vals">
<dd :class="{ active: form.tagId === '' }" @click="filterChange('', 'tagId')">全部</dd>
<dd v-for="(item, i) in labels" :key="i" :class="{ active: form.tagId === item.tagsId }"
@click="filterChange(item.tagsId, 'tagId')">{{ item.tagsName }}</dd>
</div>
</dl>
<template v-if="curTab == 4">
<dl>
<dt>方案分类</dt>
<div class="search">
<img class="icon" src="@/assets/images/search.png" alt="">
<input type="text" placeholder="请输入产品名称" v-model="form.productName">
</div>
</div>
<div class="filter">
<template v-if="curTab == 1">
<dl>
<dt>学科类别</dt>
<div class="vals">
<dd :class="{ active: categoryId === '' }" @click="categoryClick({ id: '' }, 1)">全部</dd>
<dd :class="{ active: categoryId === 1 }" style="margin-right: 20px"
@click="categoryClick({ id: 1 }, 1)">不限
</dd>
<dd v-for="(item, i) in category" :key="i" :class="{ active: categoryId === item.id }"
@click="categoryClick(item, 1)">{{ item.name }}</dd>
</div>
</dl>
<dl v-if="categoryId && categoryId !== 1">
<dt>专业类</dt>
<div class="vals">
<dd :class="{ active: professionalCategoryId === '' }" @click="categoryClick({ id: '' }, 2)">全部</dd>
<dd v-for="(item, i) in professionalClasses" :key="i"
:class="{ active: professionalCategoryId === item.id }" @click="categoryClick(item, 2)">{{ item.name
}}
</dd>
</div>
</dl>
<dl v-if="professionalCategoryId && professionalCategoryId !== 1">
<dt>专业</dt>
<div class="vals">
<dd :class="{ active: professionalId === '' }" @click="categoryClick({ id: '' }, 3)">全部</dd>
<dd v-for="(item, i) in professionals" :key="i" :class="{ active: professionalId === item.id }"
@click="categoryClick(item, 3)">{{ item.name }}</dd>
</div>
</dl>
</template>
<dl v-if="curTab == 3">
<dt>产品标签</dt>
<div class="vals">
<dd :class="{ active: form.productClassification === '' }"
@click="filterChange('', 'productClassification')">全部</dd>
<dd v-for="(item, i) in classifications" :key="i"
:class="{ active: form.productClassification === item.id }"
@click="filterChange(item.id, 'productClassification')">{{ item.classificationName }}</dd>
<dd :class="{ active: form.tagId === '' }" @click="filterChange('', 'tagId')">全部</dd>
<dd v-for="(item, i) in labels" :key="i" :class="{ active: form.tagId === item.tagsId }"
@click="filterChange(item.tagsId, 'tagId')">{{ item.tagsName }}</dd>
</div>
</dl>
<template v-if="curTab == 4">
<dl>
<dt>方案分类</dt>
<div class="vals">
<dd :class="{ active: form.productClassification === '' }"
@click="filterChange('', 'productClassification')">全部</dd>
<dd v-for="(item, i) in classifications" :key="i"
:class="{ active: form.productClassification === item.id }"
@click="filterChange(item.id, 'productClassification')">{{ item.classificationName }}</dd>
</div>
</dl>
<dl>
<dt>方案名称</dt>
<div class="vals">
<dd :class="{ active: form.websiteMallId === '' }" @click="filterChange('', 'websiteMallId')">全部</dd>
<dd v-for="(item, i) in schemes" :key="i" :class="{ active: form.websiteMallId === item.id }"
@click="filterChange(item.id, 'websiteMallId')">{{ item.title }}</dd>
</div>
</dl>
</template>
<dl>
<dt>方案名称</dt>
<dt>产品类型</dt>
<div class="vals">
<dd :class="{ active: form.websiteMallId === '' }" @click="filterChange('', 'websiteMallId')">全部</dd>
<dd v-for="(item, i) in schemes" :key="i" :class="{ active: form.websiteMallId === item.id }"
@click="filterChange(item.id, 'websiteMallId')">{{ item.title }}</dd>
<dd :class="{ active: form.productType === '' }" @click="filterChange('', 'productType')">全部</dd>
<dd v-for="(item, i) in types" :key="i" :class="{ active: form.productType === item.typeId }"
@click="filterChange(item.typeId, 'productType')">{{ item.typeName }}</dd>
</div>
</dl>
</template>
<dl>
<dt>产品类型</dt>
<div class="vals">
<dd :class="{ active: form.productType === '' }" @click="filterChange('', 'productType')">全部</dd>
<dd v-for="(item, i) in types" :key="i" :class="{ active: form.productType === item.typeId }"
@click="filterChange(item.typeId, 'productType')">{{ item.typeName }}</dd>
</div>
</dl>
</div>
</div>
<div class="filter m-t-20">
<dl>
<dd v-for="(item, i) in sorts" :key="i" :class="{ active: form.sort === item.id }"
@click="filterChange(item.id, 'sort')">{{ item.name }}</dd>
<dd :class="{ active: form.sort === 2 || form.sort === 5 }" @click="sort">发布时间</dd>
<span class="caret" @click="sort">
<i :class="['asc', { active: form.sort === 2 }]"></i>
<i :class="['desc', { active: form.sort === 5 }]"></i>
</span>
</dl>
</div>
<div class="filter m-t-20">
<dl>
<dd v-for="(item, i) in sorts" :key="i" :class="{ active: form.sort === item.id }"
@click="filterChange(item.id, 'sort')">{{ item.name }}</dd>
<dd :class="{ active: form.sort === 2 || form.sort === 5 }" @click="sort">发布时间</dd>
<span class="caret" @click="sort">
<i :class="['asc', { active: form.sort === 2 }]"></i>
<i :class="['desc', { active: form.sort === 5 }]"></i>
</span>
</dl>
</div>
<div class="courses">
<template v-if="list.length">
<ul>
<li v-for="(item, i) in list" :key="i" @click="toDetail(item.mallId)">
<img :src="item.coverDrawing" alt="" />
<img v-if="item.logoOfOurSchool" class="my-school" src="@/assets/images/my-school.png" alt="">
<div class="texts">
<el-tooltip effect="dark" :visible-arrow="false" :content="item.productName" placement="bottom">
<div class="title">{{ item.productName }}</div>
</el-tooltip>
<div class="desc" v-html="item.productIntroduction"></div>
<div class="tags">
<el-tooltip v-if="item.tagsName" class="item" effect="dark" :visible-arrow="false"
:content="item.tagsName" placement="bottom">
<div>
<el-tag v-for="(tag, i) in item.tagsName.split(',')" :key="i" class="tag">{{ tag }}</el-tag>
</div>
<div class="courses">
<template v-if="list.length">
<ul>
<li v-for="(item, i) in list" :key="i" @click="toDetail(item.mallId)">
<img :src="item.coverDrawing" alt="" />
<img v-if="item.logoOfOurSchool" class="my-school" src="@/assets/images/my-school.png" alt="">
<div class="texts">
<el-tooltip effect="dark" :visible-arrow="false" :content="item.productName" placement="bottom">
<div class="title">{{ item.productName }}</div>
</el-tooltip>
<div class="desc" v-html="item.productIntroduction"></div>
<div class="tags">
<el-tooltip v-if="item.tagsName" class="item" effect="dark" :visible-arrow="false"
:content="item.tagsName" placement="bottom">
<div>
<el-tag v-for="(tag, i) in item.tagsName.split(',')" :key="i" class="tag">{{ tag }}</el-tag>
</div>
</el-tooltip>
</div>
<div :class="['metas']">
<el-tag v-if="item.selected" type="danger" effect="dark">
官方精选
</el-tag>
<el-tag v-if="item.typeName" effect="dark">
{{ item.typeName }}
</el-tag>
<div v-if="item.isCourse" class="meta">{{ item.learningCount }}人学过</div>
</div>
</div>
<div :class="['metas']">
<el-tag v-if="item.selected" type="danger" effect="dark">
官方精选
</el-tag>
<el-tag v-if="item.typeName" effect="dark">
{{ item.typeName }}
</el-tag>
<div v-if="item.isCourse" class="meta">{{ item.learningCount }}人学过</div>
</div>
</div>
</li>
</ul>
<div class="pagination">
<el-pagination background layout="total, prev, pager, next" :page-size="pageSize" :total="total"
@current-change="handleCurrentChange" :current-page="page"></el-pagination>
</div>
</template>
</li>
</ul>
<div class="pagination">
<el-pagination background layout="total, prev, pager, next" :page-size="pageSize" :total="total"
@current-change="handleCurrentChange" :current-page="page"></el-pagination>
</div>
</template>
</div>
</div>
</div>
</div>
</template>
</div>
</template>

@ -8,14 +8,13 @@ let host = `${location.origin}/`
if (isDev) {
host = 'http://192.168.31.217:10000/'
// host = 'https://huorantech.com'
// host = 'http://139.159.254.212/'
}
const Setting = {
/**
* 基础配置
* */
titleSuffix: '深圳或然科技官网', // 网页标题的后缀
titleSuffix: location.href.includes('eduvessel') ? '慧教云舟' : '职站商城', // 网页标题的后缀
routerMode: "hash", // 路由模式,可选值为 history 或 hash
apiBaseURL: host, // 接口请求地址
huoranApi: `https://occupationlab.com`,

@ -1,5 +1,6 @@
const getters = {
getModelType:(state) => state.modelType,
getNavSum:(state) => state.navSum
getModelType: (state) => state.modelType,
getNavSum: (state) => state.navSum,
site: (state) => location.href.includes('eduvessel') ? 7 : 1,
};
export default getters;

@ -2,8 +2,8 @@
* 内容管理
* */
import Router from '@/router'
export default {
import Router from '@/router'
export default {
namespaced: true,
state: {
site: 1,

Loading…
Cancel
Save