Commit 002184de authored by zhengke's avatar zhengke

修改

parent ffa3b20e
......@@ -4,8 +4,8 @@
<swiper :autoplay="false" :style="{'height': height + 'rpx' }">
<swiper-item v-for="(item, index) in cols" :key="index">
<view :style="[formatStyle]">
<u-grid :col="navs.columns" align="left" :border="false">
<u-grid-item v-for="(c, i) in item" :key="i" class="grid-text" @click="clickHandler(c)">
<u-grid :col="getColumn(navs)" align="left" :border="false">
<u-grid-item v-for="(c, i) in item" :key="i" class="grid-text" v-if="c.isShow==1" @click="clickHandler(c)">
<image :src="getIconLink(c.icon)" mode="widthFix" style="width: 64rpx; height: 64rpx;" />
<text :style="{'color':navs.color}">{{ c.name }}</text>
</u-grid-item>
......@@ -187,6 +187,16 @@
}
}
);
},
//判断返回几个图标
getColumn(nav){
var Num = 0;
for(var i=0;i<nav.navs.length;i++){
if(nav.navs[i].isShow==1){
Num++
}
}
return Num;
}
},
};
......
<template>
<view class="goods">
<view
v-if="setting.is_show_korea==0"
class="headStatus"
:style="[
headStyle,
{
background:'#F5F5F5'
},
]">
<view class="arrow">
<u-icon name="arrow-left" size="48" color="#000" @click="goback"></u-icon>
</view>
<view class="title" style="color: #000000;">{{pageTitle}}</view>
<view class="arrow"></view>
</view>
<view
v-else
class="headStatus"
:style="[
headStyle,
{
background:'#F5F5F5'
},
]">
<view class="arrow">
<u-icon name="arrow-left" size="48" color="#000" @click="goback"></u-icon>
</view>
<view class="title" style="color: #000000;display: flex;align-items: center;width: 90%;justify-content:center" :class="{'kotraGoodLeft':g.name.length>10}">
<img :src="g.goodsLogo" style="width:15px;height:15px;margin-right:5px;flex-shrink: 0;">
<view style="white-space: nowrap;overflow: hidden;text-overflow:ellipsis;">{{g.name}}</view>
</view>
<view class="arrow"></view>
</view>
<view class="u-skeleton" v-if="isExsitGoods">
<view class="u-skeleton-rect">
<!-- <u-swiper
......@@ -15,7 +48,7 @@
indicator-dots
:autoplay="false"
:interval="1000"
style="height:100vw;"
style="height:100vw;margin-top:60px;"
>
<block v-for="(item, index) in g.pic_url" :key="index">
<swiper-item>
......@@ -447,7 +480,9 @@ export default {
},
compentList:[] ,//评论列表
compentTotal:0,
curren:1
curren:1,
headStyle:{},
nav:0
};
},
components: {
......@@ -463,6 +498,9 @@ export default {
onLoad(option) {
this.opTionObj = option;
console.log(option, "option");
this.nav = uni.getMenuButtonBoundingClientRect().top;
this.headStyle.paddingTop = this.nav +'px';
if (option && option.id) {
this.id = option.id ? option.id : 29; //40887 59512 46942
......@@ -591,6 +629,10 @@ export default {
}, 3000);
},
methods: {
goback(){
console.log('点击');
uni.navigateBack({})
},
clickDescription(e) {
console.log(e);
},
......@@ -1218,4 +1260,23 @@ export default {
background-color: #fff;
border-radius: 3px;
}
.headStatus {
overflow: hidden;
position: relative;
width: 140vw;
padding-right: 40vw;
padding-bottom: 12px;
position: fixed;
left: 0;
right: 0;
top: 0;
display: flex;
z-index: 999;
flex-direction: row;
align-items: center;
justify-content: space-between;
}
.kotraGoodLeft{
justify-content: left!important;
}
</style>
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