diff --git a/src/router/index.js b/src/router/index.js
index b402b6f..f2adf33 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -4,10 +4,10 @@ import VueRouter from "vue-router";
Vue.use(VueRouter);
const routes = [
- {
- path: "/",
- redirect: "/login",
- },
+ // {
+ // path: "/",
+ // redirect: "/realTimeMonitor",
+ // },
{
path: "/",
component: () =>
diff --git a/src/views/Login.vue b/src/views/Login.vue
index 616be50..7f46786 100644
--- a/src/views/Login.vue
+++ b/src/views/Login.vue
@@ -80,7 +80,7 @@ export default {
],
password: [
{ required: true, message: "请输入密码", trigger: "blur" },
- { min: 6, max: 8, message: '请输入6-8位字符', trigger: 'blur' }
+ { min: 6, max: 8, message: "请输入6-8位字符", trigger: "blur" },
],
// verificationCode: [
// { required: true, message: "验证码不能为空", trigger: "blur" },
@@ -96,19 +96,14 @@ export default {
submitForm() {
this.$refs.loginForm.validate((valid) => {
if (valid) {
- // this.userInfo.password = this.$md5(this.userInfo.password); //密码加密
- loginJoggle(this.userInfo)
- .then((res) => {
- if (res.code == 200) {
- this.$store.commit("SET_TOKEN", res.data.sessionId); //将token保存在vuex中
- this.$store.commit("SET_USERINFO", res.data); //将用户信息保存在vuex中
- this.$message.success("登录成功");
- this.$router.push("/realTimeMonitor");
- } else {
- this.$message.error(res.msg);
- }
- })
- .catch((err) => {});
+ console.log(valid);
+ //console.log(this.userInfo.verificationCode);
+ //this.userInfo.password = this.$md5(this.userInfo.password); //密码加密
+ this.token = this.$md5(this.userInfo.password); //获取token
+ this.$store.commit("SET_TOKEN", this.token); //将token保存在vuex中
+ this.$store.commit("SET_USERINFO", this.userInfo.username); //将用户信息保存在vuex中
+ this.$router.push("/realTimeMonitor");
+ this.$message.success("登录成功");
} else {
this.$message.error("请输入账号和密码");
console.log("error submit!!");
diff --git a/src/views/components/carouselChart.vue b/src/views/components/carouselChart.vue
index b8cfbaa..4b938b8 100644
--- a/src/views/components/carouselChart.vue
+++ b/src/views/components/carouselChart.vue
@@ -12,7 +12,8 @@
bigPicPath ? 'backgroundImage:url(' + bigPicPath + '!128x72)' : ''
"
>
-
+
+
+
+ {{ pictureData.linename }} +
++ {{ pictureData.towername }} +
++ {{ pictureData.cmdid }} +
+
+
+
+
+
+
+