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>
`
<template>
<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>
<!-- 挑战赛卡片 -->
<div class="challenge-card" v-for="item in gameList" @click="clickCard(item)">
<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 v-for="(item,index) in gameList">
<div class="notice-container" v-if="index===0&&pauseData.is_pause">
<img src="../assets/bj.png" alt="">
<div class="pause_data">
<div class="notice-title">平台公告</div>
<div class="notice-text">尊敬的用户:</div>
<div class="notice-desc">
因公众号业务调整,本平台将于{{pauseData.pause_time}}暂停服务,钱包还有余额的用户请尽快提现。如有疑问,请联系我们人工客服进行处理,谢谢配合!
</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 class="info-item">
<div class="item-title">参与人数</div>
<div class="item-content">{{item.total_signup || 0}}</div>
</div>
<div v-else class="challenge-card" @click="clickCard(item)">
<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 class="info-item">
<div class="item-title">总奖励金</div>
<div class="item-money">{{item.total_money || '0.00'}}</div>
<!-- status 1 未开始 0 比赛中 2 已结束 3 已淘汰-->
<!-- already_join 0 未参赛 1 已参赛 -->
<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>
<!-- 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>
<!-- 没有关注公众号弹窗 -->
......@@ -46,343 +68,484 @@
</div>
</div>
<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>
</template>
<script>
import NoticeBonus from "@/components/NoticeBonus.vue";
import Reborn from "@/components/Reborn.vue";
import ShareModal from "@/components/ShareModal.vue";
import {
daka_index,
select_follow
} from "@/components/axios/api";
export default {
name: "SignUp",
components: {
NoticeBonus,
Reborn,
ShareModal
},
data() {
return {
gameList: [],
followInfo: {},
needFollow: false,
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" });
}
import NoticeBonus from "@/components/NoticeBonus.vue";
import Reborn from "@/components/Reborn.vue";
import ShareModal from "@/components/ShareModal.vue";
import Notice from "@/components/notice.vue";
import FollowDialog from "@/components/FollowDialog.vue";
import {
pause_project,
daka_index,
select_follow
} from "@/components/axios/api";
export default {
name: "SignUp",
components: {
Notice,
NoticeBonus,
Reborn,
FollowDialog,
ShareModal
},
// 关注公众号
getFollowInfo() {
select_follow().then(res => {
if (res.code == 0) {
this.followInfo = res.data;
sessionStorage.setItem("followInfo", JSON.stringify(res.data));
}
});
data() {
return {
isShowFollow: false,
isKefu: 1,
pauseData: {},
isShowNotice: true,
gameList: [],
followInfo: {},
needFollow: false,
showShareModal: false,
};
},
// 关注公众号弹框
closePopup() {
this.needFollow = false;
created() {
this.getPageData();
this.getFollowInfo();
this.getPauseData();
},
// 获取页面数据
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;
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"];
}
});
}
},
// 分享
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);
methods: {
toggleFollowDialog() {
this.isShowFollow = !this.isShowFollow
},
toggleNotice() {
this.isShowNotice = !this.isShowNotice
},
getPauseData() {
pause_project().then(res => {
if (res.code === 0) {
this.pauseData = res.data
}
};
wx.updateAppMessageShareData(option1);
//微信分享菜单测试
let option2 = {
title: result.title, // 分享标题
desc: result.desc, // 分享描述
link: links, // 分享链接
imgUrl: result.img_url, // 分享图标
success: function(res) {
console.log("option2Success", res);
})
},
// 点击卡片整块的跳转
clickCard(item) {
if (item.status === 1 && item.already_join === 0) { // 未开始 && 未参赛 => 去报名页
if (this.followInfo.follow) {
if(this.pauseData.can_signup){
this.$router.push({name: 'PartakeChallenge'});
}
} else {
this.needFollow = true;
}
};
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);
} 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);
}
};
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;
sessionStorage.setItem("ChallengeDetailData", JSON.stringify(item));
this.$router.push({name: "ChallengeDetail"});
}
},
// 关注公众号
getFollowInfo() {
select_follow().then(res => {
if (res.code == 0) {
this.followInfo = res.data;
sessionStorage.setItem("followInfo", JSON.stringify(res.data));
}
};
// wx.onMenuShareTimeline(option4);
console.log("option", option1, option2, option3, option4);
});
},
closeShareModal() {
this.showShareModal = false;
});
},
// 关注公众号弹框
closePopup() {
this.needFollow = 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>
<style lang="less" scoped>
.sign-up-page {
width: 100%;
height: 100%;
overflow-y: scroll;
-webkit-overflow-scrolling: touch;
background-color: rgb(70, 88, 149);
background-image: url(../images/SignUp/sy_beijing.png);
background-repeat: no-repeat;
background-size: 100%;
background-attachment: scroll;
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;
<style lang="stylus" scoped>
.sign-up-page {
width: 100%;
height: 100%;
overflow-y: scroll;
-webkit-overflow-scrolling: touch;
background-color: rgb(70, 88, 149);
background-image: url(../images/SignUp/sy_beijing.png);
background-repeat: no-repeat;
background-size: 100%;
background-attachment: scroll;
position: relative;
display: flex;
flex-direction: column;
align-items: center;
position: relative;
.corner-marker {
width: 1.39rem;
height: 1.39rem;
.reborn-container {
position: absolute;
top: -0.02rem;
right: -0.02rem;
top: .38rem;
right: .15rem;
}
.card-title {
font-size: 0.34rem;
line-height: 1;
color: #fff;
margin-top: 0.28rem;
.daka-record {
width: 1.06rem;
height: 0.9rem;
display: block;
position: absolute;
top: 1.58rem;
right: .15rem;
}
.card-time {
background: rgba(0, 0, 0, 0.1);
padding: 0 0.24rem;
border-radius: 0.24rem;
height: 0.46rem;
display: flex;
align-items: center;
font-size: 0.26rem;
font-family: Helvetica;
color: #fff;
margin-top: 0.16rem;
.notice-broadcast {
flex-shrink: 0;
margin: 4.5rem 0 0.18rem;
}
.card-info {
.notice-container {
width: 6.9rem;
margin-bottom: 0.4rem;
position: relative;
flex-shrink 0
}
.notice-container img{
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;
flex-direction: column;
align-items: center;
justify-content: space-between;
.info-item {
flex: 1;
border-left: 0.02rem solid #fff;
position: relative;
.corner-marker {
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;
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;
font-size: 0.26rem;
font-family: Helvetica;
color: #fff;
margin-top: 0.16rem;
}
.card-info {
width: 100%;
margin-top: 0.7rem;
display: flex;
align-items: center;
justify-content: space-between;
.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;
color: #fcf776;
margin-top: 0.12rem;
}
.statusnormal {
position: absolute;
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 {
position: absolute;
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 {
.card-btn {
width: 4rem;
height: 0.88rem;
background: #fabd21;
border-radius: 0.74rem;
box-shadow: 0 0.02rem 0.04rem 0 rgba(0, 0, 0, 0.2);
display: flex;
margin-left: 4px;
width: 15px;
height: 15px;
flex-direction: column;
align-items: center;
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;
background: #fabd21;
border-radius: 0.74rem;
box-shadow: 0 0.02rem 0.04rem 0 rgba(0, 0, 0, 0.2);
}
.game-auth-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-auth-container {
border-radius: 0.08rem;
padding-bottom: 0.4rem;
display: flex;
flex-direction: column;
align-items: center;
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%);
position: relative;
.bg-img {
width: 6.4rem;
height: 7.08rem;
display: block;
}
.close-btn {
width: 0.58rem;
height: 0.58rem;
position: absolute;
top: -0.88rem;
right: 0;
}
}
}
}
.game-auth-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-auth-container {
border-radius: 0.08rem;
padding-bottom: 0.4rem;
display: flex;
flex-direction: column;
align-items: center;
position: relative;
.bg-img {
width: 6.4rem;
height: 7.08rem;
display: block;
}
.close-btn {
width: 0.58rem;
height: 0.58rem;
position: absolute;
top: -0.88rem;
right: 0;
}
.public-btn {
width: 1.02rem;
height: 0.88rem;
display: block;
position: absolute;
left: 0.3rem;
top: 0.38rem;
}
.pause_data {
position absolute
left 0
top 0
width 100%
height 100%
text-align center;
box-sizing border-box
padding 0 0.55rem
}
.notice-title {
margin-top .4rem;
margin-bottom: 0.39rem;
font-size: 0.48rem;
font-family: PingFang SC;
font-weight: 800;
color: rgba(255, 255, 255, 1);
}
.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>
......@@ -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