@@ -74,6 +74,15 @@ export default {
};
},
methods: {
+ jumpDetails(item){
+ this.$router.push({
+ name: 'domesticDetails',
+ query: {
+ id: item.id,
+ pageType: 'FOREIGN_STAND'
+ }
+ })
+ },
//返回上一个页面
back() {
this.$router.push("/phoneHome");
From c40563faf639d133d33eee9287dc568e84005d68 Mon Sep 17 00:00:00 2001
From: zyd
Date: Mon, 13 Jun 2022 16:55:05 +0800
Subject: [PATCH 2/2] =?UTF-8?q?fix:=E4=BF=AE=E5=A4=8D=E5=8A=A8=E6=80=81?=
=?UTF-8?q?=E9=A1=B5=E9=9D=A2=E9=94=99=E8=AF=AFBUG?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/pages/phone/phoneHome.vue | 19 +++-
src/pages/phone/standDynamics.vue | 175 +++++++++++++++++++++++-------
2 files changed, 150 insertions(+), 44 deletions(-)
diff --git a/src/pages/phone/phoneHome.vue b/src/pages/phone/phoneHome.vue
index ce9f54a05..ff6883784 100644
--- a/src/pages/phone/phoneHome.vue
+++ b/src/pages/phone/phoneHome.vue
@@ -57,12 +57,19 @@ export default {
})
},
standChange(type){
- this.$router.push({
- name: 'domesticStand',
- query:{
- standType: type,
- }
- })
+ if(type ==='DYNAMIC'){
+ this.$router.push({
+ name: 'standDynamics'
+ })
+
+ }else{
+ this.$router.push({
+ name: 'domesticStand',
+ query:{
+ standType: type,
+ }
+ })
+ }
},
}
};
diff --git a/src/pages/phone/standDynamics.vue b/src/pages/phone/standDynamics.vue
index 595851b3a..99592febc 100644
--- a/src/pages/phone/standDynamics.vue
+++ b/src/pages/phone/standDynamics.vue
@@ -1,58 +1,72 @@
-
+
<
标准化动态
-
+
-
- 加载中...
-
-
-
-
{{ item.standardName }}
+
+
+ 加载中...
-
-
标准状态:
-
+
+
+
{{ item.standardName }}
+
+
+
标准状态:
+
{{ textStatusMap[item.textState] }}
-
发布日期:
-
+ 发布日期:
+
{{ item.releaseDate }}
+
+
+
+
-
-
+
+
没有更多数据了...
+
点击加载更多
+
加载中...
-
- 加载中...
-
-
-
-
{{ item.standardName }}
+
+
+ 加载中...
-
-
标准状态:
-
+
+
+
{{ item.standardName }}
+
+
+
标准状态:
+
{{ textStatusMap[item.textState] }}
-
发布日期:
-
+ 发布日期:
+
{{ item.releaseDate }}
+
+
+
+
-
-
+
+
没有更多数据了...
+
点击加载更多
+
加载中...
@@ -68,9 +82,13 @@ export default {
active: "",
messageType: "ZYBZFG",
standList: [],
+ page: 1,
standStateOptions: [], //存放文本状态
textStatusMap: {},// 文本状态id与name对应
- loading: true
+ loading: true,
+ scrolled: '',
+ moreFlag: false,
+ listFlag: false
};
},
methods: {
@@ -83,25 +101,78 @@ export default {
}
})
},
+ scroolOne(){
+ this.scrolled = this.$refs.cardBoxOne.scrollTop
+ console.log(this.$refs.cardBoxOne.scrollTop)
+ //获得可视区的高度
+ const windowHeight = this.$refs.cardBoxOne.clientHeight
+ //获取滚动条的总高度
+ const scrollHeight = this.$refs.cardBoxOne.scrollHeight
+ let windowScrolled = this.scrolled + windowHeight
+ if(scrollHeight - windowScrolled < 100 && this.scrolled !== 0){
+ //把距离顶部的距离加上可视区域的高度
+ this.moreFlag = true
+ }else{
+ this.moreFlag = false
+ }
+ },
+ scroolTwo(){
+ this.scrolled = this.$refs.cardBoxTwo.scrollTop
+ console.log(this.$refs.cardBoxTwo.scrollTop)
+ //获得可视区的高度
+ const windowHeight = this.$refs.cardBoxTwo.clientHeight
+ //获取滚动条的总高度
+ const scrollHeight = this.$refs.cardBoxTwo.scrollHeight
+ let windowScrolled = this.scrolled + windowHeight
+ if(scrollHeight - windowScrolled < 100 && this.scrolled !== 0){
+ //把距离顶部的距离加上可视区域的高度
+ this.moreFlag = true
+ }else{
+ this.moreFlag = false
+ }
+ },
//返回上一个页面
back() {
this.$router.push("/phoneHome");
},
+ moreList(){
+ this.moreFlag = false
+ this.loadingFlag = true
+ this.page++
+ this.onDynamics()
+ },
onChange(name) {
this.messageType = name;
+ this.page = 1;
+ this.standList = []
this.onDynamics();
},
onDynamics(){
this.loading = true
this.$http.get("/lawss/NewsFeed/getNewsFeed", {
messageType: this.messageType,
- page: 1,
- paeSize: 10
+ page: this.page,
+ pageSize: 10
}, {
_this: this
}, res => {
- this.standList = res.data;
- this.loading = false;
+ if(res.ok){
+ let msgList= res.data.records
+ if(msgList.length){
+ if(this.standList.length){
+ this.standList = this.standList.concat(msgList)
+ }else{
+ this.standList = msgList
+ }
+ this.loading = false
+ }else{
+ this.loading = false
+ this.listFlag = true
+ }
+ }else{
+ this.standList = []
+ this.loading = false;
+ }
}, e => {
console.log(e);
});
@@ -127,13 +198,12 @@ export default {