Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
xiaomai-cloud-class-web
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xiaomai-cloud-class
xiaomai-cloud-class-web
Commits
0dad2b7e
Commit
0dad2b7e
authored
Dec 08, 2020
by
zhangleyuan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
style:修改课程分类的样式问题
parent
cfa5c92f
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
34 additions
and
55 deletions
+34
-55
src/modules/root/Login.jsx
+4
-1
src/modules/store-manege/CourseCatalogPage.less
+19
-0
src/modules/store-manege/CourseCatalogPage.tsx
+3
-26
src/modules/store-manege/modal/CatalogAddOrEditModal.tsx
+4
-13
src/modules/store-manege/modal/SecondCatalogAddOrEditModal.tsx
+4
-15
No files found.
src/modules/root/Login.jsx
View file @
0dad2b7e
...
@@ -8,6 +8,8 @@ import CheckBeforeSendCode from '../../components/CheckBeforeSendCode';
...
@@ -8,6 +8,8 @@ import CheckBeforeSendCode from '../../components/CheckBeforeSendCode';
import
Service
from
"../../common/js/service"
import
Service
from
"../../common/js/service"
import
User
from
'@/common/js/user'
;
import
User
from
'@/common/js/user'
;
import
axios
from
'axios'
;
import
axios
from
'axios'
;
import
_
from
'underscore'
;
function
Login
(
props
)
{
function
Login
(
props
)
{
const
[
phone
,
setPhone
]
=
useState
(
''
);
// 登录手机号
const
[
phone
,
setPhone
]
=
useState
(
''
);
// 登录手机号
const
[
phoneverify
,
setPhoneverify
]
=
useState
(
''
);
// 密码登录验证码
const
[
phoneverify
,
setPhoneverify
]
=
useState
(
''
);
// 密码登录验证码
...
@@ -17,7 +19,7 @@ function Login(props) {
...
@@ -17,7 +19,7 @@ function Login(props) {
const
[
waitStatus
,
setWaitStatus
]
=
useState
(
false
);
// 验证码是否在倒计时
const
[
waitStatus
,
setWaitStatus
]
=
useState
(
false
);
// 验证码是否在倒计时
const
[
errorMessage
,
setErrorMessage
]
=
useState
(
''
);
const
[
errorMessage
,
setErrorMessage
]
=
useState
(
''
);
const
[
phoneError
,
setPhoneError
]
=
useState
(
false
);
const
[
phoneError
,
setPhoneError
]
=
useState
(
false
);
const
[
checkObject1
,
setCheckObject1
]
=
useState
({});
useEffect
(()
=>
{
useEffect
(()
=>
{
},
[])
},
[])
...
@@ -36,6 +38,7 @@ function Login(props) {
...
@@ -36,6 +38,7 @@ function Login(props) {
setErrorMessage
(
"请输入11位手机号"
)
setErrorMessage
(
"请输入11位手机号"
)
return
;
return
;
}
}
!
_
.
isEmpty
(
checkObject1
)
&&
checkObject1
.
reset
();
setOpenCheck1
(
true
);
setOpenCheck1
(
true
);
}
}
function
handleSendSMSCode
(
checkData
,
userType
)
{
function
handleSendSMSCode
(
checkData
,
userType
)
{
...
...
src/modules/store-manege/CourseCatalogPage.less
View file @
0dad2b7e
...
@@ -4,4 +4,22 @@
...
@@ -4,4 +4,22 @@
display:none;
display:none;
}
}
}
}
.divider-line{
color: #BFBFBF;
}
.add-btn{
font-weight: 400;
color: #5289FA;
line-height: 20px;
}
.edit-btn{
font-weight: 400;
color: #5289FA;
line-height: 20px;
}
.delete-btn{
font-weight: 400;
color: #5289FA;
line-height: 20px;
}
}
}
\ No newline at end of file
src/modules/store-manege/CourseCatalogPage.tsx
View file @
0dad2b7e
...
@@ -73,29 +73,6 @@ function CourseCatalogPage() {
...
@@ -73,29 +73,6 @@ function CourseCatalogPage() {
}
}
StoreService
.
delCourseCategory
(
param
).
then
((
res
:
any
)
=>
{
StoreService
.
delCourseCategory
(
param
).
then
((
res
:
any
)
=>
{
getCourseCatalogList
();
getCourseCatalogList
();
// if(record.type ==='parent'){
// let _courseCatalogList:any = [...courseCatalogList];
// for(let i=0;i<_courseCatalogList.length;i++){
// if(_courseCatalogList[i].id === record.id){
// _courseCatalogList.splice(i,1);
// }
// }
// setCourseCatalogList(_courseCatalogList);
// setTotal(_courseCatalogList.length);
// getCourseCatalogList();
// }else{
// let _courseCatalogListClone:any = JSON.parse(JSON.stringify(courseCatalogList));
// for(let i=0;i<_courseCatalogListClone.length;i++){
// if(_courseCatalogListClone[i].child){
// for(let j=0;j<_courseCatalogListClone[i].child.length;j++){
// if(_courseCatalogListClone[i].child[j].id === record.id){
// _courseCatalogListClone[i].child.splice(j,1);
// }
// }
// }
// }
// setCourseCatalogList(_courseCatalogListClone)
// }
message
.
success
(
"分类已删除"
);
message
.
success
(
"分类已删除"
);
});
});
}
}
...
@@ -116,7 +93,7 @@ function CourseCatalogPage() {
...
@@ -116,7 +93,7 @@ function CourseCatalogPage() {
{
record
.
type
===
"parent"
&&
{
record
.
type
===
"parent"
&&
<>
<>
<
span
<
span
className=
"add"
className=
"add
-btn
"
onClick=
{
()
=>
{
addSecondCatalog
(
record
)
}
}
onClick=
{
()
=>
{
addSecondCatalog
(
record
)
}
}
>
>
添加子分类
添加子分类
...
@@ -125,13 +102,13 @@ function CourseCatalogPage() {
...
@@ -125,13 +102,13 @@ function CourseCatalogPage() {
</>
</>
}
}
<
span
<
span
className=
"edit-btn"
onClick=
{
()
=>
{
editCatalog
(
record
)}
}
onClick=
{
()
=>
{
editCatalog
(
record
)}
}
>
>
编辑
编辑
</
span
>
</
span
>
<
span
className=
"divider-line"
>
{
" | "
}
</
span
>
<
span
className=
"divider-line"
>
{
" | "
}
</
span
>
<
span
onClick=
{
()
=>
{
deleteCatalog
(
record
)}
}
<
span
className=
"delete-btn"
onClick=
{
()
=>
{
deleteCatalog
(
record
)}
}
>
>
删除
删除
</
span
>
</
span
>
...
...
src/modules/store-manege/modal/CatalogAddOrEditModal.tsx
View file @
0dad2b7e
...
@@ -2,12 +2,12 @@
...
@@ -2,12 +2,12 @@
* @Author: wufan
* @Author: wufan
* @Date: 2020-11-27 16:21:49
* @Date: 2020-11-27 16:21:49
* @LastEditors: zhangleyuan
* @LastEditors: zhangleyuan
* @LastEditTime: 2020-12-08 1
5:17:37
* @LastEditTime: 2020-12-08 1
8:04:35
* @Description: Description
* @Description: Description
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
*/
import
React
,
{
useState
,
useEffect
}
from
"react"
;
import
React
,
{
useState
,
useEffect
}
from
"react"
;
import
{
Modal
,
Form
,
Input
,
Button
}
from
"antd"
;
import
{
Modal
,
Form
,
Input
,
Button
,
message
}
from
"antd"
;
import
'./CatalogAddOrEditModal.less'
import
'./CatalogAddOrEditModal.less'
import
User
from
'@/common/js/user'
;
import
User
from
'@/common/js/user'
;
import
StoreService
from
"@/domains/store-domain/storeService"
;
import
StoreService
from
"@/domains/store-domain/storeService"
;
...
@@ -37,14 +37,9 @@ function CatalogAddOrEditModal(props: CatalogAddOrEditModalProps) {
...
@@ -37,14 +37,9 @@ function CatalogAddOrEditModal(props: CatalogAddOrEditModalProps) {
categoryName
:
catalogName
categoryName
:
catalogName
}
}
StoreService
.
addCourseCategory
(
param
).
then
((
res
:
any
)
=>
{
StoreService
.
addCourseCategory
(
param
).
then
((
res
:
any
)
=>
{
// const data = {
// type:'addCatalog',
// catalogName:catalogName,
// id:res.result
// }
refreshCatalogList
();
refreshCatalogList
();
onClose
();
onClose
();
message
.
success
(
"添加分类成功"
);
});
});
}
}
function
editCatalog
():
any
{
function
editCatalog
():
any
{
...
@@ -53,13 +48,9 @@ function CatalogAddOrEditModal(props: CatalogAddOrEditModalProps) {
...
@@ -53,13 +48,9 @@ function CatalogAddOrEditModal(props: CatalogAddOrEditModalProps) {
categoryName
:
catalogName
,
categoryName
:
catalogName
,
}
}
StoreService
.
editCourseCategory
(
param
).
then
((
res
:
any
)
=>
{
StoreService
.
editCourseCategory
(
param
).
then
((
res
:
any
)
=>
{
// const data = {
// type:'editCatalog',
// catalogName:catalogName,
// id:choosedItem.id
// }
refreshCatalogList
();
refreshCatalogList
();
onClose
();
onClose
();
message
.
success
(
"编辑分类成功"
);
});
});
}
}
return
(
return
(
...
...
src/modules/store-manege/modal/SecondCatalogAddOrEditModal.tsx
View file @
0dad2b7e
...
@@ -2,13 +2,13 @@
...
@@ -2,13 +2,13 @@
* @Author: wufan
* @Author: wufan
* @Date: 2020-11-27 16:21:49
* @Date: 2020-11-27 16:21:49
* @LastEditors: zhangleyuan
* @LastEditors: zhangleyuan
* @LastEditTime: 2020-12-08 1
5:34:07
* @LastEditTime: 2020-12-08 1
8:05:52
* @Description: Description
* @Description: Description
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
*/
import
React
,
{
useState
,
useEffect
}
from
"react"
;
import
React
,
{
useState
,
useEffect
}
from
"react"
;
import
{
Modal
,
Form
,
Input
,
Button
,
Select
}
from
"antd"
;
import
{
Modal
,
Form
,
Input
,
Button
,
Select
,
message
}
from
"antd"
;
import
'./SecondCatalogAddOrEditModal.less'
import
'./SecondCatalogAddOrEditModal.less'
import
User
from
'@/common/js/user'
;
import
User
from
'@/common/js/user'
;
import
_
from
"underscore"
;
import
_
from
"underscore"
;
...
@@ -37,7 +37,6 @@ function SecondCatalogAddOrEditModal(props: SecondCatalogAddOrEditModalProps) {
...
@@ -37,7 +37,6 @@ function SecondCatalogAddOrEditModal(props: SecondCatalogAddOrEditModalProps) {
});
});
useEffect
(()
=>
{
useEffect
(()
=>
{
getOptionList
();
getOptionList
();
console
.
log
(
''
)
},[
query
]);
},[
query
]);
function
getOptionList
():
any
{
function
getOptionList
():
any
{
let
_query
=
_
.
clone
(
query
);
let
_query
=
_
.
clone
(
query
);
...
@@ -77,14 +76,9 @@ function SecondCatalogAddOrEditModal(props: SecondCatalogAddOrEditModalProps) {
...
@@ -77,14 +76,9 @@ function SecondCatalogAddOrEditModal(props: SecondCatalogAddOrEditModalProps) {
categoryName
:
secondCatalogName
categoryName
:
secondCatalogName
}
}
StoreService
.
addCourseCategory
(
param
).
then
((
res
:
any
)
=>
{
StoreService
.
addCourseCategory
(
param
).
then
((
res
:
any
)
=>
{
// const data = {
// type:'addSecondCatalog',
// catalogName:secondCatalogName,
// parentId:selectParentId,
// id:res.result
// }
refreshCatalogList
();
refreshCatalogList
();
onClose
();
onClose
();
message
.
success
(
"添加子分类成功"
);
});
});
}
}
function
editSecondcatalog
():
any
{
function
editSecondcatalog
():
any
{
...
@@ -94,14 +88,9 @@ function SecondCatalogAddOrEditModal(props: SecondCatalogAddOrEditModalProps) {
...
@@ -94,14 +88,9 @@ function SecondCatalogAddOrEditModal(props: SecondCatalogAddOrEditModalProps) {
categoryName
:
secondCatalogName
,
categoryName
:
secondCatalogName
,
}
}
StoreService
.
editCourseCategory
(
param
).
then
((
res
:
any
)
=>
{
StoreService
.
editCourseCategory
(
param
).
then
((
res
:
any
)
=>
{
// const data = {
// type:'editSecondCatalog',
// catalogName:secondCatalogName,
// id:choosedItem.id,
// parentId:selectParentId,
// }
refreshCatalogList
();
refreshCatalogList
();
onClose
();
onClose
();
message
.
success
(
"编辑子分类成功"
);
});
});
}
}
return
(
return
(
...
...
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