富贵资源网 Design By www.hznty.com
本文实例为大家分享了dropload插件上拉下滑加载数据的具体代码,供大家参考,具体内容如下
效果图:
1.导入js
dropload.min.js
zepto.min.js <!-- jQuery1.7以上 或者 Zepto 二选一,不要同时都引用 -->
2.后台查询
/** * 我找的劵 * * @return */ @Action("IFindTicket") public String IFindTicket() { try { FuTransaction transaction = fuTransactionService.findByUserId(userId); Map<String, Object> map = new HashMap<String, Object>(); map.put("transactionId", transaction == null "accounts", accounts); } catch (Exception e) { e.printStackTrace(); logger.equals(e); } return SUCCESS; } /** * 我找的劵数据 * * @return */ @Action("findTicketData") public String findTicketData() { try { FuTransaction transaction = fuTransactionService.findByUserId(userId); Map<String, Object> map = new HashMap<String, Object>(); map.put("transactionId", transaction == null "id", account.getId()); obj.put("openEquity", account.getOpenEquity()); obj.put("capitalAccount", account.getCapitalAccount()); obj.put("transactionStatus", account.getTransactionStatus()); obj.put("status", account.getTransactionStatus() == 0 "正在操作" : "已退劵"); obj.put("available", new DecimalFormat("#,###,##0.00").format(account.getAvailable() == null "ableMoney", new DecimalFormat("#,###,##0.00").format(account.getAbleMoney() == null "createTime", new SimpleDateFormat("yyyy.MM.dd").format(account.getCreateTime())); array.add(obj); } } json.put("array", array); write(json.toString()); } catch (Exception e) { e.printStackTrace(); logger.error(e); } return null; }
3.页面插件的使用
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="X-UA-Compatible" content="IE=Edge"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name=“viewport” content=“width=device-width; initial-scale=1.0”> <meta name="viewport" content="width=device-width,height=device-height,inital-scale=1.0,maximum-scale=1.0,user-scalable=no;"> <meta name="apple-mobile-web-app-capable" content="yes"> <meta name="apple-mobile-web-app-status-bar-style" content="black"> <meta name="format-detection" content="telephone=no"> <%@ include file="../common/meta.jsp" %> <%@ include file="/WEB-INF/include/tagtld.jsp"%> <title>${title}-我找的券</title> <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> <%@ include file="../common/css.jsp"%> </head> <body class="whiteBg"> <div class="sucContain" > <div class="containImg"> <div class="infoList"> <!-- 列表 --> <div class="findTicList"> <table class="findTicIn" cellpadding="0" cellspacing="0" width="100%" border="0"> <c:forEach items="${accounts }" var="stock"> <tr> <td class=" smallSize firstTd"> <div class="upTh"> <span class="blueCol siz">${stock.openEquity }:${stock.capitalAccount}<%-- ***${fn:substring(stock.capitalAccount,3,5)} --%></span> <c:if test="${stock.transactionStatus==0 }"> <a class="czIng">正在操作</a> </c:if> <c:if test="${stock.transactionStatus==1 }"> <a class="bacIng">已退券</a> </c:if> </div> <div class="downLis"> <div class="leftDown"> <span class="leftDoFir">股票市值:<fmt:formatNumber value="${empty stock.available" pattern="#,###,##0.00"/>元</span><span>可用资金:<fmt:formatNumber value="${empty stock.ableMoney" pattern="#,###,##0.00"/>元</span> </div> <div class="rgtDown"><a href="${ctx}/wxyqb/accountInfo.htm"><img class="lftJt" src="/UploadFiles/2021-04-02/mejtou.png">以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持。
富贵资源网 Design By www.hznty.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
富贵资源网 Design By www.hznty.com
暂无评论...