Commit 3386bd03 authored by zhengke's avatar zhengke

no message

parent 631e3262
<template> <template>
<div class="goods-box" :class="{ flex: goods.catPosition == 'left' }"> <div class="goods-box" :class="{ flex: goods.catPosition == 'left' }" :style="{'margin-bottom':marginBottom+'rpx'}">
<view :style="{ margin: goods.catStyle == 1 ? '0px' : '10px 5px' }"> <view :style="{ margin: goods.catStyle == 1 ? '0px' : '10px 5px' }">
<u-tabs v-if="goods.showCat && goods.catPosition == 'top' && goods.catList.length > 1" name="menuName" :list="goods.catList" <u-tabs v-if="goods.showCat && goods.catPosition == 'top' && goods.catList.length > 1" name="menuName" :list="goods.catList"
:is-scroll="true" :active-color="mainColor" :current="activeKey" :show-bar="goods.catStyle == 1" :bold="false" :is-scroll="true" :active-color="mainColor" :current="activeKey" :show-bar="goods.catStyle == 1" :bold="false"
...@@ -80,7 +80,8 @@ ...@@ -80,7 +80,8 @@
return { return {
mainColor: '', mainColor: '',
activeKey: 0, activeKey: 0,
currentList: [] currentList: [],
marginBottom:''
}; };
}, },
created() { created() {
...@@ -91,6 +92,23 @@ ...@@ -91,6 +92,23 @@
this.currentList = this.goods.list; this.currentList = this.goods.list;
} }
}, },
mounted(){
let port = uni.getSystemInfoSync().platform
switch (port) {
case 'android':
this.marginBottom = '0'
console.log('运行Android上',port);//android
break;
case 'ios':
this.marginBottom = '54'
console.log('运行iOS上',port);//ios
break;
default:
this.marginBottom = '54'
console.log('运行在开发者工具上');//devtools
break;
}
},
methods: { methods: {
tabChangeHandler(i) { tabChangeHandler(i) {
this.currentList = this.goods.catList[i].goodsList; this.currentList = this.goods.catList[i].goodsList;
......
...@@ -3,12 +3,13 @@ ...@@ -3,12 +3,13 @@
<div class="mynav" style="padding-bottom:5px;min-height: 430px;" :style="{'background-color': navs.backgroundColor}"> <div class="mynav" style="padding-bottom:5px;min-height: 430px;" :style="{'background-color': navs.backgroundColor}">
<swiper v-if="navs.navType==1" :autoplay="false" :style="{'height': height + 'rpx' }"> <swiper v-if="navs.navType==1" :autoplay="false" :style="{'height': height + 'rpx' }">
<swiper-item v-for="(item, index) in cols" :key="index"> <swiper-item v-for="(item, index) in cols" :key="index">
<view :style="[formatStyle]"> <view :style="[formatStyle]" style="height: 100%;">
<u-grid :col="getColumn(navs)" align="left" :border="false"> <u-grid :col="getColumn(navs)" align="left" :border="false" :height="height">
<u-grid-item v-for="(c, i) in item" :key="i" class="grid-text" v-if="c.isShow==1" @click="clickHandler(c)" <u-grid-item v-for="(c, i) in item" :key="i" class="grid-text" v-if="c.isShow==1" @click="clickHandler(c)"
:height="height"
:style="{'background':isTemplateId==c.TemplateId?'url('+getIconLink(c.checkBgImg)+')no-repeat top 0 left 0':'', :style="{'background':isTemplateId==c.TemplateId?'url('+getIconLink(c.checkBgImg)+')no-repeat top 0 left 0':'',
'background-size': '100% 100%'}"> 'background-size': '100% 100%'}">
<image :src="isTemplateId==c.TemplateId?getIconLink(c.checkIcon):getIconLink(c.icon)" mode="widthFix" style="width: 64rpx; height: 64rpx;" /> <image :src="isTemplateId==c.TemplateId?getIconLink(c.checkIcon):getIconLink(c.icon)" mode="widthFix" style="width: 58rpx; height: 58rpx;" />
<text :style="{'color':navs.color}">{{ c.name }}</text> <text :style="{'color':navs.color}">{{ c.name }}</text>
</u-grid-item> </u-grid-item>
</u-grid> </u-grid>
...@@ -91,7 +92,7 @@ ...@@ -91,7 +92,7 @@
isTemplateId:'', isTemplateId:'',
cols: [], cols: [],
formatStyle: "", formatStyle: "",
height: 160, height: 92,//160
bg: "", bg: "",
clickItem: {}, //当前点击的页面 clickItem: {}, //当前点击的页面
showModal:false, showModal:false,
...@@ -109,7 +110,7 @@ ...@@ -109,7 +110,7 @@
// console.log(this.navs) // console.log(this.navs)
this.mainColor = this.$uiConfig.mainColor; this.mainColor = this.$uiConfig.mainColor;
let tempArray = []; let tempArray = [];
this.height = (this.navs.rows * this.height)-21; this.height = (this.navs.rows * this.height);//-21
this.navs.navs.forEach((x, i) => { this.navs.navs.forEach((x, i) => {
tempArray.push(x); tempArray.push(x);
if ( if (
......
<style scoped> <style scoped>
.tabbarMain { .tabbarMain {
height: 100upx; /* height: 150upx; */
position: fixed; position: fixed;
z-index: 50; z-index: 50;
flex: 1; flex: 1;
...@@ -14,11 +14,11 @@ ...@@ -14,11 +14,11 @@
} }
.tabbarMainIphone { .tabbarMainIphone {
height: 156upx; height: 156upx;
padding-bottom: 64upx; /* padding-bottom: 64upx; */
} }
.tabBtnMina { .tabBtnMina {
width: 750upx; width: 750upx;
height: 88upx; /* height: 88upx; */
position: absolute; position: absolute;
z-index: 2; z-index: 2;
bottom: 0; bottom: 0;
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
} }
.tabBtnMinaIphone { .tabBtnMinaIphone {
height: 156upx; height: 156upx;
padding-bottom: 64upx; /* padding-bottom: 64upx; */
} }
.imgse { .imgse {
/* width: 48upx; */ /* width: 48upx; */
...@@ -114,11 +114,13 @@ ...@@ -114,11 +114,13 @@
<view <view
class="tabbarMain" class="tabbarMain"
:class="[flagTypeInfo ? 'tabbarMainIphone' : '']" :class="[flagTypeInfo ? 'tabbarMainIphone' : '']"
:style="{'height':height+'rpx','position':'fixed','left':'0','right':'0'}"
v-if="navs && navs.length > 0" v-if="navs && navs.length > 0"
> >
<view <view
class="tabBtnMina" class="tabBtnMina"
:class="[flagTypeInfo ? 'tabBtnMinaIphone' : '']" :class="[flagTypeInfo ? 'tabBtnMinaIphone' : '']"
:style="{'height':height+'upx','padding-bottom':paddingBottom + 'rpx'}"
mode="" mode=""
> >
<view <view
...@@ -155,6 +157,7 @@ ...@@ -155,6 +157,7 @@
<view <view
class="tabbarMain" class="tabbarMain"
:class="[flagTypeInfo ? 'tabbarMainIphone' : '']" :class="[flagTypeInfo ? 'tabbarMainIphone' : '']"
:style="{'padding-bottom':'64upx'}"
v-if="navs && navs.length > 0" v-if="navs && navs.length > 0"
> >
<view <view
...@@ -206,6 +209,8 @@ export default { ...@@ -206,6 +209,8 @@ export default {
navs: [], navs: [],
crtPath: "", crtPath: "",
isShowIcon: 1, isShowIcon: 1,
paddingBottom:"",
height:""
}; };
}, },
created() { created() {
...@@ -240,6 +245,24 @@ export default { ...@@ -240,6 +245,24 @@ export default {
}, 3000); }, 3000);
} }
this.activeHandler(); this.activeHandler();
let port = uni.getSystemInfoSync().platform
switch (port) {
case 'android':
this.height = '140'
this.paddingBottom = '20'
console.log('运行Android上',port);//android
break;
case 'ios':
this.height = '160'
this.paddingBottom = '58'
console.log('运行iOS上',port);//ios
break;
default:
this.height = '160'
this.paddingBottom = '58'
console.log('运行在开发者工具上');//devtools
break;
}
}, },
// activated(){ // activated(){
// if(uni.getStorageSync("navs")){ // if(uni.getStorageSync("navs")){
......
<template> <template>
<view class="u-grid-item" :class="[showBorder ? 'u-border-right u-border-bottom' : '']" :hover-class="hoverClass" <view class="u-grid-item" :class="[showBorder ? 'u-border-right u-border-bottom' : '']" :hover-class="hoverClass"
:hover-stay-time="200" @tap="click" :style="{ :hover-stay-time="200" @tap="click" :style="[{
background: bgColor, background: bgColor,
width: width + 'px' width: width + 'px'
}"> },{'height':height+'rpx'}]">
<view class="u-grid-item-box"> <view class="u-grid-item-box">
<slot /> <slot />
</view> </view>
...@@ -33,6 +33,10 @@ ...@@ -33,6 +33,10 @@
type: [Number, String], type: [Number, String],
default: '' default: ''
}, },
height:{
type: String,
default: ""
}
}, },
// 父组件通过provide传递过来的整个this // 父组件通过provide传递过来的整个this
inject: ['uGrid'], inject: ['uGrid'],
......
<template> <template>
<view :id="elId" class="u-grid" :class="{'u-border-top u-border-left': border}" :style="[gridStyle]"><slot /></view> <view :id="elId" class="u-grid" :class="{'u-border-top u-border-left': border}" :style="[gridStyle,{'height':height+'rpx'}]"><slot /></view>
</template> </template>
<script> <script>
...@@ -35,6 +35,10 @@ export default { ...@@ -35,6 +35,10 @@ export default {
hoverClass: { hoverClass: {
type: String, type: String,
default: 'u-hover-class' default: 'u-hover-class'
},
height:{
type: String,
default: ""
} }
}, },
data() { data() {
......
<template>
<view class="u-index-anchor-wrapper" :id="$u.guid()" :style="[wrapperStyle]">
<!-- style="position: fixed;top:95rpx;color:#2979ff;z-index: 965;" -->
<view class="u-index-anchor " :class="[active ? 'u-index-anchor--active' : '']"
:style="[customAnchorStyle]" >
<slot v-if="useSlot" />
<block v-else>
<text>{{ index=='*'?'热门品牌':index }}</text>
</block>
</view>
</view>
</template>
<script>
/**
* indexAnchor 索引列表锚点
* @description 通过折叠面板收纳内容区域,搭配<u-index-anchor>使用
* @tutorial https://www.uviewui.com/components/indexList.html#indexanchor-props
* @property {Boolean} use-slot 是否使用自定义内容的插槽(默认false)
* @property {String Number} index 索引字符,如果定义了use-slot,此参数自动失效
* @property {Object} custStyle 自定义样式,对象形式,如"{color: 'red'}"
* @event {Function} default 锚点位置显示内容,默认为索引字符
* @example <u-index-anchor :index="item" />
*/
export default {
name: "u-index-anchor",
props: {
useSlot: {
type: Boolean,
default: false
},
index: {
type: String,
default: ''
},
customStyle: {
type: Object,
default () {
return {}
}
}
},
data() {
return {
active: false,
wrapperStyle: {},
anchorStyle: {}
}
},
inject: ['UIndexList'],
wacth:{
index: {
handler: function (val, oldval) {
console.log(val,'----')
},
deep: true,
},
},
mounted() {
this.UIndexList.children.push(this);
this.UIndexList.updateData();
},
computed: {
customAnchorStyle() {
// return Object.assign(this.anchorStyle, this.customStyle);
}
}
}
</script>
<style lang="scss" scoped>
.u-index-anchor {
box-sizing: border-box;
padding: 14rpx 24rpx;
color: #606266;
width: 100%;
font-weight: 500;
font-size: 28rpx;
line-height: 1.2;
background-color: rgb(245, 245, 245);
}
.u-index-anchor--active {
right: 0;
left: 0;
color: #2979ff;
background-color: #f7f7f7;
}
</style>
<template>
<view class="u-index-bar">
<slot />
<view v-if="showSidebar" class="u-index-bar__sidebar" @touchstart.stop.prevent="onTouchMove" @touchmove.stop.prevent="onTouchMove"
@touchend.stop.prevent="onTouchStop" @touchcancel.stop.prevent="onTouchStop">
<view v-for="(item, index) in indexList" :key="index" class="u-index-bar__index" :style="{zIndex: zIndex + 1, color: activeAnchorIndex === index ? activeColor : ''}"
:data-index="index">
{{ item }}
</view>
</view>
<view class="u-indexed-list-alert" v-if="touchmove && indexList[touchmoveIndex]" :style="{
zIndex: alertZIndex
}">
<text>{{indexList[touchmoveIndex]}}</text>
</view>
</view>
</template>
<script>
var indexList = function() {
var indexList = [];
var charCodeOfA = 'A'.charCodeAt(0)
for (var i = 0; i < 26; i++) {
indexList.push(String.fromCharCode(charCodeOfA + i));
}
indexList.unshift('*')
return indexList;
};
/**
* indexList 索引列表
* @description 通过折叠面板收纳内容区域,搭配<u-index-anchor>使用
* @tutorial https://www.uviewui.com/components/indexList.html#indexanchor-props
* @property {Number String} scroll-top 当前滚动高度,自定义组件无法获得滚动条事件,所以依赖接入方传入
* @property {Array} index-list 索引字符列表,数组(默认A-Z)
* @property {Number String} z-index 锚点吸顶时的层级(默认965)
* @property {Boolean} sticky 是否开启锚点自动吸顶(默认true)
* @property {Number String} offset-top 锚点自动吸顶时与顶部的距离(默认0)
* @property {String} highlight-color 锚点和右边索引字符高亮颜色(默认#2979ff)
* @event {Function} select 选中右边索引字符时触发
* @example <u-index-list :scrollTop="scrollTop"></u-index-list>
*/
export default {
name: "u-index-list",
props: {
sticky: {
type: Boolean,
default: true
},
zIndex: {
type: [Number, String],
default: ''
},
scrollTop: {
type: [Number, String],
default: 0,
},
offsetTop: {
type: [Number, String],
default: 0
},
indexList: {
type: Array,
default () {
return indexList()
}
},
activeColor: {
type: String,
default: '#2979ff'
}
},
created() {
// #ifdef H5
this.stickyOffsetTop = this.offsetTop ? uni.upx2px(this.offsetTop) : 44;
// #endif
// #ifndef H5
this.stickyOffsetTop = this.offsetTop ? uni.upx2px(this.offsetTop) : 0;
// #endif
// 只能在created生命周期定义children,如果在data定义,会因为在子组件中通过provide/inject
// 进行push时而导致的莫名其妙的错误
this.children = [];
},
provide() {
return {
UIndexList: this
}
},
data() {
return {
activeAnchorIndex: 0,
showSidebar: true,
// children: [],
touchmove: false,
touchmoveIndex: 0,
}
},
watch: {
scrollTop() {
this.updateData()
}
},
computed: {
// 弹出toast的z-index值
alertZIndex() {
return this.$u.zIndex.toast;
}
},
methods: {
updateData() {
this.timer && clearTimeout(this.timer);
this.timer = setTimeout(() => {
this.showSidebar = !!this.children.length;
this.setRect().then(() => {
this.onScroll();
});
}, 0);
},
setRect() {
return Promise.all([
this.setAnchorsRect(),
this.setListRect(),
this.setSiderbarRect()
]);
},
setAnchorsRect() {
return Promise.all(this.children.map((anchor, index) => anchor
.$uGetRect('.u-index-anchor-wrapper')
.then((rect) => {
Object.assign(anchor, {
height: rect.height,
top: rect.top
});
})));
},
setListRect() {
return this.$uGetRect('.u-index-bar').then((rect) => {
Object.assign(this, {
height: rect.height,
top: rect.top + this.scrollTop
});
});
},
setSiderbarRect() {
return this.$uGetRect('.u-index-bar__sidebar').then(rect => {
this.sidebar = {
height: rect.height,
top: rect.top
};
});
},
getActiveAnchorIndex() {
const {
children
} = this;
const {
sticky
} = this;
for (let i = this.children.length - 1; i >= 0; i--) {
const preAnchorHeight = i > 0 ? children[i - 1].height : 0;
const reachTop = sticky ? preAnchorHeight : 0;
if (reachTop >= children[i].top) {
return i;
}
}
return -1;
},
onScroll() {
const {
children = []
} = this;
if (!children.length) {
return;
}
const {
sticky,
stickyOffsetTop,
zIndex,
scrollTop,
activeColor
} = this;
const active = this.getActiveAnchorIndex();
this.activeAnchorIndex = active;
if (sticky) {
let isActiveAnchorSticky = false;
if (active !== -1) {
isActiveAnchorSticky =
children[active].top <= 0;
}
children.forEach((item, index) => {
if (index === active) {
let wrapperStyle = '';
let anchorStyle = {
color: `${activeColor}`
};
if (isActiveAnchorSticky) {
wrapperStyle = {
height: `${children[index].height}px`
};
anchorStyle = {
position: 'fixed',
top: `${stickyOffsetTop}px`,
zIndex: `${zIndex ? zIndex : this.$u.zIndex.indexListSticky}`,
color: `${activeColor}`
};
}
item.active = active;
item.wrapperStyle = wrapperStyle;
item.anchorStyle = anchorStyle;
} else if (index === active - 1) {
const currentAnchor = children[index];
const currentOffsetTop = currentAnchor.top;
const targetOffsetTop = index === children.length - 1 ?
this.top :
children[index + 1].top;
const parentOffsetHeight = targetOffsetTop - currentOffsetTop;
const translateY = parentOffsetHeight - currentAnchor.height;
const anchorStyle = {
position: 'relative',
transform: `translate3d(0, ${translateY}px, 0)`,
zIndex: `${zIndex ? zIndex : this.$u.zIndex.indexListSticky}`,
color: `${activeColor}`
};
item.active = active;
item.anchorStyle = anchorStyle;
} else {
item.active = false;
item.anchorStyle = '';
item.wrapperStyle = '';
}
});
}
},
onTouchMove(event) {
this.touchmove = true;
const sidebarLength = this.children.length;
const touch = event.touches[0];
const itemHeight = this.sidebar.height / sidebarLength;
let clientY = 0;
clientY = touch.clientY;
let index = Math.floor((clientY - this.sidebar.top) / itemHeight);
if (index < 0) {
index = 0;
} else if (index > sidebarLength - 1) {
index = sidebarLength - 1;
}
this.touchmoveIndex = index;
this.scrollToAnchor(index);
},
onTouchStop() {
this.touchmove = false;
this.scrollToAnchorIndex = null;
},
scrollToAnchor(index) {
if (this.scrollToAnchorIndex === index) {
return;
}
this.scrollToAnchorIndex = index;
const anchor = this.children.find((item) => item.index === this.indexList[index]);
if (anchor) {
this.$emit('select', anchor.index);
uni.pageScrollTo({
duration: 0,
scrollTop: anchor.top + this.scrollTop
});
}
}
}
};
</script>
<style lang="scss" scoped>
.u-index-bar {
position: relative
}
.u-index-bar__sidebar {
position: fixed;
top: 50%;
right: 0;
display: flex;
flex-direction: column;
text-align: center;
transform: translateY(-50%);
user-select: none;
z-index: 99;
}
.u-index-bar__index {
font-weight: 500;
padding: 8rpx 30rpx;
font-size: 22rpx;
line-height: 1
}
.u-indexed-list-alert {
position: fixed;
width: 120rpx;
height: 120rpx;
right: 90rpx;
top: 50%;
margin-top: -60rpx;
border-radius: 24rpx;
font-size: 50rpx;
color: #fff;
background-color: rgba(0, 0, 0, 0.65);
display: flex;
justify-content: center;
align-items: center;
padding: 0;
z-index: 9999999;
}
.u-indexed-list-alert text {
line-height: 50rpx;
}
</style>
...@@ -5,38 +5,47 @@ ...@@ -5,38 +5,47 @@
radius="40" v-model="Keywords" @chang="changeHandler"></u-searchB> radius="40" v-model="Keywords" @chang="changeHandler"></u-searchB>
</view> </view>
<div <div
style="height: calc(100vh - 0px);width: calc(100vw);overflow: hidden;margin-top: 100rpx;"> style="height: calc(100vh - 0px);width: calc(100vw);overflow: hidden;margin-top: 100rpx;">
<view class="right-box"> <view class="right-box">
<uni-indexed-list :options="list" :show-select="true" @click="bindClick"/> <uni-indexed-list :options="list" :show-select="true" @click="bindClick"/>
<view style="height: calc(100vh - 0px); background: #fff;" v-if="!listShow"> <view style="height: calc(100vh - 0px); background: #fff;" v-if="!listShow">
<u-empty text="没有找到相关品牌信息" mode="order"></u-empty> <u-empty text="没有找到相关品牌信息" mode="order"></u-empty>
</view>
</view> </view>
</view> </div>
</div> <!-- margin-top: 102rpx; -->
<!-- <div style='height: calc(100vh - 150px);'> <!-- aspectFill scaleToFill-->
<u-index-list :scrollTop="scrollTop"> <!-- <view style="background: #fff;margin-bottom: 100rpx;" v-show="!listShow">
<view v-for="(item,index) in indexList" :key="index"> <u-empty text="没有找到相关品牌信息" mode="order"></u-empty>
<u-index-anchor :index="item.ti" :customStyle="customStyle"/> </view>
<view class="imgList"> <div style='height: calc(100vh - 0);'>
<view v-if="x.IsHot" v-for="(x,y) in item.children" :key='y' @click="goback(x,2)"> <u-index-listB :scrollTop="scrollTop">
<view v-for="(item,index) in indexList" :key="index">
<u-index-anchorB :index="item.letter"/>
<view class="imgList" v-if="item.letter=='*'">
<view v-for="(x,y) in item.data" :key='y' class="imgList-bj" @click="goback(x)">
<view @click="onClick(x)">
<image :src="x.Logo" mode="scaleToFill"/> <image :src="x.Logo" mode="scaleToFill"/>
</view> </view>
</view> </view>
<view v-for="(x,y) in item.children" :key='y' @click="goback(x,2)"
class="list-cel imgList-box">
<template v-if="!x.IsHot">
<view class="img">
<image :src="x.Logo" mode="scaleToFill"/>
</view>
<view class="text">
{{x.Name}}
</view>
</template>
</view>
</view> </view>
</u-index-list> <template v-else>
</div> --> <view v-for="(x,y) in item.data" :key='y' @click="goback(x)"
class="list-cel imgList-box">
<view class="img" @click="onClick(x)">
<image :src="x.Logo" mode="scaleToFill"/>
</view>
<view class="text" @click="onClick(x)">
{{x.Name}}
</view>
</view>
</template>
</view>
</u-index-listB>
</div> -->
<auth <auth
v-if="showAuth" v-if="showAuth"
@changeuserinfo="reloadUserinfo" @changeuserinfo="reloadUserinfo"
...@@ -58,6 +67,7 @@ ...@@ -58,6 +67,7 @@
}, },
data() { data() {
return { return {
topNum:'',
scrollTop:0, scrollTop:0,
showAuth:false, showAuth:false,
cat_style:2, cat_style:2,
...@@ -69,6 +79,12 @@ ...@@ -69,6 +79,12 @@
customStyle:{ customStyle:{
top:'101rpx' top:'101rpx'
}, },
anchorStyle:{
color: "#2979ff",
position: "fixed",
top: "102px",
zIndex: "965",
},
styleStr: { styleStr: {
placeholder: "搜索", placeholder: "搜索",
background: "rgb(240,239,244)", background: "rgb(240,239,244)",
...@@ -88,95 +104,15 @@ ...@@ -88,95 +104,15 @@
Id:'' Id:''
}, },
AllList:[], AllList:[],
indexList: [{ti:"*"}, {ti:"A"}, {ti:"B"}, {ti:"C"}, {ti:"D"}, {ti:"E"}, {ti:"F"}, {ti:"G"},{ ti:"H"}, {ti:"I"}, {ti:"J"}, {ti:"K"}, {ti:"L"}, indexList: [
{ti:"M"}, {ti:"N"}, {ti:"O"}, {ti:"P"},{ ti:"Q"}, {ti:"R"}, {ti:"S"}, {ti:"T"}, {ti:"U"}, // {ti:"*"}, {ti:"A"}, {ti:"B"}, {ti:"C"}, {ti:"D"},
{ti:"V"}, {ti:"W"}, {ti:"X"}, {ti:"Y"}, {ti:"Z"} // {ti:"E"}, {ti:"F"}, {ti:"G"}, {ti:"H"}, {ti:"I"},
], // {ti:"J"}, {ti:"K"}, {ti:"L"}, {ti:"M"}, {ti:"N"},
list: [{ // {ti:"O"}, {ti:"P"}, {ti:"Q"}, {ti:"R"}, {ti:"S"},
letter: '*', // {ti:"T"}, {ti:"U"}, {ti:"V"}, {ti:"W"}, {ti:"X"},
data: [] // {ti:"Y"}, {ti:"Z"}
},{ ],
letter: 'A', list: [],
data: []
}, {
letter: 'B',
data: []
}, {
letter: 'C',
data: []
}, {
letter: 'D',
data: []
}, {
letter: 'E',
data: []
}, {
letter: 'F',
data: []
}, {
letter: 'G',
data: []
}, {
letter: 'H',
data: []
}, {
letter: 'I',
data: []
}, {
letter: 'J',
data: []
}, {
letter: 'K',
data: []
}, {
letter: 'L',
data: []
}, {
letter: 'M',
data: []
}, {
letter: 'N',
data: []
}, {
letter: 'O',
data: []
}, {
letter: 'P',
data: []
}, {
letter: 'Q',
data: []
}, {
letter: 'R',
data: []
}, {
letter: 'S',
data: []
}, {
letter: 'T',
data: []
}, {
letter: 'U',
data: []
}, {
letter: 'V',
data: []
}, {
letter: 'W',
data: []
}, {
letter: 'X',
data: []
}, {
letter: 'Y',
data: []
}, {
letter: 'Z',
data: []
}, {
letter: '#',
data: []
}],
u:{}, u:{},
listShow:true, listShow:true,
arrary:[] arrary:[]
...@@ -199,17 +135,20 @@ ...@@ -199,17 +135,20 @@
}) })
return item.data && item.data.length>0 return item.data && item.data.length>0
}) })
if(arr.length>0){ if(lists.length>0){
this.list = lists this.list = lists
this.indexList = lists
this.listShow = true this.listShow = true
uni.hideLoading(); uni.hideLoading();
}else{ }else{
this.list = [] this.list = []
this.indexList = []
this.listShow = false this.listShow = false
uni.hideLoading(); uni.hideLoading();
} }
}else{ }else{
this.list = this.AllList this.list = this.AllList
this.indexList = this.AllList
this.listShow = true this.listShow = true
uni.hideLoading(); uni.hideLoading();
} }
...@@ -239,7 +178,6 @@ ...@@ -239,7 +178,6 @@
mounted() { mounted() {
// this.contentHeightB = this.$utils.calcContentHeight(-40)+'px'; // this.contentHeightB = this.$utils.calcContentHeight(-40)+'px';
let currentPages = getCurrentPages(); let currentPages = getCurrentPages();
// let c = this.$uiConfig.is_bang ? 80 : 52;
let c = this.$uiConfig.is_bang ? 80 : 52; let c = this.$uiConfig.is_bang ? 80 : 52;
this.contentHeight = this.$utils.calcContentHeight(c); this.contentHeight = this.$utils.calcContentHeight(c);
let u = "/" + currentPages[currentPages.length - 1].route; let u = "/" + currentPages[currentPages.length - 1].route;
...@@ -258,6 +196,11 @@ ...@@ -258,6 +196,11 @@
this.marginStyle=`${this.styleStr.top??0}px ${this.styleStr.right??0}px ${this.styleStr.bottom??0}px ${this.styleStr.left??0}px ` this.marginStyle=`${this.styleStr.top??0}px ${this.styleStr.right??0}px ${this.styleStr.bottom??0}px ${this.styleStr.left??0}px `
}, },
methods: { methods: {
onClick(item) {
uni.navigateTo({
url: '/pages/Luxury/Valuation?BrandId='+item.Id
});
},
reloadUserinfo() { reloadUserinfo() {
this.u = uni.getStorageSync("mall_UserInfo"); this.u = uni.getStorageSync("mall_UserInfo");
// this.showAuth=false; // this.showAuth=false;
...@@ -284,19 +227,17 @@ ...@@ -284,19 +227,17 @@
// }, // },
onPageScroll(e) { onPageScroll(e) {
// this.topNum = '30'
this.scrollTop = e.scrollTop; this.scrollTop = e.scrollTop;
// console.log(this.scrollTop)
}, },
goback(item,type){ goback(item,type){
let Name Name=item.Name
if(type==1){
Name=item.RegionName
}else{
Name=item.Name
}
let pages = getCurrentPages(); // 当前页面 let pages = getCurrentPages(); // 当前页面
let beforePage let beforePage
beforePage = pages[pages.length - 2]; // 前一个页面 beforePage = pages[pages.length - 2]; // 前一个页面
// console.log( beforePage.$vm) // console.log( beforePage.$vm,'===')
setTimeout(()=>{ setTimeout(()=>{
uni.navigateBack({ uni.navigateBack({
delta:1, delta:1,
...@@ -324,6 +265,7 @@ ...@@ -324,6 +265,7 @@
if(res.resultCode==1){ if(res.resultCode==1){
this.AllList = res.data this.AllList = res.data
this.list = res.data this.list = res.data
this.indexList = res.data
uni.hideLoading(); uni.hideLoading();
} }
...@@ -409,25 +351,35 @@ ...@@ -409,25 +351,35 @@
z-index: 3; z-index: 3;
} }
.imgList{ .imgList{
width: 100%;
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
background: #f7f7f7;
} }
.imgList view{ .imgList-bj{
flex-shrink: 0; flex-shrink: 0;
width: 33.33%; width: 33.33%;
text-align: center;
padding: 20rpx 0 0 0; padding: 20rpx 0 0 0;
text-align: center;
} }
.imgList view image{ .imgList-bj view{
width: 100rpx; width: 227rpx;
height: 80rpx; height: 120rpx;
border-radius: 15rpx; /* margin-right: 10rpx; */
margin-left: 20rpx;
border-radius: 20rpx;
background: #ffffff;
display: flex;
align-items: center;
justify-content: center;
}
.imgList-bj view image{
width: 120rpx;
height: 70rpx;
display: block;
} }
.imgList-box{ .imgList-box{
display: flex; display: flex;
padding: 0 20rpx; align-items: center;
padding: 8rpx 20rpx;
} }
.imgList-box image{ .imgList-box image{
width: 80rpx; width: 80rpx;
...@@ -444,4 +396,7 @@ ...@@ -444,4 +396,7 @@
margin-left: 20rpx; margin-left: 20rpx;
word-wrap: break-word; word-wrap: break-word;
} }
.u-index-ancho{
top: 108rpx !important;
}
</style> </style>
\ No newline at end of file
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