From 0d29d9a2bf0d893a67f1263bb9525131a50a2128 Mon Sep 17 00:00:00 2001
From: jhzh <1628036192@qq.com>
Date: Sat, 23 Mar 2024 11:12:55 +0800
Subject: [PATCH] 首次提交大宝wap

---
 src/components/foot.vue |   42 ++++++++++++++++++++++++++++--------------
 1 files changed, 28 insertions(+), 14 deletions(-)

diff --git a/src/components/foot.vue b/src/components/foot.vue
index ca0b10a..f98260f 100644
--- a/src/components/foot.vue
+++ b/src/components/foot.vue
@@ -1,7 +1,7 @@
 <template>
   <div class="footCss">
     <div :class="touch == 1 ? 'footDemos' : 'footDemo'" @click="goRouter('/home', 1)">
-      <div class="homeImgOut" v-show="$store.state.select == '/home'">
+      <!-- <div class="homeImgOut" v-show="$store.state.select == '/home'">
         <div class="homeImg">
           <img src="~@/assets/foot/ic_home_tab_def.png" />
         </div>
@@ -9,7 +9,13 @@
       <div v-show="$store.state.select != '/home'" class="footImgDeft">
         <img src="~@/assets/foot/tab_main_home_default.png" />
       </div>
-      <div v-show="$store.state.select != '/home'">{{ $t('hj224') }}</div>
+      <div v-show="$store.state.select != '/home'">{{ $t('hj224') }}</div> -->
+       <div class="footImgDeft">
+
+        <img v-show="$store.state.select == '/home'" src="~@/assets/foot/ic_home_tab_def.png" />
+        <img v-show="$store.state.select != '/home'" src="~@/assets/foot/tab_main_home_default.png" />
+      </div>
+      <div :class="$store.state.select == '/home' ? 'blueFont' : ''">{{ $t('hj224') }}</div>
     </div>
     <div :class="touch == 2 ? 'footDemos' : 'footDemo'" @click="goRouter('/trading-list', 2)">
       <div class="footImgDeft">
@@ -19,14 +25,22 @@
       </div>
       <div :class="$store.state.select == '/trading-list' ? 'blueFont' : ''">{{ $t('hj225') }}</div>
     </div>
-    <div :class="touch == 3 ? 'footDemos' : 'footDemo'" @click="goRouter('/warehouse', 3)">
+    <div :class="touch == 3 ? 'footDemos' : 'footDemo'" @click="goRouter('/favorites', 3)">
+      <div class="footImgDeft">
+
+        <img v-show="$store.state.select == '/favorites'" src="~@/assets/foot/ic_favorites_take.png" />
+        <img v-show="$store.state.select != '/favorites'" src="~@/assets/foot/ic_favorites_default.png" />
+      </div>
+      <div :class="$store.state.select == '/favorites' ? 'blueFont' : ''">{{ $t('hj282') }}</div>
+    </div>
+    <div :class="touch == 4 ? 'footDemos' : 'footDemo'" @click="goRouter('/warehouse', 3)">
       <div class="footImgDeft">
         <img v-show="$store.state.select == '/warehouse'" src="~@/assets/foot/positions_selected.png" />
         <img v-show="$store.state.select != '/warehouse'" src="~@/assets/foot/tab_main_positions_default.png" />
       </div>
       <div :class="$store.state.select == '/warehouse' ? 'blueFont' : ''">{{ $t('hj226') }}</div>
     </div>
-    <div :class="touch == 4 ? 'footDemos' : 'footDemo'" @click="goRouter('/user', 4)">
+    <div :class="touch == 5 ? 'footDemos' : 'footDemo'" @click="goRouter('/user', 4)">
       <div class="footImgDeft">
         <img v-show="$store.state.select == '/user'" src="~@/assets/foot/mine_selected.png" />
         <img v-show="$store.state.select != '/user'" src="~@/assets/foot/tab_main_mine_default.png" />
@@ -38,20 +52,20 @@
 
 <script>
 export default {
-  data() {
+  data () {
     return {
-      touch: 0,
+      touch: 0
     }
   },
-  mounted() {
+  mounted () {
 
   },
   methods: {
-    goRouter(url, index) {
-      if (index == 3 || index == 4) {
-        if (window.localStorage.getItem('USERTOKEN') == "" || window.localStorage.getItem('USERTOKEN') == null || window.localStorage.getItem('USERTOKEN') == undefined) {
+    goRouter (url, index) {
+      if (index === 2||index === 3 || index === 4 || index === 5) {
+        if (window.localStorage.getItem('USERTOKEN') === '' || window.localStorage.getItem('USERTOKEN') == null || window.localStorage.getItem('USERTOKEN') == undefined) {
           this.$emit('close')
-          return;
+          return
         }
       }
       this.touch = index
@@ -61,10 +75,10 @@
       this.$router.push(url)
       if (navigator.vibrate) {
         // 支持
-        navigator.vibrate([55]);
+        navigator.vibrate([55])
       }
     }
-  },
+  }
 
 }
 </script>
@@ -155,7 +169,7 @@
   width: 0.9rem;
   height: 0.9rem;
   border-radius: 100%;
-  background-color: rgb(25, 122, 246);
+  /* background-color: rgb(25, 122, 246); */
 }
 
 .homeImg {

--
Gitblit v1.9.3