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
85072f3e
Commit
85072f3e
authored
Sep 10, 2020
by
汪欢
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
timer
parent
7d45ae9f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
96 additions
and
83 deletions
+96
-83
pagehuo_dong_ye.acss
dist/pages/pagehuo_dong_ye/pagehuo_dong_ye.acss
+12
-12
pagehuo_dong_ye.js
dist/pages/pagehuo_dong_ye/pagehuo_dong_ye.js
+84
-71
No files found.
dist/pages/pagehuo_dong_ye/pagehuo_dong_ye.acss
View file @
85072f3e
...
...
@@ -62,40 +62,40 @@
width: 35rpx;
height: 25rpx;
opacity: 1;
left: 1
3
rpx;
top: 4
7
rpx;
left: 1
5
rpx;
top: 4
0
rpx;
position: absolute;
font-size:
14.41518
rpx;
font-size:
25
rpx;
color: #ffffff;
}
.huo_dong_ye .dao_ji_shi87 .tu_ceng22_kao_bei90 {
width: 35rpx;
height: 25rpx;
opacity: 1;
left: 13
1
rpx;
top: 4
7
rpx;
left: 13
5
rpx;
top: 4
0
rpx;
position: absolute;
font-size:
14.41518
rpx;
font-size:
25
rpx;
color: #ffffff;
}
.huo_dong_ye .dao_ji_shi87 .tu_ceng2289 {
width: 35rpx;
height: 25rpx;
opacity: 1;
left: 24
6
rpx;
top: 4
7
rpx;
left: 24
8
rpx;
top: 4
0
rpx;
position: absolute;
font-size:
14.41518
rpx;
font-size:
25
rpx;
color: #ffffff;
}
.huo_dong_ye .dao_ji_shi87 .tu_ceng22_kao_bei388 {
width: 35rpx;
height: 25rpx;
opacity: 1;
left: 3
57
rpx;
top: 4
7
rpx;
left: 3
60
rpx;
top: 4
0
rpx;
position: absolute;
font-size:
14.41518
rpx;
font-size:
25
rpx;
color: #ffffff;
}
.huo_dong_ye .jiang_pin78 {
...
...
dist/pages/pagehuo_dong_ye/pagehuo_dong_ye.js
View file @
85072f3e
...
...
@@ -35,7 +35,7 @@ Page({
// 总楼层
totalFloor
:
''
,
// 单人最多购买楼层
eachBuyMostFloor
:
''
,
eachBuyMostFloor
:
''
,
countDown
:
''
,
ruleModalVisible
:
false
,
...
...
@@ -51,12 +51,15 @@ Page({
});
this
.
getBaseInfo
();
this
.
getRuleSource
();
this
.
countDowning
();
//
this.countDowning();
this
.
getUserCredits
();
// this.getEndTime();
this
.
getOrderList
();
},
onReady
(){
this
.
countDowning
();
},
onPrizeBtnClick
()
{
my
.
navigateTo
({
...
...
@@ -119,9 +122,9 @@ Page({
},
// 购买成功后更新积分
onUserCredit
(){
onUserCredit
()
{
this
.
getUserCredits
();
console
.
log
(
this
.
data
.
userCredits
,
'更新后的用户积分'
);
console
.
log
(
this
.
data
.
userCredits
,
'更新后的用户积分'
);
},
...
...
@@ -136,7 +139,7 @@ Page({
},
// 加楼层
addFloor
()
{
let
{
canBuyFloor
,
eachBuyMostFloor
}
=
this
.
data
;
let
{
canBuyFloor
,
eachBuyMostFloor
}
=
this
.
data
;
if
(
canBuyFloor
<
eachBuyMostFloor
)
{
this
.
setData
({
canBuyFloor
:
canBuyFloor
+
1
...
...
@@ -205,75 +208,85 @@ Page({
// 获取奖品列表数据
async
getBaseInfo
()
{
API
.
getActivityBaseInfoById
().
then
((
res
)
=>
{
if
(
res
.
success
)
{
let
data
=
res
.
data
;
let
list
=
data
.
list
;
let
prize
=
data
.
prize
;
let
totalFloor
=
data
.
totalFloor
;
let
end
=
data
.
endTime
;
let
start
=
data
.
startTime
;
let
eachBuyMostFloor
=
data
.
eachBuyMostFloor
;
// startTime = data.startTime;
// endingTime = data.endTime;
for
(
let
i
=
0
;
i
<
list
.
length
;
i
++
)
{
let
listStyle
=
{
left
:
180
*
i
+
'rpx'
,
width
:
150
+
'rpx'
,
height
:
150
+
'rpx'
,
position
:
'absolute'
,
color
:
'white'
,
textAlign
:
'center'
}
list
[
i
].
liststyle
=
listStyle
;
}
//
API.getActivityBaseInfoById().then((res) => {
//
if (res.success) {
//
let data = res.data;
//
let list = data.list;
//
let prize = data.prize;
//
let totalFloor = data.totalFloor;
//
let end = data.endTime;
//
let start = data.startTime;
//
let eachBuyMostFloor = data.eachBuyMostFloor;
//
// startTime = data.startTime;
//
// endingTime = data.endTime;
//
for (let i = 0; i < list.length; i++) {
//
let listStyle = {
//
left: 180 * i + 'rpx',
//
width: 150 + 'rpx',
//
height: 150 + 'rpx',
//
position: 'absolute',
//
color: 'white',
//
textAlign: 'center'
//
}
//
list[i].liststyle = listStyle;
//
}
this
.
setData
({
prizeList
:
list
,
start
:
start
,
end
:
end
,
totalFloor
,
eachBuyMostFloor
})
}
else
{
console
.
log
(
'返回失败'
)
}
}).
catch
((
err
)
=>
{
console
.
log
(
'error'
,
err
)
})
// let listStyleArr = []
// let { data } = await API.getActivityBaseInfoById() || {};
// console.log(data, 'data')
// let list = data.list;
// let prize = data.prize;
// let totalFloor = data.totalFloor;
// let end = data.endTime;
// let start = data.startTime;
// // startTime = data.startTime;
// // endingTime = data.endTime;
// for (let i = 0; i < list.length; i++) {
// let listStyle = {
// left: 180 * i + 'rpx',
// width: 150 + 'rpx',
// height: 150 + 'rpx',
// position: 'absolute',
// color: 'white',
// textAlign: 'center'
// this.setData({
// prizeList: list,
// start: start,
// end: end,
// totalFloor,
// eachBuyMostFloor
// })
// } else {
// console.log('返回失败')
// }
// list[i].liststyle = listStyle;
// }
// this.setData({
// prizeList: list,
// start: start,
// end: end,
// totalFloor
// }).catch((err) => {
// console.log('error', err)
// })
// let listStyleArr = []
let
{
data
,
success
,
code
}
=
await
API
.
getActivityBaseInfoById
()
||
{};
if
(
success
)
{
console
.
log
(
data
,
'data'
)
let
list
=
data
.
list
;
let
prize
=
data
.
prize
;
let
totalFloor
=
data
.
totalFloor
;
let
end
=
data
.
endTime
;
let
start
=
data
.
startTime
;
let
eachBuyMostFloor
=
data
.
eachBuyMostFloor
;
// startTime = data.startTime;
// endingTime = data.endTime;
for
(
let
i
=
0
;
i
<
list
.
length
;
i
++
)
{
let
listStyle
=
{
left
:
180
*
i
+
'rpx'
,
width
:
150
+
'rpx'
,
height
:
150
+
'rpx'
,
position
:
'absolute'
,
color
:
'white'
,
textAlign
:
'center'
}
list
[
i
].
liststyle
=
listStyle
;
}
this
.
setData
({
prizeList
:
list
,
start
:
start
,
end
:
end
,
totalFloor
,
eachBuyMostFloor
})
}
else
{
// 错误码
console
.
log
(
'error'
)
}
},
// 获取购买记录信息
...
...
@@ -325,7 +338,7 @@ Page({
// 购买记录为空
console
.
log
(
'购买记录为空'
);
this
.
setData
({
orderList
:
null
orderList
:
null
})
}
...
...
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