diff --git a/src/App.vue b/src/App.vue index d2d9dbfd37498ff8195645398ecf792cfcf4e150..e910d63cf39f5d986083aa8e1884592c13fd4d1a 100644 --- a/src/App.vue +++ b/src/App.vue @@ -98,7 +98,7 @@ export default { }, userInfo: { handler() { - this.initMsg(); + // this.initMsg(); }, deep: true, }, @@ -126,6 +126,8 @@ export default { this.readFlag = !this.readFlag; }, initMsg() { + console.log(this.userInfo); + console.log(this.$trace); if (this.userInfo && this.userInfo.system_id) { this.$trace.setOptionValue("userId", this.userInfo.system_id); // this.$trace.setOptionValue('userType',this.userInfo.userType) diff --git a/src/components/login-by-account.vue b/src/components/login-by-account.vue index 3847f64f3ae1eb7194dbcca67430a218120de020..a2667dc5a188039c3ec4cd7a1e215ae6f25edd52 100644 --- a/src/components/login-by-account.vue +++ b/src/components/login-by-account.vue @@ -2,20 +2,22 @@
- + - + @keyup.enter="loginAction()"> + @@ -23,7 +25,7 @@
@@ -57,6 +59,9 @@ import { ElMessage } from "element-plus"; import axios from "@/request/http.js"; import { Encrypt } from "@/services/secret.js"; import { useStore } from "vuex"; +import { useRouter } from "vue-router"; + +const router = useRouter(); const state = reactive({ loginForm: { @@ -125,7 +130,7 @@ const getMenu = (search) => { return axios.get(`/apaas/system/v5/menu/user/tree?search=${search}`); }; const getUser = () => { - Promise.all([getUserInfo(), getMenu("dadb2d3f-e263-48d1-9389-42acb9ea49f8")]).then((res) => { + Promise.all([getUserInfo(), getMenu("79a8f214-db78-4db7-9c28-db66276b4be2")]).then((res) => { if (res[0].data.code == 200 && res[1].data.code == 200) { let data = (res[1].data.data && res[1].data.data[0].children) || []; store.commit("setUserInfo", res[0].data.data); @@ -143,9 +148,7 @@ const getUser = () => { store.commit("setMenuObj", menuObj); // } generateRoutes(); - // this.$router.push("/"); - //跳转到工作台页面 - window.location.href = "/apaas/portal/ui/#/"; + router.push("/"); } }); }; diff --git a/src/components/login-by-code.vue b/src/components/login-by-code.vue index 0507b1ac083478da76117e897e4b7a41612b8680..16f6aa7c56d8aeb9d3b572627d244415bdccc5e4 100644 --- a/src/components/login-by-code.vue +++ b/src/components/login-by-code.vue @@ -6,14 +6,14 @@ v-model="loginForm.mobile" autofocus="autofocus" placeholder="请输入手机号码" - @keyup.enter.native="loginAction()" /> + @keyup.enter="loginAction()" />
@@ -34,9 +34,7 @@
- - 登 录 - + 登 录 @@ -58,6 +56,9 @@ import { generateRoutes } from "../router/index"; import { ElMessage } from "element-plus"; import axios from "@/request/http.js"; import { useStore } from "vuex"; +import { useRouter } from "vue-router"; + +const router = useRouter(); const validatePhone = (rule, value, callback) => { const reg = /^(?:(?:\+|00)86)?1[3-9]\d{9}$/; @@ -93,15 +94,13 @@ 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); + } + }); } }); }; // 获取验证码 @@ -149,7 +148,7 @@ const getMenu = (search) => { return axios.get(`/apaas/system/v5/menu/user/tree?search=${search}`); }; const getUser = () => { - Promise.all([getUserInfo(), getMenu("dadb2d3f-e263-48d1-9389-42acb9ea49f8")]).then((res) => { + Promise.all([getUserInfo(), getMenu("79a8f214-db78-4db7-9c28-db66276b4be2")]).then((res) => { if (res[0].data.code == 200 && res[1].data.code == 200) { let data = (res[1].data.data && res[1].data.data[0].children) || []; store.commit("setUserInfo", res[0].data.data); @@ -167,9 +166,7 @@ const getUser = () => { store.commit("setMenuObj", menuObj); // } generateRoutes(); - // this.$router.push("/"); - //跳转到工作台页面 - window.location.href = "/apaas/portal/ui/#/"; + router.push("/"); } }); }; diff --git a/src/main.js b/src/main.js index e3c44263a6b327cca7832ef61de2d0e26755ef09..99b063addae6c5c642aebb03c36d5b7792331fa4 100644 --- a/src/main.js +++ b/src/main.js @@ -12,7 +12,7 @@ import * as ElementPlusIconsVue from "@element-plus/icons-vue"; import bgui from "@/bg-ui"; import "@/bg-ui/index.scss"; -import "./assets/css/common.scss" +import "./assets/css/common.scss"; import msgSdk from "./msg-sdk/index.js"; @@ -109,13 +109,7 @@ Promise.all([getUser(), getMenu("79a8f214-db78-4db7-9c28-db66276b4be2")]) console.error(e); }) .finally(() => { - createVue - .use(ElementPlus, { locale }) - .use(store) - .use(router) - .use(i18n) - .use(bgui) - .use(mavonEditor); + createVue.use(ElementPlus, { locale }).use(store).use(router).use(i18n).use(bgui).use(mavonEditor); createVue.mount("#app"); }); diff --git a/src/page/main/config/dict/index.vue b/src/page/main/config/dict/index.vue index 00472afd93cf5e0ed9a34bfe49e9b030de350e17..8d9235dca38bf24788f1aaaf4b66f98ac0f64f81 100644 --- a/src/page/main/config/dict/index.vue +++ b/src/page/main/config/dict/index.vue @@ -25,22 +25,15 @@
- -