yujialong 1 year ago
parent 4188d35f66
commit 3eab7657eb
  1. BIN
      src/assets/images/product/qrcode.jpg
  2. 1376
      src/pages/about/index.vue
  3. 1043
      src/pages/home/index.vue
  4. 33
      src/pages/index/list/index.vue
  5. 58
      src/pages/index/show/index.vue
  6. 14
      src/router/modules/about.js
  7. 14
      src/router/modules/home.js
  8. 28
      src/router/modules/index.js
  9. 27
      src/router/modules/product.js
  10. 2
      src/router/routes.js

Binary file not shown.

After

Width:  |  Height:  |  Size: 81 KiB

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -1,17 +1,13 @@
<template>
<div class="wrap">
<el-carousel :interval="6000"
:height="carouselHeight">
height="354px">
<template v-for="(item, i) in banners">
<el-carousel-item :key="i">
<div :class="['banner-item', {'cursor-pointer': item.url}]"
@click="openLink(item)">
<img :src="item.banner"
alt=""
:style="{height: carouselHeight}">
<!-- <img src="https://huoran.oss-cn-shenzhen.aliyuncs.com/20230726/png/1684091617063493632.png"
alt=""
:style="{height: carouselHeight}"> -->
alt="">
<div class="texts">
<h6>{{ item.title }}</h6>
<p class="sub">{{ item.subheading }}</p>
@ -215,7 +211,6 @@ export default {
data () {
const that = this
return {
carouselHeight: '533px',
banners: [],
timer: null,
curTab: '',
@ -307,8 +302,7 @@ export default {
}
},
mounted () {
this.carouselHeight = parseInt(window.innerWidth / 3.6) + 'px'
// this.getBanner()
this.getBanner()
this.getSubject()
this.getLabel()
this.getClassification()
@ -319,13 +313,15 @@ export default {
methods: {
// banner
getBanner () {
this.$post(this.api.listMarketing, {
pageNum: 1,
pageSize: 1000,
isOpen: 0
}).then(({ page }) => {
this.banners = page.records
}).catch(res => { })
// /
this.$post(`${this.api.findPage}?columnId=${this.id}`).then(({ data }) => {
if (data.length) {
// state1theEditedJson稿0jsonBeforeEditing
const json = JSON.parse(data[data.length - 1][data[data.length - 1].state ? 'theEditedJson' : 'jsonBeforeEditing'])
this.banners = json[0]
console.log("🚀 ~ file: index.vue ~ line 180 ~ this.$post ~ json", this.banners)
}
}).catch(err => { })
},
//
getData () {
@ -531,7 +527,7 @@ export default {
},
//
toDetail (id) {
this.$router.push(`show?id=${id}`);
this.$router.push(`/index/show?id=${id}`);
}
}
};
@ -539,12 +535,11 @@ export default {
<style lang="scss" scoped>
.wrap {
margin: -24px;
.banner-item {
position: relative;
img {
width: 100%;
height: 100%;
height: 354px;
}
.texts {
position: absolute;

@ -3,7 +3,7 @@
<el-card shadow="hover"
class="m-b-20">
<div class="flex-between">
<el-page-header @back="$router.push('list')"
<el-page-header @back="$router.push('/index')"
:content="form.mall.productName"></el-page-header>
</div>
</el-card>
@ -83,15 +83,8 @@
<div class="text">{{ form.goodsRes.typeName }}</div>
</div>
</div>
<button v-if="!form.goodsRes.logoOfOurSchool"
class="btn"
@click="toTrail">试用体验</button>
<button v-else-if="isCourse || withLink"
class="btn entry"
@click="toStation">进入{{ isDataforward ? '系统' : '实验' }}</button>
<button v-else-if="isValueModule"
class="btn entry"
@click="toSystem">进入系统</button>
<button class="btn"
@click="showQrcode">会员价采购</button>
</div>
</div>
<div class="course">
@ -206,6 +199,18 @@
</div>
</div>
</el-dialog>
<el-dialog title="温馨提示"
:visible.sync="qrcodeVisible"
width="430px"
center
:close-on-click-modal="false">
<div class="buy">
<p class="tips">请用微信扫描下方小程序二维码进入职站商城加入会员吧</p>
<img src="@/assets/images/product/qrcode.jpg"
alt="">
</div>
</el-dialog>
</div>
</template>
@ -233,7 +238,8 @@ export default {
chapterList: [],
hots: [],
linkVisible: false,
height: ''
height: '',
qrcodeVisible: false
};
},
computed: {
@ -310,9 +316,9 @@ export default {
},
//
toPreview (i, j) {
this.form.goodsRes.logoOfOurSchool ?
this.$router.push(`/station/preview?courseId=${this.form.mall.associatedProduct}&curriculumName=${this.form.mall.productName}&mallId=${this.id}&chapter=${i}&section=${j}&admin=1`) :
this.toTrail()
// this.form.goodsRes.logoOfOurSchool ?
// this.$router.push(`/station/preview?courseId=${this.form.mall.associatedProduct}&curriculumName=${this.form.mall.productName}&mallId=${this.id}&chapter=${i}&section=${j}&admin=1`) :
// this.toTrail()
},
// /
studySection (item) {
@ -327,9 +333,9 @@ export default {
this.getChapter()
}).catch(res => { })
},
//
toTrail () {
window.open('https://f.wps.cn/g/0sJLI4NA/')
//
showQrcode () {
this.qrcodeVisible = true
},
//
toStation () {
@ -367,7 +373,7 @@ export default {
},
//
toDetail (id) {
this.$router.push(`show?id=${id}`)
this.$router.push(`/index/show?id=${id}`)
this.id = id
this.getData()
},
@ -378,7 +384,6 @@ export default {
<style lang="scss" scoped>
.wrap {
padding: 24px;
margin: -24px;
background: url(../../../assets/images/product/bg1.png) 0 373px no-repeat,
url(../../../assets/images/product/bg2.png) bottom right no-repeat;
background-color: #f3f6fa;
@ -477,7 +482,7 @@ export default {
width: 119px;
height: 46px;
color: #fff;
background: #64c25a;
background: #007eff;
border-radius: 6px;
border: 0;
cursor: pointer;
@ -488,9 +493,6 @@ export default {
margin-left: 11px;
}
}
.entry {
background: #007eff;
}
}
.tab {
display: inline-flex;
@ -684,4 +686,14 @@ export default {
text-decoration: underline;
}
}
.buy {
text-align: center;
.tips {
margin-bottom: 10px;
font-size: 14px;
}
img {
width: 85%;
}
}
</style>

@ -1,14 +0,0 @@
import BasicLayout from '@/layouts/home';
export default {
path: '/about',
component: BasicLayout,
children: [
{
name: `about`,
path: `/about`,
component: () => import('@/pages/about'),
meta: { title: '关于我们' }
},
]
};

@ -1,14 +0,0 @@
import BasicLayout from '@/layouts/home'
const name = 'home'
export default {
path: `/${name}`,
component: BasicLayout,
children: [
{
name,
path: `/${name}`,
component: () => import(`@/pages/${name}`),
meta: { title: '' }
}
]
};

@ -0,0 +1,28 @@
import BasicLayout from "@/layouts/home";
const meta = {};
const pre = "index-";
export default {
path: "/index",
name: "index",
redirect: {
name: `index`
},
meta,
component: BasicLayout,
children: [
{
name: 'index',
path: `/index`,
component: () => import("@/pages/index/list"),
meta: { title: "首页" }
},
{
path: `show`,
component: () => import("@/pages/index/show"),
meta: { title: "产品详情" }
},
]
};

@ -1,27 +0,0 @@
import BasicLayout from "@/layouts/home";
const meta = {};
const pre = "product-";
export default {
path: "/product",
name: "product",
redirect: {
name: `${pre}list`
},
meta,
component: BasicLayout,
children: [
{
path: `list`,
component: () => import("@/pages/product/list"),
meta: { title: "产品中心" }
},
{
path: `show`,
component: () => import("@/pages/product/show"),
meta: { title: "产品详情" }
},
]
};

@ -10,7 +10,7 @@ requireModule.keys().forEach(fileName => {
const frameIn = [
{
path: "/",
redirect: "/home"
redirect: "/index"
},
...modules
];

Loading…
Cancel
Save