戴艳蓉 3 anos atrás
pai
commit
197df8eba3

Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 0
dist/index.html


Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 0
dist/static/css/app.83ccaec4.css


Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 0
dist/static/css/app.ccdee5c1.css


Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 0
dist/static/css/chunk-207c2a82.6d04cee7.css


Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 0
dist/static/css/chunk-731c8c71.09df36a0.css


+ 1 - 0
dist/static/css/chunk-7c6ef186.ee8862da.css

@@ -0,0 +1 @@
+.reset[data-v-b6ac6c16]{position:relative;width:100%;height:100%;-webkit-box-sizing:border-box;box-sizing:border-box;background:#e6e6dc!important}.reset .reset-box[data-v-b6ac6c16]{width:calc(100% - 32px);margin:0 16px!important;overflow:hidden!important;border-radius:10px!important}.reset .reset-box .van-field__label[data-v-b6ac6c16]{margin:0!important}.reset .btn-box[data-v-b6ac6c16]{margin:30px 5% 0 5%}.reset .btn-box .van-button[data-v-b6ac6c16]{background:-webkit-gradient(linear,left bottom,left top,from(#a67e4b),to(#efc180));background:linear-gradient(0deg,#a67e4b,#efc180);border-radius:22px;overflow:hidden;color:#fff;border:0;font-weight:bolder}

+ 0 - 1
dist/static/css/chunk-f9f144da.70b4c72f.css

@@ -1 +0,0 @@
-.reset[data-v-5b089d35]{position:relative;width:100%;height:100%;-webkit-box-sizing:border-box;box-sizing:border-box;background:#e6e6dc!important}.reset .reset-box[data-v-5b089d35]{width:calc(100% - 32px);margin:0 16px!important;overflow:hidden!important;border-radius:10px!important}.reset .reset-box .van-field__label[data-v-5b089d35]{margin:0!important}.reset .btn-box[data-v-5b089d35]{margin:30px 5% 0 5%}.reset .btn-box .van-button[data-v-5b089d35]{background:-webkit-gradient(linear,left bottom,left top,from(#a67e4b),to(#efc180));background:linear-gradient(0deg,#a67e4b,#efc180);border-radius:22px;overflow:hidden;color:#fff;border:0;font-weight:bolder}

Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 0
dist/static/js/app.4c4ea64e.js


BIN
dist/static/js/app.4c4ea64e.js.gz


BIN
dist/static/js/app.bf169ebf.js.gz


Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 0
dist/static/js/chunk-731c8c71.9bc6c884.js


Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 0
dist/static/js/chunk-7c6ef186.e50869c0.js


Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 0
dist/static/js/chunk-f9f144da.b44bfcfd.js


+ 1 - 1
src/App.vue

@@ -49,7 +49,7 @@ html {
       .paddy,
       .liveD,
       .orderRes,
-      .login {
+      .login,.reset {
         @include layout-dev;
         background: transparent;
         position: absolute;

+ 7 - 0
src/apis/reset/index.js

@@ -0,0 +1,7 @@
+// 物业管理员
+import http from '@/apis/axios'
+const api = 'home/'
+export default {
+  // 分页查询
+  list: (data, params) => http(api + 'password', data, 'post', params),
+}

+ 1 - 1
src/router/index.js

@@ -11,7 +11,7 @@ const routes = [
         component: () => import('@/views/login/index'),
         hidden: true
     },
-     //重置密码
+     //修改密码
      {
         path: '/reset',
         component: () => import('@/views/reset/index'),

+ 1 - 1
src/views/login/index.vue

@@ -75,7 +75,7 @@
         >
           登 录
         </van-button>
-        <!-- <span class="fr reset-span" @click="loginSuccess('/reset')">重置密码</span> -->
+        <span class="fr reset-span" @click="loginSuccess('/reset')">修改密码</span>
       </div>
     </div>
   </div>

+ 42 - 10
src/views/reset/index.vue

@@ -1,8 +1,8 @@
 <template>
-  <div class="reset" style="padding-top: 46px">
+  <div class="reset" style="padding-top: 66px">
     <van-nav-bar
       class="van-nav-bar-my-fixed"
-      :title="'重置密码'"
+      :title="'修改密码'"
       fixed
       left-arrow
       @click-left="onClickLeft"
@@ -24,6 +24,9 @@
           label-width="62px"
           label="原密码"
           placeholder="原密码"
+          :type="eye.show1 ? 'text' : 'password'"
+          :right-icon="eye.show1 ? 'closed-eye' : 'eye-o'"
+          @click-right-icon="changeIcon(1)"
           :rules="[{ validator: asyncpwodValidator1 }]"
         />
       </van-cell-group>
@@ -33,7 +36,10 @@
           v-model="form.ncode"
           label-width="62px"
           label="新密码"
+          :type="eye.show2 ? 'text' : 'password'"
           placeholder="新密码"
+          :right-icon="eye.show2 ? 'closed-eye' : 'eye-o'"
+          @click-right-icon="changeIcon(2)"
           :rules="[{ validator: asyncpwodValidator2 }]"
         />
       </van-cell-group>
@@ -42,7 +48,10 @@
           v-model="form.rcode"
           label-width="62px"
           label="确认密码"
+          :type="eye.show3 ? 'text' : 'password'"
           placeholder="确认密码"
+          :right-icon="eye.show3 ? 'closed-eye' : 'eye-o'"
+          @click-right-icon="changeIcon(3)"
           :rules="[{ validator: asyncpwodValidator3 }]"
         />
       </van-cell-group>
@@ -65,7 +74,7 @@
 </template>
 
 <script>
-import asyncRequest from "@/apis/address/index";
+import asyncRequest from "@/apis/reset/index";
 import resToken from "@/mixins/resToken";
 import { isnumber, validAlphabets } from "@/utils/validate";
 export default {
@@ -79,6 +88,11 @@ export default {
         ncode: "",
         rcode: "",
       },
+      eye: {
+        show1: false,
+        show2: false,
+        show3: false,
+      },
     };
   },
   async created() {
@@ -123,6 +137,9 @@ export default {
         resolve(type ? "ok" : "error");
       });
     },
+    changeIcon(type) {
+      this.eye[`show${type}`] = !this.eye[`show${type}`];
+    },
     async asyncpwodValidator1(val) {
       return new Promise((resolve) => {
         let type = true;
@@ -137,9 +154,9 @@ export default {
     async asyncpwodValidator2(val) {
       return new Promise((resolve) => {
         let type = true;
-        console.log(val)
+        // console.log(val);
         const { isok, msg } = this.pwdValidator(val, 2);
-        console.log(isok, msg);
+        // console.log(isok, msg);
         type = isok;
         if (!type) {
           this.show_title(msg);
@@ -159,7 +176,7 @@ export default {
       });
     },
     pwdValidator(val, type) {
-      console.log(val,type);
+      console.log(val, type);
       let mt = type === 1 ? "原密码" : type === 2 ? "新密码" : "确认密码";
       let msg = "";
       let isok = true;
@@ -184,9 +201,10 @@ export default {
         }
       }
       let model = {
-        ok: isok,
+        isok: isok,
         msg: msg,
       };
+      console.log(model);
       return model;
     },
     // 点击 登陆按钮 后执行提交
@@ -194,31 +212,45 @@ export default {
       if (!this.loadding) {
         this.loadding = true;
         const res1 = await this.asyncmobileValidator(this.form.mobile); //校验表单卡号
+        console.log("res1:" + res1);
         if (res1 === "error") {
           this.loadding = false;
           return;
         }
         const res2 = await this.asyncpwodValidator1(this.form.code);
+        console.log("res2:" + res2);
         if (res2 === "error") {
           this.loadding = false;
           return;
         }
         const res3 = await this.asyncpwodValidator2(this.form.ncode);
+        console.log("res3:" + res3);
         if (res3 === "error") {
           this.loadding = false;
           return;
         }
         const res4 = await this.asyncpwodValidator3(this.form.rcode);
+        console.log("res4:" + res4);
         if (res4 === "error") {
           this.loadding = false;
           return;
         }
-        let model = JSON.parse(JSON.stringify(this.form));
-        delete model["rcode"];
+        if (this.form.ncode !== this.form.rcode) {
+          this.loadding = false;
+          this.show_title("新密码与确认密码不一致!");
+          return;
+        }
+        const model = {
+          username: this.form.mobile,
+          pas: this.form.code,
+          pasword: this.form.ncode,
+        };
+        // let model = JSON.parse(JSON.stringify(this.form));
+        // delete model["rcode"];
         const { code, msg } = await asyncRequest.list(model); //视频预览接口
         if (code === 0) {
           this.loadding = false;
-          this.show_title("密码重置成功!");
+          this.show_title("密码修改成功!");
           setTimeout(() => {
             window.history.back(-1);
           }, 3000);

Alguns arquivos não foram mostrados porque muitos arquivos mudaram nesse diff