jhzh
2024-08-12 3252eb2d24b8c2ff7490d842227466bb8b6e0014
问题处理
9 files modified
170 ■■■■■ changed files
src/components/kline-charts/config.js 4 ●●●● patch | view | raw | blame | history
src/components/kline-charts/index.vue 12 ●●●●● patch | view | raw | blame | history
src/components/perpetual-open/index.vue 65 ●●●●● patch | view | raw | blame | history
src/components/trade-head/index.vue 7 ●●●● patch | view | raw | blame | history
src/components/trade-order-area/index.vue 8 ●●●● patch | view | raw | blame | history
src/page/TtrendDetails/index.vue 2 ●●● patch | view | raw | blame | history
src/page/assetsCenter/index.vue 53 ●●●●● patch | view | raw | blame | history
src/page/perpetualContract/perpetualHistory.vue 12 ●●●● patch | view | raw | blame | history
src/page/trade/index.vue 7 ●●●● patch | view | raw | blame | history
src/components/kline-charts/config.js
@@ -1,5 +1,9 @@
import i18n from "@/i18n";
export default {
      // interaction: {
      //   // 禁用手势的恢复功能
      //   restore: false,
      // },
    // 网格线
    grid: {
      show: true,
src/components/kline-charts/index.vue
@@ -22,7 +22,17 @@
</template>
<script>
import { init, dispose } from 'klinecharts'
// import KLineChart  from 'klinecharts'
// const chart = new KLineChart(document.getElementById('kline'));
// chart.setOptions({
//   interaction: {
//     // 禁用手势的恢复功能
//     restore: false,
//   }
// });
let chart = null
import { _getKline } from '@/API/trade.api'
import config from './config'
import { Loading } from 'vant';
@@ -158,7 +168,7 @@
          chart.applyNewData(data);
          this.$emit('updataLine', false)
        })
      }, 1000);
      }, 10000);
    },
    setChartType() {
      let type = 'area'
src/components/perpetual-open/index.vue
@@ -64,7 +64,8 @@
            </div>
            <div class="text-right items-end justify-end">
              <div class="">{{ $t("数量") }}</div>
              <div class="mt-4">({{ symbol | _symbolName() }})</div>
              <div class="mt-4" v-if="symbol=='love'">(ORBITAL)</div>
              <div class="mt-4" v-else>({{ symbol | _symbolName() }})</div>
            </div>
          </div>
          <div
@@ -222,46 +223,28 @@
            @paraId="onParaId"
          />
          
          <div class="w-440 flex items-center box-show h-76 lh-76 rounded-lg">
            <div
              v-if="selectIndex == 1"
              class="w-80 flex items-center justify-center"
              style="height: 100%"
              @click="onReduce"
            >
              <img
                src="../../assets/image/public/reduce.png"
                alt="add"
                class="w-30 h-6"
              />
          <div style="border: 1px solid #a6a6a6; border-radius: 4px;"  class="h-76 lh-76 inputBackground2 mb-30 flex pr-20 justify-center rounded-lg textColor"
            v-if="selectIndex == 1">
            <input v-if="type / 1 === 1" :placeholder="$t('价格最优')" class="w-full pl-20 h-76 border-none text-left rounded-lg"
              :disabled="type / 1 === 1" @focus="focus = true" />
              <input v-else class="w-full pl-20 h-76 border-none text-left rounded-lg"
                :disabled="type / 1 === 1" @focus="focus = true" v-model="form.price" />
            <span class="ml-20">USDT</span>
          </div>
          <div v-if="selectIndex == 2"  class="w-440 flex items-center inputBackground2 h-76 lh-76 rounded-lg">
            <div v-if="selectIndex == 1" class="w-80 flex items-center justify-center" style="height: 100%"
              @click="onReduce">
              <img src="../../assets/image/public/reduce.png" alt="add" class="w-30 h-6" />
            </div>
            <input
              :placeholder="
                selectIndex == 1
                  ? $t('张数')
                  : $t('最少') + initFutrue && initFutrue.para
                  ? $t('最小金额') + initFutrue.para[paraIndex].buy_min
                  : ''
              "
              class="border-none text-center "
              style="width: 156px"
              v-model="form.amount"
              type="number"
              @input="onInput"
            />
            <div
              class="w-80 flex items-center justify-center"
              style="height: 100%"
            >
            <input :placeholder="selectIndex == 1 ? $t('交易数量')
              : $t('最少') + initFutrue && initFutrue.para
                ? $t('最小金额') + initFutrue.para[paraIndex].buy_min
                : ''
              " class="border-none text-center textColor" style="width: 156px" v-model="form.amount"
              type="number" @input="onInput" />
            <div class="w-80 flex items-center justify-center" style="height: 100%">
              <template v-if="selectIndex == 1">
                <div @click="onAdd">
                  <img
                    src="../../assets/image/public/add.png"
                    alt="reduce"
                    class="w-30 h-30"
                  />
                </div>
                <img @click="onAdd" src="../../assets/image/public/add.png" alt="reduce" class="w-30 h-30" />
              </template>
              <template v-else>
                <span class="textColor">USDT</span>
@@ -342,7 +325,7 @@
                {{ (initData.amount * (form.amount / 1)) | nan }} USDT
              </div>
            </div>
            <div class="flex justify-between mt-30">
            <!-- <div class="flex justify-between mt-30">
              <div class="newcolor1">{{ $t("建仓手续费") }}</div>
              <div class="textColor">
                {{
@@ -352,7 +335,7 @@
                }}
                USDT
              </div>
            </div>
            </div> -->
          </template>
          <div
            class="flex font-24 text-grey justify-between mt-32"
src/components/trade-head/index.vue
@@ -5,13 +5,16 @@
      <div class="pl-30 pr-30">
        <div class="flex justify-between pt-45">
          <div class="flex">
            <span
           <!-- <span
              @click="
                kineType
                  ? $router.push(`/trade/${symbol}`)
                  : $router.push(`/perpetualContract/${symbol}`)
              "
            >
            > -->
            <span
              @click="$router.push(`/trade/${symbol}`)"
            >
              <img
                v-if="isReturn"
                :src="require(`@/assets/theme/${theme}/image/icon_back.png`)"
src/components/trade-order-area/index.vue
@@ -79,7 +79,7 @@
        v-model="form.volume"
        @input="onInput"
      />
      <span class="textColor">{{ newname }}</span>
      <span class="textColor">{{ symbol.toLocaleUpperCase() | newname  }}</span>
    </div>
    <div
      v-if="isTotal"
@@ -275,7 +275,11 @@
      percentageVal: 0,
    };
  },
  mounted() {},
  mounted() {
      this.percentageVal = 0
      // this.exchangeVal(25)
      // this.handleInitSliderOption()
  },
  methods: {
    checkIsTotal(val) {
      this.isTotal = val;
src/page/TtrendDetails/index.vue
@@ -16,7 +16,7 @@
    <trade-head
      @openRecord="openRecord"
      :backFunc="() => $router.push('/')"
      :symbol="symbol"
      :symbol="symbol=='love'?'ORBITAL':symbol.toUpperCase()"
      :islevel="true"
      @update-coin="onUpdate"
      @data="quote = $event"
src/page/assetsCenter/index.vue
@@ -1,5 +1,9 @@
<template>
  <div class="assets-box">
      <div class="typebox" style="display: flex;">
          <div :class="typeindex==index?'typebox_box':'typebox_boxa'" @click="typeclick(index)"
              v-for="(item,index) in typelist" :key="index">{{item}}</div>
      </div>
    <header>
      <van-row class="title-box">
        <van-col span="12">
@@ -13,7 +17,7 @@
            <div class="pt">{{ $t("总资产估值") }}</div>
            <div class="flex ex-bg justify-center my-42 items-center w-100" @click="onSwitch">
            <!-- <div class="flex ex-bg justify-center my-42 items-center w-100" > -->
              <img src="@/assets/image/exchange/icon_3.png" alt="" class="w-25 h-25"  />
              <!-- <img src="@/assets/image/exchange/icon_3.png" alt="" class="w-25 h-25"  /> -->
            </div>
        </div>
        <!-- <div class="pt">{{ assetsFunds.total }}</div> -->
@@ -220,6 +224,7 @@
    return {
      keywords: "",
      loading: true,
      typelist: [this.$t("资金")+this.$t("账户"), this.$t("交易")+this.$t("账户")],
      active: 1,
      typeindex:0,
      tabList2: [
@@ -346,6 +351,16 @@
  },
  methods: {
    ...mapActions("user", ["GET_UERS_KYC"]),
    typeclick(e) {
        this.typeindex = e
        // if (e == 0) {
        //     this.initParama(this.symbol)
        // } else {
        //     // this.symbol = 'wld'
        //     this.initParam(this.symbol)
        // }
        // this.$forceUpdate()
    },
    onInput(e) {
      console.log(333, this.fundsDatra);
      this.funds = this.fundsDatra.filter((item) =>
@@ -461,6 +476,42 @@
</script>
<style lang="scss" scoped>
    .typebox_box {
        width: 50%;
        background-color: #9691fa;
        color: #fff;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    .typebox_boxa {
        width: 50%;
        background-color: #fff;
        color: #9691fa;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    .no_touch {
        -webkit-user-select: none;
        user-select: none;
        -ms-user-select: none;
        -moz-user-select: none;
        @include themify() {
            background: themed("main_background");
        }
        min-height: 100vh;
    }
    .typebox {
        width: 100%;
        height: 100px;
    }
.assets-box {
  header {
    // padding: 100px 0 0px;
src/page/perpetualContract/perpetualHistory.vue
@@ -28,9 +28,10 @@
          :key="item.title"
          :name="item.type"
        >
          <div class="all-select flex justify-end">yfii
          <div class="all-select flex justify-end">
            <div class="select-box flex" @click.stop="isAll = !isAll">
              <div class="flex-1 font-24">{{ symbol.toUpperCase() }}/USDT</div>
              <div class="flex-1 font-24" v-if="symbol=='love'">ORBITAL/USDT</div>
              <div class="flex-1 font-24" v-else>{{ symbol.toUpperCase() }}/USDT</div>
              <van-icon name="arrow-down" />
              <div class="select-data" v-if="isAll">
                <div
@@ -39,7 +40,12 @@
                  v-for="(item2, index) in currencyList"
                  :key="index"
                >
                  {{ item2.symbol.toUpperCase() }}/USDT
                <div v-if="item2.symbol=='love'">
                    ORBITAL/USDT
                </div>
                  <div v-else>
                      {{ item2.symbol.toUpperCase() }}/USDT
                  </div>
                </div>
              </div>
            </div>
src/page/trade/index.vue
@@ -13,7 +13,7 @@
                    <trade-deep-data :selectValue="selectValue" @getList="getList" :showType="showType" :symbol="symbol"
                        v-if="symbol" :price="price" class="w-290 mr-30" />
                </keep-alive>
                <trade-order-area :symbol="symbol" :init-open="initOpena" :newname="newname" :init-close="initClose"
                <trade-order-area :key="newzuj" :symbol="symbol" :init-open="initOpena" :newname="newname" :init-close="initClose"
                    :price="price" @ordered="onOrdereda" />
            </div>
@@ -258,6 +258,7 @@
                range: "",
                stop_price_profit: "",
                stop_price_loss: "",
                newzuj:0,
                initClose: {},
                asks: initArr, // 卖单
                bids: initArr, // 买单
@@ -374,6 +375,7 @@
            } else {
                this.init(symbol);
            }
            // this.handleQoutes()
        },
        methods: {
            ...mapActions("home", [SET_COIN_LIST]),
@@ -602,6 +604,7 @@
            },
            fetchDeepData(symbol) {
                console.log("sd");
                this.newzuj += 1
                _getDeepData(symbol).then((data) => {
                    // 获取深度
                    console.log(data);
@@ -706,7 +709,7 @@
                    //console.log('开仓数据')
                    Axios.tradeBuyToken({}).then((res) => {
                        this.initOpena = res.data;
                        console.log(this.initOpen.volume, res.data.volume, type);
                        console.log(this.initOpena.volume, res.data.volume, type,111111);
                    });
                }
                if (type === "close" || !type) {