資源簡介
某寶花錢買來的。商城小程序帶前后+后臺+安裝說明文件。商城小程序帶前后+后臺+安裝說明文件。商城小程序帶前后+后臺+安裝說明文件。商城小程序帶前后+后臺+安裝說明文件。
代碼片段和文件信息
package?com.baidu.ueditor;
import?java.util.Map;
import?javax.servlet.http.HttpServletRequest;
import?com.baidu.ueditor.define.ActionMap;
import?com.baidu.ueditor.define.AppInfo;
import?com.baidu.ueditor.define.baseState;
import?com.baidu.ueditor.define.State;
import?com.baidu.ueditor.hunter.FileManager;
import?com.baidu.ueditor.hunter.ImageHunter;
import?com.baidu.ueditor.upload.Uploader;
public?class?ActionEnter?{
private?HttpServletRequest?request?=?null;
private?String?rootPath?=?null;
private?String?contextPath?=?null;
private?String?actionType?=?null;
private?ConfigManager?configManager?=?null;
public?ActionEnter?(?HttpServletRequest?request?String?rootPath?)?{
this.request?=?request;
this.rootPath?=?rootPath;
this.actionType?=?request.getParameter(?“action“?);
this.contextPath?=?request.getContextPath();
this.configManager?=?ConfigManager.getInstance(?this.rootPath?this.contextPath?request.getRequestURI()?);
}
public?String?exec?()?{
String?callbackName?=?this.request.getParameter(“callback“);
if?(?callbackName?!=?null?)?{
if?(?!validCallbackName(?callbackName?)?)?{
return?new?baseState(?false?AppInfo.ILLEGAL?).toJSONString();
}
return?callbackName+“(“+this.invoke()+“);“;
}?else?{
return?this.invoke();
}
}
public?String?invoke()?{
if?(?actionType?==?null?||?!ActionMap.mapping.containsKey(?actionType?)?)?{
return?new?baseState(?false?AppInfo.INVALID_ACTION?).toJSONString();
}
if?(?this.configManager?==?null?||?!this.configManager.valid()?)?{
return?new?baseState(?false?AppInfo.CONFIG_ERROR?).toJSONString();
}
State?state?=?null;
int?actionCode?=?ActionMap.getType(?this.actionType?);
Mapject>?conf?=?null;
switch?(?actionCode?)?{
case?ActionMap.CONFIG:
return?this.configManager.getAllConfig().toString();
case?ActionMap.UPLOAD_IMAGE:
case?ActionMap.UPLOAD_SCRAWL:
case?ActionMap.UPLOAD_VIDEO:
case?ActionMap.UPLOAD_FILE:
conf?=?this.configManager.getConfig(?actionCode?);
state?=?new?Uploader(?request?conf?).doExec();
break;
case?ActionMap.CATCH_IMAGE:
conf?=?configManager.getConfig(?actionCode?);
String[]?list?=?this.request.getParameterValues(?(String)conf.get(?“fieldName“?)?);
state?=?new?ImageHunter(?conf?).capture(?list?);
break;
case?ActionMap.LIST_IMAGE:
case?ActionMap.LIST_FILE:
conf?=?configManager.getConfig(?actionCode?);
int?start?=?this.getStartIndex();
state?=?new?FileManager(?conf?).listFile(?start?);
break;
}
return?state.toJSONString();
}
public?int?getStartIndex?()?{
String?start?=?this.request.getParameter(?“start“?);
try?{
return?Integer.parseInt(?start?);
}?catch?(?Exception?e?)?{
return?0;
}
}
/**
?*?callback參數驗證
?*/
public?boolean?validCallbackName?(?String?name?)?{
if?(?name.matches(?“^[a-zA-Z_]+[\\w0-9_]*$“?)?)?{
return?true;
}
retur
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件????????608??2018-05-21?14:59??第一套1\安裝說明.txt
?????文件??????42079??2018-05-21?15:43??第一套1\截圖\new?image?-?6ddym.jpg
?????文件??????86494??2018-05-21?15:43??第一套1\截圖\new?image?-?h0vte.jpg
?????文件??????70382??2018-05-21?15:43??第一套1\截圖\new?image?-?kfw1h.jpg
?????文件??????44355??2018-05-21?15:43??第一套1\截圖\new?image?-?kiegr.jpg
?????文件??????56396??2018-05-21?15:43??第一套1\截圖\new?image?-?r2qkk.jpg
?????文件??????38304??2018-05-21?15:43??第一套1\截圖\new?image?-?w8fbv.jpg
????.......??????8196??2017-07-13?23:43??第一套1\源碼\前端\.DS_Store
?????文件???????3610??2018-06-21?04:50??第一套1\源碼\前端\app.js
?????文件???????1598??2017-10-26?20:01??第一套1\源碼\前端\app.json
????.......??????3153??2017-07-13?23:43??第一套1\源碼\前端\app.wxss
?????文件????????975??2018-06-21?04:49??第一套1\源碼\前端\config.js
????.......?????42079??2017-07-13?23:43??第一套1\源碼\前端\Doc\new?image?-?6ddym.jpg
????.......?????86494??2017-07-13?23:43??第一套1\源碼\前端\Doc\new?image?-?h0vte.jpg
????.......?????70382??2017-07-13?23:43??第一套1\源碼\前端\Doc\new?image?-?kfw1h.jpg
????.......?????44355??2017-07-13?23:43??第一套1\源碼\前端\Doc\new?image?-?kiegr.jpg
????.......?????56396??2017-07-13?23:43??第一套1\源碼\前端\Doc\new?image?-?r2qkk.jpg
????.......?????38304??2017-07-13?23:43??第一套1\源碼\前端\Doc\new?image?-?w8fbv.jpg
?????文件??????84064??2017-07-13?23:43??第一套1\源碼\前端\Doc\new?image?-?xv2a7.jpg
????.......?????36777??2017-07-13?23:43??第一套1\源碼\前端\images\33.png
????.......?????41135??2017-07-13?23:43??第一套1\源碼\前端\images\44.png
????.......??????7378??2017-07-13?23:43??第一套1\源碼\前端\images\baoming.png
????.......???????475??2017-07-13?23:43??第一套1\源碼\前端\images\car.png
????.......??????2693??2017-07-13?23:43??第一套1\源碼\前端\images\cart.jpg
????.......???????468??2017-07-13?23:43??第一套1\源碼\前端\images\dfh.png
????.......???????482??2017-07-13?23:43??第一套1\源碼\前端\images\dfk.png
????.......???????359??2017-07-13?23:43??第一套1\源碼\前端\images\dleicon.png
????.......???????426??2017-07-13?23:43??第一套1\源碼\前端\images\dpl.png
????.......???????660??2017-07-13?23:43??第一套1\源碼\前端\images\dsh.png
????.......???????915??2017-07-13?23:43??第一套1\源碼\前端\images\fei.png
............此處省略4127個文件信息
評論
共有 條評論