Commit 447d85f0 by 无尘

fix: 修改搜索

parent 923492e1
<!DOCTYPE html><html><head><meta charset=utf-8><link rel="shortcut icon" href=./favicon.ico><title>达摩开放平台</title><link href=./static/css/app.c7f4a3d7df6d1780cf3b1304d62e54af.css rel=stylesheet></head><body class=damolish><div id=app></div><script src=//web-1251519181.file.myqcloud.com/lib/vue/2.6.6/vue.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vue-router/3.0.2/vue-router.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vuex/3.1.0/vuex.min.js></script><script src=//web-1251519181.file.myqcloud.com/components/img-preview.2.0.00.js></script><script>// Raven.config('https://3715a345910d4c768e7a1ec14619c2d5@sentry.io/1413672').install();</script><script type=text/javascript src=./static/js/manifest.6fa9b8ccdb39b1ffe91a.js></script><script type=text/javascript src=./static/js/vendor.0f5b275d4a227ad49647.js></script><script type=text/javascript src=./static/js/app.9c50334119061bcb2895.js></script></body></html>
\ No newline at end of file
<!DOCTYPE html><html><head><meta charset=utf-8><link rel="shortcut icon" href=./favicon.ico><title>达摩开放平台</title><link href=./static/css/app.8f607985a2a4bf4d5a495d683f368326.css rel=stylesheet></head><body class=damolish><div id=app></div><script src=//web-1251519181.file.myqcloud.com/lib/vue/2.6.6/vue.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vue-router/3.0.2/vue-router.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vuex/3.1.0/vuex.min.js></script><script src=//web-1251519181.file.myqcloud.com/components/img-preview.2.0.00.js></script><script>// Raven.config('https://3715a345910d4c768e7a1ec14619c2d5@sentry.io/1413672').install();</script><script type=text/javascript src=./static/js/manifest.2e36c00f44dda6b5c4a4.js></script><script type=text/javascript src=./static/js/vendor.0f5b275d4a227ad49647.js></script><script type=text/javascript src=./static/js/app.9c50334119061bcb2895.js></script></body></html>
\ No newline at end of file
!function(e){var n=window.webpackJsonp;window.webpackJsonp=function(r,a,c){for(var f,i,u,d=0,b=[];d<r.length;d++)i=r[d],t[i]&&b.push(t[i][0]),t[i]=0;for(f in a)Object.prototype.hasOwnProperty.call(a,f)&&(e[f]=a[f]);for(n&&n(r,a,c);b.length;)b.shift()();if(c)for(d=0;d<c.length;d++)u=o(o.s=c[d]);return u};var r={},t={13:0};function o(n){if(r[n])return r[n].exports;var t=r[n]={i:n,l:!1,exports:{}};return e[n].call(t.exports,t,t.exports,o),t.l=!0,t.exports}o.e=function(e){var n=t[e];if(0===n)return new Promise(function(e){e()});if(n)return n[2];var r=new Promise(function(r,o){n=t[e]=[r,o]});n[2]=r;var a=document.getElementsByTagName("head")[0],c=document.createElement("script");c.type="text/javascript",c.charset="utf-8",c.async=!0,c.timeout=12e4,o.nc&&c.setAttribute("nonce",o.nc),c.src=o.p+"static/js/"+e+"."+{0:"dc5820857959176b1da4",1:"0ebe3ead93207dc78a78",2:"d9bda1ffd59c30b3e711",3:"22903fbbbc52a7ffc052",4:"703f70a8befcf8f216d0",5:"b3cf76f8c670cd2efb7e",6:"737da25334f9daa2d713",7:"b107bdb7dcf6930f0a4a",8:"5e787f5eb2f4bd7cfb7b",9:"9caad4c0ba5b8b4813ee",10:"63807a09986add449f8a"}[e]+".js";var f=setTimeout(i,12e4);function i(){c.onerror=c.onload=null,clearTimeout(f);var n=t[e];0!==n&&(n&&n[1](new Error("Loading chunk "+e+" failed.")),t[e]=void 0)}return c.onerror=c.onload=i,a.appendChild(c),r},o.m=e,o.c=r,o.d=function(e,n,r){o.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},o.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(n,"a",n),n},o.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},o.p="./",o.oe=function(e){throw console.error(e),e}}([]);
\ No newline at end of file
!function(e){var n=window.webpackJsonp;window.webpackJsonp=function(r,c,a){for(var f,i,u,d=0,b=[];d<r.length;d++)i=r[d],t[i]&&b.push(t[i][0]),t[i]=0;for(f in c)Object.prototype.hasOwnProperty.call(c,f)&&(e[f]=c[f]);for(n&&n(r,c,a);b.length;)b.shift()();if(a)for(d=0;d<a.length;d++)u=o(o.s=a[d]);return u};var r={},t={13:0};function o(n){if(r[n])return r[n].exports;var t=r[n]={i:n,l:!1,exports:{}};return e[n].call(t.exports,t,t.exports,o),t.l=!0,t.exports}o.e=function(e){var n=t[e];if(0===n)return new Promise(function(e){e()});if(n)return n[2];var r=new Promise(function(r,o){n=t[e]=[r,o]});n[2]=r;var c=document.getElementsByTagName("head")[0],a=document.createElement("script");a.type="text/javascript",a.charset="utf-8",a.async=!0,a.timeout=12e4,o.nc&&a.setAttribute("nonce",o.nc),a.src=o.p+"static/js/"+e+"."+{0:"dc5820857959176b1da4",1:"0ebe3ead93207dc78a78",2:"d9bda1ffd59c30b3e711",3:"22903fbbbc52a7ffc052",4:"c209999f71be5ee76c4c",5:"b3cf76f8c670cd2efb7e",6:"737da25334f9daa2d713",7:"b107bdb7dcf6930f0a4a",8:"5e787f5eb2f4bd7cfb7b",9:"9caad4c0ba5b8b4813ee",10:"63807a09986add449f8a"}[e]+".js";var f=setTimeout(i,12e4);function i(){a.onerror=a.onload=null,clearTimeout(f);var n=t[e];0!==n&&(n&&n[1](new Error("Loading chunk "+e+" failed.")),t[e]=void 0)}return a.onerror=a.onload=i,c.appendChild(a),r},o.m=e,o.c=r,o.d=function(e,n,r){o.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},o.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(n,"a",n),n},o.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},o.p="./",o.oe=function(e){throw console.error(e),e}}([]);
\ No newline at end of file
......@@ -15,7 +15,7 @@ import openDocRight from '@/components/open-doc-right.vue';
{{ item.menuName }}
</li>
</ul>
<div v-if="totalCount > searchList.length" class="load-more-data">加载更多</div>
<div v-if="totalCount > searchList.length" class="load-more-data" @click="loadMoreData">加载更多</div>
</div>
<div v-if="!searchList.length" class="no-search-data">
什么都没找到。
......@@ -94,6 +94,17 @@ export default {
window.open(`#/document?currentTab=${that.currentTab}&menuId=${item.menuId}`);
},
/**
* 加载更多
*/
loadMoreData() {
const that = this;
if (that.searchList.length == that.totalCount) {
return false;
}
that.pageNumber++;
that.getSearchData();
},
/**
* 获取搜索数据
*/
getSearchData() {
......@@ -108,7 +119,11 @@ export default {
.then(res => {
let resData = res.data;
if (resData.code == '0000') {
that.searchList = resData.result.result || [];
if (!!resData.result.result && resData.result.result.length) {
resData.result.result.forEach(ele => {
that.searchList.push(ele);
});
}
that.totalCount = resData.result.totalCount;
return;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment