Commit 25b15b3d by liu zhuoyu

暂停服务

parent fa970a99
...@@ -36,13 +36,13 @@ ...@@ -36,13 +36,13 @@
<!--&gt;获取邀请卡--> <!--&gt;获取邀请卡-->
<!--</div>--> <!--</div>-->
</div> </div>
<div v-if="invite_num>0" @click="joinFree"> <!--<div v-if="invite_num>0" @click="joinFree">-->
<div class="text_btn"> <!--<div class="text_btn">-->
<span>立即免押金报名</span> <!--<span>立即免押金报名</span>-->
<img class="free_arrow" src="../assets/free_arrow.png" alt=""> <!--<img class="free_arrow" src="../assets/free_arrow.png" alt="">-->
</div> <!--</div>-->
<div class="sub_desc" style="margin-top: .15rem">须当日23:50前完成报名, 如已报名可次日使用</div> <!--<div class="sub_desc" style="margin-top: .15rem">须当日23:50前完成报名, 如已报名可次日使用</div>-->
</div> <!--</div>-->
</div> </div>
<ShareModal <ShareModal
v-on:close="closeShareModal" v-on:close="closeShareModal"
......
...@@ -450,6 +450,16 @@ export function select_follow(){ ...@@ -450,6 +450,16 @@ export function select_follow(){
}) })
} }
export function pause_project() {
return fetch({
url: api.pause_project,
method: 'GET',
params: {
}
})
}
//有新接口的时候像上面那样再来一次 //有新接口的时候像上面那样再来一次
// //修改昵称接口 // //修改昵称接口
......
...@@ -10,7 +10,9 @@ export function fetch(options) { ...@@ -10,7 +10,9 @@ export function fetch(options) {
} }
if (!window['userData']) { if (!window['userData']) {
localStorage.setItem('last_url', location.hash.slice(1)) localStorage.setItem('last_url', location.hash.slice(1))
location.replace('#/Author') if (process.env.NODE_ENV === 'production') {
location.replace('#/Author');
}
} }
} }
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
...@@ -18,7 +20,7 @@ export function fetch(options) { ...@@ -18,7 +20,7 @@ export function fetch(options) {
//所有的请求都会带上这些配置,比如全局都要用的身份信息等。 //所有的请求都会带上这些配置,比如全局都要用的身份信息等。
headers: { headers: {
'Content-Type': 'application/json', 'Content-Type': 'application/json',
'Authorization': process.env.NODE_ENV === 'production' ? (window['userData'] ? window['userData'].token : '') : "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAiLCJvcGVuX2lkIjoiMTExMTExMTExMTExMTExMTExMTExMTExMTExMSIsInVuaW9uX2lkIjoiMTExMTExMTExMTExMTExMTExMTExMTExMTExMSIsImV4cCI6MTU1NjY1NTA5NH0.TtTHx-6Qy00vxDJULrqSBpluCrf9Pvwr4nBLw2cCYzo" 'Authorization': process.env.NODE_ENV === 'production' ? (window['userData'] ? window['userData'].token : '') : "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiZjNhY2E1ZWYwMTk0NDcxZGIzOGQxNTVjMTEyYTU4NTIiLCJvcGVuX2lkIjoib2FwY0cxaFU0c0EwUDdFc2ZvX1VtNmkwOTFtTSIsInVuaW9uX2lkIjoib0xfc0R4SUpuY0FocTBnYTFKOFdlTUlGaFNnRSIsImV4cCI6MTU3MzY0NjM5MX0.pO22JcmEwpGFwZfxeodcPGApYRg6Ss_KkljIi98cGFw"
// 'token_in_header': global_.token,//token从全局变量那里传过来 // 'token_in_header': global_.token,//token从全局变量那里传过来
}, },
timeout: 30 * 1000 // 30秒超时 timeout: 30 * 1000 // 30秒超时
...@@ -35,7 +37,9 @@ export function fetch(options) { ...@@ -35,7 +37,9 @@ export function fetch(options) {
if (error.response.status == 401) { if (error.response.status == 401) {
localStorage.setItem('last_url', location.hash.slice(1)) localStorage.setItem('last_url', location.hash.slice(1))
localStorage.setItem('walk_userData', '') localStorage.setItem('walk_userData', '')
location.replace('#/Author') if (process.env.NODE_ENV === 'production') {
location.replace('#/Author');
}
} else { } else {
reject(error) reject(error)
} }
......
...@@ -85,4 +85,5 @@ export default { ...@@ -85,4 +85,5 @@ export default {
select_follow: `${api}/api/v1/select_follow`, select_follow: `${api}/api/v1/select_follow`,
// 资金明细 // 资金明细
withdraw_detail: `${api}/api/v1/withdraw_detail`, withdraw_detail: `${api}/api/v1/withdraw_detail`,
} pause_project: `${api}/api/v1/pause_project`,
\ No newline at end of file }
<template>
<div class="notice">
<div class="container">
<div class="content">
<img class="bg" src="../assets/pause/bk1.png" alt="">
<div class="content-box">
<div class="title">平台公告</div>
<p class="desc">尊敬的用户:因公众号业务调整,本平台将于 <span>{{pauseData.pause_time}}</span>暂停服务,钱包还有余额的用户请尽快提现。如有疑问,请联系我们人工客服进行处理,谢谢配合!
</p>
<div class="text">客服微信号:{{pauseData.kefu_weixin}}</div>
<div class="text">人工客服在线时间:{{pauseData.online_time}}</div>
<div class="date">公告时间:<span>{{pauseData.notice_time}}</span></div>
</div>
</div>
<div class="btn" @click="close">好的</div>
</div>
</div>
</template>
<script>
import {
pause_project,
} from "@/components/axios/api";
export default {
name: "notice",
data() {
return {
}
},
created() {
// this.getData()
},
props:['pauseData'],
methods: {
close() {
this.$emit('close')
},
getData() {
pause_project().then(res => {
if (res.code === 0) {
this.pauseData = res.data
}
})
}
}
}
</script>
<style scoped>
.notice {
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.6);
position: fixed;
left: 0;
top: 0;
display: flex;
justify-content: center;
align-items: center;
z-index: 2;
}
.container {
width: 6.4rem;
height: 8.6rem;
background: rgba(246, 244, 255, 1);
border-radius: 0.2rem;
}
.content {
width: 5.93rem;
height: 6.27rem;
margin: 0.31rem auto 0.52rem;
position: relative;
}
.bg {
width: 100%;
height: 100%;
display: block;
}
.content-box {
width: 100%;
height: 100%;
position: absolute;
left: 0;
top: 0;
box-sizing: border-box;
padding: 0 0.37rem;
}
.title {
font-size: 0.48rem;
font-weight: 800;
color: rgba(51, 51, 51, 1);
margin-top: 0.4rem;
line-height: 1;
text-align: center;
}
.desc {
font-size: 0.28rem;
font-weight: 500;
color: rgba(51, 51, 51, 1);
line-height: 0.5rem;
text-align: left;
text-indent: .56rem;
margin-top: 0.34rem;
}
.desc span {
font-weight: bold;
text-decoration: underline;
}
.text {
font-size: 0.28rem;
font-weight: 500;
color: rgba(51, 51, 51, 1);
line-height: 0.5rem;
text-align: left;
}
.date {
font-size: 0.28rem;
font-weight: 500;
color: rgba(51, 51, 51, 1);
line-height: 0.5rem;
text-align: right;
margin-top: 0.56rem;
}
.date span {
font-weight: bold;
}
.btn {
width: 4.52rem;
height: 0.88rem;
background: rgba(247, 186, 71, 1);
border-radius: 0.44rem;
display: flex;
justify-content: center;
align-items: center;
line-height: 1;
font-size: 0.38rem;
font-weight: 800;
color: rgba(255, 255, 255, 1);
margin: 0.52rem auto 0;
}
</style>
...@@ -65,7 +65,7 @@ ...@@ -65,7 +65,7 @@
</swiper> </swiper>
<div class="func-btn green-btn" @click="inviteFriend" v-if="record_list.length&&record_list[0].status === 0">邀请好友一起比赛</div> <div class="func-btn green-btn" @click="inviteFriend" v-if="record_list.length&&record_list[0].status === 0">邀请好友一起比赛</div>
<div class="func-btn" @click="changeXcxPopup()" v-else>提交今日步数</div> <div class="func-btn" @click="changeXcxPopup()" v-else>提交今日步数</div>
<div class="next-func-btn" v-if="next_signup" @click="joinNextGame()">{{next_period?'邀请好友一起比赛':'报名下一期'}}</div> <!--<div class="next-func-btn" v-if="next_signup" @click="joinNextGame()">{{next_period?'邀请好友一起比赛':'报名下一期'}}</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="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-rule-container" @click="goOtherPage('Rule')"> <div class="game-rule-container" @click="goOtherPage('Rule')">
<img src="../images/HaveJoinedGame/que1.png"> <img src="../images/HaveJoinedGame/que1.png">
...@@ -118,7 +118,7 @@ ...@@ -118,7 +118,7 @@
</div> </div>
<div class="popup-text6">{{popupData.target_steps}}步达标,今天走了{{popupData.step_num}}步</div> <div class="popup-text6">{{popupData.target_steps}}步达标,今天走了{{popupData.step_num}}步</div>
<div class="popup-text7">已达标{{popupData.days}}天,契约金已返还至你的钱包</div> <div class="popup-text7">已达标{{popupData.days}}天,契约金已返还至你的钱包</div>
<div class="popup-btn1 yellow-btn" @click="joinNextGame()">报名下一期</div> <!--<div class="popup-btn1 yellow-btn" @click="joinNextGame()">报名下一期</div>-->
<img class="close-btn" src="../images/common/pop_ic_close.png" @click="closePopup()"> <img class="close-btn" src="../images/common/pop_ic_close.png" @click="closePopup()">
</div> </div>
</div> </div>
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<div class="bottom-tab" @click="selectTab('SignUp')"> <div class="bottom-tab" @click="selectTab('SignUp')">
<div :class="['text', currentPage()==='SignUp'?'active':'']">健步挑战赛</div> <div :class="['text', currentPage()==='SignUp'?'active':'']">健步挑战赛</div>
</div> </div>
<div class="bottom-tab" @click="selectTab('nowGame')"> <div class="bottom-tab" @click="selectTab('nowGame')" v-if="!pauseData.is_pause">
<div :class="['text', (currentPage()==='MainPagePartakeChallenge'||currentPage()==='MainPageHaveJoinedGame')?'active':'']">{{index1Name}}</div> <div :class="['text', (currentPage()==='MainPagePartakeChallenge'||currentPage()==='MainPageHaveJoinedGame')?'active':'']">{{index1Name}}</div>
</div> </div>
<div class="bottom-tab" @click="selectTab('UserCenter')"> <div class="bottom-tab" @click="selectTab('UserCenter')">
...@@ -16,15 +16,29 @@ ...@@ -16,15 +16,29 @@
</template> </template>
<script> <script>
import {
pause_project,
} from "@/components/axios/api";
export default { export default {
name: "MainPage", name: "MainPage",
data() { data() {
return { return {
pauseData:{}
} }
}, },
created(){ created(){
this.getPauseData();
}, },
methods: { methods: {
getPauseData() {
pause_project().then(res => {
if (res.code === 0) {
this.pauseData = res.data
}
})
},
selectTab(item) { selectTab(item) {
if (item === 'nowGame') { if (item === 'nowGame') {
if (true) { if (true) {
...@@ -96,4 +110,4 @@ ...@@ -96,4 +110,4 @@
} }
} }
} }
</style> </style>
\ No newline at end of file
<template> <template>
<div class="partake-challenge-page"> <div class="partake-challenge-page">
<img class="public-btn" src="../assets/ggtz.png" alt="" @click="toggleNotice">
<Title class="page-title" title=" " v-on:goback="goback" show_back="true" v-if="currentPage()==='PartakeChallenge'"></Title> <Title class="page-title" title=" " v-on:goback="goback" show_back="true" v-if="currentPage()==='PartakeChallenge'"></Title>
<!-- 每日运动打卡健步挑战赛 --> <!-- 每日运动打卡健步挑战赛 -->
<div class="game-partake-container"> <div class="game-partake-container">
...@@ -33,7 +34,8 @@ ...@@ -33,7 +34,8 @@
</div> </div>
</div> </div>
<div class="game-partake-time">比赛时间:{{startTime}} 00:00 — {{endTime}} 24:00</div> <div class="game-partake-time">比赛时间:{{startTime}} 00:00 — {{endTime}} 24:00</div>
<div class="game-partake-btn" @click="payToSign()">立即报名</div> <div class="game-partake-btn" @click="payToSign()" v-if="pauseData.can_signup">立即报名</div>
<div class="game-partake-btn" v-else>暂停报名</div>
<div class="game-auth-container" @click="bindArgeement()"> <div class="game-auth-container" @click="bindArgeement()">
<img class="auth-checked" src="../images/PartakeChallenge/ic_choose.png" v-if="argeement"> <img class="auth-checked" src="../images/PartakeChallenge/ic_choose.png" v-if="argeement">
<div class="auth-uncheck" v-else></div> <div class="auth-uncheck" v-else></div>
...@@ -83,6 +85,7 @@ ...@@ -83,6 +85,7 @@
<img class="close-btn" src="../images/common/pop_ic_close.png" @click="closePopup()"> <img class="close-btn" src="../images/common/pop_ic_close.png" @click="closePopup()">
</div> </div>
</div> </div>
<Notice v-if="isShowNotice" @close="toggleNotice" :pauseData="pauseData"></Notice>
</div> </div>
</template> </template>
...@@ -90,18 +93,26 @@ ...@@ -90,18 +93,26 @@
import Title from "@/components/Title.vue"; import Title from "@/components/Title.vue";
import PayFailModal from "@/components/PayFailModal.vue"; import PayFailModal from "@/components/PayFailModal.vue";
import Modal from "@/components/Modal.vue"; import Modal from "@/components/Modal.vue";
import { daka_info,select_follow } from "@/components/axios/api"; import { daka_info,pause_project,select_follow } from "@/components/axios/api";
import { dakaPay } from "@/components/axios/api"; import { dakaPay } from "@/components/axios/api";
import Notice from "@/components/notice.vue";
export default { export default {
name: "PartakeChallenge", name: "PartakeChallenge",
components: { components: {
Notice,
Title, Title,
PayFailModal, PayFailModal,
Modal Modal
}, },
data() { data() {
return { return {
isShowFollow: false,
isKefu: 1,
pauseData: {},
isShowNotice: true,
isShowPayFail: false, isShowPayFail: false,
modalTitle: "", modalTitle: "",
modalDesc: "", modalDesc: "",
...@@ -127,12 +138,26 @@ export default { ...@@ -127,12 +138,26 @@ export default {
created() { created() {
this.getPageData(); this.getPageData();
this.getFollowInfo() this.getFollowInfo()
this.getPauseData()
// let followInfo = sessionStorage.getItem('followInfo') // let followInfo = sessionStorage.getItem('followInfo')
// if(followInfo){ // if(followInfo){
// this.followInfo = JSON.parse(followInfo) // this.followInfo = JSON.parse(followInfo)
// } // }
}, },
methods: { methods: {
toggleFollowDialog() {
this.isShowFollow = !this.isShowFollow
},
toggleNotice() {
this.isShowNotice = !this.isShowNotice
},
getPauseData() {
pause_project().then(res => {
if (res.code === 0) {
this.pauseData = res.data
}
})
},
getFollowInfo() { getFollowInfo() {
select_follow().then(res => { select_follow().then(res => {
console.log(res); console.log(res);
...@@ -199,8 +224,8 @@ export default { ...@@ -199,8 +224,8 @@ export default {
payToSign() { payToSign() {
if(!this.followInfo.follow){ if(!this.followInfo.follow){
this.needFollow = true this.needFollow = true
return return
} }
if (!this.argeement) { if (!this.argeement) {
return this.showModal("温馨提示", "勾选同意《用户协议》方可报名~"); return this.showModal("温馨提示", "勾选同意《用户协议》方可报名~");
} }
...@@ -266,7 +291,7 @@ export default { ...@@ -266,7 +291,7 @@ export default {
bindArgeement() { bindArgeement() {
this.argeement = !this.argeement; this.argeement = !this.argeement;
}, },
closePopup() { closePopup() {
this.needFollow = false; this.needFollow = false;
}, },
...@@ -515,4 +540,15 @@ export default { ...@@ -515,4 +540,15 @@ export default {
} }
} }
} }
.public-btn {
width: 1.02rem;
height: 0.88rem;
display: block;
position: absolute;
left: 0.3rem;
top: 0.38rem;
}
</style> </style>
`
<template> <template>
<div class="sign-up-page"> <div class="sign-up-page">
<img class="public-btn" src="../assets/ggtz.png" alt="" @click="toggleNotice">
<!-- 右上角复活卡 --> <!-- 右上角复活卡 -->
<Reborn class="reborn-container"></Reborn> <Reborn class="reborn-container" v-if="!pauseData.is_pause"></Reborn>
<!-- 右上角打卡记录 --> <!-- 右上角打卡记录 -->
<img class="daka-record" src="@/images/SignUp/ic_record.png" @click="$router.push({ name: 'Record' })"> <img class="daka-record" src="@/images/SignUp/ic_record.png" @click="$router.push({ name: 'Record' })" v-if="!pauseData.is_pause">
<!-- 信息广播 --> <!-- 信息广播 -->
<NoticeBonus class="notice-broadcast"></NoticeBonus> <NoticeBonus class="notice-broadcast"></NoticeBonus>
<!-- 挑战赛卡片 --> <!-- 挑战赛卡片 -->
<div class="challenge-card" v-for="item in gameList" @click="clickCard(item)"> <div v-for="(item,index) in gameList">
<img class="corner-marker" src="@/images/SignUp/home_tag_bsz.png" v-if="item.status===0"> <div class="notice-container" v-if="index===0&&pauseData.is_pause">
<img class="corner-marker" src="@/images/SignUp/home_tag_zmz.png" v-if="item.status===1"> <img src="../assets/bj.png" alt="">
<img class="corner-marker" src="@/images/SignUp/home_tag_yjs.png" v-if="item.status===2"> <div class="pause_data">
<div class="card-title">{{item.action}}期健步挑战赛</div> <div class="notice-title">平台公告</div>
<div class="card-time">{{item.already_join===1?'已参赛':'未参赛'}} {{item.period_start}} - {{item.period_end}}</div> <div class="notice-text">尊敬的用户:</div>
<div class="card-info"> <div class="notice-desc">
<div class="info-item" v-if="(item.status===0||item.status===2)&&item.people_cnt"> 因公众号业务调整,本平台将于{{pauseData.pause_time}}暂停服务,钱包还有余额的用户请尽快提现。如有疑问,请联系我们人工客服进行处理,谢谢配合!
<div class="item-title">达标人数</div> </div>
<div class="item-content">{{item.people_cnt || 0}}</div> <div class="notice-text">客服微信号:{{pauseData.kefu_weixin}}</div>
<div class="notice-text">人工客服在线时间:{{pauseData.online_time}}</div>
<div class="notice-text date">公告时间:{{pauseData.notice_time}}</div>
<div class="disable-btn">暂停服务</div>
<div class="confirm" @click="toggleFollowDialog">联系客服</div>
</div> </div>
<div class="info-item"> </div>
<div class="item-title">参与人数</div> <div v-else class="challenge-card" @click="clickCard(item)">
<div class="item-content">{{item.total_signup || 0}}</div> <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.action}}期健步挑战赛</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)&&item.people_cnt">
<div class="item-title">达标人数</div>
<div class="item-content">{{item.people_cnt || 0}}</div>
</div>
<div class="info-item">
<div class="item-title">参与人数</div>
<div class="item-content">{{item.total_signup || 0}}</div>
</div>
<div class="info-item">
<div class="item-title">总奖励金</div>
<div class="item-money">{{item.total_money || '0.00'}}</div>
</div>
</div> </div>
<div class="info-item"> <!-- status 1 未开始 0 比赛中 2 已结束 3 已淘汰-->
<div class="item-title">总奖励金</div> <!-- already_join 0 未参赛 1 已参赛 -->
<div class="item-money">{{item.total_money || '0.00'}}</div> <div class="card-btn" v-if="item.status === 1 && item.already_join === 0&&pauseData.can_signup">参与挑战</div>
<div class="card-btn" v-else-if="item.status === 1 && item.already_join === 0&&!pauseData.can_signup">暂停报名</div>
<div class="card-btn" v-else-if="item.status === 1 && item.already_join === 1" @click.stop="inviteFriend">
邀请好友一起比赛
</div>
<div class="card-btn" v-else-if="item.status === 0 && item.already_join === 1">提交今日步数</div>
<div class="statusnormal" v-else>
<div v-if="item.status === 3 && item.already_join === 1">已淘汰</div>
<div v-else>查看详情</div>
<img src="@/images/SignUp/detail_bg.png">
</div> </div>
</div>
<!-- status 1 未开始 0 比赛中 2 已结束 3 已淘汰-->
<!-- already_join 0 未参赛 1 已参赛 -->
<div class="card-btn" v-if="item.status === 1 && item.already_join === 0">参与挑战</div>
<div class="card-btn" v-else-if="item.status === 1 && item.already_join === 1" @click.stop="inviteFriend">邀请好友一起比赛</div>
<div class="card-btn" v-else-if="item.status === 0 && item.already_join === 1">提交今日步数</div>
<div class="statusnormal" v-else>
<div v-if="item.status === 3 && item.already_join === 1">已淘汰</div>
<div v-else>查看详情</div>
<img src="@/images/SignUp/detail_bg.png">
</div> </div>
</div> </div>
<!-- 没有关注公众号弹窗 --> <!-- 没有关注公众号弹窗 -->
...@@ -46,343 +68,484 @@ ...@@ -46,343 +68,484 @@
</div> </div>
</div> </div>
<ShareModal @close="closeShareModal" v-if="showShareModal"></ShareModal> <ShareModal @close="closeShareModal" v-if="showShareModal"></ShareModal>
<Notice v-if="isShowNotice" @close="toggleNotice" :pauseData="pauseData"></Notice>
<FollowDialog :isKefu="isKefu" v-if="isShowFollow" @close="toggleFollowDialog"></FollowDialog>
</div> </div>
</template> </template>
<script> <script>
import NoticeBonus from "@/components/NoticeBonus.vue"; import NoticeBonus from "@/components/NoticeBonus.vue";
import Reborn from "@/components/Reborn.vue"; import Reborn from "@/components/Reborn.vue";
import ShareModal from "@/components/ShareModal.vue"; import ShareModal from "@/components/ShareModal.vue";
import { import Notice from "@/components/notice.vue";
daka_index, import FollowDialog from "@/components/FollowDialog.vue";
select_follow
} from "@/components/axios/api"; import {
pause_project,
export default { daka_index,
name: "SignUp", select_follow
components: { } from "@/components/axios/api";
NoticeBonus,
Reborn, export default {
ShareModal name: "SignUp",
}, components: {
data() { Notice,
return { NoticeBonus,
gameList: [], Reborn,
followInfo: {}, FollowDialog,
needFollow: false, ShareModal
showShareModal: false,
};
},
created() {
this.getPageData();
this.getFollowInfo();
},
mounted() {
if (window["userData"]) {
this.userData = window["userData"];
} else {
let localUserData = localStorage.getItem("walk_userData");
if (localUserData) {
window["userData"] = JSON.parse(localUserData);
this.userData = window["userData"];
}
}
},
methods: {
// 点击卡片整块的跳转
clickCard(item) {
if (item.status === 1 && item.already_join === 0) { // 未开始 && 未参赛 => 去报名页
if (this.followInfo.follow) {
this.$router.push({ name: 'PartakeChallenge' });
} else {
this.needFollow = true;
}
} else if (item.already_join === 1) { // 已参赛 => 去比赛页
this.$router.push({
name: "HaveJoinedGame",
query: {
week: item.week
}
});
} else { // 去详情页
if (sessionStorage.getItem('userHaveJoinGame') === 'true') {
item.daka_signup = true;
} else {
item.daka_signup = false;
item.newGameWeek = this.gameList[0].week.slice(4,8);
}
sessionStorage.setItem("ChallengeDetailData", JSON.stringify(item));
this.$router.push({ name: "ChallengeDetail" });
}
}, },
// 关注公众号 data() {
getFollowInfo() { return {
select_follow().then(res => { isShowFollow: false,
if (res.code == 0) { isKefu: 1,
this.followInfo = res.data; pauseData: {},
sessionStorage.setItem("followInfo", JSON.stringify(res.data)); isShowNotice: true,
}
});
gameList: [],
followInfo: {},
needFollow: false,
showShareModal: false,
};
}, },
// 关注公众号弹框 created() {
closePopup() { this.getPageData();
this.needFollow = false; this.getFollowInfo();
this.getPauseData();
}, },
// 获取页面数据 mounted() {
getPageData() { if (window["userData"]) {
daka_index().then(res => { this.userData = window["userData"];
if (res.code === 0) { } else {
res.data.forEach(item => { let localUserData = localStorage.getItem("walk_userData");
item.action = item.week.substring(item.week.length - 4); if (localUserData) {
}); window["userData"] = JSON.parse(localUserData);
this.gameList = res.data; this.userData = window["userData"];
} }
}); }
}, },
// 分享 methods: {
inviteFriend() { toggleFollowDialog() {
console.log("inviteFriend"); this.isShowFollow = !this.isShowFollow
this.showShareModal = true; },
let id = this.userData.id; toggleNotice() {
track("free_contract_share"); this.isShowNotice = !this.isShowNotice
let links = `${ },
location.href.split("#")[0].split("?")[0] getPauseData() {
}?inviter=${id}&from_type=free_contract&`; pause_project().then(res => {
shareContent("free_contract").then(res => { if (res.code === 0) {
let result = res.data; this.pauseData = res.data
console.log("分享内容", result, links);
let option1 = {
title: result.title, // 分享标题
desc: result.desc, // 分享描述
link: links, // 分享链接
imgUrl: result.img_url, // 分享图标
success: function(res) {
track("free_contract_share_act");
console.log("option1Success", res);
} }
}; })
wx.updateAppMessageShareData(option1); },
//微信分享菜单测试
let option2 = {
title: result.title, // 分享标题 // 点击卡片整块的跳转
desc: result.desc, // 分享描述 clickCard(item) {
link: links, // 分享链接 if (item.status === 1 && item.already_join === 0) { // 未开始 && 未参赛 => 去报名页
imgUrl: result.img_url, // 分享图标 if (this.followInfo.follow) {
success: function(res) { if(this.pauseData.can_signup){
console.log("option2Success", res); this.$router.push({name: 'PartakeChallenge'});
}
} else {
this.needFollow = true;
} }
}; } else if (item.already_join === 1) { // 已参赛 => 去比赛页
let option3 = { this.$router.push({
title: result.title, // 分享标题 name: "HaveJoinedGame",
desc: result.desc, // 分享描述 query: {
link: links, // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致 week: item.week
imgUrl: result.img_url, // 分享图标 }
success: function(res) { });
// 用户点击了分享后执行的回调函数 } else { // 去详情页
track("free_contract_share_act"); if (sessionStorage.getItem('userHaveJoinGame') === 'true') {
console.log("option3Success", res); item.daka_signup = true;
}, } else {
fail: err => { item.daka_signup = false;
console.log("option3error", err); item.newGameWeek = this.gameList[0].week.slice(4, 8);
} }
}; sessionStorage.setItem("ChallengeDetailData", JSON.stringify(item));
wx.onMenuShareAppMessage(option3); this.$router.push({name: "ChallengeDetail"});
let option4 = { }
title: result.title, // 分享标题 },
link: links, // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致 // 关注公众号
imgUrl: result.img_url, // 分享图标 getFollowInfo() {
success: function(res) { select_follow().then(res => {
console.log("option4Success", res); if (res.code == 0) {
this.showShareModal = false; this.followInfo = res.data;
}, sessionStorage.setItem("followInfo", JSON.stringify(res.data));
fail: err => {
console.log("option4error", err);
this.showShareModal = false;
} }
}; });
// wx.onMenuShareTimeline(option4); },
console.log("option", option1, option2, option3, option4); // 关注公众号弹框
}); closePopup() {
}, this.needFollow = false;
closeShareModal() { },
this.showShareModal = false; // 获取页面数据
getPageData() {
daka_index().then(res => {
if (res.code === 0) {
res.data.forEach(item => {
item.action = item.week.substring(item.week.length - 4);
});
this.gameList = res.data;
}
});
},
// 分享
inviteFriend() {
console.log("inviteFriend");
this.showShareModal = true;
let id = this.userData.id;
track("free_contract_share");
let links = `${
location.href.split("#")[0].split("?")[0]
}?inviter=${id}&from_type=free_contract&`;
shareContent("free_contract").then(res => {
let result = res.data;
console.log("分享内容", result, links);
let option1 = {
title: result.title, // 分享标题
desc: result.desc, // 分享描述
link: links, // 分享链接
imgUrl: result.img_url, // 分享图标
success: function (res) {
track("free_contract_share_act");
console.log("option1Success", res);
}
};
wx.updateAppMessageShareData(option1);
//微信分享菜单测试
let option2 = {
title: result.title, // 分享标题
desc: result.desc, // 分享描述
link: links, // 分享链接
imgUrl: result.img_url, // 分享图标
success: function (res) {
console.log("option2Success", res);
}
};
let option3 = {
title: result.title, // 分享标题
desc: result.desc, // 分享描述
link: links, // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
imgUrl: result.img_url, // 分享图标
success: function (res) {
// 用户点击了分享后执行的回调函数
track("free_contract_share_act");
console.log("option3Success", res);
},
fail: err => {
console.log("option3error", err);
}
};
wx.onMenuShareAppMessage(option3);
let option4 = {
title: result.title, // 分享标题
link: links, // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
imgUrl: result.img_url, // 分享图标
success: function (res) {
console.log("option4Success", res);
this.showShareModal = false;
},
fail: err => {
console.log("option4error", err);
this.showShareModal = false;
}
};
// wx.onMenuShareTimeline(option4);
console.log("option", option1, option2, option3, option4);
});
},
closeShareModal() {
this.showShareModal = false;
}
} }
} };
};
</script> </script>
<style lang="less" scoped> <style lang="stylus" scoped>
.sign-up-page { .sign-up-page {
width: 100%; width: 100%;
height: 100%; height: 100%;
overflow-y: scroll; overflow-y: scroll;
-webkit-overflow-scrolling: touch; -webkit-overflow-scrolling: touch;
background-color: rgb(70, 88, 149); background-color: rgb(70, 88, 149);
background-image: url(../images/SignUp/sy_beijing.png); background-image: url(../images/SignUp/sy_beijing.png);
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: 100%; background-size: 100%;
background-attachment: scroll; background-attachment: scroll;
position: relative; position: relative;
display: flex;
flex-direction: column;
align-items: center;
.reborn-container {
position: absolute;
top: .38rem;
right: .15rem;
}
.daka-record {
width: 1.06rem;
height: 0.9rem;
display: block;
position: absolute;
top: 1.58rem;
right: .15rem;
}
.notice-broadcast {
flex-shrink: 0;
margin: 4.5rem 0 0.18rem;
}
.challenge-card {
flex-shrink: 0;
width: 6.9rem;
height: 4.4rem;
background-image: url(../images/SignUp/sy_dikuang.png);
background-size: 100% 100%;
margin-bottom: 0.4rem;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
position: relative;
.corner-marker { .reborn-container {
width: 1.39rem;
height: 1.39rem;
position: absolute; position: absolute;
top: -0.02rem; top: .38rem;
right: -0.02rem; right: .15rem;
} }
.card-title {
font-size: 0.34rem; .daka-record {
line-height: 1; width: 1.06rem;
color: #fff; height: 0.9rem;
margin-top: 0.28rem; display: block;
position: absolute;
top: 1.58rem;
right: .15rem;
} }
.card-time {
background: rgba(0, 0, 0, 0.1); .notice-broadcast {
padding: 0 0.24rem; flex-shrink: 0;
border-radius: 0.24rem; margin: 4.5rem 0 0.18rem;
height: 0.46rem;
display: flex;
align-items: center;
font-size: 0.26rem;
font-family: Helvetica;
color: #fff;
margin-top: 0.16rem;
} }
.card-info {
.notice-container {
width: 6.9rem;
margin-bottom: 0.4rem;
position: relative;
flex-shrink 0
}
.notice-container img{
width: 100%; width: 100%;
margin-top: 0.7rem; display: block;
}
.challenge-card {
flex-shrink: 0;
width: 6.9rem;
height: 4.4rem;
background-image: url(../images/SignUp/sy_dikuang.png);
background-size: 100% 100%;
margin-bottom: 0.4rem;
display: flex; display: flex;
flex-direction: column;
align-items: center; align-items: center;
justify-content: space-between; position: relative;
.info-item {
flex: 1; .corner-marker {
border-left: 0.02rem solid #fff; width: 1.39rem;
height: 1.39rem;
position: absolute;
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;
border-radius: 0.24rem;
height: 0.46rem;
display: flex; display: flex;
flex-direction: column;
align-items: center; align-items: center;
&:first-child { font-size: 0.26rem;
border-left: none; font-family: Helvetica;
} color: #fff;
.item-title { margin-top: 0.16rem;
font-size: 0.28rem; }
line-height: 0.8;
color: #fff; .card-info {
} width: 100%;
.item-content { margin-top: 0.7rem;
font-size: 0.48rem; display: flex;
line-height: 0.8; align-items: center;
color: #fff; justify-content: space-between;
margin-top: 0.12rem;
.info-item {
flex: 1;
border-left: 0.02rem solid #fff;
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;
color: #fcf776;
margin-top: 0.12rem;
}
} }
.item-money { }
font-size: 0.48rem;
line-height: 0.8; .statusnormal {
color: #fcf776; position: absolute;
margin-top: 0.12rem; bottom: 0.38rem;
left: 50%;
transform: translateX(-50%);
display: flex;
justify-content: center;
align-content: center;
color: #fff;
font-size: 0.34rem;
font-weight: 600;
img {
display: flex;
margin-left: 0.04rem;
width: 0.15rem;
height: 0.15rem;
} }
} }
}
.statusnormal { .card-btn {
position: absolute; width: 4rem;
bottom: 0.38rem; height: 0.88rem;
left: 50%; background: #fabd21;
transform: translateX(-50%); border-radius: 0.74rem;
display: flex; box-shadow: 0 0.02rem 0.04rem 0 rgba(0, 0, 0, 0.2);
justify-content: center;
align-content: center;
color: #fff;
font-size: 0.34rem;
font-weight: 600;
img {
display: flex; display: flex;
margin-left: 4px; flex-direction: column;
width: 15px; align-items: center;
height: 15px; justify-content: center;
font-size: 0.34rem;
font-weight: bold;
letter-spacing: 0.01rem;
line-height: 1;
color: #fff;
position: absolute;
bottom: 0.38rem;
left: 50%;
transform: translateX(-50%);
} }
} }
.card-btn { }
width: 4rem;
height: 0.88rem; .game-auth-popup {
background: #fabd21; position: fixed;
border-radius: 0.74rem; left: 0;
box-shadow: 0 0.02rem 0.04rem 0 rgba(0, 0, 0, 0.2); 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-auth-container {
border-radius: 0.08rem;
padding-bottom: 0.4rem;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
justify-content: center; position: relative;
font-size: 0.34rem;
font-weight: bold; .bg-img {
letter-spacing: 0.01rem; width: 6.4rem;
line-height: 1; height: 7.08rem;
color: #fff; display: block;
position: absolute; }
bottom: 0.38rem;
left: 50%; .close-btn {
transform: translateX(-50%); width: 0.58rem;
height: 0.58rem;
position: absolute;
top: -0.88rem;
right: 0;
}
} }
} }
}
.game-auth-popup { .public-btn {
position: fixed; width: 1.02rem;
left: 0; height: 0.88rem;
top: 0; display: block;
right: 0; position: absolute;
bottom: 0; left: 0.3rem;
z-index: 998; top: 0.38rem;
background: rgba(0, 0, 0, 0.5); }
display: flex;
align-items: center; .pause_data {
justify-content: center; position absolute
.game-auth-container { left 0
border-radius: 0.08rem; top 0
padding-bottom: 0.4rem; width 100%
display: flex; height 100%
flex-direction: column; text-align center;
align-items: center; box-sizing border-box
position: relative; padding 0 0.55rem
.bg-img { }
width: 6.4rem;
height: 7.08rem; .notice-title {
display: block; margin-top .4rem;
} margin-bottom: 0.39rem;
.close-btn { font-size: 0.48rem;
width: 0.58rem; font-family: PingFang SC;
height: 0.58rem; font-weight: 800;
position: absolute; color: rgba(255, 255, 255, 1);
top: -0.88rem; }
right: 0;
} .notice-desc {
text-align: left;
margin-bottom: 0.25rem;
text-indent: .52rem;
font-size: 0.28rem;
font-family: PingFang SC;
font-weight: 500;
color: rgba(204, 254, 255, 1);
line-height: 0.5rem;
}
.notice-text {
text-align: left;
font-size: 0.28rem;
font-family: PingFang SC;
font-weight: 500;
color: rgba(204, 254, 255, 1);
line-height: 0.5rem;
}
.notice-text.date {
text-align right
}
.disable-btn {
width: 5rem;
height: 0.8rem;
border: 0.03rem solid rgba(204, 254, 255, 1);
border-radius: 0.4rem;
font-size: 0.34rem;
font-family: Source Han Sans CN;
font-weight: bold;
color: rgba(204, 254, 255, 1);
display flex;
justify-content center
align-items center
line-height 1
margin 0.6rem auto 0.2rem
}
.confirm {
font-size: 0.24rem;
font-family: PingFang SC;
font-weight: 500;
color: rgba(204, 254, 255, 1);
line-height: 1;
} }
}
</style> </style>
...@@ -23,4 +23,4 @@ if (process.env.NODE_ENV === 'production') { ...@@ -23,4 +23,4 @@ if (process.env.NODE_ENV === 'production') {
config.assetsDir = 'walk_static'; config.assetsDir = 'walk_static';
} }
} }
module.exports = config; module.exports = config;
\ No newline at end of file
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