手机端-标准化动态-资料中心搜索换接口
This commit is contained in:
@@ -77,7 +77,7 @@
|
||||
<div @click="onCancel">取消</div>
|
||||
</template>
|
||||
</van-search>
|
||||
<div class="card-box" ref="cardBoxTwo" @scroll="scroolThree">
|
||||
<div class="card-box-three" ref="cardBoxThree" @scroll="scroolThree">
|
||||
<div v-if="loading">
|
||||
<van-loading size="24px" color="#3170A8">加载中...</van-loading>
|
||||
</div>
|
||||
@@ -173,12 +173,11 @@ export default {
|
||||
}
|
||||
},
|
||||
scroolThree() {
|
||||
this.scrolled = this.$refs.cardBoxTwo.scrollTop;
|
||||
console.log(this.$refs.cardBoxTwo.scrollTop);
|
||||
this.scrolled = this.$refs.cardBoxThree.scrollTop;
|
||||
//获得可视区的高度
|
||||
const windowHeight = this.$refs.cardBoxTwo.clientHeight;
|
||||
const windowHeight = this.$refs.cardBoxThree.clientHeight;
|
||||
//获取滚动条的总高度
|
||||
const scrollHeight = this.$refs.cardBoxTwo.scrollHeight;
|
||||
const scrollHeight = this.$refs.cardBoxThree.scrollHeight;
|
||||
let windowScrolled = this.scrolled + windowHeight;
|
||||
if (scrollHeight - windowScrolled < 100 && this.scrolled !== 0) {
|
||||
//把距离顶部的距离加上可视区域的高度
|
||||
@@ -233,37 +232,37 @@ export default {
|
||||
this.standList = [];
|
||||
this.standardReleaseList = [];
|
||||
if (this.messageType == "ZLZX") {
|
||||
this.getAdvice();
|
||||
this.getAdvice(true);
|
||||
} else {
|
||||
this.onDynamics();
|
||||
}
|
||||
},
|
||||
//获取数据
|
||||
getAdvice() {
|
||||
this.$http.get("fileMaterialCenter/file-material/getFileMaterialIndex", {
|
||||
page: this.page,
|
||||
getAdvice(first = false) {
|
||||
this.listFlag = false;
|
||||
this.$http.get("fileMaterialCenter/file-material", {
|
||||
page: first ? 1 : this.page,
|
||||
pageSize: 10,
|
||||
treeId: this.currentSearch.id || ''
|
||||
}, {
|
||||
_this: this, loading: "loading"
|
||||
}, res => {
|
||||
if (res.ok) {
|
||||
let mList = res.data;
|
||||
let mList = res.data.records || [];
|
||||
if (mList.length) {
|
||||
if (this.standardReleaseList.length) {
|
||||
if (!first && this.standardReleaseList.length) {
|
||||
this.standardReleaseList = this.standardReleaseList.concat(mList);
|
||||
} else {
|
||||
this.standardReleaseList = mList;
|
||||
}
|
||||
this.loading = false;
|
||||
} else {
|
||||
this.loading = false;
|
||||
this.standardReleaseList = [];
|
||||
this.listFlag = true;
|
||||
}
|
||||
} else {
|
||||
this.standardReleaseList = [];
|
||||
this.loading = false;
|
||||
}
|
||||
this.loading = false;
|
||||
}, e => {
|
||||
this.standardReleaseList = [];
|
||||
this.total = 0;
|
||||
@@ -310,11 +309,11 @@ export default {
|
||||
},
|
||||
onCancel () {
|
||||
this.$set(this, 'currentSearch', {})
|
||||
this.getAdvice()
|
||||
this.getAdvice(true)
|
||||
},
|
||||
setChecked (currentData) {
|
||||
this.currentSearch = currentData
|
||||
this.getAdvice()
|
||||
this.getAdvice(true)
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@@ -398,6 +397,14 @@ export default {
|
||||
|
||||
}
|
||||
|
||||
.card-box-three {
|
||||
height: calc(85% - 54px);
|
||||
position: relative;
|
||||
overflow-x: hidden;
|
||||
overflow-y: scroll;
|
||||
top: 10px;
|
||||
}
|
||||
|
||||
.card-content {
|
||||
width: 95%;
|
||||
height: auto;
|
||||
|
||||
Reference in New Issue
Block a user