Commit 25b15b3d by liu zhuoyu

暂停服务

parent fa970a99
......@@ -36,13 +36,13 @@
<!--&gt;获取邀请卡-->
<!--</div>-->
</div>
<div v-if="invite_num>0" @click="joinFree">
<div class="text_btn">
<span>立即免押金报名</span>
<img class="free_arrow" src="../assets/free_arrow.png" alt="">
</div>
<div class="sub_desc" style="margin-top: .15rem">须当日23:50前完成报名, 如已报名可次日使用</div>
</div>
<!--<div v-if="invite_num>0" @click="joinFree">-->
<!--<div class="text_btn">-->
<!--<span>立即免押金报名</span>-->
<!--<img class="free_arrow" src="../assets/free_arrow.png" alt="">-->
<!--</div>-->
<!--<div class="sub_desc" style="margin-top: .15rem">须当日23:50前完成报名, 如已报名可次日使用</div>-->
<!--</div>-->
</div>
<ShareModal
v-on:close="closeShareModal"
......
......@@ -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) {
}
if (!window['userData']) {
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) => {
......@@ -18,7 +20,7 @@ export function fetch(options) {
//所有的请求都会带上这些配置,比如全局都要用的身份信息等。
headers: {
'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从全局变量那里传过来
},
timeout: 30 * 1000 // 30秒超时
......@@ -35,7 +37,9 @@ export function fetch(options) {
if (error.response.status == 401) {
localStorage.setItem('last_url', location.hash.slice(1))
localStorage.setItem('walk_userData', '')
location.replace('#/Author')
if (process.env.NODE_ENV === 'production') {
location.replace('#/Author');
}
} else {
reject(error)
}
......
......@@ -85,4 +85,5 @@ export default {
select_follow: `${api}/api/v1/select_follow`,
// 资金明细
withdraw_detail: `${api}/api/v1/withdraw_detail`,
}
\ No newline at end of file
pause_project: `${api}/api/v1/pause_project`,
}
<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 @@
</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="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="game-rule-container" @click="goOtherPage('Rule')">
<img src="../images/HaveJoinedGame/que1.png">
......@@ -118,7 +118,7 @@
</div>
<div class="popup-text6">{{popupData.target_steps}}步达标,今天走了{{popupData.step_num}}步</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()">
</div>
</div>
......
......@@ -5,7 +5,7 @@
<div class="bottom-tab" @click="selectTab('SignUp')">
<div :class="['text', currentPage()==='SignUp'?'active':'']">健步挑战赛</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>
<div class="bottom-tab" @click="selectTab('UserCenter')">
......@@ -16,15 +16,29 @@
</template>
<script>
import {
pause_project,
} from "@/components/axios/api";
export default {
name: "MainPage",
data() {
return {
pauseData:{}
}
},
created(){
this.getPauseData();
},
methods: {
getPauseData() {
pause_project().then(res => {
if (res.code === 0) {
this.pauseData = res.data
}
})
},
selectTab(item) {
if (item === 'nowGame') {
if (true) {
......@@ -96,4 +110,4 @@
}
}
}
</style>
\ No newline at end of file
</style>
<template>
<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>
<!-- 每日运动打卡健步挑战赛 -->
<div class="game-partake-container">
......@@ -33,7 +34,8 @@
</div>
</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()">
<img class="auth-checked" src="../images/PartakeChallenge/ic_choose.png" v-if="argeement">
<div class="auth-uncheck" v-else></div>
......@@ -83,6 +85,7 @@
<img class="close-btn" src="../images/common/pop_ic_close.png" @click="closePopup()">
</div>
</div>
<Notice v-if="isShowNotice" @close="toggleNotice" :pauseData="pauseData"></Notice>
</div>
</template>
......@@ -90,18 +93,26 @@
import Title from "@/components/Title.vue";
import PayFailModal from "@/components/PayFailModal.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 Notice from "@/components/notice.vue";
export default {
name: "PartakeChallenge",
components: {
Notice,
Title,
PayFailModal,
Modal
},
data() {
return {
isShowFollow: false,
isKefu: 1,
pauseData: {},
isShowNotice: true,
isShowPayFail: false,
modalTitle: "",
modalDesc: "",
......@@ -127,12 +138,26 @@ export default {
created() {
this.getPageData();
this.getFollowInfo()
this.getPauseData()
// let followInfo = sessionStorage.getItem('followInfo')
// if(followInfo){
// this.followInfo = JSON.parse(followInfo)
// }
},
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() {
select_follow().then(res => {
console.log(res);
......@@ -199,8 +224,8 @@ export default {
payToSign() {
if(!this.followInfo.follow){
this.needFollow = true
return
}
return
}
if (!this.argeement) {
return this.showModal("温馨提示", "勾选同意《用户协议》方可报名~");
}
......@@ -266,7 +291,7 @@ export default {
bindArgeement() {
this.argeement = !this.argeement;
},
closePopup() {
this.needFollow = false;
},
......@@ -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>
......@@ -23,4 +23,4 @@ if (process.env.NODE_ENV === 'production') {
config.assetsDir = 'walk_static';
}
}
module.exports = config;
\ No newline at end of file
module.exports = config;
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