Commit 972bb4a8 by 穆启卓

报名下一期报名过点按钮直接去对应的比赛详情页

parent 3a186f1f
......@@ -18,7 +18,7 @@ export function fetch(options) {
//所有的请求都会带上这些配置,比如全局都要用的身份信息等。
headers: {
'Content-Type': 'application/json',
'Authorization': process.env.NODE_ENV === 'production' ? (window['userData'] ? window['userData'].token : '') : "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAiLCJvcGVuX2lkIjoiMTExMTExMTExMTExMTExMTExMTExMTExMTExMSIsInVuaW9uX2lkIjoiMTExMTExMTExMTExMTExMTExMTExMTExMTExMSIsImV4cCI6MTU1NDkwMzIwOX0.vp0jBmcncqDzk0TwPt4-_XL5JdPXvTxNQ-u_ps7-7Do"
'Authorization': process.env.NODE_ENV === 'production' ? (window['userData'] ? window['userData'].token : '') : "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAiLCJvcGVuX2lkIjoiMTExMTExMTExMTExMTExMTExMTExMTExMTExMSIsInVuaW9uX2lkIjoiMTExMTExMTExMTExMTExMTExMTExMTExMTExMSIsImV4cCI6MTU1NTE3MDIxOH0.fEIhvDaUlX5NKBm4XUvZFs8lMmIWMq11sfE_Wt_wRZE"
// 'token_in_header': global_.token,//token从全局变量那里传过来
},
timeout: 30 * 1000 // 30秒超时
......
......@@ -59,7 +59,7 @@
</swiper>
<div class="func-btn green-btn" @click="inviteFriend" v-if="record_list.length&&record_list[0].status === 0">邀请好友来参赛</div>
<div class="func-btn" @click="goOtherPage('GoXCX')" v-else>提交今日步数</div>
<div class="next-func-btn" v-if="next_signup" @click="joinNextGame()">报名下一期</div>
<div class="next-func-btn" :style="next_period?'background: #5f95e7;':''" v-if="next_signup" @click="joinNextGame()">{{next_period?`已报名${String(next_period).slice(4,8)}期`:'报名下一期'}}</div>
<!-- 报名成功弹框 -->
<div class="game-status-popup" v-if="userHavePaidGame">
<div class="game-status-container">
......@@ -152,6 +152,7 @@ export default {
showSwiper: false,
bet_bonus: "0.00",
next_signup: false,
next_period: '',
period_end: "",
period_start: "",
total_signup: 0,
......@@ -196,12 +197,21 @@ export default {
},
methods: {
joinNextGame() {
if (this.next_period) {
this.$router.push({
name: "HaveJoinedGame",
query: {
week: this.next_period
}
});
} else {
this.$router.push({
name: "PartakeChallenge",
query: {
nextGame: true
}
});
}
},
goOtherPage(pageName) {
this.$router.push({ name: pageName });
......@@ -235,6 +245,7 @@ export default {
}
this.bet_bonus = pageData.bet_bonus;
this.next_signup = pageData.next_signup;
this.next_period = pageData.next_period;
this.period_end = pageData.period_end;
this.period_start = pageData.period_start;
this.total_signup = pageData.total_signup;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment