ZZJ
2021-12-16 b445789b2ed0ab3b70291ff0bebc09c73aac7207
自适应
5个文件已修改
104 ■■■■ 已修改文件
package.json 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/index.html 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/index/App.vue 65 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/index/main.ts 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/login/App.vue 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
package.json
@@ -52,6 +52,7 @@
    "eslint": "^5.16.0",
    "eslint-plugin-prettier": "^3.1.0",
    "eslint-plugin-vue": "^5.0.0",
    "lib-flexible": "^0.3.2",
    "mini-css-extract-plugin": "^2.4.5",
    "parcel-bundler": "^1.12.5",
    "prettier": "^1.18.2",
public/index.html
@@ -4,7 +4,8 @@
<head>
  <meta charset="utf-8" />
  <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  <meta name="viewport" content="width=device-width,initial-scale=1.0" />
  <!-- <meta name="viewport" content="width=device-width,initial-scale=1.0" /> -->
  <link rel="stylesheet" href="/public//css/globalVariable.css">
  <link rel="icon" type="image/png" href="<%= BASE_URL %>favicon.png" sizes="32x32" />
  <link rel="stylesheet" href="/fonts/alibaba/iconfont.css">
src/pages/index/App.vue
@@ -56,7 +56,6 @@
} from "./api";
export default {
  async created() {},
  mounted() {
    this.getInitInfo();
    let message = "网络正常";
@@ -137,64 +136,6 @@
      }
    },
    nextFormNot() {
      this.active++;
      this.$refs["carousel"].next();
    },
    systemLogin() {
      this.nullRule = this.rules;
      this.$nextTick(() => {
        this.$refs["ruleForm"].validate((valid) => {
          if (valid) {
            this.loading = this.$loading({
              lock: true,
              text: "Loading",
              spinner: "el-icon-loading",
              background: "rgba(0, 0, 0, 0.7)",
            });
            this.testLogin();
          } else {
            this.nullRule = {};
          }
        });
        this.nullRule = {};
      });
    },
    async testLogin() {
      // location.assign("/view/desktop/")
      tologin({ username: this.user.loginName, password: this.user.password })
        .then((json) => {
          const loginedInfo = {
            access_token: json.token_type + " " + json.access_token,
            refresh_token: json.refresh_token,
          };
          sessionStorage.setItem("expires_in", json.expires_in);
          sessionStorage.setItem("loginedInfo", JSON.stringify(loginedInfo));
          this.loading.close();
          this.getLoginUserData();
        })
        .catch((err) => {
          this.loading.close();
          this.$notify({
            title: "提示",
            type: "error",
            message: err.msg,
          });
          this.$refs.pwd.focus();
        });
    },
    async getLoginUserData() {
      let res = await getLoginUserData();
      if (res.success) {
        sessionStorage.setItem("userInfo", JSON.stringify(res.data));
        this.$notify.success("登录成功!");
        // 获取权限
        await this.getMenuList();
        location.assign("/view/desktop/");
        return res.data;
      } else {
        this.$notify.error("登录失败!");
      }
      this.active++;
      this.$refs["carousel"].next();
    },
@@ -312,21 +253,21 @@
    }
    .formAccount {
      margin-top: 157px;
      margin-top: 0.81rem;
      margin-left: 200px;
      width: 550px;
    }
    .formNet,
    .formInfo {
      margin-top: 90px;
      margin-top: 0.47rem;
      margin-left: 200px;
      width: 550px;
    }
    .control {
      position: fixed;
      top: 770px;
      top: 80%;
      left: 0;
      right: 0;
      line-height: 40px;
src/pages/index/main.ts
@@ -4,6 +4,7 @@
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import '@/assets/css/element-variables.scss'
import 'lib-flexible'
import i18n from '@/lang'
src/pages/login/App.vue
@@ -332,15 +332,15 @@
body,
.login {
  height: 100%;
  min-width: 1646px;
  min-height: 811px;
  min-width: 1200px;
  min-height: 680px;
  position: relative;
  background-image: url("/apps/loginData/background.png");
  .title {
    position: absolute;
    top: 345px;
    left: 301px;
    top: 40%;
    left: 15.6%;
    color: #fff;
    text-align: center;
@@ -359,7 +359,7 @@
    display: flex;
    justify-content: start;
    align-items: center;
    left: 358px;
    left: 18.6%;
    bottom: 40px;
    .logo {
@@ -376,10 +376,10 @@
  .login-form {
    position: absolute;
    width: 780px;
    height: 1000px;
    right: 40px;
    top: 40px;
    width: 40%;
    height: 92.5%;
    right: 3.75%;
    top: 3.75%;
    padding: 0 90px;
    box-sizing: border-box;
@@ -387,10 +387,16 @@
    opacity: 0.95;
    box-shadow: -4px 0px 10px rgba(0, 0, 0, 0.25);
    border-radius: 56px;
    overflow: hidden;
    .logo {
      margin-top: 100px;
      margin-bottom: 16px;
      width: 100%;
      margin-top: 13%;
      margin-bottom: 20px;
    }
    .el-form {
      width: 100%;
    }
    .el-form-item {
@@ -398,12 +404,12 @@
    }
    .el-form-item:nth-child(2) {
      margin-top: 60px;
      margin-bottom: 80px;
      margin-top: 10%;
      margin-bottom: 13%;
    }
    .el-button {
      width: 600px;
      width: 100%;
      height: 60px;
      background: #4e94ff;
      border-radius: 30px;