Commit e55e32bd authored by yinjiacheng's avatar yinjiacheng

update 图片服务-商品图片上传

parent ccc241d1
......@@ -37,7 +37,6 @@ import kotlin.collections.ArrayList
* 提供调用原生相机拍照、图片选择器、图片预览、图片上传能力
*/
// TODO: 7/9/21 动态获取权限
// TODO: 7/9/21 清除缓存
class ImageService : ZapService() {
companion object {
......@@ -272,7 +271,7 @@ class ImageService : ZapService() {
}
override fun onTaskSuccess(bucket: String?, objectKey: String?, imageUploadBean: ImageUploadBean?, tag: String?) {
resolver.success(JSONObject(gson.toJson(UploadImageBean(id, "${bucket}/${objectKey}"))))
resolver.success(JSONObject(gson.toJson(imageUploadBean?.image_id?.let { imageId -> UploadImageBean(id, imageId) })))
// 删除临时文件
clearCache(picOriginalPath + it.data.fileName, it.data.compressPath)
}
......@@ -317,7 +316,7 @@ class ImageService : ZapService() {
*/
enum class ScenarioType(val scenario: String) {
// 商品
COMMODITY("goods")
COMMODITY("shq_goods")
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment