Commit dfb9c73a by zhangleyuan

feat:更改接口的名称

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