| | |
| | | <template> |
| | | <div class="tab_head"> |
| | | <div class="head_left"> |
| | | <div class="icon" @click="searchShow = true" v-if="leftShow"> |
| | | <div class="head_left flex-center"> |
| | | <div class="icon" @click="searchShow = true" v-if="leftShow" style="margin-right:.2666rem;"> |
| | | <van-icon name="search" size=".5em" /> |
| | | </div> |
| | | <slot name="left"></slot> |
| | |
| | | @load="onLoad" |
| | | v-if="(lists && lists.length > 0) || !finished" |
| | | > |
| | | <van-cell v-for="item in lists" :key="item.id"> |
| | | <van-cell v-for="item in lists" :key="item.id" @click="toDetails(item)"> |
| | | <div class="search_item"> |
| | | <div class="search_item_left"> |
| | | <div class="search_item_left_name">{{ item.name }}</div> |
| | |
| | | <script> |
| | | import * as api from "@/axios/api"; |
| | | import handleDt from "@/utils/deTh"; |
| | | import { Toast } from "vant"; |
| | | export default { |
| | | name: "tabHead", |
| | | data() { |
| | |
| | | this.getInfoSite(); |
| | | }, |
| | | methods: { |
| | | // 跳转客服页面 |
| | | aRouter1() { |
| | | // 跳转客服页面 |
| | | window.open(this.onlineService); |
| | | // window.open(this.onlineService); |
| | | Toast(this.$t("kf1")); |
| | | }, |
| | | // 获取客服地址 |
| | | async getInfoSite() { |
| | | // 获取客服地址 |
| | | let data = await api.getInfoSite(); |
| | | if (data.status === 0) { |
| | | this.onlineService = data.data.onlineService; |
| | |
| | | // 提交搜索 |
| | | this.init(); |
| | | this.onLoad(); |
| | | }, |
| | | // 点击进入详情 |
| | | toDetails(item) { |
| | | const obj = { |
| | | pid: item.code || "", |
| | | type: item.stock_type || "" |
| | | }; |
| | | window.localStorage.setItem("kLine", JSON.stringify(obj)); |
| | | |
| | | this.$router.push({ |
| | | path: "/kline", |
| | | query: { |
| | | code: item.code, |
| | | type: item.stock_type |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | }; |