var _this=this;
var goods_id = _this.$route.query.id;
var isscroll = true;
_this.$nextTick(() => {
var el = document.querySelector(".rating_cnt_scroll");
var offsetHeight = el.offsetHeight;
el.onscroll = () => {
var scrollTop = el.scrollTop;
var scrollHeight = el.scrollHeight;
if (offsetHeight + scrollTop - scrollHeight >= -1) {
if(isscroll==true){
isscroll = false;
var requestData = [];
_this.mountedPage++;
console.log(_this.mountedPage);
isscroll = false;
var data = {
goods_id: goods_id,
page: _this.mountedPage,
checkData: _this.$md5("caiegouinterface")
};
_this.$http.post(baseUrl + "/api/Goods/getEvaluate", data, {emulateJSON: true})
.then(res => {
if(res.body.code==200){
requestData = res.body.data.evaluate;
if (res.body.data.length == 0) {
//_this.page=1;
isscroll = true;
return false;
}
}
});
}
setTimeout(() => {
_this.evaluate = _this.evaluate.concat(requestData);
isscroll = true;
}, 100);
}

}
})

vue 上拉加载更多的更多相关文章

  1. vux, vue上拉加载更多

    <template> <" :bottom-method="loadBottom" :bottom-all-loaded="bottomAll ...

  2. vue mpvue 上拉加载更多示例代码

    vue 上拉加载更多示例代码 可以比较简单的改为 mpvue , 去除滚动判断,直接放在 onReachBottom 周期即可. html <div id="app"> ...

  3. vue移动端上拉加载更多

    LoadMore.vue <template> <div class="load-more-wrapper" @touchstart="touchSta ...

  4. vue实现网络图片瀑布流 + 下拉刷新 + 上拉加载更多

    一.思路分析和效果图 用vue来实现一个瀑布流效果,加载网络图片,同时有下拉刷新和上拉加载更多功能效果.然后针对这几个效果的实现,捋下思路: 根据加载数据的顺序,依次追加标签展示效果: 选择哪种方式实 ...

  5. mui的上拉加载更多 下拉刷新 自己封装的demo

    ----------------------------------------------- 这是一个非常呆萌的程序妹子,深夜码的丑代码------------------------------- ...

  6. vue2.0 移动端,下拉刷新,上拉加载更多插件,修改版

    在[实现丰盛]的插件基础修改[vue2.0 移动端,下拉刷新,上拉加载更多 插件], 1.修改加载到尾页面,返回顶部刷新数据,无法继续加重下一页 2.修改加载完成文字提示 原文链接:http://ww ...

  7. mui实现分页上拉加载更多 下拉刷新数据的简单实现 移动端下拉上拉

    空下来把mui上拉加载更多,下拉刷新数据做了一个简单的实现,希望可以帮助到需要的朋友 demo项目的结构 <!DOCTYPE html> <html> <head> ...

  8. 原生js移动端touch事件实现上拉加载更多

    大家都知道jQuery里没有touch事件,所以在移动端使用原生js实现上拉加载效果还是很不错的,闲话不多说,代码如下: //获取要操作的元素 var objSection = document.ge ...

  9. H5基于iScroll实现下拉刷新,上拉加载更多

    前言 前一段有个手机端的项目需要用到下拉刷新和上拉加载更多的效果,脑海里第一反映就是微博那种效果,刚开始的理解有些偏差,以为下拉也是追加数据,上拉也是追加数据,后请教同事后发现其实下拉只是刷新最新数据 ...

随机推荐

  1. A printf format reference page (cheat sheet)

    Summary: This page is a printf formatting cheat sheet. I originally created this cheat sheet for my ...

  2. Apache htaccess 设置....

    NC: no case,就是说不区分大小写R:redirect,重定向F:forbidden,禁止访问L:last,表示已经是最后一条规则,.htaccess文件解析即将退出 比如原地址为 /beau ...

  3. 2016 ccpc 杭州 D.Difference hdu5936(折半枚举)

    有坑!!!当x==0时,因为y>0,a,b不能同时为0,所以答案要-1 #include<iostream> #include<cstdlib> #include< ...

  4. 113th LeetCode Weekly Contest Reveal Cards In Increasing Order

    In a deck of cards, every card has a unique integer.  You can order the deck in any order you want. ...

  5. HDU1286

    欧拉函数测试题 期末考试完了做下水题 更好的方法是phi[i]==i时就直接筛选,不改了 #include<bits/stdc++.h> using namespace std; cons ...

  6. PHP返回变量或数组的字符串表示:var_export()

    使用var_export()函数可以在服务端程序没有在打印的情况下,配合file_put_contents方便的调试程序,查看变量和数组的内容. 在开发过程中,我们常用var_dump()来打印数组内 ...

  7. poj1318 Word Amalgamation 字符串排序(qsort)

    Word Amalgamation Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 9794   Accepted: 4701 ...

  8. shell 操作环境

    一.路径与命令查找顺序 命令的运行程序可以这样看: 1.以相对/绝对的路径执行命令,例“/bin/ls”或“ls” 2.由alias乍到该命令来执行 3.由bash内置的(builtin)命令来执行 ...

  9. python3.6 request模块和ddt模块的安装

    1.1用cmd命令进到python的安装目录的Scripts文件夹 1.2.然后输入 pip install requests,出现以下提示,说明安装成功 2.安装ddt步骤一样,只是把pip ins ...

  10. cas aqs lock之间的关系

    CAS 对应cpu的硬件指令, 是最原始的原子操作 cas主要是在AtomicInteger AtomicXXX类中使用, 用于实现线程安全的自增操作 ++. 对应一个unsafe对象, 根据os平台 ...