{"id":18974912,"url":"https://github.com/lfb/nuxt-template","last_synced_at":"2026-04-18T12:03:00.809Z","repository":{"id":213480715,"uuid":"734158990","full_name":"lfb/nuxt-template","owner":"lfb","description":"Nuxt.js v2.15.8 开箱即用模板","archived":false,"fork":false,"pushed_at":"2023-12-21T09:53:38.000Z","size":221,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-26T05:13:16.673Z","etag":null,"topics":["nodejs","nuxtjs","ssr"],"latest_commit_sha":null,"homepage":"","language":"Vue","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/lfb.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,"governance":null,"roadmap":null,"authors":null}},"created_at":"2023-12-21T02:33:58.000Z","updated_at":"2024-08-29T09:34:56.000Z","dependencies_parsed_at":"2023-12-29T04:16:02.164Z","dependency_job_id":"7eea9fcd-24bf-41ad-b72a-e48a11662b6b","html_url":"https://github.com/lfb/nuxt-template","commit_stats":{"total_commits":10,"total_committers":1,"mean_commits":10.0,"dds":0.0,"last_synced_commit":"77b8107c90fca05367c2d55279e7f255c18f6b30"},"previous_names":["lfb/nuxt-template"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/lfb/nuxt-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lfb%2Fnuxt-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lfb%2Fnuxt-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lfb%2Fnuxt-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lfb%2Fnuxt-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lfb","download_url":"https://codeload.github.com/lfb/nuxt-template/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lfb%2Fnuxt-template/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267668201,"owners_count":24124963,"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","status":"online","status_checked_at":"2025-07-29T02:00:12.549Z","response_time":2574,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["nodejs","nuxtjs","ssr"],"created_at":"2024-11-08T15:16:41.224Z","updated_at":"2026-04-18T12:03:00.667Z","avatar_url":"https://github.com/lfb.png","language":"Vue","funding_links":[],"categories":[],"sub_categories":[],"readme":"## 版本\n\n-   node: `v14.x`\n-   npm: `v6.x`\n-   nuxtjs: `v2.15.8`\n\n## 内容\n\n-   vuex：在`~/store/*`下新建模块文件即可\n-   网络请求方法：在 `~/requests/*`下新建模块文件即可\n-   全局公共方法：`this.$isObject, this.$isArray, this.$cloneDeep`\n-   全局环境变量：`env`\n-   cookie: `this.$cookies.set... `\n-   CSS 扩展语：`scss`\n-   全局捕获错误方法: `~/pulgins/catch-errors.js`\n\n## 使用\n\n拉取项目\n\n```bash\ngit clone https://github.com/lfb/nuxt-template.git your_project_name\n```\n\n安装启动\n\n```bash\n# 安装依赖\n$ yarn install\n\n# 启动项目，在 localhost:3000 访问\n$ yarn dev\n\n# 打包项目\n$ yarn build\n\n# 打包完成后，可以运行\n$ yarn start\n```\n\n## 网络请求示例\n\n```js\n// 在文件夹 ~/requests/api 下，定义请求方法\nexport default (axios) =\u003e ({\n    // 获取文章列表\n    // 使用：this.$requests.article.getArticleList({})\n    getArticleList(params) {\n        return axios\n            .get(articleUrl.articleList, { params })\n            .then((res) =\u003e [null, res])\n            .catch((err) =\u003e [err, null])\n    },\n})\n\n// 项目中在客户端实例使用\nthis.$requests.article.getArticleList({ page: 1 })\n\n// 项目中在 SSR context 使用\ncontext.app.$requests.article.getArticleList({ page: 1 })\n\n// 具体：\nconst [err, data] = await this.$requests.article.getArticleList({ page: 1 })\nif (!error) {\n    console.log('data', data)\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flfb%2Fnuxt-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flfb%2Fnuxt-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flfb%2Fnuxt-template/lists"}