提交 32918108 authored 作者: fit2cloud-chenyw's avatar fit2cloud-chenyw

fix: 移动端左右滑动头部错位

上级 b93847a5
...@@ -48,6 +48,9 @@ export default { ...@@ -48,6 +48,9 @@ export default {
this.amapPlugin = util.mapInit(); this.amapPlugin = util.mapInit();
this.historyList = uni.getStorageSync('search:history'); this.historyList = uni.getStorageSync('search:history');
}, },
created() {
this.historyList = uni.getStorageSync('search:history');
},
methods: { methods: {
/** /**
* 列表点击 * 列表点击
...@@ -104,6 +107,7 @@ export default { ...@@ -104,6 +107,7 @@ export default {
index: 4, index: 4,
userId: node.userId userId: node.userId
} }
this.isHistory= false
if(node.type === 'panel') { if(node.type === 'panel') {
uni.navigateTo({ uni.navigateTo({
......
...@@ -5,10 +5,13 @@ ...@@ -5,10 +5,13 @@
<block slot="right"> <block slot="right">
<uni-row class="demo-uni-row" > <uni-row class="demo-uni-row" >
<uni-col :span="12"> <uni-col :span="12">
<view @click="enshrine"> <view v-if="banner.index !== 2" @click="enshrine" >
<uni-icons v-if="hasStar" type="star-filled" size="18" color="#007AFF"></uni-icons> <uni-icons v-if="hasStar" type="star-filled" size="18" color="#007AFF"></uni-icons>
<uni-icons v-else type="star" size="18" color="#999"></uni-icons> <uni-icons v-else type="star" size="18" color="#999"></uni-icons>
</view> </view>
<view v-else >
<uni-icons type="star" size="18" color="#fff"></uni-icons>
</view>
</uni-col> </uni-col>
<uni-col :span="12" style="margin: 0 10rpx;"> <uni-col :span="12" style="margin: 0 10rpx;">
......
...@@ -205,8 +205,14 @@ ...@@ -205,8 +205,14 @@
this.switchTab(index); this.switchTab(index);
}, },
ontabchange(e) { ontabchange(e) {
// let index = e.target.current || e.detail.current; let index = e.target.current || e.detail.current;
// this.switchTab(index); // this.switchTab(index);
if (this.tabIndex === index) {
return;
}
this.tabIndex = index;
this.scrollInto = this.tabBars[index].id;
}, },
switchTab(index) { switchTab(index) {
if (this.newsList[index].data.length === 0) { if (this.newsList[index].data.length === 0) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论