Commit feddc068 by 穆启卓

Merge remote-tracking branch 'remotes/origin/dev_yijun' into mutou

parents 7baccb9b 0f580ea8
......@@ -7,19 +7,19 @@
<div class="game-choose-section">
<div class="choose-title">每日达标</div>
<div class="choose-content">
<div v-for="(item, index) in partakeStepList" :class="['choose-option', index===partakeStepIndex?'check':'']" @click="chooseAttribute('partakeStepIndex', index)">{{item.step}}</div>
<div v-for="(item, index) in partakeStepList" :class="['choose-option', index===partakeStepIndex?'check':'']" @click="chooseAttribute('partakeStepIndex', index)" :key ="index">{{item.step}}</div>
</div>
</div>
<div class="game-choose-section">
<div class="choose-title">挑战天数</div>
<div class="choose-content">
<div v-for="(item, index) in partakeDayList" :class="['choose-option', index===partakeDayIndex?'check':'']" @click="chooseAttribute('partakeDayIndex', index)">{{item.days}}</div>
<div v-for="(item, index) in partakeDayList" :class="['choose-option', index===partakeDayIndex?'check':'']" @click="chooseAttribute('partakeDayIndex', index)" :key ="index">{{item.days}}</div>
</div>
</div>
<div class="game-choose-section">
<div class="choose-title">每日契约金</div>
<div class="choose-content">
<div v-for="(item, index) in partakeMoneyList" :class="['choose-option', index===partakeMoneyIndex?'check':'']" @click="chooseAttribute('partakeMoneyIndex', index)">{{item.money}}</div>
<div v-for="(item, index) in partakeMoneyList" :class="['choose-option', index===partakeMoneyIndex?'check':'']" @click="chooseAttribute('partakeMoneyIndex', index)" :key ="index">{{item.money}}</div>
</div>
</div>
<div class="game-total-fee-container">
......@@ -76,6 +76,19 @@
<div class="modal" v-if="modalShown">
<Modal v-on:close="closeModal" v-on:confirmModal="confirmModal" v-bind:title="modalTitle" v-bind:desc="modalDesc" :option="modalOption"></Modal>
</div>
<!-- 没有关注公众号弹窗 -->
<div class="game-status-popup" v-if="needFollow">
<div class="game-status-container">
<div class="status-date">请关注公众号报名</div>
<img :src="followInfo.img_url" alt="" class="img_code">
<div class="follow-tip">
<p>由于在公众号内才能获取运动数据</p>
<p>请长按上方二维码关注公众号后报名</p>
</div>
<img class="close-btn" src="../images/common/pop_ic_close.png" @click="closePopup()">
</div>
</div>
<img :src="followInfo.img_url" alt="" style="display: none">
</div>
</template>
......@@ -83,7 +96,7 @@
import Title from "@/components/Title.vue";
import PayFailModal from "@/components/PayFailModal.vue";
import Modal from "@/components/Modal.vue";
import { daka_info } from "@/components/axios/api";
import { daka_info,select_follow } from "@/components/axios/api";
import { dakaPay } from "@/components/axios/api";
export default {
......@@ -112,12 +125,28 @@ export default {
preMinMoney: 0,
preMaxMoney: 0,
startTimeStamp: 0,
followInfo: {},
needFollow: false
};
},
created() {
this.getPageData();
this.getFollowInfo()
// let followInfo = sessionStorage.getItem('followInfo')
// if(followInfo){
// this.followInfo = JSON.parse(followInfo)
// }
},
methods: {
getFollowInfo() {
select_follow().then(res => {
console.log(res);
if (res.code == 0) {
this.followInfo = res.data
// sessionStorage.setItem('followInfo',JSON.stringify(res.data))
}
});
},
// 加载页面数据
getPageData() {
daka_info().then(res => {
......@@ -172,6 +201,10 @@ export default {
},
// 立即报名
payToSign() {
if(!this.followInfo.follow){
this.needFollow = true
return
}
if (!this.argeement) {
return this.showModal("温馨提示", "请先同意协议");
}
......@@ -236,7 +269,11 @@ export default {
// 同意规则协议
bindArgeement() {
this.argeement = !this.argeement;
}
},
closePopup() {
this.needFollow = false;
},
},
filters: {
moneyFormatter(val) {
......@@ -450,4 +487,82 @@ export default {
}
}
}
.game-status-popup {
position: fixed;
left: 0;
top: 0;
right: 0;
bottom: 0;
z-index: 998;
background: rgba(0, 0, 0, 0.5);
display: flex;
align-items: center;
justify-content: center;
.game-status-container {
position: relative;
width: 6.4rem;
height: 7.08rem;
background: url(../images/SignUp/follow_modal.png) no-repeat center center;
background-size: cover;
border-radius: 0.08rem;
padding-bottom: 0.4rem;
display: flex;
flex-direction: column;
align-items: center;
position: relative;
.img_code{
position: absolute;
top:2.62rem;
width: 2.2rem;
height: 2.2rem;
}
.follow-tip{
position: absolute;
bottom: .7rem;
font-size: .3rem;
font-weight: bold;
line-height: .46rem;
text-align: center;
}
.status-icon {
width: 5.08rem;
height: 2.58rem;
margin-top: -1.29rem;
}
.join-success-banner {
width: 5.44rem;
height: 3.18rem;
margin-top: 0.3rem;
}
.status-date {
font-size: 0.36rem;
line-height: 1;
color: #fff;
font-weight: bold;
text-align: center;
margin-top: 0.7rem;
}
.status-money {
width: 5.04rem;
height: 2.84rem;
background-image: url(../images/HaveJoinedGame/pop_gxdb_board.png);
background-size: 100%;
margin-top: 0.42rem;
}
.green-btn {
background: #1fdbb1;
}
.yellow-btn {
background: #fabd21;
}
.close-btn {
width: 0.58rem;
height: 0.58rem;
position: absolute;
top: -.88rem;
right: 0
}
}
}
</style>
......@@ -23,7 +23,7 @@
</div>
</div>
<div class="card-container-list" @scroll="onScroll">
<div class="card-item" v-for="(item,index) in recordList.records" @click="goWhereDetail(item.week)">
<div class="card-item" v-for="(item,index) in recordList.records" @click="goWhereDetail(item.week)" :key ="index">
<div class="card-title">{{item.week}}期-{{item.target_steps}}{{item.total_days}}日耐力赛<template v-if="item.days">(第{{item.days}}天)</template></div>
<div class="card-detail-container">
<div class="detail-item">
......
......@@ -135,6 +135,7 @@ export default {
console.log(res);
if (res.code == 0) {
this.followInfo = res.data
sessionStorage.setItem('followInfo',JSON.stringify(res.data))
}
});
},
......
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