Pārlūkot izejas kodu

新增二次确认密码功能及文档问题修改

zengyicheng 2 gadi atpakaļ
vecāks
revīzija
587d145be5

+ 47 - 5
src/App.vue

@@ -1,10 +1,21 @@
 <template>
-  <div id="app" :class="{}">
+  <div
+    id="app"
+    :class="
+      this.$route.path == '/data' && this.$store.state.userInfo.type == 1
+        ? 'changeBg'
+        : ''
+    "
+  >
     <div :class="this.$route.path == '/anliDetail' ? 'app_headBg' : 'app_head'">
-      <div class="logo" @click="goTo('/course')"></div>
+      <div
+        class="logo"
+        style="cursor: pointer"
+        @click="goTo('/eventCenter')"
+      ></div>
       <span
-        style="margin-left: 10px; color: #fff; font-size: 16px"
-        @click="goTo('/course')"
+        style="margin-left: 10px; color: #fff; font-size: 16px; cursor: pointer"
+        @click="goTo('/eventCenter')"
         >广东省案例征集</span
       >
       <div class="user_head" v-if="this.$store.state.isLogin">
@@ -17,6 +28,19 @@
         <span class="user_name">{{
           this.$store.state.userInfo ? this.$store.state.userInfo.name : "用户"
         }}</span>
+        <div class="settingImg"></div>
+        <span
+          style="
+            color: rgb(255, 255, 255);
+            margin-right: 20px;
+            font-weight: 500;
+            font-size: 15px;
+            cursor: pointer;
+            text-align: center;
+          "
+          @click="goTo('/data')"
+          >设置</span
+        >
         <div @click="exit">
           <i class="exitI"></i>
           <el-button type="text" style="color: white">退出</el-button>
@@ -315,7 +339,7 @@ body {
 
 .user_head .user_name {
   color: #fff;
-  margin-right: 10px;
+  margin-right: 20px;
 }
 
 .user_head div {
@@ -417,4 +441,22 @@ html::-webkit-scrollbar-thumb {
   border-color: #5c549f !important;
   background-color: #dbd7ff !important;
 }
+
+.changeBg {
+  background: #fff !important;
+}
+.settingImg {
+  background-image: url("./assets/icon/setting.png");
+  width: 19px;
+  height: 19px;
+  background-size: 100% 100%;
+  margin: 1px 5px 0 0;
+  line-height: 25px;
+  vertical-align: text-top;
+  background-repeat: no-repeat;
+}
+.settingImg > img {
+  width: 100%;
+  height: 100%;
+}
 </style>

BIN
src/assets/icon/eye.png


BIN
src/assets/icon/eyeOff.png


BIN
src/assets/icon/setting.png


+ 131 - 27
src/components/pages/munAdmin/data.vue

@@ -1,18 +1,37 @@
 <template>
   <div class="pb_content">
-    <div class="pb_head">
+    <div
+      class="pb_head"
+      style="
+        display: flex;
+        flex-direction: row;
+        align-items: center;
+        justify-content: space-between;
+      "
+    >
       <div>
         <span>我的资料</span>
       </div>
+      <div>
+        <el-button @click="goTo('/eventCenter')" type="primary" size="small"
+          >返回</el-button
+        >
+      </div>
     </div>
     <div class="pb_content_body" style="position: relative; width: 100%">
       <div style="width: 100%; margin: 0px auto">
-        <!-- <div class="data_nav">
+        <div class="data_nav">
           <span @click="type = 1" :class="{ active: type == 1 }">我的资料</span>
           <span @click="type = 2" :class="{ active: type == 2 }">修改密码</span>
-        </div> -->
-        <el-form v-if="type == 1" :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px"
-          class="demo-ruleForm">
+        </div>
+        <el-form
+          v-if="type == 1"
+          :model="ruleForm"
+          :rules="rules"
+          ref="ruleForm"
+          label-width="100px"
+          class="demo-ruleForm"
+        >
           <!-- <el-form-item label="姓名" prop="teacherName">
             <el-input
               v-model="ruleForm.name"
@@ -21,39 +40,98 @@
             ></el-input>
           </el-form-item> -->
           <el-form-item label="姓名" prop="name">
-            <el-input v-model="ruleForm.name" style="width: 300px" placeholder="请输入昵称"></el-input>
+            <el-input
+              v-model="ruleForm.name"
+              style="width: 300px"
+              placeholder="请输入昵称"
+            ></el-input>
           </el-form-item>
           <el-form-item label="手机号码" prop="phone">
-            <el-input v-model="ruleForm.phone" style="width: 300px" placeholder="请输入手机号码"></el-input>
+            <el-input
+              v-model="ruleForm.phone"
+              style="width: 300px"
+              placeholder="请输入手机号码"
+            ></el-input>
           </el-form-item>
           <el-form-item label="账号">
-            <el-input v-model="ruleForm.username" disabled style="width: 300px" placeholder="请输入昵称"></el-input>
+            <el-input
+              v-model="ruleForm.username"
+              disabled
+              style="width: 300px"
+              placeholder="请输入昵称"
+            ></el-input>
           </el-form-item>
           <el-form-item label="地区" prop="sBySchool">
-            <el-input v-model="ruleForm.region" disabled style="width: 300px" placeholder=""></el-input>
+            <el-input
+              v-model="ruleForm.region"
+              disabled
+              style="width: 300px"
+              placeholder=""
+            ></el-input>
           </el-form-item>
           <el-form-item label="学校" prop="sBySchool">
-            <el-input v-model="ruleForm.school" disabled style="width: 300px" placeholder=""></el-input>
+            <el-input
+              v-model="ruleForm.school"
+              disabled
+              style="width: 300px"
+              placeholder=""
+            ></el-input>
             <!-- <el-select v-model="ruleForm.sBySchool" clearable placeholder="请选择学校" disabled>
               <el-option :value="ruleForm.sBySchool"> </el-option>
             </el-select> -->
           </el-form-item>
           <el-form-item label="个人简介" prop="intro">
-            <el-input v-model="ruleForm.remark" type="textarea" :rows="5" resize="none" placeholder="想说点什么..."
-              style="width: 300px"></el-input>
+            <el-input
+              v-model="ruleForm.remark"
+              type="textarea"
+              :rows="5"
+              resize="none"
+              placeholder="想说点什么..."
+              style="width: 300px"
+            ></el-input>
           </el-form-item>
           <el-form-item>
-            <el-button type="primary" @click="submitForm('ruleForm')">修改</el-button>
+            <el-button type="primary" @click="submitForm('ruleForm')"
+              >修改</el-button
+            >
           </el-form-item>
         </el-form>
         <div class="password" v-if="type == 2">
           <div class="input_box">
             <span>原密码</span>
-            <el-input class="input" v-model="opassword" placeholder="请输入原密码"></el-input>
+            <el-input
+              class="input"
+              v-model="opassword"
+              placeholder="请输入原密码"
+            ></el-input>
           </div>
           <div class="input_box">
-            <span>修改密码</span>
-            <el-input class="input" v-model="password" placeholder="请输入修改密码"></el-input>
+            <span>输入新密码</span>
+            <div style="position: relative">
+              <el-input
+                :type="isLook ? 'type' : 'password'"
+                class="input"
+                v-model="password"
+                placeholder="请输入修改密码"
+              ></el-input>
+              <div class="eye" @click="changeEye">
+                <img :src="isLook ? eye : eyeOff" alt="" />
+              </div>
+            </div>
+          </div>
+          <div class="input_box">
+            <span>再次输入新密码</span>
+            <div style="position: relative">
+              <el-input
+                :type="isLook ? 'type' : 'password'"
+                class="input"
+                v-model="password1"
+                placeholder="请再次输入修改密码"
+              ></el-input>
+              <div class="eye" @click="changeEye">
+                <img :src="isLook ? eye : eyeOff" alt="" />
+              </div>
+            </div>
           </div>
           <div class="input_box">
             <span></span>
@@ -102,9 +180,13 @@ export default {
       },
       opassword: "",
       password: "",
+      password1: "",
       userinfo: "",
       schoolJuri: [],
       orgJuri: [],
+      isLook: false,
+      eyeOff: require("../../../assets/icon/eyeOff.png"),
+      eye: require("../../../assets/icon/eye.png"),
       userid: this.$store.state.userInfo.userid,
       rules: {
         pass: [{ validator: validatePass, trigger: "blur" }],
@@ -129,6 +211,9 @@ export default {
     };
   },
   methods: {
+    goTo(path) {
+      this.$router.push(path);
+    },
     submitForm(formName) {
       this.$refs[formName];
       this.$refs[formName].validate((valid) => {
@@ -139,7 +224,6 @@ export default {
               phone: this.ruleForm.phone,
               intro: this.ruleForm.remark,
               userid: this.userid,
-
             },
           ];
           this.ajax
@@ -159,7 +243,9 @@ export default {
           return false;
         }
       });
-
+    },
+    changeEye() {
+      this.isLook = !this.isLook;
     },
     getUser() {
       let params = { uid: this.userid };
@@ -194,6 +280,9 @@ export default {
       if (this.password.length < 6) {
         this.$message.error("密码长度不少于6位");
         return;
+      } else if (this.password != this.password1) {
+        this.$message.error("两次新密码不相同");
+        return;
       }
       let params = [
         {
@@ -233,7 +322,7 @@ export default {
   margin: 20px 0;
 }
 
-.formTop>>>.el-form {
+.formTop >>> .el-form {
   margin: 0 auto;
 }
 
@@ -249,8 +338,8 @@ export default {
   margin-right: 5px;
 }
 
-.tx>img,
-.emailImg>img {
+.tx > img,
+.emailImg > img {
   width: 100%;
   height: 100%;
 }
@@ -282,8 +371,9 @@ export default {
   display: flex;
   flex-direction: column;
   justify-content: center;
-  align-items: flex-start;
+  align-items: center;
   background: #fff;
+  margin-top: 30px;
 }
 
 /* .demo-ruleForm >>> .el-form-item__label:before {
@@ -294,7 +384,7 @@ export default {
 .demo-ruleForm >>> .el-form-item__label:nth-child(3) {
   content: "";
 } */
-.demo-ruleForm>>>.el-form-item__content {
+.demo-ruleForm >>> .el-form-item__content {
   width: 300px;
 }
 
@@ -303,7 +393,7 @@ export default {
   align-items: center;
   justify-content: center;
   width: 100%;
-  margin: 10px 0;
+  margin: 60px 0 10px 0;
 }
 
 .data_nav span {
@@ -314,8 +404,8 @@ export default {
   height: 35px;
 }
 
-.data_nav span+span {
-  margin-left: 10px;
+.data_nav span + span {
+  margin-left: 20px;
 }
 
 .data_nav .active {
@@ -350,7 +440,21 @@ export default {
   width: 300px;
 }
 
-.input_box+.input_box {
+.input_box + .input_box {
   margin-top: 20px;
 }
+
+.eye {
+  position: absolute;
+  right: 10px;
+  top: 8px;
+  width: 25px;
+  height: 25px;
+  cursor: pointer;
+}
+
+.eye > img {
+  width: 100%;
+  height: 100%;
+}
 </style>

+ 10 - 3
src/components/pages/race/addRace.vue

@@ -145,9 +145,7 @@
       </div>
       <span slot="footer" class="dialog-footer">
         <el-button @click="isAddOrUpRace(1)">跳过并保存</el-button>
-        <el-button type="primary" @click="dialogVisible1 = false"
-          >继续填写</el-button
-        >
+        <el-button type="primary" @click="goNow">继续填写</el-button>
       </span>
     </el-dialog>
     <el-dialog
@@ -282,6 +280,15 @@ export default {
       this.lastTime -= 1;
       // this.timeText = this.lastTime + "秒倒计时自动关闭";
     },
+    goNow() {
+      if (this.timer) {
+        clearInterval(this.timer);
+      }
+      this.timer = null;
+      this.lastTime = 5;
+      this.dialogVisible1 = false;
+      this.steps++;
+    },
     checkSteps(steps) {
       if (steps > 1) {
         if (this.raceInfo.title == "") {

+ 1 - 1
src/components/pages/race/addRace/raceDetail.vue

@@ -545,7 +545,7 @@
                           />
                         </button>
                         <div style="color: red">
-                          *此处需提交《项目式学习方案设计》、《项目式学习活动案例》的PDF格式文件。
+                          *此处需提交《项目式学习方案设计》、《项目式学习活动案例》的PDF格式文件。限制大小为80M。
                         </div>
                       </div>
                     </div>