| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155 |
- <template lang="">
- <div @click="leagueBetting()" class = "rollingBtn ">
- <p>{{this.ballName}}</p>
- <div class='row center' >
- <span>{{this.index}}</span>
- </div>
- </div>
- </template>
- <script>
- import "../css/index.css";
- export default {
- props: [
- "bm",
- "name",
- "index",
- "id",
- "type",
- "gameCode",
- "ballName",
- "lgId",
- 'today',
- 'code',
- 'homeShow'
- ],
- data() {
- return {};
- },
- methods: {
- leagueBetting: function() {
- console.log('gameCode',this.gameCode)
- if (this.bm == "ty") {
- this.$store.dispatch("GETACTIVITY", "home");
-
- if (this.type == "Roll") {
- this.$store.dispatch("GETACTIVITY", this.id); //将活动类别存入vuex里面
- this.$store.dispatch("GET_BALL_ID", this.id);
- this.$router.push({
- path: "/StRollBallpage",
- query: { titleNumber: e }
- });
- } else {
- if(this.today && this.bm == 'ty'){
- this.$router.push({
- path: "StLeagueList",
- query: {
- lg_id: '',
- id: this.index,
- type_code:'StToday',
- game_code: this.gameCode,
- code:this.code,
- name: this.name,
- home: true,
- today : 1,
- btn: 2
- }
- });
- }else if(!this.today && this.bm == 'ty'){
- if(this.homeShow){
- this.$router.push({
- path: "StLeagueList",
- query: {
- game_code: this.gameCode,
- lg_id: this.lgId,
- code:this.code,
- id: this.index,
- name: this.name,
- number: 0,
- home: true,
- hMatch : 1,
- btn: 2
- }
- });
- }else{
- this.$store.dispatch("GETACTIVITY", "StSoon");
- this.$router.replace({
- path: "/StRollBallpage",
- query: { home: 1 }
- });
- }
- }
- // 暂不使用
- else{
- this.$router.push({
- path: "StLeagueList",
- query: {
- game_code: this.gameCode,
- lg_id: this.lgId,
- code:this.code,
- id: this.index,
- name: this.name,
- number: 0,
- home: true,
- hMatch : 1,
- btn: 2
- }
- });
- }
- }
- }else if(this.bm == 'gq'){
- this.$store.dispatch("GETACTIVITY", "StRollBall");
- this.$router.replace({
- path: "/StRollBallpage",
- query: { home: 1 }
- });
- }
- }
- },
- };
- </script>
- <style scoped>
- .rollingBtn {
- width: 100%;
- display: flex;
- align-items: center;
- margin: 0 auto;
- position: relative;
- font-size: 0.3rem;
- }
- .rollingBtn > p {
- width: 90%;
- height: 0.7rem;
- background: linear-gradient(to bottom, #dddddd, #cccccc);
- text-align: center;
- line-height: 0.7rem;
- font-size: 0.3rem;
- font-weight: bold;
- border-radius: 0.08rem 0 0 0.08rem;
- color: #666666;
- border: none;
- }
- .yd-btn-block {
- margin-top: 0;
- }
- .rollingBtn > div {
- position: absolute;
- right: 0;
- top: 0;
- width: 10%;
- height: 0.7rem;
- line-height: 0.7rem;
- background: linear-gradient(to top, #ddd, #ccc);
- border-radius: 0px 0.08rem 0.08rem 0px;
- color: #666666;
- }
- .rollingBtn div i {
- display: inline-block;
- width: 0.08rem;
- height: 0.08rem;
- background: #f5f5f5;
- vertical-align: middle;
- }
- </style>
|