u
This commit is contained in:
parent
fea3922e00
commit
0e05f43f7f
8
index.js
8
index.js
@ -220,7 +220,9 @@ module.exports = {
|
||||
uni.hideLoading()
|
||||
|
||||
try{ // 不知为何,uni.uploadFile返回的 data 是字符串而不是对象
|
||||
data = JSON.parse(data)
|
||||
if (typeof(data)==='string') {
|
||||
data = JSON.parse(data)
|
||||
}
|
||||
}catch(exp){
|
||||
return { _state: 'CLIENT_FAIL_RESPONSE_JSON_MALFORMED'}
|
||||
}
|
||||
@ -304,11 +306,9 @@ module.exports = {
|
||||
}) {
|
||||
if (backend==='UNICLOUD'){
|
||||
const resultCloud = await this.pickupFile2Cloud({mediaType, count, sizeType, sourceType, maxDuration })
|
||||
this.colog(resultCloud)
|
||||
return resultCloud
|
||||
}else if (backend==='SERVER' && url){
|
||||
}else // if (backend==='SERVER'){
|
||||
const resultServer = await this.pickupFile2Server({mediaType, count, sizeType, sourceType, maxDuration, url, header, formData, name})
|
||||
this.colog(resultServer)
|
||||
return resultServer
|
||||
}
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user