From c523ce0e8f371ed6c5a503eaa0a938b202daf8c2 Mon Sep 17 00:00:00 2001
From: DESKTOP-CVS3R96\我恁爹 <11>
Date: Tue, 15 Nov 2022 10:09:46 +0800
Subject: [PATCH] 吃屁护

---
 src/page/wallet/index.vue |   38 +++++++++++++++++++++++++-------------
 1 files changed, 25 insertions(+), 13 deletions(-)

diff --git a/src/page/wallet/index.vue b/src/page/wallet/index.vue
index 895ba97..5044c9e 100644
--- a/src/page/wallet/index.vue
+++ b/src/page/wallet/index.vue
@@ -6,12 +6,16 @@
           <img src="@/assets/img/zuojiantou.png" alt />
         </div>
         <div class="right_icon">
-          <div @click="goToTopUp()">
-            <img src="@/assets/img/qiandai.png" alt />
-          </div>
           <div @click="goOnline()">
             <img src="@/assets/img/kefu.png" alt />
           </div>
+          <van-popover v-model="showPopover" trigger="click" placement="bottom-end" :actions="actions"
+              @select="onSelect">
+              <template #reference>
+                <div class="iconfont icon-icon_A">
+                </div>
+              </template>
+            </van-popover>
         </div>
       </div>
       <div class="tabs">
@@ -27,18 +31,18 @@
         <div class="num_price">
           <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.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.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>
+            class="account">¥ {{ $store.state.hide ? '****' : Number($store.state.userInfo.userAmt).toFixed(2) }}</p>
         </div>
         <div class="yk es">
           <div>
@@ -217,6 +221,9 @@
       withdrawalValue: 0,
       settingInfo: {},
       onlineService: "",
+      showPopover: false,
+      actions: [{ text: 'English', icon: require('@/assets/ico/english.png'), lang: 'en' },
+      { text: '简体中文', icon: require('@/assets/ico/Chinese.png') , lang: 'zh-CN'}],
     };
   },
   computed: {
@@ -229,12 +236,16 @@
     this.getInfoSite();
   },
   methods: {
+    onSelect(e){
+      this.$i18n.locale = e.lang;
+      window.localStorage.setItem('language', e.lang);
+    },
     goOnline() {
       if (navigator.vibrate) {
         // 支持
         navigator.vibrate([55]);
       }
-      window.location.href = this.onlineService;
+      this.$router.push('/service');
     },
     async getInfoSite() {
       let data = await api.getInfoSite()
@@ -440,20 +451,21 @@
       }
 
       .right_icon {
-        width: 25%;
-        height: 50%;
+        width: 18%;
+        height: 35%;
+        padding-right: 0.1rem;
         display: flex;
-
+        justify-content: space-between;
         >div {
-          width: 50%;
+          width: auto;
           height: 100%;
           display: flex;
           justify-content: center;
           align-items: center;
 
           img {
-            width: 0.6rem;
-            height: 0.6rem;
+            width: 0.55rem;
+            height: 0.55rem;
           }
         }
       }

--
Gitblit v1.9.3