Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
db-game-template
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
崔立强
db-game-template
Commits
86150579
Commit
86150579
authored
Dec 10, 2020
by
李硕
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提价
parent
1703e33b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
45 additions
and
31 deletions
+45
-31
comnickpanel.jsx
...List/project/src/components/comnickpanel/comnickpanel.jsx
+1
-1
pagewishscene.jsx
wishList/project/src/pages/pagewishscene/pagewishscene.jsx
+40
-26
pagewishscene.less
wishList/project/src/pages/pagewishscene/pagewishscene.less
+3
-3
resList.js
wishList/project/src/resconfig/resList.js
+1
-1
No files found.
wishList/project/src/components/comnickpanel/comnickpanel.jsx
View file @
86150579
...
...
@@ -55,7 +55,7 @@ class Comnickpanel extends Component {
this
.
setState
({
pass
:
false
})
Toast
(
'
请输入正确昵称
'
,
2000
)
Toast
(
'
昵称中不可以输入标点、空格、emoji图案哦
'
,
2000
)
setTimeout
(()
=>
{
this
.
setState
({
pass
:
true
...
...
wishList/project/src/pages/pagewishscene/pagewishscene.jsx
View file @
86150579
...
...
@@ -296,37 +296,51 @@ class Pagewishscene extends Component {
* 场景开始开奖
*/
async
startOpenPrize
()
{
this
.
clickBuried
(
4
)
let
{
chooseList
,
wishName
,
pass
}
=
this
.
state
;
console
.
log
(
"许愿结果"
,
chooseList
);
let
wishIds
=
chooseList
.
filter
((
item
)
=>
{
return
item
!=
-
1
}).
map
(
item
=>
{
return
item
=
+
item
+
1
}).
join
(
','
);
console
.
log
(
'{{{{{{{{{'
,
wishIds
);
if
(
pass
)
{
this
.
setState
({
pass
:
false
})
getPxToken
(
async
token
=>
{
let
postObj
=
{
token
:
""
};
postObj
.
token
=
token
;
postObj
.
wishIds
=
wishIds
;
if
(
chooseList
.
includes
(
-
1
)
&&
wishName
)
{
postObj
.
userWishName
=
wishName
;
}
console
.
log
(
'/////////////'
,
postObj
);
let
result
=
await
API
.
getOpenPrize
(
postObj
);
let
str
=
/^
[
a-zA-Z0-9
\u
4e00-
\u
9fa5
]
+$/
;
let
clean
=
/
[\!
|
\~
|
\`
|
\#
|
\%
|
\^
|
\&
|
\*
|
\(
|
\)
|
\-
|
\_
|
\+
|
\=
|
\|
|
\\
|
\{
|
\}
|
\;
|
\:
|
\"
|
\'
|
\,
|
\<
|
\.
|
\>
|
\/
|
\?/\,/\。/\;/\:/\“/\”/\》/\《/\|/\{/\}/\、/\!/\~/\`]
/g
;
// console.log(str2.test('1'), str2.test("a"), str2.test("安"), str2.test(","));
let
{
chooseList
,
wishName
,
pass
}
=
this
.
state
;
console
.
log
(
str
.
test
(
wishName
.
replace
(
clean
,
""
)))
// return;
if
(
str
.
test
(
wishName
.
replace
(
clean
,
""
)))
{
this
.
clickBuried
(
4
)
console
.
log
(
"许愿结果"
,
chooseList
);
let
wishIds
=
chooseList
.
filter
((
item
)
=>
{
return
item
!=
-
1
}).
map
(
item
=>
{
return
item
=
+
item
+
1
}).
join
(
','
);
console
.
log
(
'{{{{{{{{{'
,
wishIds
);
if
(
pass
)
{
this
.
setState
({
p
rizeResult
:
result
p
ass
:
false
})
this
.
showLoading
();
})
setTimeout
(()
=>
{
this
.
setState
({
pass
:
true
getPxToken
(
async
token
=>
{
let
postObj
=
{
token
:
""
};
postObj
.
token
=
token
;
postObj
.
wishIds
=
wishIds
;
if
(
chooseList
.
includes
(
-
1
)
&&
wishName
)
{
postObj
.
userWishName
=
wishName
;
}
console
.
log
(
'/////////////'
,
postObj
);
let
result
=
await
API
.
getOpenPrize
(
postObj
);
this
.
setState
({
prizeResult
:
result
})
this
.
showLoading
();
})
},
2000
)
setTimeout
(()
=>
{
this
.
setState
({
pass
:
true
})
},
2000
)
}
}
else
{
if
(
pass
)
{
this
.
setState
({
pass
:
false
});
Toast
(
'心愿中不可以输入空格、emoji图案哦'
,
2000
);
setTimeout
(()
=>
{
this
.
setState
({
pass
:
true
});
},
2000
)
}
}
}
jumpResultScene
()
{
mHistory
.
push
({
pathname
:
"/b"
})
...
...
wishList/project/src/pages/pagewishscene/pagewishscene.less
View file @
86150579
...
...
@@ -136,18 +136,18 @@
@keyframes clickTag {
0% {
transform: scale(1);
//
transform: scale(1);
opacity: 0.9;
}
50% {
transform: scale(1.05);
//
transform: scale(1.05);
opacity: 1;
}
100% {
opacity: 0.9;
transform: scale(1);
//
transform: scale(1);
}
}
...
...
wishList/project/src/resconfig/resList.js
View file @
86150579
...
...
@@ -190,7 +190,7 @@ const resList = {
name
:
'wishBg'
,
ext
:
'.png'
,
uuid
:
'57172e95-f331-47b6-af37-9464c39ba69d'
,
url
:
'//yun.duiba.com.cn/spark/assets/
1dae0d081ce845ca6e798a5691664e0b28507b39
.png'
,
url
:
'//yun.duiba.com.cn/spark/assets/
ad609efcc10dc89c16f82f9f624cb4530c0be32c
.png'
,
},
'aa92b715-98a8-45e7-ad95-d0eef6ea1324'
:
{
name
:
'shadow'
,
...
...
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