vue fetch 传递参数get
时间: 2023-08-28 13:22:46 浏览: 157
通过fetch发送GET请求传递参数的方式有两种。第一种是传统方式的URL传递参数,可以在URL后面使用问号(?)和参数名和值进行传递,例如`fetch('/abc?id=123')`。第二种是Restful形式的URL传递参数,在URL中直接使用斜杠(/)和参数值进行传递,例如`fetch('/abc/123')`。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *2* [vue基础知识(十)——fetch、axios、async/await](https://blog.csdn.net/qq_40556950/article/details/105406287)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
- *3* [Vue接口调用(一)fetch用法](https://blog.csdn.net/m0_55990909/article/details/123957200)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文