Browse Source

转档页,转档成功后重新获取剩余劵数.登录页面,登录特效

liyangbin 2 years ago
parent
commit
be534a2afa
2 changed files with 15 additions and 2 deletions
  1. 2 2
      components/LoginBar.vue
  2. 13 0
      pages/converter.vue

+ 2 - 2
components/LoginBar.vue

@@ -564,8 +564,8 @@ export default {
       width: 28px;
       border-radius: 50%;
       position: absolute;
-      bottom: 85px;
-      left: 380px;
+      bottom: 50px;
+      left: 350px;
       -webkit-animation: loading 1s infinite linear;
       -moz-animation: loading 1s infinite linear;
       -o-animation: loading 1s infinite linear;

+ 13 - 0
pages/converter.vue

@@ -386,6 +386,13 @@ export default {
         }
     },
     methods: {
+        getUserInfo() {
+          this.$axios.get('members/getMemberInfo').then((res)=> {
+            if(res.code === 200) {
+              this.$store.commit('setUser',res.result.memberInfo)
+            }
+          })
+        },
         handlSubmit(event, type) {
             if (!this.$store.state.token) {
               event.preventDefault();
@@ -576,6 +583,7 @@ export default {
                 data: fileArr
             };
             this.$axios("/mission/create", config).then((res) => {
+              // console.log(res)
                 if (res.code === 200) {
                     const missionFiles = res.result.missionFilePoJos;
                     // console.log(missionFiles)
@@ -585,6 +593,7 @@ export default {
                     }
                 }
                 else {
+                  // console.log("111")
                     this.changeFileFlag = true;
                     this.changeFileStatus("all", 5);
                 }
@@ -662,6 +671,7 @@ export default {
         },
         // 转档第三步,开始转档
         convertFile(file, missionId) {
+          
             const formData = new FormData();
             formData.append("missionId", missionId);
             const config = {
@@ -695,6 +705,7 @@ export default {
                     for (let i = 0; i < getFileList.length; i++) {
                         if (getFileList[i].status === 2) {
                             this.changeFileStatus(getFileList[i].fileName, 4);
+
                             this.fileList.forEach(item => {
                                 if (item.name === getFileList[i].fileName) {
                                     this.changeFileStatus(getFileList[i].fileName, 6);
@@ -726,6 +737,8 @@ export default {
                     }
                     // console.log('changeSucesssFileList:', this.changeSucesssFileList)
                     localStorage.setItem("file", JSON.stringify(this.changeSucesssFileList));
+                    this.getUserInfo()
+                    console.log("成功")
                 }
                 else {
                     this.changeFileStatus("all", 5);