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

bugfix

parent 01cca274
...@@ -34,7 +34,9 @@ ...@@ -34,7 +34,9 @@
</div> </div>
</el-form-item> </el-form-item>
<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-form-item> <el-form-item>
<el-button class="register_btn" @click.prevent="$emit('register')" style="width: 100%"> <el-button class="register_btn" @click.prevent="$emit('register')" style="width: 100%">
...@@ -51,8 +53,11 @@ ...@@ -51,8 +53,11 @@
<script setup> <script setup>
import { reactive, toRefs, ref, onBeforeMount, nextTick } from "vue"; import { reactive, toRefs, ref, onBeforeMount, nextTick } from "vue";
import menu from "../router/function";
import { generateRoutes } from "../router/index";
import { ElMessage } from "element-plus"; import { ElMessage } from "element-plus";
import axios from "@/request/http.js"; import axios from "@/request/http.js";
import { useStore } from "vuex";
const validatePhone = (rule, value, callback) => { const validatePhone = (rule, value, callback) => {
const reg = /^(?:(?:\+|00)86)?1[3-9]\d{9}$/; const reg = /^(?:(?:\+|00)86)?1[3-9]\d{9}$/;
...@@ -82,18 +87,21 @@ const state = reactive({ ...@@ -82,18 +87,21 @@ const state = reactive({
countDownTimer: null, countDownTimer: null,
}); });
const store = useStore();
const loginFormRef = ref(null); const loginFormRef = ref(null);
const getMsgCode = () => { const getMsgCode = () => {
loginFormRef.value.validateField("mobile", (valid) => { loginFormRef.value.validateField("mobile", (valid) => {
if (valid) { if (valid) {
axios.post("/apaas/system/v5/sms/verifyCode", { phone: state.loginForm.mobile }).then(({ data }) => { axios
if (data.code == 200) { .post("/apaas/system/v5/sms/verifyCode", { phone: state.loginForm.mobile })
countDownAction(); .then(({ data }) => {
} else { if (data.code == 200) {
ElMessage.error(data.data); countDownAction();
} } else {
}); ElMessage.error(data.data);
}
});
} }
}); });
}; // 获取验证码 }; // 获取验证码
...@@ -166,6 +174,16 @@ const getUser = () => { ...@@ -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); const { loginForm, loginFormRules, countDown, countDownTimer } = toRefs(state);
</script> </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