Bläddra i källkod

登录去校验

licailing 5 år sedan
förälder
incheckning
bfcf8c6df9

+ 42 - 26
src/main/h5/src/views/login.vue

@@ -74,33 +74,49 @@ export default {
         message: "加载中...",
         forbidClick: true
       });
-      this.$http
-        .get("/sms/verify", {
-          phone: this.ruleForm.phone,
-          code: this.ruleForm.code
-        })
-        .then(() => {
-          return this.$http.post("/auth/phoneLogin", {
+    //   this.$http
+    //     .get("/sms/verify", {
+    //       phone: this.ruleForm.phone,
+    //       code: this.ruleForm.code
+    //     })
+    //     .then(() => {
+    //       return this.$http.post("/auth/phoneLogin", {
+    //         phone: this.ruleForm.phone
+    //       });
+    //     })
+    //     .catch(e => {
+    //       this.$toast(e.error || "登录失败");
+    //       return Promise.reject();
+    //     })
+    //     .then(res => {
+    //       localStorage.setItem("token", res);
+    //       return this.$store.dispatch("getUserInfo");
+    //     })
+    //     .then(() => {
+    //       this.$toast.clear();
+    //       this.$router.replace({ path: "/" });
+    //     })
+    //     .catch(e => {
+    //       if (e) {
+    //         this.$toast(e.error);
+    //       }
+    //     });
+        this.$http
+            .post("/auth/phoneLogin", {
             phone: this.ruleForm.phone
-          });
-        })
-        .catch(e => {
-          this.$toast(e.error || "登录失败");
-          return Promise.reject();
-        })
-        .then(res => {
-          localStorage.setItem("token", res);
-          return this.$store.dispatch("getUserInfo");
-        })
-        .then(() => {
-          this.$toast.clear();
-          this.$router.replace({ path: "/" });
-        })
-        .catch(e => {
-          if (e) {
-            this.$toast(e.error);
-          }
-        });
+            })
+            .then(res => {
+            localStorage.setItem("token", res);
+            return this.$store.dispatch("getUserInfo");
+            })
+            .then(() => {
+            this.$toast.clear();
+            this.$router.replace({ path: "/" });
+            })
+            .catch(e => {
+            this.$toast.clear();
+            this.$toast(e.error || "登录失败");
+            });
     },
     sendSms() {
       if (!this.ruleForm.phone || !/^1[3-9]\d{9}$/.test(this.ruleForm.phone)) {

+ 4 - 5
src/main/java/com/izouma/wenlvju/service/RateService.java

@@ -29,7 +29,6 @@ import org.apache.pdfbox.io.MemoryUsageSetting;
 import org.apache.pdfbox.multipdf.PDFMergerUtility;
 import org.springframework.data.domain.Page;
 import org.springframework.stereotype.Service;
-import sun.misc.BASE64Encoder;
 
 import javax.servlet.ServletOutputStream;
 import javax.servlet.http.HttpServletResponse;
@@ -226,10 +225,10 @@ public class RateService {
         }
     }
 
-    public String Image2Base64(String imgUrl) {
-        BASE64Encoder encoder = new BASE64Encoder();
-        return encoder.encode(HttpRequest.get(imgUrl).bytes()).replace("\n", "\r\n").replace("\r\r\n", "\r\n");
-    }
+//    public String Image2Base64(String imgUrl) {
+//        BASE64Encoder encoder = new BASE64Encoder();
+//        return encoder.encode(HttpRequest.get(imgUrl).bytes()).replace("\n", "\r\n").replace("\r\r\n", "\r\n");
+//    }
 
     public void imgToPdf(List<InputStream> files, Rate rate) {
         List<String> imageUrllist = new ArrayList<>();

+ 5 - 2
src/main/vue/src/views/rate/GradeList.vue

@@ -63,7 +63,7 @@
         <div style="padding:20px 50px;display:flex" class="fixed-btn">
             <el-button @click="$router.go(-1)">返回</el-button>
             <div style="flex-grow:1"></div>
-            <el-button type="primary" v-if="submitList.length !== 0" @click="saveExpertScore">最终评分</el-button>
+            <el-button type="primary" v-if="submitList.length !== 0" @click="saveExpertScore" :loading="saving">最终评分</el-button>
         </div>
     </div>
 </template>
@@ -83,7 +83,8 @@ export default {
             tableHeight1: 620,
             rateList: [],
             info: {},
-            form: {}
+            form: {},
+            saving: false
         };
     },
     computed: {
@@ -116,6 +117,7 @@ export default {
     },
     methods: {
         saveExpertScore() {
+            this.saving = true;
             this.$http
                 .post('/rateExpertAudit/batchSave', {
                     audits: JSON.stringify(this.submitList)
@@ -127,6 +129,7 @@ export default {
                 })
                 .then(res => {
                     this.$message.success('评审完成');
+                    this.saving = false;
                     this.getGride();
                 });
         },