账号密码登录
微信安全登录
微信扫描二维码登录

登录后绑定QQ、微信即可实现信息互通

手机验证码登录
找回密码返回
邮箱找回 手机找回
注册账号返回
其他登录方式
分享
  • 收藏
    X
    vue 2.0+element UI 2.0的生产版本在chrome浏览器上无法登录,提示密码登录不安全
    55
    0

    登录form的代码如下,npm run dev调试正常,run build之后部署到httpd上,用谷歌浏览器访问,提示不安全,登录之后立刻又跳回到登录界面:

    <el-form class="login-form" align="center">
          <img src="../../assets/astute_logo.png" class="logo">
          <el-form-item>
            <span class="icon-container">
              <i class="iconfont icon-yonghu01-copy"></i>
            </span>
            <el-input type="text" v-model.trim="loginInfo.username" placeholder="用户名"></el-input>
          </el-form-item>
          <el-form-item>
            <span class="icon-container">
              <i class="iconfont icon-xiugaimima1"></i>
            </span>
            <el-input :type="inputType" v-model="loginInfo.password" placeholder="密码" autocomplete="new-password"></el-input>
            <i class="el-icon-view" @click.stop="changePasswordType()"></i>
          </el-form-item>
          <el-form-item class="loginBtn">
            <el-button type="primary" style="width:100%;" :loading="loading" @click.native.prevent="handleLogin">登 &nbsp;&nbsp;录</el-button>
          </el-form-item>
        </el-form>

    浏览器控制台提示:

    /#/login:1 This page includes a password or credit card input in a non-secure context. A warning has been added to the URL bar. For more information, see https://goo.gl/zmWq3m.

    暂时不打算启用https,是不是要在密码的输入框上做什么特殊设置才能规避?

    0
    打赏
    收藏
    点击回答
        全部回答
    • 0
    • 脸红得思春期 普通会员 1楼

      这个问题可能是由于 Vue 2.0+Element UI 2.0 的一些特性导致的,包括对旧版 Vue、Element UI 的兼容性问题,或者安全问题。以下是一些可能的解决方案:

      1. 更新 Vue 和 Element UI 的版本:你可以尝试更新 Vue 和 Element UI 的版本到最新版本。这可能有助于解决一些兼容性问题。

      2. 确保你的 Vue 项目在旧版 Vue 和 Element UI 上是兼容的:你可以使用 Vue CLI 的构建工具(如 vue create) 来创建一个兼容旧版 Vue 和 Element UI 的项目。然后,你可以在旧版 Vue 和 Element UI 的项目中安装 Vue 2.0。

      3. 使用 Element UI 的公共组件:Element UI 提供了许多公共组件,你可以使用这些组件来避免在 Vue 项目中重复编写代码。例如,你可以使用 Element UI 的 Form 组件来构建表单,而不是在 Vue 项目中手动编写表单的 HTML 和 CSS。

      4. 对你的项目进行安全性检查:你可以使用 Vue 安全插件(如 Vue Security) 来检查你的项目中的代码是否安全。如果发现有安全问题,你可能需要修改你的代码以解决这些问题。

      5. 优化你的登录流程:你可能需要优化你的登录流程,以减少用户在登录过程中泄露的信息的风险。例如,你可能需要使用哈希算法来存储用户的密码,而不是使用明文密码。你可能还需要使用多因素认证来增加账户的安全性。

      如果你尝试了以上所有解决方案,但仍然无法解决这个问题,你可能需要寻求专业的技术支持。

    更多回答
    扫一扫访问手机版
    • 回到顶部
    • 回到顶部