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
755ccdf1
Commit
755ccdf1
authored
Sep 08, 2020
by
汪欢
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab2.dui88.com/wanghongyuan/hello_taobao
parents
678de40c
f42cbb5c
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
40 additions
and
10 deletions
+40
-10
app.js
dist/app.js
+1
-1
pagejie_shu_ye.js
dist/pages/pagejie_shu_ye/pagejie_shu_ye.js
+1
-0
pageshou_ye.axml
dist/pages/pageshou_ye/pageshou_ye.axml
+1
-1
pageshou_ye.js
dist/pages/pageshou_ye/pageshou_ye.js
+16
-7
request.js
dist/tbcc-sdk/lib/request.js
+1
-1
OPEN_PRIZE_STATUS.js
dist/utils/OPEN_PRIZE_STATUS.js
+14
-0
isEnd.js
dist/utils/isEnd.js
+6
-0
No files found.
dist/app.js
View file @
755ccdf1
...
@@ -6,8 +6,8 @@ cloud.init({
...
@@ -6,8 +6,8 @@ cloud.init({
});
});
App
({
App
({
// requestType: 'yapi', // yapi,cloud: 云函数
requestType
:
'cloud'
,
// yapi,cloud: 云函数
requestType
:
'cloud'
,
// yapi,cloud: 云函数
requestType
:
'yapi'
,
// yapi,cloud: 云函数
cloudName
:
'floor'
,
// 主云函数项目名 base clientTemplate2C
cloudName
:
'floor'
,
// 主云函数项目名 base clientTemplate2C
cloud
,
cloud
,
tbcc
,
tbcc
,
...
...
dist/pages/pagejie_shu_ye/pagejie_shu_ye.js
View file @
755ccdf1
...
@@ -12,6 +12,7 @@ Page({
...
@@ -12,6 +12,7 @@ Page({
},
},
onLoad
(
props
)
{
onLoad
(
props
)
{
console
.
log
(
'fuck'
,
JSON
.
parse
(
props
.
prize
))
this
.
setData
({
this
.
setData
({
resList
:
resList
resList
:
resList
});
});
...
...
dist/pages/pageshou_ye/pageshou_ye.axml
View file @
755ccdf1
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
<image class="tu" src={{resList['41567d28-d1c4-454f-8bb4-4bcb6a103be0'].url}} />
<image class="tu" src={{resList['41567d28-d1c4-454f-8bb4-4bcb6a103be0'].url}} />
<image a:if="{{startBtnVisible}}" class="an_niu" onTap="handleStart" src={{resList['9720b3cc-2faa-4bac-8244-d5f0d018a6e7'].url}} />
<image a:if="{{startBtnVisible}}" class="an_niu" onTap="handleStart" src={{resList['9720b3cc-2faa-4bac-8244-d5f0d018a6e7'].url}} />
<image class="wen_an" src={{resList['2a026ac4-0a9c-497b-9469-2da99f935821'].url}} />
<image class="wen_an" src={{resList['2a026ac4-0a9c-497b-9469-2da99f935821'].url}} />
<image a:if="{{myPrizeBtnVisible}}" class="jiang_pinicon" src={{resList['b7517eae-3bc2-4456-935a-e6e3e1fe995e'].url}} />
<image
onTap="onPrizeBtnClick"
a:if="{{myPrizeBtnVisible}}" class="jiang_pinicon" src={{resList['b7517eae-3bc2-4456-935a-e6e3e1fe995e'].url}} />
<image a:if="{{ruleModalBtnVisible}}" class="gui_zeicon" onTap="showRuleModal" src={{resList['d826a2f1-a3ec-4764-aad2-f6cacc43cfce'].url}} />
<image a:if="{{ruleModalBtnVisible}}" class="gui_zeicon" onTap="showRuleModal" src={{resList['d826a2f1-a3ec-4764-aad2-f6cacc43cfce'].url}} />
</view>
</view>
...
...
dist/pages/pageshou_ye/pageshou_ye.js
View file @
755ccdf1
...
@@ -2,6 +2,8 @@
...
@@ -2,6 +2,8 @@
import
resList
from
'../../resconfig/resList'
;
//import API from '../../api';
import
resList
from
'../../resconfig/resList'
;
//import API from '../../api';
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
app
=
getApp
();
const
{
tbcc
}
=
app
;
const
{
tbcc
}
=
app
;
const
{
commonToast
,
getAuthUserInfo
,
navigateToOutside
}
=
tbcc
.
tb
;
const
{
commonToast
,
getAuthUserInfo
,
navigateToOutside
}
=
tbcc
.
tb
;
...
@@ -31,9 +33,6 @@ Page({
...
@@ -31,9 +33,6 @@ Page({
},
},
handleStart
()
{
handleStart
()
{
// API.submit({ grade: 1, floor: 10 });
console
.
log
(
'change'
)
console
.
log
(
'change'
)
my
.
redirectTo
({
my
.
redirectTo
({
url
:
'/pages/pagehuo_dong_ye/pagehuo_dong_ye'
url
:
'/pages/pagehuo_dong_ye/pagehuo_dong_ye'
...
@@ -44,6 +43,11 @@ Page({
...
@@ -44,6 +43,11 @@ Page({
ruleModalVisible
:
true
ruleModalVisible
:
true
})
})
},
},
onPrizeBtnClick
()
{
my
.
navigateTo
({
url
:
'/pages/myprize/myprize'
});
},
ruleModalClose
()
{
ruleModalClose
()
{
this
.
setData
({
this
.
setData
({
...
@@ -51,13 +55,17 @@ Page({
...
@@ -51,13 +55,17 @@ Page({
})
})
},
},
async
init
()
{
async
init
()
{
const
[
activity
,
vipInfo
]
=
await
Promise
.
all
([
const
[
{
data
:
{
isUserJoin
,
endTime
,
openPrizeStatus
,
prize
}
}
,
vipInfo
]
=
await
Promise
.
all
([
API
.
getActivityBaseInfoById
(),
API
.
getActivityBaseInfoById
(),
API
.
getVipInfo
(),
API
.
getVipInfo
(),
]);
]);
vipInfo
.
isVip
=
true
;
vipInfo
.
isVip
=
true
;
if
(
vipInfo
.
isVip
&&
activity
.
data
.
isUserJoin
)
{
if
(
vipInfo
.
isVip
&&
isUserJoin
)
{
my
.
redirectTo
({
url
:
'/pages/pagehuo_dong_ye/pagehuo_dong_ye'
});
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
{
}
else
{
//设置状态
//设置状态
this
.
setData
({
this
.
setData
({
...
@@ -65,7 +73,8 @@ Page({
...
@@ -65,7 +73,8 @@ Page({
startBtnVisible
:
true
,
startBtnVisible
:
true
,
ruleModalBtnVisible
:
true
ruleModalBtnVisible
:
true
})
})
}
};
API
.
getFloorPrize
();
},
},
/**
/**
* 登录接口
* 登录接口
...
...
dist/tbcc-sdk/lib/request.js
View file @
755ccdf1
...
@@ -68,7 +68,7 @@ const request = ({ cloud, cloudName, requestType = 'cloud' }) => {
...
@@ -68,7 +68,7 @@ const request = ({ cloud, cloudName, requestType = 'cloud' }) => {
dataType
:
'json'
dataType
:
'json'
}).
then
(({
data
:
res
})
=>
{
}).
then
(({
data
:
res
})
=>
{
hideMyLoading
();
hideMyLoading
();
console
.
log
(
'mock res=>'
,
JSON
.
stringify
(
res
)
)
console
.
log
(
`mock res,
${
url
}
=>`
,
res
)
if
(
res
&&
res
.
success
)
{
if
(
res
&&
res
.
success
)
{
resolve
(
res
);
resolve
(
res
);
}
else
{
}
else
{
...
...
dist/utils/OPEN_PRIZE_STATUS.js
0 → 100644
View file @
755ccdf1
const
OPEN_PRIZE_STATUS
=
{
// 待开奖
WAIT_AWARD
:
1
,
// 开奖中
PROCESSING
:
2
,
// 开奖成功
SUCCESS
:
3
,
// 开奖失败
FAIL
:
4
,
// 不开奖
NOT_OPEN
:
5
}
export
default
OPEN_PRIZE_STATUS
\ No newline at end of file
dist/utils/isEnd.js
0 → 100644
View file @
755ccdf1
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