Commit 0bf7d45b by Caiyijun

新增对应天数 卡片滚动

parent 06fe2041
......@@ -33,7 +33,7 @@
.msg_container {
flex: 1;
height: .34rem;
height: .44rem;
transform-style: preserve-3d;
overflow: hidden;
}
......@@ -41,7 +41,7 @@
.notice_msg {
font-size: .24rem;
color: #fff;
line-height: .32rem;
line-height: .44rem;
text-align: center;
white-space: nowrap;
text-overflow: ellipsis;
......@@ -50,7 +50,7 @@
}
.msg1 {
transform: translate3d(0, 0.32rem, 0);
transform: translate3d(0, 0.44rem, 0);
animation: rowUp 10s infinite;
/* transform: translateZ(35rpx); */
}
......@@ -76,8 +76,8 @@
@keyframes rowUp {
0% {
-webkit-transform: translate3d(0, 0.32rem, 0);
transform: translate3d(0, 0.32rem, 0);
-webkit-transform: translate3d(0, 0.44rem, 0);
transform: translate3d(0, 0.44rem, 0);
}
10% {
-webkit-transform: translate3d(0, 0, 0);
......@@ -88,12 +88,12 @@
transform: translate3d(0, 0, 0);
}
50% {
-webkit-transform: translate3d(0, -0.32rem, 0);
transform: translate3d(0, -0.32rem, 0);
-webkit-transform: translate3d(0, -0.44rem, 0);
transform: translate3d(0, -0.44rem, 0);
}
100% {
-webkit-transform: translate3d(0, -0.32rem, 0);
transform: translate3d(0, -0.32rem, 0);
-webkit-transform: translate3d(0, -0.44rem, 0);
transform: translate3d(0, -0.44rem, 0);
}
}
......@@ -107,12 +107,12 @@
transform: translate3d(0, 0, 0);
}
60% {
-webkit-transform: translate3d(0, -0.32rem, 0);
transform: translate3d(0, -0.32rem, 0);
-webkit-transform: translate3d(0, -0.44rem, 0);
transform: translate3d(0, -0.44rem, 0);
}
90% {
-webkit-transform: translate3d(0, -0.32rem, 0);
transform: translate3d(0, -0.32rem, 0);
transform: translate3d(0, -0.44rem, 0);
}
100% {
-webkit-transform: translate3d(0, -0.96rem, 0);
......
......@@ -30,7 +30,7 @@ export function fetch(options) {
resolve(response.data);//把请求到的数据发到引用请求的地方
})
.catch(error => {
console.log('请求异常信息:', error);
// console.log('请求异常信息:', error);
// console.log(error);
// if (error.response.status == 401) {
// localStorage.setItem('last_url', location.hash.slice(1));
......
......@@ -5,8 +5,6 @@ import store from './store'
import axios from 'axios'
import wx from 'weixin-js-sdk'
import api from "@/components/axios/api"
// import VConsole from 'vconsole/dist/vconsole.min.js' //import vconsole
// let vConsole = new VConsole() // 初始化
......
......@@ -19,14 +19,16 @@
<div class="target-people-text">已有{{total_signup}}人参赛</div>
</div>
<div class="hr"></div>
<swiper :options="swiperOption" class="game-scroll-container" v-if="showSwiper">
<!-- <div style="height: 2.68rem;">-->
<swiper :options="swiperOption" ref="mySwiper" class="game-scroll-container" v-if="showSwiper">
<swiper-slide v-for="(item,index) in record_list" :key="index">
<div class="game-scroll-item">
<div class="item-title-status">
<div class="item-title">{{item.days}}</div>
<div
:class="item.status===0?'item-status0':item.status===1?'item-status1':item.status===2?'item-status2':'item-status2'"
>{{item.status===0?'未开始':item.status===1?'比赛中':item.status===2?'已结束':'已淘汰'}}</div>
>{{item.status===0?'未开始':item.status===1?'比赛中':item.status===2?'已结束':'已淘汰'}}
</div>
</div>
<div class="item-income" :style="item.status===1?'':'visibility: hidden;'">
<div class="item-amount">{{item.money|moneyFormatter}}</div>
......@@ -42,6 +44,7 @@
</div>
</swiper-slide>
</swiper>
<!-- </div>-->
<div class="func-btn" @click="goOtherPage('GoXCX')">提交今日步数</div>
<div class="next-func-btn" v-if="next_signup" @click="joinNextGame()">报名下一期</div>
<!-- 报名成功弹框 -->
......@@ -98,12 +101,12 @@
</template>
<script>
import Title from "@/components/Title.vue";
import { daka_status_detail, pop_up_windows } from "@/components/axios/api";
import "swiper/dist/css/swiper.css";
import { swiper, swiperSlide } from "vue-awesome-swiper";
import Title from "@/components/Title.vue"
import {daka_status_detail, pop_up_windows} from "@/components/axios/api"
import {swiper, swiperSlide} from "vue-awesome-swiper"
import "swiper/dist/css/swiper.css"
export default {
export default {
name: "HaveJoinedGame",
components: {
Title,
......@@ -115,7 +118,8 @@ export default {
swiperOption: {
slidesPerView: "auto",
centeredSlides: true,
spaceBetween: 10
spaceBetween: 10,
notNextTick: true
},
showSwiper: false,
bet_bonus: "0.00",
......@@ -125,12 +129,25 @@ export default {
total_signup: 0,
target_steps: 0,
record_list: [],
popupData: {}
};
popupData: {},
current_day: 0
}
},
created() {
this.getPageData();
this.isPopup();
this.getPageData()
this.isPopup()
},
computed: {
swiper() {
// setTimeout(()=>{
return this.$refs.mySwiper.swiper
// },800)
}
},
mounted() {
setTimeout(() => {
this.swiper.slideTo(this.current_day, 1200, false)
}, 800)
},
methods: {
joinNextGame() {
......@@ -139,115 +156,114 @@ export default {
query: {
nextGame: true
}
});
})
},
closePopup() {
this.popupData.window = false;
this.popupData.window = false
},
goback() {
history.go(-1);
history.go(-1)
},
goOtherPage(pageName) {
this.$router.push({ name: pageName });
this.$router.push({name: pageName})
},
currentPage() {
return this.$router.history.current.name;
return this.$router.history.current.name
},
getPageData() {
let grade = 2;
let grade = 1
if (sessionStorage.getItem("bushuType")) {
grade = sessionStorage.getItem("bushuType");
grade = sessionStorage.getItem("bushuType")
}
daka_status_detail(this.$route.query.week, grade).then(res => {
daka_status_detail(this.$route.query.week, this.$route.query.week ? grade : '').then(res => {
if (res.code === 0) {
const pageData = res.data;
const pageData = res.data
if (pageData.record_list && pageData.record_list.length) {
pageData.record_list.forEach((item, index) => {
if (item.status === 0) {
item.format_tsp = this.countDown('interval'+index, parseInt((item.tsp * 1000 - Date.now()) / 1000), index);
}
});
}
this.bet_bonus = pageData.bet_bonus;
this.next_signup = pageData.next_signup;
this.period_end = pageData.period_end;
this.period_start = pageData.period_start;
this.total_signup = pageData.total_signup;
this.target_steps = pageData.target_steps;
this.record_list = pageData.record_list;
setTimeout(()=>{
item.format_tsp = this.countDown('interval' + index, parseInt((item.tsp * 1000 - Date.now()) / 1000), index)
}
})
}
this.bet_bonus = pageData.bet_bonus
this.next_signup = pageData.next_signup
this.period_end = pageData.period_end
this.period_start = pageData.period_start
this.total_signup = pageData.total_signup
this.target_steps = pageData.target_steps
this.record_list = pageData.record_list
this.current_day = pageData.current_day - 1
this.showSwiper = true
},500)
}
});
})
},
isPopup() {
pop_up_windows().then(res => {
if (res.code === 0) {
this.popupData = res.data;
this.popupData = res.data
}
});
})
},
//倒计时
countDown(intervalName, times, index) {
clearInterval(this[intervalName]);
this[intervalName] = null;
clearInterval(this[intervalName])
this[intervalName] = null
this[intervalName] = setInterval(() => {
let day = 0,
hour = 0,
minute = 0,
second = 0;
second = 0
if (times > 0) {
day = Math.floor(times / (60 * 60 * 24));
hour = Math.floor(times / (60 * 60)) - day * 24;
minute = Math.floor(times / 60) - day * 24 * 60 - hour * 60;
second = Math.floor(times) - day * 24 * 60 * 60 - hour * 60 * 60 - minute * 60;
if (day < 1) day = "";
else day = day + "天";
if (hour <= 9) hour = "0" + hour;
if (minute <= 9) minute = "0" + minute;
if (second <= 9) second = "0" + second;
this.record_list[index].format_tsp = day + hour + "时" + minute + "分" + second + "秒";
day = Math.floor(times / (60 * 60 * 24))
hour = Math.floor(times / (60 * 60)) - day * 24
minute = Math.floor(times / 60) - day * 24 * 60 - hour * 60
second = Math.floor(times) - day * 24 * 60 * 60 - hour * 60 * 60 - minute * 60
if (day < 1) day = ""
else day = day + "天"
if (hour <= 9) hour = "0" + hour
if (minute <= 9) minute = "0" + minute
if (second <= 9) second = "0" + second
this.record_list[index].format_tsp = day + hour + "时" + minute + "分" + second + "秒"
} else {
this.getPageData();
clearInterval(this[intervalName]);
this.getPageData()
clearInterval(this[intervalName])
}
times--;
times--
// console.log('gagagag',intervalName, day + hour + "时" + minute + "分" + second + "秒")
// console.log('gagagag',times)
// console.log('gagagag',this.format_tsp)
}, 1000);
}, 1000)
}
},
filters: {
moneyFormatter(val) {
if (val && !isNaN(val)) {
return Number(val).toFixed(2);
return Number(val).toFixed(2)
} else {
return "0.00";
return "0.00"
}
}
}
}
};
</script>
<style lang="less" scoped>
.swiper-container {
.swiper-container {
/*margin-left: 0 !important;*/
}
}
.swiper-slide {
.swiper-slide {
width: 5.1rem;
height: 2.68rem;
}
}
.swiper-slide img {
.swiper-slide img {
width: 5.1rem;
height: 2.68rem;
}
}
.have-joined-game-page {
.have-joined-game-page {
// width: 100%;
min-height: 100vh;
background-color: rgb(70, 88, 149);
......@@ -260,13 +276,15 @@ export default {
align-items: center;
overflow: hidden;
position: relative;
padding-bottom: 34px;
padding-bottom: 50px;
.page-title {
width: 100%;
position: fixed;
left: 0;
top: 0;
}
.game-bonus-container {
width: 6.4rem;
padding: 0.3rem 0;
......@@ -278,12 +296,14 @@ export default {
rgba(255, 255, 255, 0)
);
margin-top: 2.38rem;
.bonus-title {
font-size: 0.3rem;
line-height: 1;
color: #fff;
text-align: center;
}
.bonus-amount {
font-size: 0.64rem;
line-height: 0.8;
......@@ -292,6 +312,7 @@ export default {
margin-top: 0.26rem;
}
}
.game-title {
font-size: 0.36rem;
line-height: 1;
......@@ -299,6 +320,7 @@ export default {
font-weight: bold;
margin-top: 0.4rem;
}
.game-time {
font-size: 0.24rem;
line-height: 1;
......@@ -308,18 +330,22 @@ export default {
background: #556cb6;
margin-top: 0.14rem;
}
.target-people-container {
display: flex;
margin-top: 0.34rem;
.target-img {
width: 0.3rem;
height: 0.26rem;
}
.people-img {
width: 0.28rem;
height: 0.24rem;
margin-left: 0.5rem;
}
.target-people-text {
font-size: 0.26rem;
line-height: 1;
......@@ -327,12 +353,14 @@ export default {
margin-left: 0.08rem;
}
}
.hr {
width: 3rem;
height: 0.01rem;
background: #6f82c3;
margin-top: 0.5rem;
}
.game-scroll-container {
width: 100%;
height: 2.68rem;
......@@ -341,9 +369,11 @@ export default {
box-sizing: border-box;
overflow-x: scroll;
white-space: nowrap;
&::-webkit-scrollbar {
display: none;
}
.game-scroll-item {
width: 5.1rem;
height: 2.68rem;
......@@ -355,9 +385,11 @@ export default {
margin-left: 0.2rem;
display: inline-block;
vertical-align: top;
&:first-child {
margin-left: 0;
}
.item-title-status {
width: 100%;
padding: 0 0.24rem 0 0.3rem;
......@@ -365,11 +397,13 @@ export default {
display: flex;
align-items: center;
justify-content: space-between;
.item-title {
font-size: 0.3rem;
line-height: 1;
color: #fff;
}
.item-status0 {
padding: 0 0.16rem;
box-sizing: border-box;
......@@ -378,6 +412,7 @@ export default {
line-height: 0.42rem;
color: #fff;
}
.item-status1 {
padding: 0 0.16rem;
box-sizing: border-box;
......@@ -386,6 +421,7 @@ export default {
line-height: 0.42rem;
color: #703e0b;
}
.item-status2 {
padding: 0 0.16rem;
box-sizing: border-box;
......@@ -395,6 +431,7 @@ export default {
color: #fff;
}
}
.item-income {
width: 100%;
padding-left: 0.3rem;
......@@ -402,11 +439,13 @@ export default {
margin-top: 0.4rem;
display: flex;
align-items: flex-end;
.item-amount {
font-size: 0.48rem;
line-height: 0.8;
color: #fcf776;
}
.item-text {
font-size: 0.26rem;
line-height: 1;
......@@ -414,6 +453,7 @@ export default {
margin-left: 0.1rem;
}
}
.item-progress-num {
width: 100%;
padding: 0 0.3rem;
......@@ -422,10 +462,12 @@ export default {
display: flex;
align-items: center;
justify-content: space-between;
.item-progress {
height: 0.06rem;
background: #fff;
position: relative;
&:after {
content: "";
width: 2.46rem;
......@@ -434,6 +476,7 @@ export default {
position: absolute;
}
}
.item-num {
font-size: 0.26rem;
line-height: 1;
......@@ -442,6 +485,7 @@ export default {
}
}
}
.func-btn {
width: 5.6rem;
border-radius: 0.92rem;
......@@ -453,6 +497,7 @@ export default {
text-align: center;
margin-top: 1.2rem;
}
.next-func-btn {
width: 5.6rem;
border-radius: 0.92rem;
......@@ -464,9 +509,9 @@ export default {
text-align: center;
margin-top: 0.3rem;
}
}
}
.game-status-popup {
.game-status-popup {
position: fixed;
left: 0;
top: 0;
......@@ -477,6 +522,7 @@ export default {
display: flex;
align-items: center;
justify-content: center;
.game-status-container {
width: 6rem;
background: #fff;
......@@ -486,16 +532,19 @@ export default {
flex-direction: column;
align-items: center;
position: relative;
.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;
......@@ -504,12 +553,14 @@ export default {
text-align: center;
margin-top: 0.4rem;
}
.status-money {
width: 5.04rem;
height: 2.84rem;
background-image: url(../images/HaveJoinedGame/pop_gxdb_board.png);
background-size: 100%;
margin-top: 0.42rem;
.popup-text3 {
font-size: 0.3rem;
line-height: 1;
......@@ -517,18 +568,21 @@ export default {
text-align: center;
margin-top: 0.42rem;
}
.popup-text4 {
font-size: 1.2rem;
line-height: 0.8;
color: #fabd21;
text-align: center;
margin-top: 0.24rem;
span {
font-size: 0.3rem;
line-height: 1;
vertical-align: bottom;
}
}
.popup-text5 {
font-size: 0.24rem;
line-height: 1;
......@@ -537,6 +591,7 @@ export default {
margin-top: 0.42rem;
}
}
.popup-text1 {
width: 5.34rem;
font-size: 0.26rem;
......@@ -544,10 +599,12 @@ export default {
color: #333;
text-align: center;
margin-top: 0.16rem;
span {
color: #fabd21;
}
}
.popup-text2 {
font-size: 0.24rem;
line-height: 1;
......@@ -555,6 +612,7 @@ export default {
text-align: center;
margin-top: 0.32rem;
}
.popup-text6 {
font-size: 0.26rem;
line-height: 1;
......@@ -562,12 +620,14 @@ export default {
text-align: center;
margin: 0.4rem 0 0.34rem;
}
.popup-text7 {
font-size: 0.26rem;
line-height: 1;
color: #8e5b29;
text-align: center;
}
.popup-btn1 {
width: 4.6rem;
height: 0.8rem;
......@@ -579,12 +639,15 @@ export default {
text-align: center;
margin-top: 0.4rem;
}
.green-btn {
background: #1fdbb1;
}
.yellow-btn {
background: #fabd21;
}
.close-btn {
width: 0.58rem;
height: 0.58rem;
......@@ -594,5 +657,5 @@ export default {
transform: translateX(-50%);
}
}
}
}
</style>
......@@ -26,7 +26,7 @@
</div>
<div class="text2" @click="goOtherPage('Rule')">《步数打卡的挑战规则协议》</div>
</div>
<div class="partake-btn">立即报名</div>
<div class="partake-btn" @click="payToSign()">立即报名</div>
</div>
</div>
<div class="footer-container" v-if="currentPage()==='PartakeChallenge'">
......@@ -199,10 +199,13 @@
}
console.log(grade)
daka_info(grade).then(res=>{
console.log('daka_info',res)
if(res.code == 0){
console.log('立即参与',res)
console.log(typeof res.data.daka_info)
this.daka_info = res.data.daka_info
this.daka_faq = res.data.daka_faq
}
})
}
},
......
......@@ -15,8 +15,9 @@
<img class="corner-marker" src="../images/SignUp/home_tag_bsz.png" v-if="item.status===0">
<img class="corner-marker" src="../images/SignUp/home_tag_zmz.png" v-if="item.status===1">
<img class="corner-marker" src="../images/SignUp/home_tag_yjs.png" v-if="item.status===2">
<div class="card-title">{{item.target_step}}步3天耐力赛 第{{item.action}}</div>
<div class="card-time">{{item.already_join===1?'已参赛':'未参赛'}} {{item.period_start}} - {{item.period_end}}</div>
<div class="card-title">{{item.action}}期 - {{item.target_step}}步3天耐力赛</div>
<div class="card-time">{{item.already_join===1?'已参赛':'未参赛'}} {{item.period_start}} - {{item.period_end}}
</div>
<div class="card-info">
<div class="info-item" v-if="item.status===0||item.status===2">
<div class="item-title">达标人数</div>
......@@ -31,27 +32,29 @@
<div class="item-money">{{item.total_money || '0.00'}}</div>
</div>
</div>
<!-- 0 比赛中 1 未开始 2 已结束-->
<div class="card-btn" v-if="item.status===1&&item.already_join===0" data-item="item"
@click="goOtherPage('PartakeChallenge')">
<div class="btn-title">参与挑战</div>
<!--<div class="card-btn-tip">(每日目标{{item.target_step}}步)</div>-->
</div>
<div class="card-btn" :style="item.status!==1?'background:#32A1F6;':''"
v-if="item.status===1&&item.already_join===1"
@click="goWhereDetail(item)">已报名</div>
<div class="card-btn statusnormal" v-if="item.status===2 || item.status===3 || item.status===0"
<div class="card-btn" v-if="item.status===1&&item.already_join===1" data-item="item"
@click="goWhereDetail(item)">已报名
</div>
<div class="statusnormal" v-if="item.status===2 || item.status===0 || item.status===3"
@click="goWhereDetail(item)">{{(item.status===2 || item.status===0)
?'查看详情': '已淘汰'}}</div>
? (item.status===0&&item.already_join===1) ? '立即打卡': '查看详情' : '已淘汰'}}
<img src="../images/SignUp/detail_bg.png" alt="">
</div>
</div>
</div>
</template>
<script>
import NoticeBonus from "@/components/NoticeBonus.vue";
import Free from "@/components/Free.vue";
import Modal from "@/components/Modal.vue";
import PayFailModal from "@/components/PayFailModal.vue";
import { dakaPay, track, userCards, daka_index } from "@/components/axios/api";
import NoticeBonus from "@/components/NoticeBonus.vue"
import Free from "@/components/Free.vue"
import Modal from "@/components/Modal.vue"
import PayFailModal from "@/components/PayFailModal.vue"
import {dakaPay, track, userCards, daka_index} from "@/components/axios/api"
export default {
name: "SignUp",
......@@ -73,50 +76,57 @@
isFollow: false,
gameList: [],
choosedLevel: 1
};
choosedLevel: 2
}
},
created() {
this.getPageData();
let grade = Number(sessionStorage.getItem("bushuType"))
if(grade){
// console.log('grade',grade)
this.getPageData(grade)
}else{
// console.log('grade 0',grade)
this.getPageData()
}
},
mounted() {
//获取步数tab缓存
let LastLevel = Number(sessionStorage.getItem("bushuType"));
let LastLevel = Number(sessionStorage.getItem("bushuType"))
if (LastLevel) {
this.choosedLevel = LastLevel;
}else{
sessionStorage.setItem("bushuType", this.choosedLevel);
this.choosedLevel = LastLevel
} else {
sessionStorage.setItem("bushuType", this.choosedLevel)
}
},
methods: {
chooseGameLevel(level) {
sessionStorage.setItem("bushuType", level);
this.choosedLevel = level;
this.getPageData(level);
sessionStorage.setItem("bushuType", level)
this.choosedLevel = level
this.getPageData(level)
},
goOtherPage(pageName) {
console.log('pageName',pageName)
this.$router.push({ name: pageName });
console.log('pageName', pageName)
this.$router.push({name: pageName})
},
goWhereDetail(item) {
if (item.status===1&&item.already_join===1) { // 已报名
if (item.status === 1 && item.already_join === 1) { // 已报名
this.$router.push({
name: 'HaveJoinedGame',
query: {
week: item.week
}
});
})
} else { // 比赛中或者已结束
if (item.already_join===1) { // 已报名
if (item.already_join === 1) { // 已报名
this.$router.push({
name: 'HaveJoinedGame',
query: {
week: item.week
}
});
})
} else { // 未报名
sessionStorage.setItem('ChallengeDetailData', JSON.stringify(item));
this.$router.push({name: 'ChallengeDetail'});
sessionStorage.setItem('ChallengeDetailData', JSON.stringify(item))
this.$router.push({name: 'ChallengeDetail'})
}
}
},
......@@ -126,46 +136,46 @@
res.data.forEach(item => {
item.action = item.week.substring(item.week.length - 4)
})
this.gameList = res.data;
console.log('gameList',this.gameList);
this.gameList = res.data
console.log('gameList', this.gameList)
}
});
})
},
togglePayFail() {
this.isShowPayFail = !this.isShowPayFail;
this.isShowPayFail = !this.isShowPayFail
},
showSuccess() {
this.showModal("温馨提示", "报名成功", {
scb: () => {
if (this.isFollow == 1) {
this.$router.push({ name: "Read" });
this.$router.push({name: "Read"})
} else {
this.$router.push({ name: "Success" });
this.$router.push({name: "Success"})
}
}
});
})
},
confirmModal(scb) {
scb && scb();
this.modalShown = false;
scb && scb()
this.modalShown = false
},
showFree(e) {
e.stopPropagation();
track("free_contract_show");
e.stopPropagation()
track("free_contract_show")
if (localStorage.getItem("first_show_free") == 1) {
localStorage.setItem("first_show_free", 2);
this.canShowFree = false;
localStorage.setItem("first_show_free", 2)
this.canShowFree = false
} else {
this.canCheckShowFree = false;
this.canShowFree = false;
this.canCheckShowFree = false
this.canShowFree = false
}
userCards().then(res => {
console.log("获取免契约金数据", res);
console.log("获取免契约金数据", res)
let data = {
card: res.data.contract_card,
cnt: res.data.contract_cnt
};
this.current_date = new Date(res.date);
}
this.current_date = new Date(res.date)
// if (
// // 如果明天没报名,而且还有免契约金卡,则可以使用
// !this.date_status[1].user_status.daka_signup &&
......@@ -176,31 +186,31 @@
// } else {
// data.can_get = false;
// }
this.contract_data = JSON.parse(JSON.stringify(data));
this.showFreeModal = true;
});
this.contract_data = JSON.parse(JSON.stringify(data))
this.showFreeModal = true
})
},
closeFree() {
this.showFreeModal = false;
this.showFreeModal = false
},
showModal(title, desc, option) {
this.modalTitle = title || "";
this.modalDesc = desc || "";
this.modalOption = option || {};
this.modalShown = true;
this.modalTitle = title || ""
this.modalDesc = desc || ""
this.modalOption = option || {}
this.modalShown = true
},
closeModal() {
this.modalShown = false;
this.modalShown = false
},
payToSign() {
dakaPay().then(response => {
this.current_date = new Date(response.date);
this.current_date = new Date(response.date)
if (response.code == 1) {
this.showModal("温馨提示", response.msg);
return;
this.showModal("温馨提示", response.msg)
return
}
let result = response.data;
console.log("请求打卡支付数据", result);
let result = response.data
console.log("请求打卡支付数据", result)
if (result) {
WeixinJSBridge.invoke(
"getBrandWCPayRequest",
......@@ -214,44 +224,44 @@
},
// result,
res => {
console.log("支付调用结果", res);
console.log("支付调用结果", res)
if (res.err_msg == "get_brand_wcpay_request:ok") {
// 使用以上方式判断前端返回,微信团队郑重提示:
//res.err_msg将在用户支付成功后返回ok,但并不保证它绝对可靠。
// 支付成功后的回调函数
console.log("支付成功");
console.log("支付成功")
this.showModal("温馨提示", "报名成功", {
scb: () => {
if (this.isFollow == 1) {
this.$router.push({ name: "Read" });
this.$router.push({name: "Read"})
} else {
this.$router.push({ name: "Success" });
this.$router.push({name: "Success"})
}
}
});
})
// this.dateSelect(2);
// localStorage.setItem("is_every", 0)
// location.replace("#/Success");
}
if (res.err_msg == "get_brand_wcpay_request:fail") {
// this.showModal("温馨提示", "支付服务繁忙,请稍后重试");
this.togglePayFail();
this.togglePayFail()
}
if (res.err_msg == "get_brand_wcpay_request:cancel") {
// console.log("支付取消");
this.togglePayFail();
this.togglePayFail()
}
}
);
)
}
})
}
});
}
}
};
</script>
<style lang="less" scoped>
.sign-up-page {
.sign-up-page {
width: 100%;
height: 100%;
overflow-y: scroll;
......@@ -265,6 +275,7 @@
display: flex;
flex-direction: column;
align-items: center;
.top-nav-level {
flex-shrink: 0;
margin-top: 0.3rem;
......@@ -274,6 +285,7 @@
background: #fff;
box-sizing: border-box;
display: flex;
.level-item {
width: 1.76rem;
font-size: 0.3rem;
......@@ -281,6 +293,7 @@
color: #465895;
text-align: center;
position: relative;
&:after {
content: "";
height: 0.26rem;
......@@ -291,20 +304,24 @@
top: 50%;
transform: translateY(-50%);
}
&:first-child:after {
display: none;
}
&.active {
background: #465895;
color: #fff;
border-radius: 0.1rem;
font-weight: bold;
}
&.active:after {
display: none;
}
}
}
.view-steps-btn {
flex-shrink: 0;
width: 1.11rem;
......@@ -314,10 +331,12 @@
left: 0;
top: 1.22rem;
}
.notice-broadcast {
flex-shrink: 0;
margin: 3.68rem 0 0.18rem;
}
.challenge-card {
flex-shrink: 0;
width: 6.9rem;
......@@ -329,6 +348,7 @@
flex-direction: column;
align-items: center;
position: relative;
.corner-marker {
width: 1.39rem;
height: 1.39rem;
......@@ -336,22 +356,27 @@
top: -0.02rem;
right: -0.02rem;
}
.card-title {
font-size: 0.34rem;
line-height: 1;
color: #fff;
margin-top: 0.28rem;
}
.card-time {
background: rgba(0,0,0,0.1);
padding:0 0.24rem;
background: rgba(0, 0, 0, 0.1);
padding: 0 0.24rem;
border-radius: .24rem;
height: .46rem;
display: flex;
align-items: center;
font-size: 0.26rem;
line-height: .46rem;
font-family: Helvetica;
color: #fff;
margin-top: 0.16rem;
}
.card-info {
width: 100%;
margin-top: 0.7rem;
......@@ -364,20 +389,24 @@
display: flex;
flex-direction: column;
align-items: center;
&:first-child {
border-left: none;
}
.item-title {
font-size: 0.28rem;
line-height: 0.8;
color: #fff;
}
.item-content {
font-size: 0.48rem;
line-height: 0.8;
color: #fff;
margin-top: 0.12rem;
}
.item-money {
font-size: 0.48rem;
line-height: 0.8;
......@@ -386,13 +415,24 @@
}
}
}
.statusnormal{
background: transparent !important;
box-shadow: 0 0 0 0 !important;
background: url("../images/SignUp/detail_bg.png") no-repeat !important;
background-position: 130px !important;
background-size: 14px 14px !important;
.statusnormal {
position:absolute;
bottom: 0.38rem;
display: flex;
justify-content: center;
align-content: center;
color: #fff;
font-size: 0.34rem;
font-weight: 600;
img {
display: flex;
margin-left: 4px;
width: 15px;
height: 15px;
}
}
.card-btn {
width: 4rem;
height: 0.88rem;
......@@ -412,16 +452,18 @@
bottom: 0.38rem;
left: 50%;
transform: translateX(-50%);
.card-btn-tip {
font-size: 0.22rem;
margin-top: 0.06rem;
font-weight: normal;
}
.btn-title{
.btn-title {
font-size: .34rem;
font-weight: bold;
}
}
}
}
}
</style>
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