├── .babelrc ├── .eslintrc.json ├── .gitignore ├── .npmignore ├── README.md ├── dist └── com.application.demo.rpk ├── package.json ├── shotscreen ├── 1.gif ├── 5.gif ├── 6.gif ├── 7.gif └── 8.gif ├── sign └── debug │ ├── certificate.pem │ └── private.pem └── src ├── About └── index.ux ├── Book └── index.ux ├── Common └── logo.png ├── Home ├── book │ └── index.ux ├── index.ux ├── list │ └── index.ux ├── movie │ └── index.ux └── music │ └── index.ux ├── HomePage └── index.ux ├── Movie └── index.ux ├── Music └── index.ux ├── Theme └── index.ux ├── app.ux ├── assets ├── about-blue.png ├── about-green.png ├── about-pink.png ├── back.png ├── bg.png ├── book-blue.png ├── book-green.png ├── book-pink.png ├── book.png ├── film-blue.png ├── film-green.png ├── film-pink.png ├── film.png ├── github.png ├── home-blue.png ├── home-green.png ├── home-pink.png ├── menu.png ├── music-blue.png ├── music-green.png ├── music-pink.png ├── music.png ├── search.png ├── setting-blue.png ├── setting-green.png ├── setting-pink.png ├── suggest-blue.png ├── suggest-green.png ├── suggest-pink.png ├── theme-blue.png ├── theme-green.png └── theme-pink.png ├── components ├── cover │ └── index.ux ├── header │ └── index.ux └── rating │ └── index.ux ├── manifest.json ├── module ├── es6.js └── network.js └── util.js /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | "env" 4 | ] 5 | } -------------------------------------------------------------------------------- /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "commonjs": true 4 | }, 5 | "extends": "eslint:recommended", 6 | "parser": "babel-eslint", 7 | "parserOptions": { 8 | "sourceType": "module", 9 | "ecmaFeatures": { 10 | "experimentalObjectRestSpread": true, 11 | "jsx": true 12 | } 13 | }, 14 | "globals": { 15 | "loadData": false, 16 | "saveData": false, 17 | "history": false, 18 | "console": false, 19 | "setTimeout": false, 20 | "clearTimeout": false, 21 | "setInterval": false, 22 | "clearInterval": false 23 | }, 24 | "plugins": [ 25 | "hybrid" 26 | ], 27 | "rules": { 28 | "indent": [ 29 | "warn", 30 | 2 31 | ], 32 | "no-console": [ 33 | "warn", 34 | { 35 | "allow": [ 36 | "info", 37 | "warn", 38 | "error" 39 | ] 40 | } 41 | ], 42 | "no-unused-vars": [ 43 | "warn", 44 | { 45 | "varsIgnorePattern": "prompt" 46 | } 47 | ], 48 | "quotes": [ 49 | "warn", 50 | "single", 51 | { 52 | "avoidEscape": true, 53 | "allowTemplateLiterals": true 54 | } 55 | ], 56 | "linebreak-style": [ 57 | "warn", 58 | "unix" 59 | ], 60 | "semi": [ 61 | "warn", 62 | "never" 63 | ] 64 | } 65 | } -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See http://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | node_modules 5 | */*/node_modules 6 | 7 | 8 | # misc 9 | .DS_Store 10 | npm-debug.log 11 | yarn-error.log 12 | .idea 13 | build/* 14 | !dist/download 15 | !dist/download/* 16 | !dist/res 17 | !dist/res/* 18 | ### SublimeText template 19 | # Cache files for Sublime Text 20 | *.tmlanguage.cache 21 | *.tmPreferences.cache 22 | *.stTheme.cache 23 | 24 | # Workspace files are user-specific 25 | *.sublime-workspace 26 | 27 | # Project files should be checked into the repository, unless a significant 28 | # proportion of contributors will probably not be using Sublime Text 29 | # *.sublime-project 30 | 31 | # SFTP configuration file 32 | sftp-config.json 33 | 34 | # Package control specific files 35 | Package Control.last-run 36 | Package Control.ca-list 37 | Package Control.ca-bundle 38 | Package Control.system-ca-bundle 39 | Package Control.cache/ 40 | Package Control.ca-certs/ 41 | Package Control.merged-ca-bundle 42 | Package Control.user-ca-bundle 43 | oscrypto-ca-bundle.crt 44 | bh_unicode_properties.cache 45 | 46 | # Sublime-github package stores a github token in this file 47 | # https://packagecontrol.io/packages/sublime-github 48 | GitHub.sublime-settings 49 | ### Windows template 50 | # Windows thumbnail cache files 51 | Thumbs.db 52 | ehthumbs.db 53 | ehthumbs_vista.db 54 | 55 | # Dump file 56 | *.stackdump 57 | 58 | # Folder config file 59 | Desktop.ini 60 | 61 | # Recycle Bin used on file shares 62 | $RECYCLE.BIN/ 63 | 64 | # Windows Installer files 65 | *.cab 66 | *.msi 67 | *.msm 68 | *.msp 69 | 70 | # Windows shortcuts 71 | *.lnk 72 | ### macOS template 73 | # General 74 | # .DS_Store 75 | .AppleDouble 76 | .LSOverride 77 | 78 | # Icon must end with two \r 79 | # Icon 80 | 81 | # Thumbnails 82 | ._* 83 | 84 | # Files that might appear in the root of a volume 85 | .DocumentRevisions-V100 86 | .fseventsd 87 | .Spotlight-V100 88 | .TemporaryItems 89 | .Trashes 90 | .VolumeIcon.icns 91 | .com.apple.timemachine.donotpresent 92 | 93 | # Directories potentially created on remote AFP share 94 | .AppleDB 95 | .AppleDesktop 96 | Network Trash Folder 97 | Temporary Items 98 | .apdisk 99 | ### JetBrains template 100 | # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm 101 | # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 102 | 103 | # User-specific stuff: 104 | .idea/**/workspace.xml 105 | .idea/**/tasks.xml 106 | .idea/dictionaries 107 | 108 | # Sensitive or high-churn files: 109 | .idea/**/dataSources/ 110 | .idea/**/dataSources.ids 111 | .idea/**/dataSources.xml 112 | .idea/**/dataSources.local.xml 113 | .idea/**/sqlDataSources.xml 114 | .idea/**/dynamic.xml 115 | .idea/**/uiDesigner.xml 116 | 117 | # Gradle: 118 | .idea/**/gradle.xml 119 | .idea/**/libraries 120 | 121 | # CMake 122 | cmake-build-debug/ 123 | 124 | # Mongo Explorer plugin: 125 | .idea/**/mongoSettings.xml 126 | 127 | ## File-based project format: 128 | *.iws 129 | 130 | ## Plugin-specific files: 131 | 132 | # IntelliJ 133 | out/ 134 | 135 | # mpeltonen/sbt-idea plugin 136 | .idea_modules/ 137 | 138 | # JIRA plugin 139 | atlassian-ide-plugin.xml 140 | 141 | # Cursive Clojure plugin 142 | .idea/replstate.xml 143 | 144 | # Crashlytics plugin (for Android Studio and IntelliJ) 145 | com_crashlytics_export_strings.xml 146 | crashlytics.properties 147 | crashlytics-build.properties 148 | fabric.properties 149 | 150 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | node_modules -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 该项目为快应用练手项目,基于豆瓣api v2。 2 | > 说明:按照官方文档所说推荐使用node v6.11.3这个版本,而我本地使用的是8以上的版本。所以就使用了nvm来管理node的版本,切换非常方便,关于nvm请自行google。 3 | 4 | 5 | 6 | **关于本项目介绍可以查看我的文章,**[传送门](https://juejin.im/post/5aced721f265da237e0a1a32) 7 | 8 | 9 | 10 | ~~~ 11 | ## 克隆项目 12 | git clone git@github.com:keenjaan/quick-app-douban.git 13 | 14 | ## 安装依赖 15 | npm install 16 | 17 | ## 运行项目 18 | npm run watch 19 | 20 | ## 运行本地服务,手机远程调试 21 | npm run server -- --port 1234 22 | ~~~ 23 | 24 | **注意:** 25 | 26 | 如果开发者在后续操作中遇到报错`Cannot find module '.../node_modules/hap-tools/webpack.config.js'`,请运行一次`hap update --force`(执行完毕后**不需要**按照提示再次运行`npm install`) 27 | 28 | 上面是官方文档上的提示,clone我项目本地运行时可能遇到这个问题。 29 | 30 | 31 | 32 | #### 预览图: 33 | 34 | ![页面展示](shotscreen/5.gif) ![页面展示](shotscreen/6.gif) ![页面展示](shotscreen/7.gif) ![页面展示](shotscreen/8.gif) ![换肤](shotscreen/1.gif) 35 | 36 | #### 项目目录结构 37 | 38 | ~~~bash 39 | ├─ .babelrc 40 | ├─ .eslintrc.json 41 | ├─ .gitignore 42 | ├─ .npmignore 43 | ├─ package.json 44 | ├─ README.md 45 | │ 46 | ├─sign 47 | | 48 | │ 49 | ├─src 页面文件 50 | │ │ assets 图片文件夹 51 | │ │ Common 公共文件夹 52 | | | app.ux 入口文件 53 | │ │ manifest.json 配置文件 54 | │ | util.js 公用函数库 55 | │ │ 56 | │ │ 57 | │ ├─module 58 | │ │ ├─es6.js 对async、await等支持 59 | │ │ │ 60 | │ │ ├─network.js 对网络请求模块封装 61 | │ │ 62 | │ ├─About 关于页面 63 | │ │ ├─index.ux 64 | │ │ 65 | │ ├─HomePage 主页 66 | │ │ ├─index.ux 67 | │ │ 68 | | ├─Theme 主题页 69 | │ │ ├─index.ux 70 | | | 71 | | ├─Movie 电影详情页 72 | │ │ ├─index.ux 73 | | | 74 | | ├─Book 图书详情页 75 | │ │ ├─index.ux 76 | | | 77 | | ├─Music 音乐详情页 78 | │ │ ├─index.ux 79 | | | 80 | | ├─Home 主页 81 | │ │ ├─index.ux 82 | | | | 83 | | | ├─list 列表组件 84 | | | | ├─index.ux 85 | | | | 86 | | | ├─movie 电影tabs组件 87 | | | | ├─index.ux 88 | | | | 89 | | | ├─book 图书tabs组件 90 | | | | ├─index.ux 91 | | | | 92 | | | ├─music 音乐tabs组件 93 | | | | ├─index.ux 94 | | | | 95 | | ├─components 组件 96 | | | | 97 | | | ├─cover 封面组件 98 | | | | ├─index.ux 99 | | | | 100 | | | ├─header 头部组件 101 | | | | ├─index.ux 102 | | | | 103 | | | ├─rating 评分组件 104 | | | | ├─index.ux 105 | ~~~ 106 | 107 | -------------------------------------------------------------------------------- /dist/com.application.demo.rpk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keenjaan/quick-app-douban/d32507deb2eba4eee4f056cf0f43baf27e802d10/dist/com.application.demo.rpk -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "quick-app", 3 | "version": "1.0.0", 4 | "subversion": { 5 | "toolkit": "0.0.26", 6 | "packager": "0.0.5" 7 | }, 8 | "description": "", 9 | "scripts": { 10 | "build": "cross-env NODE_PLATFORM=na NODE_PHASE=dv webpack --config ./node_modules/hap-tools/webpack.config.js", 11 | "release": "cross-env NODE_PLATFORM=na NODE_PHASE=ol webpack --config ./node_modules/hap-tools/webpack.config.js", 12 | "clear": "rm -rf build/* && rm -rf dist/*", 13 | "server": "cross-env NODE_MOUNTED_ROUTER=\"debug bundle\" node ./node_modules/hap-tools/debugger/server/index.js", 14 | "debug": "npm run server -- --debug-only --port=8081", 15 | "notify": "node ./node_modules/hap-tools/debugger/command/notify.js", 16 | "watch": "cross-env NODE_PLATFORM=na NODE_PHASE=dv webpack --config ./node_modules/hap-tools/webpack.config.js --watch", 17 | "watch:na": "npm run na:dv -- --watch", 18 | "na": "npm run na:dv -- --watch", 19 | "lint": "./node_modules/.bin/eslint src/", 20 | "na:dv": "cross-env NODE_PLATFORM=na NODE_PHASE=dv webpack --config ./node_modules/hap-tools/webpack.config.js", 21 | "na:qa": "cross-env NODE_PLATFORM=na NODE_PHASE=qa webpack --config ./node_modules/hap-tools/webpack.config.js", 22 | "na:ol": "cross-env NODE_PLATFORM=na NODE_PHASE=ol webpack --config ./node_modules/hap-tools/webpack.config.js", 23 | "postinstall": "npm run postinstall:koaStatic && npm run postinstall:koaSend", 24 | "postinstall:koaStatic": "babel -d ./node_modules/koa-static ./node_modules/koa-static", 25 | "postinstall:koaSend": "babel -d ./node_modules/koa-send ./node_modules/koa-send" 26 | }, 27 | "dependencies": { 28 | "archiver": "^1.3.0", 29 | "babel-polyfill": "^6.26.0", 30 | "babel-preset-env": "^1.6.0", 31 | "babel-plugin-transform-runtime": "^6.9.0", 32 | "babel-runtime": "^6.9.2", 33 | "babel-template": "^6.24.1", 34 | "babel-traverse": "^6.24.1", 35 | "babel-types": "^6.24.1", 36 | "babylon": "^6.17.0", 37 | "babylon-jsx": "^1.0.0", 38 | "browserify": "^13.1.1", 39 | "chalk": "^1.1.3", 40 | "css": "~2.2.1", 41 | "escodegen": "~1.7.1", 42 | "esprima": "~2.7.0", 43 | "fs-extra": "^3.0.1", 44 | "fsmonitor": "^0.2.4", 45 | "hash-sum": "^1.0.2", 46 | "loader-utils": "~0.2.14", 47 | "md5": "^2.1.0", 48 | "parse5": "^3.0.0", 49 | "prompt": "^1.0.0", 50 | "qr-image": "^3.2.0", 51 | "resolve-bin": "^0.4.0", 52 | "serve": "^3.4.0", 53 | "source-map": "^0.5.6", 54 | "xtoolkit": "^0.1.7", 55 | "yargs": "^6.6.0", 56 | "jsrsasign": "^7.1.2", 57 | "jsrsasign-util": "^1.0.0", 58 | "qrcode-terminal": "^0.11.0", 59 | "socket.io": "^2.0.3", 60 | "tar": "^3.1.5" 61 | }, 62 | "devDependencies": { 63 | "babel-cli": "^6.10.1", 64 | "babel-core": "^6.10.4", 65 | "babel-eslint": "^8.2.1", 66 | "babel-loader": "^6.2.4", 67 | "babel-plugin-syntax-jsx": "^6.18.0", 68 | "babel-polyfill": "^6.23.0", 69 | "hybrid-chai": "~0.0.1", 70 | "cross-env": "^3.2.4", 71 | "eslint": "^4.3.0", 72 | "eslint-plugin-hybrid": "~0.0.1", 73 | "file-loader": "^0.9.0", 74 | "html-webpack-plugin": "^2.28.0", 75 | "js-base64": "^2.1.9", 76 | "hybrid-mocha": "~0.0.1", 77 | "sinon": "^1.17.3", 78 | "sinon-chai": "^2.8.0", 79 | "url-loader": "^0.5.7", 80 | "webpack": "~1.13.0", 81 | "webpack-dev-server": "^1.16.5", 82 | "webdriverio": "^4.8.0", 83 | "css-what": "^2.1.0", 84 | "koa": "^2.3.0", 85 | "koa-send": "^4.1.1", 86 | "koa-static": "^4.0.1", 87 | "koa-body": "^2.5.0", 88 | "koa-router": "^7.2.1" 89 | } 90 | } 91 | -------------------------------------------------------------------------------- /shotscreen/1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keenjaan/quick-app-douban/d32507deb2eba4eee4f056cf0f43baf27e802d10/shotscreen/1.gif -------------------------------------------------------------------------------- /shotscreen/5.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keenjaan/quick-app-douban/d32507deb2eba4eee4f056cf0f43baf27e802d10/shotscreen/5.gif -------------------------------------------------------------------------------- /shotscreen/6.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keenjaan/quick-app-douban/d32507deb2eba4eee4f056cf0f43baf27e802d10/shotscreen/6.gif -------------------------------------------------------------------------------- /shotscreen/7.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keenjaan/quick-app-douban/d32507deb2eba4eee4f056cf0f43baf27e802d10/shotscreen/7.gif -------------------------------------------------------------------------------- /shotscreen/8.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keenjaan/quick-app-douban/d32507deb2eba4eee4f056cf0f43baf27e802d10/shotscreen/8.gif -------------------------------------------------------------------------------- /sign/debug/certificate.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIDMTCCAhmgAwIBAgIJAMKpjyszxkDpMA0GCSqGSIb3DQEBCwUAMC4xCzAJBgNV 3 | BAYTAkNOMQwwCgYDVQQKDANSUEsxETAPBgNVBAMMCFJQS0RlYnVnMCAXDTE3MDQx 4 | OTAyMzE0OVoYDzIxMTYwMzI2MDIzMTQ5WjAuMQswCQYDVQQGEwJDTjEMMAoGA1UE 5 | CgwDUlBLMREwDwYDVQQDDAhSUEtEZWJ1ZzCCASIwDQYJKoZIhvcNAQEBBQADggEP 6 | ADCCAQoCggEBAK3kPd9jzvTctTIA3XNZVv9cHHDbAc6nTBfdZp9mtPOTkXFpvyCb 7 | kL0QjOog0+1pv8D7dFeP4ptWXU5CT3ImvaPR+16dAtMRcsxEr5q4zieJzx3O6huL 8 | UBa1k+xrzjXpRzkcOysmc8fTxt0tAwbDgJ2AA5TlXLTcVyb7GmJ+hl5CjnhoG5NN 9 | LrkqI7S29c1U3uokj8Q7hzaj0TURu/uB5ZIMCLZY9KFDugqaEcvmUyJiD0fuV6sA 10 | O/4kpiZUOnhV8/xWpRbMI4WFQsfgLOCV+X9uzUa29D677y//46t/EDSuQTHyBZbl 11 | AcNMENkpMWZsH7J/+F19+U0/Hd5bJgneVRkCAwEAAaNQME4wHQYDVR0OBBYEFKDN 12 | SZtt47ttOBDQzIchFYyxsg3mMB8GA1UdIwQYMBaAFKDNSZtt47ttOBDQzIchFYyx 13 | sg3mMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBABaZctNrn4gLmNf/ 14 | eNJ3x5CJIPjPwm6j9nwKhtadJ6BF+TIzSkJuHSgxULjW436F37otv94NPzT5PCBF 15 | WxgXoqgLqnWwvsaqC4LUEjsZviWW4CB824YDUquEUVGFLE/U5KTZ7Kh1ceyUk4N8 16 | +mtkXkanWoBBk0OF24lNrAsNLB63yTLr9HxEe75+kmvxf1qVJUGtaOEWIhiFMiAB 17 | 5D4w/j2EFWktumjuy5TTwU0zhl52bc8V9SNixM1IaqzNrVPrdjv8viUX548pU3WT 18 | xZ5ylDsxhMC1q4BXQVeIY8C0cMEX+WHOmOCvWrkxCkP91pKsSPkuVrWlzrkn8Ojo 19 | swP6sBw= 20 | -----END CERTIFICATE----- 21 | -------------------------------------------------------------------------------- /sign/debug/private.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQCt5D3fY8703LUy 3 | AN1zWVb/XBxw2wHOp0wX3WafZrTzk5Fxab8gm5C9EIzqINPtab/A+3RXj+KbVl1O 4 | Qk9yJr2j0ftenQLTEXLMRK+auM4nic8dzuobi1AWtZPsa8416Uc5HDsrJnPH08bd 5 | LQMGw4CdgAOU5Vy03Fcm+xpifoZeQo54aBuTTS65KiO0tvXNVN7qJI/EO4c2o9E1 6 | Ebv7geWSDAi2WPShQ7oKmhHL5lMiYg9H7lerADv+JKYmVDp4VfP8VqUWzCOFhULH 7 | 4Czglfl/bs1GtvQ+u+8v/+OrfxA0rkEx8gWW5QHDTBDZKTFmbB+yf/hdfflNPx3e 8 | WyYJ3lUZAgMBAAECggEBAJTnCBBdUB+fSs1prjeS/gsmnfgJoY+K9H7PCIxgj3yw 9 | FXAvZAmRDKzJGlF2EOOQlTG0YNiGDj6EAtv7rjoKcINyULSg8IU6wLmn61MrAuUa 10 | fa+Bujgh4E/B5swhOHAztNhzkzsM70Hi17wXSislh+HWd7qteOgqcbqgdOR4gaj+ 11 | HUqtcxG3H3hCL3dWugnjLZMtestLKGHSSZvbQNjYM3kKy2LvO8NpxmDE4a+TXygK 12 | qhaZjmS/dc/nJBJzOfkzby58RvGbzlJflfW/Uu3/gizj13GFQKWonq1xh630RAhv 13 | xX5ySok2aAx/+/SiJSpNXvM09grQuoORSr7D1tm+5rECgYEA3vf0hRfua0XAOu6f 14 | pyzNvLRRJ/pEew7XpNPCyS2TuMTd1yvXjGVxQfP46N6x1IM3SRU0zE+LSk80EF7l 15 | u1Or7GyCEhabYNe/7P2F8ENP73Do0HwvcI1jGrgr6r9oK0J27Xei+f6Q0bgJOPI2 16 | qaLj+V37cOjkNSM1mhTjtDwK8k0CgYEAx6cMrkjHl1+lDIIOc3qAEL3jb3xQveYk 17 | WrMF/B+j048k6boU4VvFJAIyQxOxMNxLjw3/9+zXCFJT4WaZK3TMXlg614ASGx3H 18 | tKjJM9O07ywwMq1gbutFS4nHCg3L3Os6esL0SPwMdATR3Yh22n5OGI9o+/aURulL 19 | GPEXef1Z2/0CgYEAgmwp5LxV4vu+8Pnp+4DSq4ISQr861XyeGTUhKEp3sUm+tgFY 20 | KTChakHKpHS3Mqa6bQ5xft08je/8dWL9IHFWDIqAHxKIOsKY6oh1k0/cbyPtmx45 21 | Ja4efV+jmMHzrfJH3KnxdCg7D+GFy4CrBtlYXuJhlO81pft9fC6h7yh8ArUCgYBq 22 | gvkl5Zftbs4rnRq+iqTVyagTKvwcQzIz3PwdZHfO/rfPpUFMdNv4eN99n3zRN0Vs 23 | HSjoiEazntA3GLgwUdBRqLpDi4SdSMbo337vkksdqbJQ5uPiaMuAIBG6kF+pDSkW 24 | ovkWErlGD+gySoI10FozihaVDRhPuFgjB0PiBcIxtQKBgGNSzX+Bx5+ux1Qny0Sn 25 | SUcBtepLnO8M8wafoGNyehbMnLzfuMbaDiJOdozGlBNHZTtPB3r4AYb8WnltdKW0 26 | 7i3fk26YZGiMVeUJvewA6/LOBEaqMdwoNwnoptvbR6ehHeE/PPtRtge2cD3bPIM7 27 | U9VlWgfgj9Dxfwhslqb9hmyp 28 | -----END PRIVATE KEY----- 29 | -------------------------------------------------------------------------------- /src/About/index.ux: -------------------------------------------------------------------------------- 1 | 2 | 48 | 49 | 79 | 80 | 91 | 92 | -------------------------------------------------------------------------------- /src/Book/index.ux: -------------------------------------------------------------------------------- 1 | 2 | 3 | 53 | 54 | 143 | 144 | 169 | 170 | -------------------------------------------------------------------------------- /src/Common/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keenjaan/quick-app-douban/d32507deb2eba4eee4f056cf0f43baf27e802d10/src/Common/logo.png -------------------------------------------------------------------------------- /src/Home/book/index.ux: -------------------------------------------------------------------------------- 1 | 2 | 3 | 22 | 23 | 51 | 52 | 92 | -------------------------------------------------------------------------------- /src/Home/index.ux: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 50 | 51 | 239 | 240 | 419 | 420 | -------------------------------------------------------------------------------- /src/Home/list/index.ux: -------------------------------------------------------------------------------- 1 | 2 | 3 | 25 | 26 | 50 | 51 | 182 | -------------------------------------------------------------------------------- /src/Home/movie/index.ux: -------------------------------------------------------------------------------- 1 | 2 | 3 | 22 | 23 | 51 | 52 | 92 | -------------------------------------------------------------------------------- /src/Home/music/index.ux: -------------------------------------------------------------------------------- 1 | 2 | 3 | 22 | 23 | 51 | 52 | 92 | -------------------------------------------------------------------------------- /src/HomePage/index.ux: -------------------------------------------------------------------------------- 1 | 2 | 37 | 38 | 73 | 74 | 82 | 83 | -------------------------------------------------------------------------------- /src/Movie/index.ux: -------------------------------------------------------------------------------- 1 | 2 | 3 | 50 | 51 | 159 | 160 | 187 | 188 | -------------------------------------------------------------------------------- /src/Music/index.ux: -------------------------------------------------------------------------------- 1 | 2 | 3 | 43 | 44 | 141 | 142 | 168 | 169 | -------------------------------------------------------------------------------- /src/Theme/index.ux: -------------------------------------------------------------------------------- 1 | 2 | 12 | 13 | 31 | 32 | 65 | -------------------------------------------------------------------------------- /src/app.ux: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/about-blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keenjaan/quick-app-douban/d32507deb2eba4eee4f056cf0f43baf27e802d10/src/assets/about-blue.png -------------------------------------------------------------------------------- /src/assets/about-green.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keenjaan/quick-app-douban/d32507deb2eba4eee4f056cf0f43baf27e802d10/src/assets/about-green.png -------------------------------------------------------------------------------- /src/assets/about-pink.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keenjaan/quick-app-douban/d32507deb2eba4eee4f056cf0f43baf27e802d10/src/assets/about-pink.png -------------------------------------------------------------------------------- /src/assets/back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keenjaan/quick-app-douban/d32507deb2eba4eee4f056cf0f43baf27e802d10/src/assets/back.png -------------------------------------------------------------------------------- /src/assets/bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keenjaan/quick-app-douban/d32507deb2eba4eee4f056cf0f43baf27e802d10/src/assets/bg.png -------------------------------------------------------------------------------- /src/assets/book-blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keenjaan/quick-app-douban/d32507deb2eba4eee4f056cf0f43baf27e802d10/src/assets/book-blue.png -------------------------------------------------------------------------------- /src/assets/book-green.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keenjaan/quick-app-douban/d32507deb2eba4eee4f056cf0f43baf27e802d10/src/assets/book-green.png -------------------------------------------------------------------------------- /src/assets/book-pink.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keenjaan/quick-app-douban/d32507deb2eba4eee4f056cf0f43baf27e802d10/src/assets/book-pink.png -------------------------------------------------------------------------------- /src/assets/book.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keenjaan/quick-app-douban/d32507deb2eba4eee4f056cf0f43baf27e802d10/src/assets/book.png -------------------------------------------------------------------------------- /src/assets/film-blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keenjaan/quick-app-douban/d32507deb2eba4eee4f056cf0f43baf27e802d10/src/assets/film-blue.png -------------------------------------------------------------------------------- /src/assets/film-green.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keenjaan/quick-app-douban/d32507deb2eba4eee4f056cf0f43baf27e802d10/src/assets/film-green.png -------------------------------------------------------------------------------- /src/assets/film-pink.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keenjaan/quick-app-douban/d32507deb2eba4eee4f056cf0f43baf27e802d10/src/assets/film-pink.png -------------------------------------------------------------------------------- /src/assets/film.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keenjaan/quick-app-douban/d32507deb2eba4eee4f056cf0f43baf27e802d10/src/assets/film.png -------------------------------------------------------------------------------- /src/assets/github.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keenjaan/quick-app-douban/d32507deb2eba4eee4f056cf0f43baf27e802d10/src/assets/github.png -------------------------------------------------------------------------------- /src/assets/home-blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keenjaan/quick-app-douban/d32507deb2eba4eee4f056cf0f43baf27e802d10/src/assets/home-blue.png -------------------------------------------------------------------------------- /src/assets/home-green.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keenjaan/quick-app-douban/d32507deb2eba4eee4f056cf0f43baf27e802d10/src/assets/home-green.png -------------------------------------------------------------------------------- /src/assets/home-pink.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keenjaan/quick-app-douban/d32507deb2eba4eee4f056cf0f43baf27e802d10/src/assets/home-pink.png -------------------------------------------------------------------------------- /src/assets/menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keenjaan/quick-app-douban/d32507deb2eba4eee4f056cf0f43baf27e802d10/src/assets/menu.png -------------------------------------------------------------------------------- /src/assets/music-blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keenjaan/quick-app-douban/d32507deb2eba4eee4f056cf0f43baf27e802d10/src/assets/music-blue.png -------------------------------------------------------------------------------- /src/assets/music-green.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keenjaan/quick-app-douban/d32507deb2eba4eee4f056cf0f43baf27e802d10/src/assets/music-green.png -------------------------------------------------------------------------------- /src/assets/music-pink.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keenjaan/quick-app-douban/d32507deb2eba4eee4f056cf0f43baf27e802d10/src/assets/music-pink.png -------------------------------------------------------------------------------- /src/assets/music.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keenjaan/quick-app-douban/d32507deb2eba4eee4f056cf0f43baf27e802d10/src/assets/music.png -------------------------------------------------------------------------------- /src/assets/search.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keenjaan/quick-app-douban/d32507deb2eba4eee4f056cf0f43baf27e802d10/src/assets/search.png -------------------------------------------------------------------------------- /src/assets/setting-blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keenjaan/quick-app-douban/d32507deb2eba4eee4f056cf0f43baf27e802d10/src/assets/setting-blue.png -------------------------------------------------------------------------------- /src/assets/setting-green.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keenjaan/quick-app-douban/d32507deb2eba4eee4f056cf0f43baf27e802d10/src/assets/setting-green.png -------------------------------------------------------------------------------- /src/assets/setting-pink.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keenjaan/quick-app-douban/d32507deb2eba4eee4f056cf0f43baf27e802d10/src/assets/setting-pink.png -------------------------------------------------------------------------------- /src/assets/suggest-blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keenjaan/quick-app-douban/d32507deb2eba4eee4f056cf0f43baf27e802d10/src/assets/suggest-blue.png -------------------------------------------------------------------------------- /src/assets/suggest-green.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keenjaan/quick-app-douban/d32507deb2eba4eee4f056cf0f43baf27e802d10/src/assets/suggest-green.png -------------------------------------------------------------------------------- /src/assets/suggest-pink.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keenjaan/quick-app-douban/d32507deb2eba4eee4f056cf0f43baf27e802d10/src/assets/suggest-pink.png -------------------------------------------------------------------------------- /src/assets/theme-blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keenjaan/quick-app-douban/d32507deb2eba4eee4f056cf0f43baf27e802d10/src/assets/theme-blue.png -------------------------------------------------------------------------------- /src/assets/theme-green.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keenjaan/quick-app-douban/d32507deb2eba4eee4f056cf0f43baf27e802d10/src/assets/theme-green.png -------------------------------------------------------------------------------- /src/assets/theme-pink.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keenjaan/quick-app-douban/d32507deb2eba4eee4f056cf0f43baf27e802d10/src/assets/theme-pink.png -------------------------------------------------------------------------------- /src/components/cover/index.ux: -------------------------------------------------------------------------------- 1 | 2 | 15 | 16 | 39 | 40 | -------------------------------------------------------------------------------- /src/components/header/index.ux: -------------------------------------------------------------------------------- 1 | 7 | 8 | 27 | 28 | -------------------------------------------------------------------------------- /src/components/rating/index.ux: -------------------------------------------------------------------------------- 1 | 17 | 18 | 36 | 37 | -------------------------------------------------------------------------------- /src/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "package": "com.application.demo", 3 | "name": "quick-app", 4 | "versionName": "1.0.0", 5 | "versionCode": "1", 6 | "minPlatformVersion": "101", 7 | "icon": "/Common/logo.png", 8 | "features": [ 9 | { "name": "system.prompt" }, 10 | { "name": "system.router" }, 11 | { "name": "system.shortcut" }, 12 | { "name": "system.fetch"}, 13 | { "name": "system.webview"} 14 | ], 15 | "permissions": [ 16 | { "origin": "*" } 17 | ], 18 | "config": { 19 | "logLevel": "debug" 20 | }, 21 | "router": { 22 | "entry": "Home", 23 | "pages": { 24 | "Home": { 25 | "component": "index" 26 | }, 27 | "Music": { 28 | "component": "index" 29 | }, 30 | "Book": { 31 | "component": "index" 32 | }, 33 | "Movie": { 34 | "component": "index" 35 | }, 36 | "Theme": { 37 | "component": "index" 38 | }, 39 | "HomePage": { 40 | "component": "index" 41 | }, 42 | "About": { 43 | "component": "index" 44 | } 45 | } 46 | }, 47 | "display": { 48 | "fullScreen": true, 49 | "titleBar": false, 50 | "titleBarBackgroundColor": "#ffffff", 51 | "titleBarTextColor": "#414141", 52 | "menu": false, 53 | "pages": { 54 | "Home": { 55 | "titleBar": false 56 | }, 57 | "About": { 58 | "titleBarText": "项目说明", 59 | "titleBar": false 60 | }, 61 | "Theme": { 62 | "titleBarText": "换肤", 63 | "titleBar": false, 64 | "fullScreen": true 65 | }, 66 | "HomePage": { 67 | "titleBarText": "主页", 68 | "titleBar": false 69 | } 70 | } 71 | } 72 | } -------------------------------------------------------------------------------- /src/module/es6.js: -------------------------------------------------------------------------------- 1 | const globalRef = global.__proto__ || global 2 | // global注入regeneratorRuntime 3 | globalRef.regeneratorRuntime = require('babel-runtime/regenerator') -------------------------------------------------------------------------------- /src/module/network.js: -------------------------------------------------------------------------------- 1 | import nativeFetch from '@system.fetch' 2 | import prompt from '@system.prompt' 3 | 4 | // 服务器地址 5 | const SERVER_URL = 'https://api.douban.com'; 6 | // const SERVER_URL = 'https://cnodejs.org/api'; 7 | // const SERVER_URL = ''; 8 | 9 | 10 | const network = { 11 | /** 12 | * 网络请求 13 | * @param options 14 | * @return {Promise} 15 | */ 16 | async fetch (obj) { 17 | console.log('开始网络请求'); 18 | const url = SERVER_URL + obj.url; 19 | let options = Object.assign(obj, {url}) 20 | const p1 = new Promise((resolve, reject) => { 21 | 22 | options.success = function ({data, code}) { 23 | console.log(JSON.stringify(data), 7777); 24 | // 根据后端接口返回来定制。 25 | // 根据code 来进行拦截 26 | if (code == 404) { 27 | prompt.showToast({ 28 | message:'找不到页面' 29 | }) 30 | } 31 | resolve( data ) 32 | } 33 | options.fail = function (data) { 34 | console.log(data, 'fail'); 35 | // fail 会返回一个错误的字符串说明 36 | prompt.showToast({ 37 | message: data 38 | }) 39 | resolve( null ) 40 | } 41 | // console.log(JSON.stringify(options), 888); 42 | nativeFetch.fetch(options) 43 | }) 44 | return p1 45 | }, 46 | get (url, data) { 47 | return this.fetch({url, data}); 48 | // console.log(JSON.stringify(d), 9999); 49 | }, 50 | post (url, data) { 51 | return this.fetch({url, data, method: 'post'}) 52 | } 53 | } 54 | 55 | // 注入到全局 56 | const hookTo = global.__proto__ || global 57 | hookTo.network = network 58 | // export { 59 | // network 60 | // } -------------------------------------------------------------------------------- /src/util.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 显示菜单 3 | */ 4 | function showMenu () { 5 | var prompt = require('@system.prompt'); 6 | var router = require('@system.router'); 7 | var appInfo = require('@system.app').getInfo() 8 | prompt.showContextMenu({ 9 | itemList: ['保存桌面', '关于', '取消'], 10 | success: function (ret) { 11 | switch (ret.index) { 12 | case 0: 13 | // 保存桌面 14 | createShortcut(); 15 | break; 16 | case 1: 17 | // 关于 18 | router.push({ 19 | uri: '/About', 20 | params: { name: appInfo.name, icon: appInfo.icon } 21 | }) 22 | break; 23 | case 2: 24 | // 取消 25 | break; 26 | default: 27 | prompt.showToast({ message: 'error' }) 28 | } 29 | } 30 | }) 31 | } 32 | 33 | /** 34 | * 创建桌面图标 35 | * 注意:使用加载器测试`创建桌面快捷方式`功能时,请先在`系统设置`中打开`应用加载器`的`桌面快捷方式`权限 36 | */ 37 | function createShortcut () { 38 | var prompt = require('@system.prompt'); 39 | var shortcut = require('@system.shortcut'); 40 | shortcut.hasInstalled({ 41 | success: function (ret) { 42 | if (ret) { 43 | prompt.showToast({ message: '已创建桌面图标' }) 44 | } else { 45 | shortcut.install({ 46 | success: function () { 47 | prompt.showToast({ message: '成功创建桌面图标' }) 48 | }, 49 | fail: function (errmsg, errcode) { 50 | prompt.showToast({ message: 'error: ' + errcode + '---' + errmsg }) 51 | } 52 | }) 53 | } 54 | } 55 | }) 56 | } 57 | 58 | export default { 59 | showMenu, 60 | createShortcut 61 | } 62 | --------------------------------------------------------------------------------