├── src ├── store │ ├── actions.js │ ├── getters.js │ ├── index.js │ ├── mutation-types.js │ └── modules │ │ ├── music.js │ │ ├── home.js │ │ ├── movie.js │ │ └── reading.js ├── models │ ├── home.js │ ├── music.js │ ├── reading.js │ └── movie.js ├── utils │ ├── events.js │ └── bytype.js ├── app.js ├── mixins │ └── mixins.vue ├── routes.js ├── app.vue ├── api │ └── index.js ├── pages │ ├── musics.vue │ ├── movies.vue │ ├── details │ │ ├── serial.vue │ │ ├── movie.vue │ │ ├── essay.vue │ │ ├── music.vue │ │ └── question.vue │ ├── readings.vue │ └── home.vue └── app.css ├── unpackage ├── .dependencies ├── .confirmed_dependencies ├── release │ └── fm.apk └── res │ └── icons │ ├── 29x29.png │ ├── 40x40.png │ ├── 48x48.png │ ├── 50x50.png │ ├── 57x57.png │ ├── 58x58.png │ ├── 72x72.png │ ├── 76x76.png │ ├── 80x80.png │ ├── 87x87.png │ ├── 96x96.png │ ├── 100x100.png │ ├── 114x114.png │ ├── 120x120.png │ ├── 144x144.png │ ├── 152x152.png │ ├── 180x180.png │ ├── 192x192.png │ └── 256x256.png ├── i-f7-ios.png ├── media ├── home.png ├── movie.png ├── music.png ├── reading.png ├── movie-detail.png └── reading-detail.png ├── .babelrc ├── assets └── framework7-icons │ ├── fonts │ ├── Framework7Icons-Regular.eot │ ├── Framework7Icons-Regular.ttf │ ├── Framework7Icons-Regular.woff │ └── Framework7Icons-Regular.woff2 │ └── css │ └── framework7-icons.css ├── .gitignore ├── index.html ├── LICENSE ├── package.json ├── webpack.config.js ├── README.md └── manifest.json /src/store/actions.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/store/getters.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /unpackage/.dependencies: -------------------------------------------------------------------------------- 1 | null -------------------------------------------------------------------------------- /unpackage/.confirmed_dependencies: -------------------------------------------------------------------------------- 1 | null -------------------------------------------------------------------------------- /i-f7-ios.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gongph/one-vue/HEAD/i-f7-ios.png -------------------------------------------------------------------------------- /media/home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gongph/one-vue/HEAD/media/home.png -------------------------------------------------------------------------------- /media/movie.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gongph/one-vue/HEAD/media/movie.png -------------------------------------------------------------------------------- /media/music.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gongph/one-vue/HEAD/media/music.png -------------------------------------------------------------------------------- /media/reading.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gongph/one-vue/HEAD/media/reading.png -------------------------------------------------------------------------------- /media/movie-detail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gongph/one-vue/HEAD/media/movie-detail.png -------------------------------------------------------------------------------- /media/reading-detail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gongph/one-vue/HEAD/media/reading-detail.png -------------------------------------------------------------------------------- /unpackage/release/fm.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gongph/one-vue/HEAD/unpackage/release/fm.apk -------------------------------------------------------------------------------- /unpackage/res/icons/29x29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gongph/one-vue/HEAD/unpackage/res/icons/29x29.png -------------------------------------------------------------------------------- /unpackage/res/icons/40x40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gongph/one-vue/HEAD/unpackage/res/icons/40x40.png -------------------------------------------------------------------------------- /unpackage/res/icons/48x48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gongph/one-vue/HEAD/unpackage/res/icons/48x48.png -------------------------------------------------------------------------------- /unpackage/res/icons/50x50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gongph/one-vue/HEAD/unpackage/res/icons/50x50.png -------------------------------------------------------------------------------- /unpackage/res/icons/57x57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gongph/one-vue/HEAD/unpackage/res/icons/57x57.png -------------------------------------------------------------------------------- /unpackage/res/icons/58x58.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gongph/one-vue/HEAD/unpackage/res/icons/58x58.png -------------------------------------------------------------------------------- /unpackage/res/icons/72x72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gongph/one-vue/HEAD/unpackage/res/icons/72x72.png -------------------------------------------------------------------------------- /unpackage/res/icons/76x76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gongph/one-vue/HEAD/unpackage/res/icons/76x76.png -------------------------------------------------------------------------------- /unpackage/res/icons/80x80.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gongph/one-vue/HEAD/unpackage/res/icons/80x80.png -------------------------------------------------------------------------------- /unpackage/res/icons/87x87.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gongph/one-vue/HEAD/unpackage/res/icons/87x87.png -------------------------------------------------------------------------------- /unpackage/res/icons/96x96.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gongph/one-vue/HEAD/unpackage/res/icons/96x96.png -------------------------------------------------------------------------------- /unpackage/res/icons/100x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gongph/one-vue/HEAD/unpackage/res/icons/100x100.png -------------------------------------------------------------------------------- /unpackage/res/icons/114x114.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gongph/one-vue/HEAD/unpackage/res/icons/114x114.png -------------------------------------------------------------------------------- /unpackage/res/icons/120x120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gongph/one-vue/HEAD/unpackage/res/icons/120x120.png -------------------------------------------------------------------------------- /unpackage/res/icons/144x144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gongph/one-vue/HEAD/unpackage/res/icons/144x144.png -------------------------------------------------------------------------------- /unpackage/res/icons/152x152.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gongph/one-vue/HEAD/unpackage/res/icons/152x152.png -------------------------------------------------------------------------------- /unpackage/res/icons/180x180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gongph/one-vue/HEAD/unpackage/res/icons/180x180.png -------------------------------------------------------------------------------- /unpackage/res/icons/192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gongph/one-vue/HEAD/unpackage/res/icons/192x192.png -------------------------------------------------------------------------------- /unpackage/res/icons/256x256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gongph/one-vue/HEAD/unpackage/res/icons/256x256.png -------------------------------------------------------------------------------- /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | ["es2015", { "modules": false }] 4 | ], 5 | "plugins": ["transform-object-rest-spread"] 6 | } -------------------------------------------------------------------------------- /assets/framework7-icons/fonts/Framework7Icons-Regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gongph/one-vue/HEAD/assets/framework7-icons/fonts/Framework7Icons-Regular.eot -------------------------------------------------------------------------------- /assets/framework7-icons/fonts/Framework7Icons-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gongph/one-vue/HEAD/assets/framework7-icons/fonts/Framework7Icons-Regular.ttf -------------------------------------------------------------------------------- /assets/framework7-icons/fonts/Framework7Icons-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gongph/one-vue/HEAD/assets/framework7-icons/fonts/Framework7Icons-Regular.woff -------------------------------------------------------------------------------- /assets/framework7-icons/fonts/Framework7Icons-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gongph/one-vue/HEAD/assets/framework7-icons/fonts/Framework7Icons-Regular.woff2 -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | 6 | # Compiled binary addons (http://nodejs.org/api/addons.html) 7 | build/Release 8 | 9 | # Dependency directories 10 | node_modules/ 11 | 12 | .project 13 | .git 14 | .svn 15 | -------------------------------------------------------------------------------- /src/store/index.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue'; 2 | import Vuex from 'vuex'; 3 | 4 | import home from './modules/home.js'; 5 | import reading from './modules/reading.js'; 6 | import music from './modules/music.js'; 7 | import movie from './modules/movie.js'; 8 | 9 | Vue.use(Vuex); 10 | 11 | export default new Vuex.Store({ 12 | modules: { 13 | home, 14 | reading, 15 | music, 16 | movie 17 | }, 18 | //strict: true 19 | }); 20 | -------------------------------------------------------------------------------- /src/models/home.js: -------------------------------------------------------------------------------- 1 | import axios from 'axios'; 2 | import api from '../api'; 3 | 4 | // create axios instance 5 | const instance = axios.create({ 6 | baseURL: api.baseURL 7 | }); 8 | 9 | const reg = /\{(.+)\}/ig; 10 | 11 | export default { 12 | /** 13 | * 获取首页idlist 14 | */ 15 | getIdlist () { 16 | return instance.get(api.idlist); 17 | }, 18 | getHpById (id) { 19 | return instance.get(api.getHpById.replace(reg, id)); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/models/music.js: -------------------------------------------------------------------------------- 1 | import axios from 'axios'; 2 | import api from '../api'; 3 | 4 | const instance = axios.create({ 5 | baseURL: api.baseURL 6 | }); 7 | 8 | const reg = /\{(.+)\}/ig; 9 | 10 | export default { 11 | getToptenMusic () { 12 | return instance.get(api.getToptenMusic); 13 | }, 14 | getNextPageById (id) { 15 | return instance.get(api.getNextMusic.replace(reg, id)); 16 | }, 17 | getMusicById (id) { 18 | return instance.get(api.getMusicById.replace(reg, id)); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/utils/events.js: -------------------------------------------------------------------------------- 1 | import $ from 'jquery'; 2 | 3 | /** 4 | * 绑定事件 5 | * @param {String} selector 选择器 6 | * @param {String} eventName 事件名 7 | * @param {Function} callback 回调 8 | */ 9 | const bindEvent = function (selector, eventName, callback) { 10 | $(selector).on(eventName, callback); 11 | } 12 | 13 | export { bindEvent } 14 | 15 | /** 16 | * 解绑事件 17 | * @param {String} selector 选择器 18 | * @param {String} eventName 事件名 19 | */ 20 | const unBindEvent = function (selector, eventName) { 21 | $(selector).unbind(eventName); 22 | } 23 | 24 | export { unBindEvent } -------------------------------------------------------------------------------- /src/store/mutation-types.js: -------------------------------------------------------------------------------- 1 | export const RECEIVE_TOPTEN = 'RECEIVE_TOPTEN'; 2 | export const RECEIVE_IDLIST = 'RECEIVE_IDLIST'; 3 | 4 | export const RECEIVE_HP = 'RECEIVE_HP'; 5 | 6 | export const RECEIVE_ESSAY = 'RECEIVE_ESSAY'; 7 | export const RECEIVE_SERIAL = 'RECEIVE_SERIAL'; 8 | export const RECEIVE_QUESTION = 'RECEIVE_QUESTION'; 9 | 10 | export const RECEIVE_NEXTPAGE = 'RECEIVE_NEXTPAGE'; 11 | 12 | export const RECEIVE_MUSIC = 'RECEIVE_MUSIC'; 13 | export const RECEIVE_MOVIE = 'RECEIVE_MOVIE'; 14 | export const RECEIVE_MOVIE_PHOTOS = 'RECEIVE_MOVIE_PHOTOS'; 15 | 16 | export const WEATHER = 'WEATHER'; 17 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | [ONE · 一个] 8 | 9 | 14 | 15 | 16 |
17 | 18 | 19 | -------------------------------------------------------------------------------- /src/utils/bytype.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 根据 type 获取路由url 3 | * @param {String} type 文章类型 4 | */ 5 | 6 | const getRouterByType = function (type) { 7 | const map = { 8 | '1': '/reading/essay/', 9 | '2': '/reading/serial/', 10 | '3': '/reading/question/', 11 | '4': '/music/', 12 | '5': '/movie/' 13 | } 14 | return type ? map[type] : ''; 15 | } 16 | 17 | export { getRouterByType }; 18 | 19 | /** 20 | * 根据 type 获取分类 21 | * @param {String} type 文章类型 22 | */ 23 | 24 | const getCategoryByType = function (type) { 25 | const map = { 26 | '0': '插画', 27 | '1': 'ONE STORY', 28 | '2': '连载', 29 | '3': '问答', 30 | '4': '音乐', 31 | '5': '影视' 32 | } 33 | return type ? map[type] : ''; 34 | } 35 | 36 | export { getCategoryByType }; 37 | 38 | -------------------------------------------------------------------------------- /src/app.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue'; 2 | 3 | import Framework7 from 'framework7'; 4 | import Framework7Vue from 'framework7-vue'; 5 | 6 | import Framework7Theme from 'framework7/dist/css/framework7.ios.min.css'; 7 | import Framework7ThemeColors from 'framework7/dist/css/framework7.ios.colors.min.css'; 8 | 9 | import Routes from './routes.js'; 10 | 11 | import AppStyle from './app.css'; 12 | import App from './app.vue'; 13 | 14 | import store from './store'; 15 | 16 | Vue.use(Framework7Vue); 17 | new Vue({ 18 | el: '#app', 19 | store, 20 | render: (h) => h(App), 21 | // init f7 22 | framework7: { 23 | root: '#app', 24 | routes: Routes, 25 | animateNavBackIcon: true, // 开启动画导航 26 | swipeBackPage: false, // 禁止左右滑动返回上一页 27 | swipePanel: 'left' // 开启滑动打开侧边栏 28 | } 29 | }) -------------------------------------------------------------------------------- /src/models/reading.js: -------------------------------------------------------------------------------- 1 | import axios from 'axios'; 2 | import api from '../api'; 3 | 4 | // create axios instance 5 | const instance = axios.create({ 6 | baseURL: api.baseURL 7 | }); 8 | 9 | const reg = /\{(.+)\}/ig; 10 | 11 | export default { 12 | /** 13 | * 获取最新10条阅读 14 | */ 15 | getToptenReading () { 16 | return instance.get(api.getToptenReading); 17 | }, 18 | getNextPageById (id) { 19 | return instance.get(api.getNextReading.replace(reg, id)); 20 | }, 21 | getEssayById (id) { 22 | return instance.get(api.getEssayById.replace(reg, id)); 23 | }, 24 | getSerialById (id) { 25 | return instance.get(api.getSerialById.replace(reg, id)); 26 | }, 27 | getQuestionById (id) { 28 | return instance.get(api.getQuestionById.replace(reg, id)); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/mixins/mixins.vue: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/models/movie.js: -------------------------------------------------------------------------------- 1 | import axios from 'axios'; 2 | import $ from 'jquery'; 3 | import api from '../api'; 4 | 5 | const instance = axios.create({ 6 | baseURL: api.baseURL 7 | }); 8 | 9 | const reg = /\{(.+)\}/ig; 10 | 11 | export default { 12 | getToptenMovie () { 13 | return instance.get(api.getToptenMovie); 14 | }, 15 | getNextPageById (id) { 16 | return instance.get(api.getNextMovie.replace(reg, id)); 17 | }, 18 | getMovieById (id) { 19 | return instance.get(api.getMovieById.replace(reg, id)); 20 | }, 21 | getMoviePhotosById (id, cb) { 22 | $.ajax({ 23 | url: api.baseURL + api.getMoviePhotosById.replace(reg, id), 24 | async: false, 25 | type: 'GET', 26 | dataType: 'JSON', 27 | success: function (response) { 28 | cb(response.data); 29 | } 30 | }); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 Mr.gongph 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /assets/framework7-icons/css/framework7-icons.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: 'Framework7 Icons'; 3 | font-style: normal; 4 | font-weight: 400; 5 | src: url("../fonts/Framework7Icons-Regular.eot"); 6 | src: local('Framework7 Icons'), 7 | local('Framework7Icons-Regular'), 8 | url("../fonts/Framework7Icons-Regular.woff2") format("woff2"), 9 | url("../fonts/Framework7Icons-Regular.woff") format("woff"), 10 | url("../fonts/Framework7Icons-Regular.ttf") format("truetype"); 11 | } 12 | 13 | .f7-icons, .framework7-icons { 14 | font-family: 'Framework7 Icons'; 15 | font-weight: normal; 16 | font-style: normal; 17 | font-size: 25px; 18 | line-height: 1; 19 | letter-spacing: normal; 20 | text-transform: none; 21 | display: inline-block; 22 | white-space: nowrap; 23 | word-wrap: normal; 24 | direction: ltr; 25 | -webkit-font-smoothing: antialiased; 26 | text-rendering: optimizeLegibility; 27 | -moz-osx-font-smoothing: grayscale; 28 | -webkit-font-feature-settings: "liga"; 29 | -moz-font-feature-settings: "liga=1"; 30 | -moz-font-feature-settings: "liga"; 31 | font-feature-settings: "liga"; 32 | text-align: center; 33 | } -------------------------------------------------------------------------------- /src/routes.js: -------------------------------------------------------------------------------- 1 | import Home from './pages/home.vue'; 2 | import Reader from './pages/readings.vue'; 3 | import Music from './pages/musics.vue'; 4 | import Movie from './pages/movies.vue'; 5 | 6 | import EssayDetail from './pages/details/essay.vue'; 7 | import SerialDetail from './pages/details/serial.vue'; 8 | import QuestionDetail from './pages/details/question.vue'; 9 | import MusicDetail from './pages/details/music.vue'; 10 | import MovieDetail from './pages/details/movie.vue'; 11 | 12 | export default [ 13 | { 14 | path: '/home/', 15 | component: Home 16 | }, 17 | { 18 | path: '/reading/', 19 | component: Reader, 20 | }, 21 | { 22 | path: '/reading/essay/:id', 23 | component: EssayDetail 24 | }, 25 | { 26 | path: '/reading/serial/:id', 27 | component: SerialDetail 28 | }, 29 | { 30 | path: '/reading/question/:id', 31 | component: QuestionDetail 32 | }, 33 | { 34 | path: '/music/', 35 | component: Music 36 | }, 37 | { 38 | path: '/music/:id', 39 | component: MusicDetail 40 | }, 41 | { 42 | path: '/movie/', 43 | component: Movie 44 | }, 45 | { 46 | path: '/movie/:id', 47 | component: MovieDetail 48 | } 49 | ] -------------------------------------------------------------------------------- /src/app.vue: -------------------------------------------------------------------------------- 1 | 17 | 18 | -------------------------------------------------------------------------------- /src/api/index.js: -------------------------------------------------------------------------------- 1 | export default { 2 | // 根路径 3 | baseURL: 'http://v3.wufazhuce.com:8000', 4 | 5 | /** 6 | * 首页 7 | */ 8 | 9 | // 获取前十天的图文列表 10 | idlist: '/api/onelist/idlist', 11 | // 根据id获取某一天的图文列表 12 | getHpById: '/api/onelist/{id}/0', 13 | 14 | /** 15 | * 阅读 16 | */ 17 | 18 | // 获取最新10条阅读列表 19 | getToptenReading: '/api/channel/reading/more/0', 20 | // 上拉刷新获取下一页阅读列表 21 | getNextReading: '/api/channel/reading/more/{id}', 22 | 23 | // 短文 24 | // 根据id获取短文详情 25 | getEssayById: '/api/essay/{id}', 26 | 27 | // 连载 28 | // 根据id获取连载详情 29 | getSerialById: '/api/serialcontent/{id}', 30 | 31 | // 问答 32 | // 根据id获取问答详情 33 | getQuestionById: '/api/question/{id}', 34 | 35 | /** 36 | * 音乐 37 | */ 38 | 39 | // 获取最新10条音乐列表 40 | getToptenMusic: '/api/channel/music/more/0', 41 | // 上拉刷新获取下一页音乐列表 42 | getNextMusic: '/api/channel/music/more/{id}', 43 | // 根据 `item_id` 获取音乐详情信息 44 | getMusicById: '/api/music/detail/{id}', 45 | 46 | /** 47 | * 影视 48 | */ 49 | 50 | // 获取最新10条影视列表 51 | getToptenMovie: '/api/channel/movie/more/0', 52 | // 上拉刷新获取下一页影视列表 53 | getNextMovie: '/api/channel/movie/more/{id}', 54 | // 根据id获取影视详情信息 55 | getMovieById: '/api/movie/{id}/story/1/0', 56 | // 根据id获取头部滚动的五张图片和电影海报信息 57 | getMoviePhotosById: '/api/movie/detail/{id}' 58 | 59 | } 60 | -------------------------------------------------------------------------------- /src/store/modules/music.js: -------------------------------------------------------------------------------- 1 | import server from '../../models/music.js'; 2 | import * as types from '../mutation-types.js'; 3 | 4 | const state = { 5 | topten: [], 6 | article: {}, 7 | author: {}, // 音乐人 8 | storyAuthor: {}, // 文章作者 9 | } 10 | 11 | const getters = { 12 | topten: state => state.topten, 13 | article: state => state.article, 14 | author: state => state.author, 15 | storyAuthor: state => state.storyAuthor 16 | } 17 | 18 | const actions = { 19 | getTopTen ({ commit }) { 20 | server.getToptenMusic().then(response => { 21 | commit(types.RECEIVE_TOPTEN, response.data.data); 22 | }); 23 | }, 24 | getNextPageById ({ commit }, id) { 25 | server.getNextPageById(id).then(response => { 26 | commit(types.RECEIVE_NEXTPAGE, response.data.data); 27 | }); 28 | }, 29 | getMusicById ({ commit }, id) { 30 | server.getMusicById(id).then(response => { 31 | commit(types.RECEIVE_MUSIC, response.data.data); 32 | }); 33 | } 34 | } 35 | 36 | const mutations = { 37 | [types.RECEIVE_TOPTEN] (state, data) { 38 | state.topten.length = 0; 39 | state.topten = data; 40 | }, 41 | [types.RECEIVE_NEXTPAGE] (state, data) { 42 | state.topten = state.topten.concat(data); 43 | }, 44 | [types.RECEIVE_MUSIC] (state, data) { 45 | state.article = data; 46 | state.author = data.author; 47 | state.storyAuthor = data.story_author 48 | } 49 | } 50 | 51 | export default { 52 | namespaced: true, 53 | state, 54 | getters, 55 | actions, 56 | mutations 57 | } 58 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "one-vue", 3 | "version": "1.0.0", 4 | "description": "one app build with framework7 and vue2.0.x", 5 | "main": "index.js", 6 | "scripts": { 7 | "dev": "cross-env NODE_ENV=development webpack-dev-server --inline --hot", 8 | "build": "cross-env NODE_ENV=production webpack --progress --hide-modules" 9 | }, 10 | "keywords": [ 11 | "vue", 12 | "vuejs", 13 | "mobile", 14 | "framework", 15 | "framework7", 16 | "ios", 17 | "iphone", 18 | "ipad", 19 | "apple", 20 | "phonegap", 21 | "touch", 22 | "app", 23 | "f7", 24 | "material", 25 | "android" 26 | ], 27 | "author": "gongph", 28 | "repository": "git@github.com:gongph/one-vue.git", 29 | "license": "MIT", 30 | "dependencies": { 31 | "axios": "^0.16.2", 32 | "framework7": "^1.6.4", 33 | "framework7-icons": "^0.8.9", 34 | "framework7-vue": "^0.9.2", 35 | "jquery": "^3.2.1", 36 | "vue": "^2.3.4", 37 | "vuex": "^2.3.1" 38 | }, 39 | "devDependencies": { 40 | "babel-core": "^6.25.0", 41 | "babel-loader": "^7.1.0", 42 | "babel-plugin-transform-object-rest-spread": "^6.23.0", 43 | "babel-preset-es2015": "^6.24.1", 44 | "cross-env": "^5.0.1", 45 | "css-loader": "^0.28.4", 46 | "file-loader": "^0.11.2", 47 | "less": "^2.7.2", 48 | "less-loader": "^4.0.4", 49 | "style-loader": "^0.18.2", 50 | "url-loader": "^0.5.9", 51 | "vue-loader": "^12.2.1", 52 | "vue-template-compiler": "^2.3.4", 53 | "webpack": "^3.0.0", 54 | "webpack-dev-server": "^2.5.0" 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /src/store/modules/home.js: -------------------------------------------------------------------------------- 1 | import serve from '../../models/home.js'; 2 | import * as types from '../mutation-types.js'; 3 | 4 | const state = { 5 | idlist: [], // 前十天的图文 id 6 | nodes: [], // 首页文章列表 7 | hp: {}, // 最新的图文 8 | todaydate: '', // 今天的日期 9 | climate: '', // 副标题 10 | poster: {} , // 海报 11 | } 12 | 13 | const getters = { 14 | idlist: state => state.idlist, 15 | todaydate: state => state.todaydate, 16 | climate: state => state.climate, 17 | poster: state => state.poster, 18 | nodes: state => state.nodes 19 | } 20 | 21 | const actions = { 22 | getIdlist ({ dispatch, commit, state }) { 23 | serve.getIdlist().then(response => { 24 | commit(types.RECEIVE_IDLIST, response.data.data); 25 | dispatch('getHpById', state.idlist[0]) 26 | }); 27 | }, 28 | getHpById ({ dispatch, commit, state }, id) { 29 | serve.getHpById(id).then(response => { 30 | let hp = response.data.data; 31 | commit(types.RECEIVE_HP, hp); 32 | dispatch('weather', hp); 33 | }); 34 | }, 35 | weather ({ commit }, hp) { 36 | commit(types.WEATHER, hp); 37 | } 38 | } 39 | 40 | const mutations = { 41 | [types.RECEIVE_IDLIST] (state, data) { 42 | state.idlist = data; 43 | }, 44 | [types.RECEIVE_HP] (state, data) { 45 | state.hp = data; 46 | // 文章列表 47 | state.nodes = data.content_list; 48 | //获取最新一天的海报 49 | state.poster = data.content_list[0]; 50 | }, 51 | [types.WEATHER] (state, hp) { 52 | state.todaydate = hp.weather.date; 53 | state.climate = hp.weather.climate + ', ' + hp.weather.city_name; 54 | } 55 | } 56 | 57 | export default { 58 | namespaced: true, 59 | state, 60 | getters, 61 | actions, 62 | mutations 63 | } 64 | -------------------------------------------------------------------------------- /src/store/modules/movie.js: -------------------------------------------------------------------------------- 1 | import server from '../../models/movie.js'; 2 | import * as types from '../mutation-types.js'; 3 | 4 | const state = { 5 | topten: [], 6 | article: {}, // 文章 7 | author: {}, // 文章作者 8 | detail: {}, // 电影介绍 9 | photos: [] // 电影照片 10 | } 11 | 12 | const getters = { 13 | topten: state => state.topten, 14 | article: state => state.article, 15 | author: state => state.author, 16 | detail: state => state.detail, 17 | photos: state => state.photos 18 | } 19 | 20 | const actions = { 21 | getTopTen ({ commit }) { 22 | server.getToptenMovie().then(response => { 23 | commit(types.RECEIVE_TOPTEN, response.data.data); 24 | }); 25 | }, 26 | getNextPageById ({ commit }, id) { 27 | server.getNextPageById(id).then(response => { 28 | commit(types.RECEIVE_NEXTPAGE, response.data.data); 29 | }); 30 | }, 31 | getMovieById ({ commit }, id) { 32 | server.getMovieById(id).then(response => { 33 | commit(types.RECEIVE_MOVIE, response.data.data.data[0]); 34 | }); 35 | }, 36 | getMoviePhotosById ({ commit }, id) { 37 | server.getMoviePhotosById(id, data => { 38 | commit(types.RECEIVE_MOVIE_PHOTOS, data); 39 | }); 40 | } 41 | } 42 | 43 | const mutations = { 44 | [types.RECEIVE_TOPTEN] (state, data) { 45 | state.topten.length = 0; 46 | state.topten = data; 47 | }, 48 | [types.RECEIVE_NEXTPAGE] (state, data) { 49 | state.topten = state.topten.concat(data); 50 | }, 51 | [types.RECEIVE_MOVIE] (state, data) { 52 | state.article = data; 53 | state.author = data.user; 54 | }, 55 | [types.RECEIVE_MOVIE_PHOTOS] (state, data) { 56 | state.detail = data; 57 | 58 | state.photos.length = 0; 59 | state.photos = data.photo; 60 | } 61 | } 62 | 63 | export default { 64 | namespaced: true, 65 | state, 66 | getters, 67 | actions, 68 | mutations 69 | } 70 | 71 | -------------------------------------------------------------------------------- /webpack.config.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | // 设置环境常量 4 | const [DEV, PRO] = ['development', 'production']; 5 | const NODE_ENV = process.env.NODE_ENV || DEV; 6 | 7 | const webpack = require('webpack'); 8 | const path = require('path'); 9 | 10 | module.exports = { 11 | // 入口文件 12 | entry: { 13 | app: './src/app.js' 14 | }, 15 | 16 | // 输出 17 | output: { 18 | path: __dirname, 19 | publicPath: '/', 20 | filename: 'build.js' 21 | }, 22 | 23 | // 根据环境开启监听模式 24 | watch: NODE_ENV === DEV, 25 | 26 | // 监听参数配置 27 | watchOptions: { 28 | aggregateTimeout: 100 29 | }, 30 | 31 | // 开发工具 32 | devtool: NODE_ENV === DEV ? 'cheap-inline-module-source-map' : null, 33 | 34 | // 解析 35 | resolve: { 36 | alias: { 37 | vue: 'vue/dist/vue.min.js' 38 | } 39 | }, 40 | 41 | // 模块 42 | module: { 43 | rules: [ 44 | { 45 | test: /\.vue$/, 46 | loader: 'vue-loader' 47 | }, 48 | { 49 | test: /\.js$/, 50 | loader: 'babel-loader', 51 | exclude: /node_modules/ 52 | }, 53 | { 54 | test: /\.css$/, 55 | loader: 'style-loader!css-loader' 56 | }, 57 | { 58 | test: /\.less/, 59 | loader: 'style-loader!css-loader!less-loader' 60 | }, 61 | { 62 | test: /\.(eot|woff2?|svg|ttf|mp3|wav)([\?]?.*)$/, 63 | loader: 'file-loader', 64 | options: { 65 | name: '[name].[ext]?[hash]' 66 | } 67 | }, 68 | { 69 | test: /\.(png|jpe?g|gif)$/, 70 | loader: 'file-loader', 71 | options: { 72 | name: '[name].[ext]?[hash]' 73 | } 74 | } 75 | ] 76 | } 77 | }; 78 | 79 | // 如果是生产环境 80 | if (NODE_ENV === PRO) { 81 | module.exports.devtool = '#source-map'; 82 | module.exports.plugins = (module.exports.plugins || []).concat([ 83 | // 定义全局变量 84 | new webpack.DefinePlugin({ 85 | 'process.env': { 86 | NODE_ENV: `"${PRO}"` 87 | } 88 | }), 89 | 90 | // 压缩 91 | new webpack.optimize.UglifyJsPlugin({ 92 | compress: { 93 | warnings: false 94 | } 95 | }) 96 | ]); 97 | } -------------------------------------------------------------------------------- /src/store/modules/reading.js: -------------------------------------------------------------------------------- 1 | import server from '../../models/reading.js'; 2 | import * as types from '../mutation-types.js'; 3 | 4 | // initial state 5 | const state = { 6 | topten: [], 7 | article: {}, // 文章 8 | serial: {}, // 连载 9 | question: {}, // 问答 10 | asker: {}, // 提问者 11 | answerer: {}, // 回答者 12 | tag: '', 13 | author: {} 14 | } 15 | 16 | // getters 17 | const getters = { 18 | topten: state => state.topten, 19 | article: state => state.article, 20 | serial: state => state.serial, 21 | question: state => state.question, 22 | asker: state => state.asker, 23 | answerer: state => state.answerer, 24 | tag: state => state.tag, 25 | author: state => state.author 26 | } 27 | 28 | // actions 29 | const actions = { 30 | getTopTen ({ commit }) { 31 | server.getToptenReading().then((response) => { 32 | commit(types.RECEIVE_TOPTEN, response.data.data); 33 | }); 34 | }, 35 | getNextPageById ({ commit }, id) { 36 | server.getNextPageById(id).then((response) => { 37 | commit(types.RECEIVE_NEXTPAGE, response.data.data); 38 | }); 39 | }, 40 | getEssayById ({ commit }, id) { 41 | server.getEssayById(id).then(response => { 42 | commit(types.RECEIVE_ESSAY, response.data.data); 43 | }); 44 | }, 45 | getSerialById ({ commit }, id) { 46 | server.getSerialById(id).then(response => { 47 | commit(types.RECEIVE_SERIAL, response.data.data); 48 | }); 49 | }, 50 | getQuestionById ({ commit }, id) { 51 | server.getQuestionById(id).then(response => { 52 | commit(types.RECEIVE_QUESTION, response.data.data); 53 | }); 54 | } 55 | } 56 | 57 | // mutations 58 | const mutations = { 59 | [types.RECEIVE_TOPTEN] (state, data) { 60 | state.topten.length = 0; 61 | state.topten = data; 62 | }, 63 | [types.RECEIVE_NEXTPAGE] (state, data) { 64 | state.topten = state.topten.concat(data); 65 | }, 66 | [types.RECEIVE_ESSAY] (state, data) { 67 | state.article = data; 68 | state.tag = data.tag_list.length > 0 ? data.tag_list[0].title : ''; 69 | state.author = data.author[0]; 70 | }, 71 | [types.RECEIVE_SERIAL] (state, data) { 72 | state.serial = data; 73 | state.author = data.author; 74 | }, 75 | [types.RECEIVE_QUESTION] (state, data) { 76 | state.question = data; 77 | state.asker = data.asker; 78 | state.answerer = data.answerer; 79 | } 80 | } 81 | 82 | export default { 83 | namespaced: true, 84 | state, 85 | getters, 86 | actions, 87 | mutations 88 | } 89 | -------------------------------------------------------------------------------- /src/pages/musics.vue: -------------------------------------------------------------------------------- 1 | 50 | 51 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # one-vue 2 | 仿韩寒「ONE · 一个」,基于vue2.0+混合式开发的一款跨终端、高性能、用户体验高的移动端App,使用服务端数据接口 [one-api](https://github.com/gongph/one-api) 进行开发。 3 | 4 | ## 技术架构 5 | 6 | - 编译打包工具 7 | - `webpack@3.0.0` 8 | - 包管理工具 9 | - `yarn@0.18.1` 还不知道 `yarn` ? 查看[中文文档](https://yarn.bootcss.com/) 10 | - 服务端数据请求 11 | - `axios@0.16.2` 12 | - 视图组件 13 | - `vue@2.3.4` 14 | - 状态管理 15 | - `vuex@2.3.1` 16 | - 路由器 17 | - Framework7封装的一套自己的[router](http://framework7.io/vue/navigation-router.html) 18 | - 前端UI库 19 | - `Framework7@1.6.4` [Framework7官网](http://framework7.io) 20 | - `Framework7-vue@0.9.2` 21 | - 图标库 22 | - `Framework7-Icons@0.8.9` [Github地址](https://github.com/nolimits4web/Framework7-Icons) 23 | 24 | ## 项目结构 25 | 26 | ```bash 27 | . 28 | ├── assets 29 | ├── media 30 | ├── node_modules 31 | ├── src 32 | │ ├── api # 数据接口 33 | │ ├── mixins # Mixins 34 | │ ├── models 35 | │ ├── pages # 页面 36 | │ ├── store 37 | │ │ ├── modules # 模块 38 | │ │ ├── actions.js # 全局 actions 39 | │ │ ├── getters.js # 全局 getters 40 | │ │ ├── index.js # 入口文件 41 | │ │ └── mutation-types.js # 类型 42 | │ │ 43 | │ ├── utils # 工具文件夹 44 | │ ├── app.css # 组件样式 45 | │ ├── app.js # 入口文件 46 | │ ├── api.vue # 根组件 47 | │ └── routes.js # 路由配置文件 48 | │ 49 | ├── build.js # 编译后的文件 50 | ├── index.html 51 | ├── mainifest.json # app配置文件,需要配合 HBuilder 开发工具使用 52 | ├── package.json 53 | ├── webpack.config.js 54 | └── yarn.lock 55 | ``` 56 | ## 项目截图 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | ## 如何在本地运行? 66 | 67 | - 首先你需要安装 [Node.js](http://nodejs.cn/download/)。选择不同版本下载安装即可。如果你安装到其他盘符可能会遇到一些环境变量的奇葩问题。 68 | 为了避免此类问题,还是按照默认路径安装吧。 69 | - 安装完 Node ,请按照下面的命令行安装 `yarn` 。这是因为项目模块依赖是用它来管理的,有关 `npm` vs `yarn` 请自行百度。 70 | ```bash 71 | # step1: 安装 yarn 72 | npm i yarn -g 73 | 74 | # step2: 安装成功后查看 yarn 版本 75 | yarn -V 76 | ``` 77 | - 克隆或下载该项目。如果你本地安装了 Git,请使用如下命令行进行克隆,或者你可以下载源码然后解压到本地磁盘。有关 Git 教程,请看[廖雪峰Git教程](http://www.liaoxuefeng.com/wiki/0013739516305929606dd18361248578c67b8067c8c017b000) 78 | ```bash 79 | git clone git@github.com:gongph/one-vue.git 80 | ``` 81 | - 安装模块。进入项目根目录打开终端执行如下命令行: 82 | ```bash 83 | yarn install 84 | ``` 85 | - 执行如下命令行启动服务,并访问:localhost:8080 86 | ```bash 87 | npm run dev 88 | ``` 89 | 90 | **注意:** 建议谷歌浏览器调试,调试时请使用手机调试模式查看,快捷键(Ctrl+Shift+M)。 91 | 92 | ## 如何在真机上运行? 93 | 94 | - 首先你需要下载 [HBuilder](http://www.dcloud.io/) 开发工具,然后安装,邮箱注册一下。 95 | - 导入项目。 96 | - 将项目转成 App 项目。点击项目右键 - 成转换移动App 97 | - 手机连接电脑 98 | - 点击工具栏中的运行 - 手机运行 - 选择激活的手机设备,等待片刻即可。 99 | 100 | ## LICENSE 101 | MIT License 102 | 103 | Copyright (c) 2017 [gongph](https://github.com/gongph) 104 | -------------------------------------------------------------------------------- /src/pages/movies.vue: -------------------------------------------------------------------------------- 1 | 53 | 54 | -------------------------------------------------------------------------------- /src/pages/details/serial.vue: -------------------------------------------------------------------------------- 1 | 71 | 72 | -------------------------------------------------------------------------------- /src/pages/readings.vue: -------------------------------------------------------------------------------- 1 | 50 | 51 | -------------------------------------------------------------------------------- /src/pages/details/movie.vue: -------------------------------------------------------------------------------- 1 | 63 | 64 | -------------------------------------------------------------------------------- /src/pages/details/essay.vue: -------------------------------------------------------------------------------- 1 | 70 | 71 | -------------------------------------------------------------------------------- /src/pages/details/music.vue: -------------------------------------------------------------------------------- 1 | 78 | 79 | -------------------------------------------------------------------------------- /src/pages/details/question.vue: -------------------------------------------------------------------------------- 1 | 82 | 83 | -------------------------------------------------------------------------------- /src/pages/home.vue: -------------------------------------------------------------------------------- 1 | 85 | 86 | -------------------------------------------------------------------------------- /src/app.css: -------------------------------------------------------------------------------- 1 | /* 2 | * global 3 | */ 4 | 5 | .size-12 {font-size: 12px;} 6 | .size-14 {font-size: 14px;} 7 | .size-16 {font-size: 16px;} 8 | .size-17 {font-size: 17px;} 9 | .size-20 {font-size: 20px;} 10 | .size-25 {font-size: 25px;} 11 | 12 | .navbar-fixed .page-content, .navbar-through .page-content { 13 | background: #eee; 14 | } 15 | 16 | .page .toolbar .toolbar-inner a { 17 | color: #8e8e93; 18 | } 19 | 20 | .page .toolbar .toolbar-inner a.link:nth-child(1) { 21 | padding-left: 12px; 22 | } 23 | 24 | .page .toolbar-inner a.link:nth-child(2) { 25 | position: relative; 26 | left: -10px; 27 | } 28 | 29 | .page .toolbar-inner a.link:nth-child(3) { 30 | position: relative; 31 | left: -20px; 32 | } 33 | 34 | .page .toolbar .toolbar-inner a.link .icon { 35 | font-size: 17px; 36 | } 37 | 38 | .page .toolbar .toolbar-inner a:nth-child(4) { 39 | font-size: 12px; 40 | padding-right: 12px; 41 | } 42 | 43 | .row { 44 | margin-bottom: 10px; 45 | background: #fff; 46 | } 47 | 48 | /* 文章列表底部工具条 */ 49 | .footerbar { 50 | padding: 15px 0 5px 0; 51 | } 52 | 53 | .footerbar > a { 54 | font-size: 12px; 55 | color: gray; 56 | } 57 | 58 | .footerbar > a .icon { 59 | font-size: 15px; 60 | color: gray; 61 | } 62 | 63 | .footerbar > a.link { 64 | float: right; 65 | padding-left: 15px; 66 | } 67 | 68 | /* home */ 69 | .home-page .page-content { 70 | padding-top: 0; 71 | } 72 | 73 | .home-page .row:first-child { 74 | margin-bottom: 0; 75 | } 76 | 77 | .page .weather { 78 | text-align: center; 79 | padding: 5px 0; 80 | } 81 | 82 | .page .poster .volume { 83 | position: absolute; 84 | padding: 5px 7px; 85 | color: #fff; 86 | } 87 | 88 | .page .poster .pic_info { 89 | text-align: center; 90 | padding-top: 5px; 91 | } 92 | 93 | .page .poster .forward { 94 | padding: 15px 30px; 95 | text-align: justify; 96 | line-height: 2; 97 | } 98 | 99 | .page .poster .words_info { 100 | text-align: center; 101 | } 102 | 103 | .page .footerbar.note { 104 | padding: 18px 10px 10px 10px; 105 | } 106 | 107 | 108 | /* 文章列表页 */ 109 | 110 | .node-row { 111 | padding: 5px 15px; 112 | } 113 | 114 | .node .header .category { 115 | text-align: center; 116 | } 117 | 118 | .node .header .title { 119 | font-weight: 200; 120 | padding-top: 10px; 121 | } 122 | 123 | .node .header .author, .node .content .forward { 124 | padding: 8px 1px; 125 | text-align: justify; 126 | line-height: 1.7; 127 | } 128 | 129 | .node .content .img_url_dashed { 130 | border-top: 6px dashed #ddd; 131 | border-bottom: 6px dashed #ddd; 132 | padding-top: 4px; 133 | } 134 | 135 | .node .content .subtitle { 136 | text-align: right; 137 | } 138 | 139 | /* 文章详情页 */ 140 | .page .article-row { 141 | padding: 30px 20px; 142 | } 143 | 144 | .page .article .hp_split { 145 | height: 4px; 146 | background: #000; 147 | width: 25vw; 148 | margin: 15px 0; 149 | } 150 | 151 | .page .article .hp_m_title, .page .article .hp_m_story_author { 152 | text-align: center; 153 | } 154 | 155 | .page .article .hp_content { 156 | text-align: justify; 157 | line-height: 2; 158 | } 159 | 160 | .page .author_info { 161 | margin-top: 30px; 162 | } 163 | 164 | .page .author_info .at_split { 165 | height: 3px; 166 | width: 21vw; 167 | background: #000; 168 | margin: 5px 0; 169 | } 170 | 171 | .page .author_info .hp_author_introduce { 172 | padding-top: 10px; 173 | } 174 | 175 | .page .author_info .at_content { 176 | list-style: none; 177 | padding: 0; 178 | } 179 | 180 | .page .author_info .at_content li { 181 | float: left; 182 | } 183 | 184 | .page .author_info .at_content img { 185 | border-radius: 50% 186 | } 187 | 188 | .page .author_info .at_content .wb_name { 189 | padding-left: 15px; 190 | } 191 | 192 | .page .author_info .at_content .wb_name small { 193 | display: block; 194 | } 195 | 196 | .page .author_info .at_content .follow { 197 | float: right; 198 | } 199 | 200 | /* 电影 */ 201 | 202 | .movie-page .movie-covers { 203 | background: #fff; 204 | } 205 | 206 | .movie-page .movie-covers img { 207 | height: 210px; 208 | } 209 | 210 | .movie-page .swiper-pagination-custom { 211 | color: #fff; 212 | text-align: right; 213 | width: 98%; 214 | } 215 | 216 | /* 阅读 问答*/ 217 | .page .question-row { 218 | padding-bottom: 10px; 219 | } 220 | 221 | .page .question { 222 | padding: 10px 12px; 223 | } 224 | 225 | .page .question .split { 226 | padding: 10px 0; 227 | } 228 | 229 | .page .question .split div { 230 | float: left; 231 | } 232 | 233 | .page .question .split .l_s, .page .question .split .r_s { 234 | width: 48%; 235 | height: 2px; 236 | background: #eee; 237 | } 238 | 239 | .page .question .split .c_c { 240 | width: 4%; 241 | height: 10px; 242 | } 243 | 244 | .page .question .split .c_c span:before { 245 | content: ' '; 246 | } 247 | 248 | .page .question .split .c_c div { 249 | background: #ddd; 250 | width: 6px; 251 | height: 6px; 252 | border-radius: 50%; 253 | margin: -2px 0 0px 3px; 254 | } 255 | 256 | .page .question .answerer { 257 | padding: 20px 0 0 0; 258 | } 259 | 260 | .page .question .answer_content { 261 | text-align: justify; 262 | line-height: 2; 263 | } 264 | 265 | .page .question .underline { 266 | height: 1px; 267 | width: 100%; 268 | background: #eee; 269 | margin: 35px 0 15px 0; 270 | } 271 | -------------------------------------------------------------------------------- /manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "@platforms": ["android", "iPhone", "iPad"], 3 | "id": "H5FB3896A",/*应用的标识,创建应用时自动生成,勿手动修改*/ 4 | "name": "FM阅",/*应用名称,程序桌面图标名称*/ 5 | "version": { 6 | "name": "1.0",/*应用版本名称*/ 7 | "code": "" 8 | }, 9 | "description": "you is my all",/*应用描述信息*/ 10 | "icons": { 11 | "72": "icon.png" 12 | }, 13 | "launch_path": "index.html",/*应用的入口页面,默认为根目录下的index.html;支持网络地址,必须以http://或https://开头*/ 14 | "developer": { 15 | "name": "",/*开发者名称*/ 16 | "email": "",/*开发者邮箱地址*/ 17 | "url": ""/*开发者个人主页地址*/ 18 | }, 19 | "permissions": { 20 | "Accelerometer": { 21 | "description": "访问加速度感应器" 22 | }, 23 | "Audio": { 24 | "description": "访问麦克风" 25 | }, 26 | 27 | "Cache": { 28 | "description": "管理应用缓存" 29 | }, 30 | "Camera": { 31 | "description": "访问摄像头" 32 | }, 33 | "Console": { 34 | "description": "跟踪调试输出日志" 35 | }, 36 | "Contacts": { 37 | "description": "访问系统联系人信息" 38 | }, 39 | "Device": { 40 | "description": "访问设备信息" 41 | }, 42 | "Downloader": { 43 | "description": "文件下载管理" 44 | }, 45 | "Events": { 46 | "description": "应用扩展事件" 47 | }, 48 | "File": { 49 | "description": "访问本地文件系统" 50 | }, 51 | "Gallery": { 52 | "description": "访问系统相册" 53 | }, 54 | "Geolocation": { 55 | "description": "访问位置信息" 56 | }, 57 | "Invocation": { 58 | "description": "使用Native.js能力" 59 | }, 60 | "Orientation": { 61 | "description": "访问方向感应器" 62 | }, 63 | "Proximity": { 64 | "description": "访问距离感应器" 65 | }, 66 | "Storage": { 67 | "description": "管理应用本地数据" 68 | }, 69 | 70 | "Uploader": { 71 | "description": "管理文件上传任务" 72 | }, 73 | "Runtime": { 74 | "description": "访问运行期环境" 75 | }, 76 | "XMLHttpRequest": { 77 | "description": "跨域网络访问" 78 | }, 79 | "Zip": { 80 | "description": "文件压缩与解压缩" 81 | }, 82 | "Barcode": { 83 | "description": "管理二维码扫描插件" 84 | }, 85 | 86 | "Speech": { 87 | "description": "管理语音识别插件" 88 | }, 89 | "Webview":{ 90 | "description": "窗口管理" 91 | }, 92 | "NativeUI":{ 93 | "description": "原生UI控件" 94 | }, 95 | "Navigator":{ 96 | "description": "浏览器信息" 97 | }, 98 | "NativeObj":{ 99 | "description": "原生对象" 100 | } 101 | }, 102 | "plus": { 103 | "splashscreen": { 104 | "autoclose": true,/*是否自动关闭程序启动界面,true表示应用加载应用入口页面后自动关闭;false则需调plus.navigator.closeSplashscreen()关闭*/ 105 | "waiting": true/*是否在程序启动界面显示等待雪花,true表示显示,false表示不显示。*/ 106 | }, 107 | "popGesture": "close",/*设置应用默认侧滑返回关闭Webview窗口,"none"为无侧滑返回功能,"hide"为侧滑隐藏Webview窗口。参考http://ask.dcloud.net.cn/article/102*/ 108 | "runmode": "normal",/*应用的首次启动运行模式,可取liberate或normal,liberate模式在第一次启动时将解压应用资源(Android平台File API才可正常访问_www目录)*/ 109 | "signature": "Sk9JTiBVUyBtYWlsdG86aHIyMDEzQGRjbG91ZC5pbw==",/*可选,保留给应用签名,暂不使用*/ 110 | "distribute": { 111 | "apple": { 112 | "appid": "",/*iOS应用标识,苹果开发网站申请的appid,如io.dcloud.HelloH5*/ 113 | "mobileprovision": "",/*iOS应用打包配置文件*/ 114 | "password": "",/*iOS应用打包个人证书导入密码*/ 115 | "p12": "",/*iOS应用打包个人证书,打包配置文件关联的个人证书*/ 116 | "devices": "universal",/*iOS应用支持的设备类型,可取值iphone/ipad/universal*/ 117 | "frameworks":[ 118 | ]/*调用Native.js调用原生Objective-c API需要引用的FrameWork,如需调用GameCenter,则添加"GameKit.framework"*/ 119 | }, 120 | "google": { 121 | "packagename": "",/*Android应用包名,如io.dcloud.HelloH5*/ 122 | "keystore": "",/*Android应用打包使用的密钥库文件*/ 123 | "password": "",/*Android应用打包使用密钥库中证书的密码*/ 124 | "aliasname": "",/*Android应用打包使用密钥库中证书的别名*/ 125 | "permissions": ["","","","","","","","","","","","","","","","",""] 126 | /*使用Native.js调用原生安卓API需要使用到的系统权限*/ 127 | }, 128 | "orientation": [ 129 | "portrait-primary" 130 | ],/*应用支持的方向,portrait-primary:竖屏正方向;portrait-secondary:竖屏反方向;landscape-primary:横屏正方向;landscape-secondary:横屏反方向*/ 131 | "icons": { 132 | "ios": { 133 | "prerendered": true, /*应用图标是否已经高亮处理,在iOS6及以下设备上有效*/ 134 | "auto": "", /*应用图标,分辨率:512x512,用于自动生成各种尺寸程序图标*/ 135 | "iphone": { 136 | "normal": "unpackage/res/icons/57x57.png", /*iPhone3/3GS程序图标,分辨率:57x57*/ 137 | "retina": "unpackage/res/icons/114x114.png", /*iPhone4程序图标,分辨率:114x114*/ 138 | "retina7": "unpackage/res/icons/120x120.png", /*iPhone4S/5/6程序图标,分辨率:120x120*/ 139 | "retina8": "unpackage/res/icons/180x180.png", /*iPhone6 Plus程序图标,分辨率:180x180*/ 140 | "spotlight-normal": "unpackage/res/icons/29x29.png", /*iPhone3/3GS Spotlight搜索程序图标,分辨率:29x29*/ 141 | "spotlight-retina": "unpackage/res/icons/58x58.png", /*iPhone4 Spotlight搜索程序图标,分辨率:58x58*/ 142 | "spotlight-retina7": "unpackage/res/icons/80x80.png", /*iPhone4S/5/6 Spotlight搜索程序图标,分辨率:80x80*/ 143 | "settings-normal": "unpackage/res/icons/29x29.png", /*iPhone4设置页面程序图标,分辨率:29x29*/ 144 | "settings-retina": "unpackage/res/icons/58x58.png", /*iPhone4S/5/6设置页面程序图标,分辨率:58x58*/ 145 | "settings-retina8": "unpackage/res/icons/87x87.png" /*iPhone6Plus设置页面程序图标,分辨率:87x87*/ 146 | }, 147 | "ipad": { 148 | "normal": "unpackage/res/icons/72x72.png", /*iPad普通屏幕程序图标,分辨率:72x72*/ 149 | "retina": "unpackage/res/icons/144x144.png", /*iPad高分屏程序图标,分辨率:144x144*/ 150 | "normal7": "unpackage/res/icons/76x76.png", /*iPad iOS7程序图标,分辨率:76x76*/ 151 | "retina7": "unpackage/res/icons/152x152.png", /*iPad iOS7高分屏程序图标,分辨率:152x152*/ 152 | "spotlight-normal": "unpackage/res/icons/50x50.png", /*iPad Spotlight搜索程序图标,分辨率:50x50*/ 153 | "spotlight-retina": "unpackage/res/icons/100x100.png", /*iPad高分屏Spotlight搜索程序图标,分辨率:100x100*/ 154 | "spotlight-normal7": "unpackage/res/icons/40x40.png",/*iPad iOS7 Spotlight搜索程序图标,分辨率:40x40*/ 155 | "spotlight-retina7": "unpackage/res/icons/80x80.png",/*iPad iOS7高分屏Spotlight搜索程序图标,分辨率:80x80*/ 156 | "settings-normal": "unpackage/res/icons/29x29.png",/*iPad设置页面程序图标,分辨率:29x29*/ 157 | "settings-retina": "unpackage/res/icons/58x58.png" /*iPad高分屏设置页面程序图标,分辨率:58x58*/ 158 | } 159 | }, 160 | "android": { 161 | "mdpi": "unpackage/res/icons/48x48.png", /*普通屏程序图标,分辨率:48x48*/ 162 | "ldpi": "unpackage/res/icons/48x48.png", /*大屏程序图标,分辨率:48x48*/ 163 | "hdpi": "unpackage/res/icons/72x72.png", /*高分屏程序图标,分辨率:72x72*/ 164 | "xhdpi": "unpackage/res/icons/96x96.png",/*720P高分屏程序图标,分辨率:96x96*/ 165 | "xxhdpi": "unpackage/res/icons/144x144.png","xxxhdpi":"unpackage/res/icons/192x192.png"/*1080P 高分屏程序图标,分辨率:144x144*/ 166 | } 167 | }, 168 | "splashscreen": { 169 | "ios": { 170 | "iphone": { 171 | "default": "", /*iPhone3启动图片选,分辨率:320x480*/ 172 | "retina35": "",/*3.5英寸设备(iPhone4)启动图片,分辨率:640x960*/ 173 | "retina40": "",/*4.0 英寸设备(iPhone5/iPhone5s)启动图片,分辨率:640x1136*/ 174 | "retina47": "",/*4.7 英寸设备(iPhone6)启动图片,分辨率:750x1334*/ 175 | "retina55": "",/*5.5 英寸设备(iPhone6 Plus)启动图片,分辨率:1242x2208*/ 176 | "retina55l": ""/*5.5 英寸设备(iPhone6 Plus)横屏启动图片,分辨率:2208x1242*/ 177 | }, 178 | "ipad": { 179 | "portrait": "", /*iPad竖屏启动图片,分辨率:768x1004*/ 180 | "portrait-retina": "",/*iPad高分屏竖屏图片,分辨率:1536x2008*/ 181 | "landscape": "", /*iPad横屏启动图片,分辨率:1024x748*/ 182 | "landscape-retina": "", /*iPad高分屏横屏启动图片,分辨率:2048x1496*/ 183 | "portrait7": "", /*iPad iOS7竖屏启动图片,分辨率:768x1024*/ 184 | "portrait-retina7": "",/*iPad iOS7高分屏竖屏图片,分辨率:1536x2048*/ 185 | "landscape7": "", /*iPad iOS7横屏启动图片,分辨率:1024x768*/ 186 | "landscape-retina7": ""/*iPad iOS7高分屏横屏启动图片,分辨率:2048x1536*/ 187 | } 188 | }, 189 | "android": { 190 | "mdpi": "", /*普通屏启动图片,分辨率:240x282*/ 191 | "ldpi": "", /*大屏启动图片,分辨率:320x442*/ 192 | "hdpi": "C:/Users/gongph/Desktop/one@480x762.png", /*高分屏启动图片,分辨率:480x762*/ 193 | "xhdpi": "C:/Users/gongph/Desktop/one@720x1242.png", /*720P高分屏启动图片,分辨率:720x1242*/ 194 | "xxhdpi": "C:/Users/gongph/Desktop/one@1080x1882.png"/*1080P高分屏启动图片,分辨率:1080x1882*/ 195 | } 196 | } 197 | } 198 | } 199 | } --------------------------------------------------------------------------------