111
jhzh
2025-02-11 9f96348fb4f2d0442303aafefb5e9ca39ea85663
src/page/trading/buy.vue
@@ -19,7 +19,7 @@
          <div class="cot">
            <div class="lefts">
              <div class="top_new">
                <span>{{ nowPrice | _toLocaleString }}</span>
                <span>₹{{ nowPrice | _toLocaleString }}</span>
              </div>
              <div class="bottom_es">
                <span>{{ $t("hj98") }}</span>
@@ -28,11 +28,11 @@
            <div class="rights">
              <div class="ese">
                <div class="mc" @click="handleTradingClick(0)" :class="tabsCurrentIndex === 0 ? 'actives' : ''">
                  <span>{{ $t("hj84") }}</span>
                  <span>Short</span>
                </div>
                <div class="mr" @click="handleTradingClick(1)" :class="tabsCurrentIndex === 1 ? 'active' : ''">
                  <span>{{ $t("hj85") }}</span>
                  <span>Long</span>
                </div>
              </div>
            </div>
@@ -86,31 +86,49 @@
              </div>
            </div>
          </div>
          <!-- <div class="tr_rs gg" @click="showGg = true">
          <div class="tr_rs gg" @click="showGg = true">
            <div class="top_bzz">
              <span>{{ $t("hj101") }}</span>
              <span>{{ selectCycle }}</span>
            </div>
          </div> -->
          </div>
          <div class="tr_rs">
            <div class="top_bzz" style="padding-bottom: 0.2rem">
              <span style="text-align: left">
                {{ $t("交易总额") }}({{ moneyData.symbol || "$" }})
                {{ $t("交易总额") }}(₹)
              </span>
              <span style="text-align: right">
                {{ $t("hj103") }}({{ moneyData.symbol || "$" }})
                {{ $t("hj103") }}(₹)
              </span>
            </div>
            <div class="bottom_bzz">
              <span>
                {{
                ₹{{
                  ((nowPrice * selectCycle.replace("X", "")) * num)
                    | _toLocaleString
                }}
              </span>
              <span style="white-space: nowarp">
                {{ moneyData.availableBalance | _toLocaleString }}
                ₹{{ moneyData.availableBalance | _toLocaleString }}
              </span>
            </div>
          </div>
          <div class="tr_rs">
            <div class="top_bzz" style="padding-bottom: 0.2rem">
              <span style="text-align: left">
                {{ $t("hj44") }}(₹)
              </span>
              <span style="text-align: right">
              </span>
            </div>
            <div class="bottom_bzz">
              <span>
                ₹{{(
                  ((nowPrice * selectCycle.replace("X", "")) * num)*sxf).toFixed(2)}}
              </span>
              <span style="white-space: nowarp">
              </span>
            </div>
          </div>
@@ -166,8 +184,9 @@
        </div>
      </div> -->
      <div class="btn_buy" @click="gdOrSetBuy()">
        <div :class="tabsCurrentIndex == 0 ? 'maichu' : ''">
          <span>{{ tabsCurrentIndex == 0 ? $t("hj84") : $t("hj85") }}</span>
        <!-- <div :class="tabsCurrentIndex == 0 ? 'maichu' : ''">#3b82f6 -->
        <div class="maichu" style="background-color:#3b82f6">
          <span>{{ tabsCurrentIndex == 0 ? $t("hj84") : $t("gm") }}</span>
        </div>
      </div>
    </div>
@@ -241,6 +260,7 @@
        profitTarget: 0,
        if_us: 0,
        bayType: "",
        sxf:'',
        id: "",
        actions: [{
            name: "100X",
@@ -284,6 +304,7 @@
      this.setUseInfo();
      this.getMoneyData();
      this.getSettingInfo();
      this.queryStockConfig()
    },
    watch: {
      checkedZy(val) {
@@ -300,6 +321,12 @@
      },
    },
    methods: {
      async queryStockConfig(){
        let data = await api.queryStockConfig();
        if (data.status === 0) {
          this.sxf=data.data.cValue
        }
      },
      zSjian(){
        var newzishu = (Number(this.zhisun)-1).toFixed(2)
        if(Number(newzishu)<1){
@@ -521,7 +548,7 @@
          // stockId: this.detail.id,
          // buyNum: this.selectNumber ? this.selectNumber * 100 : 0, // 单位为手
          // buyType: this.selectType,
          // lever: this.selectCycle ? this.selectCycle : 0,
          lever: this.selectCycle ? this.selectCycle : 0,
          // subaccountNumber:this.subaccountNumber
          // 买入是买涨buyType:0, 卖出是买跌buyType:1,卖出的状态是0,买入的状态是1
@@ -978,7 +1005,7 @@
      display: flex;
      justify-content: center;
      align-items: center;
      background: rgb(68, 155, 84);
      // background: rgb(68, 155, 84);
      color: #fff;
      font-size: 0.3846rem;
      border-radius: 0.15rem;
@@ -1036,7 +1063,7 @@
  }
  .maichu {
    background-color: rgb(225, 59, 69) !important;
    // background-color: rgb(225, 59, 69) !important;
  }
  .mr {