1
PC-20250623MANY\Administrator
2025-09-17 cdd46caef517696298e394579d6819fa0ca8388d
src/views/account/components/Position.vue
@@ -5,10 +5,10 @@
        <div class="card_1 flex-center">
          <div>{{ $t("浮動盈虧") }}</div>
          <div style="font-size: 24px" :style="`color:${thisMoneyData.profitAndLoss > 0
              ? 'red'
              : thisMoneyData.profitAndLoss < 0
                ? 'green'
                : ''
            ? 'red'
            : thisMoneyData.profitAndLoss < 0
              ? 'green'
              : ''
            }`">
            {{ thisMoneyData.symbol }} {{ thisMoneyData.profitAndLoss }}
          </div>
@@ -76,10 +76,10 @@
        <el-table-column prop="profitAndLoseParent" :label="$t('Profit')">
          <template slot-scope="scope">
            <span :class="`${scope.row.profitAndLose < 0
                ? 'r_c'
                : scope.row.profitAndLose > 0
                  ? 'lc_c'
                  : ''
              ? 'r_c'
              : scope.row.profitAndLose > 0
                ? 'lc_c'
                : ''
              }`">
              {{ scope.row.profitAndLose }} ({{
                scope.row.profitAndLoseParent
@@ -127,6 +127,8 @@
</template>
<script>
let teimss2 = null; // 轮询获取持仓数据计时器
import mixins from "@/mixins/myMixins"; // 混入
import * as api from "@/axios/api";
export default {
@@ -163,6 +165,13 @@
    this.opt.stockType = this.type;
    this.apiInterface = api.getchicang; // 赋值接口
    this.init(); // 获取记录列表
    teimss2 = setInterval(() => {
      this.getList();
    }, 3000);
  },
  beforeDestroy() {
    clearInterval(teimss2);
  },
  methods: {
    // 关闭弹窗