index.ts 466 B

123456789101112131415
  1. import store from '@/store';
  2. import { GetMemberIdByEncryptData } from '@/pagesCrm/service';
  3. export const useGetMemberIdByEncryptData = async (EncryptData) => {
  4. if (!EncryptData) return;
  5. const { resData, resp } = await GetMemberIdByEncryptData({
  6. EncryptData,
  7. });
  8. console.log(resData);
  9. if(resData.RespCode != "10000") {
  10. throw new Error(`${resData.RespMessage || "获取身份信息失败"}`);
  11. }
  12. store.commit('setCurrentUser', resp[0]);
  13. return resp[0];
  14. };