Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kww_dayDayGetCredits_250512
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
kww_dayDayGetCredits_250512
Commits
d2f7fa0f
Commit
d2f7fa0f
authored
Oct 13, 2025
by
cc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更改登录后置 待上线
parent
068efc19
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
29 additions
and
0 deletions
+29
-0
main.ts
mock/main.ts
+1
-0
Check.tsx
src/pages/HomePage/Check/Check.tsx
+3
-0
HomePage.tsx
src/pages/HomePage/HomePage.tsx
+5
-0
Sign.tsx
src/pages/HomePage/Sign/Sign.tsx
+1
-0
store.ts
src/store/store.ts
+19
-0
No files found.
mock/main.ts
View file @
d2f7fa0f
...
...
@@ -20,6 +20,7 @@ export default [
storeLimitNum
:
1000
,
continueSignDays
:
3
,
todaySignFlag
:
false
,
login
:
false
,
signRecords
:
new
Array
(
7
).
fill
(
1
).
map
((
_
,
index
)
=>
{
return
{
id
:
index
,
...
...
src/pages/HomePage/Check/Check.tsx
View file @
d2f7fa0f
...
...
@@ -40,6 +40,7 @@ class Check extends React.Component<any, any> {
// 按钮
handlegofinish
=
async
(
type
,
n
,
code
,
title
,
jumpUrl
,
id
)
=>
{
if
(
!
store
.
checkLoginStatus
())
return
;
handleLogClick
(
4
,
id
)
const
{
jfNum
=
0
,
qgNum
=
0
}
=
store
?.
baseInfo
||
{};
if
(
type
===
"xhqg"
)
{
...
...
@@ -69,6 +70,7 @@ class Check extends React.Component<any, any> {
handlegosign
=
_asyncThrottle
((
hasChallengeDay
,
resignJf
,
resignQg
,
type
)
=>
{
if
(
!
store
.
checkLoginStatus
())
return
;
if
(
type
===
'task'
)
handleLogClick
(
5
)
// else if (type === 'calendar') handleLogClick(6)
ModalCtrl
.
showModal
(
Renewmodule
,
{
hasChallengeDay
,
resignJf
,
resignQg
});
...
...
@@ -79,6 +81,7 @@ class Check extends React.Component<any, any> {
})
handlesubscribe
=
_asyncThrottle
(()
=>
{
if
(
!
store
.
checkLoginStatus
())
return
;
// if (store?.homeInfo?.subscribe) return console.log('buxing');
// @ts-ignore
wx
.
miniProgram
.
reLaunch
({
url
:
CFG
.
subUrl
})
...
...
src/pages/HomePage/HomePage.tsx
View file @
d2f7fa0f
...
...
@@ -30,22 +30,27 @@ class HomePage extends React.Component<any, any> {
}
clickPrize
=
()
=>
{
if
(
!
store
.
checkLoginStatus
())
return
;
PageCtrl
.
changePage
(
MyPrize
);
}
clickRule
=
()
=>
{
if
(
!
store
.
checkLoginStatus
())
return
;
PageCtrl
.
changePage
(
Rule
);
}
clickCredits
=
()
=>
{
if
(
!
store
.
checkLoginStatus
())
return
;
wx
.
miniProgram
.
navigateTo
({
url
:
"/packages/user/points?source=duiba"
});
}
clickActPre
=
()
=>
{
if
(
!
store
.
checkLoginStatus
())
return
;
Toast
.
show
(
"活动未开始"
);
}
clickActEnd
=
()
=>
{
if
(
!
store
.
checkLoginStatus
())
return
;
Toast
.
show
(
"活动已结束"
);
}
...
...
src/pages/HomePage/Sign/Sign.tsx
View file @
d2f7fa0f
...
...
@@ -15,6 +15,7 @@ class Sign extends React.Component<any, any> {
}
clickSign
=
_asyncThrottle
(
async
()
=>
{
if
(
!
store
.
checkLoginStatus
())
return
;
const
{
todaySignFlag
}
=
store
.
indexData
;
if
(
todaySignFlag
)
return
;
...
...
src/store/store.ts
View file @
d2f7fa0f
...
...
@@ -94,6 +94,7 @@ class Store {
storeLimitNum
?:
number
,
continueSignDays
?:
number
,
todaySignFlag
?:
boolean
,
login
?:
boolean
,
signRecords
?:
{
id
:
string
,
day
:
number
,
...
...
@@ -139,7 +140,25 @@ class Store {
}
}
/**
* 校验登录状态
*/
checkLoginStatus
()
{
const
{
login
}
=
this
.
indexData
||
{};
if
(
login
===
false
)
{
// 可能会有助力参数啥的 或者打开的是落地页 所以直接把当前href传过去吧
let
midUrl
=
location
.
origin
+
CFG
.
loginMidUrl
+
encodeURIComponent
(
location
.
href
);
if
(
getUrlParam
(
'version'
))
midUrl
+=
`&version=
${
getUrlParam
(
'version'
)}
`
;
const
url
=
`/packages/login/loginPage?source=duiba&sourcePath=
${
encodeURIComponent
(
midUrl
)}
`
;
console
.
info
(
'跳登录页面url:'
,
url
);
wx
.
miniProgram
.
navigateTo
({
url
});
return
false
;
}
return
true
;
}
/**
* 更新首页信息,给倒计时用的
*/
...
...
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