Commit f932ffea authored by 张子雨's avatar 张子雨

feat: 解决senty问题

parent 4ad59101
import RoleType, { isPlatForm } from './role.config';
const isProduction = process.env.NODE_ENV === 'production';
const isPre = process.env.PRE_ENV === 'pre';
const environment = 'yxm2';
const environment = 'sc';
const envAPi = {
api: `https://security-${environment}.liangkebang.net`, //'https://security-xyqb.liangkebang.net',
......
......@@ -20,8 +20,10 @@ const Admin = props => {
const showPendingDeliveryOrderList = props.permissions[PENDING_DELIVERY_ORDER.LIST];
useEffect(() => {
const qurey = async () => {
const { data } = await getPendingNum();
setpendingNum(data);
const res = await getPendingNum();
if (res?.data) {
setpendingNum(res.data);
}
};
qurey();
}, []);
......
......@@ -17,12 +17,12 @@ const Model = {
const productCategoryId = payload?.productCategoryId || [];
params.productCategoryId =
(productCategoryId.length && productCategoryId[productCategoryId.length - 1]) || '';
const { data } = yield call(api.searchList, params);
if (!data) return;
const res = yield call(api.searchList, params);
if (res && !res.data) return;
yield put({
type: 'saveData',
payload: {
tableData: data,
tableData: res.data,
},
});
},
......
......@@ -62,6 +62,10 @@ class PicturesWall extends React.Component {
const vm = this;
// eslint-disable-next-line new-cap
const data = `${UUID.createUUID()}.${suffix}`;
if (!token) {
message.error('上传失败,请刷新页面重试!');
return;
}
const observable = qiniu.upload(file, data, token);
const observer = {
next() {
......@@ -121,6 +125,7 @@ class PicturesWall extends React.Component {
customRequest={this.customRequest}
listType="text"
fileList={fileList}
disabled={status !== 1}
onRemove={status === 1 ? this.clearFileList : ''}
accept=".pdf,.doc,.docx,.zip,.rar,.png,.jpeg"
>
......
......@@ -116,7 +116,9 @@ class Socket extends EventEmitter {
return;
}
const sendValue = typeof value === 'string' ? value : JSON.stringify(value);
this.socket.send(sendValue);
if (this.socket.readyState === this.socket.OPEN) {
this.socket.send(sendValue);
}
}
};
......
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