Commit 0dad2b7e by zhangleyuan

style:修改课程分类的样式问题

parent cfa5c92f
......@@ -8,6 +8,8 @@ import CheckBeforeSendCode from '../../components/CheckBeforeSendCode';
import Service from "../../common/js/service"
import User from '@/common/js/user';
import axios from 'axios';
import _ from 'underscore';
function Login(props) {
const [phone, setPhone] = useState(''); // 登录手机号
const [phoneverify, setPhoneverify] = useState(''); // 密码登录验证码
......@@ -17,7 +19,7 @@ function Login(props) {
const [waitStatus, setWaitStatus] = useState(false); // 验证码是否在倒计时
const [errorMessage,setErrorMessage] = useState('');
const [phoneError,setPhoneError] = useState(false);
const [checkObject1, setCheckObject1] = useState({});
useEffect(() => {
}, [])
......@@ -36,6 +38,7 @@ function Login(props) {
setErrorMessage("请输入11位手机号")
return;
}
!_.isEmpty(checkObject1) && checkObject1.reset();
setOpenCheck1(true);
}
function handleSendSMSCode(checkData, userType) {
......
......@@ -4,4 +4,22 @@
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
......@@ -73,29 +73,6 @@ function CourseCatalogPage() {
}
StoreService.delCourseCategory(param).then((res: any) =>{
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("分类已删除");
});
}
......@@ -116,7 +93,7 @@ function CourseCatalogPage() {
{ record.type==="parent" &&
<>
<span
className="add"
className="add-btn"
onClick={() => { addSecondCatalog(record) }}
>
添加子分类
......@@ -125,13 +102,13 @@ function CourseCatalogPage() {
</>
}
<span
<span className="edit-btn"
onClick={()=>{editCatalog(record)}}
>
编辑
</span>
<span className="divider-line" >{" | "}</span>
<span onClick={()=>{deleteCatalog(record)}}
<span className="delete-btn" onClick={()=>{deleteCatalog(record)}}
>
删除
</span>
......
......@@ -2,12 +2,12 @@
* @Author: wufan
* @Date: 2020-11-27 16:21:49
* @LastEditors: zhangleyuan
* @LastEditTime: 2020-12-08 15:17:37
* @LastEditTime: 2020-12-08 18:04:35
* @Description: Description
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
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 User from '@/common/js/user';
import StoreService from "@/domains/store-domain/storeService";
......@@ -37,14 +37,9 @@ function CatalogAddOrEditModal(props: CatalogAddOrEditModalProps) {
categoryName:catalogName
}
StoreService.addCourseCategory(param).then((res: any) => {
// const data = {
// type:'addCatalog',
// catalogName:catalogName,
// id:res.result
// }
refreshCatalogList();
onClose();
message.success("添加分类成功");
});
}
function editCatalog():any{
......@@ -53,13 +48,9 @@ function CatalogAddOrEditModal(props: CatalogAddOrEditModalProps) {
categoryName: catalogName,
}
StoreService.editCourseCategory(param).then((res: any) => {
// const data = {
// type:'editCatalog',
// catalogName:catalogName,
// id:choosedItem.id
// }
refreshCatalogList();
onClose();
message.success("编辑分类成功");
});
}
return (
......
......@@ -2,13 +2,13 @@
* @Author: wufan
* @Date: 2020-11-27 16:21:49
* @LastEditors: zhangleyuan
* @LastEditTime: 2020-12-08 15:34:07
* @LastEditTime: 2020-12-08 18:05:52
* @Description: Description
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
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 User from '@/common/js/user';
import _ from "underscore";
......@@ -37,7 +37,6 @@ function SecondCatalogAddOrEditModal(props: SecondCatalogAddOrEditModalProps) {
});
useEffect(() => {
getOptionList();
console.log('')
},[query]);
function getOptionList():any {
let _query = _.clone(query);
......@@ -77,14 +76,9 @@ function SecondCatalogAddOrEditModal(props: SecondCatalogAddOrEditModalProps) {
categoryName:secondCatalogName
}
StoreService.addCourseCategory(param).then((res: any) => {
// const data = {
// type:'addSecondCatalog',
// catalogName:secondCatalogName,
// parentId:selectParentId,
// id:res.result
// }
refreshCatalogList();
onClose();
message.success("添加子分类成功");
});
}
function editSecondcatalog():any{
......@@ -94,14 +88,9 @@ function SecondCatalogAddOrEditModal(props: SecondCatalogAddOrEditModalProps) {
categoryName: secondCatalogName,
}
StoreService.editCourseCategory(param).then((res: any) => {
// const data = {
// type:'editSecondCatalog',
// catalogName:secondCatalogName,
// id:choosedItem.id,
// parentId:selectParentId,
// }
refreshCatalogList();
onClose();
message.success("编辑子分类成功");
});
}
return (
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment