diff --git a/pageB/search/out.vue b/pageB/search/out.vue
index e79b153..033fed4 100644
--- a/pageB/search/out.vue
+++ b/pageB/search/out.vue
@@ -7,7 +7,7 @@
社区
-
+
@@ -18,7 +18,7 @@
-
+
@@ -34,7 +34,7 @@
-
+
@@ -59,7 +59,11 @@ export default {
scrollHeight: '',
loadStatus: 'loadmore',
timer: true, // 防止上拉加载短时间内多次调用,
- value:""
+ value:"",
+ scrollTop: 0,
+ old: {
+ scrollTop: 0
+ }
}
},
components:{
@@ -86,10 +90,14 @@ export default {
},
onNavigationBarSearchInputConfirmed(value) {
this.value = value.text
+ this.page = 1
// console.log(this.value)
this.ShopSearch()
},
methods: {
+ scroll: function(e) {
+ this.old.scrollTop = e.detail.scrollTop; // 必要
+ },
// 动态设置导航栏搜索框内容
setNavSearchInput(keyword) {
// #ifdef APP-PLUS
@@ -212,7 +220,7 @@ export default {
},
setViewHeight() {
const res = uni.getSystemInfoSync();
- this.scrollHeight = res.windowHeight - res.windowWidth / 750 * 90 + 'px';
+ this.scrollHeight = res.windowHeight - res.windowWidth / 750 * 92 + 'px';
},
toDetailsPage(id) {
this.$u.route('/pageC/merchant/index', {
@@ -234,10 +242,11 @@ export default {
box-sizing: border-box;
padding: 30rpx 40rpx;
display: flex;
- margin-bottom: 30rpx;
+ // margin-bottom: 30rpx;
+ height: 92rpx;
> view {
height: 30rpx;
- line-height: 30rpx;
+ line-height: 1;
flex: 1;
font-size: 32rpx;
color: rgba(51,51,51,1);
diff --git a/pageB/search/searchGoods.vue b/pageB/search/searchGoods.vue
index 053a741..b4c3efc 100644
--- a/pageB/search/searchGoods.vue
+++ b/pageB/search/searchGoods.vue
@@ -11,7 +11,7 @@
好评
-
+
@@ -39,7 +39,10 @@ export default {
loadStatus: 'loadmore',
timer: true, // 防止上拉加载短时间内多次调用,
value:"",
- top:0
+ scrollTop: 0,
+ old: {
+ scrollTop: 0
+ }
}
},
watch: {
@@ -61,9 +64,13 @@ export default {
},
onNavigationBarSearchInputConfirmed(value) {
this.value = value.text
+ this.page = 1
this.ShopSearch()
},
methods: {
+ scroll: function(e) {
+ this.old.scrollTop = e.detail.scrollTop; // 必要
+ },
setNavSearchInput(keyword) {
console.log(keyword);
// #ifdef APP-PLUS
@@ -132,13 +139,16 @@ export default {
switchCurrent(current) {
this.page = 1
if(current == 1 && this.current == 1) this.priceOrderAsc = !this.priceOrderAsc;
- this.top=0
+ this.scrollTop = this.old.scrollTop
+ this.$nextTick(function() {
+ this.scrollTop = 0
+ });
this.ShopSearch()
this.current = current;
},
setViewHeight() {
const res = uni.getSystemInfoSync();
- this.scrollHeight = res.windowHeight - res.windowWidth / 750 * 90 + 'px';
+ this.scrollHeight = res.windowHeight - res.windowWidth / 750 * 92 + 'px';
},
toDetailsPage(id) {
this.$u.route('/pageB/sdetails/index', {
@@ -154,10 +164,11 @@ export default {
box-sizing: border-box;
padding: 30rpx 40rpx;
display: flex;
- margin-bottom: 30rpx;
+ // margin-bottom: 30rpx;
+ height: 92rpx;
> view {
height: 30rpx;
- line-height: 30rpx;
+ line-height: 1;
flex: 1;
font-size: 32rpx;
color: rgba(51,51,51,1);