{"id":16901876,"url":"https://github.com/ttys026/wxapp-identicon","last_synced_at":"2025-03-20T15:13:51.653Z","repository":{"id":143797225,"uuid":"146545737","full_name":"ttys026/wxapp-identIcon","owner":"ttys026","description":"根据用户openID在小程序客户端随机生成SVG头像的插件.","archived":false,"fork":false,"pushed_at":"2018-08-29T05:12:33.000Z","size":69,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-15T04:49:07.334Z","etag":null,"topics":["javascript","wxapp"],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ttys026.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2018-08-29T04:38:21.000Z","updated_at":"2022-10-24T17:25:58.000Z","dependencies_parsed_at":"2023-12-02T06:15:10.480Z","dependency_job_id":null,"html_url":"https://github.com/ttys026/wxapp-identIcon","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ttys026%2Fwxapp-identIcon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ttys026%2Fwxapp-identIcon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ttys026%2Fwxapp-identIcon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ttys026%2Fwxapp-identIcon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ttys026","download_url":"https://codeload.github.com/ttys026/wxapp-identIcon/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244637103,"owners_count":20485446,"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":["javascript","wxapp"],"created_at":"2024-10-13T18:02:07.523Z","updated_at":"2025-03-20T15:13:51.625Z","avatar_url":"https://github.com/ttys026.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# wxapp-identIcon\n根据用户openID在小程序客户端随机生成SVG头像的插件.\n\n## 使用\n\n1. clone project或者下载压缩包，因为小程序对代码量有\u003c2M的要求，只需要拷贝dist目录下需要使用的Style到小程序目录中。\n2. 在js文件中引用: \n```\nvar IdentIcon = require('../../utils/githubStyle/index.js');\n```\n\n3. 在js文件中使用：\n```\nvar data = IdentIcon('openID');\nthis.setData({image: data});\n```\n上述例子中openID也可以替换成任意字符串。\n\n4.在wxml中插入图片：\n```\n\u003cimage src='{{image}}' class='avatar'\u003e\u003c/image\u003e\n```\n\n## 截图\n\n#### Github style:\n\n ![github style](https://raw.githubusercontent.com/tli4/wxapp-identIcon/master/demo/github.png)\n \n#### Robohash Style:\n \n ![robohash style](https://raw.githubusercontent.com/tli4/wxapp-identIcon/master/demo/robohash.png)\n \n## Credits\n \n #### HashTool from https://github.com/emn178/js-sha256\n #### Github style revised from https://github.com/stewartlord/identicon.js\n #### Robohash style revised from https://github.com/nimiq/robohash\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fttys026%2Fwxapp-identicon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fttys026%2Fwxapp-identicon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fttys026%2Fwxapp-identicon/lists"}