mirror of
https://github.com/Kuingsmile/PicList.git
synced 2025-02-02 19:18:13 -05:00
Fixed: tcyun error notice
This commit is contained in:
parent
5207326017
commit
1faf29732c
@ -140,14 +140,24 @@ const tcYunUpload = async (img, type, webContents) => {
|
|||||||
webContents.send('uploadProgress', 100)
|
webContents.send('uploadProgress', 100)
|
||||||
return imgList
|
return imgList
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
const body = JSON.parse(err.error)
|
const options = db.read().get('picBed.tcyun').value()
|
||||||
|
let body
|
||||||
|
if (!options.version || options.version === 'v4') {
|
||||||
|
body = JSON.parse(err.error)
|
||||||
|
const notification = new Notification({
|
||||||
|
title: '上传失败!',
|
||||||
|
body: `错误码:${body.code},请打开浏览器粘贴地址查看相关原因。`
|
||||||
|
})
|
||||||
|
notification.show()
|
||||||
|
clipboard.writeText('https://cloud.tencent.com/document/product/436/8432')
|
||||||
|
} else {
|
||||||
|
const notification = new Notification({
|
||||||
|
title: '上传失败!',
|
||||||
|
body: `请检查你的配置项是否正确`
|
||||||
|
})
|
||||||
|
notification.show()
|
||||||
|
}
|
||||||
webContents.send('uploadProgress', -1)
|
webContents.send('uploadProgress', -1)
|
||||||
const notification = new Notification({
|
|
||||||
title: '上传失败!',
|
|
||||||
body: `错误码:${body.code},请打开浏览器粘贴地址查看相关原因。`
|
|
||||||
})
|
|
||||||
notification.show()
|
|
||||||
clipboard.writeText('https://cloud.tencent.com/document/product/436/8432')
|
|
||||||
throw new Error(err)
|
throw new Error(err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user