Commit e453c5ab authored by Steven杜宇's avatar Steven杜宇

// 续期

parent 1d98ad7c
......@@ -271,7 +271,8 @@ class YHResignMaterialViewModel: YHBaseViewModel {
// 再调用业务接口
if let successUrl = successUrl, !successUrl.isEmpty {
let fileName = fileUrl.absoluteString.lastPathComponent
var fileName = fileUrl.absoluteString.lastPathComponent
let model = YHMaterialModelItemModel()
model.url = successUrl
......@@ -279,7 +280,7 @@ class YHResignMaterialViewModel: YHBaseViewModel {
model.naming = fileName
let dateFormatter = DateFormatter()
dateFormatter.dateFormat = "YYYY-MM-dd"
dateFormatter.dateFormat = "YYYY-MM-dd HH:mm:ss"
let dateString = dateFormatter.string(from: Date())
model.updated_at = dateString
......@@ -375,8 +376,13 @@ class YHResignMaterialViewModel: YHBaseViewModel {
// 再调用业务接口
let model = YHMaterialModelItemModel()
model.name = imageName
model.naming = imageName
var imgName = imageName
if let fileURL = URL(string: imageName) {
imgName = fileURL.deletingPathExtension().lastPathComponent + "." + suffix
}
model.name = imgName
model.naming = imgName
model.url = url
let dateFormatter = DateFormatter()
......
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