a3ae2f2efa0f1f90908fb29fe6362429ac34509d..33f72994ec445ea6c82813cca6b6780a765c14bc
2025-04-30 lxf
平仓和卖出逻辑添加
33f729 diff | tree
2025-04-30 lxf
挂单list页面挂单价格显示修改优先级
f726ea diff | tree
2025-04-30 lxf
usdt修改usdt
572485 diff | tree
2025-04-30 lxf
大宗无数据一直加载的bug
8852f8 diff | tree
2025-04-30 lxf
大宗首次不加载的bug
184578 diff | tree
2025-04-30 lxf
翻译
7f67ff diff | tree
2025-04-30 lxf
挂单接口
39d548 diff | tree
12 files modified
186 ■■■■ changed files
src/axios/api.js 5 ●●●●● patch | view | raw | blame | history
src/locales/en.json 3 ●●●● patch | view | raw | blame | history
src/locales/fra.json 3 ●●●● patch | view | raw | blame | history
src/locales/hi.json 3 ●●●● patch | view | raw | blame | history
src/locales/kor.json 3 ●●●● patch | view | raw | blame | history
src/locales/st.json 3 ●●●● patch | view | raw | blame | history
src/locales/th.json 3 ●●●● patch | view | raw | blame | history
src/page/kline/index.vue 1 ●●●● patch | view | raw | blame | history
src/page/list/tradingList/data.list.vue 2 ●●●●● patch | view | raw | blame | history
src/page/trading/buy.vue 110 ●●●● patch | view | raw | blame | history
src/page/user/Warehouse.vue 4 ●●●● patch | view | raw | blame | history
src/page/user/Warehouse/data.list.vue 46 ●●●● patch | view | raw | blame | history
src/axios/api.js
@@ -280,6 +280,11 @@
export function allsell(options) {
  return post("/user/allsell.do", options);
}
// 我的挂单
export function getPosition(options) {
  return post("/user/getPosition.do", options);
}
// 划转
export function transfer(options) {
  return post("/user/transfer.do", options);
src/locales/en.json
@@ -616,5 +616,6 @@
  "排序": "Sort",
  "升序": "Ascending",
  "降序": "Descending",
  "正常": "Normal"
  "正常": "Normal",
  "当价格满足条件时卖出": "Sell when price meets condition"
}
src/locales/fra.json
@@ -596,5 +596,6 @@
  "排序": "Trier",
  "升序": "Ascendant",
  "降序": "Descendant",
  "正常": "Normal"
  "正常": "Normal",
  "当价格满足条件时卖出": "Vendre lorsque le prix répond à la condition"
}
src/locales/hi.json
@@ -615,5 +615,6 @@
  "排序": "क्रमबद्ध करें",
  "升序": "आरोही",
  "降序": "अवरोही",
  "正常": "सामान्य"
  "正常": "सामान्य",
  "当价格满足条件时卖出": "जब कीमत शर्त को पूरा करती है तो बेचें"
}
src/locales/kor.json
@@ -597,5 +597,6 @@
  "排序": "정렬",
  "升序": "오름차순",
  "降序": "내림차순",
  "正常": "일반"
  "正常": "일반",
  "当价格满足条件时卖出": "가격이 조건을 충족할 때 판매"
}
src/locales/st.json
@@ -605,5 +605,6 @@
  "排序": "الترتيب",
  "升序": "تصاعدي",
  "降序": "تنازلي",
  "正常": "عادي"
  "正常": "عادي",
  "当价格满足条件时卖出": "بيع عندما يستوفي السعر الشرط"
}
src/locales/th.json
@@ -597,5 +597,6 @@
  "排序": "เรียงลำดับ",
  "升序": "จากน้อยไปมาก",
  "降序": "จากมากไปน้อย",
  "正常": "ปกติ"
  "正常": "ปกติ",
  "当价格满足条件时卖出": "ขายเมื่อราคาตรงตามเงื่อนไข"
}
src/page/kline/index.vue
@@ -487,6 +487,7 @@
    if (query.if_us === "1") {
      this.getSingDetailUs();
    } else {
      this.getSingDetails();
      this.timer = setInterval(() => {
        this.getSingDetails();
      }, 5000);
src/page/list/tradingList/data.list.vue
@@ -327,6 +327,8 @@
          //大宗
          opt.stockType = "";
          data = await api.stockgetDzList(opt);
          this.loadings = false;
          this.finished = true;
        }
      } else {
        // 自选
src/page/trading/buy.vue
@@ -64,7 +64,7 @@
        </div>
        <div class="tabs_content">
          <div class="num" v-show="priceTabsCurrentIndex == 1">
            <span>{{ $t("hj99") }}</span>
            <span>{{ isSell ? $t("当价格满足条件时卖出") : $t("hj99") }}</span>
          </div>
          <div class="tr_es flexJy" v-show="priceTabsCurrentIndex == 1">
            <div class="top_input">
@@ -202,7 +202,12 @@
          </div>
        </div>
      </div> -->
      <div class="btn_buy" @click="gdOrSetBuy()">
      <div
        class="btn_buy"
        @click="gdOrSetBuy()"
        :disabled="isSell && !positiontionData.orderNum"
        :class="{ 'disabled-btn': isSell && !positiontionData.orderNum }"
      >
        <!-- <div :class="tabsCurrentIndex == 0 ? 'maichu' : ''">#3b82f6 -->
        <div class="maichu" style="background-color:#3b82f6">
          <span v-if="isSell">{{ $t("hj78") }}</span>
@@ -225,6 +230,7 @@
<script>
import * as api from "@/axios/api";
import { number } from "echarts/lib/export";
import { mapActions } from "vuex";
export default {
@@ -232,12 +238,10 @@
  created() {
    if (this.$route.query.t) {
      this.tabsCurrentIndex = Number(this.$route.query.t);
      if (this.tabsCurrentIndex === 0) {
        this.isSell = true;
      }
      console.log(this.tabsCurrentIndex);
      console.log("tabsCurrentIndex: ", this.tabsCurrentIndex);
    }
    ss;
    if (this.$route.query.m) {
      this.nowPrice = Number(this.$route.query.m);
      this.profitTarget = Number(this.$route.query.m);
@@ -323,14 +327,37 @@
      ],
      moneyData: {},
      gid: "",
      KLine: {}
      KLine: {},
      positiontionData: {
        orderNum: 0
      }
    };
  },
  mounted() {
  async mounted() {
    this.bayType = this.$route.query.bayType;
    this.gid = this.$route.query.gid;
    this.KLine = JSON.parse(window.localStorage.getItem("kLine"));
    if (this.tabsCurrentIndex === 0) {
      this.isSell = true;
      // stockType 1黄金原油  2  股票
      const data = await api.getPosition({
        stock: this.$route.query.code || this.$route.query.name,
        stockType: this.KLine.type === "HJ" ? 1 : 2
      });
      if (data.data) {
        this.positiontionData = data.data;
      } else {
        if (data.status !== 0) {
          this.$store.commit("elAlertShow", {
            elAlertShow: true,
            elAlertText: data.msg,
             elAlertType: "warning"
          });
        }
      }
    }
    if (this.bayType == "in") {
      this.priceTabs = [this.$t("hj108"), this.$t("hj109")];
    } else if (this.bayType == "qh") {
@@ -504,6 +531,9 @@
      this.selectLever = val.label;
    },
    gdOrSetBuy() {
      // 无持仓的时候不能下单
      if (this.isSell && !this.positiontionData.orderNum) return;
      if (this.priceTabsCurrentIndex == 0) {
        this.setBuy();
      } else {
@@ -543,10 +573,28 @@
      let data;
      if (this.KLine.type === "HJ") {
        opts.name = this.KLine.name;
        data = await api.hjyyAddOrder(opts);
      } else {
        data = await api.guadan(opts);
        opts.lever = 100;
      }
      if (this.isSell) {
        let sellDate = {
          positionSn: this.positiontionData.positionSn,
          number: this.num,
          name: opts.name
        };
        if (this.priceTabsCurrentIndex == 1) {
          sellDate.targetPrice = this.nums;
          sellDate.lever = opts.lever;
        }
        // 挂单 卖出
        data = await api.sell(sellDate);
      } else {
        if (this.KLine.type === "HJ") {
          data = await api.hjyyAddOrder(opts);
        } else {
          data = await api.guadan(opts);
        }
      }
      this.buying = false;
      if (data.status === 0) {
        this.$store.commit("elAlertShow", {
@@ -591,9 +639,9 @@
        // buyNum: (this.num.match(/\d+/g))[0] * 100, // 单位为手
        lever: this.selectLever
      };
      if (this.KLine.type === "HJ") {
        opts.lever = this.selectLever * 100;
      }
      // if (this.KLine.type === "HJ") {
      //   opts.lever = this.num * 100;
      // }
      console.log(this.selectLever, "this.selectLever ");
      if (this.tabsCurrentIndex == 0) {
        opts.buyType = 1;
@@ -624,14 +672,32 @@
      opts.stockId = this.id;
      let data;
      console.log("bayType: ", this.KLine);
      console.log("bayType: ", this.KLine, this.isSell);
      if (this.KLine.type == "HJ") {
        opts.name = this.KLine.name;
        opts.lever = this.num * 100;
      }
        data = await api.goldCrudeOilbuy(opts);
      if (this.isSell) {
        let sellDate = {
          positionSn: this.positiontionData.positionSn,
          number: this.num,
          name: opts.name
        };
        if (this.priceTabsCurrentIndex == 1) {
          sellDate.targetPrice = this.nums;
          sellDate.lever = opts.lever;
        }
        // 卖出
        data = await api.sell(sellDate);
      } else {
        data = await api.buy(opts);
        if (this.KLine.type == "HJ") {
          opts.name = this.KLine.name;
          opts.lever = 100;
          data = await api.goldCrudeOilbuy(opts);
        } else {
          data = await api.buy(opts);
        }
      }
      this.buying = false;
@@ -1166,4 +1232,10 @@
/deep/.van-popup {
  z-index: 10001 !important;
}
.disabled-btn {
  opacity: 0.5;
  pointer-events: none;
  cursor: not-allowed;
}
</style>
src/page/user/Warehouse.vue
@@ -58,8 +58,8 @@
          assname: this.$t("黄金原油"),
          name: "1",
          bgc: "rgb(12, 175, 226)",
          laber: "USDT",
          symbolCode: "USDT",
          laber: "USD",
          symbolCode: "USD",
          symbol: "RM"
        }
        // {
src/page/user/Warehouse/data.list.vue
@@ -137,7 +137,7 @@
              </div>
            </div>
          </van-col> -->
          <!-- <van-col span="8">
        <!-- <van-col span="8">
            <div style="text-align: center">
              <div class="sport-content-title2">
                {{ $t("止損價") }} ({{ activeObj.symbolCode }})
@@ -369,8 +369,8 @@
          {{ item.stockSpell }}
        </div>
        <!-- <van-row> -->
          <!-- <van-col span="8"> -->
            <!-- <div style="text-align: left">
        <!-- <van-col span="8"> -->
        <!-- <div style="text-align: left">
              <div class="sport-content-title2">
                {{ $t("盈虧") }} ({{ activeObj.symbolCode }})
              </div>
@@ -384,14 +384,14 @@
              >
                {{ item.profitAndLose }}
              </div> -->
            <!-- </div> -->
          <!-- </van-col> -->
          <!-- <van-col span="8"> -->
            <!-- <div style="text-align: center"> -->
            <!-- <div class="sport-content-title2">
        <!-- </div> -->
        <!-- </van-col> -->
        <!-- <van-col span="8"> -->
        <!-- <div style="text-align: center"> -->
        <!-- <div class="sport-content-title2">
                {{ $t("hj141") }} ({{ activeObj.symbolCode }})
              </div> -->
            <!-- <div
        <!-- <div
                class="sport-content-text2"
                :style="
                  item.profitAndLoseParent.charAt(0) == '-'
@@ -401,9 +401,9 @@
              >
                {{ item.profitAndLoseParent }}
              </div> -->
            <!-- </div> -->
          <!-- </van-col> -->
          <!-- <van-col span="8">
        <!-- </div> -->
        <!-- </van-col> -->
        <!-- <van-col span="8">
            <div style="text-align: right">
              <div class="sport-content-title2">{{ $t("倉位(股)") }}</div>
              <div class="sport-content-text2">{{ item.orderNum }}</div>
@@ -412,12 +412,12 @@
        <!-- </van-row> -->
        <van-row>
          <van-col span="8">
             <van-col span="8">
            <div style="text-align: right">
              <div class="sport-content-title2">{{ $t("倉位(股)") }}</div>
              <div class="sport-content-text2">{{ item.orderNum }}</div>
            </div></van-col
          >
            <van-col span="8">
              <div style="text-align: right">
                <div class="sport-content-title2">{{ $t("倉位(股)") }}</div>
                <div class="sport-content-text2">{{ item.orderNum }}</div>
              </div></van-col
            >
            <!-- <div style="text-align: left"> -->
            <!-- <div class="sport-content-title2">
                {{ $t("hj40") }}({{ activeObj.symbolCode }})
@@ -433,7 +433,7 @@
                {{ $t("持倉價") }} ({{ activeObj.symbolCode }})
              </div>
              <div class="sport-content-text2">
                {{ item.buyOrderPrice }}
                {{ item.sellOrderPrice || item.buyOrderPrice }}
              </div>
            </div>
          </van-col>
@@ -449,7 +449,7 @@
          </van-col>
        </van-row>
        <!-- <van-row> -->
          <!-- <van-col span="12">
        <!-- <van-col span="12">
            <div style="text-align: left">
              <div class="sport-content-title2">
                {{ $t("hj44") }} ({{ activeObj.symbolCode }})
@@ -469,7 +469,7 @@
              </div>
            </div>
          </van-col> -->
          <!-- <van-col span="8">
        <!-- <van-col span="8">
            <div style="text-align: center">
              <div class="sport-content-title2">
                {{ $t("止損價") }} ({{ activeObj.symbolCode }})
@@ -683,7 +683,7 @@
        pageNum: 1,
        pageSize: 30
      };
      if (_laber === "USDT") {
      if (_laber === "USD") {
        opt.stockCode = "HJYY";
      }
@@ -713,7 +713,7 @@
        pageNum: 1,
        pageSize: 30
      };
      if (_laber === "USDT") {
      if (_laber === "USD") {
        opt.stockCode = "HJYY";
      }
      const res = await getchicang(opt);