st-comp 0.0.39 → 0.0.40

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.39",
4
+ "version": "0.0.40",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "dev": "vite",
@@ -310,6 +310,7 @@ const draw = async (type?: string) => {
310
310
  [
311
311
  "future",
312
312
  async () => {
313
+ const chartOption = echartsInstance.getOption();
313
314
  const newOption = await getOption(
314
315
  props.klineData as KlineDataType,
315
316
  props.markData,
@@ -318,7 +319,7 @@ const draw = async (type?: string) => {
318
319
  props.netPositionData
319
320
  );
320
321
  newOption.dataZoom[0].start =
321
- ((props.klineData.length - config.value.defaultShowBarCount) / props.klineData.length) * 100;
322
+ ((props.klineData.length - chartOption.dataZoom[0].endValue + chartOption.dataZoom[0].startValue) / props.klineData.length) * 100;
322
323
  echartsInstance.setOption(newOption, true);
323
324
  },
324
325
  ],
@@ -63,7 +63,7 @@ export const getNetPositionData = async (data: any) => {
63
63
  return axios({
64
64
  method: 'post',
65
65
  headers: {
66
- token: 'e077632625ea4b11506db312e186dd06',
66
+ token: 'b1ef55eb206f7ae49b85b528231c5d87',
67
67
  },
68
68
  url: 'http://192.168.12.49:88/invest/analysis/queryVarietyNetPositionValue',
69
69
  data
@@ -116,16 +116,17 @@ const config = ref({
116
116
  const { totalBarCount, preBarCount } = config.value;
117
117
  // 1.如果当前K线数据量就小于API希望得到的数量,说明已经没有数据了,将API得到的数据作全部展示
118
118
  // 并且打上标记,此K线数据已无更多
119
- if (klineData.value.length < totalBarCount + preBarCount) {
120
- config.value.totalBarCount = klineData.value.length;
121
- console.log("K线数据已无更多-1");
122
- futureIsAllLoad.value = true;
123
- return;
124
- }
119
+ // if (klineData.value.length < totalBarCount + preBarCount) {
120
+ // config.value.totalBarCount = klineData.value.length;
121
+ // console.log("K线数据已无更多-1");
122
+ // futureIsAllLoad.value = true;
123
+ // return;
124
+ // }
125
125
  // 2.已当前存储的K线数据最后一条时间作为开始时间,往后再次请求
126
126
  const params = {
127
- right: 1, // 复权方式
128
- variety: "au8888", // 品种
127
+ contractType: 0,
128
+ right: 0, // 复权方式
129
+ variety: "FU", // 品种
129
130
  cycle: cycle.value, // 周期
130
131
  startTime: klineData.value[klineData.value.length - 1][0], // 开始
131
132
  limit: 20, // 总条数
@@ -190,7 +191,7 @@ const getKlineData = async () => {
190
191
  const params = {
191
192
  contractType: 0,
192
193
  cycle: cycle.value,
193
- endTime: "2022-12-23 00:00:00",
194
+ endTime: "2021-01-23 00:00:00",
194
195
  preLimit: 800,
195
196
  queryType: 0,
196
197
  right: 0,