Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
P
pica-new-compaign
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
Close sidebar
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
com.pica.cloud.education.frontend
pica-new-compaign
提交
b5a07f18
提交
b5a07f18
编写于
3月 18, 2020
作者:
Yuanzhao.dai
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修改瓜分阶段bug,优化瓜分逻辑
上级
1cc4820a
变更
6
展开全部
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
7977 行增加
和
8168 行删除
+7977
-8168
main-bg.png
assets/carve-up/main-bg.png
+0
-0
index.vue
components/carve-up/index.vue
+1
-1
index.vue
components/first-enter-dialog/index.vue
+1
-1
loading.vue
components/loading.vue
+38
-0
package-lock.json
package-lock.json
+7892
-8160
index.vue
pages/index.vue
+45
-6
未找到文件。
assets/carve-up/main-bg.png
查看替换文件 @
1cc4820a
浏览文件 @
b5a07f18
368.5 KB
|
W:
|
H:
245.4 KB
|
W:
|
H:
2-up
Swipe
Onion skin
components/carve-up/index.vue
浏览文件 @
b5a07f18
<
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"
...
...
components/first-enter-dialog/index.vue
浏览文件 @
b5a07f18
<
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>
...
...
components/loading.vue
0 → 100644
浏览文件 @
b5a07f18
<
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
package-lock.json
浏览文件 @
b5a07f18
此差异已折叠。
点击以展开。
pages/index.vue
浏览文件 @
b5a07f18
...
@@ -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,27 +179,33 @@ export default {
...
@@ -172,27 +179,33 @@ 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
})
{
},
},
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/
0
7 17:00:00"
)).
getTime
();
//"2020/04/07 17:00:00"
let
carveTime
=
(
new
Date
(
"2020/04/
1
7 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
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录