Commit fab31a41 by zhangleyuan

feat:处理店铺员工显示不存在的问题

parent 29fec6f1
......@@ -2,7 +2,7 @@
* @Author: 吴文洁
* @Date: 2020-08-31 09:34:25
* @LastEditors: Please set LastEditors
* @LastEditTime: 2021-06-21 19:38:53
* @LastEditTime: 2021-06-22 11:16:53
* @Description:
* @Copyright: 杭州杰竞科技有限公司 版权所有
*/
......@@ -12,7 +12,6 @@ import { PREFIX, USER_PREFIX } from '@/domains/basic-domain/constants';
declare var window:any;
class User {
getStoreId() {
console.log('storeid',window.currentStoreUserInfo.storeId)
return window.currentStoreUserInfo.storeId || Storage.get(`${PREFIX}_storeId`);
}
......
......@@ -2,7 +2,7 @@
* @Author: 吴文洁
* @Date: 2020-04-27 20:35:34
* @LastEditors: Please set LastEditors
* @LastEditTime: 2021-06-22 10:04:27
* @LastEditTime: 2021-06-22 11:43:51
* @Description:
*/
......@@ -25,6 +25,7 @@ import Service from "@/common/js/service";
declare var getParameterByName: any;
declare var window: any;
if(!window.currentStoreUserInfo){
console.log('我走进了此流程')
window.currentStoreUserInfo = {}
}
......
......@@ -2,7 +2,7 @@
* @Author: 吴文洁
* @Date: 2019-07-10 10:30:49
* @LastEditors: Please set LastEditors
* @LastEditTime: 2021-06-21 20:09:58
* @LastEditTime: 2021-06-22 10:58:48
* @Description:
*/
import React, { useContext, useEffect, useState } from 'react';
......@@ -21,7 +21,6 @@ import Bus from '@/core/tbus';
import { func } from 'prop-types';
declare var window: any;
// window.currentStoreUserInfo = {};
const App: React.FC = (props: any) => {
const [storeUserId, setStoreUserId] = useState('')
......@@ -87,9 +86,9 @@ const App: React.FC = (props: any) => {
function setCurrentStoreUserInfo(storeId:any,storeUserId:any){
window.currentStoreUserInfo.storeId = storeId;
window.currentStoreUserInfo.storeUserId = storeUserId;
window.currentStoreUserInfo.userId = User.getUserId();
window.currentStoreUserInfo.token = User.getToken();
window.currentStoreUserInfo.enterpriseId = User.getEnterpriseId();
// window.currentStoreUserInfo.userId = User.getUserId();
// window.currentStoreUserInfo.token = User.getToken();
// window.currentStoreUserInfo.enterpriseId = User.getEnterpriseId();
}
function getStoreGroupAndStoreList() {
......
......@@ -179,7 +179,9 @@ export default class CollegeManagePage extends React.Component {
return null;
};
User.setStoreId(item.id);
User.setStoreUserId(item.storeUserId);
window.currentStoreUserInfo.storeId = item.id;
window.currentStoreUserInfo.storeUserId = item.storeUserId;
window.RCHistory.push('/home')
}}
>
......@@ -197,7 +199,9 @@ export default class CollegeManagePage extends React.Component {
e.preventDefault();
e.stopPropagation();
User.setStoreId(item.id);
User.setStoreUserId(item.storeUserId);
window.currentStoreUserInfo.storeId = item.id;
window.currentStoreUserInfo.storeUserId = item.storeUserId;
window.RCHistory.push('/college-info')
}}
>编辑</span>
......@@ -252,7 +256,9 @@ export default class CollegeManagePage extends React.Component {
return null;
};
User.setStoreId(item.id);
User.setStoreUserId(item.storeUserId);
window.currentStoreUserInfo.storeId = item.id;
window.currentStoreUserInfo.storeUserId = item.storeUserId;
window.RCHistory.push('/home')
}}
>
......@@ -270,7 +276,9 @@ export default class CollegeManagePage extends React.Component {
e.preventDefault();
e.stopPropagation();
User.setStoreId(item.id);
User.setStoreUserId(item.storeUserId);
window.currentStoreUserInfo.storeId = item.id;
window.currentStoreUserInfo.storeUserId = item.storeUserId;
window.RCHistory.push('/college-info')
}}
>编辑</span>
......
......@@ -2,7 +2,7 @@
* @Author: 吴文洁
* @Date: 2019-09-10 18:26:03
* @LastEditors: Please set LastEditors
* @LastEditTime: 2021-06-21 17:05:59
* @LastEditTime: 2021-06-22 11:07:28
* @Description:
*/
import React, { useRef, useContext, useEffect, useState } from "react";
......@@ -272,6 +272,12 @@ function Header(props) {
setStoreId(e.target.value)
User.setStoreId(e.target.value);
window.currentStoreUserInfo.storeId = e.target.value;
list.map((item)=>{
if(item.id === e.target.value){
User.setStoreUserId(item.storeUserId);
window.currentStoreUserInfo.storeUserId = item.storeUserId;
}
})
window.RCHistory.push('/home');
window.location.reload();
}}
......
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