{"id":16183883,"url":"https://github.com/crazymryan/request-funjs","last_synced_at":"2026-02-28T01:37:42.626Z","repository":{"id":57354053,"uuid":"246465293","full_name":"CrazyMrYan/request-funjs","owner":"CrazyMrYan","description":"request-funjs是对$Ajax的各种请求封装成一个简洁的函数，便捷开始，提高效率，比如 Request.Get 、Request.Post、  Request.Delete  Ajax request JavaScript jQuery","archived":false,"fork":false,"pushed_at":"2020-03-12T07:58:24.000Z","size":15,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-28T14:08:20.796Z","etag":null,"topics":["ajax","javascript","jquery","npm","reqeust","vue"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/request-funjs","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CrazyMrYan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-03-11T03:27:41.000Z","updated_at":"2020-04-08T07:20:19.000Z","dependencies_parsed_at":"2022-09-05T11:21:07.246Z","dependency_job_id":null,"html_url":"https://github.com/CrazyMrYan/request-funjs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CrazyMrYan%2Frequest-funjs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CrazyMrYan%2Frequest-funjs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CrazyMrYan%2Frequest-funjs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CrazyMrYan%2Frequest-funjs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CrazyMrYan","download_url":"https://codeload.github.com/CrazyMrYan/request-funjs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243960434,"owners_count":20375101,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ajax","javascript","jquery","npm","reqeust","vue"],"created_at":"2024-10-10T07:07:51.793Z","updated_at":"2026-02-28T01:37:42.542Z","avatar_url":"https://github.com/CrazyMrYan.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\r\n\u003ch1 align=\"center\"\u003e request-funjs \u003c/h1\u003e\r\n\r\n![](https://img.shields.io/badge/%20downloads-254/week-brightgreen.svg)\r\n![](https://img.shields.io/npm/l/request-funjs.svg)\r\n![](https://img.shields.io/github/stars/CrazyMrYan/request-funjs?style=social.svg)\r\n\r\n# 快速上手\r\n\r\n## 安装\r\n\r\n```shell\r\nnpm install request-funjs\r\n```\r\n\r\n### 全局注册（在main.js文件里注册）\r\n\r\n```javascript\r\nimport Request from 'request-funjs';\r\nVue.prototype.Request = Request;\r\n//在这里需要声明一个 host 变量，作为请求的主机名称\r\nRequest.host = 'https://www.baidu.com'\r\n```\r\n\r\n### 局部注册（在你所使用的vue里注册）\r\n\r\n```javascript\r\nimport Request from 'request-funjs';\r\n//在这里需要声明一个 host 变量，作为请求的主机名称\r\nthis.Request.host = 'https://www.baidu.com'\r\n```\r\n\r\n## 例子\r\n\r\n```javascript\r\nthis.Request.Get(\"api/list\",this.params,\r\n\tres =\u003e {\r\n\t   console.log(res);\r\n\t},\r\n\terr =\u003e {\r\n\t   console.log(err);\r\n})\r\n```\r\n\r\n#### 目录\r\n\r\n```javascript\r\n1、get请求 :\r\n\tRequest.Get\r\n\r\n2、post请求 :\r\n\tRequest.Post\r\n\r\n3、批量post :\r\n\tRequest.PostBatch\r\n\r\n4、put请求 :\r\n\tRequest.Put\r\n\r\n5、delete请求 \r\n\tRequest.Delete\r\n\r\n6、批量delete :\r\n\tRequest.DeleteBatch\r\n\r\n7、微信分享 :\r\n\tRequest.SetShare\r\n```\r\n\u003cp\u003eIf you like, please give me a star :star:\u003c/p\u003e\r\n\u003cimg width=\"180\" src=\"http://crazy-x-lovemysoul-x-vip.img.abc188.com/images/beishang.png\" align=\"left\"\u003e  \r\n\u003cimg  width=\"180\" src=\"http://crazy-x-lovemysoul-x-vip.img.abc188.com/images/zan.png\"  align=\"left\" /\u003e\r\n\u003cimg  width=\"180\" src=\"http://crazy-x-lovemysoul-x-vip.img.abc188.com/images/wechat.png\"  /\u003e\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrazymryan%2Frequest-funjs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcrazymryan%2Frequest-funjs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrazymryan%2Frequest-funjs/lists"}