Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
B
biz.qingxiao.com
Project
Project
Details
Activity
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
wangxuelai
biz.qingxiao.com
Commits
a9138e61
Commit
a9138e61
authored
Feb 11, 2020
by
baixian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
闯关优化
parent
ead687d9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
599 additions
and
4 deletions
+599
-4
index.html
index.html
+1
-1
api.js
src/common/api.js
+1
-0
createtheme.js
src/models/createtheme.js
+111
-1
thememgt.js
src/models/thememgt.js
+1
-1
webapp.js
src/models/webapp.js
+33
-0
addStoreCount.js
src/pages/newtheme/customsclock/addStoreCount.js
+422
-0
detail.js
src/pages/newtheme/customsclock/detail.js
+16
-1
router.js
src/router.js
+6
-0
createtheme.js
src/services/createtheme.js
+8
-0
No files found.
index.html
View file @
a9138e61
...
...
@@ -18,5 +18,5 @@
</head>
<body>
<div
id=
"root"
></div>
<script
type=
"text/javascript"
src=
"/dist/main.
43cf75
.js"
></script></body>
<script
type=
"text/javascript"
src=
"/dist/main.
008db9
.js"
></script></body>
</html>
\ No newline at end of file
src/common/api.js
View file @
a9138e61
...
...
@@ -180,6 +180,7 @@ export default {
unlockSubjectList
:
`
${
dakaapi
}
member/unlock_subject/index`
,
edit_unlock_subject
:
`
${
dakaapi
}
member/unlock_subject/update`
,
unlockSubjectDetail
:
`
${
dakaapi
}
member/unlock_subject/detail`
,
unlockAddSubjectCount
:
`
${
dakaapi
}
member/unlock_subject/add_subject_count`
,
},
getschooluuid
:
`
${
dakaapi
}
member/school_uuid`
,
analyzeCenter
:
{
...
...
src/models/createtheme.js
View file @
a9138e61
...
...
@@ -1689,7 +1689,7 @@ export default {
const
loadmessage
=
message
.
loading
(
'小程序码生成中...'
,
0
);
const
data
=
yield
call
(
commonAjax
.
generateQrcode
,
{
scene
:
`i=
${
record
.
class_id
}
&t=
${
record
.
id
}
`
,
page
:
'src/pages/
morethemeindex
/index'
,
page
:
'src/pages/
sharemoretheme
/index'
,
width
:
430
,
});
if
(
data
.
code
===
200
)
{
...
...
@@ -1740,6 +1740,116 @@ export default {
pathname
:
`/sjd/addCustomsContent/
${
id
}
`
,
}));
},
*
addStoreCount
({
payload
},
{
call
,
put
,
select
})
{
const
{
id
}
=
payload
;
yield
put
(
routerRedux
.
push
({
pathname
:
`/sjd/addStoreCount/
${
id
}
`
,
}));
},
// 额外关卡提交方法
*
addSubjectCount
({
payload
},
{
call
,
put
,
select
})
{
const
{
sid
}
=
yield
select
(
state
=>
state
.
webapp
);
const
{
emigrateLoading
,
emigrateParams
,
emigratedObj
,
storeId
,
}
=
yield
select
(
state
=>
state
.
createtheme
);
if
(
emigrateLoading
)
{
return
;
}
yield
put
({
type
:
'updateState'
,
payload
:
{
emigrateLoading
:
true
,
},
});
const
newParams
=
{
...
emigrateParams
};
const
{
is_cheat
,
is_encrypt
,
title
,
text_require_status
,
text_require_num
,
image_require_status
,
image_require_num
,
video_require_status
,
video_require_num
,
audio_require_status
,
audio_require_num
,
force_status
,
force_num
,
callBack
,
}
=
payload
;
const
loadmessage
=
message
.
loading
(
'保存中...'
,
0
);
const
subjectCountData
=
yield
call
(
themeAjax
.
unlockAddSubjectCount
,
{
id
:
emigratedObj
.
id
,
school_id
:
sid
,
});
if
(
subjectCountData
.
code
==
200
)
{
const
data
=
yield
call
(
themeAjax
.
addTheme
,
Object
.
assign
(
newParams
,
{
is_cheat
,
is_encrypt
,
title
,
class_id
:
emigratedObj
.
class_id
,
school_id
:
sid
,
text_require_status
,
text_require_num
,
image_require_status
,
image_require_num
,
video_require_status
,
video_require_num
,
audio_require_status
,
audio_require_num
,
force_status
,
force_num
,
subject_type
:
3
,
unlock_mode_id
:
emigratedObj
.
id
,
content
:
JSON
.
stringify
(
newParams
.
content
),
sort
:
subjectCountData
.
data
.
subject_count
,
},
));
yield
put
({
type
:
'updateState'
,
payload
:
{
emigrateLoading
:
false
,
},
});
setTimeout
(
loadmessage
);
if
(
data
.
code
===
200
)
{
if
(
callBack
&&
(
typeof
callBack
==
'function'
))
{
callBack
();
}
yield
put
(
routerRedux
.
goBack
());
yield
put
({
type
:
'updateState'
,
payload
:
{
isShowCustoms
:
false
,
emigrateParams
:
{
title
:
''
,
content
:
[],
},
},
});
message
.
success
(
'保存成功'
,
0.5
);
}
else
{
yield
put
({
type
:
'webapp/errorrequestresolve'
,
payload
:
{
data
,
},
});
}
}
else
{
yield
put
({
type
:
'webapp/errorrequestresolve'
,
payload
:
{
data
:
subjectCountData
.
data
,
},
});
}
},
*
goEditShowCustoms
({
payload
},
{
call
,
put
,
select
})
{
const
{
item
}
=
payload
;
console
.
log
(
item
);
...
...
src/models/thememgt.js
View file @
a9138e61
...
...
@@ -116,7 +116,7 @@ export default {
case
3
:
params
=
{
scene
:
`i=
${
record
.
class_id
}
&t=
${
record
.
id
}
`
,
page
:
'src/pages/
morethemeindex
/index'
,
page
:
'src/pages/
sharemoretheme
/index'
,
width
:
430
,
};
break
;
...
...
src/models/webapp.js
View file @
a9138e61
...
...
@@ -872,6 +872,39 @@ export default {
},
});
}
const
addStoreCountActive
=
pathToRegexp
(
'/sjd/addStoreCount/:id'
).
exec
(
pathname
);
if
(
addStoreCountActive
)
{
dispatch
({
type
:
'createtheme/pageInit'
,
payload
:
{
},
});
dispatch
({
type
:
'createtheme/createThemeModalfindEmigrated'
,
payload
:
{
store_id
:
addStoreCountActive
[
1
],
},
});
dispatch
({
type
:
'updateState'
,
payload
:
{
breadcrumbList
:
[
{
path
:
'sjd/classmgt'
,
name
:
'班级管理'
,
},
{
path
:
pathname
,
name
:
'主题详情'
,
},
{
path
:
pathname
,
name
:
'新建闯关打卡'
,
},
],
},
});
}
const
editStoreActive
=
pathToRegexp
(
'/sjd/editCustoms/:id'
).
exec
(
pathname
);
if
(
editStoreActive
)
{
dispatch
({
...
...
src/pages/newtheme/customsclock/addStoreCount.js
0 → 100644
View file @
a9138e61
This diff is collapsed.
Click to expand it.
src/pages/newtheme/customsclock/detail.js
View file @
a9138e61
...
...
@@ -26,6 +26,7 @@ const FormItem = Form.Item;
const
{
Option
}
=
Select
;
const
{
TextArea
}
=
Input
;
const
{
RangePicker
}
=
DatePicker
;
const
{
confirm
}
=
Modal
;
class
SuccessStoreForm
extends
React
.
Component
{
constructor
(
props
)
{
super
(
props
);
...
...
@@ -57,7 +58,21 @@ class SuccessStoreForm extends React.Component {
addStore
=
(
id
)
=>
{
const
{
dispatch
,
customsNumberList
}
=
this
.
props
;
if
(
customsNumberList
.
length
==
0
)
{
message
.
warning
(
'关卡数量已满'
,
0.5
);
confirm
({
title
:
'提示'
,
content
:
'确认新增额外关卡?
\
n'
,
icon
:
<
Icon
type
=
"info-circle"
theme
=
"filled"
style
=
{{
color
:
'#1890ff'
,
fontSize
:
30
}}
/>
,
onOk
()
{
dispatch
({
type
:
'createtheme/addStoreCount'
,
payload
:
{
id
,
},
});
},
onCancel
()
{
},
});
return
;
}
dispatch
({
...
...
src/router.js
View file @
a9138e61
...
...
@@ -271,6 +271,11 @@ const UnclockDetail = props => (
{
UnclockDetail
=>
(
<
UnclockDetail
{...
props
}
/>
)
}
<
/Bundle
>
);
const
AddStoreCount
=
props
=>
(
<
Bundle
load
=
{()
=>
import
(
/* webpackChunkName:"AddStoreCount" */
'./pages/newtheme/customsclock/addStoreCount'
)}
>
{
AddStoreCount
=>
(
<
AddStoreCount
{...
props
}
/>
)
}
<
/Bundle
>
);
function
RouterConfig
({
history
})
{
return
(
<
ConfigProvider
locale
=
{
zhCN
}
>
...
...
@@ -322,6 +327,7 @@ function RouterConfig({ history }) {
<
Route
path
=
"/sjd/editCustoms/:id"
exact
component
=
{
EditCustoms
}
/
>
<
Route
path
=
"/sjd/editCustomsContent/:id"
exact
component
=
{
UnclockDetail
}
/
>
<
Route
path
=
"/sjd/addCustomsContent/:id"
exact
component
=
{
UnclockDetail
}
/
>
<
Route
path
=
"/sjd/addStoreCount/:id"
exact
component
=
{
AddStoreCount
}
/
>
<
Route
component
=
{
Errorpage
}
/
>
<
/Switch
>
<
/SjdIndex
>
...
...
src/services/createtheme.js
View file @
a9138e61
...
...
@@ -93,3 +93,11 @@ export function getUnlockSubjectDetail(params) {
data
,
});
}
export
function
unlockAddSubjectCount
(
params
)
{
const
data
=
qs
.
stringify
(
params
);
return
request
({
url
:
`
${
api
.
createtheme
.
unlockAddSubjectCount
}
`
,
method
:
'POST'
,
data
,
});
}
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