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
a538d8b1
Commit
a538d8b1
authored
Sep 09, 2020
by
wildfirecode13
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
f46234af
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
50 additions
and
37 deletions
+50
-37
pagejie_shu_ye.js
dist/pages/pagejie_shu_ye/pagejie_shu_ye.js
+50
-37
No files found.
dist/pages/pagejie_shu_ye/pagejie_shu_ye.js
View file @
a538d8b1
'use strict'
;
import
resList
from
'../../resconfig/resList'
;
import
resList
from
'../../resconfig/resList'
;
import
API
from
'../../api'
;
Page
({
data
:
{
prizeVisible
:
false
,
noprizeVisible
:
false
,
openPrizeStatus
:
0
,
prizeVisible
:
false
,
noprizeVisible
:
false
,
openPrizeStatus
:
0
,
// 购买记录列表
orderList
:[],
orderList
:
[],
// 中奖名单
prizeMenu
:[],
prizeMenu
:
[],
// 购买列表渲染
orderStyle
:[]
orderStyle
:
[]
},
onLoad
(
props
)
{
// console.log('fuck',JSON.parse(props.prize))
console
.
log
(
'fuck'
,
JSON
.
parse
(
props
.
data
));
const
{
prize
,
openPrizeStatus
,
isShowPrize
}
=
JSON
.
parse
(
props
.
data
);
if
(
isShowPrize
)
{
if
(
prize
)
{
this
.
setData
({
prizeVisible
:
true
})
}
else
{
this
.
setData
({
noprizeVisible
:
true
,
openPrizeStatus
:
openPrizeStatus
})
}
}
this
.
setData
({
resList
:
resList
});
this
.
getOrderList
();
// this.getPrizeMenu();
},
// 获取购买记录
async
getOrderList
(){
let
{
data
}
=
await
API
.
getBuyFloorList
()
||
{};
async
getOrderList
()
{
let
{
data
}
=
await
API
.
getBuyFloorList
()
||
{};
let
orderStyleArr
=
[];
let
lens
=
data
.
length
;
for
(
let
i
=
0
;
i
<
lens
;
i
++
)
{
for
(
let
i
=
0
;
i
<
lens
;
i
++
)
{
let
orderStyle
=
{
orderDay
:{
orderDay
:
{
left
:
0
,
top
:
40
*
i
+
'rpx'
,
position
:
'absolute'
,
color
:
'white'
top
:
40
*
i
+
'rpx'
,
position
:
'absolute'
,
color
:
'white'
},
orderFloor
:{
left
:
200
+
'rpx'
,
top
:
40
*
i
+
'rpx'
,
position
:
'absolute'
,
color
:
'white'
orderFloor
:
{
left
:
200
+
'rpx'
,
top
:
40
*
i
+
'rpx'
,
position
:
'absolute'
,
color
:
'white'
},
orderCredits
:{
left
:
400
+
'rpx'
,
orderCredits
:
{
left
:
400
+
'rpx'
,
top
:
40
*
i
+
'rpx'
,
position
:
'absolute'
,
color
:
'white'
position
:
'absolute'
,
color
:
'white'
}
}
// orderStyleArr.push(orderStyle);
...
...
@@ -60,36 +73,36 @@ Page({
// data[i].order = orderStyleArr[i];
// }
this
.
setData
({
orderList
:
data
,
orderList
:
data
,
// orderStyle:orderStyleArr
})
},
async
getPrizeMenu
(){
let
{
data
}
=
await
API
.
getFloorPrize
()
||
{};
async
getPrizeMenu
()
{
let
{
data
}
=
await
API
.
getFloorPrize
()
||
{};
// 用户名单处理
let
floorPrize
=
data
;
var
personMenuArr
=
[];
for
(
let
i
=
0
;
i
<
floorPrize
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
floorPrize
.
length
;
i
++
)
{
let
userName
=
floorPrize
[
i
].
uerNick
;
if
(
userName
.
length
>=
2
)
{
let
firstLetter
=
userName
.
subStr
(
0
,
1
);
let
lastLetter
=
userName
.
reverse
().
subStr
(
0
,
1
);
if
(
userName
.
length
>=
2
)
{
let
firstLetter
=
userName
.
subStr
(
0
,
1
);
let
lastLetter
=
userName
.
reverse
().
subStr
(
0
,
1
);
userName
=
firstLetter
+
'***'
+
lastLetter
;
}
personMenuArr
.
push
(
userName
);
}
console
.
log
(
floorPrize
,
'arr'
)
console
.
log
(
floorPrize
,
'arr'
)
// 处理好的姓名合并到floorPrize
if
(
floorPrize
!=
null
)
{
for
(
var
floorprize
of
floorPrize
)
{
for
(
var
usernames
of
personMenuArr
)
{
if
(
floorPrize
!=
null
)
{
for
(
var
floorprize
of
floorPrize
)
{
for
(
var
usernames
of
personMenuArr
)
{
floorprize
.
username
=
usernames
;
}
}
}
this
.
setData
({
prizeMenu
:
floorPrize
prizeMenu
:
floorPrize
})
}
...
...
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