diff --git a/CHANGELOG.md b/CHANGELOG.md index b9b9050..9de0ed6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,7 @@ +## v1.24 `2024-01-24` +- fix 修改请求地址无效的问题 + ## v1.22 `2023-11-10` - fix 扩展词库类别有重复的问题 - 添加全局快捷键调起程序 ctrl + shift + alt + i diff --git a/js/Dict.js b/js/Dict.js index 2484380..62b7ef6 100644 --- a/js/Dict.js +++ b/js/Dict.js @@ -30,7 +30,7 @@ class Dict { this.isGroupMode = this.header.includes('dict_grouped: true') // 根据有没有这一段文字进行判断,是否为分组形式的码表 let body = fileContent.substring(this.indexEndOfHeader) this.wordsOrigin = this.isGroupMode? this.getDictWordsInGroupMode(body): this.getDictWordsInNormalMode(body) - console.log('处理后的词条:',this.wordsOrigin) + // console.log('处理后的词条:',this.wordsOrigin) } } // 总的词条数量 @@ -75,7 +75,7 @@ class Dict { // 返回 word 分组 getDictWordsInGroupMode(fileContent){ - console.log(fileContent) + // console.log(fileContent) let startPoint = new Date().getTime() fileContent = fileContent.replace(/\r\n/g,'\n') let lines = fileContent.split(EOL) // 拆分词条与编码成单行 diff --git a/js/Global.js b/js/Global.js index 67f5d8c..bfaf9f0 100644 --- a/js/Global.js +++ b/js/Global.js @@ -1,5 +1,5 @@ -const IS_IN_DEVELOP = false // 生产 -// const IS_IN_DEVELOP = true // 开发 +// const IS_IN_DEVELOP = false // 生产 +const IS_IN_DEVELOP = true // 开发 const DEFAULT_BASE_URL = 'http://kylebing.cn/portal/' // const BASE_URL = 'http://localhost:3000/' diff --git a/main.js b/main.js index 5f4ddca..0bc726c 100644 --- a/main.js +++ b/main.js @@ -226,6 +226,7 @@ function createMainWindow() { let config = readConfigFile() // 没有配置文件时,返回 false + console.log('config: ', config) wubiApi .pushDictFileContent( userInfo, diff --git a/package.json b/package.json index 710443a..dc64cd0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "wubi-dict-editor", - "version": "1.2.3", + "version": "1.2.4", "private": true, "author": { "name": "KyleBing", @@ -34,7 +34,7 @@ "config": { "forge": { "packagerConfig": { - "appVersion": "1.2.3", + "appVersion": "1.2.4", "name": "五笔码表助手", "appCopyright": "kylebing@163.com", "icon": "./assets/img/appIcon/appicon", diff --git a/view/index/App.js b/view/index/App.js index 5286239..9a607e6 100644 --- a/view/index/App.js +++ b/view/index/App.js @@ -256,7 +256,7 @@ const app = { wubiApi .checkDictFileBackupExistence(this.config.userInfo, { fileName: this.dict.fileName - }) + }, this.config.baseURL) .then(res => { this.dictBackupInfo = res.data /* { @@ -282,7 +282,7 @@ const app = { // 获取线上的扩展词库分类列表 getOnlineCategories(){ wubiApi - .getCategories(this.config.userInfo) + .getCategories(this.config.userInfo, this.config.baseURL) .then(res => { this.categories = res.data }) @@ -311,7 +311,7 @@ const app = { { category_id: this.selectedCategoryId, words: wordsSelected - }) + }, this.config.baseURL) .then(res => { let message = `添加 ${res.data.addedCount} 条` if (res.data.existCount > 0){ @@ -332,8 +332,9 @@ const app = { // 下载线上扩展词库到本地 updateExtraDict(){ if (this.config.userInfo.password){ + console.log('config: ', this.config) wubiApi - .pullExtraDict(this.config.userInfo) + .pullExtraDict(this.config.userInfo, this.config.baseURL) .then(res => { this.tips.push('获取线上分类扩展词库内容成功')