| | |
| | | </div> |
| | | </div> |
| | | <!-- tab --> |
| | | |
| | | <GoToLogin v-show="isGoTo" /> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import AllList from "@/page/list/list-all"; |
| | | import HomeList from "./components/home-list"; |
| | | import Echart from "./components/echart.vue"; |
| | |
| | | import banner3 from "@/assets/img/b3.png"; |
| | | // import indexData from "./data.json"; |
| | | import GoToLogin from '@/page/home/components/GoLogin.vue'; |
| | | |
| | | export default { |
| | | components: { |
| | | HomeList, |
| | | AllList, |
| | | GoToLogin, |
| | | Echart |
| | | Echart, |
| | | }, |
| | | props: {}, |
| | | data() { |
| | |
| | | newsContent4: [], |
| | | onlineService: "", |
| | | isGoTo: false, |
| | | bannerList:[] |
| | | bannerList:[], |
| | | userInfo: [], |
| | | }; |
| | | }, |
| | | methods: { |
| | | |
| | | |
| | | async getUserInfo() { |
| | | // 获取用户信息 |
| | | let data = await api.getUserInfo(); |
| | | if (data.status === 0) { |
| | | // 判断是否登录 |
| | | this.$store.state.userInfo = data.data; |
| | | this.userInfo = data.data; |
| | | } else { |
| | | } |
| | | }, |
| | | getHuo() { |
| | | //123随机 |
| | | var num = Math.floor(Math.random() * 3 + 1); |
| | |
| | | } |
| | | }, |
| | | goDetail(item) { |
| | | if(this.userInfo.length==0){ |
| | | this.$store.commit('dialogVisible',true); |
| | | return; |
| | | } |
| | | this.$router.push({ |
| | | path: "/kline", |
| | | query: { |
| | |
| | | } |
| | | }, |
| | | goJy(index){ |
| | | if(this.userInfo.length==0){ |
| | | this.$store.commit('dialogVisible',true); |
| | | return; |
| | | } |
| | | switch (index) { |
| | | case 0: |
| | | this.$router.push('/trading-list'); |
| | |
| | | |
| | | default: |
| | | break; |
| | | } |
| | | if (navigator.vibrate) { |
| | | // 支持 |
| | | navigator.vibrate([55]); |
| | | } |
| | | }, |
| | | async getBanner () { |
| | |
| | | this.ProcessData(); |
| | | }, |
| | | mounted() { |
| | | this.getUserInfo(); |
| | | this.getInfoSite(); |
| | | this.getNewsList(1); |
| | | this.getNewsList(2); |