Ver código fonte

Merge branch 'master' of licailing/wenlvju into dev

licailing 5 anos atrás
pai
commit
2ae8458bf7

+ 10 - 4
build.sh

@@ -1,7 +1,13 @@
 git checkout
 git pull
-#(cd src/main/vue && npm run build)
+(cd src/main/vue && yarn && yarn build)
+(cd src/main/h5 && yarn && yarn build)
 mvn clean package
-systemctl stop zmj
-cp target/zhumj-0.0.1-SNAPSHOT.jar /var/www/zmj/zhumj-0.0.1-SNAPSHOT.jar
-systemctl start zmj
+systemctl stop wenlvju
+cp target/*.jar /var/www/wenlvju
+rm -rf /var/www/wenlvju/admin
+cp -r src/main/vue/dist /var/www/wenlvju/admin
+rm -rf /var/www/wenlvju/h5
+cp -r src/main/h5/dist /var/www/wenlvju/h5
+systemctl start wenlvju
+

+ 31 - 15
src/main/h5/src/views/login.vue

@@ -74,19 +74,36 @@ 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", {
+      //         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
-        .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();
+        .post("/auth/phoneLogin", {
+          phone: this.ruleForm.phone
         })
         .then(res => {
           localStorage.setItem("token", res);
@@ -97,9 +114,8 @@ export default {
           this.$router.replace({ path: "/" });
         })
         .catch(e => {
-          if (e) {
-            this.$toast(e.error);
-          }
+          this.$toast.clear();
+          this.$toast(e.error || "登录失败");
         });
     },
     sendSms() {

+ 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<>();

+ 3 - 1
src/main/vue/src/views/rate/GradeList.vue

@@ -63,7 +63,9 @@
         <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">
+                最终评分
+            </el-button>
         </div>
     </div>
 </template>