3f9bd06dd3add179305e94e548af2b7d13287e73.svn-base 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. <template>
  2. <div class="gameResult">
  3. <div class="box">
  4. <div class="title">体育投注规则</div>
  5. <div class="select">
  6. <el-select v-model="physicaLType" size="small" placeholder="请选择体育类型" @change="getRuleInfoData">
  7. <el-option
  8. v-for="(item, index) of type"
  9. :key="index"
  10. :value="item.group_name"
  11. :label="item.group_name"
  12. ></el-option>
  13. </el-select>
  14. </div>
  15. <span class='go-home' @click="goHome">返回首页</span>
  16. </div>
  17. <div class="content" v-if="contentData" v-loading="loading">
  18. <div class="content-title">{{contentData.group_name}}</div>
  19. <div class="content-date">最后更新时间:{{contentData.utime}}</div>
  20. <div v-html="contentData.content" class="content-info"></div>
  21. </div>
  22. <div v-else class="no-content">暂无投注规则说明</div>
  23. </div>
  24. </template>
  25. <script>
  26. export default {
  27. name: "gameResult",
  28. data() {
  29. return {
  30. physicaLType: '一般体育说明',
  31. type: [],
  32. contentData: {},
  33. loading: false,
  34. test: '1'
  35. }
  36. },
  37. created() {
  38. this.getRuleInfoData();
  39. },
  40. methods: {
  41. // 获取赛事规则
  42. getRuleInfoData() {
  43. let params = {
  44. modular: "体育", // 大类,默认为体育
  45. group: this.physicaLType // 体育类型
  46. }
  47. this.loading = true
  48. this.$http.get(this.$ports.home.getMatchRule, params)
  49. .then(res => {
  50. if(res.data) {
  51. if(res.data.data) {
  52. this.contentData = res.data.data.match_rule
  53. if(res.data.data.rule_menu) {
  54. for(let item of res.data.data.rule_menu) {
  55. console.log('item',item)
  56. this.type = item.group;
  57. }
  58. }
  59. }
  60. }
  61. this.loading = false
  62. })
  63. .catch(err => {
  64. this.loading = false
  65. this.$message.error(err.message)
  66. })
  67. },
  68. goHome() {
  69. this.$router.push('/');
  70. }
  71. }
  72. };
  73. </script>
  74. <style>
  75. .el-select .el-input__inner:focus {
  76. border-color: #999999;
  77. }
  78. .el-select .el-input.is-focus .el-input__inner {
  79. border-color: #999999;
  80. }
  81. </style>
  82. <style scoped>
  83. .go-home {
  84. display: inline-block;
  85. color: #ffffff;
  86. margin-right: 20px;
  87. }
  88. .gameResult {
  89. height: 100%;
  90. width: 100%;
  91. overflow: auto;
  92. }
  93. .box {
  94. display: flex;
  95. height: 60px;
  96. align-items: center;
  97. background: linear-gradient(to bottom, #999999, #6a6a6b);
  98. }
  99. .title {
  100. flex: 1;
  101. font-size: 0.3rem;
  102. color: #ffffff;
  103. margin-left: 50px;
  104. }
  105. .select {
  106. flex: 0 1 300px;
  107. }
  108. .content {
  109. padding: 10px 10px;
  110. }
  111. .content-title {
  112. font-size: 20px;
  113. color: #ff9200;
  114. font-weight: bold;
  115. margin: 10px 40px;
  116. }
  117. .content-date {
  118. font-style: italic;
  119. font-size: 13px;
  120. margin-left: 40px;
  121. }
  122. .content-info {
  123. padding: 50px 50px;
  124. }
  125. .no-content {
  126. position: relative;
  127. font-style: italic;
  128. font-size: 15px;
  129. text-align: center;
  130. top: 50%;
  131. margin-top: -8px;
  132. }
  133. </style>