优化bug
This commit is contained in:
+6
-4
@@ -215,7 +215,8 @@
|
||||
fsData = fs.readFileSync(fullPath);
|
||||
let soonData = fs.readFileSync($(this).attr("data"))
|
||||
let j = JSON.parse(soonData.toString());
|
||||
ipcRenderer.send('open-design-page', $(this).attr("data"), j.soonType);
|
||||
let type = j.soonType ? j.soonType : j.backBlackPic ? 2 : 1;
|
||||
ipcRenderer.send('open-design-page', $(this).attr("data"), type);
|
||||
} catch (e) {
|
||||
layer.msg(language_str("noFile"));//当前文件不存在
|
||||
let j = JSON.parse(fsData.toString());
|
||||
@@ -261,10 +262,11 @@
|
||||
}).then(result => {
|
||||
console.log(result.canceled)
|
||||
console.log(result.filePaths)
|
||||
if (result.canceled) return;
|
||||
let soonData = fs.readFileSync(result.filePaths)
|
||||
if (result.canceled || !result.filePaths[0]) return;
|
||||
let soonData = fs.readFileSync(result.filePaths[0])
|
||||
let j = JSON.parse(soonData.toString());
|
||||
ipcRenderer.send('open-design-page', result.filePaths, j.soonType);
|
||||
let type = j.soonType ? j.soonType : j.backBlackPic ? 2 : 1;
|
||||
ipcRenderer.send('open-design-page', result.filePaths[0], type);
|
||||
//console.log(result.filePaths)
|
||||
}).catch(err => {
|
||||
console.log(err)
|
||||
|
||||
Reference in New Issue
Block a user