diff --git a/README.md b/README.md
index 55e89a7..dd5a3ba 100644
--- a/README.md
+++ b/README.md
@@ -18,7 +18,8 @@
- 搜索历史改成cookie保存方式,默认保存7天✔
- 完善UI布局界面✔
- 基础功能优化
- - 增加网络错误提示 回调函数错误处理。。。
+ - 增加网络错误提示 ✔
+ - 可以修改爬虫地址
- 添加可设置代理
- 可以获取搜索内容的更多页数
- 导入百度云盘
diff --git a/src/main/module/SearchOne.js b/src/main/module/SearchOne.js
index 185b48a..479fdab 100644
--- a/src/main/module/SearchOne.js
+++ b/src/main/module/SearchOne.js
@@ -6,10 +6,12 @@ import {
} from './Crawler'
import {
GET_SEARCH_LIST,
- GET_SEARCH_DETAIL
+ GET_SEARCH_DETAIL,
+ SET_SEARCH_ADDR
} from '@/message'
import jq from 'cheerio'
-const baseUrl = 'https://btsow.pw/search/'
+// let baseUrl = 'https://btsow.pw/search/'
+let baseUrl = ''
export default () => {
// get list ...
ipcMain.on(GET_SEARCH_LIST, (event, agrs) => {
@@ -31,6 +33,22 @@ export default () => {
event.sender.send(GET_SEARCH_DETAIL, data)
})
})
+
+ // set baseUrl ...
+ ipcMain.on(SET_SEARCH_ADDR, (event, agrs) => {
+ console.log('setSearchAddr...', agrs.method)
+
+ switch (agrs.method) {
+ case 'SET':
+ baseUrl = agrs.data
+ event.sender.send(SET_SEARCH_ADDR, baseUrl)
+ // localStorage.setItem('SEARCH_ADDR', baseUrl)
+ break
+ case 'GET':
+ event.sender.send(SET_SEARCH_ADDR, baseUrl)
+ break
+ }
+ })
}
function getSearchDetail ($) {
let data = {}
diff --git a/src/message.js b/src/message.js
index d8ec592..1076ffa 100644
--- a/src/message.js
+++ b/src/message.js
@@ -1,3 +1,4 @@
export const GET_SEARCH_LIST = 'GET_SEARCH_LIST'
export const GET_SEARCH_DETAIL = 'GET_SEARCH_DETAIL'
+export const SET_SEARCH_ADDR = 'SET_SEARCH_ADDR'
export const LOGIN_BAIDUYUN = 'LOGIN_BAIDUYUN'
diff --git a/src/renderer/view/search/components/SearchSetting.vue b/src/renderer/view/search/components/SearchSetting.vue
index 99f5946..8628f0c 100644
--- a/src/renderer/view/search/components/SearchSetting.vue
+++ b/src/renderer/view/search/components/SearchSetting.vue
@@ -3,21 +3,38 @@
:visible.sync="SettingVisible"
title="设置">
+
+
+
+ 保存
+
+
+
+
+
+
清空
+
\ No newline at end of file
+
+