Jelajahi Sumber

调查样式

licailing 4 tahun lalu
induk
melakukan
57edfbc6cc

+ 49 - 42
src/main/h5/src/views/loginHome.vue

@@ -74,10 +74,45 @@ export default {
         message: "加载中...",
         forbidClick: true
       });
+      // this.$http
+      //   .post("/programme/getAuth", {
+      //     phone: this.ruleForm.phone,
+      //     id: this.$route.query.programmeId
+      //   })
+      //   .then(res => {
+      //     window.localStorage.setItem("loginPhone", res.phone);
+      //     if (res.token) {
+      //       window.localStorage.setItem("loginPhoneToken", res.token);
+      //       localStorage.setItem("token", res.token);
+      //       return this.$store.dispatch("getUserInfo");
+      //     } else {
+      //       return Promise.resolve();
+      //     }
+      //   })
+      //   .then(() => {
+      //     this.$toast.clear();
+      //     this.$router.replace({ path: "/home", query: this.$route.query });
+      //   })
+      //   .catch(e => {
+      //     if (e) {
+      //       this.$toast(e.error);
+      //       this.isSend = false;
+      //       this.ruleForm = {
+      //         phone: "",
+      //         code: ""
+      //       };
+      //     }
+      //   });
       this.$http
-        .post("/programme/getAuth", {
+        .get("/sms/verify", {
           phone: this.ruleForm.phone,
-          id: this.$route.query.programmeId
+          code: this.ruleForm.code
+        })
+        .then(() => {
+          return this.$http.post("/programme/getAuth", {
+            phone: this.ruleForm.phone,
+            id: this.$route.query.programmeId
+          });
         })
         .then(res => {
           window.localStorage.setItem("loginPhone", res.phone);
@@ -104,34 +139,6 @@ export default {
           }
         });
       // this.$http
-      //   .get("/sms/verify", {
-      //     phone: this.ruleForm.phone,
-      //     code: this.ruleForm.code
-      //   })
-      //   .then(() => {
-      //     return this.$http.post("/performanceApply/getAuth", {
-      //       phone: this.ruleForm.phone,
-      //       id: this.$route.query.performanceApplyId
-      //     });
-      //   })
-      //   .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
       //   })
@@ -154,18 +161,18 @@ export default {
         return;
       }
 
-      // this.$http
-      //   .get("/sms/sendVerify", {
-      //     phone: this.ruleForm.phone
-      //   })
-      //   .then(res => {
-      //     this.$toast.success("发送成功");
-      this.isSend = true;
-      this.changeTime(60);
-      // })
-      // .catch(e => {
-      //   this.$toast(e.error);
-      // });
+      this.$http
+        .get("/sms/sendVerify", {
+          phone: this.ruleForm.phone
+        })
+        .then(res => {
+          this.$toast.success("发送成功");
+          this.isSend = true;
+          this.changeTime(60);
+        })
+        .catch(e => {
+          this.$toast(e.error);
+        });
     },
     changeTime(num) {
       this.num = num;

+ 2 - 2
src/main/java/com/izouma/wenlvju/repo/TrainingInstitutionRepo.java

@@ -15,10 +15,10 @@ public interface TrainingInstitutionRepo extends JpaRepository<TrainingInstituti
     @Transactional
     void softDelete(Long id);
 
-    @Query(nativeQuery = true, value = "select phone from training_institution where submit = false and phone REGEXP '^[1][35678][0-9]{9}$' and id > 4807")
+    @Query(nativeQuery = true, value = "select phone from training_institution where submit = false and phone REGEXP '^[1][356789][0-9]{9}$'")
     List<String> findAllBySubmitFalseAndPhoneIsNotNull();
 
-    @Query(nativeQuery = true, value = "select phone from training_institution where submit = false and phone REGEXP '^[1][35678][0-9]{9}$' limit 2000,2000")
+    @Query(nativeQuery = true, value = "select phone from training_institution where submit = false and phone REGEXP '^[1][356789][0-9]{9}$' limit 2000,2000")
     List<String> findAllBySubmitFalseAndPhoneIsNotNullLimit();
 
     List<TrainingInstitution> findAllByPhoneIsNull();

+ 0 - 1
src/main/java/com/izouma/wenlvju/service/TrainingInstitutionService.java

@@ -4,7 +4,6 @@ import cn.hutool.core.util.ObjectUtil;
 import com.alibaba.excel.EasyExcel;
 import com.izouma.wenlvju.domain.TrainingInstitution;
 import com.izouma.wenlvju.dto.PageQuery;
-import com.izouma.wenlvju.dto.ProgUploadDTO;
 import com.izouma.wenlvju.dto.TrainingInstitutionDTO;
 import com.izouma.wenlvju.exception.BusinessException;
 import com.izouma.wenlvju.repo.TrainingInstitutionRepo;

+ 4 - 1
src/main/vue/src/views/performance/ProgrammeList.vue

@@ -383,7 +383,10 @@
             />
             <div style="display: block; margin: 10px;">
                 <el-button size="mini" @click="move(-1)" :disabled="index == 0">上一个</el-button>
-                <el-button size="mini" @click="move(1)" :disabled="(page - 1) * pageSize + index == totalElements - 1"
+                <el-button
+                    size="mini"
+                    @click="move(1)"
+                    :disabled="(page - 1) * pageSize + index == totalElements - 1 || index >= pageSize - 1"
                     >下一个</el-button
                 >
                 <el-button @click="showViedo = false" size="mini">关闭</el-button>