Commit dfb9c73a by zhangleyuan

feat:更改接口的名称

parent 42b977ca
/*
* @Author: zhangleyuan
* @Date: 2020-11-27 15:06:31
* @LastEditors: wufan
* @LastEditTime: 2020-12-07 20:09:22
* @LastEditors: zhangleyuan
* @LastEditTime: 2020-12-08 11:55:09
* @Description: 描述一下
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
......@@ -42,11 +42,14 @@ function PersonalInfoPage() {
storeUserId:User.getStoreUserId()
}
BaseService.getStoreUser(param).then((res) => {
const {nickName,phone,roleCodes,avatar} = res.result;
const {nickName,phone,roleCodes} = res.result;
setNickName(nickName);
setPhone(phone);
setRoleCodes(roleCodes)
setAvatar(avatar)
if(res.result.avatar){
setAvatar(res.result.avatar)
}
});
}
function _handleUpdateAvatar(e: any): any {
......
......@@ -49,7 +49,7 @@ function Login(props) {
scene: 'nc_login',
serverType: "CLOUD_CLASS_LOGIN",
}
axios.post('https://dev-heimdall.xiaomai5.com/hades/anon/store/sendLoginAuthCode', params).then((res) => {
axios.post('https://dev-heimdall.xiaomai5.com/hades/anon/hades/sendLoginAuthCode', params).then((res) => {
if (!res.data.success) {
setErrorMessage(res.data.message);
} else {
......@@ -84,7 +84,7 @@ function Login(props) {
authCode:phoneverify,
appTermEnum:"XIAOMAI_CLOUD_CLASS_PC_WEB"
}
axios.post('https://dev-heimdall.xiaomai5.com/hades/anon/store/login', params).then((res) => {
axios.post('https://dev-heimdall.xiaomai5.com/hades/anon/hades/login', params).then((res) => {
const data = res.data;
if (!data.success) {
setErrorMessage(data.message);
......
......@@ -2,7 +2,7 @@
* @Author: wufan
* @Date: 2020-11-27 16:21:49
* @LastEditors: zhangleyuan
* @LastEditTime: 2020-12-07 19:05:11
* @LastEditTime: 2020-12-08 14:12:20
* @Description: Description
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
......@@ -36,13 +36,14 @@ function CatalogAddOrEditModal(props: CatalogAddOrEditModalProps) {
categoryName:catalogName
}
StoreService.addCourseCategory(param).then((res: any) => {
// const data = {
// type:'addCatalog',
// catalogName:catalogName,
// id:res.result
// }
refreshCatalogList();
onClose();
const data = {
type:'addCatalog',
catalogName:catalogName,
id:res.result
}
refreshCatalogList(data);
});
}
function editCatalog():any{
......@@ -51,12 +52,12 @@ function CatalogAddOrEditModal(props: CatalogAddOrEditModalProps) {
categoryName: catalogName,
}
StoreService.editCourseCategory(param).then((res: any) => {
const data = {
type:'editCatalog',
catalogName:catalogName,
id:choosedItem.id
}
refreshCatalogList(data);
// const data = {
// type:'editCatalog',
// catalogName:catalogName,
// id:choosedItem.id
// }
refreshCatalogList();
onClose();
});
}
......
......@@ -2,7 +2,7 @@
* @Author: wufan
* @Date: 2020-11-27 16:21:49
* @LastEditors: zhangleyuan
* @LastEditTime: 2020-12-07 19:51:03
* @LastEditTime: 2020-12-08 14:11:44
* @Description: Description
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
......@@ -26,7 +26,7 @@ interface SecondCatalogAddOrEditModalProps {
function SecondCatalogAddOrEditModal(props: SecondCatalogAddOrEditModalProps) {
const {onClose,modalType,parentId,refreshCatalogList,choosedItem} = props;
const [secondCatalogName,setSecondCatalogName] = useState('');
const [secondCatalogName,setSecondCatalogName] = useState(choosedItem.categoryName);
const [selectParentId,setSelectParentId] = useState(parentId);
const [optionList,setOptionList] = useState([]);
const [query, setQuery] = useState({
......@@ -58,13 +58,13 @@ function SecondCatalogAddOrEditModal(props: SecondCatalogAddOrEditModalProps) {
categoryName:secondCatalogName
}
StoreService.addCourseCategory(param).then((res: any) => {
const data = {
type:'addSecondCatalog',
catalogName:secondCatalogName,
parentId:selectParentId,
id:res.result
}
refreshCatalogList(data);
// const data = {
// type:'addSecondCatalog',
// catalogName:secondCatalogName,
// parentId:selectParentId,
// id:res.result
// }
refreshCatalogList();
onClose();
});
}
......@@ -75,13 +75,13 @@ function SecondCatalogAddOrEditModal(props: SecondCatalogAddOrEditModalProps) {
categoryName: secondCatalogName,
}
StoreService.editCourseCategory(param).then((res: any) => {
const data = {
type:'editSecondCatalog',
catalogName:secondCatalogName,
id:choosedItem.id,
parentId:selectParentId,
}
refreshCatalogList(data);
// const data = {
// type:'editSecondCatalog',
// catalogName:secondCatalogName,
// id:choosedItem.id,
// parentId:selectParentId,
// }
refreshCatalogList();
onClose();
});
}
......@@ -119,6 +119,7 @@ function SecondCatalogAddOrEditModal(props: SecondCatalogAddOrEditModalProps) {
placeholder="请输入子分类名称,最多10个字"
maxLength={10}
style={{ width: 240 }}
value={secondCatalogName}
onChange={(e) => {
setSecondCatalogName(e.target.value);
}}
......
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