Commit 2d52a99f by zhujian

fix:ghjkl;kjhlljkljkl

parent 41fa2160
...@@ -130,9 +130,7 @@ class Axios { ...@@ -130,9 +130,7 @@ class Axios {
if (method === 'GET') { if (method === 'GET') {
config = Object.assign({ params, url: `${BASIC_HOST}${_url}`, method }); config = Object.assign({ params, url: `${BASIC_HOST}${_url}`, method });
} else { } else {
console.log(corpType)
config = Object.assign({ data: { corpType, ...(params || {}) }, url: `${BASIC_HOST}${_url}`, method }); config = Object.assign({ data: { corpType, ...(params || {}) }, url: `${BASIC_HOST}${_url}`, method });
console.log(config,'config')
} }
instance(config).then((res: AxiosResponse): void => { instance(config).then((res: AxiosResponse): void => {
......
...@@ -29,7 +29,6 @@ export default class WechatApi { ...@@ -29,7 +29,6 @@ export default class WechatApi {
signature: res.signature, // 必填,签名,见 附录-JS-SDK使用权限签名算法 signature: res.signature, // 必填,签名,见 附录-JS-SDK使用权限签名算法
jsApiList: ['chooseImage', 'shareToExternalContact', 'selectExternalContact', 'selectEnterpriseContact'], jsApiList: ['chooseImage', 'shareToExternalContact', 'selectExternalContact', 'selectEnterpriseContact'],
}).then(() => { }).then(() => {
return new Promise(async (resolve, reject) => {
Service.Hades('anon/hades/getWxWorkJSAPISignature', { Service.Hades('anon/hades/getWxWorkJSAPISignature', {
storeId: User.getStoreId(), storeId: User.getStoreId(),
url: params.url, url: params.url,
...@@ -54,7 +53,6 @@ export default class WechatApi { ...@@ -54,7 +53,6 @@ export default class WechatApi {
}, },
}); });
}); });
});
}) })
...@@ -112,19 +110,7 @@ export default class WechatApi { ...@@ -112,19 +110,7 @@ export default class WechatApi {
} }
static async agentConfig(config) { static async agentConfig(config) {
return new Promise((success, fail) => { wx.agentConfig({ ...config });
console.info('wx.agentConfig', config);
wx.agentConfig({ ...config, success, fail });
}).then(
(res) => {
console.info('wx.agentConfig success', res);
return res;
},
(error) => {
console.error('wx.agentConfig fail', error);
throw error;
}
);
} }
static getCurExternalContact() { static getCurExternalContact() {
......
...@@ -266,7 +266,7 @@ export default class CollegeManagePage extends React.Component { ...@@ -266,7 +266,7 @@ export default class CollegeManagePage extends React.Component {
<span className="name"> <span className="name">
{name} {name}
{ {
initWechat && <WWOpenDataCom type="userName" openid={name} /> <WWOpenDataCom type="userName" openid={name} />
} }
</span> </span>
......
...@@ -10,7 +10,8 @@ import { ...@@ -10,7 +10,8 @@ import {
STORE_GROUP_PERMISSION, STORE_GROUP_PERMISSION,
STORE_PERMISSION, STORE_PERMISSION,
STORE_GROUP_LIST, STORE_GROUP_LIST,
STORE_LIST STORE_LIST,
WECHAT_LOGIN
} from './constants' } from './constants'
...@@ -34,12 +35,18 @@ const setStoreList = (payload: any) => ({ ...@@ -34,12 +35,18 @@ const setStoreList = (payload: any) => ({
payload payload
}) })
const setWechatLogin = (payload: any) => ({
type: WECHAT_LOGIN,
payload
})
export { export {
setStoreGroupPermission, setStoreGroupPermission,
setStorePermission, setStorePermission,
setStoreGroupList, setStoreGroupList,
setStoreList setStoreList,
setWechatLogin
} }
...@@ -10,11 +10,13 @@ const STORE_GROUP_PERMISSION = 'STORE_GROUP_PERMISSION'; ...@@ -10,11 +10,13 @@ const STORE_GROUP_PERMISSION = 'STORE_GROUP_PERMISSION';
const STORE_PERMISSION = 'STORE_PERMISSION'; const STORE_PERMISSION = 'STORE_PERMISSION';
const STORE_GROUP_LIST = 'STORE_GROUP_LIST'; const STORE_GROUP_LIST = 'STORE_GROUP_LIST';
const STORE_LIST = 'STORE_LIST'; const STORE_LIST = 'STORE_LIST';
const WECHAT_LOGIN = 'WECHAT_LOGIN';
export { export {
STORE_GROUP_PERMISSION, STORE_GROUP_PERMISSION,
STORE_PERMISSION, STORE_PERMISSION,
STORE_GROUP_LIST, STORE_GROUP_LIST,
STORE_LIST, STORE_LIST,
WECHAT_LOGIN,
} }
\ No newline at end of file
...@@ -4,12 +4,14 @@ import { ...@@ -4,12 +4,14 @@ import {
setStoreGroupPermission, setStoreGroupPermission,
setStorePermission, setStorePermission,
setStoreGroupList, setStoreGroupList,
setStoreList setStoreList,
setWechatLogin
} from './basicAction'; } from './basicAction';
export { export {
setStoreGroupPermission, setStoreGroupPermission,
setStorePermission, setStorePermission,
setStoreGroupList, setStoreGroupList,
setStoreList setStoreList,
setWechatLogin
} }
\ No newline at end of file
...@@ -10,7 +10,8 @@ import { ...@@ -10,7 +10,8 @@ import {
STORE_GROUP_PERMISSION, STORE_GROUP_PERMISSION,
STORE_PERMISSION, STORE_PERMISSION,
STORE_GROUP_LIST, STORE_GROUP_LIST,
STORE_LIST STORE_LIST,
WECHAT_LOGIN,
} from '@/store/actions/constants'; } from '@/store/actions/constants';
import _ from 'underscore'; import _ from 'underscore';
import Permission from '@/common/js/permission'; import Permission from '@/common/js/permission';
...@@ -45,6 +46,11 @@ const basicReducer = (state: any, action: any) => { ...@@ -45,6 +46,11 @@ const basicReducer = (state: any, action: any) => {
return Object.assign({}, state, { return Object.assign({}, state, {
storeList, storeList,
}); });
case WECHAT_LOGIN:
const wechatLogin: any = action.payload;
return Object.assign({}, state, {
wechatLogin,
});
default: default:
return state; return state;
} }
......
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