vue中发送格式为FormData的请求

        //重点
          let newdata = new FormData();
          newdata.append('qrCode', this.model.qrCode);
          newdata.append('type', this.model.type);
          newdata.append('uploadType', this.model.uploadType);
          request.post('specialTicket', newdata).then((res) => {
            if (res.code === 0) {
              this.$message({
                type: 'success',
                message: '成功!'
              });
             }
           })
posted @ 2022-02-15 09:38  喜欢Tb  阅读(29)  评论(0)    收藏  举报  来源