zzzz
2024-04-24 5f2eaf767be4cd2400458f5fb4edfadcc131c3ab
first
8 files modified
15184 ■■■■ changed files
package.json 1 ●●●● patch | view | raw | blame | history
src/axios/api.url.js 4 ●●●● patch | view | raw | blame | history
src/page/kline/components/kLine.vue 85 ●●●●● patch | view | raw | blame | history
src/page/list/favorites/data.list.vue 12 ●●●●● patch | view | raw | blame | history
src/page/list/favoriteslist/data.list.vue 12 ●●●●● patch | view | raw | blame | history
src/page/list/tradingList/dazy.vue 2 ●●● patch | view | raw | blame | history
src/utils/utils.js 4 ●●● patch | view | raw | blame | history
yarn.lock 15064 ●●●● patch | view | raw | blame | history
package.json
@@ -26,6 +26,7 @@
    "lib-flexible": "^0.3.2",
    "mint-ui": "^2.2.13",
    "moment": "^2.29.4",
    "moment-timezone": "^0.5.45",
    "pdfjs-dist": "2.2.228",
    "qrcode": "^1.4.4",
    "qrcodejs2": "0.0.2",
src/axios/api.url.js
@@ -7,9 +7,9 @@
  // baseURL: '/',
  // baseURL: 'http://www.jumptalk.net:8091',
  // 0311
  baseURL: "https://api.essencefunds.com/",
  // baseURL: "https://api.essencefunds.com/",
  // 本地
  // baseURL: "http://192.168.0.105:8091/",
  baseURL: "http://192.168.0.105:8091/",
  util: {
    image: "/util/image.html" // 图片上传
  }
src/page/kline/components/kLine.vue
@@ -51,7 +51,7 @@
          <div
            class="hqchart"
            id="hqchart_minute"
            ref="mychart"
            ref="kline"
            v-show="chartType == 'minute'"
          ></div>
          <div
@@ -963,7 +963,7 @@
DefaultData.GetKLinePeriodMenu = function () {
  var data = [
    // { Name: i18n.t('hj86'), ID: 3 },分时额外处理
    { Name: i18n.t("hj86"), ID: 4 },
    // { Name: i18n.t("hj86"), ID: 4 },
    { Name: i18n.t("hj87"), ID: 0 },
    { Name: i18n.t("hj88"), ID: 1 },
    { Name: i18n.t("hj89"), ID: 2 },
@@ -997,7 +997,7 @@
      MinuteDayMenu: DefaultData.GetMinuteDayMenu(),
      MinuteDayIndex: 0,
      KLinePeriodMenu: DefaultData.GetKLinePeriodMenu(),
      KLinePeriodIndex: 1,
      KLinePeriodIndex: 0,
      KLineRightMenu: DefaultData.GetKLineRightMenu(),
      KLineRightIndex: 0,
      IsShowRightMenu: true,
@@ -1036,12 +1036,11 @@
  },
  mounted() {
    this.initEcharts();
    this.offHeight = this.$refs["rightContent"].offsetHeight;
    this.OnSize();
    this.SetChartStyle();
    this.$nextTick(() => {
      this.CreateMinuteChart();
      // this.CreateMinuteChart();
      this.CreateKLineChart();
    });
    let that = this;
@@ -1078,70 +1077,6 @@
  },
  methods: {
    // 横坐标数据处理
    initxData() {
      for (let i = 0; i < this.klineData.length; i++) {
        this.xData[i] = this.klineData[i].datetime;
      }
    },
    // 数据计算以及拆分,将json数据转为数组数据
    splitData(jsonData) {
      const hourData = [];
      for (let i = 0; i < jsonData.length; i++) {
        hourData.push([
          i,
          jsonData[i].price,
          jsonData[i].increase,
          jsonData[i].volume,
          jsonData[i].ratio,
          jsonData[i].amount,
          jsonData[i].datetime,
        ]);
      }
      this.hourData = hourData;
    },
    initEcharts() {
      const option = {
        // 横坐标数据配置
        xAxis: [
          {
            type: "category",
            data: this.xData,
            boundaryGap: false,
            axisLine: { onZero: false },
            splitLine: { show: false },
            min: "dataMin",
            max: "dataMax",
          },
        ],
        // 纵坐标配置
        yAxis: [
          {
            scale: true,
            splitArea: {
              show: true,
            },
          },
        ],
        //图形数据配置:
        series: [
          {
            type: "line",
            data: this.hourData,
            symbol: "none", //无标记图案
            lineStyle: {
              width: 1,
            },
          },
        ],
      };
      const myChart = echarts.init(this.$refs.mychart); // 图标初始化
      myChart.setOption(option); // 渲染页面
      //随着屏幕大小调节图表
      window.addEventListener("resize", () => {
        myChart.resize();
      });
    },
    OnSize() {
      var width = this.$refs.right.clientWidth;
      // var rightTab = this.$refs.rightTab
@@ -1243,14 +1178,10 @@
      item,
      type // K线周期
    ) {
      if (index !== 0) {
        //分时额外处理才注释的
        this.chartType = type;
        this.KLinePeriodIndex = index;
        this.KLineChart.ChangePeriod(item.ID);
      } else {
        this.chartType = "minute";
      }
      //分时额外处理才注释的
      this.chartType = type;
      this.KLinePeriodIndex = index;
      this.KLineChart.ChangePeriod(item.ID);
    },
    OnClickKLineRightMenu(
src/page/list/favorites/data.list.vue
@@ -223,13 +223,15 @@
      this.fromData.value = e.target.value;
    },
    async newAddxg() {
      console.log(this.shengouObj, "=====");
      const res = await api.getNewAdd({
        newCode: this.shengouObj.code,
        applyNums: this.fromData.value,
        type: this.fromData.type,
      });
      if (res.status === 0) {
        Notify({ type: "success", message: res.msg });
        this.loadings = false;
        this.show = false;
        this.fromData.value = "";
      } else {
        Notify({ type: "warning", message: res.msg });
@@ -257,12 +259,8 @@
        stockType = array[0].name;
      }
      let opt = {
        // pageNum: this.pageNumVal,
        // pageSize: 15,
        // stockPlate: "",
        keyWords: this.sousuo,
        // stockType: stockType,
        // orderBy: "",
        zt: 0,
        pageSize: 1000,
      };
      let data = await api.getStocklist(opt);
      this.loading = false;
src/page/list/favoriteslist/data.list.vue
@@ -72,8 +72,9 @@
                </div>
              </div>
              <div
                class="right_btn pink"
                style="padding: 0px 0.2rem"
                class="right_btn"
                :class="item.status !== 3 ? 'pink' : ''"
                :style="item.status !== 3 ? 'padding: 0px 0.2rem' : ''"
                @click="renjiao(item)"
              >
                <span v-if="item.status !== 3">
@@ -91,9 +92,10 @@
                      : ""
                  }}
                </span>
                <span v-else>
                  {{ $t("hj250") }}
                </span>
                <van-button v-else type="primary">
                  {{ $t("hj250") }}</van-button
                >
              </div>
              <!---->
src/page/list/tradingList/dazy.vue
@@ -16,7 +16,7 @@
            v-model="num"
            @input="num = num.replace(/^(0+)|[^\d]+/g, '')"
          />
          <a>{{ $t("hj117") }}</a>
          <a>{{ $t("hj274") }}</a>
        </div>
        <p class="plm">
          <span>{{ $t("hj263") }}</span>
src/utils/utils.js
@@ -1,5 +1,7 @@
import moment from "moment";
const moment = require("moment-timezone");
// 设置时区为印度标准时间
moment.tz.setDefault("Asia/Kolkata");
// 单位用千位分隔符显示
export function thousandBitSeparator(str) {
  var num = parseFloat(str).toFixed(3); // 这里因为我需要两位小数所以做一个限制,你们看情况做小数位的限制
yarn.lock
Diff too large