Browse Source

refactor: pac修改

pull/67/head
xiaojunnuo 4 years ago
parent
commit
26d959dcc0
  1. 6
      packages/gui/src/bridge/api/backend.js

6
packages/gui/src/bridge/api/backend.js

@ -42,10 +42,14 @@ const localApi = {
load () {
const settingPath = _getSettingsPath()
if (!fs.existsSync(settingPath)) {
return {}
this.save({ overwall: true })
}
const file = fs.readFileSync(settingPath)
const setting = JSON5.parse(file.toString())
if (setting && setting.installTime == null) {
setting.installTime = new Date().getTime()
this.save(setting)
}
return setting || {}
},
save (setting = {}) {

Loading…
Cancel
Save