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
f42cbb5c
Commit
f42cbb5c
authored
Sep 08, 2020
by
wildfirecode13
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
5805a483
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
20 additions
and
7 deletions
+20
-7
app.js
dist/app.js
+1
-1
pagejie_shu_ye.js
dist/pages/pagejie_shu_ye/pagejie_shu_ye.js
+1
-0
pageshou_ye.js
dist/pages/pageshou_ye/pageshou_ye.js
+11
-5
request.js
dist/tbcc-sdk/lib/request.js
+1
-1
isEnd.js
dist/utils/isEnd.js
+6
-0
No files found.
dist/app.js
View file @
f42cbb5c
...
...
@@ -6,8 +6,8 @@ cloud.init({
});
App
({
// requestType: 'yapi', // yapi,cloud: 云函数
requestType
:
'cloud'
,
// yapi,cloud: 云函数
requestType
:
'yapi'
,
// yapi,cloud: 云函数
cloudName
:
'floor'
,
// 主云函数项目名 base clientTemplate2C
cloud
,
tbcc
,
...
...
dist/pages/pagejie_shu_ye/pagejie_shu_ye.js
View file @
f42cbb5c
...
...
@@ -6,6 +6,7 @@ Page({
data
:
{},
onLoad
(
props
)
{
console
.
log
(
'fuck'
,
JSON
.
parse
(
props
.
prize
))
this
.
setData
({
resList
:
resList
});
...
...
dist/pages/pageshou_ye/pageshou_ye.js
View file @
f42cbb5c
...
...
@@ -2,6 +2,8 @@
import
resList
from
'../../resconfig/resList'
;
//import API from '../../api';
import
API
from
'../../api'
;
import
isEnd
from
'/utils/isEnd'
;
import
OPEN_PRIZE_STATUS
from
'/utils/OPEN_PRIZE_STATUS'
;
const
app
=
getApp
();
const
{
tbcc
}
=
app
;
const
{
commonToast
,
getAuthUserInfo
,
navigateToOutside
}
=
tbcc
.
tb
;
...
...
@@ -53,13 +55,17 @@ Page({
})
},
async
init
()
{
const
[
activity
,
vipInfo
]
=
await
Promise
.
all
([
const
[
{
data
:
{
isUserJoin
,
endTime
,
openPrizeStatus
,
prize
}
}
,
vipInfo
]
=
await
Promise
.
all
([
API
.
getActivityBaseInfoById
(),
API
.
getVipInfo
(),
]);
// vipInfo.isVip = true;
if
(
vipInfo
.
isVip
&&
activity
.
data
.
isUserJoin
)
{
vipInfo
.
isVip
=
true
;
if
(
vipInfo
.
isVip
&&
isUserJoin
)
{
if
(
isEnd
(
endTime
)
&&
openPrizeStatus
==
OPEN_PRIZE_STATUS
.
SUCCESS
)
{
//活动结束,开奖成功
my
.
redirectTo
({
url
:
'/pages/pagejie_shu_ye/pagejie_shu_ye?prize='
+
JSON
.
stringify
(
prize
)
});
}
else
{
my
.
redirectTo
({
url
:
'/pages/pagehuo_dong_ye/pagehuo_dong_ye'
});
}
}
else
{
//设置状态
this
.
setData
({
...
...
@@ -68,7 +74,7 @@ Page({
ruleModalBtnVisible
:
true
})
};
API
.
getFloorPrize
API
.
getFloorPrize
();
},
/**
* 登录接口
...
...
dist/tbcc-sdk/lib/request.js
View file @
f42cbb5c
...
...
@@ -68,7 +68,7 @@ const request = ({ cloud, cloudName, requestType = 'cloud' }) => {
dataType
:
'json'
}).
then
(({
data
:
res
})
=>
{
hideMyLoading
();
console
.
log
(
'mock res=>'
,
JSON
.
stringify
(
res
)
)
console
.
log
(
`mock res,
${
url
}
=>`
,
res
)
if
(
res
&&
res
.
success
)
{
resolve
(
res
);
}
else
{
...
...
dist/utils/isEnd.js
0 → 100644
View file @
f42cbb5c
const
isEnd
=
(
endTime
)
=>
{
const
now
=
Date
.
now
();
return
now
>
endTime
}
export
default
isEnd
\ No newline at end of file
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