post重定向后变成了get请求

来源:csdn博客 分类: 文章浏览史 发布时间:2022-02-26 22:21:45 最后更新:2022-02-26 浏览:393
转载声明:
本文为摘录自“csdn博客”,版权归原作者所有。
温馨提示:
为了更好的体验,请点击原文链接进行浏览
摘录时间:
2022-02-26 22:21:45

简单记录我在开发中遇到的情况:
错误代码:

// 错误代码
this.$ajax({
  methods: 'post',
  url: this.baseUrl + '/checkQrCode',
  params: {
    openId: this.store.openId,
    qrCode: this.store.qrCode
  }
})
// 错误原因: ‘methods’ 应该改为‘method’

错误提示:
在这里插入图片描述

错误原因:

methods 应该改为method

正确代码:

// 正确代码
this.$ajax({
  method: 'post',
  url: this.baseUrl + '/checkQrCode',
  params: {
    openId: this.store.openId,
    qrCode: this.store.qrCode
  }
})
php技术微信