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

@ -3,7 +3,7 @@
<el-card shadow="hover" <el-card shadow="hover"
class="m-b-20"> class="m-b-20">
<div class="flex-between"> <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> :content="form.mall.productName"></el-page-header>
</div> </div>
</el-card> </el-card>
@ -83,15 +83,8 @@
<div class="text">{{ form.goodsRes.typeName }}</div> <div class="text">{{ form.goodsRes.typeName }}</div>
</div> </div>
</div> </div>
<button v-if="!form.goodsRes.logoOfOurSchool" <button class="btn"
class="btn" @click="showQrcode">会员价采购</button>
@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>
</div> </div>
</div> </div>
<div class="course"> <div class="course">
@ -206,6 +199,18 @@
</div> </div>
</div> </div>
</el-dialog> </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> </div>
</template> </template>
@ -233,7 +238,8 @@ export default {
chapterList: [], chapterList: [],
hots: [], hots: [],
linkVisible: false, linkVisible: false,
height: '' height: '',
qrcodeVisible: false
}; };
}, },
computed: { computed: {
@ -310,9 +316,9 @@ export default {
}, },
// //
toPreview (i, j) { toPreview (i, j) {
this.form.goodsRes.logoOfOurSchool ? // 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.$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.toTrail()
}, },
// / // /
studySection (item) { studySection (item) {
@ -327,9 +333,9 @@ export default {
this.getChapter() this.getChapter()
}).catch(res => { }) }).catch(res => { })
}, },
// //
toTrail () { showQrcode () {
window.open('https://f.wps.cn/g/0sJLI4NA/') this.qrcodeVisible = true
}, },
// //
toStation () { toStation () {
@ -367,7 +373,7 @@ export default {
}, },
// //
toDetail (id) { toDetail (id) {
this.$router.push(`show?id=${id}`) this.$router.push(`/index/show?id=${id}`)
this.id = id this.id = id
this.getData() this.getData()
}, },
@ -378,7 +384,6 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.wrap { .wrap {
padding: 24px; padding: 24px;
margin: -24px;
background: url(../../../assets/images/product/bg1.png) 0 373px no-repeat, background: url(../../../assets/images/product/bg1.png) 0 373px no-repeat,
url(../../../assets/images/product/bg2.png) bottom right no-repeat; url(../../../assets/images/product/bg2.png) bottom right no-repeat;
background-color: #f3f6fa; background-color: #f3f6fa;
@ -477,7 +482,7 @@ export default {
width: 119px; width: 119px;
height: 46px; height: 46px;
color: #fff; color: #fff;
background: #64c25a; background: #007eff;
border-radius: 6px; border-radius: 6px;
border: 0; border: 0;
cursor: pointer; cursor: pointer;
@ -488,9 +493,6 @@ export default {
margin-left: 11px; margin-left: 11px;
} }
} }
.entry {
background: #007eff;
}
} }
.tab { .tab {
display: inline-flex; display: inline-flex;
@ -684,4 +686,14 @@ export default {
text-decoration: underline; text-decoration: underline;
} }
} }
.buy {
text-align: center;
.tips {
margin-bottom: 10px;
font-size: 14px;
}
img {
width: 85%;
}
}
</style> </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 = [ const frameIn = [
{ {
path: "/", path: "/",
redirect: "/home" redirect: "/index"
}, },
...modules ...modules
]; ];

Loading…
Cancel
Save