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 | 70 ++++++++++++++++++++++------------
1 files changed, 45 insertions(+), 25 deletions(-)
diff --git a/src/page/home/home.vue b/src/page/home/home.vue
index 66896d7..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">
<!-- 顶部轮播图 -->
@@ -222,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";
@@ -266,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'),
},
@@ -281,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();
@@ -381,8 +401,7 @@
}
},
goOnline() {
- window.location.href = this.onlineService;
-
+ this.$router.push('/service');
},
async getArtList() {
let data = await api.getArtList();
@@ -526,7 +545,7 @@
width: 100%;
height: 0.7949rem;
display: flex;
-
+ padding-right: 0.3rem;
>div {
width: 50%;
height: 100%;
@@ -547,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%;
@@ -1060,4 +1079,5 @@
}
}
+
</style>
--
Gitblit v1.9.3