upLoadLog static method
上传日志
Implementation
static Future<DataResult> upLoadLog(String? userId, String file) async {
var name = file.substring(file.lastIndexOf('/') + 1, file.length);
FormData formData = FormData.fromMap({
'file': MultipartFile.fromFileSync(file, filename: name),
'userId': userId,
});
var res = await BaseDao.fromBaseJson(formData, Address.upLoadLog());
if (res.result) {
var entity = TokenEntity.fromJson(res.data);
return DataResult(entity, true);
}
return res;
}