1
PC-20250623MANY\Administrator
2025-08-25 416079e676643b4e808ce3cc403963d5aba3acf1
1
2 files modified
142 ■■■■■ changed files
src/page/home/Record.vue 5 ●●●●● patch | view | raw | blame | history
src/page/user/myOrder.vue 137 ●●●●● patch | view | raw | blame | history
src/page/home/Record.vue
@@ -131,7 +131,7 @@
  justify-content: center;
  height: 60px;
  line-height: 60px;
  background-color: #fff;
  background-color: #333;
  flex: 1;
  border-bottom: 1px solid @green;
  font-size: 12px;
@@ -145,10 +145,11 @@
  font-size: 10vw;
}
/deep/ .van-cell {
  color: #fff;
  list-style: none;
  width: 100%;
  margin-top: 0.26667rem;
  background: #fff;
  background: #555;
  border-radius: 0.10667rem;
  list-style: none;
  border: none;
src/page/user/myOrder.vue
@@ -1,6 +1,56 @@
<template>
  <div class="my_order">
    <tab-head :title="$t('订单')"></tab-head>
    <tab-head :title="$t('订单')" v-if="!Operation"></tab-head>
    <div v-if="!Operation" style="padding: 0 0.3rem;">
      <div class="tui-money">
        <div class="normal flex-center">
          <div>
            <div class="text-xs">{{ $t("浮動盈虧") }}</div>
            <div class="price">
              {{ moneyData.symbol }} {{ moneyData.profitAndLoss }}
            </div>
          </div>
        </div>
        <div class="all-assets flex-between">
          <div class="assets-item flex-center" style="align-items: start;">
            <div class="all-size">{{ $t("總資產") }}</div>
            <div class="big-size">
              {{ moneyData.symbol }}{{ moneyData.totalMoney }}
            </div>
          </div>
          <div class="assets-item flex-center">
            <div class="all-size">
              {{ $t("hj48") }}
            </div>
            <div class="big-size">
              {{ moneyData.symbol }}{{ moneyData.availableBalance }}
            </div>
          </div>
          <div class="assets-item flex-center" style="align-items: end;">
            <div class="all-size">{{ $t("账户盈亏") }}</div>
            <div class="big-size">
              {{ moneyData.symbol }}{{ moneyData.cumulativeProfitAndLoss }}
            </div>
          </div>
        </div>
        <div class="control flex-between">
          <div class="control-item flex-center" @click="$router.push('/markets-list')">
            <img src="@/assets/img/mr.png" />
            <div class="action-item-text">{{ $t("gm") }}</div>
          </div>
          <div class="control-item flex-center" @click="$router.push('/markets-list')">
            <img src="@/assets/img/mc.png" />
            <div class="action-item-text">{{ $t("gm") }}</div>
          </div>
          <div class="control-item flex-center" @click="$router.push('/Record')">
            <img src="@/assets/img/pc.png" />
            <div class="action-item-text">{{ $t("jl") }}</div>
          </div>
        </div>
      </div>
    </div>
    <van-tabs v-model="active" title-inactive-color="#898a8e">
      <van-tab
        :title="$t('hj2')"
@@ -131,9 +181,9 @@
              style="font-size: .4rem;text-align: end;"
              :style="
                `color:${
                  i.profitAndLose > 0
                  i.profitAndLose < 0
                    ? 'green'
                    : i.profitAndLose < 0
                    : i.profitAndLose > 0
                    ? 'red'
                    : ''
                }`
@@ -145,9 +195,9 @@
              style="font-size: .28rem;text-align: end;"
              :style="
                `color:${
                  i.profitAndLose > 0
                  i.profitAndLose < 0
                    ? 'green'
                    : i.profitAndLose < 0
                    : i.profitAndLose > 0
                    ? 'red'
                    : ''
                }`
@@ -289,7 +339,8 @@
      list: [], // 持仓数据
      list2: [], // 平仓数据
      actObj: {}, // 选择的持仓对象
      actIndex: null
      actIndex: null,
      moneyData: {} // 账户金额
    };
  },
  watch: {
@@ -308,7 +359,9 @@
      default: false
    }
  },
  created() {},
  created() {
    if (!this.Operation) this.getMoney();
  },
  methods: {
    // 获取 持仓 数据
    async getList(state = 0) {
@@ -353,6 +406,13 @@
        path: "/Stockdetail",
        query: { codes: i.positionSn }
      });
    },
    // 获取账户金额
    async getMoney() {
      let data = await api.getMoney();
      if (data.status === 0) {
        this.moneyData = data.data[0];
      }
    }
  }
};
@@ -375,6 +435,69 @@
  width: 100%;
  font-size: 0.3rem;
  background-color: rgba(#000, 0.9);
  .tui-money {
    margin-top: 0.65rem;
    margin-bottom: 0.3rem;
    width: 100%;
    background: linear-gradient(90deg, #585fb4, #48529e);
    border-radius: 0.175rem;
    .control {
      width: 100%;
      padding: 0.2rem 0.3rem;
      .control-item {
        width: 33%;
        padding-top: .1rem;
        flex-direction: column;
        .action-item-text {
          font-size: 0.3rem;
          line-height: 0.3rem;
          color: #aaa;
        }
        img {
          width: 0.5rem;
          height: 0.5rem;
          margin-bottom: 0.3rem;
        }
      }
    }
    .all-assets {
      width: 100%;
      padding: 0.225rem 0.3rem 0.35rem;
      justify-content: space-evenly;
      border-bottom: #aaa solid 1px;
      .assets-item {
        width: 33%;
        flex-shrink: 0;
        flex-direction: column;
        .big-size {
          font-size: 0.35rem;
          color: #fff;
          padding-top: 0.15rem;
        }
        .all-size {
          font-size: 0.35rem;
          color: #c4c7e4;
        }
      }
    }
    .normal {
      padding: 0.375rem 0;
      margin: 0 0.375rem;
      position: relative;
      .price {
        font-size: 0.825rem;
        line-height: 0.825rem;
        font-weight: 500;
        padding-top: 0.3rem;
        color: #fff;
      }
      .text-xs {
        font-size: 0.3rem;
        color: #c7c9e6;
        text-align: center;
      }
    }
  }
  .mo_list {
    padding: 0 0.35rem;
    .mol_item {