var orgId; mui.init({ pullRefresh: { container: '#pullrefresh', up: { height:50, contentrefresh: '正在加载...', callback: pullupRefresh } } }); var Num=1; function pullupRefresh() { setTimeout(function() { Num++; getResource(10,Num); }, 1000); } mui.plusReady(function() { var userid = plus.storage.getItem('userid'); var self = plus.webview.currentWebview(); orgId = self.cmpId; getResource(10,1); mui('#resourceShow').on('tap', 'li', function() { var id = this.getAttribute("data-id"); plus.nativeUI.showWaiting(); //显示原生等待框 plus.webview.create("../html/resourceShow.html", 'resourceShow.html', {}, { resourceId: id }); }) }) //获取资源 function getResource(pageSize,pageNo) { mui.plusReady(function() { mui.ajax(baseUrl + "/ajax/resource/pqOrgPublish", { type: "GET", timeout: 10000, dataType: "json", data: { "orgId": orgId, "pageNo": pageNo, "pageSize": pageSize, }, success: function(data) { console.log(JSON.stringify(data)) plus.nativeUI.closeWaiting(); plus.webview.currentWebview().show("slide-in-right", 150); if(data.success) { if(pageNo!=data.data.pageNo) { data.data.data=[]; } var obj = data.data.data; if(obj.length>0){ for(var i = 0; i < obj.length; i++) { var liItem = document.createElement("li"); liItem.setAttribute("data-id",obj[i].resourceId); liItem.className = "mui-table-view-cell" var oString = '
' + obj[i].resourceName + '
用途:' + obj[i].supportedServices + '
' oString += '