Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V7.1.0 #563

Merged
merged 43 commits into from
Feb 7, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
cbb207d
add: tsconfig-paths-webpack-plugin (#3387)
karmaral Jan 4, 2023
511de85
fix: set main process.type to "browser" in production (#3370)
Rafatcb Jan 4, 2023
98eeead
chore: 移除tg信息
1zilc Jan 29, 2023
d53c261
fix: 修复baseUrl缺失
1zilc Jan 29, 2023
93e9dfd
fix: 优化全局任务引起不必要的渲染
1zilc Jan 29, 2023
a3ebc1d
fix: 修复webpack alias引起的编译错误
1zilc Jan 29, 2023
d4f03f2
chore: 修改发布工作流触发时机
1zilc Jan 29, 2023
b54445e
fix: 修复DetailPage不必要的渲染
1zilc Jan 29, 2023
ecf2e85
chore: 规范证书
1zilc Jan 29, 2023
a7dcf5a
fix: 修复部分纯ESM模块加载问题
1zilc Jan 30, 2023
57f276a
fix: 修复renderer prod构建
1zilc Jan 30, 2023
c36da1e
fix: 修复windows构建符号转义问题
1zilc Jan 30, 2023
4700c65
Bump chalk from 4.1.2 to 5.2.0 (#558)
dependabot[bot] Jan 30, 2023
5bdc44c
Bump query-string from 7.1.3 to 8.1.0 (#556)
dependabot[bot] Jan 30, 2023
0a88739
Bump eslint-config-prettier from 8.5.0 to 8.6.0 (#554)
dependabot[bot] Jan 30, 2023
c595dbd
fix: 修改ts-node编译配置
1zilc Jan 30, 2023
3eb3b05
feat: type module
1zilc Jan 31, 2023
222e5f3
fix: 添加tsx
1zilc Jan 31, 2023
616357c
fix: 移除ts-node
1zilc Jan 31, 2023
9b9adb1
Bump rimraf from 3.0.2 to 4.1.2 (#560)
dependabot[bot] Jan 31, 2023
a2d1c04
Bump ts-jest from 28.0.8 to 29.0.5 (#559)
dependabot[bot] Jan 31, 2023
e8c025f
bump: udpate typescript 5.0-beta
1zilc Feb 1, 2023
1f7904d
Merge branch 'dev' of github.com:1zilc/fishing-funds into dev
1zilc Feb 1, 2023
84617e1
fix: 移除不必要的命令
1zilc Feb 1, 2023
d920603
fix: 完善.eslintignore
1zilc Feb 1, 2023
5543f16
fix: 回退rimraf
1zilc Feb 1, 2023
5d3d596
fix: 移除lint 测试
1zilc Feb 1, 2023
ac9ccaa
feat: 添加fakeUA
1zilc Feb 1, 2023
8fd9295
fix: 修复got headers配置问题
1zilc Feb 1, 2023
3fc8c81
fix: 优化eval间接调用
1zilc Feb 3, 2023
24dd748
fix: 修复近期资讯rowKey
1zilc Feb 3, 2023
5103f24
fix: 修复appCenter遍历key缺失
1zilc Feb 3, 2023
d493541
feat: 更新移动端UA
1zilc Feb 3, 2023
07bf344
fix: 修复allowpopups失效
1zilc Feb 3, 2023
1ccb791
Revert "fix: 优化eval间接调用"
1zilc Feb 3, 2023
126a135
chore: 移除ts-node、sucrase
1zilc Feb 3, 2023
3e67759
chore: bump eslint-config-erb (#3412)
amilajack Feb 5, 2023
6eb03e2
bump: update deps
1zilc Feb 6, 2023
8fc967f
bump: 7.1.0
1zilc Feb 7, 2023
cfd2a0f
bump: update electron 23.0.0
1zilc Feb 7, 2023
d077113
chore: update workflow node to v18
1zilc Feb 7, 2023
ec85a0d
chore: update copyright
1zilc Feb 7, 2023
935bb3f
Bump @types/node from 18.11.9 to 18.11.19 (#565)
dependabot[bot] Feb 7, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Revert "fix: 优化eval间接调用"
This reverts commit 3fc8c81.
  • Loading branch information
1zilc committed Feb 3, 2023
commit 1ccb79179a63dc179571d33632b74dcd3e28d43a
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,9 @@
"sass-loader": "^13.0.0",
"source-map-support": "^0.5.21",
"style-loader": "^3.0.0",
"sucrase": "^3.29.0",
"ts-jest": "^29.0.5",
"ts-node": "^10.9.1",
"tsconfig-paths-webpack-plugin": "^4.0.0",
"tsx": "^3.12.2",
"typescript": "^5.0.0-beta",
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/services/exchange.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export async function GetGlobalBondFromEastmoney() {
low: string;
change: string;
percent: string;
}[] = (0, eval)(`(()=>{
}[] = eval(`(()=>{
${script};
return data.slice(1).map((item)=>{
const [area,code,name,date,time,price,high,low,change,percent] = item.split(',');
Expand Down
12 changes: 6 additions & 6 deletions src/renderer/services/fund.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export async function FromEastmoney(code: string) {
responseType: 'text',
});
if (body.startsWith('jsonpgz')) {
const fund: Fund.ResponseItem = (0, eval)(body);
const fund: Fund.ResponseItem = eval(body);
if (fund === undefined) {
return await GetEtfFundHourFromEastMoney(code);
} else {
Expand Down Expand Up @@ -281,7 +281,7 @@ export async function FromFund123(code: string) {
const $ = cheerio.load(html);
const script = $('script').eq(2).html();
const fixscript = script?.replace(/window\.context/g, 'const o');
const context = (0, eval)(`(() => {
const context = eval(`(() => {
${fixscript}
return o;
})()`);
Expand Down Expand Up @@ -568,7 +568,7 @@ export async function FromFund10jqka(code: string) {
},
});

const string = (0, eval)(`(()=>{
const string = eval(`(()=>{
const ${script};
return vm_fd_${data.hqcode};
})()`);
Expand Down Expand Up @@ -959,7 +959,7 @@ export async function GetQDIIFundFromFund123(code: string) {
const $ = cheerio.load(html);
const script = $('script').eq(2).html();
const fixscript = script?.replace(/window\.context/g, 'const o');
const context = (0, eval)(`(() => {
const context = eval(`(() => {
${fixscript}
return o;
})()`);
Expand Down Expand Up @@ -1279,7 +1279,7 @@ export async function GetRankDataFromEasemoney(type: string) {
ed: `${now.getFullYear()}-${now.getMonth() + 1}-${now.getDate()}`,
},
});
return (0, eval)(`(() => {
return eval(`(() => {
${body}
return rankData.datas;
})()`);
Expand All @@ -1294,7 +1294,7 @@ export async function GetFundRatingFromEasemoney() {
const { body: html } = await request('http://fund.eastmoney.com/data/fundrating.html', { responseType: 'text' });
const $ = cheerio.load(html);
const script = $('#fundinfo').find('script').html();
const fundinfos = (0, eval)(`(() => {
const fundinfos = eval(`(() => {
${script}
return fundinfos;
})()`);
Expand Down
28 changes: 14 additions & 14 deletions src/renderer/services/news.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export async function GetLiveList() {
},
});

const list: News.ResponseItem[] = (0, eval)(`(()=>{
const list: News.ResponseItem[] = eval(`(()=>{
${script}
return ajaxResult.LivesList;
})()`);
Expand All @@ -29,7 +29,7 @@ export async function GetFocusList() {
},
});

const list: News.ResponseItem[] = (0, eval)(`(()=>{
const list: News.ResponseItem[] = eval(`(()=>{
${script}
return ajaxResult.LivesList;
})()`);
Expand All @@ -48,7 +48,7 @@ export async function GetListedList() {
},
});

const list: News.ResponseItem[] = (0, eval)(`(()=>{
const list: News.ResponseItem[] = eval(`(()=>{
${script}
return ajaxResult.LivesList;
})()`);
Expand All @@ -67,7 +67,7 @@ export async function GetGlobalList() {
},
});

const list: News.ResponseItem[] = (0, eval)(`(()=>{
const list: News.ResponseItem[] = eval(`(()=>{
${script}
return ajaxResult.LivesList;
})()`);
Expand All @@ -86,7 +86,7 @@ export async function GetGoodsList() {
},
});

const list: News.ResponseItem[] = (0, eval)(`(()=>{
const list: News.ResponseItem[] = eval(`(()=>{
${script}
return ajaxResult.LivesList;
})()`);
Expand All @@ -105,7 +105,7 @@ export async function GetExchangeList() {
},
});

const list: News.ResponseItem[] = (0, eval)(`(()=>{
const list: News.ResponseItem[] = eval(`(()=>{
${script}
return ajaxResult.LivesList;
})()`);
Expand All @@ -124,7 +124,7 @@ export async function GetBondList() {
},
});

const list: News.ResponseItem[] = (0, eval)(`(()=>{
const list: News.ResponseItem[] = eval(`(()=>{
${script}
return ajaxResult.LivesList;
})()`);
Expand All @@ -143,7 +143,7 @@ export async function GetFundList() {
},
});

const list: News.ResponseItem[] = (0, eval)(`(()=>{
const list: News.ResponseItem[] = eval(`(()=>{
${script}
return ajaxResult.LivesList;
})()`);
Expand All @@ -162,7 +162,7 @@ export async function GetChinaList() {
},
});

const list: News.ResponseItem[] = (0, eval)(`(()=>{
const list: News.ResponseItem[] = eval(`(()=>{
${script}
return ajaxResult.LivesList;
})()`);
Expand All @@ -181,7 +181,7 @@ export async function GetUsaList() {
},
});

const list: News.ResponseItem[] = (0, eval)(`(()=>{
const list: News.ResponseItem[] = eval(`(()=>{
${script}
return ajaxResult.LivesList;
})()`);
Expand All @@ -200,7 +200,7 @@ export async function GetEuList() {
},
});

const list: News.ResponseItem[] = (0, eval)(`(()=>{
const list: News.ResponseItem[] = eval(`(()=>{
${script}
return ajaxResult.LivesList;
})()`);
Expand All @@ -219,7 +219,7 @@ export async function GetUkList() {
},
});

const list: News.ResponseItem[] = (0, eval)(`(()=>{
const list: News.ResponseItem[] = eval(`(()=>{
${script}
return ajaxResult.LivesList;
})()`);
Expand All @@ -238,7 +238,7 @@ export async function GetJpList() {
},
});

const list: News.ResponseItem[] = (0, eval)(`(()=>{
const list: News.ResponseItem[] = eval(`(()=>{
${script}
return ajaxResult.LivesList;
})()`);
Expand Down Expand Up @@ -272,7 +272,7 @@ export async function GetRecent(keyword: string, pageindex: number, type: string
cb: 'cb',
},
});
const data = (0, eval)(script);
const data = eval(script);
return {
total: data.hitsTotal > 100 ? 100 : data.hitsTotal,
list: data.result.cmsArticleWebOld,
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/services/stock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export async function SearchFromEastmoney(keyword: string) {
cb: 'cb',
},
});
const data = (0, eval)(script);
const data = eval(script);

return (
data.result.codetableLabelWeb.labelList.map((item: any) => {
Expand Down
8 changes: 4 additions & 4 deletions src/renderer/services/zindex.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ export async function GetEconomyIndexFromEastmoney(market: number) {
_: Date.now(),
},
});
const data = (0, eval)(body);
const data = eval(body);
const result = data.map((item: string) => {
return item.split(',');
});
Expand Down Expand Up @@ -421,7 +421,7 @@ export async function GetRemoteZindexConfig() {
},
}
);
const a1 = (0, eval)(b1);
const a1 = eval(b1);
const { body: b2 } = await request(
`http://32.push2.eastmoney.com/api/qt/clist/get?pn=1&pz=5&po=1&np=1&ut=bd1d9ddb04089700cf9c27f6f7426281&fltt=2&invt=2&fid=f3&fs=m:1+t:1`,
{
Expand All @@ -433,7 +433,7 @@ export async function GetRemoteZindexConfig() {
},
}
);
const a2 = (0, eval)(b2);
const a2 = eval(b2);
const { body: b3 } = await request(
`http://32.push2.eastmoney.com/api/qt/clist/get?&pn=1&pz=5&po=1&np=1&ut=bd1d9ddb04089700cf9c27f6f7426281&fltt=2&invt=2&fid=f3&fs=m:0+t:5`,
{
Expand All @@ -445,7 +445,7 @@ export async function GetRemoteZindexConfig() {
},
}
);
const a3 = (0, eval)(b3);
const a3 = eval(b3);
const result = [...a1, ...a2, ...a3];
return result;
}
4 changes: 2 additions & 2 deletions src/renderer/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ export function GetVariblesColor(): Record<keyof typeof CONST.VARIBLES, string>

export function Parsepingzhongdata(code: string) {
try {
return (0, eval)(`(() => {
return eval(`(() => {
${code}
return {
/*基金持仓股票代码(新市场号)*/
Expand Down Expand Up @@ -151,7 +151,7 @@ export function Parsepingzhongdata(code: string) {

export function ParseRemoteFunds(code: string) {
try {
return (0, eval)(`(() => {
return eval(`(() => {
${code}
return r;
})()`);
Expand Down