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/home/home.vue | 79 +++++++++++++++++++++++++--------------
1 files changed, 50 insertions(+), 29 deletions(-)
diff --git a/src/page/home/home.vue b/src/page/home/home.vue
index 107cd4f..e73e0bd 100644
--- a/src/page/home/home.vue
+++ b/src/page/home/home.vue
@@ -9,14 +9,22 @@
</div>
<div class="right_search">
<div>
- <div class="search_con" @click="handleSearchClick()">
- <img :src="Searchs" alt />
- </div>
<div class="service_con" @click="goOnline()">
<img :src="Service" 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>
<div class="center_tabs">
<!-- 顶部轮播图 -->
@@ -127,14 +135,15 @@
<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))"
+ <!-- <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>
<div class="numbers" :class="item2.floatPoint > 0 ? 'gree' : 'redd'">
- <span class="point">{{ item2.pnum
+ <img :src="Huo" alt style="width: 0.4rem;height: 0.4rem;" />
+ <span class="point" style="height: 0.4rem;">{{ item2.pnum
}}</span>
</div>
<div class="percentage">
@@ -159,7 +168,7 @@
<span class="tab-name">{{ $t('hj6') }}</span>
</mt-tab-item>
<mt-tab-item id="tab_1">
- <span class="tab-name">{{ $t('hj67') }}</span>
+ <span class="tab-name">{{ $t('hj7') }}</span>
</mt-tab-item>
<mt-tab-item id="tab_2">
<span class="tab-name">7×24</span>
@@ -221,7 +230,7 @@
import Echart from "./components/echart.vue";
import * as api from "@/axios/api";
import Logo from "@/assets/img/icon_home_logo.png";
-import Searchs from "@/assets/home/search.png";
+import Searchs from "@/assets/ico/leng.png";
import Service from "@/assets/home/icon_talk.png";
import clear from "@/assets/home/close.png";
import Announcement from "@/assets/img/black_laba.png";
@@ -265,7 +274,25 @@
img: banner3
}],
announcementMess: "20202/10 - 交易时间安排",
- navsArr: [{
+
+ artList: [],
+ news: "tab_0",
+ newsContent1: [],
+ newsContent2: [],
+ newsContent3: [],
+ newsContent4: [],
+ onlineService: "",
+ isGoTo: false,
+ bannerList: [],
+ userInfo: [],
+ showPopover: false,
+ actions: [{ text: 'English', icon: require('@/assets/ico/english.png'), lang: 'en' },
+ { text: '简体中文', icon: require('@/assets/ico/Chinese.png') , lang: 'zh-CN'}],
+ };
+ },
+ computed:{
+ navsArr(){
+ return [{
img: Tops,
title: this.$t('hj1'),
},
@@ -280,20 +307,14 @@
{
img: Guanyu,
title: this.$t('hj4'),
- }],
- artList: [],
- news: "tab_0",
- newsContent1: [],
- newsContent2: [],
- newsContent3: [],
- newsContent4: [],
- onlineService: "",
- isGoTo: false,
- bannerList: [],
- userInfo: [],
- };
+ }]
+ }
},
methods: {
+ onSelect(e){
+ this.$i18n.locale = e.lang;
+ window.localStorage.setItem('language', e.lang);
+ },
async getUserInfo() {
// 获取用户信息
let data = await api.getUserInfo();
@@ -380,8 +401,7 @@
}
},
goOnline() {
- window.location.href = this.onlineService;
-
+ this.$router.push('/service');
},
async getArtList() {
let data = await api.getArtList();
@@ -525,7 +545,7 @@
width: 100%;
height: 0.7949rem;
display: flex;
-
+ padding-right: 0.3rem;
>div {
width: 50%;
height: 100%;
@@ -546,17 +566,17 @@
.right_search {
justify-content: flex-end;
-
+ width: 50%;
>div {
- width: 1.6221rem;
+ width: 34%;
height: 0.4615rem;
display: flex;
justify-content: space-between;
- margin-right: 0.4615rem;
+
>div {
- width: 0.4615rem;
- height: 0.4615rem;
+ width: 0.5615rem;
+ height: 0.5615rem;
>img {
width: 100%;
@@ -1059,4 +1079,5 @@
}
}
+
</style>
--
Gitblit v1.9.3