zhengyiming
9 天以前 cb795c5827f6e7c0e4d2c1358f27d0862f502b5b
src/store/modules/user.ts
@@ -42,9 +42,10 @@
      return state.userInfo;
    },
    // userId(state) {
    //   return state.accountInfo.sub;
    // },
    userId(state) {
      //TODO
      return '';
    },
  },
  actions: {
    setToken(token: string) {
@@ -58,12 +59,12 @@
    // 用户登入
    async loginByUsername(params: API.PasswordLoginCommand) {
      let res = await authServices.authPasswordLogin(
      let res = await authServices.passwordLogin(
        {
          ...params,
          password: md5Encrypt(params.password),
          type: EnumUserType.Operation,
          clientType: EnumClientType.PcWeb,
          type: AppLocalConfig.userType,
          clientType: AppLocalConfig.clientType,
        },
        {
          showLoading: false,
@@ -107,7 +108,7 @@
      Object.assign(this, getDefaultState());
    },
    async refreshToken(params: API.AccessRefreshToken) {
    async refreshToken(params: any) {
      return Promise.resolve({
        accessToken: '1222',
        expiresIn: 1000 * 60 * 24 * 60,