{"id":20818340,"url":"https://github.com/lpgray/wx-scene","last_synced_at":"2025-05-07T14:07:37.214Z","repository":{"id":71026498,"uuid":"31762698","full_name":"lpgray/wx-scene","owner":"lpgray","description":"A swiper lib.","archived":false,"fork":false,"pushed_at":"2015-10-25T07:04:07.000Z","size":2632,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-07T14:07:30.952Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"CSS","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/lpgray.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":"2015-03-06T09:41:47.000Z","updated_at":"2017-07-06T04:34:59.000Z","dependencies_parsed_at":"2023-02-25T05:00:10.378Z","dependency_job_id":null,"html_url":"https://github.com/lpgray/wx-scene","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/lpgray%2Fwx-scene","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lpgray%2Fwx-scene/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lpgray%2Fwx-scene/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lpgray%2Fwx-scene/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lpgray","download_url":"https://codeload.github.com/lpgray/wx-scene/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252892503,"owners_count":21820648,"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":[],"created_at":"2024-11-17T21:46:26.188Z","updated_at":"2025-05-07T14:07:37.191Z","avatar_url":"https://github.com/lpgray.png","language":"CSS","funding_links":[],"categories":[],"sub_categories":[],"readme":"wx-scene\n======\n手机单页滑屏组件，常用于微信营销业务方面，只适用于移动端，不依赖任何类库。\n\n## 一些案例\n以下东西都请用手机或者PC的手机模拟器打开，部分必须在微信内置浏览器打开，当然你也可以自己改UA头，加上 `MicroMessenger` 即可。\n\n- [http://weixin.xici.net/html/cracker/](http://weixin.xici.net/html/cracker/)\n- [http://weixin.xici.net/html/gongji/](http://weixin.xici.net/html/gongji/)\n- [http://weixin.xici.net/html/xuwei/](http://weixin.xici.net/html/xuwei/)\n\n## 浏览器支持\n- Android 4.0\n- iOS 6.0\n\n## 使用方法\n可以参考 `example/index.html` 使用。\n\n## API\n```javascript\nnew WxScene(options);\n```\n\n### options\n- `pages : [Array]`\n- `music : [String]`\n- `loading : [String]`\n- `onPageLoad` : `[Function]`\n- `onPageScroll` : `[Function]`\n\n#### pages\n每一页的元素声明，包括背景及子元素。例如：\n\n```javascript\nnew WxScene({\n\tpages : [\n\t\t{\n\t\t\tbg : 'image.jpg',\n\t\t\titems : [\n\t\t\t\t{\n\t\t\t\t\tbg : 'image.png',\n\t\t\t\t\tanimate : 'animate_fade_from_bottom',\n\t\t\t\t\tdelay : 0.2\n\t\t\t\t}\n\t\t\t]\n\t\t}\n\t]\n})\n```\n##### pages下items的参数说明\n\n###### bg\n当前元素的背景图片地址\n\n###### animate\n动画类型字符串：\n\n- `animate_fade`\n- `animate_fade_from_bottom`\n- `animate_fade_from_right`\n- `animate_fade_from_left`\n- `animate_peng`\n\n###### delay\n当前元素延迟显示的秒数，默认 `0.2` 。\n\n#### music\n默认是 `null`, 需要播放的背景音乐url地址，如果不提供，音乐播放功能将不会被启用。\n\n#### loading\n默认是 `null`, 这个参数是指定loading页面的标题，loading设定后，会加载所有 `pages` 需要用的图片资源，加载完毕后显示第一页。\n\n#### onPageLoad\n每一页加载之后的回调函数，接受一个参数，代表页码\n\n#### onPageScroll\n每一页滚走之前的回调函数，接受一个参数，代表滚走的页码\n\n## TODO\n- 微信分享\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flpgray%2Fwx-scene","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flpgray%2Fwx-scene","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flpgray%2Fwx-scene/lists"}