{this.total = res.data.total;var datas = res.。vue|vue,首页优化。" />

vue|vue,首页优化

  • 问题,首页sql group by,导致速度慢, 一天大概10万数据
  • 上线半年左右,sql变10s+
方案
  • 首页sql, group数据单独查询
this.$http.get(this.url.list+"New", para).then((res) => { this.total = res.data.total; var datas = res.data.rows; console.log(res.data); for (var i = 0; i < datas.length; i++) { var data = https://www.it610.com/article/datas[i]; //异步ajax启动, this.obtainCustomeEntryCount(datas[i].billNo, datas[i]); this.obtain310Receipt(datas[i].billNo, datas[i]); this.obtainCvsAPICount(datas[i].billNo, datas[i]); } this.vCustomeEnrtys = datas; this.listLoading = false; $("#loading").hide(); }); }

    推荐阅读