6 |
7 |
8 |
1、
9 |
10 | 本项目为熟悉快应用练手项目,仅供大家参考!
11 |
12 |
13 |
14 |
2、
15 |
16 | 本项目的所有数据来源为豆瓣api接口,一切解释权归豆瓣所有。
17 |
18 |
19 |
20 |
3、
21 |
22 | 注意豆瓣api的接口有调用限制,每分钟10次,所以在体验时不要高频的调用接口,否则会被豆瓣封掉。为了减少请求次数,对于下拉刷新效果默认我将其注释了,看效果可以将注释去掉。
23 |
24 |
25 |
26 |
4、
27 |
28 | 关于本项目的问题欢迎来一起探讨!
29 |
30 |
31 |
32 |
5、
33 |
34 | 若转载请尊重劳动成果,注明来源。
35 |
36 |
37 |
38 |
6、
39 |
40 |
欢迎star。
41 |
传送门
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
79 |
80 |
91 |
92 |
--------------------------------------------------------------------------------
/src/Book/index.ux:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | {{detail.title}}
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 | 作者:{{detail.author && detail.author.join('/')}}
18 | 原名:{{detail.origin_title}}
19 | 译者:{{detail.translator}}
20 | 出版社:{{detail.publisher}}
21 | 出版时间:{{detail.pubdate}}
22 | {{detail.pages}}页 / {{detail.binding}} / {{detail.price}}
23 |
24 |
25 |
26 |
27 |
28 |
29 | 豆瓣购买
30 | {{detail.price}}
31 |
32 |
33 |
34 | 电子书
35 | {{detail.ebook_price ? detail.ebook_price+'元' : '暂无价格'}}
36 |
37 |
38 |
内容简介
39 |
{{detail.summary}}
40 |
作者简介
41 |
{{detail.author_intro}}
42 |
相关标签
43 |
44 |
45 |
46 | {{$item.name}}
47 |
48 |
49 |
50 |
51 |
52 |
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 |
4 |
5 |
6 |
7 |
8 |
9 |
{{$item.title}}
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
51 |
52 |
92 |
--------------------------------------------------------------------------------
/src/Home/index.ux:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
29 |
30 |
47 |
48 |
49 |
50 |
51 |
239 |
240 |
419 |
420 |
--------------------------------------------------------------------------------
/src/Home/list/index.ux:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 | 加载更多···
20 | 没有更多了~
21 |
22 |
23 |
24 |
25 |
26 |
50 |
51 |
182 |
--------------------------------------------------------------------------------
/src/Home/movie/index.ux:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
{{$item.title}}
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
51 |
52 |
92 |
--------------------------------------------------------------------------------
/src/Home/music/index.ux:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
{{$item.title}}
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
51 |
52 |
92 |
--------------------------------------------------------------------------------
/src/HomePage/index.ux:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
作者简介
7 |
8 |
9 |
10 |
1、
11 |
12 | 坐标深圳,前端小码农一个,网易云控,喜欢摄影(拿个破相机到处跑)和户外运动。喜欢和技术爱好者交朋友,一起探讨技术问题。
13 |
14 |
15 |
16 |
2、
17 |
18 | 重点说一下,本人十分热爱户外运动,登山、徒步、露营、等户外运动欢迎带上我,当然摄影老司机也可以带上我(不要嫌我拍照技术差)
19 |
20 |
21 |
22 |
3、
23 |
24 | 联系方式:keenjaan@163.com
25 |
26 |
27 |
28 |
4、
29 |
30 | 关于技术问题和户外运动欢迎来骚扰!
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
73 |
74 |
82 |
83 |
--------------------------------------------------------------------------------
/src/Movie/index.ux:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | {{detail.title}}
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 | {{detail.year}} {{detail.genres && detail.genres.join(' /')}}
18 | 原名:{{detail.original_title}}
19 | 制片国家:{{detail.countries && detail.countries.join('/')}}
20 | 别名:{{detail.aka && detail.aka.join('/')}}
21 |
22 |
23 |
24 |
25 |
剧情简介
26 |
{{detail.summary}}
27 |
影人信息
28 |
29 |
30 |
31 |
32 |
33 |
{{$item.name}}
34 |
导演
35 |
36 |
37 |
38 |
39 |
40 |
{{$item.name}}
41 |
演员
42 |
43 |
44 |
45 |
46 |
豆瓣看详情
47 |
48 |
49 |
50 |
51 |
159 |
160 |
187 |
188 |
--------------------------------------------------------------------------------
/src/Music/index.ux:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | {{detail.title}}
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 | 表演者:{{detail.attrs && detail.attrs.singer}}
18 | 唱片公司:{{detail.attrs && detail.attrs.publisher}}
19 | 发行时间:{{detail.attrs && detail.attrs.pubdate}}
20 |
21 |
22 |
23 |
24 |
25 |
唱片简介
26 |
{{detail.summary}}
27 |
曲目列表
28 |
29 | {{$item}}
30 |
31 |
相关标签
32 |
33 |
34 |
35 | {{$item.name}}
36 |
37 |
38 |
39 |
豆瓣看详情
40 |
41 |
42 |
43 |
44 |
141 |
142 |
168 |
169 |
--------------------------------------------------------------------------------
/src/Theme/index.ux:
--------------------------------------------------------------------------------
1 |
2 |
3 |
11 |
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 |
3 |
4 |
5 |
6 |
7 |
8 | {{mess.title.slice(0, 7)}}
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
39 |
40 |
--------------------------------------------------------------------------------
/src/components/header/index.ux:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
27 |
28 |
--------------------------------------------------------------------------------
/src/components/rating/index.ux:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 | {{rate}}
13 |
14 |
暂无评分
15 |
16 |
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 |
--------------------------------------------------------------------------------