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
2c3be6a1
Commit
2c3be6a1
authored
Nov 30, 2020
by
李硕
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交
parent
8d62b6ee
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
50 additions
and
9 deletions
+50
-9
rule.js
weekVerb/project/mock/common/rule.js
+24
-0
proxy.js
weekVerb/project/mock/proxy.js
+3
-2
apicfg.js
weekVerb/project/src/api/apicfg.js
+11
-5
constant.js
weekVerb/project/src/constant.js
+1
-1
pageweekverb.jsx
weekVerb/project/src/pages/pageweekverb/pageweekverb.jsx
+11
-1
No files found.
weekVerb/project/mock/common/rule.js
View file @
2c3be6a1
...
...
@@ -4,3 +4,27 @@ export const rule = {
"success"
:
true
,
"data"
:
`活动规则:
${
Random
.
cparagraph
(
20
,
40
)}
`
};
export
const
baseInfo
=
{
"data"
:
{
"vipLevel"
:
"w2"
,
"adUrl"
:
"1"
,
"adMes"
:
"1"
,
"tenDjStock"
:
1200
,
"fiveDjStock"
:
2000
,
"llbStock"
:
3000
},
"code"
:
null
,
"message"
:
null
,
"success"
:
true
}
export
const
verbPrize
=
{
"data"
:
{
"name"
:
"奖品名称"
,
"icon"
:
"2"
},
"code"
:
null
,
"message"
:
null
,
"success"
:
true
}
\ No newline at end of file
weekVerb/project/mock/proxy.js
View file @
2c3be6a1
...
...
@@ -4,9 +4,10 @@ let projectId = window.CFG.projectId || '';
export
default
{
get
:
{
[
`/projectx/
${
projectId
}
/projectRule.query`
]:
common
.
rule
[
`/projectx/
${
projectId
}
/projectRule.query`
]:
common
.
rule
,
[
`/projectx/{projectId}/weekly_award/index.do`
]:
common
.
baseInfo
,
[
`/projectx/{projectId}/weekly_award/join.do`
]:
common
.
verbPrize
},
post
:
{
[
`/projectx/
${
projectId
}
/join.do`
]:
collect_0722
.
join
}
};
\ No newline at end of file
weekVerb/project/src/api/apicfg.js
View file @
2c3be6a1
let
projectId
=
window
.
CFG
.
projectId
||
''
;
const
apiCfg
=
{
getRule
:
`/projectx/
${
projectId
}
/projectRule.query`
,
doJoin
:
{
uri
:
`/projectx/
${
projectId
}
/join.do`
,
method
:
"post"
}
getRule
:
`/projectx/
${
projectId
}
/projectRule.query`
,
doJoin
:
{
uri
:
`/projectx/
${
projectId
}
/join.do`
,
method
:
"post"
},
getBaseInfo
:
{
uri
:
`/projectx/
${
projectId
}
/weekly_award/join.do`
,
},
verbPrize
:
{
uri
:
`/projectx/
${
projectId
}
/weekly_award/join.do`
}
}
export
default
apiCfg
;
\ No newline at end of file
weekVerb/project/src/constant.js
View file @
2c3be6a1
...
...
@@ -45,7 +45,7 @@ export function Modal_Lables(modalType, imgUuid, level) {
content
=
"暂时无法领取代金券"
;
img
=
imgUuid
;
}
if
([
MODAL_TYPE
.
W1_PRIZE
,
MODAL_TYPE
.
W2_PRIZE
,
MODAL_TYPE
.
W3_PRIZE
].
includes
(
modalType
)
=
MODAL_TYPE
.
W1_PRIZE
)
{
if
([
MODAL_TYPE
.
W1_PRIZE
,
MODAL_TYPE
.
W2_PRIZE
,
MODAL_TYPE
.
W3_PRIZE
].
includes
(
modalType
))
{
content
=
"可前往“我的奖品”查看"
;
img
=
imgUuid
;
}
...
...
weekVerb/project/src/pages/pageweekverb/pageweekverb.jsx
View file @
2c3be6a1
...
...
@@ -2,7 +2,7 @@
import
React
,
{
Component
}
from
'react'
;
import
resList
from
'../../resconfig/resList'
;
//
import API from '../../api';
import
API
from
'../../api'
;
import
{
ModalImage
,
AWARD_TYPE
,
MODAL_TYPE
,
Modal_Lables
,
ERROR_MESSSAGE
}
from
'../../constant'
;
import
'./pageweekverb.less'
;
class
Pageweekverb
extends
Component
{
...
...
@@ -10,6 +10,16 @@ class Pageweekverb extends Component {
super
(
props
);
this
.
state
=
{
resList
:
resList
};
}
componentDidMount
()
{
this
.
getBaseInfoData
();
}
async
getBaseInfoData
()
{
let
{
data
}
=
await
API
.
getBaseInfo
();
console
.
log
(
"data===="
,
data
);
}
render
()
{
return
(
<
div
className=
"weekverb "
>
...
...
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