ZZJ
2022-04-20 246772ecc677b15cc9be2fbdd63d50f6216e099f
注册登录验证码
3个文件已修改
19 ■■■■ 已修改文件
src/api/login.js 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/login/components/loginForm.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/register/components/BaseInfo.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/login.js
@@ -29,10 +29,19 @@
  });
};
// 获取验证码
export const makeVerifyCode = (params) => {
  return request({
    url: "/cloud/api-u/user/makeVerifyCode",
    method: "get",
    params,
  });
};
export const getMenuPermission = () => {
  return request({
    url: "/saas/api-u/user/menuPermissions ",
    method: "get"
    method: "get",
  });
};
src/views/login/components/loginForm.vue
@@ -107,7 +107,7 @@
import {
  tologin,
  getLoginUserData,
  getVerifyCode,
  makeVerifyCode,
  getMenuPermission,
} from "@/api/login";
import { isPhone } from "@/scripts/validate";
@@ -239,7 +239,7 @@
          this.codeDisabled = true;
          this.getValidStr();
          this.timer = setInterval(this.getValidStr, 1000);
          getVerifyCode({ phoneNum: this.phone.phoneNum })
          makeVerifyCode({ phoneNum: this.phone.phoneNum })
            .then(() => {
              this.gotCode = true;
            })
src/views/register/components/BaseInfo.vue
@@ -82,7 +82,7 @@
import { validUser, validPassword, isPhone } from "@/scripts/validate"; // 正则文件
import {
  register,
  getVerifyCode,
  makeVerifyCode,
  //  getAreas,
  //  getDic,
  //  entireUserInfo,
@@ -204,7 +204,7 @@
            this.codeDisabled = true;
            this.getValidStr();
            this.timer = setInterval(this.getValidStr, 1000);
            getVerifyCode({ phoneNum: this.user.phoneNum, type: 1 })
            makeVerifyCode({ phoneNum: this.user.phoneNum, type: 1 })
              .then(() => {
                this.gotCode = true;
              })