张诺
4 天以前 f1b3a5d1e7824d44a280b65d82a81231ae699942
禁用login 获取验证码功能 使页面不需要验证码即可登录
已删除1个文件
已修改3个文件
1460 ■■■■■ 文件已修改
src/components/Table/EtableModify.vue 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/calculator/index copy.vue 1380 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/login.vue 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/register.vue 32 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/Table/EtableModify.vue
@@ -28,11 +28,9 @@
      type="index"
      width="60"
      align="center"
    />    <template v-for="col in columns" :key="col.prop">
      <el-table-column
        v-bind="col"
        align="center"
      >
    />
    <template v-for="col in columns" :key="col.prop">
      <el-table-column v-bind="col" align="center">
        <template #default="scope">
          <template v-if="col.slot">
            <slot
@@ -41,7 +39,8 @@
              :column="scope.column"
              :index="scope.$index"
            ></slot>
          </template>          <template v-else>
          </template>
          <template v-else>
            <div
              class="cell-edit"
              @dblclick="handleCellEdit(scope.row, col.prop)"
@@ -53,7 +52,12 @@
                class="cell-text"
              >
                {{
                  formatCellValue(scope.row, scope.column, scope.row[col.prop], col)
                  formatCellValue(
                    scope.row,
                    scope.column,
                    scope.row[col.prop],
                    col
                  )
                }}
              </span>
              <!-- ç¼–辑状态:使用原始值,不经过格式化 -->
@@ -201,7 +205,7 @@
// æ ¼å¼åŒ–单元格值
const formatCellValue = (row, column, cellValue, col) => {
  // å¦‚果列有自定义格式化器,使用自定义格式化器
  if (col.formatter && typeof col.formatter === 'function') {
  if (col.formatter && typeof col.formatter === "function") {
    return col.formatter(row, column, cellValue);
  }
  // å¦åˆ™ä½¿ç”¨é»˜è®¤æ ¼å¼åŒ–器
src/views/calculator/index copy.vue
ÎļþÒÑɾ³ý
src/views/login.vue
@@ -70,7 +70,7 @@
</template>
<script setup>
import { getCodeImg } from "@/api/login"
// import { getCodeImg } from "@/api/login"
import Cookies from "js-cookie"
import { encrypt, decrypt } from "@/utils/jsencrypt"
import useUserStore from '@/store/modules/user'
@@ -135,23 +135,23 @@
      }).catch(() => {
        loading.value = false
        // é‡æ–°èŽ·å–éªŒè¯ç 
        if (captchaEnabled.value) {
          getCode()
        }
        // if (captchaEnabled.value) {
        //   getCode()
        // }
      })
    }
  })
}
function getCode() {
  getCodeImg().then(res => {
    captchaEnabled.value = res.captchaEnabled === undefined ? true : res.captchaEnabled
    if (captchaEnabled.value) {
      codeUrl.value = "data:image/gif;base64," + res.img
      loginForm.value.uuid = res.uuid
    }
  })
}
// function getCode() {
//   getCodeImg().then(res => {
//     captchaEnabled.value = res.captchaEnabled === undefined ? true : res.captchaEnabled
//     if (captchaEnabled.value) {
//       codeUrl.value = "data:image/gif;base64," + res.img
//       loginForm.value.uuid = res.uuid
//     }
//   })
// }
function getCookie() {
  const username = Cookies.get("username")
@@ -164,7 +164,7 @@
  }
}
getCode()
// getCode()
getCookie()
</script>
src/views/register.vue
@@ -48,9 +48,9 @@
        >
          <template #prefix><svg-icon icon-class="validCode" class="el-input__icon input-icon" /></template>
        </el-input>
        <div class="register-code">
        <!-- <div class="register-code">
          <img :src="codeUrl" @click="getCode" class="register-code-img"/>
        </div>
        </div> -->
      </el-form-item>
      <el-form-item style="width:100%;">
        <el-button
@@ -77,7 +77,7 @@
<script setup>
import { ElMessageBox } from "element-plus"
import { getCodeImg, register } from "@/api/login"
// import { getCodeImg, register } from "@/api/login"
const title = import.meta.env.VITE_APP_TITLE
const router = useRouter()
@@ -134,25 +134,25 @@
        }).catch(() => {})
      }).catch(() => {
        loading.value = false
        if (captchaEnabled) {
          getCode()
        }
        // if (captchaEnabled) {
        //   getCode()
        // }
      })
    }
  })
}
function getCode() {
  getCodeImg().then(res => {
    captchaEnabled.value = res.captchaEnabled === undefined ? true : res.captchaEnabled
    if (captchaEnabled.value) {
      codeUrl.value = "data:image/gif;base64," + res.img
      registerForm.value.uuid = res.uuid
    }
  })
}
// function getCode() {
//   getCodeImg().then(res => {
//     captchaEnabled.value = res.captchaEnabled === undefined ? true : res.captchaEnabled
//     if (captchaEnabled.value) {
//       codeUrl.value = "data:image/gif;base64," + res.img
//       registerForm.value.uuid = res.uuid
//     }
//   })
// }
getCode()
// getCode()
</script>
<style lang='scss' scoped>