如何使异步转为同步 async await !!

如何使下面这一块代码写成 async await!!


  validate(stsCode) {
      // if (stsCode != '5') {
      //   return;
      // }
      const result = this.$refs.ruleForm.validate();
      return result
        .then(async (res) => {
          if (res) {
            const unUploadFile = [];
            const uploadFiled = [];
            if (this.fileList.length <= 0) {
              return Promise.resolve();
            }
            forEach(this.fileList, (value) => {
              if (value.file) {
                unUploadFile.push(value.file);
              } else {
                uploadFiled.push(value);
              }
            });
            if (unUploadFile && unUploadFile.length > 0) {
              const result = await this.$axios.multiple(unUploadFile);
              if (result) {
                this.fileList = uploadFiled.concat(result);
                return Promise.resolve();
              } else {
                return Promise.reject();
              }
            }
          }
        })
        .catch((err) => {
          return Promise.reject(err || "03");
        });
    },