移动端优化

master
yujialong 8 months ago
parent 2505a7ec17
commit cf06f798a6
  1. BIN
      src/assets/images/contact-info.png
  2. 62
      src/layouts/header/index.vue
  3. 25
      src/layouts/navbar/index.vue
  4. 4
      src/pages/aboutUs/index.vue
  5. 5
      src/pages/column/index.vue
  6. 68
      src/pages/index/show/index.vue

Binary file not shown.

Before

Width:  |  Height:  |  Size: 40 KiB

After

Width:  |  Height:  |  Size: 40 KiB

@ -30,28 +30,31 @@
</div> </div>
</template> </template>
<!-- 手机端 --> <!-- 手机端 -->
<template v-else> <div v-else
<i class="rightBox" class="mobile-tools">
<i class="menu-icon"
:class="modelType ? 'el-icon-s-fold': 'el-icon-s-unfold' " :class="modelType ? 'el-icon-s-fold': 'el-icon-s-unfold' "
@click="updateModelType"></i> @click.stop="updateModelType"></i>
<div class="contentBox" <div class="contentBox"
v-show="modelType"> v-show="modelType">
<navbar ref="nav" <navbar ref="nav"
:isHome.sync="isHome" :isHome.sync="isHome"
@updateModelType="updateType"></navbar> @updateModelType="updateType"></navbar>
</div> </div>
<i class="login el-icon-user-solid"
</template> @click="toLogin"></i>
</div>
<el-dialog title="" <el-dialog title=""
:visible.sync="qrcodeVisible" :visible.sync="qrcodeVisible"
width="500px" fullscreen
center center
:top="qrcodeTop" :top="qrcodeTop"
append-to-body append-to-body
custom-class="qrcode-dia"> custom-class="qrcode-dia">
<div> <div>
<img width="100%" <img width="100%"
style="height: 100vh;object-fit: cover;"
src="@/assets/images/occupationlab.png" src="@/assets/images/occupationlab.png"
alt=""> alt="">
</div> </div>
@ -109,6 +112,10 @@ export default {
this.qrcodeTop = (height > 0 ? height : 0) + 'px' this.qrcodeTop = (height > 0 ? height : 0) + 'px'
this.setKeyword('') this.setKeyword('')
window.addEventListener('scroll', this.handleScroll) // window.addEventListener('scroll', this.handleScroll) //
document.body.addEventListener('click', e => {
e.stopPropagation()
this.modelType = false
})
}, },
methods: { methods: {
...mapMutations('content', [ ...mapMutations('content', [
@ -241,6 +248,21 @@ $height: 90px;
.search { .search {
margin-right: 43px; margin-right: 43px;
} }
.mobile-tools {
display: inline-flex;
align-items: center;
.login {
font-size: 1.5rem;
color: #c1c1c1;
cursor: pointer;
}
}
.menu-icon {
margin-right: 10px;
font-size: 1.8rem;
color: #c1c1c1;
cursor: pointer;
}
} }
.search-wrap { .search-wrap {
position: absolute; position: absolute;
@ -278,13 +300,6 @@ $height: 90px;
font-size: 1rem; font-size: 1rem;
} }
} }
.rightBox {
position: absolute;
right: 10px;
top: 2rem;
font-size: 2rem;
color: #c1c1c1;
}
.contentBox { .contentBox {
width: 100%; width: 100%;
position: absolute; position: absolute;
@ -295,19 +310,6 @@ $height: 90px;
max-height: 30rem; max-height: 30rem;
overflow-y: scroll; overflow-y: scroll;
} }
.searchBox,
.languageBox {
padding-left: 20px;
height: 56px;
line-height: 56px;
}
.modelBox {
position: relative;
padding-bottom: 20px;
.search-wrap {
top: 0;
}
}
/deep/.qrcode-dia { /deep/.qrcode-dia {
.el-dialog__header, .el-dialog__header,
.el-dialog__body { .el-dialog__body {
@ -336,14 +338,6 @@ $height: 90px;
color: black !important; color: black !important;
background-color: #fff; background-color: #fff;
} }
.contentBox {
.searchBox,
.languageBox {
padding-left: 20px;
height: 40px;
line-height: 40px;
}
}
.search-wrap { .search-wrap {
right: 10px; right: 10px;
top: 0; top: 0;

@ -27,14 +27,13 @@
<script> <script>
import menuTree from '@/components/menuTree' import menuTree from '@/components/menuTree'
import mixins from '@/mixins/article' import mixins from '@/mixins/article'
import { mapState, mapMutations, mapGetters } from 'vuex' import { mapMutations, mapGetters } from 'vuex'
import Setting from '@/setting' import Setting from '@/setting'
export default { export default {
props: ['isHome', 'isEstate', 'isIasf'], props: ['isEstate', 'isIasf'],
mixins: [mixins], mixins: [mixins],
data () { data () {
return { return {
lastHome: true,
active: this.$route.query.id, active: this.$route.query.id,
menus: [], menus: [],
bgColor: '#fff', bgColor: '#fff',
@ -66,18 +65,12 @@ export default {
this.getColumn() this.getColumn()
this.setSite(siteId) this.setSite(siteId)
} }
this.handleColor()
},
isHome () {
this.handleColor()
}, },
getNavSum () { getNavSum () {
this.getColumn() this.getColumn()
} }
}, },
mounted () { mounted () {
this.lastHome = this.isHome
this.handleColor()
this.getColumn() this.getColumn()
}, },
methods: { methods: {
@ -127,20 +120,6 @@ export default {
} }
}).catch(err => { }) }).catch(err => { })
}, },
//
handleColor () {
// const home = this.isHome
// if (this.lastHome !== home) this.showMenu = false
// this.bgColor = home ? 'transparent' : '#fff'
// this.textColor = home ? '#f9f9f9' : '#333'
// this.lastHome !== home && this.$nextTick(() => {
// setTimeout(() => {
// this.showMenu = true
// }, 200)
// })
// this.lastHome = home
// this.menuRefresh++
},
// //
getPath (data, id) { getPath (data, id) {
for (const e of data) { for (const e of data) {

@ -257,8 +257,8 @@
<div class="text"> <div class="text">
<p class="title">售前咨询</p> <p class="title">售前咨询</p>
<p class="tel-num" <p class="tel-num"
style="margin-bottom: 5px">老师</p> style="margin-bottom: 5px">老师</p>
<p class="tel-num">17671782660</p> <p class="tel-num">15218726836</p>
</div> </div>
</div> </div>
<div class="line"> <div class="line">

@ -913,6 +913,9 @@ export default {
width: 83%; width: 83%;
&:only-child { &:only-child {
width: 100%; width: 100%;
.detail:only-child {
max-width: none;
}
} }
} }
@ -1325,8 +1328,10 @@ export default {
} }
.detail { .detail {
flex: 1; flex: 1;
max-width: 77%;
padding: 10px 15px; padding: 10px 15px;
background-color: #fff; background-color: #fff;
overflow: auto;
h2 { h2 {
margin-bottom: 1rem; margin-bottom: 1rem;
font-size: 1.9rem; font-size: 1.9rem;

@ -1,13 +1,16 @@
<template> <template>
<div class="wrap"> <div class="wrap">
<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.back()" <el-page-header @back="$router.back()"
:content="form.mall.productName"></el-page-header> :content="form.mall.productName"></el-page-header>
</div> </div>
</el-card> </el-card> -->
<div class="inner"> <div class="inner">
<Breadcrumb ref="breadcrumb"
:data.sync="routes" />
<div class="top"> <div class="top">
<el-carousel class="pics" <el-carousel class="pics"
:interval="6000" :interval="6000"
@ -209,10 +212,12 @@
<script> <script>
import Util from "@/libs/util" import Util from "@/libs/util"
import Setting from "@/setting" import Setting from "@/setting"
import Breadcrumb from '@/components/breadcrumb'
export default { export default {
data () { data () {
return { return {
id: this.$route.query.id, id: this.$route.query.id,
routes: {},
curTab: 0, curTab: 0,
tabs: [ tabs: [
{ {
@ -236,6 +241,9 @@ export default {
qrcodeTop: '100px' qrcodeTop: '100px'
}; };
}, },
components: {
Breadcrumb,
},
computed: { computed: {
// //
withLink () { withLink () {
@ -294,6 +302,19 @@ export default {
e.interfaceDiagrams = pics e.interfaceDiagrams = pics
} }
this.form = e this.form = e
this.routes = [
{
name: '职站商城',
path: '/index',
query: {
id: 13,
siteId: 1
}
},
{
name: e.mall.productName
}
]
this.chapterList = '' this.chapterList = ''
e.mall.associatedProduct && this.getChapter() e.mall.associatedProduct && this.getChapter()
this.$nextTick(() => { this.$nextTick(() => {
@ -520,6 +541,10 @@ export default {
span { span {
font-family: PingFangSC-Regular !important; font-family: PingFangSC-Regular !important;
} }
img {
max-width: 100%;
object-fit: cover;
}
} }
.chapters { .chapters {
margin-top: 16px; margin-top: 16px;
@ -584,6 +609,7 @@ export default {
width: 100%; width: 100%;
height: 140px; height: 140px;
transition: 0.3s; transition: 0.3s;
object-fit: cover;
} }
.my-school { .my-school {
position: absolute; position: absolute;
@ -688,4 +714,42 @@ export default {
color: #fff; color: #fff;
} }
} }
@media (max-width: 1200px) {
.wrap {
.inner {
width: 100%;
}
.top {
flex-direction: column;
.pics {
width: 100%;
margin-bottom: 20px;
}
.el-image__preview {
object-fit: cover;
}
.right {
width: 100%;
}
}
.course {
flex-direction: column;
.detail {
width: 100%;
margin-bottom: 20px;
}
.products {
width: 100%;
margin-left: 0;
}
}
}
}
@media (max-width: 480px) {
.wrap {
.tab {
position: static;
}
}
}
</style> </style>
Loading…
Cancel
Save