1.get

  1. let obj = {
  2. supplier_ext_id:''
  3. }
  4. this.$ajax.get('/douyinOpen/poi/supplier/query/',{
  5. params:obj,
  6. headers:{
  7. "access-token":this.token
  8. }
  9. })

2.post

  1. let obj = {
  2. supplier_ext_id:'',
  3. name:'',
  4. attributes:{},
  5. poi_id:'',
  6. type:1,
  7. status:1
  8. }
  9. this.$ajax.post('/douyinOpen/poi/supplier/sync/',obj,{
  10. headers:{
  11. "access-token":this.token
  12. }
  13. })

差异
get中headers位于第二个参数中和参数并列,post中位于第三个参数中

作者 铁血 汉子 2022年7月11日
2025/06/24/09:58:02pm 2022/7/11/8:30:07
0 1052