st-comp 0.0.64 → 0.0.65

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.64",
4
+ "version": "0.0.65",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "dev": "vite",
@@ -34,7 +34,7 @@ const mainTips = computed(() => {
34
34
  { label: "收", value: round(itemData[1]) },
35
35
  ];
36
36
  // 特殊: 交易总额
37
- itemData[4] !== undefined && result.push({ label: "额", value: formatValue(itemData[4]) });
37
+ itemData[4] !== null && result.push({ label: "额", value: formatValue(itemData[4]) });
38
38
  // 特殊: 涨跌幅 公式:收盘价 - 昨收 / (昨收绝对值)
39
39
  let diffColor;
40
40
  if (itemData[6] > 0) {
@@ -97,8 +97,7 @@ onUnmounted(() => {
97
97
  const initChart = async () => {
98
98
  const { addCount } = config.value
99
99
  const res = await getKlineDataApi({
100
- variety: props.code,
101
- contractType: 0, // 合约类型 0-主连 1-加权
100
+ varietyCode: props.code,
102
101
  right: 1,
103
102
  cycle: 5,
104
103
  mainIndicator: props.mainIndicator,
@@ -162,7 +161,7 @@ const keyDownEvent = e => {
162
161
  const getMoreData = async(params) => {
163
162
  const { addCount, maxLoadCount } = config.value
164
163
  const res = await getKlineDataApi({
165
- variety: props.code,
164
+ varietyCode: props.code,
166
165
  contractType: 0, // 合约类型 0-主连 1-加权
167
166
  right: 1,
168
167
  cycle: 5,
@@ -22,9 +22,9 @@ export const getKlineDataApi = async(params) => {
22
22
  const res = await axios({
23
23
  method: 'post',
24
24
  headers: {
25
- token: '524164e2c6b6ae23bd25c690a7c6bf96',
25
+ token: 'c05386d92e7d18a59c5e74713d3e3a2d',
26
26
  },
27
- url: 'http://127.0.0.1:7001/middleLayer/kline/getKline',
27
+ url: 'http://192.168.12.38:5173/middleLayer/kline/getKline',
28
28
  data: params,
29
29
  })
30
30
  return res.data.body
@@ -75,7 +75,7 @@ watch(
75
75
  startTime: `${dayjs().subtract(defaultShowYears, 'year').format("YYYY-MM-DD")} 00:00:00`,
76
76
  endTime: dayjs().format("YYYY-MM-DD HH:mm:ss"),
77
77
  cycle: '6',
78
- variety: props.code,
78
+ varietyCode: props.code,
79
79
  contractType: 0, // 合约类型 0-主连 1-加权
80
80
  right: 1,
81
81
  })
@@ -115,7 +115,7 @@ onMounted(async () => {
115
115
  startTime: `${dayjs().subtract(defaultShowYears, 'year').format("YYYY-MM-DD")} 00:00:00`,
116
116
  endTime: dayjs().format("YYYY-MM-DD HH:mm:ss"),
117
117
  cycle: '6',
118
- variety: props.code,
118
+ varietyCode: props.code,
119
119
  contractType: 0, // 合约类型 0-主连 1-加权
120
120
  right: 1,
121
121
  })
@@ -240,7 +240,7 @@ const getMainData = async(startTime, endTime, isResetSlide = true) => {
240
240
  startTime: loadStartTime,
241
241
  endTime: loadEndTime,
242
242
  cycle: props.freqId,
243
- variety: props.code,
243
+ varietyCode: props.code,
244
244
  contractType: 0, // 合约类型 0-主连 1-加权
245
245
  right: 1,
246
246
  mainIndicator: props.mainIndicator,
@@ -265,7 +265,7 @@ const getMainData = async(startTime, endTime, isResetSlide = true) => {
265
265
  const getMoreData = async(params) => {
266
266
  const { maxShowDays } = config.value
267
267
  const res = await getKlineDataApi({
268
- variety: props.code,
268
+ varietyCode: props.code,
269
269
  contractType: 0, // 合约类型 0-主连 1-加权
270
270
  right: 1,
271
271
  mainIndicator: props.mainIndicator,
@@ -69,7 +69,7 @@ export const getKlineDataApi = async(params) => {
69
69
  const res = await axios({
70
70
  method: 'post',
71
71
  headers: {
72
- token: '524164e2c6b6ae23bd25c690a7c6bf96',
72
+ token: '52b84e74121cbc1dca6808d2a2ea73d8',
73
73
  },
74
74
  url: 'http://127.0.0.1:7001/middleLayer/kline/getKline',
75
75
  data: params,
@@ -15,7 +15,7 @@
15
15
  <div style="height: calc(100vh - 64px - 40px - 40px - 40px - 16px - 32px)">
16
16
  <component
17
17
  :is="item.component"
18
- :code="'RU'"
18
+ :code="'000002'"
19
19
  :freqId="freqId"
20
20
  :freqDict="freqOption"
21
21
  :mainIndicator="mainIndicator"
@@ -59,11 +59,11 @@ const tabsList = [
59
59
  name: "KlineNew",
60
60
  component: KlineNew,
61
61
  },
62
- {
63
- label: "新版拖动K线",
64
- name: "KlineSlideNew",
65
- component: KlineSlideNew,
66
- },
62
+ // {
63
+ // label: "新版拖动K线",
64
+ // name: "KlineSlideNew",
65
+ // component: KlineSlideNew,
66
+ // },
67
67
  // {
68
68
  // label: "基础K线组件(条数限制)",
69
69
  // name: "KlineBasic",
@@ -80,7 +80,7 @@ const tabsList = [
80
80
  // component: KlineAction,
81
81
  // },
82
82
  ];
83
- const activeName = ref("KlineSlideNew");
83
+ const activeName = ref("KlineNew");
84
84
  </script>
85
85
 
86
86
  <style lang="scss">