{"id":27186153,"url":"https://github.com/mluminary/minijd-php","last_synced_at":"2026-04-04T20:33:38.505Z","repository":{"id":97136585,"uuid":"110525750","full_name":"MLuminary/minijd-php","owner":"MLuminary","description":"迷你京东","archived":false,"fork":false,"pushed_at":"2018-01-05T15:59:17.000Z","size":1046,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-03T19:16:03.196Z","etag":null,"topics":["ajax","css","html","js","php"],"latest_commit_sha":null,"homepage":null,"language":"HTML","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/MLuminary.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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-11-13T09:13:51.000Z","updated_at":"2017-12-30T10:34:34.000Z","dependencies_parsed_at":null,"dependency_job_id":"3516061d-e1f7-4a15-8c33-6fd1b5befe78","html_url":"https://github.com/MLuminary/minijd-php","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/MLuminary/minijd-php","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MLuminary%2Fminijd-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MLuminary%2Fminijd-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MLuminary%2Fminijd-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MLuminary%2Fminijd-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MLuminary","download_url":"https://codeload.github.com/MLuminary/minijd-php/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MLuminary%2Fminijd-php/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31413269,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T20:09:54.854Z","status":"ssl_error","status_checked_at":"2026-04-04T20:09:44.350Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["ajax","css","html","js","php"],"created_at":"2025-04-09T17:57:43.619Z","updated_at":"2026-04-04T20:33:38.496Z","avatar_url":"https://github.com/MLuminary.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# minijd\n\n## 简介\n\n一款迷你版的京东，实现了用户登录注销，商品的动态分页展览，页码的动态生成，购物车的添加展示，以及对购物车的一些基本操作；\n\n### 技术点\n\n#### 头部和尾部的多次引用\n\n多个html文件中都用到了头部和尾部,因为本项目中用到了jquery,可以将头部和尾部写在php中，然后用``$().load(×××.php)``加载进来。这样就可以提高效率减少重复代码的编写\n\n#### 事件委托\n\n通过``load()``加载进来的页面会产生一个问题，就是你无法直接获取到这个元素并对其进行一些操作，需要委托别的元素来对其进行事件的绑定和一些操作\n\n例如本案例中对添加购物车按钮绑定点击事件\n\n```js\n$(\"#plist\").on('click','a.addcart',function(e){\n    //进行操作\n})\n\n```\n#### cookie\n\n保存客户端浏览器中一个纯文本文件，用来保存安全性要求不高的文字或数字，数据通用方案。\n\n此项目中用来存取用户的id,点击加入购物车的时候需要向购物车页面传递用户的Id，而用户的id是跟随用户变化的，所以需要cookie在用户登录时就存储其id。而在cookie中存取数据时的格式，具体实现过程还是看项目\n\n\n\n\n#### 添加到购物车\n\n先查询用户是否购买过此商品\n\n没有购买过此商品``{\n    insert \n}else{\n    update\n}``\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmluminary%2Fminijd-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmluminary%2Fminijd-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmluminary%2Fminijd-php/lists"}