did a pull-up and load, and the plug-in better-scroll successfully called the data. However, there was no problem on the web page and there was a problem in the mobile phone test. The content could not be fully displayed. Here is the code. Please take a look at it.
< div class= "bscroll" ref= "bscroll" scroll-y >
<ul>
<!-- :to=""./doctorDetails?id="+item.DrId" -->
<li v-for="(item, index) in seekDoctor" :key="index">
<router-link :to=""./doctorDetails?id="+item.DrId" class="is-doctor">
<div class="doctor-details">
<div class="img-box">
<img class="icon" :src="item.PicturePath" v-if="item.PicturePath" alt="">
<img class="icon" src="@/assets/seekDoctor/HeadPortrait_Doctor.png" v-else alt="">
<img class="label" v-show="item.IsPatientMain" src="@/assets/images/icon0810_04.png"
alt="">
</div>
</div>
<div class="doctor-text">
<div class="name">
<span>{{item.DrName}}</span>
<span>{{item.DepartmentName}}</span>
</div>
<div class="referral">
<span>{{item.PositionName}}</span>
<span>{{item.HospitalName}}</span>
</div>
<div class="serve-box">
<div class="serve" v-for="(submitItem,submitIndex) in item.DrServiceItems"
:key="submitIndex">
<p class="">{{submitItem.SericeItemName}}
</div>
</div>
</div>
<div class="count">
:
{{item.VisitCount}}
</div>
</router-link>
</li>
<div class="textData" v-if="textFlag">{{textData}}</div>
</ul>
</div>
<script>
<!-- JS -->
//
scrollFn() {
this.$nextTick(() => {
if (!this.scroll) {
this.scroll = new BScroll(this.$refs.bscroll, {
click: true,
scrollY: true,
probeType: 3,
pullUpLoad: {
threshold: 100
}
});
}
this.scroll.on("pullingUp", () => {
//
this.textFlag = true
let sumPage = {
PageIndex: (this.courrentPage += 1)
};
console.log(sumPage);
setTimeout(() => {
seekDoctor.getDoctor(sumPage).then(res => {
this.seekDoctor = this.seekDoctor.concat(res.ReturnData);
console.log(this.seekDoctor)
this.textFlag = false
if(this.TotalLength == this.seekDoctor.length) {
this.textData = ""
}
console.log(this.seekDoctor.length)
this.scroll.refresh()
this.scroll.finishPullUp()
});
}, 1000);
console.log("");
this.scroll.refresh()
this.scroll.finishPullUp()
});
});
}
//
</script>
![][1]