From d8f6c671a613b841566c8d7b1f36eb2bb9640ea9 Mon Sep 17 00:00:00 2001
From: DESKTOP-CVS3R96\我恁爹 <11>
Date: Tue, 15 Nov 2022 04:15:27 +0800
Subject: [PATCH] 多于元

---
 src/page/home/home.vue |  126 +++++++++++++++++++++--------------------
 1 files changed, 64 insertions(+), 62 deletions(-)

diff --git a/src/page/home/home.vue b/src/page/home/home.vue
index 70d22f2..107cd4f 100644
--- a/src/page/home/home.vue
+++ b/src/page/home/home.vue
@@ -30,16 +30,16 @@
         </div>
         <!-- 公告 -->
         <van-skeleton title :row="1" :loading="loading" />
-        <div class="announcement" v-if="!loading&&close">
+        <div class="announcement" v-if="!loading && close">
           <div class="an_content" @click="$router.push('/newGg')">
             <div class="an_left_icon">
               <img :src="Announcement" alt />
             </div>
-            <div class="an_right_message " >
+            <div class="an_right_message ">
               <div class="animate">
                 {{ artList.artTitle }}
               </div>
-              
+
             </div>
           </div>
         </div>
@@ -47,10 +47,10 @@
         <!-- 排行入门 -->
         <van-skeleton title :row="2" :loading="loading" />
 
-        <div class="navs" v-if="!loading&&close">
+        <div class="navs" v-if="!loading && close">
 
           <div class="navs_content">
-            <div class="chacha" @click="close=false">
+            <div class="chacha" @click="close = false">
               <div>
                 <img :src="clear" />
               </div>
@@ -74,7 +74,7 @@
         <div class="focus_on" v-if="!loading">
           <div class="fo_content">
             <div class="top_title">
-              {{ '最多关注' }}
+              {{ $t('hj5') }}
             </div>
             <div class="fo_banner">
               <van-swipe class="fo_my-swipe" :autoplay="0" indicator-color="white" @change="onChange">
@@ -109,7 +109,8 @@
                   </div>
                 </van-swipe-item> -->
                 <van-swipe-item v-for="(item, index)  in proData" :key="index">
-                  <div class="item_cont" :class="idx!=2?'item_conts':''" v-for="(item2, idx) in proData[currentIndex]" :key="idx" @click="goDetail(item2)">
+                  <div class="item_cont" :class="idx != 2 ? 'item_conts' : ''"
+                    v-for="(item2, idx) in proData[currentIndex]" :key="idx" @click="goDetail(item2)">
                     <div class="top_fo">
                       <div class="title">
                         {{ item2.name }}
@@ -126,10 +127,11 @@
                     <div class="bottom_fo">
                       <div class="title">
                         <span class="numberid" style="margin-right: 0.12rem;">{{ item2.symbol }}</span>
-                        <div v-for="(items,indexs) in Number(item2.pnum.slice(0, 1))" style="width: 0.4rem;height: 0.4rem;display: flex;">
-                          <img v-if="indexs<3" :src="Huo" alt style="width: 0.4rem;height: 0.4rem;" />
+                        <div v-for="(items, indexs) in Number(item2.pnum.slice(0, 1))"
+                          style="width: 0.4rem;height: 0.4rem;display: flex;">
+                          <img v-if="indexs < 3" :src="Huo" alt style="width: 0.4rem;height: 0.4rem;" />
                         </div>
-                        
+
                       </div>
                       <div class="numbers" :class="item2.floatPoint > 0 ? 'gree' : 'redd'">
                         <span class="point">{{ item2.pnum
@@ -154,10 +156,10 @@
       <div class="news-tab">
         <mt-navbar v-model="news">
           <mt-tab-item id="tab_0">
-            <span class="tab-name">新闻</span>
+            <span class="tab-name">{{ $t('hj6') }}</span>
           </mt-tab-item>
           <mt-tab-item id="tab_1">
-            <span class="tab-name">经济</span>
+            <span class="tab-name">{{ $t('hj67') }}</span>
           </mt-tab-item>
           <mt-tab-item id="tab_2">
             <span class="tab-name">7×24</span>
@@ -182,13 +184,13 @@
               </div>
             </div>
           </mt-tab-container-item>
-          <mt-tab-container-item id="tab_1" >
+          <mt-tab-container-item id="tab_1">
             <div class="news-content">
               <div class="item-out" v-for="(item, inde) in newsContent4" :key="inde" @click="$router.push({
                 path: '/newPage', query: {
                   listid: item.id
                 }
-              })" >
+              })">
                 <div class="item-times">{{ item.addTime | gettime }}</div>
                 <div class="titContent" style="-webkit-box-orient: vertical;">{{ item.title }}</div>
               </div>
@@ -252,7 +254,7 @@
       Huo,
       is_login: false,
       loading: true,
-      close:true,
+      close: true,
       proData: [], // 分割好的数据
       currentIndex: 0,
       bannerImgsArr: [{
@@ -265,22 +267,21 @@
       announcementMess: "20202/10 - 交易时间安排",
       navsArr: [{
         img: Tops,
-        title: "行情"
+        title: this.$t('hj1'),
       },
       {
         img: Rumen,
-        title: "持仓"
+        title: this.$t('hj2'),
       },
       {
         img: Xuexi,
-        title: "新股"
+        title: this.$t('hj3'),
       },
       {
         img: Guanyu,
-        title: "我的"
-      }
-      ],
-      artList:[],
+        title: this.$t('hj4'),
+      }],
+      artList: [],
       news: "tab_0",
       newsContent1: [],
       newsContent2: [],
@@ -288,12 +289,11 @@
       newsContent4: [],
       onlineService: "",
       isGoTo: false,
-      bannerList:[],
+      bannerList: [],
       userInfo: [],
     };
   },
   methods: {
-    
     async getUserInfo() {
       // 获取用户信息
       let data = await api.getUserInfo();
@@ -320,8 +320,8 @@
       }
     },
     goDetail(item) {
-      if(this.userInfo.length==0){
-        this.$store.commit('dialogVisible',true);
+      if (this.userInfo.length == 0) {
+        this.$store.commit('dialogVisible', true);
         return;
       }
       this.$router.push({
@@ -343,49 +343,49 @@
         return 0;
       }
     },
-    goJy(index){
-      if(this.userInfo.length==0){
-        this.$store.commit('dialogVisible',true);
+    goJy(index) {
+      if (this.userInfo.length == 0) {
+        this.$store.commit('dialogVisible', true);
         return;
       }
       switch (index) {
         case 0:
           this.$router.push('/trading-list');
           break;
-          case 1:
+        case 1:
           this.$router.push('/warehouse');
           break;
-          case 2:
-          this.$router.push({path:'/trading-list',query:{listid:3}});
+        case 2:
+          this.$router.push({ path: '/trading-list', query: { listid: 3 } });
           break;
-          case 3:
+        case 3:
           this.$router.push('/user');
           break;
-      
+
         default:
           break;
       }
       if (navigator.vibrate) {
-          // 支持
+        // 支持
         navigator.vibrate([55]);
       }
     },
-    async getBanner () {
+    async getBanner() {
       // 获取显示的banner
       let result = await api.getBannerByPlat({ platType: 'm' })
       if (result.status === 0) {
         this.bannerList = result.data
       } else {
-        this.$store.commit('elAlertShow',{'elAlertShow':true,'elAlertText': result.msg});
+        this.$store.commit('elAlertShow', { 'elAlertShow': true, 'elAlertText': result.msg });
       }
     },
     goOnline() {
       window.location.href = this.onlineService;
 
     },
-    async getArtList(){
+    async getArtList() {
       let data = await api.getArtList();
-      if(data.status == 0){
+      if (data.status == 0) {
         this.artList = data.data.list[0];
       }
     },
@@ -395,7 +395,7 @@
       if (data.status === 0) {
         this.onlineService = data.data.onlineService
       } else {
-        this.$store.commit('elAlertShow',{'elAlertShow':true,'elAlertText': data.msg});
+        this.$store.commit('elAlertShow', { 'elAlertShow': true, 'elAlertText': data.msg });
       }
     },
     async getStock() {
@@ -444,7 +444,7 @@
     },
     handleSearchClick() {
       //this.loading = !this.loading;
-      this.$router.push({path:"/trading-list",query:{type:1}});
+      this.$router.push({ path: "/trading-list", query: { type: 1 } });
     }
   },
   filters: {
@@ -491,11 +491,11 @@
     this.getArtList();
     this.getBanner()
 
-    
+
     setInterval(() => {
-      if(window.localStorage.getItem('USERTOKEN')){
+      if (window.localStorage.getItem('USERTOKEN')) {
         this.isGoTo = false;
-      }else{
+      } else {
         this.isGoTo = !this.isGoTo
       }
     }, 10000);
@@ -626,7 +626,7 @@
         align-content: center;
         font-size: 0.29rem;
         white-space: nowrap;
-         overflow: hidden;
+        overflow: hidden;
         // text-overflow:ellipsis;
       }
     }
@@ -753,7 +753,7 @@
     /deep/.van-swipe__indicator--active {
       width: 0.35rem !important;
       border-radius: 0.23rem;
-      background-color:  #aec7ec!important;
+      background-color: #aec7ec !important;
     }
 
     .fo_banner {
@@ -810,7 +810,7 @@
       .numberid {
         font-size: 0.28rem;
         display: flex;
-        
+
         line-height: 0.5rem;
       }
 
@@ -836,7 +836,8 @@
         text-align: center;
         justify-content: center;
       }
-      .percentage span{
+
+      .percentage span {
         height: 0.5rem;
         line-height: 0.5rem;
       }
@@ -998,19 +999,20 @@
   border: 0.0513rem solid #41AC75;
   color: #41AC75;
 }
+
 .animate {
 
-padding-left: 20px;
+  padding-left: 20px;
 
-font-size: 0.29rem;
+  font-size: 0.29rem;
 
-color: #000;
+  color: #000;
 
-display: inline-block;
+  display: inline-block;
 
-white-space: nowrap;
+  white-space: nowrap;
 
-animation: 10s wordsLoop linear infinite normal;
+  animation: 10s wordsLoop linear infinite normal;
 
 }
 
@@ -1018,21 +1020,21 @@
 
 @keyframes wordsLoop {
 
-0% {
+  0% {
 
     transform: translateX(100%);
 
     -webkit-transform: translateX(100%);
 
-}
+  }
 
-100% {
+  100% {
 
     transform: translateX(-100%);
 
     -webkit-transform: translateX(-100%);
 
-}
+  }
 
 }
 
@@ -1040,21 +1042,21 @@
 
 @-webkit-keyframes wordsLoop {
 
-0% {
+  0% {
 
     transform: translateX(100%);
 
     -webkit-transform: translateX(100%);
 
-}
+  }
 
-100% {
+  100% {
 
     transform: translateX(-100%);
 
     -webkit-transform: translateX(-100%);
 
-}
+  }
 
 }
 </style>

--
Gitblit v1.9.3