js插件dropload上拉下滑加载数据实例解析

前端之家收集整理的这篇文章主要介绍了js插件dropload上拉下滑加载数据实例解析前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

本文实例为大家分享了dropload插件上拉下滑加载数据的具体代码,供大家参考,具体内容如下

效果图:

1.导入js

dropload.min.js zepto.min.js

2.后台查询

map = new HashMap(); map.put("transactionId",transaction == null ? 0L : transaction.getId()); List accounts = fuStockAccountService.findAccountByMap(0,5,map); this.getActionContext().put("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,Integer.MAX_VALUE,map);
    JSONObject json = new JSONObject();
    JSONArray array = new JSONArray();
    if (accounts.size() > 0) {
    for (FuStockAccount account : accounts) {
    JSONObject obj = new JSONObject();
    obj.put("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 ? 0 : account.getAvailable()));
    obj.put("ableMoney",##0.00").format(account.getAbleMoney() == null ? 0 : account.getAbleMoney()));
    obj.put("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.页面插件的使用

<Meta http-equiv="X-UA-Compatible" content="IE=Edge"> <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}-我找的券 <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> <%@ include file="../common/css.jsp"%>
可用资金:

以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持编程之家。

猜你在找的JavaScript相关文章