Commit c151036c authored by 罗超's avatar 罗超

修改首页样式

parent cb604436
<template>
<view
class="ad-box"
:class="{'ad-full-height':ad.list[0].link[0].PageName == 'full'}"
:style="{ height: ad.height == 'auto' ? 'auto' : ad.height + 'rpx',padding:marginStyle,backgroundColor:ad.background }"
>
<view
......@@ -8,6 +9,7 @@
v-for="(item, index) in adtemp"
:key="index"
:style="[item.formatStyle]"
:class="{'ad-full-height':item.link[0].PageName == 'full'}"
@click="clickHandler(item.link[0].new_link_url)"
>
<button open-type="contact" v-if="item.link[0].new_link_url=='contact'"></button>
......@@ -32,7 +34,7 @@ export default {
}
},
created() {
// console.log(this.ad)
console.log(this.ad)
this.ad.list.forEach((x) => {
x.formatStyle = {
width: x.width,
......@@ -110,4 +112,7 @@ export default {
opacity: 0;
z-index: 2;
}
.ad-full-height{
height: 100% !important;
}
</style>
......@@ -8,11 +8,11 @@
</image>
</view>
<view v-if="myPageData.home_pages" v-show="showStart == false" :style="[myPageData.home_pages.navs[active].templateBg]">
<view class="content" :style="{
<view class="content" style="min-height: 100vh;" :style="{
'padding-bottom': showtabs == true ? boxpaddingbottom + 'px' : 0,
paddingTop: pagePaddingBottom,
paddingTop: noTitle?o:pagePaddingBottom
}">
<view class="index-title" :class="{ MainTopLeft: pageTitleStr.length > 10 }" :style="[
<view class="index-title" v-if="!noTitle" :class="{ MainTopLeft: pageTitleStr.length > 10 }" :style="[
myPageData.home_pages.navs[active].templateBg,
titleStyle,
{
......@@ -33,12 +33,12 @@
:is-scroll="true" :active-color="mainColor" :current="active" :bar-width="80" :font-size="32" :bold="false"
@change="changeHandler"></u-tabs>
<template v-for="(item, i) in myPageData.home_pages.navs">
<view :key="i" v-if="active == i">
<view :key="i" v-if="active == i" :class="{'flex-column':noTitle}">
<template v-for="(d, di) in item.template.data">
<search v-if="d.id == 'search' && isNavPosition == 0" :style-str="d.data" :key="di"></search>
<swiper v-if="d.id == 'banner'" :swipers="d.data" :key="di"></swiper>
<empty v-if="d.id == 'empty'" :block="d.data" :key="di"></empty>
<rubik v-if="d.id == 'rubik'" :ad="d.data" :key="di"></rubik>
<rubik v-if="d.id == 'rubik'" :ad="d.data" :key="di" :class="{'full-col':d.data.list[0].link[0].PageName == 'full'}"></rubik>
<goods v-if="d.id == 'goods'" :goods="d.data" :key="di"></goods>
<notice v-if="d.id == 'notice'" :notice="d.data" :key="di"></notice>
<gridnav v-if="d.id == 'nav'" :navs="d.data" :key="di"></gridnav>
......@@ -198,7 +198,8 @@
AppletID: 0, //判断小程序的id,相亲:11
page_idt: 0, //首页组件分享参数
boxpaddingbottom: 0, //底部的高度
currentParent: ''
currentParent: '',
noTitle:false
};
},
components: {
......@@ -1068,6 +1069,7 @@
}else {
this.showtabs = true;
}
this.noTitle = res.data.home_pages.is_noshow_title
this.contentHeight = this.$utils.calcContentHeight();
this.myPageData = res.data;
if (res.data.navbar.navs) {
......@@ -1545,4 +1547,13 @@
width: 80px;
height: 80px;
}
.content .flex-column{
display: flex;
flex-direction: column;
width: 100%;
height: 100vh;
}
.content .flex-column .full-col{
flex: 1;
}
</style>
......@@ -2,8 +2,8 @@ export default {
install(Vue, options) {
Vue.prototype.host = "https://wx.weibaoge.cn/web/index.php?_mall_id=1285"
Vue.prototype.host2 = "https://mallApi.oytour.com" //电商接口
//Vue.prototype.host2 = "http://192.168.5.46:5000"
//Vue.prototype.host2 = "https://mallApi.oytour.com" //电商接口
Vue.prototype.host2 = "http://192.168.5.46:8200"
Vue.prototype.host3 = "https://jjeduapi.oytour.com" //进阶小课堂以前接口
Vue.prototype.UploadConfig = function() { //本地上传配置
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment