| | |
| | | <template> |
| | | <div class="markets"> |
| | | <tab-head :title="$t('hj62')"></tab-head> |
| | | |
| | | <div class="tui-search"> |
| | | <van-field |
| | | v-model="keyValue" |
| | | :placeholder="$t('hj37')" |
| | | right-icon="search" |
| | | @click-right-icon="search" |
| | | /> |
| | | </div> |
| | | <tab-head :title="$t('hj224')"></tab-head> |
| | | |
| | | <div class="tui-tabs flex-start"> |
| | | <div class="tab_item flex-center"> |
| | |
| | | </div> |
| | | |
| | | <div class="flex-between navs"> |
| | | <div class="nav_item" v-for="item in usDataStockBeans" :key="item.id"> |
| | | <div class="nav_item" v-for="item in sList" :key="item.id"> |
| | | <index-component :ids="'a' + item.id" :dataObj="item"></index-component> |
| | | </div> |
| | | </div> |
| | |
| | | </div> |
| | | </div> |
| | | |
| | | <stock-list :propOption="propOption" ref="stockList"></stock-list> |
| | | <new-list></new-list> |
| | | |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import newList from "@/page/home/newList.vue"; |
| | | import indexComponent from "@/components/index-component.vue"; |
| | | import tabHead from "@/components/tabHead.vue"; |
| | | import stockList from "@/components/stock-list.vue"; |
| | | import * as api from "@/axios/api"; |
| | | export default { |
| | | name: "markets", |
| | |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | kData: {}, |
| | | keyValue: "", // 搜索 |
| | | tabs: [ |
| | | { |
| | | name: this.$t("订单"), |
| | |
| | | img: require("@/assets/img/market_3.png") |
| | | } |
| | | ], |
| | | usDataStockBeans: [] |
| | | sList: [] |
| | | }; |
| | | }, |
| | | components: { |
| | | tabHead, |
| | | stockList |
| | | indexComponent, |
| | | newList |
| | | }, |
| | | watch: {}, |
| | | computed: { |
| | | // 传递给列表组件的类型值 |
| | | propOption() { |
| | | return { stockType: "US", keyWords: this.keyValue }; |
| | | } |
| | | created() { |
| | | this.getZs(); |
| | | }, |
| | | async created() {}, |
| | | mounted() {}, |
| | | methods: { |
| | | // 搜索 |
| | | search() { |
| | | this.$refs.stockList.init(); |
| | | // 获取三张指数图 |
| | | async getZs() { |
| | | let data = await api.getIndexData(); |
| | | if (data.status == 0) { |
| | | this.sList = data.data; |
| | | } |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style lang="less" scoped> |
| | | /deep/ .van-cell { |
| | | background-color: rgba(#000, 0); |
| | | border: rgba(#fff, 0.5) 2px solid; |
| | | border-radius: 5em; |
| | | } |
| | | /deep/ .van-icon { |
| | | font-size: 1.6em; |
| | | } |
| | | .markets { |
| | | font-size: 10vw; |
| | | width: 100vw; |
| | | min-height: 100vh; |
| | | padding-bottom: 1.5rem; |
| | | .navs { |
| | | padding: 0 0.25em 0 0.25em; |
| | | padding: 0.25em 0.25em 0 0.25em; |
| | | |
| | | .nav_item { |
| | | width: 2.833em; |
| | |
| | | font-size: 0.4em; |
| | | } |
| | | } |
| | | } |
| | | .tui-search { |
| | | padding: 0.225em; |
| | | } |
| | | } |
| | | </style> |