dcc
2024-05-17 b8f6f514b675fa6a006dfafbc99303b3c5c8ba85
src/page/list/trading-list.vue
@@ -1,1040 +1,106 @@
<template>
  <div class="tr_list_page">
    <div class="content">
      <div class="tabs">
        <div class="bottom_content" v-if="tabsIndex === 1">
          <!-- 搜索框 -->
          <div class="search">
            <div class="search_content">
              <div class="left_search">
                <div class="search_img">
                  <img src="../../assets/img/searchs.png" alt />
                </div>
                <div class="search_input">
                  <input type="text" class="searchs" placeholder="输入品种名称/代码搜索" />
                </div>
              </div>
            </div>
  <div>
    <!-- 搜索框 -->
    <div class="search">
      <div class="search_content">
        <div class="left_search">
          <div class="search_img">
            <img src="../../assets/img/searchs.png" alt />
          </div>
          <div class="tab_class">
            <div class="scroll_tab">
              <div class="tab_items" v-for="(item, index) in tabsClassArr" :key="index"
              :class="index==0?'mrt':''"
                @click="handleTabsItem(item, index)">
                <span :class="tabsItemIndex === index ? 'active' : ''">{{ item.name }}</span>
              </div>
            </div>
          </div>
          <div class="kai_mess" v-show="isToken==''" @click="$router.push('/login')">
            <div class="left_identity_img">
              <img src="../../assets/img/shenfen2.png" alt />
            </div>
            <div class="text"  >
              <span>{{ '开户即可入金交易' }}</span>
            </div>
            <div class="right_go">
              <img src="../../assets/img/yuoujiantou.png" alt />
            </div>
          </div>
          <div class="list_title">
            <div class="item_title varieties">
              <span>{{ '品种' }}</span>
            </div>
            <div class="item_title latest_price">
              <span>{{ '最新价' }}</span>
            </div>
            <div class="item_title applies">
              <span>{{ '涨跌幅' }}</span>
            </div>
          </div>
          <div class="list" :class="isToken==''?'listHeight':'listHeights'">
            <van-list
  v-model="loading"
  :finished="finished"
  finished-text="没有更多了"
  @load="onLoad"
>
            <div class="list_items">
              <div class="item" v-for="(item, index) in listArr" :key="index">
                <div class="left_title">
                  <div class="tp">
                    <span class="collection" @click="options(item)">
                      <span class="shu" :class="item.isOption == '1'?'shublue':''"></span>
                    </span>
                    <span class="title_color">{{ tabsItemIndex == 3 ? item.futuresName : tabsItemIndex == 2?item.name : tabsItemIndex == 0?item.name :item.indexName }}</span>
                  </div>
                  <div class="bt">
                    <span>{{ tabsItemIndex == 3 ? item.futuresCode : tabsItemIndex == 2?item.code : tabsItemIndex == 0?item.code : item.indexCode }}</span>
                  </div>
                </div>
                <div class="center_price">
                  <div class="tp">
                    <span class="price_color" v-if="tabsItemIndex == 0||tabsItemIndex == 2" :class="item.hcrate>0?'green':'red'">{{ item.nowPrice
                    }}</span>
                    <span class="price_color" v-else>{{ tabsItemIndex == 3 ? Number(item.nowPrice).toFixed(2) : item.currentPoint
                    }}</span>
                  </div>
                  <div class="bt">
                    <span v-if="tabsItemIndex == 3 ||tabsItemIndex == 1">{{'手续费:'+item.transFee}}</span>
                    <span v-else>{{ item.today_min }}</span>
                  </div>
                </div>
                <div class="right_bs">
                  <div class="tp">
                    <span class="price_color"  v-if="tabsItemIndex == 0||tabsItemIndex == 2" :class="item.hcrate>0?'green':'red'">{{  item.hcrate  }}</span>
                    <span class="price_color"  v-if="tabsItemIndex == 1" :class="item.floatRate>0?'green':'red'">{{  item.floatRate + '%'   }}</span>
                    <span class="price_color" v-if="tabsItemIndex == 3" :class="((item.nowPrice - item.lastClose) / item.lastClose * 100).toFixed(2)>0?'green':'red'" >{{ item.lastClose == "" ? 0.00 : ((Number(item.nowPrice) - Number(item.lastClose)) / Number(item.lastClose) * 100).toFixed(2) +'%'  }}</span>
                  </div>
                  <div class="bt">
                    <div v-if="tabsItemIndex != 1&&tabsItemIndex != 3">{{item.stock_type.toUpperCase()}}</div>
                    <!-- class="codeIcon" -->
                  </div>
                </div>
              </div>
            </div>
          </van-list>
          <div class="search_input">
            <input
              type="text"
              class="searchs"
              :placeholder="$t('hj37')"
              ref="search"
              id="sousuo"
              v-model="gpcode"
              @input="gpinput"
            />
          </div>
        </div>
        <div class="right_search" @click="sousuo">{{ $t("Search") }}</div>
      </div>
    </div>
    <div class="shai" v-if="dialogFlag" @click="openDialog()"></div>
    <div class="top_title" ref="topTitle">
      <div>
        <div class="tabs_title">
          <div class="tb" v-for="(item, index) in tabsArr" :key="index" @click="handleTabsClick(item, index)">
            <span :class="index === tabsIndex ? 'active' : ''">{{ item }}</span>
          </div>
        </div>
        <div class="right_money" @click="openDialog()">
          <div class="content_money" v-if="tabsIndex === 1">
            <div class="top_price">
              <div class="left">
                <span>{{ '余额' }}</span>
              </div>
              <div class="right">
                <span style="white-space: nowarp;" v-show="tabsItemIndex == 1" >{{ '¥ '+$store.state.userInfo.userIndexAmt }}</span>
                <span style="white-space: nowarp;" v-show="tabsItemIndex == 0">{{ '¥ '+$store.state.userInfo.userAmt }}</span>
                <span style="white-space: nowarp;" v-show="tabsItemIndex == 2">{{ '¥ '+$store.state.userInfo.userAmt }}</span>
                <span style="white-space: nowarp;" v-show="tabsItemIndex == 3">{{ '¥ '+$store.state.userInfo.userFuturesAmt }}</span>
              </div>
              <div class="sanjiao">
                <img :class="dialogFlag?'xuanz':''" style="transition: all 0.5s;" src="../../assets/img/xiala.png" alt />
              </div>
            </div>
            <div class="bottom_balance">
              <div>
                <span>{{ '可用余额' }}</span>
              </div>
            </div>
          </div>
        </div>
      </div>
      <div class="cards">
        <div class="card_item">
          <div class="tops_title">
            <div><span>{{ '总资产' }}</span></div>
          </div>
          <div class="bottom_price">
            <div><p v-if="this.$store.state.settingForm.indexDisplay && !this.$store.state.settingForm.futuresDisplay "
                class="account">¥{{$store.state.hide?'****':Number($store.state.userInfo.userAmt +
                $store.state.userInfo.userIndexAmt).toFixed(2)}}</p>
              <p v-else-if="!this.$store.state.settingForm.indexDisplay && this.$store.state.settingForm.futuresDisplay"
                class="account">¥{{$store.state.hide?'****':Number($store.state.userInfo.userAmt +
                $store.state.userInfo.userFuturesAmt).toFixed(2)}}</p>
              <p v-else-if="!this.$store.state.settingForm.indexDisplay && !this.$store.state.settingForm.futuresDisplay"
                class="account">¥{{$store.state.hide?'****':Number($store.state.userInfo.userAmt).toFixed(2)}}</p>
              <p v-else-if="this.$store.state.settingForm.indexDisplay && this.$store.state.settingForm.futuresDisplay"
                class="account">¥{{$store.state.hide?'****':Number($store.state.userInfo.userAmt +
                $store.state.userInfo.userIndexAmt + $store.state.userInfo.userFuturesAmt).toFixed(2)}}</p>
               </div>
          </div>
        </div>
        <div class="card_item">
          <div class="tops_title">
            <div><span>{{ '强平线' }}</span></div>
          </div>
          <div class="bottom_price">
            <div><span v-show="tabsItemIndex == 1">{{$store.state.hide?'****':Number(($store.state.userInfo.enableIndexAmt + $store.state.userInfo.allIndexFreezAmt) * indexSettingInfo.forceSellPercent).toFixed(2)}}</span>
                <span v-show="tabsItemIndex == 0">{{$store.state.hide?'****':Number(($store.state.userInfo.enableAmt + $store.state.userInfo.allFreezAmt) * settingInfo.forceStopPercent).toFixed(2)}} </span>
                <span v-show="tabsItemIndex == 2">{{$store.state.hide?'****':Number(($store.state.userInfo.enableAmt + $store.state.userInfo.allFreezAmt) * settingInfo.forceStopPercent).toFixed(2)}} </span>
                <span v-show="tabsItemIndex == 3">{{$store.state.hide?'****':Number(($store.state.userInfo.enableFuturesAmt + $store.state.userInfo.allFuturesFreezAmt) * futuresSettingInfo.forceSellPercent).toFixed(2)}}</span></div>
          </div>
        </div>
        <div class="card_item">
          <div class="tops_title">
            <div><span>{{tabsItemIndex == 1? '指数':tabsItemIndex == 0?'沪深':tabsItemIndex == 2?'科创':tabsItemIndex == 3?'期货':''}}</span><span>{{ '资产' }}</span></div>
          </div>
          <div class="bottom_price">
            <div><span v-show="tabsItemIndex == 1">{{ '¥ '+$store.state.userInfo.userIndexAmt }}</span>
                <span v-show="tabsItemIndex == 0">{{ '¥ '+$store.state.userInfo.userAmt }}</span>
                <span v-show="tabsItemIndex == 2">{{ '¥ '+$store.state.userInfo.userAmt }}</span>
                <span v-show="tabsItemIndex == 3">{{ '¥ '+$store.state.userInfo.userFuturesAmt }}</span></div>
          </div>
        </div>
        <div class="card_item">
          <div class="tops_title">
            <div><span>{{ '可用资金' }}</span></div>
          </div>
          <div class="bottom_price">
            <div><span v-show="tabsItemIndex == 1">{{ '¥ '+$store.state.userInfo.enableIndexAmt }}</span>
                <span v-show="tabsItemIndex == 0">{{ '¥ '+$store.state.userInfo.enableAmt }}</span>
                <span v-show="tabsItemIndex == 2">{{ '¥ '+$store.state.userInfo.enableAmt }}</span>
                <span v-show="tabsItemIndex == 3">{{ '¥ '+$store.state.userInfo.enableFuturesAmt }}</span></div>
          </div>
        </div>
        <div class="card_item">
          <div class="tops_title">
            <div><span>{{ '冻结保证金' }}</span></div>
          </div>
          <div class="bottom_price">
            <div><span v-show="tabsItemIndex == 1">{{ '¥ '+$store.state.userInfo.allIndexFreezAmt }}</span>
                <span v-show="tabsItemIndex == 0">{{ '¥ '+$store.state.userInfo.allFreezAmt }}</span>
                <span v-show="tabsItemIndex == 2">{{ '¥ '+$store.state.userInfo.allFreezAmt }}</span>
                <span v-show="tabsItemIndex == 3">{{ '¥ '+$store.state.userInfo.allFuturesFreezAmt }}</span></div>
          </div>
        </div>
        <div class="card_item">
          <div class="tops_title">
            <div><span>{{ '持仓总盈亏' }}</span></div>
          </div>
          <div class="bottom_price">
            <div><span :class="$store.state.userInfo.allIndexProfitAndLose>0?' red':$store.state.userInfo.allIndexProfitAndLose<0?' green':''" v-show="tabsItemIndex == 1">{{ '¥ '+$store.state.userInfo.allIndexProfitAndLose }}</span>
                <span :class="$store.state.userInfo.allProfitAndLose>0?' red':$store.state.userInfo.allProfitAndLose<0?' green':''" v-show="tabsItemIndex == 0">{{ '¥ '+$store.state.userInfo.allProfitAndLose }}</span>
                <span :class="$store.state.userInfo.allProfitAndLose>0?' red':$store.state.userInfo.allProfitAndLose<0?' green':''" v-show="tabsItemIndex == 2">{{ '¥ '+$store.state.userInfo.allProfitAndLose }}</span>
                <span :class="$store.state.userInfo.allFuturesProfitAndLose>0?'red':$store.state.userInfo.allFuturesProfitAndLose<0?' green':''" v-show="tabsItemIndex == 3">{{ '¥ '+Number($store.state.userInfo.allFuturesProfitAndLose).toFixed(2)}}</span></div>
          </div>
        </div>
      </div>
    </div>
    <tabsList ref="tabsList" />
  </div>
</template>
<script>
import * as api from "@/axios/api";
import elalert from "@/components/elalert.vue";
import tabsList from "./tradingList/tabs";
export default {
  name: "trading",
  components: {
    elalert
  },
  components: { tabsList },
  data() {
    return {
      tabsIndex: 1,
      tabsArr: ["自选", "市场"],
      tabClassActive: 1,
      dialogFlag: false,
      pageNum: 1,
      stockPlate: "",
      alertShow: false,
      isToken:'',
      elType: "warning",
      indexSettingInfo: {},
      futuresSettingInfo:{},
      settingInfo:{},
      loading: false,
      finished: false,
      texts: "",
      tabsClassArr: [
      {
          name: "沪深京",
          type: 0
        },
        {
          name: "指数",
          type: 1
        },
        {
          name: "科创",
          type: 2
        },
        {
          name: "期货",
          type: 3
        }
      ],
      tabsItemIndex: 0,
      listArr: [],
      gpcode: "",
    };
  },
  mounted() {
    this.getStock();
    this.isToken=window.localStorage.getItem('USERTOKEN')
    this.getUserInfo()
    this.getIndexSettingInfo()
    this.getSettingInfo()
    this.getFuturesSetting()
  },
  methods: {
    closeAlert() {
      this.alertShow = false;
    sousuo() {
      this.$refs.tabsList.sousuo = this.gpcode;
    },
    async getUserInfo () {
      // 获取用户信息
      //   let showcookie = this.getCookie('USER_TOKEN');
      let data = await api.getUserInfo()
      if (data.status === 0) {
        // this.getProductSetting()
        this.$store.state.userInfo = data.data
      } else {
        Toast(data.msg)
      }
      this.$store.state.user = this.user
    gpinput(e) {
      this.gpcode = e.target.value;
      this.$refs.tabsList.sousuo = e.target.value;
    },
    async getIndexSettingInfo () {
      // 网站设置信息 指数
      let data = await api.getIndexSetting()
      if (data.status === 0) {
        // 成功
        this.indexSettingInfo = data.data
      } else {
        Toast(data.msg)
      }
    },
    async getFuturesSetting () {
      // 网站设置信息 期货
      let data = await api.getFuturesSetting()
      if (data.status === 0) {
        // 成功
        this.futuresSettingInfo = data.data
      } else {
        Toast(data.msg)
      }
    },
    async getSettingInfo () {
      let data = await api.getSetting()
      if (data.status === 0) {
        // 成功
        this.settingInfo = data.data
      } else {
        Toast(data.msg)
      }
    },
    async getListMarket() {
      // 获取指数列表
      let result = await api.getListMarket()
      if (result.status === 0) {
        this.listArr = result.data
      } else {
        this.texts = result.msg;
        this.alertShow = true;
      }
    },
    async getStock() {
      //沪深
      let opt = {
        pageNum: this.pageNum,
        pageSize: 15,
        stockPlate: this.stockPlate,
      }
      let data = await api.getStock(opt)
      if (data.status === 0) {
        data.data.list.forEach(element => {
          this.listArr.push(element)
        })
      } else {
        this.texts = data.msg;
        this.alertShow = true;
      }
    },
    async getFutures() {
      // 获取期货列表
      let opt = {
        homeShow: 1,
        pageNum: this.pageNum,
        pageSize: 15
      }
      let data = await api.getListFutures(opt)
      if (data.status === 0) {
        console.log(this.tabsItemIndex)
        this.listArr = data.data
        console.log("期货", this.listArr)
      } else {
        this.texts = data.msg;
        this.alertShow = true;
      }
    },
    handleTabsClick(item, index) {
      if (index == 0) {
        if(this.dialogFlag){
          this.$refs['topTitle'].style.height = '1.2821rem'
        setTimeout(() => {
          this.dialogFlag = false;
          this.tabsIndex = index;
        }, 800);
        }else{
          this.tabsIndex = index;
        }
      } else {
        this.tabsIndex = index;
      }
    },
    handleTabsItem(item, index) {
      this.tabsItemIndex = index;
      switch (item.type) {
        case 1:
          this.listArr = [];
          this.getListMarket();
          break;
        case 0:
          this.stockPlate = ""
          this.listArr = [];
          this.getStock();
          break;
        case 2:
          this.stockPlate = "科创"
          this.listArr = [];
          this.getStock();
          break;
        case 3:
          this.listArr = [];
          this.getFutures();
          break;
      }
    },
    async options(val) {
      if(val.isOption=='1'){
        let data = await api.delOption({ code: val.indexCode })
      if (data.status === 0) {
        switch (this.tabsItemIndex) {
          case 1:
          this.listArr = [];
          this.getListMarket();
          break;
        case 0:
          this.stockPlate = ""
          this.listArr = [];
          this.getStock();
          break;
        case 2:
          this.stockPlate = "科创"
          this.listArr = [];
          this.getStock();
          break;
        case 3:
          this.listArr = [];
          this.getFutures();
          break;
        }
        this.refreshList()
      } else {
      }
      }else{
        var codes="";
        switch (this.tabsItemIndex) {
          case 0:
            codes = val.code;
            break;
            case 1:
            codes = val.indexGid;
            break;
            case 2:
            codes = val.code;
            break;
            case 3:
            codes = val.futuresGid;
            break;
          default:
            break;
        }
        let data = await api.addOption({ code: codes });
      if (data.status === 0) {
        switch (this.tabsItemIndex) {
          case 1:
          this.listArr = [];
          this.getListMarket();
          break;
        case 0:
          this.stockPlate = ""
          this.listArr = [];
          this.getStock();
          break;
        case 2:
          this.stockPlate = "科创"
          this.listArr = [];
          this.getStock();
          break;
        case 3:
          this.listArr = [];
          this.getFutures();
          break;
        }
      } else {
      }
      }
    },
    async refreshList () {
      // 刷新指数
      if (this.loading) {
        return
      }
      let opt = {
        pageNum: 1,
        pageSize: this.currentNum
      }
      let data = await api.getListMarket(opt)
      this.list = data.data
    },
    handleCollectionClick(item) {
      item.collection = !item.collection;
    },
    openDialog() {
      if (!this.dialogFlag) {
        this.$refs['topTitle'].style.height = '6.9rem'
      } else {
        this.$refs['topTitle'].style.height = '1.2821rem'
      }
      this.dialogFlag = !this.dialogFlag;
    }
  },
  filters: {
    gettime(time) {
      if (!time) {
        return "";
      }
      var nd = new Date(time);
      var y = nd.getFullYear();
      var mm = nd.getMonth() + 1;
      var d = nd.getDate();
      var h = nd.getHours();
      var m = nd.getMinutes();
      var c = nd.getSeconds();
      if (mm < 10) {
        mm = "0" + mm;
      }
      if (d < 10) {
        d = "0" + d;
      }
      if (h < 10) {
        h = "0" + h;
      }
      if (m < 10) {
        m = "0" + m;
      }
      if (c < 10) {
        c = "0" + c;
      }
      //17:35:2922-06-2022
      return h + ":" + m + ":" + c;
    }
  },
};
</script>
<style scoped lang="less">
.tr_list_page {
  width: 100%;
  height: calc(100% - 1.3rem);
  background: #fff;
  >.content {
    width: 100%;
    height: 100%;
  }
}
.tabs {
  width: 100%;
  height: 100%;
  position: relative;
  .search {
    width: 100%;
    height: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.3rem;
    .search_content {
      width: 100%;
      height: 90%;
      display: flex;
      align-items: center;
    }
    .left_search {
      width: 100%;
      height: 100%;
      background: #f6f6f6;
      border-radius: 0.15rem;
      display: flex;
      .search_img {
        width: 1rem;
        height: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
        img {
          width: 0.5rem;
          height: 0.5rem;
        }
      }
      .search_input {
        width: 100%;
        overflow: hidden;
        height: 100%;
        display: flex;
      }
    }
    .right_search_class {
      width: 13%;
      height: 100%;
      display: flex;
      justify-content: flex-end;
      align-items: center;
      img {
        width: 0.6rem;
        height: 0.6rem;
      }
    }
  }
}
.top_title {
  width: 100%;
  height: 1.2821rem;
  padding: 0 0.3rem;
  position: fixed;
  background: #fff;
  top: 0;
  z-index: 9999999;
  transition: all 0.5s;
  overflow: hidden;
  border-radius: 0 0 0.2rem 0.2rem;
  >div {
    width: 100%;
    height: 1.2821rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .tabs_title {
    width: 23%;
    height: 100%;
    display: flex;
  }
  .tb {
    width: 50%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.4103rem;
  }
  .active {
    font-size: 0.5003rem;
    font-weight: 800;
  }
}
.bottom_content {
  width: 100%;
  height: calc(100% - 1.2821rem);
  position: relative;
  top: 7%;
}
.scroll_tab {
  width: 100%;
.search {
  height: 1rem;
  overflow-x: scroll;
  -webkit-overflow-scrolling: touch;
  display: -webkit-box;
  white-space: nowrap;
  >div {
    display: inline-block;
    width: 15%;
    height: 100%;
    display: flex;
    font-size: 0.4rem;
    align-items: center;
    span {
      display: inline-block;
      min-width: 40%;
      height: 100%;
      text-align: center;
      line-height: 1.1538rem;
    }
  }
  span.active {
    color: rgb(2, 99, 226);
    border-bottom: 0.07rem solid rgb(2, 99, 226);
    font-weight: 800;
    transition: all 0.5s;
  }
}
.scroll_tab::-webkit-scrollbar {
  display: none;
}
.kai_mess {
  width: 100%;
  height: 1.2821rem;
  background: #f5f9fe;
  display: flex;
  justify-content: space-between;
  position: absolute;
  .left_identity_img {
    width: 0.9744rem;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-left: 0.2rem;
    img {
      width: 0.6rem;
      height: 0.6rem;
    }
  }
  .text {
    width: 80%;
    height: 100%;
    display: flex;
    align-items: center;
    color: rgb(2, 99, 226);
    font-weight: 800;
    font-size: 0.35rem;
    padding-left: 0.35rem;
  }
  .right_go {
    width: 10%;
    display: flex;
    align-items: center;
    justify-content: center;
    img {
      width: 0.6rem;
      height: 0.6rem;
    }
  }
}
.list::-webkit-scrollbar {
  display: none;
}
.list {
  width: 100%;
  overflow-x: auto;
  padding-bottom: 1.2821rem;
  padding: 0 0.3rem;
  .list_items {
    margin-top: -0.5rem;
    width: 100%;
    >div {
      width: 100%;
      height: 1.0256rem;
      display: flex;
      margin: 0.5rem 0;
      >div {
        >div {
          display: flex;
          align-items: center;
        }
        .tp {
          width: 100%;
          height: 70%;
        }
        .bt {
          width: 100%;
          height: 30%;
        }
      }
    }
    .left_title {
      width: 45%;
      height: 100%;
    }
    .center_price {
      width: 35%;
      height: 100%;
    }
    .right_bs {
      width: 20%;
      height: 100%;
    }
  }
}
.list_title {
  width: 100%;
  height: 1rem;
  margin-top: .29rem;
  padding: 0 0.3rem;
  color: #a1a2a4;
  display: flex;
  >div {
    display: flex;
    align-items: center;
  }
  .varieties {
    width: 45%;
  }
  .latest_price {
    width: 35%;
  }
  .applies {
    width: 20%;
  }
}
.price_color {
  //color: rgb(39, 171, 99);
  font-size: 0.4rem;
  font-weight: 600;
}
.title_color {
  color: rgb(2, 2, 2);
  font-size: 0.4rem;
  font-weight: 600;
}
.tab_items {
  font-size: 0.2rem;
}
.tab_class {
  padding: 0 0.3rem;
}
.searchs::placeholder {
  color: #8e8f92;
}
.searchs {
  width: 100%;
}
.collection {
  display: inline-block;
  width: 0.1rem;
  height: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 0.1rem;
  margin: 15px 22px;
  position: relative;
  z-index: 99;
  .shu {
    width: 60%;
    height: 100%;
    background: #919191;
  }
}
.right_money {
  width: 44%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  .content_money {
    width: 80%;
    height: 80%;
  }
  .top_price {
  .search_content {
    width: 100%;
    height: 70%;
    height: 90%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    align-items: center;
  }
    .left {
      width: 0.8rem;
      height: 0.4103rem;
      border-radius: 0.1rem;
      background: #4d73b1;
      color: #fff;
      font-size: 0.3077rem;
  .left_search {
    width: 100%;
    height: 100%;
    background: #fff;
    border-radius: 0.5rem;
    display: flex;
    .search_img {
      width: 1rem;
      height: 100%;
      display: flex;
      align-items: center;
      justify-content: center;
      span {
        display: inline-block;
        transform: scale(0.8);
        font-weight: 600;
      align-items: center;
      img {
        width: 0.5rem;
        height: 0.5rem;
      }
    }
    .right {
      width: auto;
    .search_input {
      width: 100%;
      overflow: hidden;
      height: 100%;
      display: flex;
      align-items: center;
      justify-content: flex-end;
      white-space: nowrap;
      span {
        font-weight: 600;
      }
    }
  }
  .bottom_balance {
    width: 100%;
    height: 30%;
    display: flex;
    justify-content: flex-end;
    font-size: 0.3077rem;
    color: #acaeaf;
    transform: scale(0.9);
    margin-left: 0.2rem;
    padding-right: 0.48rem;
  .right_search {
    width: 140px;
    line-height: 0.9rem;
    text-align: center;
    height: 100%;
    border-radius: 0.5rem;
    background-color: #0066ed;
    color: #ffffff;
    font-weight: bold;
    margin-left: 20px;
  }
}
.sanjiao {
  width: 0.4rem;
  height: 0.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  img {
    width: 0.4rem;
    height: 0.4rem;
  }
}
.dialog {
  position: absolute;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  top: 7%;
  z-index: 9;
  transition: all 0.5s;
}
.dialog.open {
  top: 7%;
}
.shai {
  position: absolute;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  top: 0%;
  z-index: 10;
  transition: all 0.5s;
}
.shai.open {
  top: 4%;
}
.cards {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
}
.card_item {
  width: 48%;
  height: 1.5385rem;
  background: #f6f6f7;
  border-radius: .2rem;
  margin-top: 0.2rem;
  .tops_title{
    width: 100%;
    height: 40%;
    display: flex;
    align-items: flex-end;
    padding-left: .5rem;
  }
  .bottom_price {
    width: 100%;
    height: 60%;
    display: flex;
    align-items: center;
    padding-left: .5rem;
    span {
      font-weight: 600;
    }
  }
}
.shublue{
  background: #0263e2!important;
}
.xuanz{
  //旋转
  transform: rotate(180deg);
  transition: all 0.5s;
}
.red{
  color: #ff0000;
}
.green{
  color: #27ab63;
}
.mrt{
  margin-right: 0.35rem;
}
.codeIcon{
  width: 0.6rem;
  height: 0.6rem;
  background-color: #0263e2;
  color: #fff;
  border-radius: 0.05rem;
  margin-left: 0.1rem;
  //缩放
  transform: scale(0.8);
  display: flex;
  justify-content: center;
  align-items: center;
}
.listHeight{
  height: calc(100% - 1.2821rem - 1rem - 1.1538rem - 1.3333rem);
}
.listHeights{
  height: calc(100% - 1rem - 1.1538rem - 1.3333rem);
}
</style>