Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
RB_StrongestBrain_250520
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
SparkProjects
RB_StrongestBrain_250520
Commits
f2be2cb4
Commit
f2be2cb4
authored
May 21, 2025
by
cc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
9a4b585a
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
236 additions
and
17 deletions
+236
-17
package.json
package.json
+1
-0
pnpm-lock.yaml
pnpm-lock.yaml
+35
-0
HomePage.tsx
src/pages/HomePage/HomePage.tsx
+5
-2
longImgPop.less
src/panels/longImgPop/longImgPop.less
+75
-0
longImgPop.tsx
src/panels/longImgPop/longImgPop.tsx
+105
-0
taskpop.less
src/panels/taskpop/taskpop.less
+4
-4
task.ts
src/store/task.ts
+11
-11
No files found.
package.json
View file @
f2be2cb4
...
...
@@ -27,6 +27,7 @@
"
crypto-js
"
:
"
^4.2.0
"
,
"
cssnano
"
:
"
^7.0.6
"
,
"
detect-collisions
"
:
"
^9.26.4
"
,
"
dplayer
"
:
"
^1.27.1
"
,
"
duiba-utils
"
:
"
^2.0.2
"
,
"
emittery
"
:
"
^1.1.0
"
,
"
gsap
"
:
"
^3.12.7
"
,
...
...
pnpm-lock.yaml
View file @
f2be2cb4
...
...
@@ -56,6 +56,9 @@ importers:
detect-collisions
:
specifier
:
^9.26.4
version
:
9.26.4
dplayer
:
specifier
:
^1.27.1
version
:
1.27.1
duiba-utils
:
specifier
:
^2.0.2
version
:
2.0.2
...
...
@@ -2030,6 +2033,9 @@ packages:
resolution
:
{
integrity
:
sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==
}
engines
:
{
node
:
'
>=
0.4'
}
axios@1.2.3
:
resolution
:
{
integrity
:
sha512-pdDkMYJeuXLZ6Xj/Q5J3Phpe+jbGdsSzlQaFVkMQzRUL05+6+tetX8TV3p4HrU4kzuO9bt+io/yGQxuyxA/xcw==
,
tarball
:
http
:
//npm.dui88.com
:
80/axios/-/axios-1.2.3.tgz
}
axios@1.9.0
:
resolution
:
{
integrity
:
sha512-re4CqKTJaURpzbLHtIi6XpDv20/CnpXOtjRY5/CU32L8gU8ek9UIivcfvSWvmKEngmVbrUtPpdDwWDWL7DNHvg==
}
...
...
@@ -2051,6 +2057,9 @@ packages:
balanced-match@1.0.2
:
resolution
:
{
integrity
:
sha1-6D46fj8wCzTLnYf2FfoMvzV2kO4=
}
balloon-css@1.2.0
:
resolution
:
{
integrity
:
sha512-urXwkHgwp6GsXVF+it01485Z2Cj4pnW02ICnM0TemOlkKmCNnDLmyy+ZZiRXBpwldUXO+aRNr7Hdia4CBvXJ5A==
,
tarball
:
http
:
//npm.dui88.com
:
80/balloon-css/-/balloon-css-1.2.0.tgz
}
base64-arraybuffer@1.0.2
:
resolution
:
{
integrity
:
sha512-I3yl4r9QB5ZRY3XuJVEPfc2XhZO6YweFPI+UovAzn+8/hb3oJ6lnysaFcjVpkCPfVWFUDvoZ8kmVDP7WyRtYtQ==
}
engines
:
{
node
:
'
>=
0.6.0'
}
...
...
@@ -2459,6 +2468,9 @@ packages:
resolution
:
{
integrity
:
sha512-47qPchRCykZC03FhkYAhrvwU4xDBFIj1QPqaarj6mdM/hgUzfPHcpkHJOn3mJAufFeeAxAzeGsr5X0M4k6fLZQ==
}
engines
:
{
node
:
'
>=12'
}
dplayer@1.27.1
:
resolution
:
{
integrity
:
sha512-2laBMXs5V1B9zPwJ7eAIw/OBo+Xjvy03i4GHTk3Cg+IWbrq8rKMFO0fFr6ClAYotYOCcFGOvaJDkOZcgKllsCA==
,
tarball
:
http
:
//npm.dui88.com
:
80/dplayer/-/dplayer-1.27.1.tgz
}
duiba-utils@1.0.13
:
resolution
:
{
integrity
:
sha512-VEFzmfiujSZcl40jgRhkuv1lAsvLxhfArENFbI1NXxAz9iihdGOH1SdTektWaH5hrwsWvy/6kB088KzxJ+QvtA==
}
...
...
@@ -3884,6 +3896,9 @@ packages:
resolution
:
{
integrity
:
sha1-foz42PW48jnBvGi+tOt4Vn1XLvg=
}
engines
:
{
node
:
'
>=0.4.0'
}
promise-polyfill@8.3.0
:
resolution
:
{
integrity
:
sha512-H5oELycFml5yto/atYqmjyigJoAo3+OXwolYiH7OfQuYlAqhxNvTfiNMbV9hsC6Yp83yE5r2KTVmtrG6R9i6Pg==
,
tarball
:
http
:
//npm.dui88.com
:
80/promise-polyfill/-/promise-polyfill-8.3.0.tgz
}
protobufjs@7.5.0
:
resolution
:
{
integrity
:
sha512-Z2E/kOY1QjoMlCytmexzYfDm/w5fKAiRwpSzGtdnXW1zC88Z2yXazHHrOtwCzn+7wSxyE8PYM4rvVcMphF9sOA==
}
engines
:
{
node
:
'
>=12.0.0'
}
...
...
@@ -6496,6 +6511,14 @@ snapshots:
dependencies
:
possible-typed-array-names
:
1.1.0
axios@1.2.3
:
dependencies
:
follow-redirects
:
1.15.9
form-data
:
4.0.2
proxy-from-env
:
1.1.0
transitivePeerDependencies
:
-
debug
axios@1.9.0
:
dependencies
:
follow-redirects
:
1.15.9
...
...
@@ -6530,6 +6553,8 @@ snapshots:
balanced-match@1.0.2
:
{}
balloon-css@1.2.0
:
{}
base64-arraybuffer@1.0.2
:
{}
base64-js@1.5.1
:
{}
...
...
@@ -6978,6 +7003,14 @@ snapshots:
dotenv@16.4.7
:
{}
dplayer@1.27.1
:
dependencies
:
axios
:
1.2.3
balloon-css
:
1.2.0
promise-polyfill
:
8.3.0
transitivePeerDependencies
:
-
debug
duiba-utils@1.0.13
:
{}
duiba-utils@2.0.2
:
{}
...
...
@@ -8354,6 +8387,8 @@ snapshots:
progress@2.0.3
:
{}
promise-polyfill@8.3.0
:
{}
protobufjs@7.5.0
:
dependencies
:
'
@protobufjs/aspromise'
:
1.1.2
...
...
src/pages/HomePage/HomePage.tsx
View file @
f2be2cb4
...
...
@@ -15,7 +15,10 @@ class Homepage extends React.Component {
super
(
props
);
}
componentDidMount
():
void
{
// ModalCtrl.showModal(Taskpop);
}
showTask
=
()
=>
{
ModalCtrl
.
showModal
(
Taskpop
);
}
showRank
=
()
=>
{
PageCtrl
.
changePage
(
RankPage
);
...
...
@@ -34,7 +37,7 @@ class Homepage extends React.Component {
<
span
className=
"wenhao"
></
span
>
<
span
className=
"title"
></
span
>
<
span
className=
"draw"
></
span
>
<
span
className=
"task"
></
span
>
<
span
className=
"task"
onClick=
{
this
.
showTask
}
></
span
>
<
div
className=
"matter"
>
<
span
className=
"m_bg"
></
span
>
<
span
className=
"answer"
></
span
>
...
...
src/panels/longImgPop/longImgPop.less
0 → 100644
View file @
f2be2cb4
@import "../../res.less";
.longImgPop {
position: absolute;
width: 100vw;
height: 100vh;
left: 0px;
top: 0px;
overflow-y: auto;
overflow-x: hidden;
background-color: rgba(0, 0, 0, 0.8);
.mainImg {
position: relative;
width: 100%;
height: auto;
}
.back_home {
width: 60px;
height: 60px;
left: 40px;
top: 65px;
position: fixed;
.sparkBg("PrizePage/back.png");
// .sparkBg("TaskPop/longBackBtn.png");
}
.countdown {
width: 113px;
height: 50px;
text-align: center;
position: fixed;
left: 588px;
top: 65px;
color: #fff;
border: 2px solid rgb(255, 255, 255);
border-left: none;
border-radius: 8px;
background-color: rgba(70, 0, 0, 0.302);
box-shadow: inset 0.707px 0.707px 2px 0px rgba(225, 253, 255, 0.83);
font-size: 31px;
text-align: center;
line-height: 50px;
box-sizing: border-box;
}
.v-wrapper {
width: 100%;
height: 100%;
position: absolute;
top: 50%;
transform: translateY(-50%);
}
.vjs-tech {
width: 100%;
position: absolute;
top: 50%;
transform: translateY(-50%);
}
// .dplayer-controller{
// display: none;
// }
#my-player {
width: 100% !important;
// height: 420px;
position: absolute;
top: 50%;
transform: translateY(-50%);
// pointer-events: none;
}
.dplayer-setting-loop {
display: none !important;
}
}
src/panels/longImgPop/longImgPop.tsx
0 → 100644
View file @
f2be2cb4
"use strict"
;
import
React
from
"react"
;
import
{
observer
}
from
"mobx-react"
;
import
"./longImgPop.less"
;
import
{
_throttle
}
from
"@/utils/utils.ts"
;
import
DPlayer
from
"dplayer"
;
import
{
ModalCtrl
}
from
"@/core/ctrls/ModalCtrl"
;
import
Taskpop
from
"../taskpop/taskpop"
;
import
{
Button
}
from
"@grace/ui"
;
@
observer
class
LongImgPop
extends
React
.
Component
{
constructor
(
props
)
{
super
(
props
);
this
.
state
=
{
isFinish
:
false
,
countdownTime
:
15
,
// 单位s
};
this
.
timer
=
""
;
this
.
isStart
=
false
;
this
.
stop
=
false
;
this
.
dp
=
null
;
}
componentDidMount
()
{
console
.
log
(
'this.props?.type'
,
this
.
props
?.
type
)
if
(
this
.
props
?.
type
==
2
)
{
this
.
dp
=
new
DPlayer
({
container
:
this
.
videoNode
,
video
:
{
url
:
this
.
props
?.
imgUrl
,
},
loop
:
true
,
});
this
.
dp
.
on
(
"play"
,
()
=>
{
this
.
startInterval
();
});
this
.
dp
.
on
(
"pause"
,
()
=>
{
// this.endCountDown()
});
}
if
(
this
.
props
?.
noCount
)
{
this
.
setState
({
isFinish
:
true
,
});
}
else
{
if
(
this
.
props
?.
type
==
2
)
return
this
.
startInterval
();
}
}
componentWillUnmount
()
{
if
(
this
.
timer
)
clearInterval
(
this
.
timer
);
}
/** 开始倒计时 */
startInterval
=
()
=>
{
if
(
this
.
timer
)
clearInterval
(
this
.
timer
);
this
.
timer
=
setInterval
(
async
()
=>
{
if
(
this
.
state
.
countdownTime
===
0
)
{
this
.
setState
({
isFinish
:
true
,
});
clearInterval
(
this
.
timer
);
this
.
timer
=
""
;
// 完成任务
const
{
taskSucCb
}
=
this
.
props
||
{};
taskSucCb
&&
taskSucCb
();
return
;
}
this
.
setState
({
countdownTime
:
Math
.
max
(
0
,
this
.
state
.
countdownTime
-
1
),
});
},
1000
);
};
/** 关闭当前页面 */
closeHandle
=
()
=>
{
ModalCtrl
.
closeModal
()
if
(
!
this
.
props
.
noCount
)
{
ModalCtrl
.
showModal
(
Taskpop
)
}
};
render
()
{
const
{
imgUrl
,
type
}
=
this
.
props
||
{};
const
{
isFinish
,
countdownTime
}
=
this
.
state
;
return
(
<
div
className=
"longImgPop"
>
{
type
==
1
&&
<
img
src=
{
imgUrl
}
alt=
""
className=
"mainImg"
/>
}
{
type
==
2
&&
(
<
div
className=
"v-wrapper"
>
<
div
ref=
{
(
node
)
=>
(
this
.
videoNode
=
node
)
}
id=
"my-player"
className=
"video-js"
></
div
>
</
div
>
)
}
<
Button
className=
"back_home"
onClick=
{
this
.
closeHandle
}
></
Button
>
{
!
isFinish
&&
<
span
className=
"countdown"
>
{
`${countdownTime}s`
}
</
span
>
}
</
div
>
);
}
}
export
default
LongImgPop
;
src/panels/taskpop/taskpop.less
View file @
f2be2cb4
...
...
@@ -23,10 +23,10 @@
.sparkBg("TaskPop/icon.png");
}
.close {
width: 6
2
px;
height: 6
2
px;
left: 6
6
8px;
top: -
7
0px;
width: 6
4
px;
height: 6
4
px;
left: 6
4
8px;
top: -
1
0px;
position: absolute;
.sparkBg("TaskPop/close.png");
}
...
...
src/store/task.ts
View file @
f2be2cb4
...
...
@@ -9,6 +9,8 @@ import { isWeChat } from "../utils/share";
import
{
appJump
,
getUrlParam
,
windowJumpUrl
}
from
"../utils/utils"
;
import
{
CHANNEL_PARAMS
,
TASK_CODE
}
from
"../utils/constants"
;
import
{
Toast
}
from
"@grace/ui"
;
import
{
ModalCtrl
}
from
"@/core/ctrls/ModalCtrl"
;
import
LongImgPop
from
"@/panels/longImgPop/longImgPop"
;
const
taskStore
=
makeAutoObservable
({
/** 当前任务 */
...
...
@@ -50,17 +52,15 @@ const taskStore = makeAutoObservable({
break
;
//增员介绍 海报or视频
case
code
?.
indexOf
(
"browse_zeng_yuan"
)
>
-
1
:
// if(code == "browser_zeng_yuan_1"){
// modalStore.closePop("Taskpop");
// modalStore.pushPop("LongImgPop", {
// imgUrl: jumpUrl,
// taskSucCb: async () => {
// await this.complete(item);
// },
// noCount: false,
// type: code == "browse_zeng_yuan_1" ? 1 : 2, //1海报 2视频
// });
// }
ModalCtrl
.
closeModal
();
ModalCtrl
.
showModal
(
LongImgPop
,{
imgUrl
:
jumpUrl
,
taskSucCb
:
async
()
=>
{
await
this
.
complete
(
item
);
},
noCount
:
false
,
type
:
code
==
"browse_zeng_yuan_1"
?
1
:
2
,
//1海报 2视频
})
break
;
// 七秒浏览 or 税优关爱百万任务
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment