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

feat: 解决senty问题

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