提交 710a2768 编写于 作者: huangwensu's avatar huangwensu

Merge branch 'dev-new-campaign-0302' of...

Merge branch 'dev-new-campaign-0302' of http://192.168.110.53/com.pica.cloud.education.frontend/pica-new-compaign into dev-new-campaign-0302
assets/carve-up/main-bg.png

368.5 KB | W: | H:

assets/carve-up/main-bg.png

245.4 KB | W: | H:

assets/carve-up/main-bg.png
assets/carve-up/main-bg.png
assets/carve-up/main-bg.png
assets/carve-up/main-bg.png
  • 2-up
  • Swipe
  • Onion skin
<template>
<section class="carve-up-wrap">
<section class="carve-up-wrap" @touchmove.prevent @click.prevent>
<div class="inter-content carve-container" v-if="isFirstCarve">
<img
class="main-bg"
......
<template>
<section class="first-enter-wrap">
<section class="first-enter-wrap" @touchmove.prevent @click.prevent>
<div class="first-enter-container">
<div class="bg-content">
<p class="title">恭喜您</p>
......
<template>
<section class="loading-wrap" @touchstart.prevent>
<div class="loading-content">
<van-loading type="spinner" color="#fff" />
</div>
</section>
</template>
<script>
export default {
data() {
return {
name: 'about'
}
}
}
</script>
<style lang="less" scoped>
.loading-wrap {
background:rgba(0,0,0,0.5);
position: fixed;
top: 0;
bottom: 0;
right: 0;
left: 0;
display: flex;
justify-content: center;
align-items: center;
z-index: 1000;
.loading-content {
display: flex;
align-items: center;
justify-content: center;
}
}
</style>
\ No newline at end of file
此差异已折叠。
......@@ -95,6 +95,11 @@
>
</first-enter-dialog>
<!--首次进入活动任务弹框———end-->
<!--loading动画-->
<no-ssr>
<this-loading v-if="showLoading">
</this-loading>
</no-ssr>
</div>
</template>
......@@ -105,6 +110,7 @@ import Step from '../components/step';
import StatusBar from '../components/bussiness/status-bar';
import CarveUp from '../components/carve-up';
import FirstEnterDialog from '../components/first-enter-dialog';
import ThisLoading from '../components/loading';
import {
checkToken,
selectAppModuleParam,
......@@ -127,7 +133,8 @@ export default {
Step,
StatusBar,
CarveUp,
FirstEnterDialog
FirstEnterDialog,
ThisLoading
},
data() {
return {
......@@ -172,6 +179,9 @@ export default {
hasQualification: true, //是否有资格瓜分
beanCarveCount: 0, //可瓜分云鹊豆数量
unableReason: 0, //3分数不够,4未参加
isCarveTime: false, //是否是瓜分阶段
isFirstRefresh: true, //是否没有掉refresh方法
showLoading: false //是否展示loading动画
}
},
async asyncData({ $axios }) {
......@@ -180,19 +190,22 @@ export default {
created() {
},
mounted() {
async mounted() {
let _this = this;
if (process.client) {
_this.activityId = parseInt(_this.$route.query.id) || 9;
_this.isWeb = _this.$rocNative.isWeb;
window.__refresh = function() {
_this.isFirstRefresh = false;
_this.getUserInfo();
}
}
/*判断是否是瓜分阶段*/
await _this.getCarveTime()
if(!_this.isWeb && _this.$rocNative.appInit()){
_this.getUserInfo();
};
_this.getActivityTime();
let timeOutId = null;
window.addEventListener(
......@@ -228,6 +241,17 @@ export default {
// 获取服务器当前时间
getActivityTime() {
getActivityTime().then(res => {
if(res.code == '000000') {
let nowTime = res.data;
// let lastTime = (new Date("2020/04/06 24:00:00")).getTime();
// if(lastTime < nowTime) {
// this.taskTimeFlag = false;
// }
}
});
},
async getCarveTime() {
await getActivityTime().then(res => {
if(res.code == '000000') {
let nowTime = res.data;
// let lastTime = (new Date("2020/04/06 24:00:00")).getTime();
......@@ -235,9 +259,13 @@ export default {
// this.taskTimeFlag = false;
// }
//判断是否到瓜分云鹊豆的时间
let carveTime = (new Date("2020/04/07 17:00:00")).getTime();//"2020/04/07 17:00:00"
let carveTime = (new Date("2020/04/17 17:00:00")).getTime();//"2020/04/07 17:00:00"
if (carveTime <= nowTime) {
this.getRedPacketsLog();
this.isCarveTime = true;
this.showLoading = true;
} else {
this.isCarveTime = false;
this.showLoading = false;
}
}
});
......@@ -268,12 +296,22 @@ export default {
if(res.code == '200000' || res.code == '200006') {
_this.userMobile = '';
delCookie('token');
if(_this.isCarveTime) { //瓜分阶段未登录先去登录
if(_this.isFirstRefresh) {
_this.$rocNative.gotoLogin();
} else {
_this.$rocNative.goBack();
}
}
}else {
_this.userMobile = params.userMobile;
delCookie('token');
setCookie('token', _this.token);
_this.getSelfAllScore();
_this.getEncryptId();
if(_this.isCarveTime) { //是瓜分阶段的话,获取用户瓜分状态及结果
_this.getRedPacketsLog();
}
}
})
});
......@@ -474,6 +512,7 @@ export default {
getRedPacketsLog({
activityId: this.activityId
}).then(res => {
this.showLoading = false;
if(res.data.status == 1) { //红包未拆
this.isFirstCarve = true;
} else {
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册