提交 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> <template>
<section class="carve-up-wrap"> <section class="carve-up-wrap" @touchmove.prevent @click.prevent>
<div class="inter-content carve-container" v-if="isFirstCarve"> <div class="inter-content carve-container" v-if="isFirstCarve">
<img <img
class="main-bg" class="main-bg"
......
<template> <template>
<section class="first-enter-wrap"> <section class="first-enter-wrap" @touchmove.prevent @click.prevent>
<div class="first-enter-container"> <div class="first-enter-container">
<div class="bg-content"> <div class="bg-content">
<p class="title">恭喜您</p> <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
因为 它太大了无法显示 源差异 。您可以改为 查看blob
...@@ -95,6 +95,11 @@ ...@@ -95,6 +95,11 @@
> >
</first-enter-dialog> </first-enter-dialog>
<!--首次进入活动任务弹框———end--> <!--首次进入活动任务弹框———end-->
<!--loading动画-->
<no-ssr>
<this-loading v-if="showLoading">
</this-loading>
</no-ssr>
</div> </div>
</template> </template>
...@@ -105,6 +110,7 @@ import Step from '../components/step'; ...@@ -105,6 +110,7 @@ import Step from '../components/step';
import StatusBar from '../components/bussiness/status-bar'; import StatusBar from '../components/bussiness/status-bar';
import CarveUp from '../components/carve-up'; import CarveUp from '../components/carve-up';
import FirstEnterDialog from '../components/first-enter-dialog'; import FirstEnterDialog from '../components/first-enter-dialog';
import ThisLoading from '../components/loading';
import { import {
checkToken, checkToken,
selectAppModuleParam, selectAppModuleParam,
...@@ -127,7 +133,8 @@ export default { ...@@ -127,7 +133,8 @@ export default {
Step, Step,
StatusBar, StatusBar,
CarveUp, CarveUp,
FirstEnterDialog FirstEnterDialog,
ThisLoading
}, },
data() { data() {
return { return {
...@@ -172,6 +179,9 @@ export default { ...@@ -172,6 +179,9 @@ export default {
hasQualification: true, //是否有资格瓜分 hasQualification: true, //是否有资格瓜分
beanCarveCount: 0, //可瓜分云鹊豆数量 beanCarveCount: 0, //可瓜分云鹊豆数量
unableReason: 0, //3分数不够,4未参加 unableReason: 0, //3分数不够,4未参加
isCarveTime: false, //是否是瓜分阶段
isFirstRefresh: true, //是否没有掉refresh方法
showLoading: false //是否展示loading动画
} }
}, },
async asyncData({ $axios }) { async asyncData({ $axios }) {
...@@ -180,19 +190,22 @@ export default { ...@@ -180,19 +190,22 @@ export default {
created() { created() {
}, },
mounted() { async mounted() {
let _this = this; let _this = this;
if (process.client) { if (process.client) {
_this.activityId = parseInt(_this.$route.query.id) || 9; _this.activityId = parseInt(_this.$route.query.id) || 9;
_this.isWeb = _this.$rocNative.isWeb; _this.isWeb = _this.$rocNative.isWeb;
window.__refresh = function() { window.__refresh = function() {
_this.isFirstRefresh = false;
_this.getUserInfo(); _this.getUserInfo();
} }
} }
/*判断是否是瓜分阶段*/
await _this.getCarveTime()
if(!_this.isWeb && _this.$rocNative.appInit()){ if(!_this.isWeb && _this.$rocNative.appInit()){
_this.getUserInfo(); _this.getUserInfo();
}; };
_this.getActivityTime();
let timeOutId = null; let timeOutId = null;
window.addEventListener( window.addEventListener(
...@@ -228,6 +241,17 @@ export default { ...@@ -228,6 +241,17 @@ export default {
// 获取服务器当前时间 // 获取服务器当前时间
getActivityTime() { getActivityTime() {
getActivityTime().then(res => { 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') { if(res.code == '000000') {
let nowTime = res.data; let nowTime = res.data;
// let lastTime = (new Date("2020/04/06 24:00:00")).getTime(); // let lastTime = (new Date("2020/04/06 24:00:00")).getTime();
...@@ -235,9 +259,13 @@ export default { ...@@ -235,9 +259,13 @@ export default {
// this.taskTimeFlag = false; // 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) { if (carveTime <= nowTime) {
this.getRedPacketsLog(); this.isCarveTime = true;
this.showLoading = true;
} else {
this.isCarveTime = false;
this.showLoading = false;
} }
} }
}); });
...@@ -268,12 +296,22 @@ export default { ...@@ -268,12 +296,22 @@ export default {
if(res.code == '200000' || res.code == '200006') { if(res.code == '200000' || res.code == '200006') {
_this.userMobile = ''; _this.userMobile = '';
delCookie('token'); delCookie('token');
if(_this.isCarveTime) { //瓜分阶段未登录先去登录
if(_this.isFirstRefresh) {
_this.$rocNative.gotoLogin();
} else {
_this.$rocNative.goBack();
}
}
}else { }else {
_this.userMobile = params.userMobile; _this.userMobile = params.userMobile;
delCookie('token'); delCookie('token');
setCookie('token', _this.token); setCookie('token', _this.token);
_this.getSelfAllScore(); _this.getSelfAllScore();
_this.getEncryptId(); _this.getEncryptId();
if(_this.isCarveTime) { //是瓜分阶段的话,获取用户瓜分状态及结果
_this.getRedPacketsLog();
}
} }
}) })
}); });
...@@ -474,6 +512,7 @@ export default { ...@@ -474,6 +512,7 @@ export default {
getRedPacketsLog({ getRedPacketsLog({
activityId: this.activityId activityId: this.activityId
}).then(res => { }).then(res => {
this.showLoading = false;
if(res.data.status == 1) { //红包未拆 if(res.data.status == 1) { //红包未拆
this.isFirstCarve = true; this.isFirstCarve = true;
} else { } else {
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册