├── .babelrc ├── .editorconfig ├── .gitignore ├── .postcssrc.js ├── README.md ├── build ├── build.js ├── check-versions.js ├── dev-client.js ├── dev-server.js ├── utils.js ├── vue-loader.conf.js ├── webpack.base.conf.js ├── webpack.dev.conf.js └── webpack.prod.conf.js ├── config ├── dev.env.js ├── index.js └── prod.env.js ├── index.html ├── package-lock.json ├── package.json ├── src ├── App.vue ├── assets │ ├── css │ │ ├── contentLis.css │ │ └── contents.css │ ├── effect │ │ ├── ALL.gif │ │ ├── ALL.jpg │ │ ├── ME.gif │ │ ├── ME.jpg │ │ ├── ONE.gif │ │ ├── ONE.jpg │ │ ├── search.gif │ │ └── search.jpg │ └── img │ │ ├── collectBg.png │ │ ├── guide.png │ │ ├── hp.png │ │ ├── interestBg.png │ │ ├── loginBg.png │ │ ├── logo1.png │ │ ├── movie.png │ │ ├── msgBg.jpg │ │ ├── music.png │ │ ├── photo.png │ │ ├── prev.png │ │ ├── question.png │ │ ├── read.png │ │ ├── searchBg.png │ │ ├── serial.png │ │ ├── sprite.png │ │ └── sprite.psd ├── components │ ├── banners │ │ ├── banner-content.vue │ │ └── banner.vue │ ├── classifys │ │ └── classify.vue │ ├── contents │ │ ├── content-comment.vue │ │ ├── content-footer.vue │ │ ├── content-header.vue │ │ ├── content-hp.vue │ │ ├── content-movie.vue │ │ ├── content-music.vue │ │ ├── content-question.vue │ │ ├── content-reading.vue │ │ ├── content-serial.vue │ │ └── detail.vue │ ├── homePage │ │ ├── guide.vue │ │ ├── index.vue │ │ ├── m-content.vue │ │ ├── m-footer.vue │ │ ├── m-header.vue │ │ ├── m-menu.vue │ │ └── m-notes.vue │ ├── isAll │ │ ├── all-banner.vue │ │ ├── all-classify.vue │ │ ├── all-slide.vue │ │ └── all.vue │ ├── mine │ │ ├── author.vue │ │ ├── mine-collect.vue │ │ ├── mine-index.vue │ │ └── mine-interest.vue │ └── scroll.vue ├── function │ ├── changeTime.js │ ├── getTime.js │ ├── setDate.js │ └── strSplit.js ├── main.js ├── router │ └── index.js └── store │ └── index.js └── static ├── .gitkeep └── audio └── music.mp3 /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | ["env", { 4 | "modules": false, 5 | "targets": { 6 | "browsers": ["> 1%", "last 2 versions", "not ie <= 8"] 7 | } 8 | }], 9 | "stage-2" 10 | ], 11 | "plugins": ["transform-runtime"], 12 | "env": { 13 | "test": { 14 | "presets": ["env", "stage-2"], 15 | "plugins": ["istanbul"] 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | indent_style = space 6 | indent_size = 2 7 | end_of_line = lf 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules/ 3 | dist/ 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | 8 | # Editor directories and files 9 | .idea 10 | *.suo 11 | *.ntvs* 12 | *.njsproj 13 | *.sln 14 | -------------------------------------------------------------------------------- /.postcssrc.js: -------------------------------------------------------------------------------- 1 | // https://github.com/michael-ciniawsky/postcss-load-config 2 | 3 | module.exports = { 4 | "plugins": { 5 | // to edit target browsers: use "browserslist" field in package.json 6 | "autoprefixer": {} 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## 说明 2 | 3 | 基于vue2+vuex制作的仿ONE一个app移动端项目。 4 |
5 |
6 | 7 | ## 技术栈 8 | 9 | vue2 + vuex + vue-router + Mint UI + fetch + better-scroll + localstorage 10 |
11 |
12 | 13 | ## 项目运行 14 | 15 | ``` 16 | ### 安装依赖 17 | npm install 18 | 19 | ### 开启本地服务器localhost:8080 20 | npm run dev 21 | 22 | ### 发布环境 23 | npm run build 24 | 25 | ``` 26 |
27 | 28 | ## 目标功能 29 | 30 | - 文章点赞,收藏 31 | - 关注作者 32 | - 内容详情页面评论点赞,发表评论 33 | - 顶部下拉刷新页面 34 | - 底部上拉加载更多 35 | - loading加载状态 36 | - ONE头部下拉导航 37 | - ONE页面中部展开导航 38 | - ONE页面头部导航日期选择器 39 | - ALL页面搜索内容 40 | - ALL页面轮播图 41 | - ALL页面分类导航 42 | - ME页面收藏列表 43 | - ME页面关注列表 44 | - ME页面登录退出 45 |
46 |
47 | 48 | ## 部分功能展示 49 | 50 | ### ONE首页 51 | 52 | ![Image](https://github.com/A1man/vue-project/blob/master/src/assets/effect/ONE.jpg) 53 | ![Image](https://github.com/A1man/vue-project/blob/master/src/assets/effect/ONE.gif) 54 | 55 | ### All页面 56 | 57 | ![Image](https://github.com/A1man/vue-project/blob/master/src/assets/effect/ALL.jpg) 58 | ![Image](https://github.com/A1man/vue-project/blob/master/src/assets/effect/ALL.gif) 59 | 60 | 61 | 62 | ### 搜索页面 63 | 64 | ![Image](https://github.com/A1man/vue-project/blob/master/src/assets/effect/search.jpg) 65 | ![Image](https://github.com/A1man/vue-project/blob/master/src/assets/effect/search.gif) 66 | 67 | ### ME页面 68 | 69 | ![Image](https://github.com/A1man/vue-project/blob/master/src/assets/effect/ME.jpg) 70 | ![Image](https://github.com/A1man/vue-project/blob/master/src/assets/effect/ME.gif) 71 |
72 |
73 |
74 | -------------------------------------------------------------------------------- /build/build.js: -------------------------------------------------------------------------------- 1 | require('./check-versions')() 2 | 3 | process.env.NODE_ENV = 'production' 4 | 5 | var ora = require('ora') 6 | var rm = require('rimraf') 7 | var path = require('path') 8 | var chalk = require('chalk') 9 | var webpack = require('webpack') 10 | var config = require('../config') 11 | var webpackConfig = require('./webpack.prod.conf') 12 | 13 | var spinner = ora('building for production...') 14 | spinner.start() 15 | 16 | rm(path.join(config.build.assetsRoot, config.build.assetsSubDirectory), err => { 17 | if (err) throw err 18 | webpack(webpackConfig, function (err, stats) { 19 | spinner.stop() 20 | if (err) throw err 21 | process.stdout.write(stats.toString({ 22 | colors: true, 23 | modules: false, 24 | children: false, 25 | chunks: false, 26 | chunkModules: false 27 | }) + '\n\n') 28 | 29 | if (stats.hasErrors()) { 30 | console.log(chalk.red(' Build failed with errors.\n')) 31 | process.exit(1) 32 | } 33 | 34 | console.log(chalk.cyan(' Build complete.\n')) 35 | console.log(chalk.yellow( 36 | ' Tip: built files are meant to be served over an HTTP server.\n' + 37 | ' Opening index.html over file:// won\'t work.\n' 38 | )) 39 | }) 40 | }) 41 | -------------------------------------------------------------------------------- /build/check-versions.js: -------------------------------------------------------------------------------- 1 | var chalk = require('chalk') 2 | var semver = require('semver') 3 | var packageConfig = require('../package.json') 4 | var shell = require('shelljs') 5 | function exec (cmd) { 6 | return require('child_process').execSync(cmd).toString().trim() 7 | } 8 | 9 | var versionRequirements = [ 10 | { 11 | name: 'node', 12 | currentVersion: semver.clean(process.version), 13 | versionRequirement: packageConfig.engines.node 14 | } 15 | ] 16 | 17 | if (shell.which('npm')) { 18 | versionRequirements.push({ 19 | name: 'npm', 20 | currentVersion: exec('npm --version'), 21 | versionRequirement: packageConfig.engines.npm 22 | }) 23 | } 24 | 25 | module.exports = function () { 26 | var warnings = [] 27 | for (var i = 0; i < versionRequirements.length; i++) { 28 | var mod = versionRequirements[i] 29 | if (!semver.satisfies(mod.currentVersion, mod.versionRequirement)) { 30 | warnings.push(mod.name + ': ' + 31 | chalk.red(mod.currentVersion) + ' should be ' + 32 | chalk.green(mod.versionRequirement) 33 | ) 34 | } 35 | } 36 | 37 | if (warnings.length) { 38 | console.log('') 39 | console.log(chalk.yellow('To use this template, you must update following to modules:')) 40 | console.log() 41 | for (var i = 0; i < warnings.length; i++) { 42 | var warning = warnings[i] 43 | console.log(' ' + warning) 44 | } 45 | console.log() 46 | process.exit(1) 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /build/dev-client.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | require('eventsource-polyfill') 3 | var hotClient = require('webpack-hot-middleware/client?noInfo=true&reload=true') 4 | 5 | hotClient.subscribe(function (event) { 6 | if (event.action === 'reload') { 7 | window.location.reload() 8 | } 9 | }) 10 | -------------------------------------------------------------------------------- /build/dev-server.js: -------------------------------------------------------------------------------- 1 | require('./check-versions')() 2 | 3 | var config = require('../config') 4 | if (!process.env.NODE_ENV) { 5 | process.env.NODE_ENV = JSON.parse(config.dev.env.NODE_ENV) 6 | } 7 | 8 | var opn = require('opn') 9 | var path = require('path') 10 | var express = require('express') 11 | var webpack = require('webpack') 12 | var proxyMiddleware = require('http-proxy-middleware') 13 | var webpackConfig = require('./webpack.dev.conf') 14 | 15 | // default port where dev server listens for incoming traffic 16 | var port = process.env.PORT || config.dev.port 17 | // automatically open browser, if not set will be false 18 | var autoOpenBrowser = !!config.dev.autoOpenBrowser 19 | // Define HTTP proxies to your custom API backend 20 | // https://github.com/chimurai/http-proxy-middleware 21 | var proxyTable = config.dev.proxyTable 22 | 23 | var app = express() 24 | var compiler = webpack(webpackConfig) 25 | 26 | var devMiddleware = require('webpack-dev-middleware')(compiler, { 27 | publicPath: webpackConfig.output.publicPath, 28 | quiet: true 29 | }) 30 | 31 | var hotMiddleware = require('webpack-hot-middleware')(compiler, { 32 | log: false, 33 | heartbeat: 2000 34 | }) 35 | // force page reload when html-webpack-plugin template changes 36 | compiler.plugin('compilation', function (compilation) { 37 | compilation.plugin('html-webpack-plugin-after-emit', function (data, cb) { 38 | hotMiddleware.publish({ action: 'reload' }) 39 | cb() 40 | }) 41 | }) 42 | 43 | // proxy api requests 44 | Object.keys(proxyTable).forEach(function (context) { 45 | var options = proxyTable[context] 46 | if (typeof options === 'string') { 47 | options = { target: options } 48 | } 49 | app.use(proxyMiddleware(options.filter || context, options)) 50 | }) 51 | 52 | // handle fallback for HTML5 history API 53 | app.use(require('connect-history-api-fallback')()) 54 | 55 | // serve webpack bundle output 56 | app.use(devMiddleware) 57 | 58 | // enable hot-reload and state-preserving 59 | // compilation error display 60 | app.use(hotMiddleware) 61 | 62 | // serve pure static assets 63 | var staticPath = path.posix.join(config.dev.assetsPublicPath, config.dev.assetsSubDirectory) 64 | app.use(staticPath, express.static('./static')) 65 | 66 | var uri = 'http://localhost:' + port 67 | 68 | var _resolve 69 | var readyPromise = new Promise(resolve => { 70 | _resolve = resolve 71 | }) 72 | 73 | console.log('> Starting dev server...') 74 | devMiddleware.waitUntilValid(() => { 75 | console.log('> Listening at ' + uri + '\n') 76 | // when env is testing, don't need open it 77 | if (autoOpenBrowser && process.env.NODE_ENV !== 'testing') { 78 | opn(uri) 79 | } 80 | _resolve() 81 | }) 82 | 83 | var server = app.listen(port) 84 | 85 | module.exports = { 86 | ready: readyPromise, 87 | close: () => { 88 | server.close() 89 | } 90 | } 91 | -------------------------------------------------------------------------------- /build/utils.js: -------------------------------------------------------------------------------- 1 | var path = require('path') 2 | var config = require('../config') 3 | var ExtractTextPlugin = require('extract-text-webpack-plugin') 4 | 5 | exports.assetsPath = function (_path) { 6 | var assetsSubDirectory = process.env.NODE_ENV === 'production' 7 | ? config.build.assetsSubDirectory 8 | : config.dev.assetsSubDirectory 9 | return path.posix.join(assetsSubDirectory, _path) 10 | } 11 | 12 | exports.cssLoaders = function (options) { 13 | options = options || {} 14 | 15 | var cssLoader = { 16 | loader: 'css-loader', 17 | options: { 18 | minimize: process.env.NODE_ENV === 'production', 19 | sourceMap: options.sourceMap 20 | } 21 | } 22 | 23 | // generate loader string to be used with extract text plugin 24 | function generateLoaders (loader, loaderOptions) { 25 | var loaders = [cssLoader] 26 | if (loader) { 27 | loaders.push({ 28 | loader: loader + '-loader', 29 | options: Object.assign({}, loaderOptions, { 30 | sourceMap: options.sourceMap 31 | }) 32 | }) 33 | } 34 | 35 | // Extract CSS when that option is specified 36 | // (which is the case during production build) 37 | if (options.extract) { 38 | return ExtractTextPlugin.extract({ 39 | use: loaders, 40 | fallback: 'vue-style-loader' 41 | }) 42 | } else { 43 | return ['vue-style-loader'].concat(loaders) 44 | } 45 | } 46 | 47 | // https://vue-loader.vuejs.org/en/configurations/extract-css.html 48 | return { 49 | css: generateLoaders(), 50 | postcss: generateLoaders(), 51 | less: generateLoaders('less'), 52 | sass: generateLoaders('sass', { indentedSyntax: true }), 53 | scss: generateLoaders('sass'), 54 | stylus: generateLoaders('stylus'), 55 | styl: generateLoaders('stylus') 56 | } 57 | } 58 | 59 | // Generate loaders for standalone style files (outside of .vue) 60 | exports.styleLoaders = function (options) { 61 | var output = [] 62 | var loaders = exports.cssLoaders(options) 63 | for (var extension in loaders) { 64 | var loader = loaders[extension] 65 | output.push({ 66 | test: new RegExp('\\.' + extension + '$'), 67 | use: loader 68 | }) 69 | } 70 | return output 71 | } 72 | -------------------------------------------------------------------------------- /build/vue-loader.conf.js: -------------------------------------------------------------------------------- 1 | var utils = require('./utils') 2 | var config = require('../config') 3 | var isProduction = process.env.NODE_ENV === 'production' 4 | 5 | module.exports = { 6 | loaders: utils.cssLoaders({ 7 | sourceMap: isProduction 8 | ? config.build.productionSourceMap 9 | : config.dev.cssSourceMap, 10 | extract: isProduction 11 | }), 12 | transformToRequire: { 13 | video: 'src', 14 | source: 'src', 15 | img: 'src', 16 | image: 'xlink:href' 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /build/webpack.base.conf.js: -------------------------------------------------------------------------------- 1 | var path = require('path') 2 | var utils = require('./utils') 3 | var config = require('../config') 4 | var vueLoaderConfig = require('./vue-loader.conf') 5 | 6 | function resolve (dir) { 7 | return path.join(__dirname, '..', dir) 8 | } 9 | 10 | module.exports = { 11 | entry: { 12 | app: './src/main.js' 13 | }, 14 | output: { 15 | path: config.build.assetsRoot, 16 | filename: '[name].js', 17 | publicPath: process.env.NODE_ENV === 'production' 18 | ? config.build.assetsPublicPath 19 | : config.dev.assetsPublicPath 20 | }, 21 | resolve: { 22 | extensions: ['.js', '.vue', '.json'], 23 | alias: { 24 | 'vue$': 'vue/dist/vue.esm.js', 25 | '@': resolve('src'), 26 | } 27 | }, 28 | module: { 29 | rules: [ 30 | { 31 | test: /\.vue$/, 32 | loader: 'vue-loader', 33 | options: vueLoaderConfig 34 | }, 35 | { 36 | test: /\.js$/, 37 | loader: 'babel-loader', 38 | include: [resolve('src'), resolve('test')] 39 | }, 40 | { 41 | test: /\.(png|jpe?g|gif|svg)(\?.*)?$/, 42 | loader: 'url-loader', 43 | options: { 44 | limit: 10000, 45 | name: utils.assetsPath('img/[name].[hash:7].[ext]') 46 | } 47 | }, 48 | { 49 | test: /\.(mp4|webm|ogg|mp3|wav|flac|aac)(\?.*)?$/, 50 | loader: 'url-loader', 51 | options: { 52 | limit: 10000, 53 | name: utils.assetsPath('media/[name].[hash:7].[ext]') 54 | } 55 | }, 56 | { 57 | test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/, 58 | loader: 'url-loader', 59 | options: { 60 | limit: 10000, 61 | name: utils.assetsPath('fonts/[name].[hash:7].[ext]') 62 | } 63 | } 64 | ] 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /build/webpack.dev.conf.js: -------------------------------------------------------------------------------- 1 | var utils = require('./utils') 2 | var webpack = require('webpack') 3 | var config = require('../config') 4 | var merge = require('webpack-merge') 5 | var baseWebpackConfig = require('./webpack.base.conf') 6 | var HtmlWebpackPlugin = require('html-webpack-plugin') 7 | var FriendlyErrorsPlugin = require('friendly-errors-webpack-plugin') 8 | 9 | // add hot-reload related code to entry chunks 10 | Object.keys(baseWebpackConfig.entry).forEach(function (name) { 11 | baseWebpackConfig.entry[name] = ['./build/dev-client'].concat(baseWebpackConfig.entry[name]) 12 | }) 13 | 14 | module.exports = merge(baseWebpackConfig, { 15 | module: { 16 | rules: utils.styleLoaders({ sourceMap: config.dev.cssSourceMap }) 17 | }, 18 | // cheap-module-eval-source-map is faster for development 19 | devtool: '#cheap-module-eval-source-map', 20 | plugins: [ 21 | new webpack.DefinePlugin({ 22 | 'process.env': config.dev.env 23 | }), 24 | // https://github.com/glenjamin/webpack-hot-middleware#installation--usage 25 | new webpack.HotModuleReplacementPlugin(), 26 | new webpack.NoEmitOnErrorsPlugin(), 27 | // https://github.com/ampedandwired/html-webpack-plugin 28 | new HtmlWebpackPlugin({ 29 | filename: 'index.html', 30 | template: 'index.html', 31 | inject: true 32 | }), 33 | new FriendlyErrorsPlugin() 34 | ] 35 | }) 36 | -------------------------------------------------------------------------------- /build/webpack.prod.conf.js: -------------------------------------------------------------------------------- 1 | var path = require('path') 2 | var utils = require('./utils') 3 | var webpack = require('webpack') 4 | var config = require('../config') 5 | var merge = require('webpack-merge') 6 | var baseWebpackConfig = require('./webpack.base.conf') 7 | var CopyWebpackPlugin = require('copy-webpack-plugin') 8 | var HtmlWebpackPlugin = require('html-webpack-plugin') 9 | var ExtractTextPlugin = require('extract-text-webpack-plugin') 10 | var OptimizeCSSPlugin = require('optimize-css-assets-webpack-plugin') 11 | 12 | var env = config.build.env 13 | 14 | var webpackConfig = merge(baseWebpackConfig, { 15 | module: { 16 | rules: utils.styleLoaders({ 17 | sourceMap: config.build.productionSourceMap, 18 | extract: true 19 | }) 20 | }, 21 | devtool: config.build.productionSourceMap ? '#source-map' : false, 22 | output: { 23 | path: config.build.assetsRoot, 24 | filename: utils.assetsPath('js/[name].[chunkhash].js'), 25 | chunkFilename: utils.assetsPath('js/[id].[chunkhash].js') 26 | }, 27 | plugins: [ 28 | // http://vuejs.github.io/vue-loader/en/workflow/production.html 29 | new webpack.DefinePlugin({ 30 | 'process.env': env 31 | }), 32 | new webpack.optimize.UglifyJsPlugin({ 33 | compress: { 34 | warnings: false 35 | }, 36 | sourceMap: true 37 | }), 38 | // extract css into its own file 39 | new ExtractTextPlugin({ 40 | filename: utils.assetsPath('css/[name].[contenthash].css') 41 | }), 42 | // Compress extracted CSS. We are using this plugin so that possible 43 | // duplicated CSS from different components can be deduped. 44 | new OptimizeCSSPlugin({ 45 | cssProcessorOptions: { 46 | safe: true 47 | } 48 | }), 49 | // generate dist index.html with correct asset hash for caching. 50 | // you can customize output by editing /index.html 51 | // see https://github.com/ampedandwired/html-webpack-plugin 52 | new HtmlWebpackPlugin({ 53 | filename: config.build.index, 54 | template: 'index.html', 55 | inject: true, 56 | minify: { 57 | removeComments: true, 58 | collapseWhitespace: true, 59 | removeAttributeQuotes: true 60 | // more options: 61 | // https://github.com/kangax/html-minifier#options-quick-reference 62 | }, 63 | // necessary to consistently work with multiple chunks via CommonsChunkPlugin 64 | chunksSortMode: 'dependency' 65 | }), 66 | // keep module.id stable when vender modules does not change 67 | new webpack.HashedModuleIdsPlugin(), 68 | // split vendor js into its own file 69 | new webpack.optimize.CommonsChunkPlugin({ 70 | name: 'vendor', 71 | minChunks: function (module, count) { 72 | // any required modules inside node_modules are extracted to vendor 73 | return ( 74 | module.resource && 75 | /\.js$/.test(module.resource) && 76 | module.resource.indexOf( 77 | path.join(__dirname, '../node_modules') 78 | ) === 0 79 | ) 80 | } 81 | }), 82 | // extract webpack runtime and module manifest to its own file in order to 83 | // prevent vendor hash from being updated whenever app bundle is updated 84 | new webpack.optimize.CommonsChunkPlugin({ 85 | name: 'manifest', 86 | chunks: ['vendor'] 87 | }), 88 | // copy custom static assets 89 | new CopyWebpackPlugin([ 90 | { 91 | from: path.resolve(__dirname, '../static'), 92 | to: config.build.assetsSubDirectory, 93 | ignore: ['.*'] 94 | } 95 | ]) 96 | ] 97 | }) 98 | 99 | if (config.build.productionGzip) { 100 | var CompressionWebpackPlugin = require('compression-webpack-plugin') 101 | 102 | webpackConfig.plugins.push( 103 | new CompressionWebpackPlugin({ 104 | asset: '[path].gz[query]', 105 | algorithm: 'gzip', 106 | test: new RegExp( 107 | '\\.(' + 108 | config.build.productionGzipExtensions.join('|') + 109 | ')$' 110 | ), 111 | threshold: 10240, 112 | minRatio: 0.8 113 | }) 114 | ) 115 | } 116 | 117 | if (config.build.bundleAnalyzerReport) { 118 | var BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin 119 | webpackConfig.plugins.push(new BundleAnalyzerPlugin()) 120 | } 121 | 122 | module.exports = webpackConfig 123 | -------------------------------------------------------------------------------- /config/dev.env.js: -------------------------------------------------------------------------------- 1 | var merge = require('webpack-merge') 2 | var prodEnv = require('./prod.env') 3 | 4 | module.exports = merge(prodEnv, { 5 | NODE_ENV: '"development"' 6 | }) 7 | -------------------------------------------------------------------------------- /config/index.js: -------------------------------------------------------------------------------- 1 | // see http://vuejs-templates.github.io/webpack for documentation. 2 | var path = require('path') 3 | 4 | module.exports = { 5 | build: { 6 | env: require('./prod.env'), 7 | index: path.resolve(__dirname, '../dist/index.html'), 8 | assetsRoot: path.resolve(__dirname, '../dist'), 9 | assetsSubDirectory: 'static', 10 | assetsPublicPath: '/', 11 | productionSourceMap: true, 12 | // Gzip off by default as many popular static hosts such as 13 | // Surge or Netlify already gzip all static assets for you. 14 | // Before setting to `true`, make sure to: 15 | // npm install --save-dev compression-webpack-plugin 16 | productionGzip: false, 17 | productionGzipExtensions: ['js', 'css'], 18 | // Run the build command with an extra argument to 19 | // View the bundle analyzer report after build finishes: 20 | // `npm run build --report` 21 | // Set to `true` or `false` to always turn it on or off 22 | bundleAnalyzerReport: process.env.npm_config_report 23 | }, 24 | dev: { 25 | env: require('./dev.env'), 26 | port: 8080, 27 | autoOpenBrowser: true, 28 | assetsSubDirectory: 'static', 29 | assetsPublicPath: '/', 30 | proxyTable: { 31 | '/one': { 32 | target: 'http://v3.wufazhuce.com:8000/api', 33 | changeOrigin: true, 34 | pathRewrite: { 35 | '^/one': '/' 36 | } 37 | } 38 | }, 39 | // CSS Sourcemaps off by default because relative paths are "buggy" 40 | // with this option, according to the CSS-Loader README 41 | // (https://github.com/webpack/css-loader#sourcemaps) 42 | // In our experience, they generally work as expected, 43 | // just be aware of this issue when enabling this option. 44 | cssSourceMap: false 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /config/prod.env.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | NODE_ENV: '"production"' 3 | } 4 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 「ONE · 一个」 6 | 7 | 8 |
9 | 10 | 11 | 27 | 28 | 112 | 113 | 114 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "one-project", 3 | "version": "1.0.0", 4 | "description": "A Vue.js project", 5 | "author": "GeZhihao", 6 | "private": true, 7 | "scripts": { 8 | "dev": "node build/dev-server.js", 9 | "start": "node build/dev-server.js", 10 | "build": "node build/build.js" 11 | }, 12 | "dependencies": { 13 | "better-scroll": "^1.3.1", 14 | "less": "^2.7.2", 15 | "less-loader": "^4.0.5", 16 | "mint-ui": "^2.2.9", 17 | "vue": "^2.4.2", 18 | "vue-router": "^2.7.0", 19 | "vue-spinner": "^1.0.3", 20 | "vuex": "^2.4.0" 21 | }, 22 | "devDependencies": { 23 | "autoprefixer": "^7.1.2", 24 | "babel-core": "^6.22.1", 25 | "babel-loader": "^7.1.1", 26 | "babel-plugin-transform-runtime": "^6.22.0", 27 | "babel-preset-env": "^1.3.2", 28 | "babel-preset-stage-2": "^6.22.0", 29 | "babel-register": "^6.22.0", 30 | "chalk": "^2.0.1", 31 | "connect-history-api-fallback": "^1.3.0", 32 | "copy-webpack-plugin": "^4.0.1", 33 | "css-loader": "^0.28.0", 34 | "cssnano": "^3.10.0", 35 | "eventsource-polyfill": "^0.9.6", 36 | "express": "^4.14.1", 37 | "extract-text-webpack-plugin": "^2.0.0", 38 | "file-loader": "^0.11.1", 39 | "friendly-errors-webpack-plugin": "^1.1.3", 40 | "html-webpack-plugin": "^2.28.0", 41 | "http-proxy-middleware": "^0.17.3", 42 | "webpack-bundle-analyzer": "^2.2.1", 43 | "semver": "^5.3.0", 44 | "shelljs": "^0.7.6", 45 | "opn": "^5.1.0", 46 | "optimize-css-assets-webpack-plugin": "^2.0.0", 47 | "ora": "^1.2.0", 48 | "rimraf": "^2.6.0", 49 | "url-loader": "^0.5.8", 50 | "vue-loader": "^13.0.4", 51 | "vue-style-loader": "^3.0.1", 52 | "vue-template-compiler": "^2.4.2", 53 | "webpack": "^2.6.1", 54 | "webpack-dev-middleware": "^1.10.0", 55 | "webpack-hot-middleware": "^2.18.0", 56 | "webpack-merge": "^4.1.0" 57 | }, 58 | "engines": { 59 | "node": ">= 4.0.0", 60 | "npm": ">= 3.0.0" 61 | }, 62 | "browserslist": [ 63 | "> 1%", 64 | "last 2 versions", 65 | "not ie <= 8" 66 | ] 67 | } 68 | -------------------------------------------------------------------------------- /src/App.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | -------------------------------------------------------------------------------- /src/assets/css/contentLis.css: -------------------------------------------------------------------------------- 1 | .authorAll .authorMsg { 2 | background: #fff; 3 | position: relative; 4 | padding: 1.92rem .96rem .24rem; 5 | margin-bottom: .1rem; 6 | } 7 | .authorAll .authorMsg span { 8 | width: .87rem; 9 | height: .88rem; 10 | position: absolute; 11 | top: .38rem; 12 | left: .08rem; 13 | background: url("../img/sprite.png") 0 -7.1rem no-repeat; 14 | background-size: 10rem 15rem; 15 | } 16 | .authorAll .authorMsg img { 17 | width: 1.04rem; 18 | height: 1.04rem; 19 | position: absolute; 20 | top: .62rem; 21 | left: 2.68rem; 22 | border-radius: 50%; 23 | } 24 | .authorAll .authorMsg h1 { 25 | height: .3rem; 26 | font-size: .3rem; 27 | line-height: 1; 28 | color: #000; 29 | text-align: center; 30 | font-weight: bold; 31 | } 32 | .authorAll .authorMsg h2 { 33 | height: .76rem; 34 | font-size: .22rem; 35 | line-height: .76rem; 36 | color: #999; 37 | text-align: center; 38 | } 39 | .authorAll .authorMsg p { 40 | font-size: .22rem; 41 | line-height: .26rem; 42 | color: #4a4a4a; 43 | text-align: center; 44 | margin-bottom: 1.1rem; 45 | } 46 | .authorAll .authorMsg button { 47 | position: absolute; 48 | bottom: .61rem; 49 | left: 2.72rem; 50 | width: .96rem; 51 | height: .6rem; 52 | border: .02rem solid #aeaeae; 53 | border-radius: 0.05rem; 54 | font-size: .22rem; 55 | line-height: .56rem; 56 | color: #333; 57 | background: #fff; 58 | } 59 | .authorMsg button.active { 60 | background: #d9d9d9; 61 | border: none; 62 | line-height: .6rem; 63 | } 64 | .authorAll .authorMsg h3 { 65 | height: .2rem; 66 | font-size: .2rem; 67 | line-height: 1; 68 | color: #d7d7d7; 69 | text-align: center; 70 | } 71 | .authorAll .text, 72 | .m-content .text { 73 | background: #fff; 74 | padding: 0 .4rem 0; 75 | margin-bottom: .1rem; 76 | } 77 | .authorAll .text h2, 78 | .m-content .text h2 { 79 | height: .74rem; 80 | font-size: .24rem; 81 | line-height: .74rem; 82 | color: #a6a6a6; 83 | text-align: center; 84 | } 85 | .authorAll .text h3, 86 | .m-content .text h3 { 87 | font-size: .38rem; 88 | line-height: .68rem; 89 | color: #333; 90 | } 91 | .authorAll .text h4, 92 | .m-content .text h4 { 93 | display: block; 94 | height: .72rem; 95 | font-size: .26rem; 96 | line-height: .72rem; 97 | color: #808080; 98 | } 99 | .authorAll .pic img, 100 | .m-content .pic img { 101 | width: 100%; 102 | height: 3.42rem; 103 | } 104 | .authorAll .musicPic, 105 | .m-content .musicPic { 106 | width: 100%; 107 | height: 3.42rem; 108 | position: relative; 109 | } 110 | .authorAll .musicPic .musicCover, 111 | .m-content .musicPic .musicCover { 112 | width: 3.4rem; 113 | height: 3.42rem; 114 | position: absolute; 115 | top: 0; 116 | left: 1.14rem; 117 | border-radius: 50%; 118 | } 119 | .musicCover img { 120 | width: 3.4rem; 121 | height: 3.42rem; 122 | border-radius: 50%; 123 | } 124 | .authorAll .musicPic .play, 125 | .m-content .musicPic .play { 126 | width: .8rem; 127 | height: .8rem; 128 | position: absolute; 129 | top: 1.3rem; 130 | left: 2.44rem; 131 | background: rgba(0,0,0,.7) url("../img/sprite.png") -3.13rem -1.64rem no-repeat; 132 | background-size: 10rem 15rem; 133 | z-index: 666; 134 | border-radius: 50%; 135 | } 136 | .authorAll .play.stop, 137 | .musicPic .play.stop { 138 | background-position: -2.13rem -1.64rem !important; 139 | } 140 | .authorAll .musicPic .icon, 141 | .m-content .musicPic .icon { 142 | width: .4rem; 143 | height: .4rem; 144 | position: absolute; 145 | left: 0; 146 | bottom: .2rem; 147 | background: url("../img/sprite.png") 0 -9.25rem no-repeat; 148 | background-size: 10rem 15rem; 149 | } 150 | .authorAll .text p, 151 | .m-content .text p { 152 | font-size: .26rem; 153 | line-height: .56rem; 154 | margin: .12rem 0 .4rem; 155 | color: #666; 156 | } 157 | .authorAll nav , 158 | .m-content nav { 159 | overflow: hidden; 160 | } 161 | .authorAll nav span, 162 | .m-content nav span { 163 | float: left; 164 | height: .8rem; 165 | color: #a6a6a6; 166 | } 167 | .authorAll nav span:nth-of-type(1), 168 | .m-content nav span:nth-of-type(1) { 169 | width: 4rem; 170 | font-size: .24rem; 171 | line-height: .8rem; 172 | } 173 | .authorAll nav span:nth-of-type(2), 174 | .m-content nav span:nth-of-type(2) { 175 | width: .78rem; 176 | background: url("../img/sprite.png") 0 -.84rem no-repeat; 177 | background-size: 10rem 15rem; 178 | font-size: .18rem; 179 | line-height: 1; 180 | color: #a6a6a6; 181 | padding: .16rem 0 0 .32rem; 182 | box-sizing: border-box; 183 | } 184 | .authorAll nav span:nth-of-type(2).active, 185 | .m-content nav span:nth-of-type(2).active { 186 | background: url("../img/sprite.png") -4.48rem -7.98rem no-repeat; 187 | background-size: 10rem 15rem; 188 | } 189 | .authorAll nav span:nth-of-type(3), 190 | .m-content nav span:nth-of-type(3) { 191 | width: .82rem; 192 | background: url("../img/sprite.png") 0 -1.66rem no-repeat; 193 | background-size: 10rem 15rem; 194 | } 195 | .authorAll nav span:nth-of-type(3).active, 196 | .m-content nav span:nth-of-type(3).active { 197 | background: url("../img/sprite.png") -5.48rem -7.98rem no-repeat; 198 | background-size: 10rem 15rem; 199 | } 200 | .m-content .prev { 201 | height: 3.79rem; 202 | } 203 | .m-content .prev img { 204 | width: 100%; 205 | height: 3.79rem; 206 | } 207 | .collectHint { 208 | border-radius: .1rem; 209 | background: rgba(0,0,0,.6); 210 | } 211 | .collectHint .mint-toast-text { 212 | font-size: .26rem; 213 | line-height: .94rem; 214 | margin: 0 .3rem; 215 | } -------------------------------------------------------------------------------- /src/assets/css/contents.css: -------------------------------------------------------------------------------- 1 | .content-reading, 2 | .content-serial, 3 | .content-question, 4 | .content-music, 5 | .content-movie { 6 | background: #fff; 7 | } 8 | .musicImg { 9 | height: 4.1rem; 10 | position: relative; 11 | } 12 | .musicImg img:nth-of-type(1) { 13 | position: absolute; 14 | top: 0; 15 | left: 0; 16 | width: 100%; 17 | height: 4.1rem; 18 | } 19 | .musicImg img:nth-of-type(2) { 20 | position: absolute; 21 | width: 2.4rem; 22 | height: 2.4rem; 23 | top: .76rem; 24 | left: 2rem; 25 | } 26 | .musicImg .play { 27 | width: .8rem; 28 | height: .8rem; 29 | position: absolute; 30 | top: 1.56rem; 31 | left: 2.8rem; 32 | background: rgba(0,0,0,.7) url("../img/sprite.png") -3.13rem -1.64rem no-repeat; 33 | background-size: 10rem 15rem; 34 | z-index: 666; 35 | border-radius: 50%; 36 | } 37 | .musicImg .play.stop { 38 | background-position: -2.13rem -1.64rem !important; 39 | } 40 | .musicImg p { 41 | position: absolute; 42 | bottom: 0; 43 | left: 0; 44 | width: 100%; 45 | height: 1.04rem; 46 | font-size: .24rem; 47 | line-height: 1.04rem; 48 | text-align: center; 49 | color: #d8d8d8; 50 | } 51 | .movieImg { 52 | height: 4.1rem; 53 | position: relative; 54 | } 55 | .movieImg img:nth-of-type(1) { 56 | position: absolute; 57 | top: 0; 58 | left: 0; 59 | width: 100%; 60 | height: 4.1rem; 61 | } 62 | .movieImg .tarns { 63 | position: absolute; 64 | bottom: 0; 65 | left: 0; 66 | width: 100%; 67 | height: .2rem; 68 | padding: .1rem 0; 69 | background: rgba(0,0,0,.4); 70 | overflow: hidden; 71 | } 72 | .tarns strong{ 73 | float: left; 74 | width: .2rem; 75 | height: .2rem; 76 | margin: 0 .3rem; 77 | background: #8e8d8f; 78 | } 79 | .movieImg p { 80 | position: absolute; 81 | bottom: .2rem; 82 | left: 0; 83 | width: 100%; 84 | height: 1.04rem; 85 | font-size: .24rem; 86 | line-height: 1.04rem; 87 | text-align: center; 88 | color: #d8d8d8; 89 | } 90 | .content { 91 | padding: 0 .41rem; 92 | color: #333; 93 | background: #fff; 94 | } 95 | .content h2 { 96 | padding: .6rem 0; 97 | font-size: .46rem; 98 | line-height: .72rem; 99 | font-weight: bold; 100 | color: #000; 101 | } 102 | .content h3 { 103 | font-size: .24rem; 104 | line-height: .64rem; 105 | padding-bottom: .58rem; 106 | } 107 | .content .text { 108 | font-size: .32rem; 109 | line-height: .64rem; 110 | } 111 | .content p { 112 | font-size: .32rem; 113 | line-height: .64rem; 114 | padding-bottom: .4rem; 115 | } 116 | .content .asker { 117 | padding-bottom: .1rem; 118 | } 119 | .content .questionText { 120 | padding-bottom: .45rem; 121 | border-bottom: .02rem solid #f3f3f3; 122 | margin-bottom: .43rem; 123 | } 124 | .content .answerer { 125 | line-height: .86rem; 126 | padding-bottom: 0; 127 | } 128 | .content img { 129 | width: 100%; 130 | height: auto; 131 | margin-bottom: .5rem; 132 | } 133 | .content .supplement { 134 | font-size: .18rem; 135 | line-height: .42rem; 136 | color: #808080; 137 | width: 100%; 138 | padding-bottom: 0; 139 | overflow : hidden; 140 | text-overflow: ellipsis; 141 | display: -webkit-box; 142 | -webkit-box-orient: vertical; 143 | -webkit-line-clamp: 1; 144 | } 145 | .content .supplement:nth-of-type(1) { 146 | margin-top: .1rem; 147 | } 148 | .author { 149 | margin-top: .36rem; 150 | position: relative; 151 | padding: 1.26rem .41rem 0; 152 | height: 1.66rem; 153 | background: #fff; 154 | } 155 | .author h3 { 156 | width: 1.2rem; 157 | height: .84rem; 158 | position: absolute; 159 | top: 0; 160 | left: .41rem; 161 | font-size: .26rem; 162 | line-height: .84rem; 163 | border-bottom: .08rem solid #000; 164 | } 165 | .author img { 166 | position: absolute; 167 | top: 1.26rem; 168 | left: .41rem; 169 | width: .8rem; 170 | height: .8rem; 171 | border-radius: 50%; 172 | } 173 | .author p { 174 | padding-left: 1.06rem; 175 | width: 3.3rem; 176 | overflow : hidden; 177 | text-overflow: ellipsis; 178 | display: -webkit-box; 179 | -webkit-box-orient: vertical; 180 | -webkit-line-clamp: 1; 181 | } 182 | .author p:nth-of-type(1) { 183 | font-size: .28rem; 184 | line-height: .4rem; 185 | color: #333; 186 | } 187 | .author p:nth-of-type(2) { 188 | font-size: .24rem; 189 | line-height: .44rem; 190 | color: #808080; 191 | } 192 | .author button { 193 | position: absolute; 194 | top: 1.28rem; 195 | right: .42rem; 196 | width: .88rem; 197 | height: .6rem; 198 | border: .02rem solid #b3b3b3; 199 | border-radius: 0.05rem; 200 | font-size: .22rem; 201 | line-height: .56rem; 202 | color: #808080; 203 | background: #fff; 204 | } 205 | .author button.active { 206 | background: #d9d9d9; 207 | border: none; 208 | line-height: .6rem; 209 | } -------------------------------------------------------------------------------- /src/assets/effect/ALL.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A1man/vue-project/c988365c31aa5f3ab97ec057ff6630523ca1493c/src/assets/effect/ALL.gif -------------------------------------------------------------------------------- /src/assets/effect/ALL.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A1man/vue-project/c988365c31aa5f3ab97ec057ff6630523ca1493c/src/assets/effect/ALL.jpg -------------------------------------------------------------------------------- /src/assets/effect/ME.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A1man/vue-project/c988365c31aa5f3ab97ec057ff6630523ca1493c/src/assets/effect/ME.gif -------------------------------------------------------------------------------- /src/assets/effect/ME.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A1man/vue-project/c988365c31aa5f3ab97ec057ff6630523ca1493c/src/assets/effect/ME.jpg -------------------------------------------------------------------------------- /src/assets/effect/ONE.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A1man/vue-project/c988365c31aa5f3ab97ec057ff6630523ca1493c/src/assets/effect/ONE.gif -------------------------------------------------------------------------------- /src/assets/effect/ONE.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A1man/vue-project/c988365c31aa5f3ab97ec057ff6630523ca1493c/src/assets/effect/ONE.jpg -------------------------------------------------------------------------------- /src/assets/effect/search.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A1man/vue-project/c988365c31aa5f3ab97ec057ff6630523ca1493c/src/assets/effect/search.gif -------------------------------------------------------------------------------- /src/assets/effect/search.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A1man/vue-project/c988365c31aa5f3ab97ec057ff6630523ca1493c/src/assets/effect/search.jpg -------------------------------------------------------------------------------- /src/assets/img/collectBg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A1man/vue-project/c988365c31aa5f3ab97ec057ff6630523ca1493c/src/assets/img/collectBg.png -------------------------------------------------------------------------------- /src/assets/img/guide.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A1man/vue-project/c988365c31aa5f3ab97ec057ff6630523ca1493c/src/assets/img/guide.png -------------------------------------------------------------------------------- /src/assets/img/hp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A1man/vue-project/c988365c31aa5f3ab97ec057ff6630523ca1493c/src/assets/img/hp.png -------------------------------------------------------------------------------- /src/assets/img/interestBg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A1man/vue-project/c988365c31aa5f3ab97ec057ff6630523ca1493c/src/assets/img/interestBg.png -------------------------------------------------------------------------------- /src/assets/img/loginBg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A1man/vue-project/c988365c31aa5f3ab97ec057ff6630523ca1493c/src/assets/img/loginBg.png -------------------------------------------------------------------------------- /src/assets/img/logo1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A1man/vue-project/c988365c31aa5f3ab97ec057ff6630523ca1493c/src/assets/img/logo1.png -------------------------------------------------------------------------------- /src/assets/img/movie.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A1man/vue-project/c988365c31aa5f3ab97ec057ff6630523ca1493c/src/assets/img/movie.png -------------------------------------------------------------------------------- /src/assets/img/msgBg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A1man/vue-project/c988365c31aa5f3ab97ec057ff6630523ca1493c/src/assets/img/msgBg.jpg -------------------------------------------------------------------------------- /src/assets/img/music.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A1man/vue-project/c988365c31aa5f3ab97ec057ff6630523ca1493c/src/assets/img/music.png -------------------------------------------------------------------------------- /src/assets/img/photo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A1man/vue-project/c988365c31aa5f3ab97ec057ff6630523ca1493c/src/assets/img/photo.png -------------------------------------------------------------------------------- /src/assets/img/prev.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A1man/vue-project/c988365c31aa5f3ab97ec057ff6630523ca1493c/src/assets/img/prev.png -------------------------------------------------------------------------------- /src/assets/img/question.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A1man/vue-project/c988365c31aa5f3ab97ec057ff6630523ca1493c/src/assets/img/question.png -------------------------------------------------------------------------------- /src/assets/img/read.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A1man/vue-project/c988365c31aa5f3ab97ec057ff6630523ca1493c/src/assets/img/read.png -------------------------------------------------------------------------------- /src/assets/img/searchBg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A1man/vue-project/c988365c31aa5f3ab97ec057ff6630523ca1493c/src/assets/img/searchBg.png -------------------------------------------------------------------------------- /src/assets/img/serial.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A1man/vue-project/c988365c31aa5f3ab97ec057ff6630523ca1493c/src/assets/img/serial.png -------------------------------------------------------------------------------- /src/assets/img/sprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A1man/vue-project/c988365c31aa5f3ab97ec057ff6630523ca1493c/src/assets/img/sprite.png -------------------------------------------------------------------------------- /src/assets/img/sprite.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A1man/vue-project/c988365c31aa5f3ab97ec057ff6630523ca1493c/src/assets/img/sprite.psd -------------------------------------------------------------------------------- /src/components/banners/banner-content.vue: -------------------------------------------------------------------------------- 1 | 36 | 37 | 164 | 165 | -------------------------------------------------------------------------------- /src/components/banners/banner.vue: -------------------------------------------------------------------------------- 1 | 23 | 24 | 209 | -------------------------------------------------------------------------------- /src/components/classifys/classify.vue: -------------------------------------------------------------------------------- 1 | 36 | 37 | 159 | 160 | -------------------------------------------------------------------------------- /src/components/contents/content-comment.vue: -------------------------------------------------------------------------------- 1 | 37 | 38 | 78 | 79 | -------------------------------------------------------------------------------- /src/components/contents/content-footer.vue: -------------------------------------------------------------------------------- 1 | 16 | 17 | 118 | 119 | -------------------------------------------------------------------------------- /src/components/contents/content-header.vue: -------------------------------------------------------------------------------- 1 | 30 | 31 | 288 | -------------------------------------------------------------------------------- /src/components/contents/content-hp.vue: -------------------------------------------------------------------------------- 1 | 9 | 10 | 21 | 22 | -------------------------------------------------------------------------------- /src/components/contents/content-movie.vue: -------------------------------------------------------------------------------- 1 | 35 | 36 | 99 | 100 | -------------------------------------------------------------------------------- /src/components/contents/content-music.vue: -------------------------------------------------------------------------------- 1 | 30 | 31 | 121 | 122 | -------------------------------------------------------------------------------- /src/components/contents/content-question.vue: -------------------------------------------------------------------------------- 1 | 23 | 24 | 85 | 86 | -------------------------------------------------------------------------------- /src/components/contents/content-reading.vue: -------------------------------------------------------------------------------- 1 | 21 | 22 | 83 | 84 | -------------------------------------------------------------------------------- /src/components/contents/content-serial.vue: -------------------------------------------------------------------------------- 1 | 21 | 22 | 83 | 84 | -------------------------------------------------------------------------------- /src/components/contents/detail.vue: -------------------------------------------------------------------------------- 1 | 29 | 30 | 31 | 277 | -------------------------------------------------------------------------------- /src/components/homePage/guide.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 17 | 18 | 29 | -------------------------------------------------------------------------------- /src/components/homePage/index.vue: -------------------------------------------------------------------------------- 1 | 55 | 56 | 254 | 255 | -------------------------------------------------------------------------------- /src/components/homePage/m-content.vue: -------------------------------------------------------------------------------- 1 | 36 | 37 | 317 | -------------------------------------------------------------------------------- /src/components/homePage/m-footer.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | 82 | 83 | 128 | 129 | -------------------------------------------------------------------------------- /src/components/homePage/m-header.vue: -------------------------------------------------------------------------------- 1 | 15 | 16 | 159 | 160 | 216 | -------------------------------------------------------------------------------- /src/components/homePage/m-menu.vue: -------------------------------------------------------------------------------- 1 | 16 | 17 | 87 | 88 | -------------------------------------------------------------------------------- /src/components/homePage/m-notes.vue: -------------------------------------------------------------------------------- 1 | 15 | 16 | 157 | -------------------------------------------------------------------------------- /src/components/isAll/all-banner.vue: -------------------------------------------------------------------------------- 1 | 42 | 43 | 121 | 122 | -------------------------------------------------------------------------------- /src/components/isAll/all-classify.vue: -------------------------------------------------------------------------------- 1 | 27 | 28 | 38 | 39 | -------------------------------------------------------------------------------- /src/components/isAll/all-slide.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | 33 | 34 | -------------------------------------------------------------------------------- /src/components/mine/mine-collect.vue: -------------------------------------------------------------------------------- 1 | 67 | 120 | 121 | -------------------------------------------------------------------------------- /src/components/mine/mine-index.vue: -------------------------------------------------------------------------------- 1 | 39 | 40 | 112 | 113 | -------------------------------------------------------------------------------- /src/components/mine/mine-interest.vue: -------------------------------------------------------------------------------- 1 | 22 | 23 | 47 | 48 | -------------------------------------------------------------------------------- /src/components/scroll.vue: -------------------------------------------------------------------------------- 1 | 6 | 163 | -------------------------------------------------------------------------------- /src/function/changeTime.js: -------------------------------------------------------------------------------- 1 | function changeTime(count,day) { 2 | if(day) { 3 | var date = new Date(day); 4 | } else { 5 | var date = new Date(); 6 | } 7 | date.setDate(date.getDate()+count);//获取count天后的日期 8 | var y = date.getFullYear(); 9 | var m = date.getMonth()+1; 10 | var d = date.getDate(); 11 | return y+"-"+m+"-"+d; 12 | } 13 | export { 14 | changeTime 15 | } -------------------------------------------------------------------------------- /src/function/getTime.js: -------------------------------------------------------------------------------- 1 | function getTime(f) { 2 | const date = new Date(); 3 | let str = f ? f : 'y-m-d h:i:s'; 4 | str = str.replace('y', date.getFullYear()); 5 | str = str.replace('m', toDB(date.getMonth() + 1)); 6 | str = str.replace('d', toDB(date.getDate())); 7 | str = str.replace('h', toDB(date.getHours())); 8 | str = str.replace('i', toDB(date.getMinutes())); 9 | str = str.replace('s', toDB(date.getSeconds())); 10 | return str; 11 | } 12 | 13 | function toDB(nub) { 14 | return nub < 10 ? "0" + nub : "" + nub; 15 | } 16 | 17 | function convert(value) { 18 | return value.replace(/-/g,'/'); 19 | } 20 | 21 | export { 22 | getTime 23 | } -------------------------------------------------------------------------------- /src/function/setDate.js: -------------------------------------------------------------------------------- 1 | //根据 value 得到想要的 f 时间格式 2 | export default function(value,f) { 3 | const date = new Date(convert(value)); 4 | let str = f ? f : 'y-m-d h:i:s'; 5 | str = str.replace('y', date.getFullYear()); 6 | str = str.replace('m', toDB(date.getMonth() + 1)); 7 | str = str.replace('d', toDB(date.getDate())); 8 | str = str.replace('h', toDB(date.getHours())); 9 | str = str.replace('i', toDB(date.getMinutes())); 10 | str = str.replace('s', toDB(date.getSeconds())); 11 | return str; 12 | } 13 | 14 | function toDB(nub) { 15 | return nub < 10 ? "0" + nub : "" + nub; 16 | } 17 | 18 | function convert(value) { 19 | return value.replace(/-/g,'/'); 20 | } -------------------------------------------------------------------------------- /src/function/strSplit.js: -------------------------------------------------------------------------------- 1 | //根据 separator 来分割 value ,得到分割后数组的第 index 个元素 2 | export default function(value,separator,index) { 3 | let str = value.split(separator)[index]; 4 | return str; 5 | } -------------------------------------------------------------------------------- /src/main.js: -------------------------------------------------------------------------------- 1 | // The Vue build version to load with the `import` command 2 | // (runtime-only or standalone) has been set in webpack.base.conf with an alias. 3 | import Vue from 'vue' 4 | import App from './App' 5 | import router from './router' 6 | import store from './store' 7 | import MintUI from 'mint-ui' 8 | import 'mint-ui/lib/style.css' 9 | import RingLoader from 'vue-spinner/src/RingLoader.vue' 10 | 11 | Vue.component('RingLoader', RingLoader) 12 | 13 | Vue.use(MintUI) 14 | 15 | Vue.config.productionTip = false 16 | 17 | /* eslint-disable no-new */ 18 | new Vue({ 19 | el: '#app', 20 | router, 21 | store, 22 | template: '', 23 | components: { App } 24 | }) 25 | -------------------------------------------------------------------------------- /src/router/index.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import Router from 'vue-router' 3 | 4 | import Guide from '@/components/homePage/guide' 5 | import Index from '@/components/homePage/index' 6 | import Detail from '@/components/contents/detail' 7 | import All from '@/components/isAll/all' 8 | import Banner from '@/components/banners/banner' 9 | import Classify from '@/components/classifys/classify' 10 | import MineIndex from '@/components/mine/mine-index' 11 | import MineCollect from '@/components/mine/mine-collect' 12 | import MineInterest from '@/components/mine/mine-interest' 13 | import Author from '@/components/mine/author' 14 | 15 | Vue.use(Router) 16 | 17 | export default new Router({ 18 | routes: [ 19 | { 20 | path: '/', 21 | redirect: '/guide' 22 | }, 23 | { 24 | path: '/guide', 25 | name: 'Guide', 26 | component: Guide 27 | }, 28 | { 29 | path: '/index', 30 | name: 'Index', 31 | component: Index 32 | }, 33 | { 34 | path: '/detail', 35 | name: 'Detail', 36 | component: Detail 37 | }, 38 | { 39 | path: '/all', 40 | name: 'All', 41 | component: All 42 | }, 43 | { 44 | path: '/banner', 45 | name: 'Banner', 46 | component: Banner 47 | }, 48 | { 49 | path: '/classify', 50 | name: 'Classify', 51 | component: Classify 52 | }, 53 | { 54 | path: '/mine', 55 | name: 'MineIndex', 56 | component: MineIndex 57 | }, 58 | { 59 | path: '/collect', 60 | name: 'MineCollect', 61 | component: MineCollect 62 | }, 63 | { 64 | path: '/interest', 65 | name: 'MineInterest', 66 | component: MineInterest 67 | }, 68 | { 69 | path: '/author', 70 | name: 'Author', 71 | component: Author 72 | } 73 | ] 74 | }) 75 | -------------------------------------------------------------------------------- /static/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A1man/vue-project/c988365c31aa5f3ab97ec057ff6630523ca1493c/static/.gitkeep -------------------------------------------------------------------------------- /static/audio/music.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A1man/vue-project/c988365c31aa5f3ab97ec057ff6630523ca1493c/static/audio/music.mp3 --------------------------------------------------------------------------------