Browse Source

增加邮箱密码修改

seimin 3 years ago
parent
commit
b6352fb133
3 changed files with 155 additions and 2 deletions
  1. 8 1
      src/router/index.js
  2. 17 1
      src/views/changePassword.vue
  3. 130 0
      src/views/changePwd.vue

+ 8 - 1
src/router/index.js

@@ -13,7 +13,8 @@ import NoticeList from './../views/noticeList.vue'//公告列表
13 13
 import KnowList from './../views/knowList.vue'//知识库列表
14 14
 import KnowDetails from './../views/knowDetails.vue'//知识库详情
15 15
 import CheckNumber from './../views/checkNumber.vue'//电话插好
16
-import ChangePassword from './../views/changePassword.vue'//修改密码
16
+import ChangePassword from './../views/changePassword.vue'//修改密码列表
17
+import ChangePwd from './../views/changePwd.vue'//修改密码页面
17 18
 import Guide from './../views/guide.vue'//服务指南
18 19
 import IncidentDetails from './../views/incidentDetails.vue'//事件详情
19 20
 import CommonProblem from './../views/commonProblem.vue'//常见问题
@@ -101,6 +102,12 @@ export default new Router({
101 102
       meta: { allowBack: false },
102 103
     },
103 104
     {
105
+      path: '/changePwd',
106
+      name: 'ChangePwd',
107
+      component: ChangePwd,
108
+      meta: { allowBack: false },
109
+    },
110
+    {
104 111
       path: '/guide',
105 112
       component: Guide,
106 113
       meta: { allowBack: false },

+ 17 - 1
src/views/changePassword.vue

@@ -20,6 +20,11 @@
20 20
         <div class="demoItem">
21 21
           <cube-button light @click="showToast()">认证计费密码修改</cube-button>
22 22
         </div>
23
+        <div class="demoItem">
24
+          <cube-button light @click="toChangePassword()"
25
+            >邮箱密码修改</cube-button
26
+          >
27
+        </div>
23 28
       </div>
24 29
     </div>
25 30
   </div>
@@ -30,6 +35,10 @@ export default {
30 35
     return {};
31 36
   },
32 37
   methods: {
38
+    //修改邮箱密码
39
+    toChangePassword() {
40
+      this.$router.push("/changePwd");
41
+    },
33 42
     showToast() {
34 43
       this.$createDialog({
35 44
         type: "alert",
@@ -42,12 +51,19 @@ export default {
42 51
 };
43 52
 </script>
44 53
 <style lang="stylus" rel="stylesheet/stylus" scoped>
54
+.cube-btn-light{
55
+  background-color #999!important;
56
+}
45 57
 .demoItem{
46 58
   padding: 0.24rem 0.64rem;
47 59
   border-bottom: 0.01rem rgb(238, 238, 238) solid;
48 60
 }
49 61
 .demoItem button{
50
-  color: #7e8c8d!important;
62
+  color: #fff!important;
63
+  text-shadow:1px 1px 3px black;
64
+  a{
65
+    color: #fff!important;
66
+  }
51 67
 }
52 68
 .scroll-list-wrap
53 69
   /* height: 350px */

+ 130 - 0
src/views/changePwd.vue

@@ -0,0 +1,130 @@
1
+<template>
2
+  <div class="fle bgColor">
3
+    <h2 style="font-size: 0.36rem; margin-bottom: 0.36rem; font-weight: 700">
4
+      邮箱密码修改
5
+    </h2>
6
+    <div style="width: 5rem">
7
+      <div class="account">当前邮箱:{{ loginUser.account }}@zuel.edu.cn</div>
8
+      <br />
9
+      <cube-input v-model="pwd" type="password" placeholder="请输入新的密码">
10
+      </cube-input>
11
+      <br />
12
+      <cube-input
13
+        v-model="confirmPwd"
14
+        type="password"
15
+        placeholder="请再一次输入新的密码"
16
+      ></cube-input>
17
+      <br />
18
+      <cube-button @click="zlogin()" style="background: #005395"
19
+        >登录</cube-button
20
+      >
21
+    </div>
22
+  </div>
23
+</template>
24
+
25
+<script>
26
+export default {
27
+  data() {
28
+    return {
29
+      loginUser: {},
30
+      pwd: "",
31
+      confirmPwd: ""
32
+    };
33
+  },
34
+  methods: {
35
+    // 账号密码登录
36
+    zlogin() {
37
+      if(this.pwd !== this.confirmPwd){
38
+        this.$createDialog({
39
+            type: "alert",
40
+            title: "提示",
41
+            content: '两次输入的密码不一致',
42
+            icon: "cubeic-warn",
43
+            color: "red"
44
+          }).show();
45
+        return;
46
+      }
47
+      let postData = { account: this.loginUser.account, password: this.pwd };
48
+      const toast = this.$createToast({
49
+        txt: "Loading...",
50
+        time: 60000,
51
+        mask: true
52
+      });
53
+      toast.show();
54
+      this.$http.post("service/bpm/data/changeMailPassword", postData).then(
55
+        res => {
56
+          toast.hide();
57
+          this.$createDialog({
58
+            type: "alert",
59
+            title: "提示",
60
+            content: res.data.msg,
61
+            icon: "cubeic-warn",
62
+            color: "red"
63
+          }).show();
64
+        },
65
+        err => {
66
+          this.$createDialog({
67
+            type: "alert",
68
+            title: "系统错误",
69
+            content: "请稍后再试",
70
+            icon: "cubeic-wrong",
71
+            color: "red"
72
+          }).show();
73
+        }
74
+      );
75
+    }
76
+  },
77
+  created() {
78
+    let loginUser = localStorage.getItem("loginUser");
79
+    this.loginUser = loginUser ? JSON.parse(loginUser) : {};
80
+  }
81
+};
82
+</script>
83
+
84
+<style scoped>
85
+.account {
86
+  font-size: 0.3rem;
87
+  color: #333;
88
+}
89
+.color {
90
+  color: red;
91
+  font-size: 1rem;
92
+}
93
+.fle {
94
+  display: flex;
95
+  height: 100vh;
96
+  justify-content: center;
97
+  align-items: center;
98
+  flex-direction: column;
99
+  background: url(./../../static/images/weChartBackImage.jpg);
100
+  background-size: cover;
101
+}
102
+/* .bgColor{
103
+    background-color: white
104
+  } */
105
+input {
106
+  border: 0.02rem #999999 solid;
107
+  width: 60%;
108
+  height: 0.8rem;
109
+  margin-top: 0.4rem;
110
+  border-radius: 10px;
111
+  padding-left: 0.24rem;
112
+}
113
+input:nth-child(1) {
114
+  margin-top: 0;
115
+}
116
+input:focus {
117
+  outline: none;
118
+}
119
+.sub {
120
+  width: 40%;
121
+  background-color: rgb(60, 162, 254);
122
+  height: 0.7rem;
123
+  color: white;
124
+  font-size: 0.36rem;
125
+  text-align: center;
126
+  line-height: 0.7rem;
127
+  margin-top: 0.3rem;
128
+  border-radius: 10px;
129
+}
130
+</style>