st-comp 0.0.40 → 0.0.42

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "st-comp",
3
3
  "public": true,
4
- "version": "0.0.40",
4
+ "version": "0.0.42",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "dev": "vite",
@@ -538,9 +538,18 @@ const handleSellBuyConfig = (data: any[], originData: KlineDataType) => {
538
538
  * 因为传入参数数据时,已经对数据进行了合并处理,不会出现例如: 两个平空数据于一条K线上,这种情况,所以
539
539
  * 简单判断该条K线上是否有多个数据即可判断出是否是买卖同时存在,如果同时存在图标变成T
540
540
  */
541
- let symbol = "image://" + new URL(`./images/${tradeType === "买" ? "buy" : "sell"}.svg`, import.meta.url).href;
542
- if (data.filter((item: any) => item.time === next.time).length > 1) {
543
- symbol = "image://" + new URL("./images/t.svg", import.meta.url).href;
541
+ const timeTradeList = data.filter((item: any) => item.time === next.time)
542
+ let symbol = "image://" + new URL(`./images/${tradeType === "买" ? "buy" : "sell"}.svg`, import.meta.url).href;
543
+ if (timeTradeList.length > 1) {
544
+ // 存在多条数据, 处理出他们的交易类型, 进行去重
545
+ const timeTradeTypes = [...new Set(timeTradeList.map(i => handleTradeType(i, "sellBuy")))]
546
+ if (timeTradeTypes.length > 1) {
547
+ symbol = "image://" + new URL("./images/t.svg", import.meta.url).href;
548
+ } else {
549
+ symbol = "image://" + new URL(`./images/${tradeType === "买" ? "buy" : "sell"}.svg`, import.meta.url).href;
550
+ }
551
+ } else {
552
+ symbol = "image://" + new URL(`./images/${tradeType === "买" ? "buy" : "sell"}.svg`, import.meta.url).href;
544
553
  }
545
554
  // 3.获取对应Y轴值
546
555
  const originDataItem = originData.find((item: any) => item[0] === next.time) ?? [];
@@ -7,9 +7,9 @@ export const getSingleCycleSingleVariety = async (data: any) => {
7
7
  return axios({
8
8
  method: 'post',
9
9
  headers: {
10
- token: '9593c16255001925afeed6dd2770eea7',
10
+ token: '4b26c72f990a5b02be1a79eb33c1bedf',
11
11
  },
12
- url: 'http://192.168.12.49:88/common/qt/getSingleCycleSingleVariety',
12
+ url: 'http://120.27.237.138/common/qt/getSingleCycleSingleVariety',
13
13
  data,
14
14
  })
15
15
  }
@@ -63,9 +63,9 @@ export const getNetPositionData = async (data: any) => {
63
63
  return axios({
64
64
  method: 'post',
65
65
  headers: {
66
- token: 'b1ef55eb206f7ae49b85b528231c5d87',
66
+ token: '4b26c72f990a5b02be1a79eb33c1bedf',
67
67
  },
68
- url: 'http://192.168.12.49:88/invest/analysis/queryVarietyNetPositionValue',
68
+ url: 'http://120.27.237.138/invest/analysis/queryVarietyNetPositionValue',
69
69
  data
70
70
  })
71
71
  }
@@ -77,9 +77,9 @@ export const queryPairedRecordByVariety = async (data: any) => {
77
77
  return axios({
78
78
  method: 'post',
79
79
  headers: {
80
- token: 'b1ef55eb206f7ae49b85b528231c5d87',
80
+ token: '4b26c72f990a5b02be1a79eb33c1bedf',
81
81
  },
82
- url: 'http://192.168.12.49:88/invest/analysis/queryPairedRecordByVariety',
82
+ url: 'http://120.27.237.138/invest/analysis/queryPairedRecordByVariety',
83
83
  data
84
84
  })
85
85
  }
@@ -22,7 +22,7 @@ const loading = ref(true);
22
22
  const netWorkErrorMsg = ref("");
23
23
 
24
24
  // 筛选条件相关参数
25
- const cycle = ref<any>("6");
25
+ const cycle = ref<any>("5");
26
26
  const cycleName = computed(() => {
27
27
  if (cycleOptions.value.length > 0) {
28
28
  return cycleOptions.value.find((item: any) => item.value === cycle.value).label;
@@ -191,12 +191,12 @@ const getKlineData = async () => {
191
191
  const params = {
192
192
  contractType: 0,
193
193
  cycle: cycle.value,
194
- endTime: "2021-01-23 00:00:00",
194
+ endTime: "2024-03-28 15:00:00",
195
195
  preLimit: 800,
196
196
  queryType: 0,
197
197
  right: 0,
198
- startTime: "2020-12-23 00:00:00",
199
- variety: "FU",
198
+ startTime: "2024-01-28 15:00:00",
199
+ variety: "RU",
200
200
  };
201
201
  const res = await getSingleCycleSingleVariety(params);
202
202
  klineData.value = res.data.body;
@@ -207,10 +207,10 @@ const getKlineData = async () => {
207
207
  const getKlinePointData = async () => {
208
208
  // ------
209
209
  const params = {
210
- analyseId: 2229,
210
+ analyseId: 3172,
211
211
  cycle: cycle.value,
212
212
  ifStock: 0,
213
- varietyName: "燃料油",
213
+ varietyName: "橡胶",
214
214
  };
215
215
  const res = await queryPairedRecordByVariety(params);
216
216
  const body = res.data.body;