├── .babelrc ├── .editorconfig ├── .gitignore ├── .postcssrc.js ├── README.md ├── build ├── build.js ├── check-versions.js ├── logo.png ├── 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 ├── server ├── api.js ├── db.js ├── index.js ├── public │ ├── index.html │ ├── service-worker.js │ └── static │ │ ├── css │ │ ├── app.152a999247b44e4debb972b1c131ca1f.css │ │ └── app.152a999247b44e4debb972b1c131ca1f.css.map │ │ ├── fonts │ │ ├── element-icons.535877f.woff │ │ ├── element-icons.732389d.ttf │ │ ├── fontello.068ca2b.ttf │ │ └── fontello.e73a064.eot │ │ ├── img │ │ └── fontello.9354499.svg │ │ ├── js │ │ ├── 0.ca67e87d8c000a42e592.js │ │ ├── 0.ca67e87d8c000a42e592.js.map │ │ ├── 1.acfc831564a7ec3a252e.js │ │ ├── 1.acfc831564a7ec3a252e.js.map │ │ ├── 10.88d7d5d70ede62cfb405.js │ │ ├── 10.88d7d5d70ede62cfb405.js.map │ │ ├── 11.fe1170a2f6413c9447df.js │ │ ├── 11.fe1170a2f6413c9447df.js.map │ │ ├── 12.476900801ccbb7474eec.js │ │ ├── 12.476900801ccbb7474eec.js.map │ │ ├── 13.18e0a314cea15ca2cdcc.js │ │ ├── 13.18e0a314cea15ca2cdcc.js.map │ │ ├── 2.a558c3eecc77b2f86eff.js │ │ ├── 2.a558c3eecc77b2f86eff.js.map │ │ ├── 3.6b33eb61d5b9b7ebbd7f.js │ │ ├── 3.6b33eb61d5b9b7ebbd7f.js.map │ │ ├── 4.b1617ea6e76907936c32.js │ │ ├── 4.b1617ea6e76907936c32.js.map │ │ ├── 5.226e7fbe327e19e07682.js │ │ ├── 5.226e7fbe327e19e07682.js.map │ │ ├── 6.558a24c72046ca4ecd51.js │ │ ├── 6.558a24c72046ca4ecd51.js.map │ │ ├── 7.60eaf540a0ed01bee170.js │ │ ├── 7.60eaf540a0ed01bee170.js.map │ │ ├── 8.a2f7035b2b70d876c5d7.js │ │ ├── 8.a2f7035b2b70d876c5d7.js.map │ │ ├── 9.6418c4c5e905861fac62.js │ │ ├── 9.6418c4c5e905861fac62.js.map │ │ ├── app.b75c332556b1bafee5b2.js │ │ ├── app.b75c332556b1bafee5b2.js.map │ │ ├── manifest.1ec2e5c5a37139a5b5c7.js │ │ ├── manifest.1ec2e5c5a37139a5b5c7.js.map │ │ ├── vendor.8fde19828e93c4a85019.js │ │ └── vendor.8fde19828e93c4a85019.js.map │ │ ├── logo.png │ │ ├── manifest.json │ │ └── upload │ │ ├── 3.png │ │ ├── imgFile-1552904486514 │ │ ├── imgFile-1552905111213 │ │ ├── imgFile-1552905136845 │ │ ├── imgFile-1552907226495 │ │ └── imgFile-1552907339958 ├── router.js ├── sqlMap.js └── upload │ ├── imgFile-1552929289746 │ ├── imgFile-1552974761880 │ ├── imgFile-1552974811262 │ ├── imgFile-1552987110216 │ ├── imgFile-1552993690602 │ ├── imgFile-1553177397531 │ ├── imgFile-1553180192748 │ ├── imgFile-1553186682898 │ ├── imgFile-1553251206076 │ ├── imgFile-1554716556375 │ ├── imgFile-1554719353325 │ ├── imgFile-1556449199085 │ └── imgFile-1556449324224 ├── src ├── App.vue ├── assets │ ├── icons │ │ ├── iconfont.css │ │ ├── iconfont.eot │ │ ├── iconfont.js │ │ ├── iconfont.svg │ │ ├── iconfont.ttf │ │ ├── iconfont.woff │ │ └── iconfont.woff2 │ ├── js │ │ └── filters.js │ └── reset.scss ├── components │ ├── HelloWorld.vue │ ├── admin │ │ ├── Admin.vue │ │ ├── Comments.vue │ │ ├── Draft.vue │ │ ├── DraftContent.vue │ │ ├── Header.vue │ │ ├── NewEssay.vue │ │ ├── Settings.vue │ │ ├── Tags.vue │ │ └── Update.vue │ └── pages │ │ ├── Aside.vue │ │ ├── Contents.vue │ │ ├── Footer.vue │ │ ├── Header.vue │ │ ├── Index.vue │ │ ├── Lables.vue │ │ ├── Login.vue │ │ ├── NotFound.vue │ │ └── Regist.vue ├── main.js └── router │ └── index.js ├── static ├── .gitkeep ├── logo.png ├── manifest.json └── upload │ ├── 3.png │ ├── imgFile-1552904486514 │ ├── imgFile-1552905111213 │ ├── imgFile-1552905136845 │ ├── imgFile-1552907226495 │ └── imgFile-1552907339958 └── yarn.lock /.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-vue-jsx", "transform-runtime"] 12 | } 13 | -------------------------------------------------------------------------------- /.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 | .vscode 11 | *.suo 12 | *.ntvs* 13 | *.njsproj 14 | *.sln 15 | -------------------------------------------------------------------------------- /.postcssrc.js: -------------------------------------------------------------------------------- 1 | // https://github.com/michael-ciniawsky/postcss-load-config 2 | 3 | module.exports = { 4 | "plugins": { 5 | "postcss-import": {}, 6 | "postcss-url": {}, 7 | // to edit target browsers: use "browserslist" field in package.json 8 | "autoprefixer": {} 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # blogblog 2 | 3 | > A Vue.js+Node+MySQL的个人博客系统 project 4 | 5 | ## Build Setup 6 | 7 | ``` bash 8 | # install dependencies 9 | yarn or npm install 10 | 11 | # 运行服务器 12 | # serve with hot reload at localhost:3000 13 | cd server 14 | node index.js 15 | 16 | # serve with hot reload at localhost:8080 17 | npm run dev 18 | 19 | # build for production with minification 20 | npm run build 21 | 22 | # build for production and view the bundle analyzer report 23 | npm run build --report 24 | ``` 25 | 26 | For a detailed explanation on how things work, check out the [guide](http://vuejs-templates.github.io/webpack/) and [docs for vue-loader](http://vuejs.github.io/vue-loader). 27 | # myblog 28 | 29 | -------------------------------------------------------------------------------- /build/build.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | require('./check-versions')() 3 | 4 | process.env.NODE_ENV = 'production' 5 | 6 | const ora = require('ora') 7 | const rm = require('rimraf') 8 | const path = require('path') 9 | const chalk = require('chalk') 10 | const webpack = require('webpack') 11 | const config = require('../config') 12 | const webpackConfig = require('./webpack.prod.conf') 13 | 14 | const spinner = ora('building for production...') 15 | spinner.start() 16 | 17 | rm(path.join(config.build.assetsRoot, config.build.assetsSubDirectory), err => { 18 | if (err) throw err 19 | webpack(webpackConfig, (err, stats) => { 20 | spinner.stop() 21 | if (err) throw err 22 | process.stdout.write(stats.toString({ 23 | colors: true, 24 | modules: false, 25 | children: false, // If you are using ts-loader, setting this to true will make TypeScript errors show up during build. 26 | chunks: false, 27 | chunkModules: false 28 | }) + '\n\n') 29 | 30 | if (stats.hasErrors()) { 31 | console.log(chalk.red(' Build failed with errors.\n')) 32 | process.exit(1) 33 | } 34 | 35 | console.log(chalk.cyan(' Build complete.\n')) 36 | console.log(chalk.yellow( 37 | ' Tip: built files are meant to be served over an HTTP server.\n' + 38 | ' Opening index.html over file:// won\'t work.\n' 39 | )) 40 | }) 41 | }) 42 | -------------------------------------------------------------------------------- /build/check-versions.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const chalk = require('chalk') 3 | const semver = require('semver') 4 | const packageConfig = require('../package.json') 5 | const shell = require('shelljs') 6 | 7 | function exec (cmd) { 8 | return require('child_process').execSync(cmd).toString().trim() 9 | } 10 | 11 | const versionRequirements = [ 12 | { 13 | name: 'node', 14 | currentVersion: semver.clean(process.version), 15 | versionRequirement: packageConfig.engines.node 16 | } 17 | ] 18 | 19 | if (shell.which('npm')) { 20 | versionRequirements.push({ 21 | name: 'npm', 22 | currentVersion: exec('npm --version'), 23 | versionRequirement: packageConfig.engines.npm 24 | }) 25 | } 26 | 27 | module.exports = function () { 28 | const warnings = [] 29 | 30 | for (let i = 0; i < versionRequirements.length; i++) { 31 | const mod = versionRequirements[i] 32 | 33 | if (!semver.satisfies(mod.currentVersion, mod.versionRequirement)) { 34 | warnings.push(mod.name + ': ' + 35 | chalk.red(mod.currentVersion) + ' should be ' + 36 | chalk.green(mod.versionRequirement) 37 | ) 38 | } 39 | } 40 | 41 | if (warnings.length) { 42 | console.log('') 43 | console.log(chalk.yellow('To use this template, you must update following to modules:')) 44 | console.log() 45 | 46 | for (let i = 0; i < warnings.length; i++) { 47 | const warning = warnings[i] 48 | console.log(' ' + warning) 49 | } 50 | 51 | console.log() 52 | process.exit(1) 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /build/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dawnGoblin/myblog/cf085537ca3d31496bcf0de0eed3d2d6b2158b60/build/logo.png -------------------------------------------------------------------------------- /build/utils.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const path = require('path') 3 | const config = require('../config') 4 | const ExtractTextPlugin = require('extract-text-webpack-plugin') 5 | const packageConfig = require('../package.json') 6 | 7 | exports.assetsPath = function (_path) { 8 | const assetsSubDirectory = process.env.NODE_ENV === 'production' 9 | ? config.build.assetsSubDirectory 10 | : config.dev.assetsSubDirectory 11 | 12 | return path.posix.join(assetsSubDirectory, _path) 13 | } 14 | 15 | exports.cssLoaders = function (options) { 16 | options = options || {} 17 | 18 | const cssLoader = { 19 | loader: 'css-loader', 20 | options: { 21 | sourceMap: options.sourceMap 22 | } 23 | } 24 | 25 | const postcssLoader = { 26 | loader: 'postcss-loader', 27 | options: { 28 | sourceMap: options.sourceMap 29 | } 30 | } 31 | 32 | // generate loader string to be used with extract text plugin 33 | function generateLoaders (loader, loaderOptions) { 34 | const loaders = options.usePostCSS ? [cssLoader, postcssLoader] : [cssLoader] 35 | 36 | if (loader) { 37 | loaders.push({ 38 | loader: loader + '-loader', 39 | options: Object.assign({}, loaderOptions, { 40 | sourceMap: options.sourceMap 41 | }) 42 | }) 43 | } 44 | 45 | // Extract CSS when that option is specified 46 | // (which is the case during production build) 47 | if (options.extract) { 48 | return ExtractTextPlugin.extract({ 49 | use: loaders, 50 | fallback: 'vue-style-loader' 51 | }) 52 | } else { 53 | return ['vue-style-loader'].concat(loaders) 54 | } 55 | } 56 | 57 | // https://vue-loader.vuejs.org/en/configurations/extract-css.html 58 | return { 59 | css: generateLoaders(), 60 | postcss: generateLoaders(), 61 | less: generateLoaders('less'), 62 | sass: generateLoaders('sass', { indentedSyntax: true }), 63 | scss: generateLoaders('sass'), 64 | stylus: generateLoaders('stylus'), 65 | styl: generateLoaders('stylus') 66 | } 67 | } 68 | 69 | // Generate loaders for standalone style files (outside of .vue) 70 | exports.styleLoaders = function (options) { 71 | const output = [] 72 | const loaders = exports.cssLoaders(options) 73 | 74 | for (const extension in loaders) { 75 | const loader = loaders[extension] 76 | output.push({ 77 | test: new RegExp('\\.' + extension + '$'), 78 | use: loader 79 | }) 80 | } 81 | 82 | return output 83 | } 84 | 85 | exports.createNotifierCallback = () => { 86 | const notifier = require('node-notifier') 87 | 88 | return (severity, errors) => { 89 | if (severity !== 'error') return 90 | 91 | const error = errors[0] 92 | const filename = error.file && error.file.split('!').pop() 93 | 94 | notifier.notify({ 95 | title: packageConfig.name, 96 | message: severity + ': ' + error.name, 97 | subtitle: filename || '', 98 | icon: path.join(__dirname, 'logo.png') 99 | }) 100 | } 101 | } 102 | -------------------------------------------------------------------------------- /build/vue-loader.conf.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const utils = require('./utils') 3 | const config = require('../config') 4 | const isProduction = process.env.NODE_ENV === 'production' 5 | const sourceMapEnabled = isProduction 6 | ? config.build.productionSourceMap 7 | : config.dev.cssSourceMap 8 | 9 | module.exports = { 10 | loaders: utils.cssLoaders({ 11 | sourceMap: sourceMapEnabled, 12 | extract: isProduction 13 | }), 14 | cssSourceMap: sourceMapEnabled, 15 | cacheBusting: config.dev.cacheBusting, 16 | transformToRequire: { 17 | video: ['src', 'poster'], 18 | source: 'src', 19 | img: 'src', 20 | image: 'xlink:href' 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /build/webpack.base.conf.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const path = require('path') 3 | const utils = require('./utils') 4 | const config = require('../config') 5 | const vueLoaderConfig = require('./vue-loader.conf') 6 | 7 | function resolve(dir) { 8 | return path.join(__dirname, '..', dir) 9 | } 10 | 11 | 12 | 13 | module.exports = { 14 | context: path.resolve(__dirname, '../'), 15 | entry: { 16 | app: './src/main.js' 17 | }, 18 | output: { 19 | path: config.build.assetsRoot, 20 | filename: '[name].js', 21 | publicPath: process.env.NODE_ENV === 'production' 22 | ? config.build.assetsPublicPath 23 | : config.dev.assetsPublicPath 24 | }, 25 | resolve: { 26 | extensions: ['.js', '.vue', '.json'], 27 | alias: { 28 | 'vue$': 'vue/dist/vue.esm.js', 29 | '@': resolve('src'), 30 | } 31 | }, 32 | module: { 33 | rules: [ 34 | { 35 | test: /\.vue$/, 36 | loader: 'vue-loader', 37 | options: vueLoaderConfig 38 | }, 39 | { 40 | test: /\.js$/, 41 | loader: 'babel-loader', 42 | include: [resolve('src'), resolve('test'), resolve('node_modules/webpack-dev-server/client')] 43 | }, 44 | { 45 | test: /\.(png|jpe?g|gif|svg)(\?.*)?$/, 46 | loader: 'url-loader', 47 | options: { 48 | limit: 10000, 49 | name: utils.assetsPath('img/[name].[hash:7].[ext]') 50 | } 51 | }, 52 | { 53 | test: /\.(mp4|webm|ogg|mp3|wav|flac|aac)(\?.*)?$/, 54 | loader: 'url-loader', 55 | options: { 56 | limit: 10000, 57 | name: utils.assetsPath('media/[name].[hash:7].[ext]') 58 | } 59 | }, 60 | // { 61 | // test: /\.css$/, 62 | // loader: ["vue-style-loader", "css-loader"] 63 | // }, 64 | // { 65 | // test: /\.(scss|sass)$/, 66 | // loader: ["node-sass", "vue-style-loader", "css-loader", "sass-loader"] 67 | // }, 68 | { 69 | test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/, 70 | loader: 'url-loader', 71 | options: { 72 | limit: 10000, 73 | name: utils.assetsPath('fonts/[name].[hash:7].[ext]') 74 | } 75 | } 76 | ] 77 | }, 78 | node: { 79 | // prevent webpack from injecting useless setImmediate polyfill because Vue 80 | // source contains it (although only uses it if it's native). 81 | setImmediate: false, 82 | // prevent webpack from injecting mocks to Node native modules 83 | // that does not make sense for the client 84 | dgram: 'empty', 85 | fs: 'empty', 86 | net: 'empty', 87 | tls: 'empty', 88 | child_process: 'empty' 89 | } 90 | } 91 | -------------------------------------------------------------------------------- /build/webpack.dev.conf.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const utils = require('./utils') 3 | const webpack = require('webpack') 4 | const config = require('../config') 5 | const merge = require('webpack-merge') 6 | const path = require('path') 7 | const baseWebpackConfig = require('./webpack.base.conf') 8 | const CopyWebpackPlugin = require('copy-webpack-plugin') 9 | const HtmlWebpackPlugin = require('html-webpack-plugin') 10 | const FriendlyErrorsPlugin = require('friendly-errors-webpack-plugin') 11 | const portfinder = require('portfinder') 12 | 13 | const HOST = process.env.HOST 14 | const PORT = process.env.PORT && Number(process.env.PORT) 15 | 16 | const devWebpackConfig = merge(baseWebpackConfig, { 17 | module: { 18 | rules: utils.styleLoaders({ sourceMap: config.dev.cssSourceMap, usePostCSS: true }) 19 | }, 20 | // cheap-module-eval-source-map is faster for development 21 | devtool: config.dev.devtool, 22 | 23 | // these devServer options should be customized in /config/index.js 24 | devServer: { 25 | clientLogLevel: 'warning', 26 | historyApiFallback: { 27 | rewrites: [ 28 | { from: /.*/, to: path.posix.join(config.dev.assetsPublicPath, 'index.html') }, 29 | ], 30 | }, 31 | hot: true, 32 | contentBase: false, // since we use CopyWebpackPlugin. 33 | compress: true, 34 | host: HOST || config.dev.host, 35 | port: PORT || config.dev.port, 36 | open: config.dev.autoOpenBrowser, 37 | overlay: config.dev.errorOverlay 38 | ? { warnings: false, errors: true } 39 | : false, 40 | publicPath: config.dev.assetsPublicPath, 41 | proxy: config.dev.proxyTable, 42 | quiet: true, // necessary for FriendlyErrorsPlugin 43 | watchOptions: { 44 | poll: config.dev.poll, 45 | } 46 | }, 47 | plugins: [ 48 | new webpack.DefinePlugin({ 49 | 'process.env': require('../config/dev.env') 50 | }), 51 | new webpack.HotModuleReplacementPlugin(), 52 | new webpack.NamedModulesPlugin(), // HMR shows correct file names in console on update. 53 | new webpack.NoEmitOnErrorsPlugin(), 54 | // https://github.com/ampedandwired/html-webpack-plugin 55 | new HtmlWebpackPlugin({ 56 | filename: 'index.html', 57 | template: 'index.html', 58 | inject: true 59 | }), 60 | // copy custom static assets 61 | new CopyWebpackPlugin([ 62 | { 63 | from: path.resolve(__dirname, '../static'), 64 | to: config.dev.assetsSubDirectory, 65 | ignore: ['.*'] 66 | } 67 | ]) 68 | ] 69 | }) 70 | 71 | module.exports = new Promise((resolve, reject) => { 72 | portfinder.basePort = process.env.PORT || config.dev.port 73 | portfinder.getPort((err, port) => { 74 | if (err) { 75 | reject(err) 76 | } else { 77 | // publish the new Port, necessary for e2e tests 78 | process.env.PORT = port 79 | // add port to devServer config 80 | devWebpackConfig.devServer.port = port 81 | 82 | // Add FriendlyErrorsPlugin 83 | devWebpackConfig.plugins.push(new FriendlyErrorsPlugin({ 84 | compilationSuccessInfo: { 85 | messages: [`Your application is running here: http://${devWebpackConfig.devServer.host}:${port}`], 86 | }, 87 | onErrors: config.dev.notifyOnErrors 88 | ? utils.createNotifierCallback() 89 | : undefined 90 | })) 91 | 92 | resolve(devWebpackConfig) 93 | } 94 | }) 95 | }) 96 | -------------------------------------------------------------------------------- /build/webpack.prod.conf.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const path = require('path') 3 | const utils = require('./utils') 4 | const webpack = require('webpack') 5 | const config = require('../config') 6 | const merge = require('webpack-merge') 7 | const baseWebpackConfig = require('./webpack.base.conf') 8 | const CopyWebpackPlugin = require('copy-webpack-plugin') 9 | const HtmlWebpackPlugin = require('html-webpack-plugin') 10 | const ExtractTextPlugin = require('extract-text-webpack-plugin') 11 | const OptimizeCSSPlugin = require('optimize-css-assets-webpack-plugin') 12 | const UglifyJsPlugin = require('uglifyjs-webpack-plugin') 13 | const SWPrecacheWebpackPlugin = require('sw-precache-webpack-plugin') 14 | 15 | const env = require('../config/prod.env') 16 | 17 | const webpackConfig = merge(baseWebpackConfig, { 18 | module: { 19 | rules: utils.styleLoaders({ 20 | sourceMap: config.build.productionSourceMap, 21 | extract: true, 22 | usePostCSS: true 23 | }) 24 | }, 25 | devtool: config.build.productionSourceMap ? config.build.devtool : false, 26 | output: { 27 | path: config.build.assetsRoot, 28 | filename: utils.assetsPath('js/[name].[chunkhash].js'), 29 | chunkFilename: utils.assetsPath('js/[id].[chunkhash].js') 30 | }, 31 | plugins: [ 32 | // service worker caching 33 | new SWPrecacheWebpackPlugin({cacheId: 'my-vue-app', filename: 'service-worker.js', minify: true}), 34 | // http://vuejs.github.io/vue-loader/en/workflow/production.html 35 | new webpack.DefinePlugin({ 36 | 'process.env': env 37 | }), 38 | new UglifyJsPlugin({ 39 | uglifyOptions: { 40 | compress: { 41 | warnings: false 42 | } 43 | }, 44 | sourceMap: config.build.productionSourceMap, 45 | parallel: true 46 | }), 47 | // extract css into its own file 48 | new ExtractTextPlugin({ 49 | filename: utils.assetsPath('css/[name].[contenthash].css'), 50 | // Setting the following option to `false` will not extract CSS from codesplit chunks. 51 | // Their CSS will instead be inserted dynamically with style-loader when the codesplit chunk has been loaded by webpack. 52 | // It's currently set to `true` because we are seeing that sourcemaps are included in the codesplit bundle as well when it's `false`, 53 | // increasing file size: https://github.com/vuejs-templates/webpack/issues/1110 54 | allChunks: true, 55 | }), 56 | // Compress extracted CSS. We are using this plugin so that possible 57 | // duplicated CSS from different components can be deduped. 58 | new OptimizeCSSPlugin({ 59 | cssProcessorOptions: config.build.productionSourceMap 60 | ? { safe: true, map: { inline: false } } 61 | : { safe: true } 62 | }), 63 | // generate dist index.html with correct asset hash for caching. 64 | // you can customize output by editing /index.html 65 | // see https://github.com/ampedandwired/html-webpack-plugin 66 | new HtmlWebpackPlugin({ 67 | filename: config.build.index, 68 | template: 'index.html', 69 | inject: true, 70 | minify: { 71 | removeComments: true, 72 | collapseWhitespace: true, 73 | removeAttributeQuotes: true 74 | // more options: 75 | // https://github.com/kangax/html-minifier#options-quick-reference 76 | }, 77 | // necessary to consistently work with multiple chunks via CommonsChunkPlugin 78 | chunksSortMode: 'dependency' 79 | }), 80 | // keep module.id stable when vendor modules does not change 81 | new webpack.HashedModuleIdsPlugin(), 82 | // enable scope hoisting 83 | new webpack.optimize.ModuleConcatenationPlugin(), 84 | // split vendor js into its own file 85 | new webpack.optimize.CommonsChunkPlugin({ 86 | name: 'vendor', 87 | minChunks (module) { 88 | // any required modules inside node_modules are extracted to vendor 89 | return ( 90 | 91 | module.resource && 92 | /\.js$/.test(module.resource) && 93 | module.resource.indexOf( 94 | path.join(__dirname, '../node_modules') 95 | ) === 0 96 | ) 97 | } 98 | }), 99 | // extract webpack runtime and module manifest to its own file in order to 100 | // prevent vendor hash from being updated whenever app bundle is updated 101 | new webpack.optimize.CommonsChunkPlugin({ 102 | name: 'manifest', 103 | minChunks: Infinity 104 | }), 105 | // This instance extracts shared chunks from code splitted chunks and bundles them 106 | // in a separate chunk, similar to the vendor chunk 107 | // see: https://webpack.js.org/plugins/commons-chunk-plugin/#extra-async-commons-chunk 108 | new webpack.optimize.CommonsChunkPlugin({ 109 | name: 'app', 110 | async: 'vendor-async', 111 | children: true, 112 | minChunks: 3 113 | }), 114 | 115 | // copy custom static assets 116 | new CopyWebpackPlugin([ 117 | { 118 | from: path.resolve(__dirname, '../static'), 119 | to: config.build.assetsSubDirectory, 120 | ignore: ['.*'] 121 | } 122 | ]) 123 | ] 124 | }) 125 | 126 | if (config.build.productionGzip) { 127 | const CompressionWebpackPlugin = require('compression-webpack-plugin') 128 | 129 | webpackConfig.plugins.push( 130 | new CompressionWebpackPlugin({ 131 | asset: '[path].gz[query]', 132 | algorithm: 'gzip', 133 | test: new RegExp( 134 | '\\.(' + 135 | config.build.productionGzipExtensions.join('|') + 136 | ')$' 137 | ), 138 | threshold: 10240, 139 | minRatio: 0.8 140 | }) 141 | ) 142 | } 143 | 144 | if (config.build.bundleAnalyzerReport) { 145 | const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin 146 | webpackConfig.plugins.push(new BundleAnalyzerPlugin()) 147 | } 148 | 149 | module.exports = webpackConfig 150 | -------------------------------------------------------------------------------- /config/dev.env.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const merge = require('webpack-merge') 3 | const prodEnv = require('./prod.env') 4 | 5 | module.exports = merge(prodEnv, { 6 | NODE_ENV: '"development"' 7 | }) 8 | -------------------------------------------------------------------------------- /config/index.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | // Template version: 1.3.1 3 | // see http://vuejs-templates.github.io/webpack for documentation. 4 | 5 | const path = require('path') 6 | 7 | module.exports = { 8 | dev: { 9 | 10 | // Paths 11 | assetsSubDirectory: 'static', 12 | assetsPublicPath: '/', 13 | proxyTable: { 14 | '/api': { 15 | target: 'http://localhost:3000/api', 16 | changeOrigin: true, 17 | pathRewrite: { 18 | '^/api': '' 19 | } 20 | } 21 | }, 22 | 23 | // Various Dev Server settings 24 | host: 'localhost', // can be overwritten by process.env.HOST 25 | port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined 26 | autoOpenBrowser: true, 27 | errorOverlay: true, 28 | notifyOnErrors: true, 29 | poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions- 30 | 31 | 32 | /** 33 | * Source Maps 34 | */ 35 | 36 | // https://webpack.js.org/configuration/devtool/#development 37 | devtool: 'cheap-module-eval-source-map', 38 | 39 | // If you have problems debugging vue-files in devtools, 40 | // set this to false - it *may* help 41 | // https://vue-loader.vuejs.org/en/options.html#cachebusting 42 | cacheBusting: true, 43 | 44 | cssSourceMap: true 45 | }, 46 | 47 | build: { 48 | // Template for index.html 49 | index: path.resolve(__dirname, '../dist/index.html'), 50 | 51 | // Paths 52 | assetsRoot: path.resolve(__dirname, '../dist'), 53 | assetsSubDirectory: 'static', 54 | assetsPublicPath: '/', 55 | 56 | /** 57 | * Source Maps 58 | */ 59 | 60 | productionSourceMap: true, 61 | // https://webpack.js.org/configuration/devtool/#production 62 | devtool: '#source-map', 63 | 64 | // Gzip off by default as many popular static hosts such as 65 | // Surge or Netlify already gzip all static assets for you. 66 | // Before setting to `true`, make sure to: 67 | // npm install --save-dev compression-webpack-plugin 68 | productionGzip: false, 69 | productionGzipExtensions: ['js', 'css'], 70 | 71 | // Run the build command with an extra argument to 72 | // View the bundle analyzer report after build finishes: 73 | // `npm run build --report` 74 | // Set to `true` or `false` to always turn it on or off 75 | bundleAnalyzerReport: process.env.npm_config_report 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /config/prod.env.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | module.exports = { 3 | NODE_ENV: '"production"' 4 | } 5 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | blogblog 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | 29 | 30 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "blogblog", 3 | "version": "1.0.0", 4 | "description": "A Vue.js project", 5 | "author": "dawnGoblin ", 6 | "private": true, 7 | "scripts": { 8 | "dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js", 9 | "start": "npm run dev", 10 | "build": "node build/build.js", 11 | "dist": "webpack --progress --profile --colors --config build/webpack.prod.conf.js" 12 | }, 13 | "dependencies": { 14 | "axios": "^0.18.0", 15 | "body-parser": "^1.18.3", 16 | "element-ui": "^2.6.1", 17 | "express": "^4.16.4", 18 | "js-md5": "^0.7.3", 19 | "jsonwebtoken": "^8.5.1", 20 | "markdown-it": "^8.4.2", 21 | "marked": "^0.6.2", 22 | "mavon-editor": "^2.7.1", 23 | "multer": "^1.4.1", 24 | "mysql": "^2.16.0", 25 | "sw-precache-webpack-plugin": "^0.11.5", 26 | "vue": "^2.5.2", 27 | "vue-router": "^3.0.1", 28 | "vuex": "^3.1.0" 29 | }, 30 | "devDependencies": { 31 | "autoprefixer": "^7.1.2", 32 | "babel-core": "^6.22.1", 33 | "babel-helper-vue-jsx-merge-props": "^2.0.3", 34 | "babel-loader": "^7.1.1", 35 | "babel-plugin-syntax-jsx": "^6.18.0", 36 | "babel-plugin-transform-runtime": "^6.22.0", 37 | "babel-plugin-transform-vue-jsx": "^3.5.0", 38 | "babel-preset-env": "^1.3.2", 39 | "babel-preset-stage-2": "^6.22.0", 40 | "chalk": "^2.0.1", 41 | "copy-webpack-plugin": "^4.0.1", 42 | "css-loader": "^0.28.0", 43 | "extract-text-webpack-plugin": "^3.0.0", 44 | "file-loader": "^1.1.4", 45 | "friendly-errors-webpack-plugin": "^1.6.1", 46 | "html-webpack-plugin": "^2.30.1", 47 | "node-notifier": "^5.1.2", 48 | "node-sass": "^4.11.0", 49 | "optimize-css-assets-webpack-plugin": "^3.2.0", 50 | "ora": "^1.2.0", 51 | "portfinder": "^1.0.13", 52 | "postcss-import": "^11.0.0", 53 | "postcss-loader": "^2.0.8", 54 | "postcss-url": "^7.2.1", 55 | "rimraf": "^2.6.0", 56 | "sass-loader": "^7.1.0", 57 | "semver": "^5.3.0", 58 | "shelljs": "^0.7.6", 59 | "uglifyjs-webpack-plugin": "^1.1.1", 60 | "url-loader": "^0.5.8", 61 | "vue-loader": "^13.3.0", 62 | "vue-style-loader": "^3.0.1", 63 | "vue-template-compiler": "^2.5.2", 64 | "webpack": "^3.6.0", 65 | "webpack-bundle-analyzer": "^2.9.0", 66 | "webpack-dev-server": "^2.9.1", 67 | "webpack-merge": "^4.1.0" 68 | }, 69 | "engines": { 70 | "node": ">= 6.0.0", 71 | "npm": ">= 3.0.0" 72 | }, 73 | "browserslist": [ 74 | "> 1%", 75 | "last 2 versions", 76 | "not ie <= 8" 77 | ] 78 | } 79 | -------------------------------------------------------------------------------- /server/db.js: -------------------------------------------------------------------------------- 1 | // 数据库连接配置 2 | module.exports = { 3 | mysql: { 4 | host: 'localhost', // 新建数据库连接时的 主机名或ID地址 内容 5 | user: 'root', 6 | password: '123456', // root 密码 7 | database: 'myBlog', // 数据库名 8 | port: '3306' 9 | } 10 | } -------------------------------------------------------------------------------- /server/index.js: -------------------------------------------------------------------------------- 1 | const routerApi = require('./router'); 2 | const bodyParser = require('body-parser'); // post 数据是需要 3 | const express = require('express'); 4 | const app = express(); 5 | // const cors = require('cors'); 6 | 7 | // app.use(cors()); 8 | app.use(express.static('public')); 9 | // app.use(express.static(path.join(__dirname, 'public'))); 10 | // console.log(express.static('public')); 11 | app.use(bodyParser.json()); 12 | 13 | // 后端api路由 14 | app.use('/api', routerApi); 15 | 16 | // 监听端口 17 | app.listen(3000); 18 | console.log('success listen at port:3000......'); -------------------------------------------------------------------------------- /server/public/index.html: -------------------------------------------------------------------------------- 1 | blogblog
-------------------------------------------------------------------------------- /server/public/service-worker.js: -------------------------------------------------------------------------------- 1 | "use strict";var precacheConfig=[["/index.html","e42136863ccbcb082676c1173c016260"],["/static/css/app.152a999247b44e4debb972b1c131ca1f.css","3fbc8ae514c7e375a3834eea26f1cce7"],["/static/css/app.152a999247b44e4debb972b1c131ca1f.css.map","0c63cea1a9b7916b199566e016c65ff8"],["/static/fonts/element-icons.535877f.woff","535877f50039c0cb49a6196a5b7517cd"],["/static/fonts/element-icons.732389d.ttf","732389ded34cb9c52dd88271f1345af9"],["/static/fonts/fontello.068ca2b.ttf","068ca2b316db98037bebdd1e4f1b9459"],["/static/fonts/fontello.e73a064.eot","e73a0647198cfe970de0f003be95cc51"],["/static/img/fontello.9354499.svg","9354499c2824248511adf85fdf8e4c37"],["/static/js/0.ca67e87d8c000a42e592.js","b481d596dce92f5792fea74d7e0403d6"],["/static/js/0.ca67e87d8c000a42e592.js.map","dc2e576b2230b0e6d2b2c8271b2e16ab"],["/static/js/1.acfc831564a7ec3a252e.js","2e657466ca1a24f9f3151dddb31ed853"],["/static/js/1.acfc831564a7ec3a252e.js.map","7501889ff1253cd8f68e59c1dbf57c13"],["/static/js/10.88d7d5d70ede62cfb405.js","81c7685c2d54e0ce913f0222662c5ca8"],["/static/js/10.88d7d5d70ede62cfb405.js.map","72f3a3fa8434c352f2c0af64bd813f7d"],["/static/js/11.fe1170a2f6413c9447df.js","c3e24e619e1851d2eb75549bc2b24e4f"],["/static/js/11.fe1170a2f6413c9447df.js.map","60f04da2c46db6e355e71afa1ed49ed0"],["/static/js/12.476900801ccbb7474eec.js","45ec7584803a73ea36627727fedff24c"],["/static/js/12.476900801ccbb7474eec.js.map","0fed9c1d8637d154c294155adb756931"],["/static/js/13.18e0a314cea15ca2cdcc.js","76c903ce41b9946dbc299d8bb4fcd305"],["/static/js/13.18e0a314cea15ca2cdcc.js.map","8ad6f21994a15d60d22151ce31990b50"],["/static/js/2.a558c3eecc77b2f86eff.js","e94fa3120f1c9c325c2b4c4d92b306fa"],["/static/js/2.a558c3eecc77b2f86eff.js.map","8ab4a677f389c8abd2715cfd8daf9584"],["/static/js/3.6b33eb61d5b9b7ebbd7f.js","d6ce79fca4cb829fd3287aa9f7c89b41"],["/static/js/3.6b33eb61d5b9b7ebbd7f.js.map","b82cfd42a7b7a2e18e3ffd680879604f"],["/static/js/4.b1617ea6e76907936c32.js","98a73039d8d0a9a4ffe09e4c118f5334"],["/static/js/4.b1617ea6e76907936c32.js.map","9c42468cf8fc6a917fac97ba8b819f77"],["/static/js/5.226e7fbe327e19e07682.js","9160446a6036c84e2cce6be4814689ed"],["/static/js/5.226e7fbe327e19e07682.js.map","2c456da0ac70e968cc86f701b077d6a7"],["/static/js/6.558a24c72046ca4ecd51.js","ce1e2fb2bfdb934a5a015086da0f88dd"],["/static/js/6.558a24c72046ca4ecd51.js.map","16fc065ae043d50ceb5b2c1b73f32ded"],["/static/js/7.60eaf540a0ed01bee170.js","f98e91fcbc2f917fd4d339f19f3bbccc"],["/static/js/7.60eaf540a0ed01bee170.js.map","66b9b05ea29d43d1792c6393b2279bab"],["/static/js/8.a2f7035b2b70d876c5d7.js","130578be974bb876c9b8a7ad9485d297"],["/static/js/8.a2f7035b2b70d876c5d7.js.map","6e879ab2c184f29c36c97f0c4188e882"],["/static/js/9.6418c4c5e905861fac62.js","6d9b5cff7403d842ca35ee5244e002ee"],["/static/js/9.6418c4c5e905861fac62.js.map","921191c1dea849f2003921037bf3648f"],["/static/js/app.b75c332556b1bafee5b2.js","c689da6f1b34e29619d06224f41adbd3"],["/static/js/app.b75c332556b1bafee5b2.js.map","227466f1a74e8fc60f66c8538af14636"],["/static/js/manifest.1ec2e5c5a37139a5b5c7.js","988c114fb00ed5934f89a627fc0ae64c"],["/static/js/manifest.1ec2e5c5a37139a5b5c7.js.map","835765b6bbac40e5ef81379374af70b7"],["/static/js/vendor.8fde19828e93c4a85019.js","2d2439f737afe3774c4dc72071151afe"],["/static/logo.png","82b9c7a5a3f405032b1db71a25f67021"],["/static/manifest.json","714dd0730a3e1e6843cd1d40d3bedcce"],["/static/upload/3.png","d65c6c5af3a4c3cf2f7916c38ec50956"],["/static/upload/imgFile-1552904486514","002f948fd813071908a319e04cd80675"],["/static/upload/imgFile-1552905111213","d65c6c5af3a4c3cf2f7916c38ec50956"],["/static/upload/imgFile-1552905136845","7acda45b96b2cd89cb1f82abbf9d19e6"],["/static/upload/imgFile-1552907226495","d65c6c5af3a4c3cf2f7916c38ec50956"],["/static/upload/imgFile-1552907339958","d65c6c5af3a4c3cf2f7916c38ec50956"]],cacheName="sw-precache-v3-my-vue-app-"+(self.registration?self.registration.scope:""),ignoreUrlParametersMatching=[/^utm_/],addDirectoryIndex=function(e,c){var a=new URL(e);return"/"===a.pathname.slice(-1)&&(a.pathname+=c),a.toString()},cleanResponse=function(e){return e.redirected?("body"in e?Promise.resolve(e.body):e.blob()).then(function(c){return new Response(c,{headers:e.headers,status:e.status,statusText:e.statusText})}):Promise.resolve(e)},createCacheKey=function(e,c,a,t){var s=new URL(e);return t&&s.pathname.match(t)||(s.search+=(s.search?"&":"")+encodeURIComponent(c)+"="+encodeURIComponent(a)),s.toString()},isPathWhitelisted=function(e,c){if(0===e.length)return!0;var a=new URL(c).pathname;return e.some(function(e){return a.match(e)})},stripIgnoredUrlParameters=function(e,c){var a=new URL(e);return a.hash="",a.search=a.search.slice(1).split("&").map(function(e){return e.split("=")}).filter(function(e){return c.every(function(c){return!c.test(e[0])})}).map(function(e){return e.join("=")}).join("&"),a.toString()},hashParamName="_sw-precache",urlsToCacheKeys=new Map(precacheConfig.map(function(e){var c=e[0],a=e[1],t=new URL(c,self.location),s=createCacheKey(t,hashParamName,a,!1);return[t.toString(),s]}));function setOfCachedUrls(e){return e.keys().then(function(e){return e.map(function(e){return e.url})}).then(function(e){return new Set(e)})}self.addEventListener("install",function(e){e.waitUntil(caches.open(cacheName).then(function(e){return setOfCachedUrls(e).then(function(c){return Promise.all(Array.from(urlsToCacheKeys.values()).map(function(a){if(!c.has(a)){var t=new Request(a,{credentials:"same-origin"});return fetch(t).then(function(c){if(!c.ok)throw new Error("Request for "+a+" returned a response with status "+c.status);return cleanResponse(c).then(function(c){return e.put(a,c)})})}}))})}).then(function(){return self.skipWaiting()}))}),self.addEventListener("activate",function(e){var c=new Set(urlsToCacheKeys.values());e.waitUntil(caches.open(cacheName).then(function(e){return e.keys().then(function(a){return Promise.all(a.map(function(a){if(!c.has(a.url))return e.delete(a)}))})}).then(function(){return self.clients.claim()}))}),self.addEventListener("fetch",function(e){if("GET"===e.request.method){var c,a=stripIgnoredUrlParameters(e.request.url,ignoreUrlParametersMatching);(c=urlsToCacheKeys.has(a))||(a=addDirectoryIndex(a,"index.html"),c=urlsToCacheKeys.has(a));0,c&&e.respondWith(caches.open(cacheName).then(function(e){return e.match(urlsToCacheKeys.get(a)).then(function(e){if(e)return e;throw Error("The cached response that was expected is missing.")})}).catch(function(c){return console.warn('Couldn\'t serve response for "%s" from cache: %O',e.request.url,c),fetch(e.request)}))}}); -------------------------------------------------------------------------------- /server/public/static/fonts/element-icons.535877f.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dawnGoblin/myblog/cf085537ca3d31496bcf0de0eed3d2d6b2158b60/server/public/static/fonts/element-icons.535877f.woff -------------------------------------------------------------------------------- /server/public/static/fonts/element-icons.732389d.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dawnGoblin/myblog/cf085537ca3d31496bcf0de0eed3d2d6b2158b60/server/public/static/fonts/element-icons.732389d.ttf -------------------------------------------------------------------------------- /server/public/static/fonts/fontello.068ca2b.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dawnGoblin/myblog/cf085537ca3d31496bcf0de0eed3d2d6b2158b60/server/public/static/fonts/fontello.068ca2b.ttf -------------------------------------------------------------------------------- /server/public/static/fonts/fontello.e73a064.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dawnGoblin/myblog/cf085537ca3d31496bcf0de0eed3d2d6b2158b60/server/public/static/fonts/fontello.e73a064.eot -------------------------------------------------------------------------------- /server/public/static/js/0.ca67e87d8c000a42e592.js: -------------------------------------------------------------------------------- 1 | webpackJsonp([0],{mvHQ:function(n,t,i){n.exports={default:i("qkKv"),__esModule:!0}},qkKv:function(n,t,i){var e=i("FeBl"),r=e.JSON||(e.JSON={stringify:JSON.stringify});n.exports=function(n){return r.stringify.apply(r,arguments)}}}); 2 | //# sourceMappingURL=0.ca67e87d8c000a42e592.js.map -------------------------------------------------------------------------------- /server/public/static/js/0.ca67e87d8c000a42e592.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["webpack:///./node_modules/babel-runtime/core-js/json/stringify.js","webpack:///./node_modules/core-js/library/fn/json/stringify.js"],"names":["module","exports","default","__webpack_require__","__esModule","core","$JSON","JSON","stringify","it","apply","arguments"],"mappings":"uCAAAA,EAAAC,SAAkBC,QAAYC,EAAQ,QAAmCC,YAAA,yBCAzE,IAAAC,EAAWF,EAAQ,QACnBG,EAAAD,EAAAE,OAAAF,EAAAE,MAAuCC,UAAAD,KAAAC,YACvCR,EAAAC,QAAA,SAAAQ,GACA,OAAAH,EAAAE,UAAAE,MAAAJ,EAAAK","file":"static/js/0.ca67e87d8c000a42e592.js","sourcesContent":["module.exports = { \"default\": require(\"core-js/library/fn/json/stringify\"), __esModule: true };\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/babel-runtime/core-js/json/stringify.js\n// module id = mvHQ\n// module chunks = 0","var core = require('../../modules/_core');\nvar $JSON = core.JSON || (core.JSON = { stringify: JSON.stringify });\nmodule.exports = function stringify(it) { // eslint-disable-line no-unused-vars\n return $JSON.stringify.apply($JSON, arguments);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/fn/json/stringify.js\n// module id = qkKv\n// module chunks = 0"],"sourceRoot":""} -------------------------------------------------------------------------------- /server/public/static/js/1.acfc831564a7ec3a252e.js: -------------------------------------------------------------------------------- 1 | webpackJsonp([1],{RwwD:function(t,e){},oMO9:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=a("WheD"),s={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"header-wraper"},[a("el-row",{staticStyle:{width:"100%"}},[a("el-col",{attrs:{span:4,offset:4}},[a("h1",{staticClass:"header-title"},[a("router-link",{attrs:{to:"/"}},[t._v("StarBlog")])],1)]),t._v(" "),a("el-col",{attrs:{span:4,offset:2}},[a("el-input",{staticClass:"nav-search",attrs:{placeholder:"请输入搜索内容","prefix-icon":"el-icon-search",autocomplete:"off",name:"aa"},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}})],1),t._v(" "),a("el-col",{attrs:{span:8,offset:2}},[a("nav",{staticClass:"header-nav"},[a("ul",[a("li",[a("router-link",{attrs:{to:"/admin/settings"}},[t._v("设置")])],1),t._v(" "),a("li",[a("router-link",{attrs:{to:"/admin/comments"}},[t._v("评论")])],1),t._v(" "),a("li",[a("router-link",{attrs:{to:"/admin/draft"}},[t._v("草稿")])],1),t._v(" "),a("li",[a("router-link",{attrs:{to:"/admin/tags"}},[t._v("标签")])],1),t._v(" "),a("li",[a("router-link",{attrs:{to:"/admin/newEssay"}},[t._v("随笔")])],1)])])])],1)],1)},staticRenderFns:[]};var n={components:{Header:a("VU/8")({name:"Header",data:function(){return{search:""}}},s,!1,function(t){a("RwwD")},"data-v-cc67615a",null).exports,Footer:r.a}},l={render:function(){var t=this.$createElement,e=this._self._c||t;return e("div",[e("Header"),this._v(" "),e("router-view"),this._v(" "),e("Footer")],1)},staticRenderFns:[]},o=a("VU/8")(n,l,!1,null,null,null);e.default=o.exports}}); 2 | //# sourceMappingURL=1.acfc831564a7ec3a252e.js.map -------------------------------------------------------------------------------- /server/public/static/js/10.88d7d5d70ede62cfb405.js: -------------------------------------------------------------------------------- 1 | webpackJsonp([10],{hfmC:function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var s={name:"tags",data:function(){return{Tags:[],inputVisible:!1,inputValue:""}},methods:{handleClose:function(t){var n=this;this.axios.post("/api/admin/delTag",{name:t}).then(function(e){n.Tags.splice(n.Tags.indexOf(t),1),n.$message({message:"删除成功",type:"success"})}).catch(function(t){console.log(t)})},showInput:function(){var t=this;this.inputVisible=!0,this.$nextTick(function(n){t.$refs.saveTagInput.$refs.input.focus()})},handleInputConfirm:function(){var t=this,n=this.inputValue;n.length<1?this.$message({message:"内容不能为空",type:"warning"}):this.axios.post("/api/admin/insertTag",{name:n}).then(function(e){t.$message({message:"添加成功",type:"success"}),n&&t.Tags.push(n),t.inputVisible=!1,t.inputValue=""}).catch(function(t){console.log(t)})}},mounted:function(){var t=this;this.axios.get("/api/admin/getTagAll").then(function(n){var e=n.data.map(function(t){return t.name});t.Tags=e}).catch(function(t){console.log(t)})}},a={render:function(){var t=this,n=t.$createElement,e=t._self._c||n;return e("section",{staticClass:"blog-body"},[t._l(t.Tags,function(n,s){return e("el-tag",{key:s,attrs:{closable:"","disable-transitions":!1},on:{close:function(e){return t.handleClose(n)}}},[t._v(t._s(n))])}),t._v(" "),t.inputVisible?e("el-input",{ref:"saveTagInput",staticClass:"input-new-tag",attrs:{size:"small"},nativeOn:{keyup:function(n){return!n.type.indexOf("key")&&t._k(n.keyCode,"enter",13,n.key,"Enter")?null:t.handleInputConfirm(n)}},model:{value:t.inputValue,callback:function(n){t.inputValue=n},expression:"inputValue"}}):e("el-button",{staticClass:"button-new-tag",attrs:{size:"small"},on:{click:t.showInput}},[t._v("+ New Tag")])],2)},staticRenderFns:[]};var i=e("VU/8")(s,a,!1,function(t){e("htrK")},"data-v-23bc81a2",null);n.default=i.exports},htrK:function(t,n){}}); 2 | //# sourceMappingURL=10.88d7d5d70ede62cfb405.js.map -------------------------------------------------------------------------------- /server/public/static/js/10.88d7d5d70ede62cfb405.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["webpack:///src/components/admin/Tags.vue","webpack:///./src/components/admin/Tags.vue?be60","webpack:///./src/components/admin/Tags.vue"],"names":["Tags","name","data","inputVisible","inputValue","methods","handleClose","_this","this","axios","post","then","response","splice","indexOf","$message","message","type","catch","error","console","log","showInput","_this2","$nextTick","_","$refs","saveTagInput","input","focus","handleInputConfirm","_this3","length","push","mounted","_this4","get","tags","map","v","admin_Tags","render","_vm","_h","$createElement","_c","_self","staticClass","_l","tag","index","key","attrs","closable","disable-transitions","on","close","$event","_v","_s","ref","size","nativeOn","keyup","_k","keyCode","model","value","callback","$$v","expression","click","staticRenderFns","Component","__webpack_require__","normalizeComponent","ssrContext","__webpack_exports__"],"mappings":"sGAqBA,IAAAA,GACAC,KAAA,OACAC,KAFA,WAGA,OACAF,QACAG,cAAA,EACAC,WAAA,KAGAC,SACAC,YADA,SACAL,GAAA,IAAAM,EAAAC,KACAA,KAAAC,MACAC,KAAA,qBAAAT,SACAU,KAAA,SAAAC,GACAL,EAAAP,KAAAa,OAAAN,EAAAP,KAAAc,QAAAb,GAAA,GACAM,EAAAQ,UACAC,QAAA,OACAC,KAAA,cAGAC,MAAA,SAAAC,GACAC,QAAAC,IAAAF,MAIAG,UAhBA,WAgBA,IAAAC,EAAAf,KACAA,KAAAL,cAAA,EACAK,KAAAgB,UAAA,SAAAC,GACAF,EAAAG,MAAAC,aAAAD,MAAAE,MAAAC,WAIAC,mBAvBA,WAuBA,IAAAC,EAAAvB,KACAJ,EAAAI,KAAAJ,WACAA,EAAA4B,OAAA,EACAxB,KAAAO,UACAC,QAAA,SACAC,KAAA,YAIAT,KAAAC,MACAC,KAAA,wBAAAT,KAAAG,IACAO,KAAA,SAAAC,GACAmB,EAAAhB,UACAC,QAAA,OACAC,KAAA,YAGAb,GACA2B,EAAA/B,KAAAiC,KAAA7B,GAEA2B,EAAA5B,cAAA,EACA4B,EAAA3B,WAAA,KAEAc,MAAA,SAAAC,GACAC,QAAAC,IAAAF,OAIAe,QA5DA,WA4DA,IAAAC,EAAA3B,KACAA,KAAAC,MACA2B,IAAA,wBACAzB,KAAA,SAAAC,GACA,IACAyB,EADAzB,EAAAV,KACAoC,IAAA,SAAAC,GAAA,OAAAA,EAAAtC,OACAkC,EAAAnC,KAAAqC,IAEAnB,MAAA,SAAAC,GACAC,QAAAC,IAAAF,OCvFeqB,GADEC,OAFjB,WAA0B,IAAAC,EAAAlC,KAAamC,EAAAD,EAAAE,eAA0BC,EAAAH,EAAAI,MAAAD,IAAAF,EAAwB,OAAAE,EAAA,WAAqBE,YAAA,cAAwBL,EAAAM,GAAAN,EAAA,cAAAO,EAAAC,GAAwC,OAAAL,EAAA,UAAoBM,IAAAD,EAAAE,OAAiBC,SAAA,GAAAC,uBAAA,GAA0CC,IAAKC,MAAA,SAAAC,GAAyB,OAAAf,EAAApC,YAAA2C,OAA8BP,EAAAgB,GAAAhB,EAAAiB,GAAAV,QAAwBP,EAAAgB,GAAA,KAAAhB,EAAA,aAAAG,EAAA,YAAgDe,IAAA,eAAAb,YAAA,gBAAAK,OAAsDS,KAAA,SAAeC,UAAWC,MAAA,SAAAN,GAAyB,OAAAA,EAAAxC,KAAAH,QAAA,QAAA4B,EAAAsB,GAAAP,EAAAQ,QAAA,WAAAR,EAAAN,IAAA,SAAsF,KAAeT,EAAAZ,mBAAA2B,KAAuCS,OAAQC,MAAAzB,EAAA,WAAA0B,SAAA,SAAAC,GAAgD3B,EAAAtC,WAAAiE,GAAmBC,WAAA,gBAA0BzB,EAAA,aAAkBE,YAAA,iBAAAK,OAAoCS,KAAA,SAAeN,IAAKgB,MAAA7B,EAAApB,aAAuBoB,EAAAgB,GAAA,oBAE3yBc,oBCCjB,IAcAC,EAdyBC,EAAQ,OAcjCC,CACE3E,EACAwC,GATF,EAVA,SAAAoC,GACEF,EAAQ,SAaV,kBAEA,MAUeG,EAAA,QAAAJ,EAAiB","file":"static/js/10.88d7d5d70ede62cfb405.js","sourcesContent":["\r\n\r\n\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// src/components/admin/Tags.vue","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('section',{staticClass:\"blog-body\"},[_vm._l((_vm.Tags),function(tag,index){return _c('el-tag',{key:index,attrs:{\"closable\":\"\",\"disable-transitions\":false},on:{\"close\":function($event){return _vm.handleClose(tag)}}},[_vm._v(_vm._s(tag))])}),_vm._v(\" \"),(_vm.inputVisible)?_c('el-input',{ref:\"saveTagInput\",staticClass:\"input-new-tag\",attrs:{\"size\":\"small\"},nativeOn:{\"keyup\":function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,\"enter\",13,$event.key,\"Enter\")){ return null; }return _vm.handleInputConfirm($event)}},model:{value:(_vm.inputValue),callback:function ($$v) {_vm.inputValue=$$v},expression:\"inputValue\"}}):_c('el-button',{staticClass:\"button-new-tag\",attrs:{\"size\":\"small\"},on:{\"click\":_vm.showInput}},[_vm._v(\"+ New Tag\")])],2)}\nvar staticRenderFns = []\nvar esExports = { render: render, staticRenderFns: staticRenderFns }\nexport default esExports\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/vue-loader/lib/template-compiler?{\"id\":\"data-v-23bc81a2\",\"hasScoped\":true,\"transformToRequire\":{\"video\":[\"src\",\"poster\"],\"source\":\"src\",\"img\":\"src\",\"image\":\"xlink:href\"},\"buble\":{\"transforms\":{}}}!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./src/components/admin/Tags.vue\n// module id = null\n// module chunks = ","function injectStyle (ssrContext) {\n require(\"!!../../../node_modules/extract-text-webpack-plugin/dist/loader.js?{\\\"omit\\\":1,\\\"remove\\\":true}!vue-style-loader!css-loader?{\\\"sourceMap\\\":true}!../../../node_modules/vue-loader/lib/style-compiler/index?{\\\"vue\\\":true,\\\"id\\\":\\\"data-v-23bc81a2\\\",\\\"scoped\\\":true,\\\"hasInlineConfig\\\":false}!../../../node_modules/vue-loader/lib/selector?type=styles&index=0!./Tags.vue\")\n}\nvar normalizeComponent = require(\"!../../../node_modules/vue-loader/lib/component-normalizer\")\n/* script */\nexport * from \"!!babel-loader!../../../node_modules/vue-loader/lib/selector?type=script&index=0!./Tags.vue\"\nimport __vue_script__ from \"!!babel-loader!../../../node_modules/vue-loader/lib/selector?type=script&index=0!./Tags.vue\"\n/* template */\nimport __vue_template__ from \"!!../../../node_modules/vue-loader/lib/template-compiler/index?{\\\"id\\\":\\\"data-v-23bc81a2\\\",\\\"hasScoped\\\":true,\\\"transformToRequire\\\":{\\\"video\\\":[\\\"src\\\",\\\"poster\\\"],\\\"source\\\":\\\"src\\\",\\\"img\\\":\\\"src\\\",\\\"image\\\":\\\"xlink:href\\\"},\\\"buble\\\":{\\\"transforms\\\":{}}}!../../../node_modules/vue-loader/lib/selector?type=template&index=0!./Tags.vue\"\n/* template functional */\nvar __vue_template_functional__ = false\n/* styles */\nvar __vue_styles__ = injectStyle\n/* scopeId */\nvar __vue_scopeId__ = \"data-v-23bc81a2\"\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nvar Component = normalizeComponent(\n __vue_script__,\n __vue_template__,\n __vue_template_functional__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\n\nexport default Component.exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/components/admin/Tags.vue\n// module id = null\n// module chunks = "],"sourceRoot":""} -------------------------------------------------------------------------------- /server/public/static/js/11.fe1170a2f6413c9447df.js: -------------------------------------------------------------------------------- 1 | webpackJsonp([11],{Jqmv:function(e,s,a){"use strict";Object.defineProperty(s,"__esModule",{value:!0});var t=a("4ZRF"),n=a("WheD"),r={components:{Header:t.a,Footer:n.a},data:function(){return{username:"",password:""}},methods:{regist:function(){var e=this;""==this.username?this.$message({message:"账号不能为空",type:"warning"}):""==this.password?this.$message({message:"密码不能为空",type:"warning"}):this.axios.post("/api/setUser",{username:this.username,password:this.$md5(this.password)}).then(function(s){1==s.data.status?(e.$message({message:"注册成功",type:"success"}),e.$router.push({path:"/login"})):e.$message.error(s.data.msg)}).catch(function(e){console.log(e)})}}},o={render:function(){var e=this,s=e.$createElement,a=e._self._c||s;return a("div",[a("Header"),e._v(" "),a("div",{staticClass:"regist"},[a("el-input",{staticClass:"username",attrs:{placeholder:"请输入账号",clearable:""},model:{value:e.username,callback:function(s){e.username=s},expression:"username"}}),e._v(" "),a("el-input",{staticClass:"username",attrs:{placeholder:"请输入密码","show-password":"",autocomplete:"off",name:"pwd"},model:{value:e.password,callback:function(s){e.password=s},expression:"password"}}),e._v(" "),a("el-button",{staticClass:"login-btn",on:{click:e.regist}},[e._v("注册")])],1),e._v(" "),a("Footer")],1)},staticRenderFns:[]};var i=a("VU/8")(r,o,!1,function(e){a("SOey")},"data-v-1c218c62",null);s.default=i.exports},SOey:function(e,s){}}); 2 | //# sourceMappingURL=11.fe1170a2f6413c9447df.js.map -------------------------------------------------------------------------------- /server/public/static/js/11.fe1170a2f6413c9447df.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["webpack:///src/components/pages/Regist.vue","webpack:///./src/components/pages/Regist.vue?5e97","webpack:///./src/components/pages/Regist.vue"],"names":["Regist","components","Header","Footer","data","username","password","methods","regist","_this","this","$message","message","type","axios","post","$md5","then","response","status","$router","push","path","error","msg","catch","console","log","pages_Regist","render","_vm","_h","$createElement","_c","_self","_v","staticClass","attrs","placeholder","clearable","model","value","callback","$$v","expression","show-password","autocomplete","name","on","click","staticRenderFns","Component","__webpack_require__","normalizeComponent","ssrContext","__webpack_exports__"],"mappings":"kIAqBAA,GACAC,YAAAC,SAAA,EAAAC,SAAA,GACAC,KAFA,WAGA,OACAC,SAAA,GACAC,SAAA,KAGAC,SACAC,OADA,WACA,IAAAC,EAAAC,KACA,IAAAA,KAAAL,SACAK,KAAAC,UACAC,QAAA,SACAC,KAAA,YAEA,IAAAH,KAAAJ,SACAI,KAAAC,UACAC,QAAA,SACAC,KAAA,YAGAH,KAAAI,MACAC,KAAA,gBACAV,SAAAK,KAAAL,SACAC,SAAAI,KAAAM,KAAAN,KAAAJ,YAEAW,KAAA,SAAAC,GACA,GAAAA,EAAAd,KAAAe,QACAV,EAAAE,UACAC,QAAA,OACAC,KAAA,YAEAJ,EAAAW,QAAAC,MACAC,KAAA,YAGAb,EAAAE,SAAAY,MAAAL,EAAAd,KAAAoB,OAGAC,MAAA,SAAAF,GACAG,QAAAC,IAAAJ,QC1DeK,GADEC,OAFjB,WAA0B,IAAAC,EAAApB,KAAaqB,EAAAD,EAAAE,eAA0BC,EAAAH,EAAAI,MAAAD,IAAAF,EAAwB,OAAAE,EAAA,OAAAA,EAAA,UAAAH,EAAAK,GAAA,KAAAF,EAAA,OAAoDG,YAAA,WAAqBH,EAAA,YAAiBG,YAAA,WAAAC,OAA8BC,YAAA,QAAAC,UAAA,IAAqCC,OAAQC,MAAAX,EAAA,SAAAY,SAAA,SAAAC,GAA8Cb,EAAAzB,SAAAsC,GAAiBC,WAAA,cAAwBd,EAAAK,GAAA,KAAAF,EAAA,YAA6BG,YAAA,WAAAC,OAA8BC,YAAA,QAAAO,gBAAA,GAAAC,aAAA,MAAAC,KAAA,OAA2EP,OAAQC,MAAAX,EAAA,SAAAY,SAAA,SAAAC,GAA8Cb,EAAAxB,SAAAqC,GAAiBC,WAAA,cAAwBd,EAAAK,GAAA,KAAAF,EAAA,aAA8BG,YAAA,YAAAY,IAA4BC,MAAAnB,EAAAtB,UAAoBsB,EAAAK,GAAA,YAAAL,EAAAK,GAAA,KAAAF,EAAA,eAEvnBiB,oBCCjB,IAcAC,EAdyBC,EAAQ,OAcjCC,CACErD,EACA4B,GATF,EAVA,SAAA0B,GACEF,EAAQ,SAaV,kBAEA,MAUeG,EAAA,QAAAJ,EAAiB","file":"static/js/11.fe1170a2f6413c9447df.js","sourcesContent":["\r\n\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// src/components/pages/Regist.vue","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('Header'),_vm._v(\" \"),_c('div',{staticClass:\"regist\"},[_c('el-input',{staticClass:\"username\",attrs:{\"placeholder\":\"请输入账号\",\"clearable\":\"\"},model:{value:(_vm.username),callback:function ($$v) {_vm.username=$$v},expression:\"username\"}}),_vm._v(\" \"),_c('el-input',{staticClass:\"username\",attrs:{\"placeholder\":\"请输入密码\",\"show-password\":\"\",\"autocomplete\":\"off\",\"name\":\"pwd\"},model:{value:(_vm.password),callback:function ($$v) {_vm.password=$$v},expression:\"password\"}}),_vm._v(\" \"),_c('el-button',{staticClass:\"login-btn\",on:{\"click\":_vm.regist}},[_vm._v(\"注册\")])],1),_vm._v(\" \"),_c('Footer')],1)}\nvar staticRenderFns = []\nvar esExports = { render: render, staticRenderFns: staticRenderFns }\nexport default esExports\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/vue-loader/lib/template-compiler?{\"id\":\"data-v-1c218c62\",\"hasScoped\":true,\"transformToRequire\":{\"video\":[\"src\",\"poster\"],\"source\":\"src\",\"img\":\"src\",\"image\":\"xlink:href\"},\"buble\":{\"transforms\":{}}}!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./src/components/pages/Regist.vue\n// module id = null\n// module chunks = ","function injectStyle (ssrContext) {\n require(\"!!../../../node_modules/extract-text-webpack-plugin/dist/loader.js?{\\\"omit\\\":1,\\\"remove\\\":true}!vue-style-loader!css-loader?{\\\"sourceMap\\\":true}!../../../node_modules/vue-loader/lib/style-compiler/index?{\\\"vue\\\":true,\\\"id\\\":\\\"data-v-1c218c62\\\",\\\"scoped\\\":true,\\\"hasInlineConfig\\\":false}!../../../node_modules/vue-loader/lib/selector?type=styles&index=0!./Regist.vue\")\n}\nvar normalizeComponent = require(\"!../../../node_modules/vue-loader/lib/component-normalizer\")\n/* script */\nexport * from \"!!babel-loader!../../../node_modules/vue-loader/lib/selector?type=script&index=0!./Regist.vue\"\nimport __vue_script__ from \"!!babel-loader!../../../node_modules/vue-loader/lib/selector?type=script&index=0!./Regist.vue\"\n/* template */\nimport __vue_template__ from \"!!../../../node_modules/vue-loader/lib/template-compiler/index?{\\\"id\\\":\\\"data-v-1c218c62\\\",\\\"hasScoped\\\":true,\\\"transformToRequire\\\":{\\\"video\\\":[\\\"src\\\",\\\"poster\\\"],\\\"source\\\":\\\"src\\\",\\\"img\\\":\\\"src\\\",\\\"image\\\":\\\"xlink:href\\\"},\\\"buble\\\":{\\\"transforms\\\":{}}}!../../../node_modules/vue-loader/lib/selector?type=template&index=0!./Regist.vue\"\n/* template functional */\nvar __vue_template_functional__ = false\n/* styles */\nvar __vue_styles__ = injectStyle\n/* scopeId */\nvar __vue_scopeId__ = \"data-v-1c218c62\"\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nvar Component = normalizeComponent(\n __vue_script__,\n __vue_template__,\n __vue_template_functional__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\n\nexport default Component.exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/components/pages/Regist.vue\n// module id = null\n// module chunks = "],"sourceRoot":""} -------------------------------------------------------------------------------- /server/public/static/js/12.476900801ccbb7474eec.js: -------------------------------------------------------------------------------- 1 | webpackJsonp([12],{hCXi:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a={data:function(){return{tableData:[],search:"",username:""}},methods:{handleEdit:function(t,e){this.$router.push({path:"/admin/update",query:{draft:e}})},handleDelete:function(t,e){var n=this;console.log(t,e),this.$confirm("此操作将永久删除该文章, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){n.axios.post("/api/admin/delArticle",{id:e.id}).then(function(e){1==e.data.status?(n.$message({message:"删除成功",type:"success"}),n.tableData.splice(t,1)):0==e.data.status&&n.$message.error("删除失败")}).catch(function(t){console.log(t)})}).catch(function(t){console.log(t),n.$message({type:"info",message:"已取消删除"})})}},mounted:function(){var t=this;this.username=sessionStorage.getItem("username"),this.axios.get("/api/getArticle",{params:{state:1,username:this.username}}).then(function(e){t.tableData=e.data}).catch(function(t){console.log(t)})}},s={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("section",{staticClass:"blog-body"},[n("el-table",{staticStyle:{width:"100%"},attrs:{data:t.tableData.filter(function(e){return!t.search||e.name.toLowerCase().includes(t.search.toLowerCase())})}},[n("el-table-column",{attrs:{label:"Title",prop:"title"}}),t._v(" "),n("el-table-column",{attrs:{align:"right"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("el-button",{attrs:{size:"mini"},on:{click:function(n){return t.handleEdit(e.$index,e.row)}}},[t._v("Edit")]),t._v(" "),n("el-button",{attrs:{size:"mini",type:"danger"},on:{click:function(n){return t.handleDelete(e.$index,e.row)}}},[t._v("Delete")])]}}])})],1)],1)},staticRenderFns:[]},i=n("VU/8")(a,s,!1,null,null,null);e.default=i.exports}}); 2 | //# sourceMappingURL=12.476900801ccbb7474eec.js.map -------------------------------------------------------------------------------- /server/public/static/js/12.476900801ccbb7474eec.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["webpack:///src/components/admin/Settings.vue","webpack:///./src/components/admin/Settings.vue?2da6","webpack:///./src/components/admin/Settings.vue"],"names":["Settings","data","tableData","search","username","methods","handleEdit","index","row","this","$router","push","path","query","draft","handleDelete","_this","console","log","$confirm","confirmButtonText","cancelButtonText","type","then","axios","post","id","response","status","$message","message","splice","error","catch","r","mounted","_this2","sessionStorage","getItem","get","params","state","admin_Settings","render","_vm","_h","$createElement","_c","_self","staticClass","staticStyle","width","attrs","filter","name","toLowerCase","includes","label","prop","_v","align","scopedSlots","_u","key","fn","scope","size","on","click","$event","$index","staticRenderFns","Component","__webpack_require__","normalizeComponent","__webpack_exports__"],"mappings":"sGAsBA,IAAAA,GACAC,KADA,WAEA,OACAC,aACAC,OAAA,GACAC,SAAA,KAGAC,SACAC,WADA,SACAC,EAAAC,GACAC,KAAAC,QAAAC,MAAAC,KAAA,gBAAAC,OAAAC,MAAAN,MAEAO,aAJA,SAIAR,EAAAC,GAAA,IAAAQ,EAAAP,KACAQ,QAAAC,IAAAX,EAAAC,GACAC,KAAAU,SAAA,2BACAC,kBAAA,KACAC,iBAAA,KACAC,KAAA,YAEAC,KAAA,WACAP,EAAAQ,MACAC,KAAA,yBACAC,GAAAlB,EAAAkB,KAEAH,KAAA,SAAAI,GACA,GAAAA,EAAA1B,KAAA2B,QACAZ,EAAAa,UACAC,QAAA,OACAR,KAAA,YAEAN,EAAAd,UAAA6B,OAAAxB,EAAA,IACA,GAAAoB,EAAA1B,KAAA2B,QACAZ,EAAAa,SAAAG,MAAA,UAGAC,MAAA,SAAAD,GACAf,QAAAC,IAAAc,OAGAC,MAAA,SAAAC,GACAjB,QAAAC,IAAAgB,GACAlB,EAAAa,UACAP,KAAA,OACAQ,QAAA,cAKAK,QAhDA,WAgDA,IAAAC,EAAA3B,KACAA,KAAAL,SAAAiC,eAAAC,QAAA,YACA7B,KAAAe,MACAe,IAAA,mBAAAC,QAAAC,MAAA,EAAArC,SAAAK,KAAAL,YACAmB,KAAA,SAAAI,GACAS,EAAAlC,UAAAyB,EAAA1B,OAEAgC,MAAA,SAAAD,GACAf,QAAAC,IAAAc,OC3EeU,GADEC,OAFjB,WAA0B,IAAAC,EAAAnC,KAAaoC,EAAAD,EAAAE,eAA0BC,EAAAH,EAAAI,MAAAD,IAAAF,EAAwB,OAAAE,EAAA,WAAqBE,YAAA,cAAwBF,EAAA,YAAiBG,aAAaC,MAAA,QAAeC,OAAQnD,KAAA2C,EAAA1C,UAAAmD,OAAA,SAAApD,GAA6C,OAAA2C,EAAAzC,QAAAF,EAAAqD,KAAAC,cAAAC,SAAAZ,EAAAzC,OAAAoD,oBAAuFR,EAAA,mBAAwBK,OAAOK,MAAA,QAAAC,KAAA,WAAgCd,EAAAe,GAAA,KAAAZ,EAAA,mBAAoCK,OAAOQ,MAAA,SAAgBC,YAAAjB,EAAAkB,KAAsBC,IAAA,UAAAC,GAAA,SAAAC,GAAiC,OAAAlB,EAAA,aAAwBK,OAAOc,KAAA,QAAcC,IAAKC,MAAA,SAAAC,GAAyB,OAAAzB,EAAAtC,WAAA2D,EAAAK,OAAAL,EAAAzD,SAAiDoC,EAAAe,GAAA,UAAAf,EAAAe,GAAA,KAAAZ,EAAA,aAA+CK,OAAOc,KAAA,OAAA5C,KAAA,UAA8B6C,IAAKC,MAAA,SAAAC,GAAyB,OAAAzB,EAAA7B,aAAAkD,EAAAK,OAAAL,EAAAzD,SAAmDoC,EAAAe,GAAA,oBAA0B,QAE1xBY,oBCYjBC,EAdyBC,EAAQ,OAcjCC,CACE1E,EACA0C,GATF,EAEA,KAEA,KAEA,MAUeiC,EAAA,QAAAH,EAAiB","file":"static/js/12.476900801ccbb7474eec.js","sourcesContent":["\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// src/components/admin/Settings.vue","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('section',{staticClass:\"blog-body\"},[_c('el-table',{staticStyle:{\"width\":\"100%\"},attrs:{\"data\":_vm.tableData.filter(function (data) { return !_vm.search || data.name.toLowerCase().includes(_vm.search.toLowerCase()); })}},[_c('el-table-column',{attrs:{\"label\":\"Title\",\"prop\":\"title\"}}),_vm._v(\" \"),_c('el-table-column',{attrs:{\"align\":\"right\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_c('el-button',{attrs:{\"size\":\"mini\"},on:{\"click\":function($event){return _vm.handleEdit(scope.$index, scope.row)}}},[_vm._v(\"Edit\")]),_vm._v(\" \"),_c('el-button',{attrs:{\"size\":\"mini\",\"type\":\"danger\"},on:{\"click\":function($event){return _vm.handleDelete(scope.$index, scope.row)}}},[_vm._v(\"Delete\")])]}}])})],1)],1)}\nvar staticRenderFns = []\nvar esExports = { render: render, staticRenderFns: staticRenderFns }\nexport default esExports\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/vue-loader/lib/template-compiler?{\"id\":\"data-v-246c455e\",\"hasScoped\":false,\"transformToRequire\":{\"video\":[\"src\",\"poster\"],\"source\":\"src\",\"img\":\"src\",\"image\":\"xlink:href\"},\"buble\":{\"transforms\":{}}}!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./src/components/admin/Settings.vue\n// module id = null\n// module chunks = ","var normalizeComponent = require(\"!../../../node_modules/vue-loader/lib/component-normalizer\")\n/* script */\nexport * from \"!!babel-loader!../../../node_modules/vue-loader/lib/selector?type=script&index=0!./Settings.vue\"\nimport __vue_script__ from \"!!babel-loader!../../../node_modules/vue-loader/lib/selector?type=script&index=0!./Settings.vue\"\n/* template */\nimport __vue_template__ from \"!!../../../node_modules/vue-loader/lib/template-compiler/index?{\\\"id\\\":\\\"data-v-246c455e\\\",\\\"hasScoped\\\":false,\\\"transformToRequire\\\":{\\\"video\\\":[\\\"src\\\",\\\"poster\\\"],\\\"source\\\":\\\"src\\\",\\\"img\\\":\\\"src\\\",\\\"image\\\":\\\"xlink:href\\\"},\\\"buble\\\":{\\\"transforms\\\":{}}}!../../../node_modules/vue-loader/lib/selector?type=template&index=0!./Settings.vue\"\n/* template functional */\nvar __vue_template_functional__ = false\n/* styles */\nvar __vue_styles__ = null\n/* scopeId */\nvar __vue_scopeId__ = null\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nvar Component = normalizeComponent(\n __vue_script__,\n __vue_template__,\n __vue_template_functional__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\n\nexport default Component.exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/components/admin/Settings.vue\n// module id = null\n// module chunks = "],"sourceRoot":""} -------------------------------------------------------------------------------- /server/public/static/js/13.18e0a314cea15ca2cdcc.js: -------------------------------------------------------------------------------- 1 | webpackJsonp([13],{R0tf:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var s={render:function(){var t=this.$createElement;return(this._self._c||t)("section",{staticClass:"blog-body",staticStyle:{"text-align":"center"}},[this._v("\n Nothing\n")])},staticRenderFns:[]},l=n("VU/8")({},s,!1,null,null,null);e.default=l.exports}}); 2 | //# sourceMappingURL=13.18e0a314cea15ca2cdcc.js.map -------------------------------------------------------------------------------- /server/public/static/js/13.18e0a314cea15ca2cdcc.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["webpack:///src/components/admin/Comments.vue","webpack:///./src/components/admin/Comments.vue?6d2b","webpack:///./src/components/admin/Comments.vue"],"names":["admin_Comments","render","_h","this","$createElement","_self","_c","staticClass","staticStyle","text-align","_v","staticRenderFns","Component","__webpack_require__","normalizeComponent","__webpack_exports__"],"mappings":"sGAMA,ICHeA,GADEC,OAFjB,WAA0B,IAAaC,EAAbC,KAAaC,eAAkD,OAA/DD,KAAuCE,MAAAC,IAAAJ,GAAwB,WAAqBK,YAAA,YAAAC,aAAqCC,aAAA,YAAzHN,KAAgJO,GAAA,sBAEzJC,oBCYjBC,EAdyBC,EAAQ,OAcjCC,IAEEd,GATF,EAEA,KAEA,KAEA,MAUee,EAAA,QAAAH,EAAiB","file":"static/js/13.18e0a314cea15ca2cdcc.js","sourcesContent":["\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// src/components/admin/Comments.vue","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('section',{staticClass:\"blog-body\",staticStyle:{\"text-align\":\"center\"}},[_vm._v(\"\\n Nothing\\n\")])}\nvar staticRenderFns = []\nvar esExports = { render: render, staticRenderFns: staticRenderFns }\nexport default esExports\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/vue-loader/lib/template-compiler?{\"id\":\"data-v-7c6f6f43\",\"hasScoped\":false,\"transformToRequire\":{\"video\":[\"src\",\"poster\"],\"source\":\"src\",\"img\":\"src\",\"image\":\"xlink:href\"},\"buble\":{\"transforms\":{}}}!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./src/components/admin/Comments.vue\n// module id = null\n// module chunks = ","var normalizeComponent = require(\"!../../../node_modules/vue-loader/lib/component-normalizer\")\n/* script */\nexport * from \"!!babel-loader!../../../node_modules/vue-loader/lib/selector?type=script&index=0!./Comments.vue\"\nimport __vue_script__ from \"!!babel-loader!../../../node_modules/vue-loader/lib/selector?type=script&index=0!./Comments.vue\"\n/* template */\nimport __vue_template__ from \"!!../../../node_modules/vue-loader/lib/template-compiler/index?{\\\"id\\\":\\\"data-v-7c6f6f43\\\",\\\"hasScoped\\\":false,\\\"transformToRequire\\\":{\\\"video\\\":[\\\"src\\\",\\\"poster\\\"],\\\"source\\\":\\\"src\\\",\\\"img\\\":\\\"src\\\",\\\"image\\\":\\\"xlink:href\\\"},\\\"buble\\\":{\\\"transforms\\\":{}}}!../../../node_modules/vue-loader/lib/selector?type=template&index=0!./Comments.vue\"\n/* template functional */\nvar __vue_template_functional__ = false\n/* styles */\nvar __vue_styles__ = null\n/* scopeId */\nvar __vue_scopeId__ = null\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nvar Component = normalizeComponent(\n __vue_script__,\n __vue_template__,\n __vue_template_functional__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\n\nexport default Component.exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/components/admin/Comments.vue\n// module id = null\n// module chunks = "],"sourceRoot":""} -------------------------------------------------------------------------------- /server/public/static/js/2.a558c3eecc77b2f86eff.js: -------------------------------------------------------------------------------- 1 | webpackJsonp([2],{W4u9:function(t,s){},XSwH:function(t,s,i){"use strict";Object.defineProperty(s,"__esModule",{value:!0});var e={render:function(){this.$createElement;this._self._c;return this._m(0)},staticRenderFns:[function(){var t=this.$createElement,s=this._self._c||t;return s("div",{attrs:{bgcolor:"#494949"}},[s("div",{staticClass:"head404"}),this._v(" "),s("div",{staticClass:"txtbg404"},[s("div",{staticClass:"txtbox"},[s("p",[this._v("对不起,您请求的页面不存在、或已被删除、或暂时不可用")]),this._v(" "),s("p",{staticClass:"paddingbox"},[this._v("请点击以下链接继续浏览网页")]),this._v(" "),s("p",[this._v("\n 》\n "),s("a",{staticStyle:{cursor:"pointer"},attrs:{onclick:"history.back()"}},[this._v("返回上一页面")])])])])])}]};var a=i("VU/8")(null,e,!1,function(t){i("W4u9")},"data-v-ac77346a",null);s.default=a.exports}}); 2 | //# sourceMappingURL=2.a558c3eecc77b2f86eff.js.map -------------------------------------------------------------------------------- /server/public/static/js/2.a558c3eecc77b2f86eff.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["webpack:///./src/components/pages/NotFound.vue?ac94","webpack:///./src/components/pages/NotFound.vue"],"names":["NotFound","render","this","$createElement","_self","_c","_m","staticRenderFns","_h","attrs","bgcolor","staticClass","_v","staticStyle","cursor","onclick","Component","__webpack_require__","normalizeComponent","ssrContext","__webpack_exports__"],"mappings":"0HAAA,IAGeA,GADEC,OAFjB,WAA0BC,KAAaC,eAAbD,KAAuCE,MAAAC,GAAwB,OAA/DH,KAA+DI,GAAA,IAExEC,iBADjB,WAAoC,IAAaC,EAAbN,KAAaC,eAA0BE,EAAvCH,KAAuCE,MAAAC,IAAAG,EAAwB,OAAAH,EAAA,OAAiBI,OAAOC,QAAA,aAAqBL,EAAA,OAAYM,YAAA,YAAxHT,KAA8IU,GAAA,KAAAP,EAAA,OAAwBM,YAAA,aAAuBN,EAAA,OAAYM,YAAA,WAAqBN,EAAA,KAA9NH,KAA8NU,GAAA,gCAA9NV,KAA8NU,GAAA,KAAAP,EAAA,KAAqEM,YAAA,eAAnST,KAA4TU,GAAA,mBAA5TV,KAA4TU,GAAA,KAAAP,EAAA,KAA5TH,KAA4TU,GAAA,yBAAAP,EAAA,KAAwFQ,aAAaC,OAAA,WAAmBL,OAAQM,QAAA,oBAA5bb,KAAwdU,GAAA,uBCE5f,IAaAI,EAbyBC,EAAQ,OAajCC,CAXA,KAaElB,GATF,EATA,SAAAmB,GACEF,EAAQ,SAYV,kBAEA,MAUeG,EAAA,QAAAJ,EAAiB","file":"static/js/2.a558c3eecc77b2f86eff.js","sourcesContent":["var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _vm._m(0)}\nvar staticRenderFns = [function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{attrs:{\"bgcolor\":\"#494949\"}},[_c('div',{staticClass:\"head404\"}),_vm._v(\" \"),_c('div',{staticClass:\"txtbg404\"},[_c('div',{staticClass:\"txtbox\"},[_c('p',[_vm._v(\"对不起,您请求的页面不存在、或已被删除、或暂时不可用\")]),_vm._v(\" \"),_c('p',{staticClass:\"paddingbox\"},[_vm._v(\"请点击以下链接继续浏览网页\")]),_vm._v(\" \"),_c('p',[_vm._v(\"\\n 》\\n \"),_c('a',{staticStyle:{\"cursor\":\"pointer\"},attrs:{\"onclick\":\"history.back()\"}},[_vm._v(\"返回上一页面\")])])])])])}]\nvar esExports = { render: render, staticRenderFns: staticRenderFns }\nexport default esExports\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/vue-loader/lib/template-compiler?{\"id\":\"data-v-ac77346a\",\"hasScoped\":true,\"transformToRequire\":{\"video\":[\"src\",\"poster\"],\"source\":\"src\",\"img\":\"src\",\"image\":\"xlink:href\"},\"buble\":{\"transforms\":{}}}!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./src/components/pages/NotFound.vue\n// module id = null\n// module chunks = ","function injectStyle (ssrContext) {\n require(\"!!../../../node_modules/extract-text-webpack-plugin/dist/loader.js?{\\\"omit\\\":1,\\\"remove\\\":true}!vue-style-loader!css-loader?{\\\"sourceMap\\\":true}!../../../node_modules/vue-loader/lib/style-compiler/index?{\\\"vue\\\":true,\\\"id\\\":\\\"data-v-ac77346a\\\",\\\"scoped\\\":true,\\\"hasInlineConfig\\\":false}!../../../node_modules/vue-loader/lib/selector?type=styles&index=0!./NotFound.vue\")\n}\nvar normalizeComponent = require(\"!../../../node_modules/vue-loader/lib/component-normalizer\")\n/* script */\nvar __vue_script__ = null\n/* template */\nimport __vue_template__ from \"!!../../../node_modules/vue-loader/lib/template-compiler/index?{\\\"id\\\":\\\"data-v-ac77346a\\\",\\\"hasScoped\\\":true,\\\"transformToRequire\\\":{\\\"video\\\":[\\\"src\\\",\\\"poster\\\"],\\\"source\\\":\\\"src\\\",\\\"img\\\":\\\"src\\\",\\\"image\\\":\\\"xlink:href\\\"},\\\"buble\\\":{\\\"transforms\\\":{}}}!../../../node_modules/vue-loader/lib/selector?type=template&index=0!./NotFound.vue\"\n/* template functional */\nvar __vue_template_functional__ = false\n/* styles */\nvar __vue_styles__ = injectStyle\n/* scopeId */\nvar __vue_scopeId__ = \"data-v-ac77346a\"\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nvar Component = normalizeComponent(\n __vue_script__,\n __vue_template__,\n __vue_template_functional__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\n\nexport default Component.exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/components/pages/NotFound.vue\n// module id = null\n// module chunks = "],"sourceRoot":""} -------------------------------------------------------------------------------- /server/public/static/js/3.6b33eb61d5b9b7ebbd7f.js: -------------------------------------------------------------------------------- 1 | webpackJsonp([3],{"I4Y/":function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a={data:function(){return{draft:[],tags:[]}},methods:{del:function(){var t=this;this.$confirm("此操作将永久删除该文件, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){t.axios.post("/api/admin/delArticle",{id:t.draft.id}).then(function(e){1==e.data.status?(t.$message({message:"删除成功",type:"success"}),t.$router.push({path:"/admin/draft"})):0==e.data.status&&t.$message.error("删除失败")}).catch(function(t){console.log(t)})}).catch(function(){t.$message({type:"info",message:"已取消删除"})})},update:function(){this.$router.push({path:"/admin/update",query:{draft:this.draft}})},publish:function(){var t=this;this.axios.post("/api/admin/updateArticle",{state:1,id:this.draft.id}).then(function(e){1==e.data.status?(t.$message({message:"发布成功",type:"success"}),t.$router.push({path:"/admin/draft"})):0==e.data.status&&t.$message.error("发布失败")}).catch(function(t){console.log(t)})}},mounted:function(){this.draft=this.$route.query.article;var t=this.draft.type.substring(1,this.draft.type.length-1).replace(/\"/g,"");this.tags=t.split(",")}},i={render:function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("section",{staticClass:"blog-body"},[s("div",{staticClass:"detail"},[s("h1",{staticClass:"detail-title"},[t._v(t._s(t.draft.title))]),t._v(" "),s("div",{staticClass:"detail-content"},[s("p",{domProps:{innerHTML:t._s(t.draft.shtml)}})]),t._v(" "),s("div",{staticStyle:{"margin-top":"10px"}},t._l(t.tags,function(e,a){return s("el-tag",{key:a,staticStyle:{border:"none","margin-right":"10px"},attrs:{type:"info"}},[t._v(t._s(e))])}),1),t._v(" "),s("div",{staticStyle:{"text-align":"center",margin:"10px 0"}},[s("el-button",{attrs:{type:"primary",size:"small"},on:{click:t.update}},[t._v("编辑")]),t._v(" "),s("el-button",{attrs:{type:"danger",size:"small"},on:{click:t.del}},[t._v("删除")]),t._v(" "),s("el-button",{attrs:{type:"success",size:"small"},on:{click:t.publish}},[t._v("发布")])],1)])])},staticRenderFns:[]};var n=s("VU/8")(a,i,!1,function(t){s("rNdn")},"data-v-74dbdb36",null);e.default=n.exports},rNdn:function(t,e){}}); 2 | //# sourceMappingURL=3.6b33eb61d5b9b7ebbd7f.js.map -------------------------------------------------------------------------------- /server/public/static/js/3.6b33eb61d5b9b7ebbd7f.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["webpack:///src/components/admin/DraftContent.vue","webpack:///./src/components/admin/DraftContent.vue?290a","webpack:///./src/components/admin/DraftContent.vue"],"names":["DraftContent","data","draft","tags","methods","del","_this","this","$confirm","confirmButtonText","cancelButtonText","type","then","axios","post","id","response","status","$message","message","$router","push","path","error","catch","console","log","update","query","publish","_this2","state","mounted","$route","article","str","substring","length","replace","split","admin_DraftContent","render","_vm","_h","$createElement","_c","_self","staticClass","_v","_s","title","domProps","innerHTML","shtml","staticStyle","margin-top","_l","tag","index","key","border","margin-right","attrs","text-align","margin","size","on","click","staticRenderFns","Component","__webpack_require__","normalizeComponent","ssrContext","__webpack_exports__"],"mappings":"uGAmBA,IAAAA,GACAC,KADA,WAEA,OACAC,SACAC,UAGAC,SACAC,IADA,WACA,IAAAC,EAAAC,KACAA,KAAAC,SAAA,2BACAC,kBAAA,KACAC,iBAAA,KACAC,KAAA,YAEAC,KAAA,WACAN,EAAAO,MACAC,KAAA,yBACAC,GAAAT,EAAAJ,MAAAa,KAEAH,KAAA,SAAAI,GACA,GAAAA,EAAAf,KAAAgB,QACAX,EAAAY,UACAC,QAAA,OACAR,KAAA,YAEAL,EAAAc,QAAAC,MACAC,KAAA,kBAEA,GAAAN,EAAAf,KAAAgB,QACAX,EAAAY,SAAAK,MAAA,UAGAC,MAAA,SAAAD,GACAE,QAAAC,IAAAH,OAGAC,MAAA,WACAlB,EAAAY,UACAP,KAAA,OACAQ,QAAA,aAIAQ,OApCA,WAqCApB,KAAAa,QAAAC,MACAC,KAAA,gBACAM,OAAA1B,MAAAK,KAAAL,UAGA2B,QA1CA,WA0CA,IAAAC,EAAAvB,KACAA,KAAAM,MACAC,KAAA,4BACAiB,MAAA,EACAhB,GAAAR,KAAAL,MAAAa,KAEAH,KAAA,SAAAI,GACA,GAAAA,EAAAf,KAAAgB,QACAa,EAAAZ,UACAC,QAAA,OACAR,KAAA,YAEAmB,EAAAV,QAAAC,MACAC,KAAA,kBAEA,GAAAN,EAAAf,KAAAgB,QACAa,EAAAZ,SAAAK,MAAA,UAGAC,MAAA,SAAAD,GACAE,QAAAC,IAAAH,OAIAS,QAzEA,WA0EAzB,KAAAL,MAAAK,KAAA0B,OAAAL,MAAAM,QACA,IAAAC,EAAA5B,KAAAL,MAAAS,KAAAyB,UAAA,EAAA7B,KAAAL,MAAAS,KAAA0B,OAAA,GAAAC,QAAA,UACA/B,KAAAJ,KAAAgC,EAAAI,MAAA,OC5FeC,GADEC,OAFjB,WAA0B,IAAAC,EAAAnC,KAAaoC,EAAAD,EAAAE,eAA0BC,EAAAH,EAAAI,MAAAD,IAAAF,EAAwB,OAAAE,EAAA,WAAqBE,YAAA,cAAwBF,EAAA,OAAYE,YAAA,WAAqBF,EAAA,MAAWE,YAAA,iBAA2BL,EAAAM,GAAAN,EAAAO,GAAAP,EAAAxC,MAAAgD,UAAAR,EAAAM,GAAA,KAAAH,EAAA,OAA0DE,YAAA,mBAA6BF,EAAA,KAAUM,UAAUC,UAAAV,EAAAO,GAAAP,EAAAxC,MAAAmD,YAAqCX,EAAAM,GAAA,KAAAH,EAAA,OAA0BS,aAAaC,aAAA,SAAqBb,EAAAc,GAAAd,EAAA,cAAAe,EAAAC,GAAuC,OAAAb,EAAA,UAAoBc,IAAAD,EAAAJ,aAAuBM,OAAA,OAAAC,eAAA,QAAsCC,OAAQnD,KAAA,UAAe+B,EAAAM,GAAAN,EAAAO,GAAAQ,QAAwB,GAAAf,EAAAM,GAAA,KAAAH,EAAA,OAA2BS,aAAaS,aAAA,SAAAC,OAAA,YAAyCnB,EAAA,aAAkBiB,OAAOnD,KAAA,UAAAsD,KAAA,SAAgCC,IAAKC,MAAAzB,EAAAf,UAAoBe,EAAAM,GAAA,QAAAN,EAAAM,GAAA,KAAAH,EAAA,aAA6CiB,OAAOnD,KAAA,SAAAsD,KAAA,SAA+BC,IAAKC,MAAAzB,EAAArC,OAAiBqC,EAAAM,GAAA,QAAAN,EAAAM,GAAA,KAAAH,EAAA,aAA6CiB,OAAOnD,KAAA,UAAAsD,KAAA,SAAgCC,IAAKC,MAAAzB,EAAAb,WAAqBa,EAAAM,GAAA,iBAEz6BoB,oBCCjB,IAcAC,EAdyBC,EAAQ,OAcjCC,CACEvE,EACAwC,GATF,EAVA,SAAAgC,GACEF,EAAQ,SAaV,kBAEA,MAUeG,EAAA,QAAAJ,EAAiB","file":"static/js/3.6b33eb61d5b9b7ebbd7f.js","sourcesContent":["\r\n\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// src/components/admin/DraftContent.vue","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('section',{staticClass:\"blog-body\"},[_c('div',{staticClass:\"detail\"},[_c('h1',{staticClass:\"detail-title\"},[_vm._v(_vm._s(_vm.draft.title))]),_vm._v(\" \"),_c('div',{staticClass:\"detail-content\"},[_c('p',{domProps:{\"innerHTML\":_vm._s(_vm.draft.shtml)}})]),_vm._v(\" \"),_c('div',{staticStyle:{\"margin-top\":\"10px\"}},_vm._l((_vm.tags),function(tag,index){return _c('el-tag',{key:index,staticStyle:{\"border\":\"none\",\"margin-right\":\"10px\"},attrs:{\"type\":\"info\"}},[_vm._v(_vm._s(tag))])}),1),_vm._v(\" \"),_c('div',{staticStyle:{\"text-align\":\"center\",\"margin\":\"10px 0\"}},[_c('el-button',{attrs:{\"type\":\"primary\",\"size\":\"small\"},on:{\"click\":_vm.update}},[_vm._v(\"编辑\")]),_vm._v(\" \"),_c('el-button',{attrs:{\"type\":\"danger\",\"size\":\"small\"},on:{\"click\":_vm.del}},[_vm._v(\"删除\")]),_vm._v(\" \"),_c('el-button',{attrs:{\"type\":\"success\",\"size\":\"small\"},on:{\"click\":_vm.publish}},[_vm._v(\"发布\")])],1)])])}\nvar staticRenderFns = []\nvar esExports = { render: render, staticRenderFns: staticRenderFns }\nexport default esExports\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/vue-loader/lib/template-compiler?{\"id\":\"data-v-74dbdb36\",\"hasScoped\":true,\"transformToRequire\":{\"video\":[\"src\",\"poster\"],\"source\":\"src\",\"img\":\"src\",\"image\":\"xlink:href\"},\"buble\":{\"transforms\":{}}}!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./src/components/admin/DraftContent.vue\n// module id = null\n// module chunks = ","function injectStyle (ssrContext) {\n require(\"!!../../../node_modules/extract-text-webpack-plugin/dist/loader.js?{\\\"omit\\\":1,\\\"remove\\\":true}!vue-style-loader!css-loader?{\\\"sourceMap\\\":true}!../../../node_modules/vue-loader/lib/style-compiler/index?{\\\"vue\\\":true,\\\"id\\\":\\\"data-v-74dbdb36\\\",\\\"scoped\\\":true,\\\"hasInlineConfig\\\":false}!../../../node_modules/vue-loader/lib/selector?type=styles&index=0!./DraftContent.vue\")\n}\nvar normalizeComponent = require(\"!../../../node_modules/vue-loader/lib/component-normalizer\")\n/* script */\nexport * from \"!!babel-loader!../../../node_modules/vue-loader/lib/selector?type=script&index=0!./DraftContent.vue\"\nimport __vue_script__ from \"!!babel-loader!../../../node_modules/vue-loader/lib/selector?type=script&index=0!./DraftContent.vue\"\n/* template */\nimport __vue_template__ from \"!!../../../node_modules/vue-loader/lib/template-compiler/index?{\\\"id\\\":\\\"data-v-74dbdb36\\\",\\\"hasScoped\\\":true,\\\"transformToRequire\\\":{\\\"video\\\":[\\\"src\\\",\\\"poster\\\"],\\\"source\\\":\\\"src\\\",\\\"img\\\":\\\"src\\\",\\\"image\\\":\\\"xlink:href\\\"},\\\"buble\\\":{\\\"transforms\\\":{}}}!../../../node_modules/vue-loader/lib/selector?type=template&index=0!./DraftContent.vue\"\n/* template functional */\nvar __vue_template_functional__ = false\n/* styles */\nvar __vue_styles__ = injectStyle\n/* scopeId */\nvar __vue_scopeId__ = \"data-v-74dbdb36\"\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nvar Component = normalizeComponent(\n __vue_script__,\n __vue_template__,\n __vue_template_functional__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\n\nexport default Component.exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/components/admin/DraftContent.vue\n// module id = null\n// module chunks = "],"sourceRoot":""} -------------------------------------------------------------------------------- /server/public/static/js/4.b1617ea6e76907936c32.js: -------------------------------------------------------------------------------- 1 | webpackJsonp([4],{"3jL2":function(e,s,t){"use strict";Object.defineProperty(s,"__esModule",{value:!0});var a=t("4ZRF"),n=t("WheD"),r={components:{Header:a.a,Footer:n.a},data:function(){return{username:"",password:""}},methods:{login:function(){var e=this;""==this.username?this.$message({message:"账号不能为空",type:"warning"}):""==this.password?this.$message({message:"密码不能为空",type:"warning"}):this.axios.post("/api/userLogin",{username:this.username,password:this.$md5(this.password)}).then(function(s){1==s.data.status?(e.$message({message:"登录成功",type:"success"}),sessionStorage.setItem("username",e.username),sessionStorage.setItem("token",s.data.token),e.$router.push({path:"/admin/newEssay"})):e.$message.error(s.data.msg)}).catch(function(s){e.$message.error("服务器错误"),console.log(s)})}}},o={render:function(){var e=this,s=e.$createElement,t=e._self._c||s;return t("div",[t("Header"),e._v(" "),t("div",{staticClass:"login"},[t("el-input",{staticClass:"username",attrs:{placeholder:"请输入账号",clearable:""},model:{value:e.username,callback:function(s){e.username=s},expression:"username"}}),e._v(" "),t("el-input",{staticClass:"username",attrs:{placeholder:"请输入密码","show-password":"",autocomplete:"off"},nativeOn:{keyup:function(s){return!s.type.indexOf("key")&&e._k(s.keyCode,"enter",13,s.key,"Enter")?null:e.login(s)}},model:{value:e.password,callback:function(s){e.password=s},expression:"password"}}),e._v(" "),t("el-button",{staticClass:"login-btn",on:{click:e.login}},[e._v("登录")]),e._v(" "),t("p",[e._v("\n 还没有账号?请\n "),t("el-button",{attrs:{type:"text"}},[t("router-link",{attrs:{to:"/regist"}},[e._v("注册")])],1)],1)],1),e._v(" "),t("Footer")],1)},staticRenderFns:[]};var i=t("VU/8")(r,o,!1,function(e){t("NIBv")},"data-v-720c44e1",null);s.default=i.exports},NIBv:function(e,s){}}); 2 | //# sourceMappingURL=4.b1617ea6e76907936c32.js.map -------------------------------------------------------------------------------- /server/public/static/js/4.b1617ea6e76907936c32.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["webpack:///src/components/pages/Login.vue","webpack:///./src/components/pages/Login.vue?bb7f","webpack:///./src/components/pages/Login.vue"],"names":["Login","components","Header","Footer","data","username","password","methods","login","_this","this","$message","message","type","axios","post","$md5","then","response","status","sessionStorage","setItem","token","$router","push","path","error","msg","catch","console","log","pages_Login","render","_vm","_h","$createElement","_c","_self","_v","staticClass","attrs","placeholder","clearable","model","value","callback","$$v","expression","show-password","autocomplete","nativeOn","keyup","$event","indexOf","_k","keyCode","key","on","click","to","staticRenderFns","Component","__webpack_require__","normalizeComponent","ssrContext","__webpack_exports__"],"mappings":"mIA2BAA,GACAC,YAAAC,SAAA,EAAAC,SAAA,GACAC,KAFA,WAGA,OACAC,SAAA,GACAC,SAAA,KAGAC,SACAC,MADA,WACA,IAAAC,EAAAC,KACA,IAAAA,KAAAL,SACAK,KAAAC,UACAC,QAAA,SACAC,KAAA,YAEA,IAAAH,KAAAJ,SACAI,KAAAC,UACAC,QAAA,SACAC,KAAA,YAGAH,KAAAI,MACAC,KAAA,kBACAV,SAAAK,KAAAL,SACAC,SAAAI,KAAAM,KAAAN,KAAAJ,YAEAW,KAAA,SAAAC,GACA,GAAAA,EAAAd,KAAAe,QACAV,EAAAE,UACAC,QAAA,OACAC,KAAA,YAEAO,eAAAC,QAAA,WAAAZ,EAAAJ,UACAe,eAAAC,QAAA,QAAAH,EAAAd,KAAAkB,OACAb,EAAAc,QAAAC,MACAC,KAAA,qBAGAhB,EAAAE,SAAAe,MAAAR,EAAAd,KAAAuB,OAGAC,MAAA,SAAAF,GACAjB,EAAAE,SAAAe,MAAA,SACAG,QAAAC,IAAAJ,QCnEeK,GADEC,OAFjB,WAA0B,IAAAC,EAAAvB,KAAawB,EAAAD,EAAAE,eAA0BC,EAAAH,EAAAI,MAAAD,IAAAF,EAAwB,OAAAE,EAAA,OAAAA,EAAA,UAAAH,EAAAK,GAAA,KAAAF,EAAA,OAAoDG,YAAA,UAAoBH,EAAA,YAAiBG,YAAA,WAAAC,OAA8BC,YAAA,QAAAC,UAAA,IAAqCC,OAAQC,MAAAX,EAAA,SAAAY,SAAA,SAAAC,GAA8Cb,EAAA5B,SAAAyC,GAAiBC,WAAA,cAAwBd,EAAAK,GAAA,KAAAF,EAAA,YAA6BG,YAAA,WAAAC,OAA8BC,YAAA,QAAAO,gBAAA,GAAAC,aAAA,OAA8DC,UAAWC,MAAA,SAAAC,GAAyB,OAAAA,EAAAvC,KAAAwC,QAAA,QAAApB,EAAAqB,GAAAF,EAAAG,QAAA,WAAAH,EAAAI,IAAA,SAAsF,KAAevB,EAAAzB,MAAA4C,KAA0BT,OAAQC,MAAAX,EAAA,SAAAY,SAAA,SAAAC,GAA8Cb,EAAA3B,SAAAwC,GAAiBC,WAAA,cAAwBd,EAAAK,GAAA,KAAAF,EAAA,aAA8BG,YAAA,YAAAkB,IAA4BC,MAAAzB,EAAAzB,SAAmByB,EAAAK,GAAA,QAAAL,EAAAK,GAAA,KAAAF,EAAA,KAAAH,EAAAK,GAAA,2BAAAF,EAAA,aAAuFI,OAAO3B,KAAA,UAAeuB,EAAA,eAAoBI,OAAOmB,GAAA,aAAgB1B,EAAAK,GAAA,oBAAAL,EAAAK,GAAA,KAAAF,EAAA,eAEn6BwB,oBCCjB,IAcAC,EAdyBC,EAAQ,OAcjCC,CACE/D,EACA+B,GATF,EAVA,SAAAiC,GACEF,EAAQ,SAaV,kBAEA,MAUeG,EAAA,QAAAJ,EAAiB","file":"static/js/4.b1617ea6e76907936c32.js","sourcesContent":["\r\n\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// src/components/pages/Login.vue","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('Header'),_vm._v(\" \"),_c('div',{staticClass:\"login\"},[_c('el-input',{staticClass:\"username\",attrs:{\"placeholder\":\"请输入账号\",\"clearable\":\"\"},model:{value:(_vm.username),callback:function ($$v) {_vm.username=$$v},expression:\"username\"}}),_vm._v(\" \"),_c('el-input',{staticClass:\"username\",attrs:{\"placeholder\":\"请输入密码\",\"show-password\":\"\",\"autocomplete\":\"off\"},nativeOn:{\"keyup\":function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,\"enter\",13,$event.key,\"Enter\")){ return null; }return _vm.login($event)}},model:{value:(_vm.password),callback:function ($$v) {_vm.password=$$v},expression:\"password\"}}),_vm._v(\" \"),_c('el-button',{staticClass:\"login-btn\",on:{\"click\":_vm.login}},[_vm._v(\"登录\")]),_vm._v(\" \"),_c('p',[_vm._v(\"\\n 还没有账号?请\\n \"),_c('el-button',{attrs:{\"type\":\"text\"}},[_c('router-link',{attrs:{\"to\":\"/regist\"}},[_vm._v(\"注册\")])],1)],1)],1),_vm._v(\" \"),_c('Footer')],1)}\nvar staticRenderFns = []\nvar esExports = { render: render, staticRenderFns: staticRenderFns }\nexport default esExports\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/vue-loader/lib/template-compiler?{\"id\":\"data-v-720c44e1\",\"hasScoped\":true,\"transformToRequire\":{\"video\":[\"src\",\"poster\"],\"source\":\"src\",\"img\":\"src\",\"image\":\"xlink:href\"},\"buble\":{\"transforms\":{}}}!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./src/components/pages/Login.vue\n// module id = null\n// module chunks = ","function injectStyle (ssrContext) {\n require(\"!!../../../node_modules/extract-text-webpack-plugin/dist/loader.js?{\\\"omit\\\":1,\\\"remove\\\":true}!vue-style-loader!css-loader?{\\\"sourceMap\\\":true}!../../../node_modules/vue-loader/lib/style-compiler/index?{\\\"vue\\\":true,\\\"id\\\":\\\"data-v-720c44e1\\\",\\\"scoped\\\":true,\\\"hasInlineConfig\\\":false}!../../../node_modules/vue-loader/lib/selector?type=styles&index=0!./Login.vue\")\n}\nvar normalizeComponent = require(\"!../../../node_modules/vue-loader/lib/component-normalizer\")\n/* script */\nexport * from \"!!babel-loader!../../../node_modules/vue-loader/lib/selector?type=script&index=0!./Login.vue\"\nimport __vue_script__ from \"!!babel-loader!../../../node_modules/vue-loader/lib/selector?type=script&index=0!./Login.vue\"\n/* template */\nimport __vue_template__ from \"!!../../../node_modules/vue-loader/lib/template-compiler/index?{\\\"id\\\":\\\"data-v-720c44e1\\\",\\\"hasScoped\\\":true,\\\"transformToRequire\\\":{\\\"video\\\":[\\\"src\\\",\\\"poster\\\"],\\\"source\\\":\\\"src\\\",\\\"img\\\":\\\"src\\\",\\\"image\\\":\\\"xlink:href\\\"},\\\"buble\\\":{\\\"transforms\\\":{}}}!../../../node_modules/vue-loader/lib/selector?type=template&index=0!./Login.vue\"\n/* template functional */\nvar __vue_template_functional__ = false\n/* styles */\nvar __vue_styles__ = injectStyle\n/* scopeId */\nvar __vue_scopeId__ = \"data-v-720c44e1\"\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nvar Component = normalizeComponent(\n __vue_script__,\n __vue_template__,\n __vue_template_functional__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\n\nexport default Component.exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/components/pages/Login.vue\n// module id = null\n// module chunks = "],"sourceRoot":""} -------------------------------------------------------------------------------- /server/public/static/js/5.226e7fbe327e19e07682.js: -------------------------------------------------------------------------------- 1 | webpackJsonp([5],{dpfQ:function(t,e){},oMzJ:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=a("BO1k"),i=a.n(n),s={data:function(){return{articleList:[],tags:[],flag:1,username:"",pageNum:1,pageSize:5,count:0}},methods:{tocontent:function(t){this.$router.push({path:"/admin/content",query:{article:t}})},handleCurrentChange:function(t){this.getData(t,this.pageSize),this.pageNum=t},handleSizeChange:function(t){},getData:function(t,e){var a=this;this.axios.get("/api/getArticle",{params:{state:0,username:this.username,pageNum:t,pageSize:e}}).then(function(t){a.articleList=t.data[0],a.count=t.data[1][0].count,a.flag=a.articleList.length<1?0:1;var e=!0,n=!1,s=void 0;try{for(var r,l=i()(a.articleList);!(e=(r=l.next()).done);e=!0){var c=r.value,o=c.type.substring(1,c.type.length-1).replace(/\"/g,"").split(",");a.tags.push(o)}}catch(t){n=!0,s=t}finally{try{!e&&l.return&&l.return()}finally{if(n)throw s}}}).catch(function(t){console.log(t)})}},mounted:function(){this.username=sessionStorage.getItem("username"),this.getData(this.pageNum,this.pageSize)}},r={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("section",{staticClass:"blog-body"},[a("div",{staticClass:"blog-list"},[0==t.flag?a("p",{staticClass:"nothing"},[t._v("Nothing")]):1==t.flag?a("ul",{staticClass:"list-article"},t._l(t.articleList,function(e,n){return a("li",{key:e.id,staticClass:"article"},[a("div",{staticClass:"article-header"},[a("h2",{staticClass:"article-title"},[a("span",{staticClass:"title-link",on:{click:function(a){return t.tocontent(e)}}},[t._v(t._s(e.title))]),t._v(" "),t._l(t.tags[n],function(e){return a("el-tag",{key:e,staticStyle:{"margin-right":"10px"},attrs:{size:"mini",hit:""}},[t._v(t._s(e))])})],2),t._v(" "),a("p",{staticClass:"article-body",domProps:{innerHTML:t._s(e.shtml)}})])])}),0):t._e()]),t._v(" "),a("el-pagination",{staticStyle:{"text-align":"center",margin:"15px auto"},attrs:{small:"",layout:"prev, pager, next",total:t.count,"page-size":5},on:{"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}})],1)},staticRenderFns:[]};var l=a("VU/8")(s,r,!1,function(t){a("dpfQ")},"data-v-6d11cc47",null);e.default=l.exports}}); 2 | //# sourceMappingURL=5.226e7fbe327e19e07682.js.map -------------------------------------------------------------------------------- /server/public/static/js/6.558a24c72046ca4ecd51.js: -------------------------------------------------------------------------------- 1 | webpackJsonp([6],{"8MNQ":function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=s("mvHQ"),a=s.n(i),n=s("BO1k"),r=s.n(n),o=s("4ZRF"),l=s("WheD"),c={data:function(){return{article:[],textarea:"",islogin:!1,comments:[],commentList:[],username:"",tags:[]}},name:"contents",components:{Header:o.a,Footer:l.a},methods:{tologin:function(){this.$router.push({path:"/login"})},refer:function(){var t=this;if(this.textarea.length<1)this.$message({message:"评论不能为空",type:"warning"});else{var e=this.username,s=(new Date).getTime();if(this.commentList.length>0){var i=!0,n=!1,o=void 0;try{for(var l,c=r()(this.commentList);!(i=(l=c.next()).done);i=!0){var m=l.value;this.comments.push(m)}}catch(t){n=!0,o=t}finally{try{!i&&c.return&&c.return()}finally{if(n)throw o}}}this.comments.push({username:e,comment:this.textarea,postTime:s}),this.axios.post("/api/insertComments",{comments:a()(this.comments),id:this.article.id}).then(function(i){1==i.data.status?(t.commentList.push({username:e,comment:t.textarea,postTime:s}),t.textarea=""):t.$message.error(i.data.msg)}).catch(function(e){t.$message.error("服务器错误"),console.log(e)})}}},mounted:function(){var t=this;this.username=sessionStorage.getItem("username")||"",this.username.length>0&&(this.islogin=!0),this.article=this.$route.query.article;var e=this.article.type.substring(1,this.article.type.length-1).replace(/\"/g,"");this.tags=e.split(","),this.commentList=JSON.parse(this.article.comments)||[],this.axios.post("/api/updateCount",{view:this.article.view+1,count:this.commentList.length,id:this.article.id}).then(function(t){}).catch(function(e){t.$message.error("服务器错误"),console.log(e)})}},m={render:function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("article",[s("Header"),t._v(" "),s("section",{staticClass:"blog-body"},[s("div",{staticClass:"detail"},[s("h1",{staticClass:"detail-title"},[t._v(t._s(t.article.title))]),t._v(" "),s("div",{staticClass:"detail-content"},[s("p",{domProps:{innerHTML:t._s(t.article.shtml)}})]),t._v(" "),s("p",{staticClass:"detail-tags"}),t._v(" "),s("div",{staticClass:"detail-admin"},[s("p",[t._v("发布于 "+t._s(t._f("formatDate")(t.article.post_time,"yyyy-MM-dd")))]),t._v(" "),s("p",[t._v("浏览"+t._s(t.article.view)+"次")])]),t._v(" "),s("div",[t._l(t.tags,function(e,i){return s("el-tag",{key:i,staticStyle:{border:"none","margin-right":"10px"},attrs:{type:"info"}},[t._v(t._s(e))])}),t._v(" "),s("div",{staticClass:"blog-comment"},[s("div",{staticClass:"comment-list"},[s("ul",t._l(t.commentList,function(e){return s("li",{key:e.postTime},[s("div",{staticClass:"list-header clearfix"},[s("div",{staticClass:"header-reply"},[s("span",[t._v(t._s(e.username))])]),t._v(" "),s("span",{staticClass:"header-time"},[t._v(t._s(t._f("formatDate")(e.postTime,"yyyy-MM-dd")))])]),t._v(" "),s("div",{staticClass:"list-content"},[s("p",[t._v(t._s(e.comment))])])])}),0)]),t._v(" "),s("div",{directives:[{name:"show",rawName:"v-show",value:1==t.islogin,expression:"islogin==true"}],staticStyle:{"margin-top":"10px"}},[s("el-input",{attrs:{type:"textarea",rows:2,placeholder:"请输入内容"},model:{value:t.textarea,callback:function(e){t.textarea=e},expression:"textarea"}}),t._v(" "),s("el-button",{staticStyle:{"margin-top":"10px","margin-left":"89%"},attrs:{type:"primary",size:"small",plain:""},on:{click:t.refer}},[t._v("提交留言")])],1),t._v(" "),s("div",{directives:[{name:"show",rawName:"v-show",value:0==t.islogin,expression:"islogin==false"}],staticClass:"comment-unlogin"},[s("el-button",{attrs:{type:"primary"},on:{click:t.tologin}},[t._v("登录")]),t._v(" "),s("p",[t._v("欢迎留言交流")])],1)])],2)])]),t._v(" "),s("Footer")],1)},staticRenderFns:[]};var v=s("VU/8")(c,m,!1,function(t){s("sD38")},"data-v-5dd481c4",null);e.default=v.exports},sD38:function(t,e){}}); 2 | //# sourceMappingURL=6.558a24c72046ca4ecd51.js.map -------------------------------------------------------------------------------- /server/public/static/js/7.60eaf540a0ed01bee170.js: -------------------------------------------------------------------------------- 1 | webpackJsonp([7],{"6xA+":function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a=s("mvHQ"),i=s.n(a),n={data:function(){return{title:"",context:"",toolbars:{bold:!0,italic:!0,header:!0,underline:!0,mark:!0,superscript:!0,quote:!0,ol:!0,link:!0,imagelink:!0,help:!0,code:!0,subfield:!0,fullscreen:!0,readmodel:!0,undo:!0,trash:!0,save:!0,htmlcode:!0,navigation:!0},options:[],tags:[],username:""}},methods:{publish:function(){var t=this;if(this.title.length<1)this.$message({message:"标题不能为空",type:"warning"});else if(this.context.length<1)this.$message({message:"内容不能为空",type:"warning"});else if(this.tags.length<1)this.$message({message:"请选择标签",type:"warning"});else{var e=this.$refs.md.d_render;this.axios.post("/api/admin/addArticle",{username:this.username,title:this.title,content:this.context,html:e,tags:i()(this.tags),state:1}).then(function(e){1==e.data.status?(t.$message({message:"发布成功",type:"success"}),t.title="",t.context="",t.tags=[]):0==e.data.status&&t.$message.error(e.data.msg)}).catch(function(t){console.log(t)})}},saveArticle:function(){var t=this;if(this.title.length<1)this.$message({message:"标题不能为空",type:"warning"});else if(this.context.length<1)this.$message({message:"内容不能为空",type:"warning"});else if(this.tags.length<1)this.$message({message:"请选择标签",type:"warning"});else{var e=this.$refs.md.d_render;this.axios.post("/api/admin/addArticle",{username:this.username,title:this.title,content:this.context,html:e,tags:i()(this.tags),state:0}).then(function(e){1==e.data.status?(t.$message({message:"保存成功",type:"success"}),t.title="",t.context="",t.tags=[]):0==e.data.status&&t.$message.error(e.data.msg)}).catch(function(t){console.log(t)})}},$imgAdd:function(t,e){var s=this,a=new FormData;a.append("imgFile",e),this.axios({url:"/api/uploadImg",method:"post",data:a}).then(function(e){console.log(e),s.$refs.md.$img2Url(t,e.data.url)})}},mounted:function(){var t=this;this.username=sessionStorage.getItem("username"),this.axios.get("/api/admin/getTagAll").then(function(e){var s=e.data;t.options=s}).catch(function(t){console.log(t)})}},o={render:function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("section",{staticClass:"blog-body"},[s("div",{staticClass:"admin-publish"},[s("el-input",{attrs:{placeholder:"文章标题",autofocus:""},model:{value:t.title,callback:function(e){t.title=e},expression:"title"}}),t._v(" "),s("div",{staticStyle:{"text-align":"left"},attrs:{id:"editor"}}),t._v(" "),s("mavon-editor",{ref:"md",staticClass:"blogcontent",attrs:{toolbars:t.toolbars},on:{imgAdd:t.$imgAdd},model:{value:t.context,callback:function(e){t.context=e},expression:"context"}}),t._v(" "),s("el-row",{staticStyle:{"margin-bottom":"20px"}},[s("el-col",{attrs:{span:16}},[s("el-select",{staticStyle:{width:"100%"},attrs:{multiple:"","popper-append-to-body":!1,placeholder:"请选择标签"},model:{value:t.tags,callback:function(e){t.tags=e},expression:"tags"}},t._l(t.options,function(t){return s("el-option",{key:t.id,attrs:{label:t.name,value:t.name}})}),1)],1),t._v(" "),s("el-col",{attrs:{span:6,offset:2}},[s("el-button",{attrs:{type:"primary",size:"medium"},on:{click:t.saveArticle}},[t._v("存为草稿")]),t._v(" "),s("el-button",{attrs:{type:"primary",size:"medium"},on:{click:t.publish}},[t._v("发布")])],1)],1)],1)])},staticRenderFns:[]};var l=s("VU/8")(n,o,!1,function(t){s("ByyE")},"data-v-5757bb9b",null);e.default=l.exports},ByyE:function(t,e){}}); 2 | //# sourceMappingURL=7.60eaf540a0ed01bee170.js.map -------------------------------------------------------------------------------- /server/public/static/js/8.a2f7035b2b70d876c5d7.js: -------------------------------------------------------------------------------- 1 | webpackJsonp([8],{OGqi:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a=n("4ZRF"),o=n("WheD"),c={data:function(){return{tags:[]}},components:{Header:a.a,Footer:o.a},mounted:function(){var t=this;this.axios.get("/api/admin/getTagAll").then(function(e){t.tags=e.data}).catch(function(t){console.log(t)})},methods:{selectBytag:function(t){var e=this;this.axios.get("/api/admin/getArticleById",{params:{id:t}}).then(function(t){e.$router.push({path:"/",query:{articleList:t.data}})}).catch(function(t){console.log(t)}),console.log(t)}}},i={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("section",[n("Header"),t._v(" "),n("section",{staticClass:"tags"},t._l(t.tags,function(e){return n("el-tag",{key:e.id,on:{click:function(n){return t.selectBytag(e.id)}}},[t._v(t._s(e.name))])}),1),t._v(" "),n("Footer")],1)},staticRenderFns:[]};var s=n("VU/8")(c,i,!1,function(t){n("U8Nf")},"data-v-3acb2c1c",null);e.default=s.exports},U8Nf:function(t,e){}}); 2 | //# sourceMappingURL=8.a2f7035b2b70d876c5d7.js.map -------------------------------------------------------------------------------- /server/public/static/js/8.a2f7035b2b70d876c5d7.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["webpack:///src/components/pages/Lables.vue","webpack:///./src/components/pages/Lables.vue?0d50","webpack:///./src/components/pages/Lables.vue"],"names":["Lables","data","tags","components","Header","Footer","mounted","_this","this","axios","get","then","response","catch","error","console","log","methods","selectBytag","id","_this2","params","$router","push","path","query","articleList","pages_Lables","render","_vm","_h","$createElement","_c","_self","_v","staticClass","_l","tag","key","on","click","$event","_s","name","staticRenderFns","Component","__webpack_require__","normalizeComponent","ssrContext","__webpack_exports__"],"mappings":"iIAYAA,GACAC,KADA,WAEA,OACAC,UAGAC,YAAAC,SAAA,EAAAC,SAAA,GACAC,QAPA,WAOA,IAAAC,EAAAC,KACAA,KAAAC,MACAC,IAAA,wBACAC,KAAA,SAAAC,GACAL,EAAAL,KAAAU,EAAAX,OAEAY,MAAA,SAAAC,GACAC,QAAAC,IAAAF,MAGAG,SACAC,YADA,SACAC,GAAA,IAAAC,EAAAZ,KACAA,KAAAC,MACAC,IAAA,6BAAAW,QAAAF,QACAR,KAAA,SAAAC,GACAQ,EAAAE,QAAAC,MAAAC,KAAA,IAAAC,OAAAC,YAAAd,EAAAX,UAEAY,MAAA,SAAAC,GACAC,QAAAC,IAAAF,KAEAC,QAAAC,IAAAG,MCpCeQ,GADEC,OAFjB,WAA0B,IAAAC,EAAArB,KAAasB,EAAAD,EAAAE,eAA0BC,EAAAH,EAAAI,MAAAD,IAAAF,EAAwB,OAAAE,EAAA,WAAAA,EAAA,UAAAH,EAAAK,GAAA,KAAAF,EAAA,WAA4DG,YAAA,QAAmBN,EAAAO,GAAAP,EAAA,cAAAQ,GAAiC,OAAAL,EAAA,UAAoBM,IAAAD,EAAAlB,GAAAoB,IAAeC,MAAA,SAAAC,GAAyB,OAAAZ,EAAAX,YAAAmB,EAAAlB,QAAiCU,EAAAK,GAAAL,EAAAa,GAAAL,EAAAM,WAA6B,GAAAd,EAAAK,GAAA,KAAAF,EAAA,eAElTY,oBCCjB,IAcAC,EAdyBC,EAAQ,OAcjCC,CACE/C,EACA2B,GATF,EAVA,SAAAqB,GACEF,EAAQ,SAaV,kBAEA,MAUeG,EAAA,QAAAJ,EAAiB","file":"static/js/8.a2f7035b2b70d876c5d7.js","sourcesContent":["\r\n\r\n\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// src/components/pages/Lables.vue","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('section',[_c('Header'),_vm._v(\" \"),_c('section',{staticClass:\"tags\"},_vm._l((_vm.tags),function(tag){return _c('el-tag',{key:tag.id,on:{\"click\":function($event){return _vm.selectBytag(tag.id)}}},[_vm._v(_vm._s(tag.name))])}),1),_vm._v(\" \"),_c('Footer')],1)}\nvar staticRenderFns = []\nvar esExports = { render: render, staticRenderFns: staticRenderFns }\nexport default esExports\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/vue-loader/lib/template-compiler?{\"id\":\"data-v-3acb2c1c\",\"hasScoped\":true,\"transformToRequire\":{\"video\":[\"src\",\"poster\"],\"source\":\"src\",\"img\":\"src\",\"image\":\"xlink:href\"},\"buble\":{\"transforms\":{}}}!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./src/components/pages/Lables.vue\n// module id = null\n// module chunks = ","function injectStyle (ssrContext) {\n require(\"!!../../../node_modules/extract-text-webpack-plugin/dist/loader.js?{\\\"omit\\\":1,\\\"remove\\\":true}!vue-style-loader!css-loader?{\\\"sourceMap\\\":true}!../../../node_modules/vue-loader/lib/style-compiler/index?{\\\"vue\\\":true,\\\"id\\\":\\\"data-v-3acb2c1c\\\",\\\"scoped\\\":true,\\\"hasInlineConfig\\\":false}!../../../node_modules/vue-loader/lib/selector?type=styles&index=0!./Lables.vue\")\n}\nvar normalizeComponent = require(\"!../../../node_modules/vue-loader/lib/component-normalizer\")\n/* script */\nexport * from \"!!babel-loader!../../../node_modules/vue-loader/lib/selector?type=script&index=0!./Lables.vue\"\nimport __vue_script__ from \"!!babel-loader!../../../node_modules/vue-loader/lib/selector?type=script&index=0!./Lables.vue\"\n/* template */\nimport __vue_template__ from \"!!../../../node_modules/vue-loader/lib/template-compiler/index?{\\\"id\\\":\\\"data-v-3acb2c1c\\\",\\\"hasScoped\\\":true,\\\"transformToRequire\\\":{\\\"video\\\":[\\\"src\\\",\\\"poster\\\"],\\\"source\\\":\\\"src\\\",\\\"img\\\":\\\"src\\\",\\\"image\\\":\\\"xlink:href\\\"},\\\"buble\\\":{\\\"transforms\\\":{}}}!../../../node_modules/vue-loader/lib/selector?type=template&index=0!./Lables.vue\"\n/* template functional */\nvar __vue_template_functional__ = false\n/* styles */\nvar __vue_styles__ = injectStyle\n/* scopeId */\nvar __vue_scopeId__ = \"data-v-3acb2c1c\"\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nvar Component = normalizeComponent(\n __vue_script__,\n __vue_template__,\n __vue_template_functional__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\n\nexport default Component.exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/components/pages/Lables.vue\n// module id = null\n// module chunks = "],"sourceRoot":""} -------------------------------------------------------------------------------- /server/public/static/js/9.6418c4c5e905861fac62.js: -------------------------------------------------------------------------------- 1 | webpackJsonp([9],{"7Wkx":function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a=s("mvHQ"),i=s.n(a),n={data:function(){return{title:"",editorContent:"",draft:[],context:"",toolbars:{bold:!0,italic:!0,header:!0,underline:!0,mark:!0,superscript:!0,quote:!0,ol:!0,link:!0,imagelink:!0,help:!0,code:!0,subfield:!0,fullscreen:!0,readmodel:!0,undo:!0,trash:!0,save:!0,navigation:!0},options:[],tags:[],username:""}},methods:{publish:function(){var t=this;this.title.length<1?this.$message({message:"标题不能为空",type:"warning"}):this.context.length<1?this.$message({message:"内容不能为空",type:"warning"}):this.tags.length<1?this.$message({message:"请选择标签",type:"warning"}):this.axios.post("/api/admin/updArticle",{id:this.draft.id,title:this.title,content:this.context,tags:i()(this.tags),state:1}).then(function(e){1==e.data.status?(t.$message({message:"修改成功",type:"success"}),t.$router.push({path:"/admin/settings"})):0==e.data.status&&t.$message.error("修改失败")}).catch(function(t){console.log(t)})},$imgAdd:function(t,e){var s=this,a=new FormData;a.append("imgFile",e),this.axios({url:"/api/uploadImg",method:"post",data:a}).then(function(e){console.log(e),s.$refs.md.$img2Url(t,e.data.url)})},saveArticle:function(){var t=this;this.title.length<1?this.$message({message:"标题不能为空",type:"warning"}):this.context.length<1?this.$message({message:"内容不能为空",type:"warning"}):this.tags.length<1?this.$message({message:"请选择标签",type:"warning"}):this.axios.post("/api/admin/updArticle",{id:this.draft.id,username:this.username,title:this.title,content:this.context,tags:i()(this.tags),state:0}).then(function(e){1==e.data.status?(t.$message({message:"保存成功",type:"success"}),t.$router.push({path:"/admin/settings"})):0==e.data.status&&t.$message.error("保存失败")}).catch(function(t){console.log(t)})}},mounted:function(){var t=this;this.draft=this.$route.query.draft,this.title=this.draft.title,this.context=this.draft.summary,this.username=sessionStorage.getItem("username"),this.axios.get("/api/admin/getTagAll").then(function(e){var s=e.data;t.options=s}).catch(function(t){console.log(t)})}},o={render:function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("section",{staticClass:"blog-body"},[s("div",{staticClass:"admin-publish"},[s("el-input",{attrs:{placeholder:"文章标题"},model:{value:t.title,callback:function(e){t.title=e},expression:"title"}}),t._v(" "),s("div",{staticStyle:{"text-align":"left"},attrs:{id:"editor"}}),t._v(" "),s("mavon-editor",{ref:"md",staticClass:"blogcontent",attrs:{toolbars:t.toolbars},on:{imgAdd:t.$imgAdd},model:{value:t.context,callback:function(e){t.context=e},expression:"context"}}),t._v(" "),s("el-row",{staticStyle:{"margin-bottom":"20px"}},[s("el-col",{attrs:{span:16}},[s("el-select",{staticStyle:{width:"100%"},attrs:{multiple:"","popper-append-to-body":!1,placeholder:"请选择标签"},model:{value:t.tags,callback:function(e){t.tags=e},expression:"tags"}},t._l(t.options,function(t){return s("el-option",{key:t.id,attrs:{label:t.name,value:t.name}})}),1)],1),t._v(" "),s("el-col",{attrs:{span:6,offset:2}},[s("el-button",{attrs:{type:"primary",size:"medium"},on:{click:t.saveArticle}},[t._v("存为草稿")]),t._v(" "),s("el-button",{attrs:{type:"primary",size:"medium"},on:{click:t.publish}},[t._v("发布")])],1)],1)],1)])},staticRenderFns:[]};var l=s("VU/8")(n,o,!1,function(t){s("83/Q")},"data-v-3a36d009",null);e.default=l.exports},"83/Q":function(t,e){}}); 2 | //# sourceMappingURL=9.6418c4c5e905861fac62.js.map -------------------------------------------------------------------------------- /server/public/static/js/app.b75c332556b1bafee5b2.js: -------------------------------------------------------------------------------- 1 | webpackJsonp([15],{"/Cky":function(t,e){},"4ZRF":function(t,e,n){"use strict";var a={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"header-wraper"},[n("header",{staticClass:"blog-header"},[n("h1",{staticClass:"header-title"},[n("router-link",{attrs:{to:"/"}},[t._v("StarBlog")])],1),t._v(" "),n("nav",{staticClass:"header-nav"},[n("el-input",{staticClass:"nav-search",attrs:{placeholder:"请输入搜索内容","prefix-icon":"el-icon-search",autocomplete:"off",name:"aa"},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}}),t._v(" "),n("ul",[n("li",[n("router-link",{attrs:{to:"/lables"}},[t._v("标签")])],1),t._v(" "),n("li",[n("router-link",{attrs:{to:"/login"}},[t._v("新随笔")])],1)])],1)])])},staticRenderFns:[]};var i=n("VU/8")({name:"Header",data:function(){return{search:""}}},a,!1,function(t){n("AeBY")},"data-v-268a7efc",null);e.a=i.exports},AeBY:function(t,e){},G2Cz:function(t,e){},NHnr:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a={};n.d(a,"formatDate",function(){return R});var i=n("fZjL"),r=n.n(i),o=n("7+uW"),c={render:function(){var t=this.$createElement,e=this._self._c||t;return e("div",{attrs:{id:"app"}},[e("router-view")],1)},staticRenderFns:[]};var s=n("VU/8")({name:"App"},c,!1,function(t){n("G2Cz")},null,null).exports,u=n("/ocq"),l=n("BO1k"),h=n.n(l),p=n("4ZRF"),f=n("WheD"),d=(n("EFqf"),{data:function(){return{articleList:[],tags:[],flag:0,pageNum:1,pageSize:5,count:0}},components:{Header:p.a,Footer:f.a},methods:{tocontent:function(t){this.$router.push({path:"/contents",query:{article:t}})},handleCurrentChange:function(t){this.getData(t,this.pageSize),this.pageNum=t},handleSizeChange:function(t){},getData:function(t,e){var n=this;this.axios.get("/api/getArticle",{params:{state:1,pageNum:t,pageSize:e}}).then(function(t){n.articleList=t.data[0],n.count=t.data[1][0].count,n.flag=n.articleList.length<1?0:1;var e=!0,a=!1,i=void 0;try{for(var r,o=h()(n.articleList);!(e=(r=o.next()).done);e=!0){var c=r.value,s=c.type.substring(1,c.type.length-1).replace(/\"/g,"").split(",");n.tags.push(s)}}catch(t){a=!0,i=t}finally{try{!e&&o.return&&o.return()}finally{if(a)throw i}}}).catch(function(t){console.log(t)})}},mounted:function(){this.getData(this.pageNum,this.pageSize)}}),m={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("section",[n("Header"),t._v(" "),n("section",{staticClass:"blog-body"},[0==t.flag?n("p",{staticClass:"nothing"},[t._v("Nothing")]):n("div",{staticClass:"blog-list"},[n("ul",{staticClass:"list-article"},t._l(t.articleList,function(e,a){return n("li",{key:e.id,staticClass:"article"},[n("div",{staticClass:"article-header"},[n("h2",{staticClass:"article-title"},[n("span",{staticClass:"title-link",on:{click:function(n){return t.tocontent(e)}}},[t._v(t._s(e.title))]),t._v(" "),t._l(t.tags[a],function(e){return n("el-tag",{key:e,staticStyle:{"margin-right":"10px"},attrs:{size:"mini",hit:""}},[t._v(t._s(e))])})],2),t._v(" "),n("p",{staticClass:"article-body",domProps:{innerHTML:t._s(e.shtml)}})]),t._v(" "),n("div",{staticClass:"article-footer"},[n("span",{staticClass:"iconfont icon-riqi icons"},[n("span",{staticClass:"content"},[t._v(t._s(t._f("formatDate")(e.post_time,"yyyy-MM-dd")))])]),t._v(" "),n("span",{staticClass:"iconfont icon-chakantiezihuifu icons"},[n("span",{staticClass:"content"},[t._v(t._s(e.comment_count)+"评论")])]),t._v(" "),n("span",{staticClass:"iconfont icon-yanjing icons"},[n("span",{staticClass:"content"},[t._v(t._s(e.view)+"阅读量")])])])])}),0)]),t._v(" "),n("el-pagination",{staticStyle:{"text-align":"center",margin:"15px auto"},attrs:{small:"",layout:"prev, pager, next",total:t.count,"page-size":5},on:{"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}})],1),t._v(" "),n("Footer")],1)},staticRenderFns:[]};var v=n("VU/8")(d,m,!1,function(t){n("yw7a")},"data-v-b32fbf60",null).exports;o.default.use(u.a);var g=new u.a({mode:"history",routes:[{path:"/",name:"Index",component:v},{path:"/contents",name:"Contents",component:function(t){return Promise.all([n.e(0),n.e(6)]).then(function(){var e=[n("8MNQ")];t.apply(null,e)}.bind(this)).catch(n.oe)}},{path:"/lables",name:"Lables",component:function(t){return n.e(8).then(function(){var e=[n("OGqi")];t.apply(null,e)}.bind(this)).catch(n.oe)}},{path:"/login",name:"Login",component:function(t){return n.e(4).then(function(){var e=[n("3jL2")];t.apply(null,e)}.bind(this)).catch(n.oe)}},{path:"/regist",name:"Regist",component:function(t){return n.e(11).then(function(){var e=[n("Jqmv")];t.apply(null,e)}.bind(this)).catch(n.oe)}},{path:"/admin",name:"admin",meta:{requireAuth:!0},component:function(t){return n.e(1).then(function(){var e=[n("oMO9")];t.apply(null,e)}.bind(this)).catch(n.oe)},children:[{path:"newEssay",name:"newEssay",meta:{requireAuth:!0},component:function(t){return Promise.all([n.e(0),n.e(7)]).then(function(){var e=[n("6xA+")];t.apply(null,e)}.bind(this)).catch(n.oe)}},{path:"tags",name:"tags",meta:{requireAuth:!0},component:function(t){return n.e(10).then(function(){var e=[n("hfmC")];t.apply(null,e)}.bind(this)).catch(n.oe)}},{path:"settings",name:"settings",meta:{requireAuth:!0},component:function(t){return n.e(12).then(function(){var e=[n("hCXi")];t.apply(null,e)}.bind(this)).catch(n.oe)}},{path:"draft",name:"draft",meta:{requireAuth:!0},component:function(t){return n.e(5).then(function(){var e=[n("oMzJ")];t.apply(null,e)}.bind(this)).catch(n.oe)}},{path:"content",name:"content",meta:{requireAuth:!0},component:function(t){return n.e(3).then(function(){var e=[n("I4Y/")];t.apply(null,e)}.bind(this)).catch(n.oe)}},{path:"update",name:"update",meta:{requireAuth:!0},component:function(t){return Promise.all([n.e(0),n.e(9)]).then(function(){var e=[n("7Wkx")];t.apply(null,e)}.bind(this)).catch(n.oe)}},{path:"comments",name:"comments",meta:{requireAuth:!0},component:function(t){return n.e(13).then(function(){var e=[n("R0tf")];t.apply(null,e)}.bind(this)).catch(n.oe)}}]},{path:"/404",name:"notFound",component:function(t){return n.e(2).then(function(){var e=[n("XSwH")];t.apply(null,e)}.bind(this)).catch(n.oe)}},{path:"*",redirect:"/404"}]}),y=n("mtWM"),_=n.n(y),C=n("zL8q"),b=n.n(C),w=n("OS1Z"),x=n.n(w),q=n("NC6I"),k=n.n(q);n("pw1w"),n("tvR6"),n("NcP2"),n("/Cky");function R(t,e){var n=new Date(t);/(y+)/.test(e)&&(e=e.replace(RegExp.$1,(n.getFullYear()+"").substr(4-RegExp.$1.length)));var a={"M+":n.getMonth()+1,"d+":n.getDate(),"h+":n.getHours(),"m+":n.getMinutes(),"s+":n.getSeconds()};for(var i in a)if(new RegExp("("+i+")").test(e)){var r=a[i]+"";e=e.replace(RegExp.$1,1===RegExp.$1.length?r:z(r))}return e}function z(t){return("00"+t).substr(t.length)}o.default.config.productionTip=!1,o.default.use(b.a),o.default.prototype.axios=_.a,o.default.use(x.a),o.default.prototype.$md5=k.a,r()(a).forEach(function(t){o.default.filter(t,a[t])}),g.beforeEach(function(t,e,n){t.meta.requireAuth?sessionStorage.getItem("token")?n():n({path:"/login",query:{redirect:t.fullPath}}):n()}),new o.default({el:"#app",router:g,render:function(t){return t(s)}})},NcP2:function(t,e){},O4Bl:function(t,e){},WheD:function(t,e,n){"use strict";var a={render:function(){var t=this.$createElement;return(this._self._c||t)("footer",[this._v("wqwqwq")])},staticRenderFns:[]};var i=n("VU/8")(null,a,!1,function(t){n("O4Bl")},"data-v-07067f67",null);e.a=i.exports},pw1w:function(t,e){},tvR6:function(t,e){},yw7a:function(t,e){}},["NHnr"]); 2 | //# sourceMappingURL=app.b75c332556b1bafee5b2.js.map -------------------------------------------------------------------------------- /server/public/static/js/manifest.1ec2e5c5a37139a5b5c7.js: -------------------------------------------------------------------------------- 1 | !function(e){var n=window.webpackJsonp;window.webpackJsonp=function(r,o,a){for(var f,i,u,d=0,s=[];d { 29 | api.getValue(req, res, next); 30 | }); 31 | 32 | router.post('/setValue', (req, res, next) => { 33 | api.setValue(req, res, next); 34 | }); 35 | 36 | router.get('/getArticle', (req, res, next) => { 37 | api.getArticle(req, res, next); 38 | }); 39 | 40 | router.post('/setUser',(req,res,next)=>{ 41 | api.setUser(req,res,next); 42 | }) 43 | 44 | router.post('/userLogin',(req,res,next)=>{ 45 | api.userLogin(req,res,next); 46 | }) 47 | 48 | router.get('/admin/getArticleById',(req,res,next)=>{ 49 | api.getArticleById(req,res,next); 50 | }) 51 | 52 | router.get('/admin/getTagAll',(req,res,next)=>{ 53 | api.getTagAll(req,res,next); 54 | }) 55 | 56 | // router.get('/admin/getTag',(req,res,next)=>{ 57 | // api.getTag(req,res,next); 58 | // }) 59 | 60 | router.post('/admin/delTag',(req,res,next)=>{ 61 | api.delTag(req,res,next); 62 | }) 63 | 64 | router.post('/admin/updateTag',(req,res,next)=>{ 65 | api.updateTag(req,res,next); 66 | }) 67 | 68 | router.post('/admin/insertTag',(req,res,next)=>{ 69 | api.insertTag(req,res,next); 70 | }) 71 | 72 | router.post('/admin/addArticle',(req,res,next)=>{ 73 | api.addArticle(req,res,next); 74 | }) 75 | 76 | router.post('/admin/updateArticle',(req,res,next)=>{ 77 | api.updateArticle(req,res,next); 78 | }) 79 | 80 | router.post('/admin/updArticle',(req,res,next)=>{ 81 | api.updArticle(req,res,next); 82 | }) 83 | 84 | router.post('/admin/delArticle',(req,res,next)=>{ 85 | api.delArticle(req,res,next); 86 | }) 87 | 88 | router.post('/insertComments',(req,res,next)=>{ 89 | api.insertComments(req,res,next); 90 | }) 91 | 92 | router.post('/updateCount',(req,res,next)=>{ 93 | api.addViewOrStart(req,res,next); 94 | }) 95 | 96 | router.post('/uploadImg',upload.single('imgFile'),(req,res,next)=>{ 97 | api.uploadPic(req,res,next); 98 | }) 99 | 100 | router.get('/upload/*',(req,res,next)=>{ 101 | api.getImg(req,res,next); 102 | }) 103 | 104 | 105 | module.exports = router; 106 | 107 | -------------------------------------------------------------------------------- /server/sqlMap.js: -------------------------------------------------------------------------------- 1 | var sqlMap = { 2 | article: { 3 | queryById: 'SELECT a.*, GROUP_CONCAT(c.id, "_", c.name) AS tag_string FROM articles AS a LEFT JOIN tag_links AS b ON a.id = b.aid LEFT JOIN tags AS c ON b.tid = c.id WHERE a.id = ? GROUP BY a.id', 4 | queryAll22: 'SELECT a.*, GROUP_CONCAT(c.id, "_", c.name) AS tag_string FROM articles AS a LEFT JOIN tag_links AS b ON a.id = b.aid LEFT JOIN tags AS c ON b.tid = c.id GROUP BY a.id', 5 | delById: 'DELETE FROM articles WHERE id = ?', 6 | updById: 'UPDATE articles SET state=? WHERE id = ?', 7 | updAllById: 'UPDATE articles SET state=?,title=?,type=?,summary=? WHERE id = ?', 8 | queryAll: 'SELECT SQL_CALC_FOUND_ROWS * from articles WHERE state =? order by post_time desc limit ?, ?;SELECT FOUND_ROWS() as count', 9 | queryAllBysu: 'SELECT SQL_CALC_FOUND_ROWS * from articles WHERE state =? AND username =? order by post_time desc limit ?, ?;SELECT FOUND_ROWS() as count', 10 | queryAllBySU: 'SELECT * from articles WHERE state =? AND username =?', 11 | insertComment: 'UPDATE articles SET comments=? WHERE id=?', 12 | updateViewCount: 'UPDATE articles SET view=?,comment_count=? where id=?', 13 | insert: 'INSERT INTO articles(username, title,summary,shtml,type, post_time, view, comment_count,state) VALUES (?,?,?,?,?,?,?,?,?)', 14 | queryByTitle: 'SELECT * FROM articles WHERE title = ?', 15 | queryByTagId: "SELECT " + 16 | "c.*, ( " + 17 | "SELECT " + 18 | "GROUP_CONCAT(aa.id, '_', aa. NAME) " + 19 | "FROM " + 20 | "tags AS aa " + 21 | "LEFT JOIN tag_links AS bb ON aa.id = bb.tid " + 22 | "WHERE " + 23 | "bb.aid = c.id " + 24 | ") AS tag_string " + 25 | "FROM " + 26 | "tags AS a " + 27 | "LEFT JOIN tag_links AS b ON a.id = b.tid " + 28 | "LEFT JOIN articles AS c ON b.aid = c.id " + 29 | "WHERE " + 30 | "a.id = ? " + 31 | "AND c.id IS NOT NULL" 32 | }, 33 | tag: { 34 | queryById: 'SELECT * FROM articles WHERE id=?', 35 | queryByName: 'SELECT * FROM tags WHERE name=?', 36 | queryAll: 'SELECT * FROM tags', 37 | insert: 'INSERT INTO tags(name) VALUES (?)', 38 | delById: 'DELETE FROM tags WHERE name = ?', 39 | updateById: 'UPDATE tags SET name = ? WHERE id = ?' 40 | }, 41 | comment: { 42 | insert: 'INSERT INTO comments(article_id, user_id, reply_id, reply_comment_id, content, time) VALUES (?,?,?,?,?,?)', 43 | queryAll: 'SELECT * FROM comments', 44 | queryByActicleId: 'SELECT c.id, c.article_id, c.user_id, c.reply_id, c.reply_comment_id, c.content, c.time, v.name as user_name, v.avatar, vi.name as reply_name FROM visitors as v RIGHT JOIN comments as c on c.user_id = v.id LEFT JOIN visitors as vi on c.reply_id = vi.id WHERE c.article_id = ?' 45 | }, 46 | user: { 47 | update: 'UPDATE users SET avatar = ? WHERE id = ?', 48 | queryAll: 'SELECT * FROM users', 49 | queryUsername: 'SELECT * FROM users WHERE userName = ?', 50 | insert: 'INSERT INTO users(username,password) VALUES (?,?)' 51 | }, 52 | visitor: { 53 | insert: 'INSERT INTO visitors(name, email, website, avatar, reminder) VALUES (?,?,?,?,?)', 54 | queryByEmail: 'SELECT * FROM visitors WHERE email = ?', 55 | updByEmail: 'UPDATE visitors SET name = ?, website = ?, avatar = ?, reminder = ? WHERE email = ?' 56 | } 57 | } 58 | 59 | module.exports = sqlMap; 60 | -------------------------------------------------------------------------------- /server/upload/imgFile-1552929289746: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dawnGoblin/myblog/cf085537ca3d31496bcf0de0eed3d2d6b2158b60/server/upload/imgFile-1552929289746 -------------------------------------------------------------------------------- /server/upload/imgFile-1552974761880: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dawnGoblin/myblog/cf085537ca3d31496bcf0de0eed3d2d6b2158b60/server/upload/imgFile-1552974761880 -------------------------------------------------------------------------------- /server/upload/imgFile-1552974811262: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dawnGoblin/myblog/cf085537ca3d31496bcf0de0eed3d2d6b2158b60/server/upload/imgFile-1552974811262 -------------------------------------------------------------------------------- /server/upload/imgFile-1552987110216: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dawnGoblin/myblog/cf085537ca3d31496bcf0de0eed3d2d6b2158b60/server/upload/imgFile-1552987110216 -------------------------------------------------------------------------------- /server/upload/imgFile-1552993690602: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dawnGoblin/myblog/cf085537ca3d31496bcf0de0eed3d2d6b2158b60/server/upload/imgFile-1552993690602 -------------------------------------------------------------------------------- /server/upload/imgFile-1553177397531: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dawnGoblin/myblog/cf085537ca3d31496bcf0de0eed3d2d6b2158b60/server/upload/imgFile-1553177397531 -------------------------------------------------------------------------------- /server/upload/imgFile-1553180192748: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dawnGoblin/myblog/cf085537ca3d31496bcf0de0eed3d2d6b2158b60/server/upload/imgFile-1553180192748 -------------------------------------------------------------------------------- /server/upload/imgFile-1553186682898: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dawnGoblin/myblog/cf085537ca3d31496bcf0de0eed3d2d6b2158b60/server/upload/imgFile-1553186682898 -------------------------------------------------------------------------------- /server/upload/imgFile-1553251206076: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dawnGoblin/myblog/cf085537ca3d31496bcf0de0eed3d2d6b2158b60/server/upload/imgFile-1553251206076 -------------------------------------------------------------------------------- /server/upload/imgFile-1554716556375: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dawnGoblin/myblog/cf085537ca3d31496bcf0de0eed3d2d6b2158b60/server/upload/imgFile-1554716556375 -------------------------------------------------------------------------------- /server/upload/imgFile-1554719353325: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dawnGoblin/myblog/cf085537ca3d31496bcf0de0eed3d2d6b2158b60/server/upload/imgFile-1554719353325 -------------------------------------------------------------------------------- /server/upload/imgFile-1556449199085: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dawnGoblin/myblog/cf085537ca3d31496bcf0de0eed3d2d6b2158b60/server/upload/imgFile-1556449199085 -------------------------------------------------------------------------------- /server/upload/imgFile-1556449324224: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dawnGoblin/myblog/cf085537ca3d31496bcf0de0eed3d2d6b2158b60/server/upload/imgFile-1556449324224 -------------------------------------------------------------------------------- /src/App.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 13 | 14 | 17 | -------------------------------------------------------------------------------- /src/assets/icons/iconfont.css: -------------------------------------------------------------------------------- 1 | @font-face {font-family: "iconfont"; 2 | src: url('iconfont.eot?t=1552538818071'); /* IE9 */ 3 | src: url('iconfont.eot?t=1552538818071#iefix') format('embedded-opentype'), /* IE6-IE8 */ 4 | url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAAASAAAsAAAAACYAAAAQzAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHEIGVgCDHAqGOIVMATYCJAMQCwoABCAFhG0HSxtBCMieg+nGZ40iT56gKQPmZTx87fc79+3+z34FT5JEI0P16fh0lRAJDUKkBLqVREheAj+9m74QKgl1ycwqbjNN0wsEPD0mCpvD1L9MLZS5fpmBMridsUgDscoO/X+OmS6frzW/zTaXjNTRGpMSaGDRF/08Eg8wQE7Q7wGeYQIv3E+gaVxPxEZZTR/wlDm7AnElKFnwLOnlHlwoqnrLuRniEdyUapbsGoCH+PfjD5LyBJVaAufg5klpCxR8Zr7dR1pcFkNCI9jWs0K6iIQFIBNnrfYDZBpfQGoa2XJLQHG/U/GZ+YZ7u8/lIuG1yAv9y6MSElEHR94m7KI2uWMCn0XFJ8ci+NqnlxCdtxcMghgFiD3AjkqLS0/DwQRlZxg/53H8A/w1ktTH4shdIYWvd6audyiczv7WF0MutHU+IAUtc0acaGtfe4DD0VeSeHrVSftxyzHbif60NVVz5sZxNLF0i20TQDOs8Qs834qSrbmd6nvwbiy59s4Qyybax7aFIK1buyjgfrN9K0EAIvRP128GbdO2GOB+iUJhXxZKLF2qKBMIwkoJgiXdHDH2GuMsQZJka+u31BrqdNodfZeU5JLtyK0eJazxUh+Hw+5sXrZqKW2TFuBKX816V2F3iadkrkt5ZU4PzF1InWibN7ex9z9dX/op8s+lsmI+3D63jlEHfEieUWBO7zzpMtld5S6f/WHvTtku8v0x+WT5wvdbx5QU0CnpKWl+niuiILIkzXVBxLQch+TdP6rA2z/S36fAVeDjHxVzjjp11OuX19FTuiwZGzAqQMeIX3a/UQn92gQXeSP9vRNqVQFUC09fowcwl4qoAdS1u8qyVUk9QuOju21KekwvzzwZfBgys/jOy+Xvjv1wd1wumheTS1AiwM+cW6xCKTvSmrB5A8a903aglGJV1uA9mju7NYoffeMalVFfn0FdDThKdUGdKbgD+EdelOF4+7SWDAEgPcom/9M2Wf6LX4b35nwripd67GPnv3fy/5PDeP7fRWAI/leCkXXZFDmGnHWxz7cKsyfw5Msq1dTEvynNgCdrKIdH4wjlcA6VHmOQFBPIjF2AmpZFqCuWoWle+cUtg0SkyBQwZxpA6LMTKl0vkPS5jszYx1Az4jPU9UVC034EXrNlKoEuFhGLUQvTPIYROIOe90yYTkqbkNKsZcWiKKb2Q2KrEGIS4xKqqXKkR+IaR1pHKpMw5hleNOiYMngY0moNjFE0qBGH41QYG7Pi4/m2Z4rjDDqgrRMhLAxpwWg2BkPAMdDjw9EYXfv5JoiSmRZL7KlpsPeDiFoJizMSxUkYgSyX60fVPMvyViMpJcEwnrfxRAY6jDK0Ilo3bsAwtq9TQzhYHNWMqFGWeGrGj5XH7a/UvcJz0OQczSEjSEJOuEHfqVgN+0Rui8YKKrPAm+WiYBI8xrB6taBXAgAA') format('woff2'), 5 | url('iconfont.woff?t=1552538818071') format('woff'), 6 | url('iconfont.ttf?t=1552538818071') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+ */ 7 | url('iconfont.svg?t=1552538818071#iconfont') format('svg'); /* iOS 4.1- */ 8 | } 9 | 10 | .iconfont { 11 | font-family: "iconfont" !important; 12 | font-size: 16px; 13 | font-style: normal; 14 | -webkit-font-smoothing: antialiased; 15 | -moz-osx-font-smoothing: grayscale; 16 | } 17 | 18 | .icon-chakantiezihuifu:before { 19 | content: "\e663"; 20 | } 21 | 22 | .icon-riqi:before { 23 | content: "\e639"; 24 | } 25 | 26 | .icon-yanjing:before { 27 | content: "\e7b4"; 28 | } 29 | 30 | -------------------------------------------------------------------------------- /src/assets/icons/iconfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dawnGoblin/myblog/cf085537ca3d31496bcf0de0eed3d2d6b2158b60/src/assets/icons/iconfont.eot -------------------------------------------------------------------------------- /src/assets/icons/iconfont.js: -------------------------------------------------------------------------------- 1 | !function(s){var e,a='',t=(e=document.getElementsByTagName("script"))[e.length-1].getAttribute("data-injectcss");if(t&&!s.__iconfont__svg__cssinject__){s.__iconfont__svg__cssinject__=!0;try{document.write("")}catch(e){console&&console.log(e)}}!function(e){if(document.addEventListener)if(~["complete","loaded","interactive"].indexOf(document.readyState))setTimeout(e,0);else{var t=function(){document.removeEventListener("DOMContentLoaded",t,!1),e()};document.addEventListener("DOMContentLoaded",t,!1)}else document.attachEvent&&(c=e,n=s.document,i=!1,o=function(){i||(i=!0,c())},(a=function(){try{n.documentElement.doScroll("left")}catch(e){return void setTimeout(a,50)}o()})(),n.onreadystatechange=function(){"complete"==n.readyState&&(n.onreadystatechange=null,o())});var c,n,i,o,a}(function(){var e,t,c,n,i,o;(e=document.createElement("div")).innerHTML=a,a=null,(t=e.getElementsByTagName("svg")[0])&&(t.setAttribute("aria-hidden","true"),t.style.position="absolute",t.style.width=0,t.style.height=0,t.style.overflow="hidden",c=t,(n=document.body).firstChild?(i=c,(o=n.firstChild).parentNode.insertBefore(i,o)):n.appendChild(c))})}(window); -------------------------------------------------------------------------------- /src/assets/icons/iconfont.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | Created by iconfont 9 | 10 | 11 | 12 | 13 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /src/assets/icons/iconfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dawnGoblin/myblog/cf085537ca3d31496bcf0de0eed3d2d6b2158b60/src/assets/icons/iconfont.ttf -------------------------------------------------------------------------------- /src/assets/icons/iconfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dawnGoblin/myblog/cf085537ca3d31496bcf0de0eed3d2d6b2158b60/src/assets/icons/iconfont.woff -------------------------------------------------------------------------------- /src/assets/icons/iconfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dawnGoblin/myblog/cf085537ca3d31496bcf0de0eed3d2d6b2158b60/src/assets/icons/iconfont.woff2 -------------------------------------------------------------------------------- /src/assets/js/filters.js: -------------------------------------------------------------------------------- 1 | import MarkdownIt from 'markdown-it' 2 | export function formatDate(date, fmt) { 3 | let newDate = new Date(date) 4 | if (/(y+)/.test(fmt)) { 5 | fmt = fmt.replace(RegExp.$1, (newDate.getFullYear() + '').substr(4 - RegExp.$1.length)) 6 | } 7 | let o = { 8 | 'M+': newDate.getMonth() + 1, 9 | 'd+': newDate.getDate(), 10 | 'h+': newDate.getHours(), 11 | 'm+': newDate.getMinutes(), 12 | 's+': newDate.getSeconds() 13 | } 14 | for (let k in o) { 15 | if (new RegExp(`(${k})`).test(fmt)) { 16 | let str = o[k] + '' 17 | fmt = fmt.replace(RegExp.$1, (RegExp.$1.length === 1) ? str : padLeftZero(str)) 18 | } 19 | } 20 | return fmt 21 | } 22 | 23 | function padLeftZero(str) { 24 | return ('00' + str).substr(str.length) 25 | } 26 | 27 | export function cutString(str, len) { 28 | if (str !== null) { 29 | let md = new MarkdownIt() 30 | str = md.render(str) 31 | str = str.replace(/<.*?>/g, '').replace(/<.*?/g, '<').replace(/>.*?/g, '>').replace(/\s/g, '') 32 | if (str.length * 2 <= len) { 33 | return str 34 | } 35 | 36 | let strlen = 0 37 | let s = '' 38 | for (let i = 0; i < str.length; i++) { 39 | s = s + str.charAt(i) 40 | if (str.charCodeAt(i) > 128) { 41 | strlen = strlen + 2 42 | if (strlen >= len) { 43 | return s.substring(0, s.length - 1) + '...' 44 | } 45 | } else { 46 | strlen = strlen + 1 47 | if (strlen >= len) { 48 | return s.substring(0, s.length - 2) + '...' 49 | } 50 | } 51 | } 52 | return s 53 | } 54 | } -------------------------------------------------------------------------------- /src/assets/reset.scss: -------------------------------------------------------------------------------- 1 | 2 | /* reset */ 3 | $link-color: #42B983; 4 | $font-color: #24292e; 5 | $white: #fff; 6 | $black: #000; 7 | 8 | *, 9 | *::before, 10 | *::after { 11 | box-sizing: border-box; 12 | } 13 | 14 | html, 15 | body, 16 | h1, 17 | h2, 18 | h3, 19 | h4, 20 | h5, 21 | h6, 22 | hr, 23 | p, 24 | iframe, 25 | dl, 26 | dt, 27 | dd, 28 | ul, 29 | ol, 30 | li, 31 | pre, 32 | form, 33 | button, 34 | input, 35 | textarea, 36 | th, 37 | td, 38 | fieldset { 39 | margin: 0; 40 | padding: 0; 41 | } 42 | 43 | html { 44 | font-size: 16px; 45 | line-height: 1.618; 46 | font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "WenQuanYi Micro Hei", "Helvetica Neue", sans-serif; 47 | color: #24292e; 48 | } 49 | 50 | html, 51 | body { 52 | position: relative; 53 | width: 100%; 54 | height: 100%; 55 | } 56 | 57 | a { 58 | display: inline-block; 59 | text-decoration: none; 60 | cursor: pointer; 61 | } 62 | 63 | 64 | 65 | img { 66 | display: inline-block; 67 | vertical-align: top; 68 | } 69 | 70 | 71 | textarea { 72 | resize: vertical; 73 | font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "WenQuanYi Micro Hei", "Helvetica Neue", sans-serif; 74 | font-size: 14px; 75 | } 76 | 77 | ul li{list-style: none} 78 | 79 | .blog-body { 80 | max-width: 770px; 81 | margin: 70px auto 0; 82 | position: relative; 83 | padding-left: 15px; 84 | padding-right: 15px; 85 | } 86 | 87 | a { 88 | color: #24292e; 89 | } 90 | a:hover { 91 | color: #409EFF; 92 | } 93 | 94 | .nothing{ 95 | text-align: center; 96 | font-size: 25px; 97 | } -------------------------------------------------------------------------------- /src/components/HelloWorld.vue: -------------------------------------------------------------------------------- 1 | 85 | 86 | 96 | 97 | 98 | 114 | -------------------------------------------------------------------------------- /src/components/admin/Admin.vue: -------------------------------------------------------------------------------- 1 | 8 | 15 | -------------------------------------------------------------------------------- /src/components/admin/Comments.vue: -------------------------------------------------------------------------------- 1 | 6 | 11 | -------------------------------------------------------------------------------- /src/components/admin/Draft.vue: -------------------------------------------------------------------------------- 1 | 46 | 103 | 156 | 157 | -------------------------------------------------------------------------------- /src/components/admin/DraftContent.vue: -------------------------------------------------------------------------------- 1 | 19 | 100 | 108 | -------------------------------------------------------------------------------- /src/components/admin/Header.vue: -------------------------------------------------------------------------------- 1 | 33 | 43 | 76 | -------------------------------------------------------------------------------- /src/components/admin/NewEssay.vue: -------------------------------------------------------------------------------- 1 | 33 | 195 | 206 | -------------------------------------------------------------------------------- /src/components/admin/Settings.vue: -------------------------------------------------------------------------------- 1 | 21 | 22 | -------------------------------------------------------------------------------- /src/components/admin/Tags.vue: -------------------------------------------------------------------------------- 1 | 21 | 96 | 114 | 115 | -------------------------------------------------------------------------------- /src/components/admin/Update.vue: -------------------------------------------------------------------------------- 1 | 33 | 192 | 203 | -------------------------------------------------------------------------------- /src/components/pages/Aside.vue: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dawnGoblin/myblog/cf085537ca3d31496bcf0de0eed3d2d6b2158b60/src/components/pages/Aside.vue -------------------------------------------------------------------------------- /src/components/pages/Contents.vue: -------------------------------------------------------------------------------- 1 | 59 | 146 | 207 | 208 | -------------------------------------------------------------------------------- /src/components/pages/Footer.vue: -------------------------------------------------------------------------------- 1 | 4 | 17 | -------------------------------------------------------------------------------- /src/components/pages/Header.vue: -------------------------------------------------------------------------------- 1 | 32 | 42 | 79 | -------------------------------------------------------------------------------- /src/components/pages/Index.vue: -------------------------------------------------------------------------------- 1 | 50 | 111 | 175 | 176 | -------------------------------------------------------------------------------- /src/components/pages/Lables.vue: -------------------------------------------------------------------------------- 1 | 10 | 45 | 59 | 60 | -------------------------------------------------------------------------------- /src/components/pages/Login.vue: -------------------------------------------------------------------------------- 1 | 25 | 78 | 102 | -------------------------------------------------------------------------------- /src/components/pages/NotFound.vue: -------------------------------------------------------------------------------- 1 | 19 | 64 | 65 | 66 | -------------------------------------------------------------------------------- /src/components/pages/Regist.vue: -------------------------------------------------------------------------------- 1 | 19 | 69 | 90 | -------------------------------------------------------------------------------- /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 axios from 'axios' 7 | import ElementUI from 'element-ui' 8 | import mavonEditor from 'mavon-editor' 9 | import md5 from 'js-md5'; 10 | import 'mavon-editor/dist/css/index.css' 11 | import 'element-ui/lib/theme-chalk/index.css' 12 | import './assets/reset.scss' 13 | import './assets/icons/iconfont.css' 14 | import * as filters from './assets/js/filters.js' 15 | 16 | Vue.config.productionTip = false 17 | Vue.use(ElementUI); 18 | Vue.prototype.axios = axios; 19 | Vue.use(mavonEditor) 20 | Vue.prototype.$md5 = md5; 21 | /* eslint-disable no-new */ 22 | 23 | Object.keys(filters).forEach(key => { //过滤器挂载在Vue上 24 | Vue.filter(key, filters[key]) 25 | }) 26 | 27 | router.beforeEach((to, from, next) => { 28 | if (to.meta.requireAuth) { // 判断该路由是否需要登录权限 29 | if (sessionStorage.getItem("token")) { 30 | next(); 31 | } 32 | else { 33 | next({ 34 | path: '/login', 35 | query: {redirect: to.fullPath} // 将跳转的路由path作为参数,登录成功后跳转到该路由 36 | }) 37 | } 38 | } 39 | else { 40 | next(); 41 | } 42 | }) 43 | new Vue({ 44 | el: '#app', 45 | router, 46 | render: h => h(App) 47 | // components: { App }, 48 | // template: '' 49 | }) 50 | -------------------------------------------------------------------------------- /src/router/index.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import Router from 'vue-router' 3 | import Index from '@/components/pages/Index' 4 | 5 | Vue.use(Router) 6 | 7 | export default new Router({ 8 | mode: 'history', 9 | routes: [ 10 | { 11 | path: '/', 12 | name: 'Index', 13 | component: Index 14 | }, 15 | { 16 | path: '/contents', 17 | name: 'Contents', 18 | component: resolve => require(['@/components/pages/Contents'], resolve) 19 | }, 20 | { 21 | path: '/lables', 22 | name: 'Lables', 23 | component: resolve => require(['@/components/pages/Lables'], resolve) 24 | }, 25 | { 26 | path: '/login', 27 | name: 'Login', 28 | component: resolve => require(['@/components/pages/Login'], resolve) 29 | }, 30 | { 31 | path: '/regist', 32 | name: 'Regist', 33 | component: resolve => require(['@/components/pages/Regist'], resolve) 34 | }, 35 | { 36 | path: '/admin', 37 | name: 'admin', 38 | meta: { 39 | requireAuth: true, // 添加该字段,表示进入这个路由是需要登录的 40 | }, 41 | component: resolve => require(['@/components/admin/Admin'], resolve), 42 | children: [ 43 | { 44 | path: 'newEssay', 45 | name: 'newEssay', 46 | meta: { 47 | requireAuth: true, 48 | }, 49 | component: resolve => require(['@/components/admin/NewEssay'], resolve) 50 | }, 51 | { 52 | path: 'tags', 53 | name: 'tags', 54 | meta: { 55 | requireAuth: true, 56 | }, 57 | component: resolve => require(['@/components/admin/Tags'], resolve) 58 | }, 59 | { 60 | path: 'settings', 61 | name: 'settings', 62 | meta: { 63 | requireAuth: true, 64 | }, 65 | component: resolve => require(['@/components/admin/Settings'], resolve) 66 | }, 67 | { 68 | path: 'draft', 69 | name: 'draft', 70 | meta: { 71 | requireAuth: true, 72 | }, 73 | component: resolve => require(['@/components/admin/Draft'], resolve) 74 | }, 75 | { 76 | path: 'content', 77 | name: 'content', 78 | meta: { 79 | requireAuth: true, 80 | }, 81 | component: resolve => require(['@/components/admin/DraftContent'], resolve) 82 | }, 83 | { 84 | path: 'update', 85 | name: 'update', 86 | meta: { 87 | requireAuth: true, 88 | }, 89 | component: resolve => require(['@/components/admin/Update'], resolve) 90 | }, 91 | { 92 | path: 'comments', 93 | name: 'comments', 94 | meta: { 95 | requireAuth: true, 96 | }, 97 | component: resolve => require(['@/components/admin/Comments'], resolve) 98 | } 99 | ] 100 | }, 101 | { 102 | path: "/404", 103 | name: "notFound", 104 | component: resolve => require(['@/components/pages/NotFound'], resolve) 105 | }, 106 | { 107 | path: "*", 108 | redirect: "/404" 109 | } 110 | ] 111 | }) 112 | -------------------------------------------------------------------------------- /static/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dawnGoblin/myblog/cf085537ca3d31496bcf0de0eed3d2d6b2158b60/static/.gitkeep -------------------------------------------------------------------------------- /static/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dawnGoblin/myblog/cf085537ca3d31496bcf0de0eed3d2d6b2158b60/static/logo.png -------------------------------------------------------------------------------- /static/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "scope": "/", 3 | "name": "Star Blog", 4 | "short_name": "Star Blog", 5 | "start_url": "/?from=homescreen", 6 | "display": "standalone", 7 | "description": "个人博客", 8 | "orientation": "portrait", 9 | "theme_color": "#3f51b5", 10 | "background_color": "#fff", 11 | "icons": [ 12 | { 13 | "src": "./logo.png", 14 | "sizes": "32x32", 15 | "type": "image/png" 16 | }, 17 | { 18 | "src": "./logo.png", 19 | "sizes": "144x144", 20 | "type": "image/png" 21 | } 22 | ] 23 | } -------------------------------------------------------------------------------- /static/upload/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dawnGoblin/myblog/cf085537ca3d31496bcf0de0eed3d2d6b2158b60/static/upload/3.png -------------------------------------------------------------------------------- /static/upload/imgFile-1552904486514: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dawnGoblin/myblog/cf085537ca3d31496bcf0de0eed3d2d6b2158b60/static/upload/imgFile-1552904486514 -------------------------------------------------------------------------------- /static/upload/imgFile-1552905111213: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dawnGoblin/myblog/cf085537ca3d31496bcf0de0eed3d2d6b2158b60/static/upload/imgFile-1552905111213 -------------------------------------------------------------------------------- /static/upload/imgFile-1552905136845: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dawnGoblin/myblog/cf085537ca3d31496bcf0de0eed3d2d6b2158b60/static/upload/imgFile-1552905136845 -------------------------------------------------------------------------------- /static/upload/imgFile-1552907226495: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dawnGoblin/myblog/cf085537ca3d31496bcf0de0eed3d2d6b2158b60/static/upload/imgFile-1552907226495 -------------------------------------------------------------------------------- /static/upload/imgFile-1552907339958: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dawnGoblin/myblog/cf085537ca3d31496bcf0de0eed3d2d6b2158b60/static/upload/imgFile-1552907339958 --------------------------------------------------------------------------------