42e15d983125e27b23027e3c632e746320cbce1c.svn-base 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. <template>
  2. <div :class="noroll?'noroll':''">
  3. <!-- 加载组件 -->
  4. <div class = "lod">
  5. <Loading></Loading>
  6. </div>
  7. <!-- 头部组件 -->
  8. <SportsHead></SportsHead>
  9. <!-- 首页球类组件 -->
  10. <ScrollNav></ScrollNav>
  11. <!-- 首页滚球盘组件 -->
  12. <BallDisc></BallDisc>
  13. <!-- 特色赛事组件 -->
  14. <Characteristic></Characteristic>
  15. <!-- 体育组件 -->
  16. <StSports></StSports>
  17. <!-- 尾部组件 -->
  18. <LinkFooter></LinkFooter>
  19. </div>
  20. </template>
  21. <script>
  22. import '@/css/index.css';
  23. import BallDisc from '@/components/StBallDisc';
  24. import ScrollNav from '@/components/StScrollNav';
  25. import SportsHead from '@/components/StSportsHead';
  26. import LinkFooter from '@/components/StLinkFooter';
  27. import Characteristic from'@/components/StCharacteristic';
  28. import Loading from '@/components/StLoading';
  29. import StSports from'@/components/StSports';
  30. export default {
  31. name:'Home',
  32. components:{
  33. SportsHead,
  34. ScrollNav,
  35. BallDisc,
  36. LinkFooter,
  37. Characteristic,
  38. StSports,
  39. Loading,
  40. },
  41. data(){
  42. return{
  43. data:'',
  44. noroll:false,
  45. }
  46. },
  47. methods:{
  48. //获取玩法别名
  49. getAjaxanme:function(){
  50. this.$http.get(this.$ports.gambling.getOddsCode, {
  51. type:'p_code'
  52. }).then(res => {
  53. this.$store.dispatch("SET_PLAYALIAS",res.data.data );
  54. // console.log(res.data.data);
  55. })
  56. },
  57. },
  58. computed:{
  59. noRoll(){
  60. return this.$store.getters.getNoRoll
  61. }
  62. },
  63. watch:{
  64. noRoll(val){
  65. this.noroll=val
  66. }
  67. },
  68. mounted(){
  69. // 导航初始化
  70. this.$store.dispatch("GETACTIVITY", "home");
  71. this.getAjaxanme();
  72. }
  73. }
  74. </script>
  75. <style scoped>
  76. .noroll{
  77. position: fixed;
  78. width: 100%;
  79. top: 0;
  80. left: 0;
  81. }
  82. .lod{
  83. z-index: 999;
  84. position: fixed;
  85. width: 100%;
  86. }
  87. .login{
  88. z-index: 99999;
  89. position: fixed;
  90. top: 0;
  91. }
  92. </style>