1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
<template>
  <div class="header_history">
    <div class="header_content">
      <div class="left_back" @click="$router.push('/home')">
        <img src="../../../assets/img/back.png" alt="" />
      </div>
      <div class="right_mess">
        <span>{{ mess }}</span>
      </div>
      <div class="right_back">
        <div></div>
        <!--   <div class="service">
                    <img @click="goOnline()" :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>
</template>
 
<script>
import Service from "@/assets/home/icon_talk.png";
import * as api from "@/axios/api";
export default {
  name: "headers",
  props: ["mess"],
  data() {
    return {
      Service,
      onlineService: "",
      showPopover: false,
      actions: [
        {
          text: "English",
          icon: require("@/assets/ico/english.png"),
          lang: "zh-CN",
        },
        { text: "हिंदी", icon: require("@/assets/ico/india.png"), lang: "en" },
        // { text: '繁体中文', icon: require('@/assets/ico/tw.png'), lang: 'tw' }
      ],
    };
  },
  methods: {
    onSelect(e) {
      this.$i18n.locale = e.lang;
      window.localStorage.setItem("language", e.lang);
    },
    goOnline() {
      this.$router.push("/service");
    },
    async getInfoSite() {
      let data = await api.getInfoSite();
      if (data.status === 0) {
        this.onlineService = data.data.onlineService;
      } else {
        Toast(data.msg);
      }
    },
  },
  mounted() {
    this.getInfoSite();
  },
};
</script>
 
<style scope lang="less">
.header_history {
  width: 100%;
  height: 1.6256rem;
  display: flex;
  align-items: center;
  padding-right: 0.25rem;
  > div {
    width: 100%;
    height: 80%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-left: 0.2rem;
    padding-right: 0.2rem;
  }
 
  .left_back {
    width: 0.6513rem;
    height: 1.0513rem;
    display: flex;
    align-items: center;
    justify-content: center;
  }
 
  .right_back {
    width: 17%;
    height: 1.0513rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
 
    .service {
      width: 0.5rem;
      height: 0.5rem;
 
      img {
        width: 0.5rem;
        height: 0.5rem;
      }
    }
  }
 
  .right_mess {
    width: 40%;
    height: 100%;
    display: flex;
    justify-content: flex-end;
    align-items: center;
 
    > span {
      margin-right: 1.3rem;
    }
  }
 
  img {
    width: 50%;
    height: 50%;
  }
}
</style>