bug
lxf
2025-05-22 af95928a0bc0e865fab30b932ce921003d1d4f09
bug
2 files modified
38 ■■■■ changed files
src/API/trade.api.js 36 ●●●● patch | view | raw | blame | history
src/components/assetsCenter/contract.vue 2 ●●● patch | view | raw | blame | history
src/API/trade.api.js
@@ -1,21 +1,21 @@
// 合约接口
import request from "@/request";
import { httpJson,httpMultipart } from "@/request/http";
import { httpJson, httpMultipart } from "@/request/http";
// 止盈止损
export const _getzyzs = (params) => {
  return request({
    url: "/api/contractApplyOrder!stopProfitAndLoss.action",
    method: "GET",
    params: {
      order_no: params.order_no,
      stop_price_profit: params.stop_price_profit,
      stop_price_loss: params.stop_price_loss,
    },
    // isLoading: true
  });
    return request({
        url: "/api/contractApplyOrder!stopProfitAndLoss.action",
        method: "GET",
        params: {
            order_no: params.order_no,
            stop_price_profit: params.stop_price_profit,
            stop_price_loss: params.stop_price_loss,
        },
        // isLoading: true
    });
};
 // 获取可用余额
// 获取可用余额
export const _getBalance = () => {
    return request({
        url: "/api/wallet!getUsdt.action",
@@ -40,7 +40,7 @@
/** =============================  永续合约委托 =======================*/
// 开仓初始化参数
export const _initOpen =  (symbol) => {
export const _initOpen = (symbol) => {
    return request({
        url: '/api/contractApplyOrder!openview.action',
        method: 'GET',
@@ -60,7 +60,7 @@
}
// 平仓初始化参数
export const _initClose =  (symbol) => {
export const _initClose = (symbol) => {
    return request({
        url: '/api/contractApplyOrder!closeview.action',
        method: 'GET',
@@ -79,8 +79,8 @@
        params: {
            symbol: params.symbol,
            session_token: params.session_token,
            stop_price_profit:stop_price_profit,
            stop_price_loss:stop_price_profit,
            stop_price_profit: stop_price_profit,
            stop_price_loss: stop_price_profit,
            direction: params.direction || 'buy', // buy, sell
            amount: params.amount,  // 数量
            price_type: params.price_type || 'opponent', // limit - 限价,opponent - 市价
@@ -93,7 +93,7 @@
/** 当前委托 */
// 当前委托列表
export const _orderListCur =  (symbol, type = 'orders', page_no = 1) => {
export const _orderListCur = (symbol, type = 'orders', page_no = 1) => {
    return request({
        url: '/api/contractApplyOrder!list.action',
        method: 'GET',
@@ -246,7 +246,7 @@
        url: 'api/hobi!getKline.action',
        method: 'GET',
        params: {
            symbol,
            symbol: symbol || 'btc',
            line
        }
    })
src/components/assetsCenter/contract.vue
@@ -226,7 +226,7 @@
        _orderListHold().then((data) => {
          this.orderHold = data;
        });
      }, 2000);
      }, 1000);
    },
    fetchFutrueHoldList() {
      // 获取交割当前持仓