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
a26a5a2d
Commit
a26a5a2d
authored
Dec 06, 2019
by
wangxuelai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
''
parent
f89c0670
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
123 additions
and
39 deletions
+123
-39
UserGuide.less
src/components/UserGuide.less
+3
-0
deployschool.js
src/models/deployschool.js
+80
-8
newregister.js
src/models/newregister.js
+29
-29
userguide.js
src/models/userguide.js
+1
-1
webapp.js
src/models/webapp.js
+9
-0
router.js
src/router.js
+1
-1
No files found.
src/components/UserGuide.less
View file @
a26a5a2d
...
...
@@ -94,6 +94,9 @@
transform: translateY(-50%);
cursor: pointer;
}
.callguide {
}
}
:global {
.UserGuideModal {
...
...
src/models/deployschool.js
View file @
a26a5a2d
...
...
@@ -10,22 +10,50 @@ import {
import
errorcode
from
'../common/errorcode'
;
import
*
as
newregister
from
'../services/newregister'
;
import
*
as
schoolajax
from
'../services/schooladd'
;
import
*
as
commonajax
from
'../services/common'
;
import
rootMap
from
'../common/constants'
;
export
default
{
namespace
:
'deployschool'
,
state
:
{
deployType
:
3
,
// 类型 1-口才 2-美术 3-书法 4-跆拳道 5-通用
sid
:
0
,
schoolUserInfo
:
{},
},
subscriptions
:
{
setup
({
dispatch
,
history
})
{
// eslint-disable-line
},
},
effects
:
{
*
queryinfo
({
payload
},
{
call
,
put
,
select
})
{
// 释放该页面存储的所有状态
const
{
id
}
=
payload
;
yield
put
({
type
:
'updateState'
,
payload
:
{
sid
:
id
,
},
});
yield
put
({
type
:
'querymemberinfo'
,
});
},
*
querymemberinfo
({
payload
},
{
call
,
put
,
select
})
{
// 释放该页面存储的所有状态
const
{
sid
}
=
yield
select
(
state
=>
state
.
deployschool
);
const
nickname
=
yield
call
(
commonajax
.
myNickname
,
{
school_id
:
sid
,
});
if
(
nickname
.
code
==
200
)
{
yield
put
({
type
:
'updateState'
,
payload
:
{
schoolUserInfo
:
nickname
.
data
,
},
});
}
},
*
developSchool
({
payload
},
{
call
,
put
,
select
})
{
const
{
deployType
}
=
yield
select
(
state
=>
state
.
deployschool
);
const
{
schoolId
}
=
yield
select
(
state
=>
state
.
newregister
);
const
{
sid
}
=
yield
select
(
state
=>
state
.
webapp
);
const
{
deployType
,
sid
}
=
yield
select
(
state
=>
state
.
deployschool
);
const
data
=
yield
call
(
newregister
.
deploySchool
,
{
school_id
:
s
choolId
||
s
id
,
school_id
:
sid
,
type
:
deployType
,
});
if
(
data
.
code
==
200
)
{
...
...
@@ -45,13 +73,30 @@ export default {
}
},
*
developSkip
({
payload
},
{
call
,
put
,
select
})
{
const
{
schoolId
}
=
yield
select
(
state
=>
state
.
newregister
);
const
{
sid
}
=
yield
select
(
state
=>
state
.
webapp
);
const
{
schoolUserInfo
,
sid
}
=
yield
select
(
state
=>
state
.
deployschool
);
const
data
=
yield
call
(
newregister
.
deploySchool
,
{
school_id
:
s
choolId
||
s
id
,
school_id
:
sid
,
type
:
6
,
});
if
(
data
.
code
==
200
)
{
LocalStorage
.
setItem
(
'sid'
,
sid
);
LocalStorage
.
setItem
(
'role'
,
schoolUserInfo
.
schoolTeacher
?
schoolUserInfo
.
schoolTeacher
.
type
:
5
);
if
(
schoolUserInfo
.
schoolTeacher
.
school_teacher
)
{
LocalStorage
.
setItem
(
'rootMap'
,
rootMap
.
rootMap
);
}
else
{
LocalStorage
.
setItem
(
'rootMap'
,
rootMap
.
emptyRootMap
);
}
yield
put
({
type
:
'webapp/updateState'
,
payload
:
{
sid
,
role
:
schoolUserInfo
.
schoolTeacher
?
schoolUserInfo
.
schoolTeacher
.
type
:
''
,
},
});
yield
call
(
commonajax
.
schoolLoginTime
,
{
id
:
sid
,
type
:
1
,
});
yield
put
(
routerRedux
.
push
({
pathname
:
'/sjd/indexstaic'
,
}));
...
...
@@ -64,10 +109,37 @@ export default {
});
}
},
*
goHome
({
payload
},
{
put
})
{
*
goHome
({
payload
},
{
put
,
call
,
select
})
{
const
{
schoolUserInfo
,
sid
}
=
yield
select
(
state
=>
state
.
deployschool
);
LocalStorage
.
setItem
(
'sid'
,
sid
);
LocalStorage
.
setItem
(
'role'
,
schoolUserInfo
.
schoolTeacher
?
schoolUserInfo
.
schoolTeacher
.
type
:
5
);
if
(
schoolUserInfo
.
schoolTeacher
)
{
LocalStorage
.
setItem
(
'rootMap'
,
rootMap
.
rootMap
);
}
else
{
LocalStorage
.
setItem
(
'rootMap'
,
rootMap
.
emptyRootMap
);
}
yield
put
({
type
:
'webapp/updateState'
,
payload
:
{
sid
,
role
:
schoolUserInfo
.
schoolTeacher
?
schoolUserInfo
.
schoolTeacher
.
type
:
''
,
},
});
yield
call
(
commonajax
.
schoolLoginTime
,
{
id
:
sid
,
type
:
1
,
});
yield
put
(
routerRedux
.
push
({
pathname
:
'/sjd/indexstaic'
,
}));
yield
delay
(
200
);
yield
put
({
type
:
'userguide/updateState'
,
payload
:
{
guideShow
:
true
,
// 引导是否开启
guideStep
:
1
,
// 引导步骤
},
});
},
*
pageInit
({
payload
},
{
call
,
put
,
select
})
{
yield
put
({
...
...
src/models/newregister.js
View file @
a26a5a2d
...
...
@@ -90,44 +90,44 @@ export default {
token
:
data
.
data
.
token
,
});
if
(
schooladd
.
code
===
200
)
{
LocalStorage
.
setItem
(
'sid'
,
schooladd
.
data
.
id
);
// LocalStorage.setItem('sid', schooladd.data.id);
// yield put({
// type: 'webapp/updateState',
// payload: {
// sid: LocalStorage.getItem('sid'),
// },
// });
// yield put({
// type: 'updateState',
// payload: {
// schoolId: schooladd.data.id,
// },
// });
yield
put
({
type
:
'
webapp/
updateState'
,
type
:
'updateState'
,
payload
:
{
sid
:
LocalStorage
.
getItem
(
'sid'
),
registering
:
false
,
userInfo
:
LocalStorage
.
getItem
(
'user'
),
location_address
:
''
,
},
});
yield
put
({
type
:
'updateState'
,
type
:
'
schooladd/
updateState'
,
payload
:
{
schoolId
:
schooladd
.
data
.
id
,
longitude
:
''
,
latitude
:
''
,
locationAddress
:
''
,
province
:
''
,
city
:
''
,
district
:
''
,
address
:
''
,
},
});
// yield delay(200);
yield
put
(
routerRedux
.
push
({
pathname
:
`/deploySchool/
${
schooladd
.
data
.
id
}
`
,
}));
}
yield
put
({
type
:
'updateState'
,
payload
:
{
registering
:
false
,
userInfo
:
LocalStorage
.
getItem
(
'user'
),
location_address
:
''
,
},
});
yield
put
({
type
:
'schooladd/updateState'
,
payload
:
{
longitude
:
''
,
latitude
:
''
,
locationAddress
:
''
,
province
:
''
,
city
:
''
,
district
:
''
,
address
:
''
,
},
});
yield
delay
(
200
);
yield
put
(
routerRedux
.
push
({
pathname
:
'/deploySchool'
,
}));
}
else
{
message
.
error
(
data
.
msg
,
1
);
yield
put
({
...
...
src/models/userguide.js
View file @
a26a5a2d
...
...
@@ -15,7 +15,7 @@ const pathToRegexp = require('path-to-regexp');
export
default
{
namespace
:
'userguide'
,
state
:
{
guideShow
:
tru
e
,
// 引导是否开启
guideShow
:
fals
e
,
// 引导是否开启
guideStep
:
1
,
// 引导步骤
position
:
{},
},
...
...
src/models/webapp.js
View file @
a26a5a2d
...
...
@@ -944,6 +944,15 @@ export default {
},
});
}
const
deploySchoolMath
=
pathToRegexp
(
'/deploySchool/:id'
).
exec
(
pathname
);
if
(
deploySchoolMath
)
{
dispatch
({
type
:
'deployschool/queryinfo'
,
payload
:
{
id
:
deploySchoolMath
[
1
],
},
});
}
});
},
},
...
...
src/router.js
View file @
a26a5a2d
...
...
@@ -299,7 +299,7 @@ function RouterConfig({ history }) {
<
Route
path
=
"/login"
exact
component
=
{
Login
}
/
>
<
Route
path
=
"/register"
exact
component
=
{
NewRegister
}
/
>
<
Route
path
=
"/rechargedesc"
exact
component
=
{
RechargeDesc
}
/
>
<
Route
path
=
"/deploySchool"
exact
component
=
{
DeploySchool
}
/
>
<
Route
path
=
"/deploySchool
/:id
"
exact
component
=
{
DeploySchool
}
/
>
<
Route
path
=
"/404"
render
=
{()
=>
(
<
Errorpage
/>
)}
/
>
<
/Switch
>
<
/Router
>
...
...
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