Skip to content

Commit caef0d4

Browse files
author
DESKTOP-RMJGVFA\wengtm
committed
fix: 格式化
1 parent f06bc32 commit caef0d4

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

src/explorer/stockService.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,9 @@ export default class StockService extends LeekService {
8484
});
8585
// 自选
8686
const customIds = stockList.map((item) => item.id);
87-
const upList = await this.getLimitData('ztgc')
87+
const upList = await this.getLimitData('ztgc');
8888
this.uplimitStockList = upList.filter(item => !customIds.includes(item.id));
89-
const downList = await this.getLimitData('dtgc')
89+
const downList = await this.getLimitData('dtgc');
9090
this.downlimitStockList = downList.filter(item => !customIds.includes(item.id));
9191

9292
const res = sortData(stockList, order);
@@ -116,7 +116,7 @@ export default class StockService extends LeekService {
116116
// 对其他请求不做修改,直接继续
117117
request.continue();
118118
}
119-
})
119+
});
120120
// 监听网络请求
121121
page.on('response', async (response) => {
122122
// 检查请求 URL 或请求的类型(可根据需要进行过滤)
@@ -152,15 +152,15 @@ export default class StockService extends LeekService {
152152
time: formatLimitTime(`${limitType === 'ztgc' ? item.fbt : item.lbt}`),
153153
fbt: formatLimitTime(`${item.fbt}`),
154154
lbt: formatLimitTime(`${item.lbt}`),
155-
}
155+
};
156156
if (limitType === 'ztgc') {
157157
stockItem.zttj = `${item.zttj.ct}/${item.zttj.days}`;
158158
stockItem.fbzz = formatNumber(item.fund, 2, true);
159159
}
160160

161161
const treeItem = new LeekTreeItem(stockItem, this.context);
162162
stocks.push(treeItem);
163-
})
163+
});
164164
}
165165
await browser.close();
166166
return stocks;

src/registerCommand.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,19 +139,19 @@ export function registerViewEvent(
139139
}, 1000);
140140
});
141141
commands.registerCommand('leek-fund.deleteStock', (target) => {
142-
if (!target) return
142+
if (!target) return;
143143
LeekFundConfig.removeStockCfg(target.id, () => {
144144
stockProvider.refresh();
145145
});
146146
});
147147
commands.registerCommand('leek-fund.addMyStock', (target) => {
148-
if (!target) return
148+
if (!target) return;
149149
LeekFundConfig.updateStockCfg(target.id, () => {
150150
stockProvider.refresh();
151151
});
152152
});
153153
commands.registerCommand('leek-fund.addStockToBar', (target) => {
154-
if (!target) return
154+
if (!target) return;
155155
LeekFundConfig.addStockToBarCfg(target.id, () => {
156156
stockProvider.refresh();
157157
});

src/shared/leekTreeItem.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ export class LeekTreeItem extends TreeItem {
207207
this.label = text;
208208
}
209209
if (hybk) {
210-
this.label = `${text} ${lbc} ${zttj} [${hybk}]`
210+
this.label = `${text} ${lbc} ${zttj} [${hybk}]`;
211211
}
212212
this.id = info.id || code;
213213
if (isStockItem || isFundItem || isBinanceItem) {
@@ -240,7 +240,7 @@ export class LeekTreeItem extends TreeItem {
240240

241241
const isFuture = /nf_/.test(code) || /hf_/.test(code);
242242

243-
const isZt = !!hybk
243+
const isZt = !!hybk;
244244

245245
// type字段:国内期货前缀 `nf_` 。股票的 type 是交易所 (sz,sh,bj)
246246
const typeText = type;

src/shared/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -552,5 +552,5 @@ export function formatLimitTime(time: string = '') {
552552
}
553553
acc += curr;
554554
return acc;
555-
}, '')
555+
}, '');
556556
}

0 commit comments

Comments
 (0)