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
77958b28
Commit
77958b28
authored
Dec 04, 2019
by
baixian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
一键部署功能完成
parent
a50a5b22
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
273 additions
and
51 deletions
+273
-51
api.js
src/common/api.js
+1
-0
newregister.js
src/models/newregister.js
+64
-7
index.js
src/pages/deployschool/index.js
+100
-36
index.less
src/pages/deployschool/index.less
+97
-5
index.js
src/pages/login/index.js
+3
-1
newregister.js
src/services/newregister.js
+8
-1
request.js
src/utils/request.js
+0
-1
No files found.
src/common/api.js
View file @
77958b28
...
...
@@ -180,4 +180,5 @@ export default {
change_password
:
`
${
dakaapi
}
member/erp/account/change_password`
,
send_code
:
`
${
dakaapi
}
common/sms`
,
},
deployschool
:
`
${
dakaapi
}
member/one_key_deploy`
,
};
src/models/newregister.js
View file @
77958b28
import
{
routerRedux
}
from
'dva/router'
;
import
queryString
from
'qs'
;
import
{
message
}
from
'antd'
;
import
errorcode
from
'../common/errorcode'
;
import
queryString
from
'qs'
;
import
{
delay
}
from
'redux-saga'
;
import
{
LocalStorage
,
SessionStorage
,
isExpired
,
}
from
'../utils/index'
;
import
*
as
login
from
'../services/login
'
;
import
errorcode
from
'../common/errorcode
'
;
import
*
as
newregister
from
'../services/newregister'
;
import
*
as
schoolajax
from
'../services/schooladd'
;
export
default
{
...
...
@@ -24,6 +23,7 @@ export default {
protocolData
:
''
,
timer
:
null
,
location_address
:
''
,
deployType
:
3
,
// 类型 1-口才 2-美术 3-书法 4-跆拳道 5-通用
},
subscriptions
:
{
setup
({
dispatch
,
history
})
{
// eslint-disable-line
...
...
@@ -54,7 +54,6 @@ export default {
password
,
from
,
});
console
.
log
(
data
,
'data'
);
if
(
data
.
code
===
200
)
{
if
(
data
.
data
&&
data
.
data
.
token
)
{
LocalStorage
.
setItem
(
'user'
,
{
...
...
@@ -91,6 +90,21 @@ export default {
area
:
district
,
token
:
data
.
data
.
token
,
});
if
(
schooladd
.
code
===
200
)
{
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
:
'updateState'
,
payload
:
{
...
...
@@ -99,6 +113,22 @@ export default {
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
({
...
...
@@ -114,6 +144,34 @@ export default {
pathname
:
'/userinfo'
,
}));
},
*
developSchool
({
payload
},
{
call
,
put
,
select
})
{
const
{
deployType
,
schoolId
}
=
yield
select
(
state
=>
state
.
newregister
);
const
{
sid
}
=
yield
select
(
state
=>
state
.
webapp
);
const
data
=
yield
call
(
newregister
.
deploySchool
,
{
school_id
:
schoolId
||
sid
,
type
:
deployType
,
});
if
(
data
.
code
==
200
)
{
yield
put
({
type
:
'updateState'
,
payload
:
{
deployType
:
3
,
},
});
}
else
{
yield
put
({
type
:
'webapp/errorrequestresolve'
,
payload
:
{
data
,
},
});
}
},
*
goHome
({
payload
},
{
put
})
{
yield
put
(
routerRedux
.
push
({
pathname
:
'/sjd/indexstaic'
,
}));
},
*
getverifycode
({
payload
},
{
call
,
put
,
select
})
{
const
{
countdown
,
counting
,
gettingVerifyCoding
}
=
yield
select
(
state
=>
state
.
newregister
);
const
{
timer
}
=
yield
select
(
state
=>
state
.
register
);
...
...
@@ -130,7 +188,6 @@ export default {
const
verifycodehide
=
message
.
loading
(
'正在获取验证码....'
,
0
);
const
data
=
yield
call
(
newregister
.
getVerifyCode
,
{
mobile
,
sms_type
});
if
(
data
.
code
===
200
)
{
console
.
log
(
data
,
'data'
);
setTimeout
(
verifycodehide
);
message
.
success
(
'验证码获取成功'
,
1
);
yield
put
({
...
...
@@ -208,7 +265,6 @@ export default {
*
unloadstate
({
payload
},
{
call
,
put
,
select
})
{
const
{
timer
}
=
yield
select
(
state
=>
state
.
register
);
if
(
timer
)
clearInterval
(
timer
);
yield
put
({
type
:
'updateState'
,
payload
:
{
...
...
@@ -245,6 +301,7 @@ export default {
protocolData
:
''
,
timer
:
null
,
location_address
:
''
,
deployType
:
3
,
},
});
},
...
...
src/pages/deployschool/index.js
View file @
77958b28
This diff is collapsed.
Click to expand it.
src/pages/deployschool/index.less
View file @
77958b28
...
...
@@ -137,11 +137,19 @@
margin-left: -15px;
.lineTitle {
font-size:18px;
font-family:PingFang SC;
font-weight:500;
color:
rgba(210,210,210,1)
;
color:
#D2D2D2
;
line-height:30px;
padding-right: 40px;
margin-top: 17px;
}
.lineTitleActive {
font-size:18px;
font-weight:500;
color:#4C4C4C;
line-height:30px;
padding-right: 40px;
margin-top: 17px;
}
}
}
...
...
@@ -155,6 +163,18 @@
height: 23px;
border-radius: 50%;
border: 6px solid #DCDCDC;
&>img {
display: none;
}
}
.checkedcircle {
width: 23px;
height: 23px;
border-radius: 50%;
&>img {
width: 23px;
height: 23px;
}
}
.line {
width: 130px;
...
...
@@ -167,12 +187,21 @@
margin-left: -20px;
.lineTitle {
font-size:18px;
font-family:PingFang SC;
font-weight:500;
color:
rgba(210,210,210,1)
;
color:
#D2D2D2
;
line-height:30px;
padding-right: 40px;
margin-top: 17px;
}
.lineTitle:not(:last-child) {
.lineTitleActive {
font-size:18px;
font-weight:500;
color:#4C4C4C;
line-height:30px;
padding-right: 40px;
margin-top: 17px;
}
.lineTitle:not(:last-child),.lineTitleActive:not(:last-child) {
padding-right: 78px;
}
}
...
...
@@ -215,3 +244,66 @@
width: 100%;
}
}
.progress {
position: relative;
width: 630px;
height: 48px;
margin: 40px 0 30px 177px;
background:rgba(255,255,255,1);
border:2px solid rgba(220,220,220,1);
border-radius:24px;
.innerText {
width: 100%;
font-size:18px;
font-family:PingFang SC;
font-weight:bold;
color:rgba(0,0,0,1);
text-align: center;
position: absolute;
left: 0;
bottom: 0;
z-index: 2;
}
}
.innerProgress {
width: 630px;
height: 48px;
background:rgba(255,255,255,1);
border:2px solid rgba(220,220,220,1);
border-radius:24px;
text-align: center;
}
.innerAnimation{
animation: dailogBtnChange 6s linear forwards;
width: 630px;
height: 48px;
background:linear-gradient(90deg,rgba(51,168,255,1),rgba(4,222,254,1));
border-radius:24px;
text-align: center;
line-height: 48px;
font-size:18px;
font-family:PingFang SC;
font-weight:bold;
color:rgba(0,0,0,1);
}
.enterIndex {
width: 630px;
height: 48px;
background:linear-gradient(90deg,rgba(51,168,255,1),rgba(4,222,254,1));
border-radius:24px;
text-align: center;
line-height: 48px;
font-size:18px;
font-family:PingFang SC;
font-weight:bold;
color:#fff;
cursor: pointer;
}
@keyframes dailogBtnChange{
0% {
width: 0px;
}
100% {
width: 630px;
}
}
src/pages/login/index.js
View file @
77958b28
import
React
from
'react'
;
import
{
connect
}
from
'dva'
;
import
{
withRouter
,
Link
}
from
'dva/router'
;
import
{
Row
,
Col
,
Form
,
Input
,
Button
,
Checkbox
,
message
,
Tabs
}
from
'antd'
;
import
LoginStyles
from
'./index.less'
;
import
{
LocalStorage
,
imagifyorigin
,
pageIn
}
from
'../../utils/index'
;
...
...
@@ -230,7 +231,8 @@ class LoginForm extends React.Component {
<
/Form
>
<
div
className
=
{
LoginStyles
.
registerbox
}
>
<
div
className
=
{
LoginStyles
.
noaccount
}
>
还没有账号?
<
/div
>
<
div
className
=
{
LoginStyles
.
goregister
}
onClick
=
{
this
.
goRegister
}
>
去注册
<
/div
>
<
Link
className
=
{
LoginStyles
.
goregister
}
to
=
"/newregister"
target
=
"_blank"
>
去注册
<
/Link
>
{
/* <div className={LoginStyles.goregister} onClick={this.goRegister}>去注册</div> */
}
<
/div
>
<
/div>
}
<
/div
>
...
...
src/services/newregister.js
View file @
77958b28
...
...
@@ -19,4 +19,11 @@ export function getVerifyCode(params) {
needAuth
:
false
,
});
}
export
function
deploySchool
(
params
)
{
const
data
=
qs
.
stringify
(
params
);
return
request
({
url
:
`
${
api
.
deployschool
}
`
,
method
:
'POST'
,
data
,
});
}
src/utils/request.js
View file @
77958b28
...
...
@@ -66,7 +66,6 @@ export default function request(options) {
message
:
'error'
}
}
console
.
log
(
user
,
'user'
);
options
.
headers
=
{
Authorization
:
`bearer
${
user
.
token
}
`
}
...
...
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