Commit 62233c6d authored by 李鹏 's avatar 李鹏

bugfix

parent 01cca274
......@@ -34,7 +34,9 @@
</div>
</el-form-item>
<el-form-item>
<el-button type="primary" @click.prevent="loginAction()" style="width: 100%"> 登 录 </el-button>
<el-button type="primary" @click.prevent="loginAction()" style="width: 100%">
登 录
</el-button>
</el-form-item>
<el-form-item>
<el-button class="register_btn" @click.prevent="$emit('register')" style="width: 100%">
......@@ -51,8 +53,11 @@
<script setup>
import { reactive, toRefs, ref, onBeforeMount, nextTick } from "vue";
import menu from "../router/function";
import { generateRoutes } from "../router/index";
import { ElMessage } from "element-plus";
import axios from "@/request/http.js";
import { useStore } from "vuex";
const validatePhone = (rule, value, callback) => {
const reg = /^(?:(?:\+|00)86)?1[3-9]\d{9}$/;
......@@ -82,18 +87,21 @@ const state = reactive({
countDownTimer: null,
});
const store = useStore();
const loginFormRef = ref(null);
const getMsgCode = () => {
loginFormRef.value.validateField("mobile", (valid) => {
if (valid) {
axios.post("/apaas/system/v5/sms/verifyCode", { phone: state.loginForm.mobile }).then(({ data }) => {
if (data.code == 200) {
countDownAction();
} else {
ElMessage.error(data.data);
}
});
axios
.post("/apaas/system/v5/sms/verifyCode", { phone: state.loginForm.mobile })
.then(({ data }) => {
if (data.code == 200) {
countDownAction();
} else {
ElMessage.error(data.data);
}
});
}
});
}; // 获取验证码
......@@ -166,6 +174,16 @@ const getUser = () => {
});
};
const getMenuObj = (menu, parentRowPath, menuObj) => {
menu.forEach((e, idx) => {
e.rowPath = parentRowPath + "." + idx;
menuObj[e.path] = e;
if (e.children && e.children.length) {
getMenuObj(e.children, e.rowPath, menuObj);
}
});
};
const { loginForm, loginFormRules, countDown, countDownTimer } = toRefs(state);
</script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment