1
李凌
2025-10-18 fab9d57071a7cc1dc1dcce0c9ee4640d20727251
1
1 files modified
6 files added
64 ■■■■■ changed files
8-20_app_1.rar patch | view | raw | blame | history
src/assets/imgs/home/lbt_1.png patch | view | raw | blame | history
src/assets/imgs/home/lbt_2.png patch | view | raw | blame | history
src/assets/imgs/home/lbt_3.png patch | view | raw | blame | history
src/assets/imgs/home/lbt_4.png patch | view | raw | blame | history
src/assets/imgs/home/lbt_5.png patch | view | raw | blame | history
src/views/homePage/index.vue 64 ●●●●● patch | view | raw | blame | history
8-20_app_1.rar
Binary files differ
src/assets/imgs/home/lbt_1.png
src/assets/imgs/home/lbt_2.png
src/assets/imgs/home/lbt_3.png
src/assets/imgs/home/lbt_4.png
src/assets/imgs/home/lbt_5.png
src/views/homePage/index.vue
@@ -52,6 +52,7 @@
          {{ $t("总资产") }}(USD)
        </div>
      </div>
      <div class="flex-centerY flex-position-between" style="margin-top: 15px">
        <div class="flex flex-justify-between">
          <div style="font-size: 33px;font-weight: bold;color: black">
@@ -67,10 +68,12 @@
        <div>
          {{ $t("今日盈亏") }}
        </div>
        <div style="margin-left: 15px">
        <div style="margin-left: 15px"
          :style="todayMoney.money_contract_profit_today > 0 ? 'color: #0f0' : todayMoney.money_contract_profit_today < 0 ? 'color: #f00' : ''">
          {{ showMoney ? todayMoney.money_contract_profit_today : "****" }}
        </div>
        <div style="margin-left: 15px">
        <div style="margin-left: 15px"
          :style="todayMoney.money_contract_profit_today > 0 ? 'color: #0f0' : todayMoney.money_contract_profit_today < 0 ? 'color: #f00' : ''">
          {{ showMoney ? (Number(todayMoney.money_contract_profit_today + '') / (todayMoney.money_contract == 0 ? 1 :
            todayMoney.money_contract) * 100).toFixed(2) + '%' : "****" }}
        </div>
@@ -90,19 +93,11 @@
        :show-indicators="false" style="border-radius: 8px;overflow: hidden">
        <van-swipe-item v-for="item in announceList" style="border-radius: 8px;overflow: hidden;border: #eee 1px solid"
          :key="item.id" @click="toAnnounceDetail(item.uuid)">
          <!--            <div class="flex justify-start items-center">-->
          <!--              <img :src="item.imgUrl" style="width:100%" alt="" class="notice_img mr-5">-->
          <!--&lt;!&ndash;              <div class="notice_content textColor">&ndash;&gt;-->
          <!--&lt;!&ndash;                <div>{{ item.startTime }}</div>&ndash;&gt;-->
          <!--&lt;!&ndash;                <div>{{ item.title }}</div>&ndash;&gt;-->
          <!--&lt;!&ndash;              </div>&ndash;&gt;-->
          <!--            </div>-->
          <img :src="item.imgUrl" alt="" class="notice_img mr-5" style="width:100%;height:100px;border-radius: 8px">
        </van-swipe-item>
      </van-swipe>
      <!--      </van-notice-bar>-->
      <div class="flex-center" style="position:absolute;bottom:5px;left:0;;z-index:999;width: 100%">
        <div v-for="(i, index) in announceList">
        <div v-for="(i, index) in announceList" :key="index">
          <div v-if="current != index" style="width:3px;height:3px;background:#bbb;margin-right:5px;border-radius: 3px">
          </div>
          <div v-else style="width:3px;height:3px;background:#333;;margin-right:5px;border-radius: 3px"></div>
@@ -205,7 +200,7 @@
<script setup>
import Head from './components/head.vue'
import { useI18n } from "vue-i18n";
import { ref, computed, onBeforeUnmount } from 'vue';
import { ref, computed, onBeforeUnmount, onMounted } from 'vue';
import { useRouter } from 'vue-router';
import ListQuatation from "@/components/Transform/list-quotation/index.vue";
import { _getHomeList } from '@/service/cryptos.api'
@@ -227,16 +222,30 @@
const showMoney = ref(true)
const myAssets = ref({})
const myAssetsz = ref({})
_getassets().then(res => {
  myAssets.value = res
})
const todayMoney = ref({
  money_contract_profit_today: 0
})
_getContractBySymbolType().then(data => {
  todayMoney.value = data
})
// 获取资产信息
function getAllAssets() {
  _getContractBySymbolType().then(data => {
    todayMoney.value = data
  })
  _getassets().then(res => {
    myAssets.value = res
  })
}
// 轮询获取资产信息
let times1 = null;
getAllAssets();
times1 = setInterval(() => {
  getAllAssets();
}, 4000)
// 停止获取资产计数器
function timeOut1() {
  clearInterval(times1)
}
const tabbers = [
  // { key: 1, name: t('跟单'), icon: new URL('@/assets/imgs/home/home_1.png', import.meta.url) },
@@ -319,15 +328,20 @@
]
// 获取公告数据
const announceList = ref([])
_getNewsList1({
  language: useI18n().locale.value,
}).then(res => {
  announceList.value = res
})
const announceList = ref([
  { imgUrl: new URL('@/assets/imgs/home/lbt_1.png', import.meta.url), id: 1, title: '公告标题1', content: '公告内容1', time: '2022-01-01' },
  { imgUrl: new URL('@/assets/imgs/home/lbt_2.png', import.meta.url), id: 2, title: '公告标题2', content: '公告内容2', time: '2022-01-01' },
  { imgUrl: new URL('@/assets/imgs/home/lbt_3.png', import.meta.url), id: 3, title: '公告标题3', content: '公告内容3', time: '2022-01-01' },
  { imgUrl: new URL('@/assets/imgs/home/lbt_4.png', import.meta.url), id: 4, title: '公告标题4', content: '公告内容4', time: '2022-01-01' },
  { imgUrl: new URL('@/assets/imgs/home/lbt_5.png', import.meta.url), id: 5, title: '公告标题5', content: '公告内容5', time: '2022-01-01' },
])
// _getNewsList1().then(res => {
//   announceList.value = res
// })
// 跳转公告详情
const toAnnounceDetail = (announceId) => {
  return
  if (announceId) {
    router.push({ path: '/cryptos/AnnounceDetail', query: { id: announceId } })
  }
@@ -386,12 +400,14 @@
fetchQList()
onBeforeUnmount(() => {
  timeOut1()
  if (timeout.value) {
    clearTimeout(timeout.value)
  }
})
//#endregion----------------------------------------------
</script>
<style lang="scss">