Commit 2d52a99f by zhujian

fix:ghjkl;kjhlljkljkl

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