Browse Source

解决分页失效

h5_css
yanyan 3 years ago
parent
commit
feda90ec35
  1. 11
      pages.json
  2. 2
      pages/index/index.vue
  3. 4
      pages/knowledge/knowledge.vue
  4. 11
      subpkg/list/list.vue
  5. 4
      subpkg/message/message.vue

11
pages.json

@ -28,7 +28,8 @@
"style": { "style": {
"navigationBarTitleText": "全民演练", "navigationBarTitleText": "全民演练",
"enablePullDownRefresh": true, "enablePullDownRefresh": true,
"navigationStyle": "custom" "navigationStyle": "custom",
"onReachBottomDistance":20
} }
} }
], ],
@ -39,8 +40,8 @@
"style": { "style": {
"navigationBarTitleText": "场景演练", "navigationBarTitleText": "场景演练",
"navigationBarTextStyle": "black", "navigationBarTextStyle": "black",
"enablePullDownRefresh": false, "enablePullDownRefresh": true,
"onReachBottomDistance": 150, "onReachBottomDistance": 100,
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
@ -139,8 +140,8 @@
"style" : "style" :
{ {
"navigationBarTitleText" : "", "navigationBarTitleText" : "",
"enablePullDownRefresh" : false, "navigationStyle": "custom",
"navigationStyle": "custom" "onReachBottomDistance":50
} }
}, },
{ {

2
pages/index/index.vue

@ -6,7 +6,7 @@
<img :src="topImg"></img> <img :src="topImg"></img>
</view> </view>
<view class="banbox"> <view class="banbox">
<swiper style="height: 100%;" :indicator-dots="true" :autoplay="true" :interval="3000" :duration="1000" :circular="true"> <swiper style="height: 100%;" :indicator-dots="false" :autoplay="true" :interval="3000" :duration="1000" :circular="true">
<swiper-item v-for="(item, i) in swiperList" :key="i"> <swiper-item v-for="(item, i) in swiperList" :key="i">
<navigator style="height: 100%;" class="swiper-item"> <navigator style="height: 100%;" class="swiper-item">
<img :src="item"></img> <img :src="item"></img>

4
pages/knowledge/knowledge.vue

@ -77,7 +77,9 @@
<style lang="scss"> <style lang="scss">
@import url("@/static/base_css.css"); @import url("@/static/base_css.css");
.wrap{
height: 101%;
}
.mainwrap { .mainwrap {
top: 0; top: 0;
height: calc(100% - 260rpx); height: calc(100% - 260rpx);

11
subpkg/list/list.vue

@ -53,6 +53,7 @@
pageNum:1, pageNum:1,
pageSize:10 pageSize:10
}, },
time:1,
total:0, total:0,
search: false, search: false,
isloading:false, isloading:false,
@ -68,6 +69,9 @@
this.getSceneList(); this.getSceneList();
}, },
onShow() { onShow() {
if (this.time == 1) {
this.time = 2; return;
}
this.getSwiperList(); this.getSwiperList();
this.getSceneListReload(); this.getSceneListReload();
}, },
@ -145,6 +149,7 @@
if(this.isloading) return if(this.isloading) return
this.queryObj.pageNum++ this.queryObj.pageNum++
this.getSceneList() this.getSceneList()
uni.pageScrollTo({scrollTop: 120})
} }
} }
} }
@ -152,7 +157,9 @@
<style lang="scss"> <style lang="scss">
@import url("@/static/base_css.css"); @import url("@/static/base_css.css");
.wrap{
height: 101%;
}
swiper { swiper {
position: relative; position: relative;
top: 3vh; top: 3vh;
@ -176,7 +183,7 @@
margin: 4% 3%; margin: 4% 3%;
padding: 0 0 8%; padding: 0 0 8%;
width: 94%; width: 94%;
height: 52vh; //height: 52vh;
overflow-y: auto; overflow-y: auto;
.nav-item { .nav-item {

4
subpkg/message/message.vue

@ -72,7 +72,9 @@
<style lang="scss"> <style lang="scss">
@import url("@/static/base_css.css"); @import url("@/static/base_css.css");
.wrap{
height: 101%;
}
.artlist { .artlist {
margin: 2% 0 3.5%; margin: 2% 0 3.5%;
padding: 4% 3%; padding: 4% 3%;

Loading…
Cancel
Save