Skip to content

Commit 8cfe104

Browse files
committed
APIAuto: 保存和恢复已选项目及 URL Host
1 parent 7dcd871 commit 8cfe104

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

  • APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/resources/static/api/js

APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/resources/static/api/js/main.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2699,6 +2699,8 @@ https://github.com/Tencent/APIJSON/issues
26992699

27002700
vUrl.value = item.host + bu
27012701
this.showUrl(false, bu)
2702+
2703+
this.saveCache('', 'projectHost', this.projectHost)
27022704
},
27032705

27042706
listProjectHost: function() {
@@ -7505,6 +7507,7 @@ Content-Type: ` + contentType) + (StringUtil.isEmpty(headerStr, true) ? '' : hea
75057507
if (type == 'project') {
75067508
if (isEnter || item.host == (this.projectHost || {}).host) {
75077509
this.projectHost = {project: item.project}
7510+
this.saveCache('', 'projectHost', this.projectHost)
75087511
}
75097512
return
75107513
}
@@ -12795,6 +12798,11 @@ Content-Type: ` + contentType) + (StringUtil.isEmpty(headerStr, true) ? '' : hea
1279512798
'\n} catch (e) {\n' + e.message)
1279612799
}
1279712800
try { //这里是初始化,不能出错
12801+
var projectHost = this.getCache('', 'projectHost')
12802+
if (projectHost != null) {
12803+
this.projectHost = projectHost
12804+
}
12805+
1279812806
var projectHosts = this.getCache('', 'projectHosts')
1279912807
if (projectHosts != null && projectHosts.length >= 1) {
1280012808
this.projectHosts = projectHosts

0 commit comments

Comments
 (0)