[关闭]
@chenxushan 2016-03-15T12:06:05.000000Z 字数 5988 阅读 1039

积分管理系统api

未分类


外部资源链接

前端js功能说明

多图片上传

  1. .ul_pics li{float:left;width:50px;height:50px;border:1px solid #ddd;padding:2px;text-align: center;margin:0 5px 5px 0;}
  2. .ul_pics li img{max-width: 40px;max-height: 40px;vertical-align: middle;}
  3. .progress{position:relative;padding: 1px; border-radius:3px; margin:60px 0 0 0;}
  4. .bar {background-color: green; display:block; width:0%; height:20px; border-radius:3px; }
  5. .percent{position:absolute; height:20px; display:inline-block;top:3px; left:2%; color:#fff }
  1. UploadImg('btn','ul_pics','/test/pictest',4);
  2. function UploadImg (clickEventId,EventUlId,ServerUrl,ImgCount){
  3. var ulId = "#"+EventUlId;
  4. var clickBtn = "#"+clickEventId;
  5. var uploader = new plupload.Uploader({ //创建实例的构造方法
  6. // runtimes: 'html5,flash,silverlight,html4',
  7. //上传插件初始化选用那种方式的优先级顺序
  8. browse_button: clickEventId,
  9. // 上传按钮
  10. url: ServerUrl,
  11. //远程上传地址
  12. // flash_swf_url: 'plupload/Moxie.swf',
  13. //flash文件地址
  14. // silverlight_xap_url: 'plupload/Moxie.xap',
  15. //silverlight文件地址
  16. filters: {
  17. max_file_size: '500kb',
  18. //最大上传文件大小(格式100b, 10kb, 10mb, 1gb)
  19. mime_types: [ //允许文件上传类型
  20. {
  21. title: "files",
  22. extensions: "jpg,png,gif"
  23. }]
  24. },
  25. multi_selection: true,
  26. //true:ctrl多文件上传, false 单文件上传
  27. init: {
  28. FilesAdded: function(up, files) { //文件上传前
  29. if ($(ulId).children("li").length > ImgCount) {
  30. alert("您上传的图片太多了!");
  31. uploader.destroy();
  32. } else {
  33. var li = '';
  34. plupload.each(files,
  35. function(file) { //遍历文件
  36. li += "<li id='" + file['id'] + "'><div class='progress'><span class='bar'></span><span class='percent'>0%</span></div></li>";
  37. });
  38. $(ulId).prepend(li);
  39. uploader.start();
  40. }
  41. },
  42. UploadProgress: function(up, file) { //上传中,显示进度条
  43. $("#" + file.id).find('.bar').css({
  44. "width": file.percent + "%"
  45. }).find(".percent").text(file.percent + "%");
  46. },
  47. FileUploaded: function(up, file, info) { //文件上传成功的时候触发
  48. var data = JSON.parse(info.response);
  49. $("#" + file.id).html("<div class='img'><img src='" +'/uploads/test/'+data.picuris + "'/></div><p>");
  50. if($(ulId).children("li").length > ImgCount){
  51. // $(clickBtn).hide();
  52. $(clickBtn).remove();
  53. uploader.destroy();
  54. }
  55. },
  56. Error: function(up, err) { //上传出错的时候触发
  57. alert(err.message);
  58. }
  59. }
  60. });
  61. uploader.init();
  62. }

三、用户模块API

界面侧栏

1、待领任务

2、获取我的任务

3、获取用户已经领取的当日任务

4、获取已经审核的任务

5、获取未审核的任务

6、获取员工信息

7、用户提交愿望福利

8、用户提交建议或意见

9、员工搜索自己的任务

添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注