Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
H
hello_taobao
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wildfirecode13
hello_taobao
Commits
b3cfab8b
Commit
b3cfab8b
authored
Sep 11, 2020
by
wildfirecode13
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
0bc61209
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
28 deletions
+39
-28
.DS_Store
.DS_Store
+0
-0
pageshou_ye.js
dist/pages/pageshou_ye/pageshou_ye.js
+39
-28
No files found.
.DS_Store
View file @
b3cfab8b
No preview for this file type
dist/pages/pageshou_ye/pageshou_ye.js
View file @
b3cfab8b
...
@@ -4,6 +4,7 @@ import resList from '../../resconfig/resList'; //import API from '../../api';
...
@@ -4,6 +4,7 @@ import resList from '../../resconfig/resList'; //import API from '../../api';
import
API
from
'../../api'
;
import
API
from
'../../api'
;
import
isEnd
from
'/utils/isEnd'
;
import
isEnd
from
'/utils/isEnd'
;
import
OPEN_PRIZE_STATUS
from
'/utils/OPEN_PRIZE_STATUS'
;
import
OPEN_PRIZE_STATUS
from
'/utils/OPEN_PRIZE_STATUS'
;
let
isAuth
=
0
;
const
app
=
getApp
();
const
app
=
getApp
();
const
{
tbcc
}
=
app
;
const
{
tbcc
}
=
app
;
const
{
commonToast
,
getAuthUserInfo
,
navigateToOutside
}
=
tbcc
.
tb
;
const
{
commonToast
,
getAuthUserInfo
,
navigateToOutside
}
=
tbcc
.
tb
;
...
@@ -27,10 +28,13 @@ Page({
...
@@ -27,10 +28,13 @@ Page({
// 页面加载
// 页面加载
this
.
getAuth
();
this
.
getAuth
();
console
.
info
(
`Page onLoad with query:
${
JSON
.
stringify
(
query
)}
`
);
console
.
info
(
`Page onLoad with query:
${
JSON
.
stringify
(
query
)}
`
);
},
},
gotoVipPage
()
{
gotoVipPage
()
{
console
.
log
(
'isAuth'
,
isAuth
);
if
(
isAuth
===
0
)
{
this
.
getAuth
();
return
;
}
let
{
endTime
,
startTime
}
=
this
.
data
;
let
{
endTime
,
startTime
}
=
this
.
data
;
// 判断活动时间
// 判断活动时间
let
currentTime
=
new
Date
().
getTime
();
let
currentTime
=
new
Date
().
getTime
();
...
@@ -101,8 +105,8 @@ Page({
...
@@ -101,8 +105,8 @@ Page({
}
}
}
else
{
}
else
{
if
(
isEnd
(
endTime
)
&&
if
(
isEnd
(
endTime
)
&&
(
openPrizeStatus
==
OPEN_PRIZE_STATUS
.
SUCCESS
||
openPrizeStatus
==
OPEN_PRIZE_STATUS
.
NOT_OPEN
)
)
{
//活动结束,开奖成功or不开奖
(
openPrizeStatus
==
OPEN_PRIZE_STATUS
.
SUCCESS
||
openPrizeStatus
==
OPEN_PRIZE_STATUS
.
NOT_OPEN
)
)
{
//活动结束,开奖成功or不开奖
my
.
redirectTo
({
url
:
'/pages/pagejie_shu_ye/pagejie_shu_ye?data='
+
JSON
.
stringify
({
isShowPrize
:
false
})
});
my
.
redirectTo
({
url
:
'/pages/pagejie_shu_ye/pagejie_shu_ye?data='
+
JSON
.
stringify
({
isShowPrize
:
false
})
});
}
else
{
}
else
{
//设置状态
//设置状态
this
.
setData
({
this
.
setData
({
...
@@ -140,13 +144,20 @@ Page({
...
@@ -140,13 +144,20 @@ Page({
async
getAuth
()
{
async
getAuth
()
{
const
userInfo
=
await
getAuthUserInfo
().
catch
(
err
=>
{
const
userInfo
=
await
getAuthUserInfo
().
catch
(
err
=>
{
console
.
log
(
'未授权成功'
,
err
);
console
.
log
(
'未授权成功'
,
err
);
this
.
setData
({
startBtnVisible
:
true
,
})
});
});
if
(
userInfo
)
{
if
(
userInfo
)
{
isAuth
=
true
;
console
.
log
(
'授权成功,userInfo=>'
,
userInfo
);
console
.
log
(
'授权成功,userInfo=>'
,
userInfo
);
const
{
nickName
,
avatar
}
=
userInfo
;
const
{
nickName
,
avatar
}
=
userInfo
;
app
.
nickName
=
nickName
;
app
.
nickName
=
nickName
;
app
.
avatar
=
avatar
;
app
.
avatar
=
avatar
;
this
.
login
();
this
.
login
();
this
.
setData
({
startBtnVisible
:
false
,
})
}
}
},
},
...
...
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