Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
babycare_xiaoxiao
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
王剑峰
babycare_xiaoxiao
Commits
2c011c6a
Commit
2c011c6a
authored
Jul 31, 2020
by
wjf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
l
parent
2d871c5a
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
89 deletions
+3
-89
answer.js
answer.js
+0
-86
output.js
output.js
+2
-2
output.js.map
output.js.map
+1
-1
No files found.
answer.js
deleted
100644 → 0
View file @
2d871c5a
function
ListNode
(
value
,
next
,
last
)
{
this
.
value
=
value
;
this
.
next
=
next
;
this
.
last
=
last
;
}
ListNode
.
prototype
.
value
=
null
;
ListNode
.
prototype
.
next
=
null
;
ListNode
.
prototype
.
last
=
null
;
function
List
()
{
}
List
.
prototype
.
head
=
null
;
List
.
prototype
.
tail
=
null
;
List
.
prototype
.
length
=
null
;
List
.
prototype
.
getNodeByIndex
=
function
(
index
=
0
)
{
if
(
index
<
-
this
.
length
||
index
>=
this
.
length
)
{
console
.
error
(
'out of range'
);
return
null
;
}
if
(
index
===
0
||
index
===
-
this
.
length
)
{
return
this
.
head
;
}
else
if
(
index
===
this
.
length
-
1
||
index
===
-
1
)
{
return
this
.
tail
;
}
else
if
(
index
>
0
)
{
let
last
=
this
.
head
;
for
(
let
i
=
1
;
i
<=
index
;
i
++
)
{
last
=
last
.
next
;
}
return
last
;
}
else
if
(
index
<
0
)
{
let
next
=
this
.
tail
;
for
(
let
i
=
-
2
;
i
>=
index
;
i
--
)
{
next
=
next
.
last
;
}
return
next
;
}
}
List
.
prototype
.
increase
=
function
(
value
,
index
=
this
.
length
-
1
)
{
const
opNode
=
this
.
getNodeByIndex
(
index
);
if
(
!
opNode
)
{
return
;
}
opNode
.
value
+=
value
;
if
(
opNode
.
value
>=
10
)
{
const
out
=
~~
(
opNode
.
value
/
10
);
opNode
.
value
=
opNode
.
value
%
10
;
this
.
increase
(
out
,
index
-
1
);
}
}
List
.
createList
=
function
(...
value
)
{
const
newList
=
new
List
();
let
last
=
new
ListNode
(
value
[
0
],
null
,
null
);
newList
.
head
=
last
;
for
(
let
i
=
1
;
i
<
value
.
length
;
i
++
)
{
let
newNode
=
new
ListNode
(
value
[
i
],
null
,
last
);
last
.
next
=
newNode
;
last
=
newNode
;
}
newList
.
tail
=
last
;
newList
.
length
=
value
.
length
;
return
newList
;
}
const
list
=
List
.
createList
(
1
,
2
,
3
,
4
);
list
.
increase
(
10
,
2
);
output.js
View file @
2c011c6a
...
...
@@ -17178,7 +17178,7 @@ var PrizePanel = (function (_super) {
_this.hidePanel();
return;
}
if (res.data) {
if (res.data
&& res.data.drawStatus == 3
) {
ctrls_1.showToast('奖品发放成功\n请前往我的奖品处查看');
}
else {
...
...
@@ -18723,7 +18723,7 @@ var LotteryScene = (function (_super) {
LotteryScene.prototype.lottery = function () {
var _this = this;
ctrls_1.showWaiting();
TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.luckyDraw)
TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.luckyDraw
, { level: this.data.level }
)
.then(function (res) {
ctrls_1.hideWaiting();
if (!res.success)
output.js.map
View file @
2c011c6a
This source diff could not be displayed because it is too large. You can
view the blob
instead.
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