|
|
|
@ -18,7 +18,6 @@ import rxhttp.wrapper.param.RxHttp |
|
|
|
|
import rxhttp.wrapper.param.toByteArray |
|
|
|
|
import java.io.File |
|
|
|
|
import java.net.URLEncoder |
|
|
|
|
import java.text.DateFormat |
|
|
|
|
import java.util.* |
|
|
|
|
|
|
|
|
|
@Keep |
|
|
|
@ -114,13 +113,6 @@ interface JsExtensions { |
|
|
|
|
return contents.toString() |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* js实现文件夹/文件的删除 |
|
|
|
|
*/ |
|
|
|
|
fun deleteFolder(path: String) { |
|
|
|
|
FileUtils.deleteFile(path) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* js实现重定向拦截,网络访问get |
|
|
|
|
*/ |
|
|
|
@ -209,15 +201,6 @@ interface JsExtensions { |
|
|
|
|
return dateFormat.format(Date(time)) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
fun timeFormat(time: String): String { |
|
|
|
|
val date = DateFormat.getDateTimeInstance().parse(time) |
|
|
|
|
return if (date == null) { |
|
|
|
|
"" |
|
|
|
|
} else { |
|
|
|
|
dateFormat.format(date) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* utf8编码转gbk编码 |
|
|
|
|
*/ |
|
|
|
|