├── .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.json ├── screenshots ├── ali.jpg ├── choose_city.gif ├── edit_resume.gif ├── home.gif ├── loading.gif ├── login.gif ├── read.gif ├── recruit.gif ├── recurit_want.gif ├── setting.gif ├── sort.gif ├── sort_2.gif ├── star.jpg └── wx.jpg ├── src ├── App.vue ├── api │ ├── BaseApi.js │ ├── article.js │ ├── comment.js │ ├── company.js │ ├── index.js │ ├── news.js │ ├── recruit.js │ ├── topic.js │ └── user.js ├── assets │ ├── fonts │ │ └── top_font.ttf │ ├── img │ │ ├── arrow │ │ │ ├── arrow-down.png │ │ │ ├── arrow-right.png │ │ │ ├── left.png │ │ │ ├── left_white.png │ │ │ └── range.png │ │ ├── article │ │ │ ├── answer.png │ │ │ ├── article_bg.jpg │ │ │ ├── ask.png │ │ │ ├── call.png │ │ │ ├── collect.png │ │ │ ├── draft.png │ │ │ ├── edit.png │ │ │ ├── eye.png │ │ │ ├── like.png │ │ │ ├── man.png │ │ │ ├── mes_count.png │ │ │ ├── message.png │ │ │ ├── message_green.png │ │ │ ├── see_count.png │ │ │ ├── share.png │ │ │ ├── star.png │ │ │ └── topic.png │ │ ├── banner │ │ │ ├── banner3.jpg │ │ │ ├── banner4.jpg │ │ │ ├── banner6.jpg │ │ │ └── banner8.jpg │ │ ├── favicon │ │ │ ├── github.jpg │ │ │ ├── juejin.jpg │ │ │ ├── sifou.jpg │ │ │ └── zhihu.jpg │ │ ├── head │ │ │ ├── anonymous.png │ │ │ ├── boy.png │ │ │ ├── demo_head.png │ │ │ └── girl.png │ │ ├── home │ │ │ ├── article.png │ │ │ ├── article_click.png │ │ │ ├── company.png │ │ │ ├── company_click.png │ │ │ ├── flash.png │ │ │ ├── home.png │ │ │ ├── home_click.png │ │ │ ├── hot.png │ │ │ ├── middle_one.png │ │ │ ├── middle_three.png │ │ │ ├── middle_two.png │ │ │ ├── mine.png │ │ │ ├── mine_click.png │ │ │ └── salary.png │ │ ├── like │ │ │ ├── like.png │ │ │ ├── like_yes.png │ │ │ └── message.png │ │ ├── loading │ │ │ ├── loading.png │ │ │ ├── welcome1.png │ │ │ ├── welcome2.png │ │ │ └── welcome3.png │ │ ├── mine │ │ │ ├── box.jpg │ │ │ ├── cc.png │ │ │ ├── collect.png │ │ │ ├── edit.png │ │ │ ├── feedback.png │ │ │ ├── info.png │ │ │ ├── like_company.png │ │ │ ├── resume.png │ │ │ ├── resume_bg.jpg │ │ │ ├── secret.png │ │ │ ├── setting.png │ │ │ ├── star.png │ │ │ ├── want.png │ │ │ └── wantwhat.png │ │ ├── notFound.png │ │ ├── search │ │ │ ├── close.png │ │ │ ├── mine.png │ │ │ ├── scan.png │ │ │ ├── search.png │ │ │ ├── star.png │ │ │ └── trash.png │ │ └── sort │ │ │ ├── default_sort.png │ │ │ └── time_sort.png │ └── logo.png ├── components │ ├── PullToRefresh.vue │ ├── banner.vue │ ├── bottom.vue │ ├── mHeader.vue │ ├── myPopUp.vue │ ├── myRange.vue │ ├── recruitItem.vue │ ├── recruitList.vue │ ├── searchBar.vue │ ├── sortContainer.vue │ └── tabSwitch.vue ├── config │ ├── cityData.js │ └── index.js ├── data │ ├── index.js │ └── mockData.js ├── main.js ├── router │ └── index.js ├── store │ └── index.js ├── style │ ├── mixin.scss │ └── my-mint.scss ├── utils │ ├── commonUtils.js │ └── mixin.js └── views │ ├── article │ ├── articleMine.vue │ ├── articles.vue │ ├── askDetail.vue │ ├── editArticleMine.vue │ └── topicSquare.vue │ ├── baseIndex.vue │ ├── company │ ├── company.vue │ └── companyDetail.vue │ ├── home │ ├── chooseLocation.vue │ ├── home.vue │ ├── newsDetail.vue │ ├── newsList.vue │ ├── recruitDetail.vue │ ├── recruitDetailList.vue │ └── specialRecruit.vue │ ├── mine │ ├── cc.vue │ ├── editResume.vue │ ├── like.vue │ ├── likeCompany.vue │ ├── likeRecruit.vue │ ├── mine.vue │ ├── priviewResume.vue │ ├── resume.vue │ ├── secretSetting.vue │ ├── send.vue │ ├── setting.vue │ └── wantAsk.vue │ ├── register.vue │ └── welcome.vue ├── static └── .gitkeep └── yarn.lock /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | [ 4 | "env", 5 | { 6 | "modules": false, 7 | "targets": { 8 | "browsers": [ 9 | "> 1%", 10 | "last 2 versions", 11 | "not ie <= 8" 12 | ] 13 | } 14 | } 15 | ], 16 | "stage-2" 17 | ], 18 | "plugins": [ 19 | "transform-vue-jsx", 20 | "transform-runtime" 21 | ] 22 | } 23 | -------------------------------------------------------------------------------- /.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 | # 全栈系列Vue版拉勾,客官们来瞧瞧 2 | 模拟拉勾app系列---vue前端界面 3 | 4 | ### 前言 5 | 本项目是本人在闲暇时间编写的一个初级引导项目,麻雀虽小五脏俱全,所使用的东西绝大多数在开发中都能用得到,但难免会存在很多地方需要完善。 6 | 7 | 由于近期要备战法考,且工作繁忙,没有时间维护,还存在很多BUG或需要优化的地方,希望多多提出(有空了就改),当然能给个star什么的就更好了. 8 | 9 | 为了方便访问,也加入了mock数据,但不是很全,若需要完整体验,请按照下方步骤实现。 10 | 11 | 前端项目由Vue框架编写,其余部分涉及到node、python等可移至下方项目或自行查阅。 12 | ### 注意:本项目个人开发练习,不作为任何商业用途 13 | 14 | 15 | # todolist 16 | + ~~登录/注册~~ √ 17 | + ~~页面首次加载面~~ √ 18 | + ~~城市选择~~ √ 19 | + ~~文章阅读~~ √ 20 | + ~~搜索职位~~ √ 21 | + ~~条件筛选~~ √ 22 | + ~~搜索公司~~ √ 23 | + ~~下拉刷新上拉加载~~ √ 24 | + ~~数据排序~~ √ 25 | + ~~图片懒加载~~ √ 26 | + ~~提问评论~~√ 27 | + ~~提问信息编辑~~ √ 28 | + ~~言职社区记录~~ √ 29 | + ~~话题关注~~ √ 30 | + ~~收藏~~√ 31 | + ~~求职意向~~√ 32 | + ~~投递记录~~√ 33 | + ~~注销~~√ 34 | + ~~基础设置~~√ 35 | + ~~头像修改~~ √ 36 | + ~~简历填写~~√ 37 | + ~~简历生成并下载pdf~~√ 38 | + ~~采用cdn加载,优化打包后vendor大小~~√ 39 | + ps:还有很多很多东西,不一一列举,想到啥就做啥 40 | 41 | # 技术栈 42 | 前端: 43 | + vue全家桶 44 | + es6 45 | + scss 46 | + mint-ui 47 | + mockjs 48 | + jquery 49 | 50 | 转发服务器: 51 | + node 52 | + express 53 | 54 | 实际api服务器: 55 | + python3 56 | + mongodb 57 | 58 | 爬虫: 59 | + python3 60 | 61 | # 效果演示 62 | ### 首次载入 63 | ![](screenshots/loading.gif) 64 | ### 登录注册 65 | ![](screenshots/login.gif) 66 | ### 首页 67 | ![](screenshots/home.gif) 68 | ### 文章阅读 69 | ![](screenshots/read.gif) 70 | ### 选择城市 71 | ![](screenshots/choose_city.gif) 72 | ### 职位查看 73 | ![](screenshots/recruit.gif) 74 | ### 筛选 75 | ![](screenshots/recurit_want.gif) 76 | ### 排序 77 | ![](screenshots/sort.gif) 78 | ### 排序2 79 | ![](screenshots/sort_2.gif) 80 | ### 简历修改 81 | ![](screenshots/edit_resume.gif) 82 | ### 我的设置 83 | ![](screenshots/setting.gif) 84 | 85 | ps:还有更多的设置就不截图了,有点大,有兴趣的clone下去看看吧 86 | # 线上地址 87 | 88 | # 说明 89 | 前端地址:https://github.com/qianbin01/lagou_vue 90 | 91 | 代理api地址:https://github.com/qianbin01/lagou_node 92 | 93 | api地址:https://github.com/qianbin01/lagou_python_api 94 | 95 | 爬虫地址:https://github.com/qianbin01/lagou_spider 96 | # 项目配置 97 | ubuntu 16.04 98 | # 运行步骤 99 | 必备步骤: 100 | 1. 运行爬虫项目 101 | 2. 运行python-api项目 102 | 3. 运行node-api转发项目 103 | 4. 运行本项目 104 | 105 | 本项目步骤: 106 | 1. git clone https://github.com/qianbin01/lagou_vue.git 107 | 2. cd lagou_vue 108 | 3. npm install/yarn install 109 | 4. npm run dev/npm start 110 | 5. 浏览器访问http://localhost:8085 111 | 112 | 113 | # 点点你们的小手吧 114 | 知乎专栏:https://zhuanlan.zhihu.com/c_1010582778160779264
115 | 掘金:https://juejin.im/user/5b8291bce51d4538ab043911
116 | 思否:https://segmentfault.com/u/qishidexinxin
117 | 118 | 希望对大家有帮助 119 | 120 | ![](screenshots/star.jpg) 121 | 122 | 123 | 大佬们赞助一波续费服务器吧 124 | 125 | ![](screenshots/ali.jpg) 126 | ![](screenshots/wx.jpg) 127 | 128 | # License 129 | MIT 130 | -------------------------------------------------------------------------------- /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/qianbin01/lagou_vue/8f90eb1fac9e6387ffa239746d0913f4f7228f8b/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 | publicPath: '../../', 51 | fallback: 'vue-style-loader' 52 | }) 53 | } else { 54 | return ['vue-style-loader'].concat(loaders) 55 | } 56 | } 57 | 58 | // https://vue-loader.vuejs.org/en/configurations/extract-css.html 59 | return { 60 | css: generateLoaders(), 61 | postcss: generateLoaders(), 62 | less: generateLoaders('less'), 63 | sass: generateLoaders('sass', { indentedSyntax: true }), 64 | scss: generateLoaders('sass'), 65 | stylus: generateLoaders('stylus'), 66 | styl: generateLoaders('stylus') 67 | } 68 | }; 69 | 70 | // Generate loaders for standalone style files (outside of .vue) 71 | exports.styleLoaders = function (options) { 72 | const output = []; 73 | const loaders = exports.cssLoaders(options); 74 | 75 | for (const extension in loaders) { 76 | const loader = loaders[extension]; 77 | output.push({ 78 | test: new RegExp('\\.' + extension + '$'), 79 | use: loader 80 | }) 81 | } 82 | 83 | return output 84 | }; 85 | 86 | exports.createNotifierCallback = () => { 87 | const notifier = require('node-notifier'); 88 | 89 | return (severity, errors) => { 90 | if (severity !== 'error') return; 91 | 92 | const error = errors[0]; 93 | const filename = error.file && error.file.split('!').pop(); 94 | 95 | notifier.notify({ 96 | title: packageConfig.name, 97 | message: severity + ': ' + error.name, 98 | subtitle: filename || '', 99 | icon: path.join(__dirname, 'logo.png') 100 | }) 101 | } 102 | }; 103 | -------------------------------------------------------------------------------- /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 | module.exports = { 13 | context: path.resolve(__dirname, '../'), 14 | entry: { 15 | app: './src/main.js' 16 | }, 17 | output: { 18 | path: config.build.assetsRoot, 19 | filename: '[name].js', 20 | publicPath: process.env.NODE_ENV === 'production' 21 | ? config.build.assetsPublicPath 22 | : config.dev.assetsPublicPath 23 | }, 24 | externals: { 25 | vue: 'Vue', 26 | vuex: 'Vuex', 27 | 'mint-ui': 'MINT', 28 | mockjs: 'Mock', 29 | jspdf: 'jsPDF', 30 | jquery: "jQuery", 31 | }, 32 | resolve: { 33 | extensions: ['.js', '.vue', '.json'], 34 | alias: { 35 | 'vue$': 'vue/dist/vue.esm.js', 36 | '@': resolve('src'), 37 | 'jquery': 'jquery' 38 | } 39 | }, 40 | module: { 41 | rules: [ 42 | { 43 | test: /\.vue$/, 44 | loader: 'vue-loader', 45 | options: vueLoaderConfig 46 | }, 47 | { 48 | test: /\.js$/, 49 | loader: 'babel-loader', 50 | include: [resolve('src'), resolve('test'), resolve('node_modules/webpack-dev-server/client')] 51 | }, 52 | { 53 | test: /\.(png|jpe?g|gif|svg)(\?.*)?$/, 54 | loader: 'url-loader', 55 | options: { 56 | limit: 10000, 57 | name: utils.assetsPath('img/[name].[hash:7].[ext]') 58 | } 59 | }, 60 | { 61 | test: /\.(mp4|webm|ogg|mp3|wav|flac|aac)(\?.*)?$/, 62 | loader: 'url-loader', 63 | options: { 64 | limit: 10000, 65 | name: utils.assetsPath('media/[name].[hash:7].[ext]') 66 | } 67 | }, 68 | { 69 | test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/, 70 | loader: 'url-loader', 71 | options: { 72 | limit: 10002, 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 | favicon:'src/assets/logo.png' 60 | }), 61 | // copy custom static assets 62 | new CopyWebpackPlugin([ 63 | { 64 | from: path.resolve(__dirname, '../static'), 65 | to: config.dev.assetsSubDirectory, 66 | ignore: ['.*'] 67 | } 68 | ]) 69 | ] 70 | }); 71 | 72 | module.exports = new Promise((resolve, reject) => { 73 | portfinder.basePort = process.env.PORT || config.dev.port; 74 | portfinder.getPort((err, port) => { 75 | if (err) { 76 | reject(err) 77 | } else { 78 | // publish the new Port, necessary for e2e tests 79 | process.env.PORT = port; 80 | // add port to devServer config 81 | devWebpackConfig.devServer.port = port; 82 | 83 | // Add FriendlyErrorsPlugin 84 | devWebpackConfig.plugins.push(new FriendlyErrorsPlugin({ 85 | compilationSuccessInfo: { 86 | messages: [`Your application is running here: http://${devWebpackConfig.devServer.host}:${port}`], 87 | }, 88 | onErrors: config.dev.notifyOnErrors 89 | ? utils.createNotifierCallback() 90 | : undefined 91 | })); 92 | 93 | resolve(devWebpackConfig) 94 | } 95 | }) 96 | }); 97 | -------------------------------------------------------------------------------- /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 | 14 | const env = require('../config/prod.env'); 15 | 16 | const webpackConfig = merge(baseWebpackConfig, { 17 | module: { 18 | rules: utils.styleLoaders({ 19 | sourceMap: config.build.productionSourceMap, 20 | extract: true, 21 | usePostCSS: true 22 | }) 23 | }, 24 | devtool: config.build.productionSourceMap ? config.build.devtool : false, 25 | output: { 26 | path: config.build.assetsRoot, 27 | filename: utils.assetsPath('js/[name].[chunkhash].js'), 28 | chunkFilename: utils.assetsPath('js/[id].[chunkhash].js') 29 | }, 30 | plugins: [ 31 | // http://vuejs.github.io/vue-loader/en/workflow/production.html 32 | new webpack.DefinePlugin({ 33 | 'process.env': env 34 | }), 35 | new UglifyJsPlugin({ 36 | uglifyOptions: { 37 | compress: { 38 | warnings: false 39 | } 40 | }, 41 | sourceMap: config.build.productionSourceMap, 42 | parallel: true 43 | }), 44 | // extract css into its own file 45 | new ExtractTextPlugin({ 46 | filename: utils.assetsPath('css/[name].[contenthash].css'), 47 | // Setting the following option to `false` will not extract CSS from codesplit chunks. 48 | // Their CSS will instead be inserted dynamically with style-loader when the codesplit chunk has been loaded by webpack. 49 | // It's currently set to `true` because we are seeing that sourcemaps are included in the codesplit bundle as well when it's `false`, 50 | // increasing file size: https://github.com/vuejs-templates/webpack/issues/1110 51 | allChunks: true, 52 | }), 53 | // Compress extracted CSS. We are using this plugin so that possible 54 | // duplicated CSS from different components can be deduped. 55 | new OptimizeCSSPlugin({ 56 | cssProcessorOptions: config.build.productionSourceMap 57 | ? { safe: true, map: { inline: false } } 58 | : { safe: true } 59 | }), 60 | // generate dist index.html with correct asset hash for caching. 61 | // you can customize output by editing /index.html 62 | // see https://github.com/ampedandwired/html-webpack-plugin 63 | new HtmlWebpackPlugin({ 64 | filename: config.build.index, 65 | template: 'index.html', 66 | inject: true, 67 | minify: { 68 | removeComments: true, 69 | collapseWhitespace: true, 70 | removeAttributeQuotes: true 71 | // more options: 72 | // https://github.com/kangax/html-minifier#options-quick-reference 73 | }, 74 | // necessary to consistently work with multiple chunks via CommonsChunkPlugin 75 | chunksSortMode: 'dependency' 76 | }), 77 | // keep module.id stable when vendor modules does not change 78 | new webpack.HashedModuleIdsPlugin(), 79 | // enable scope hoisting 80 | new webpack.optimize.ModuleConcatenationPlugin(), 81 | // split vendor js into its own file 82 | new webpack.optimize.CommonsChunkPlugin({ 83 | name: 'vendor', 84 | minChunks (module) { 85 | // any required modules inside node_modules are extracted to vendor 86 | return ( 87 | module.resource && 88 | /\.js$/.test(module.resource) && 89 | module.resource.indexOf( 90 | path.join(__dirname, '../node_modules') 91 | ) === 0 92 | ) 93 | } 94 | }), 95 | // extract webpack runtime and module manifest to its own file in order to 96 | // prevent vendor hash from being updated whenever app bundle is updated 97 | new webpack.optimize.CommonsChunkPlugin({ 98 | name: 'manifest', 99 | minChunks: Infinity 100 | }), 101 | // This instance extracts shared chunks from code splitted chunks and bundles them 102 | // in a separate chunk, similar to the vendor chunk 103 | // see: https://webpack.js.org/plugins/commons-chunk-plugin/#extra-async-commons-chunk 104 | new webpack.optimize.CommonsChunkPlugin({ 105 | name: 'app', 106 | async: 'vendor-async', 107 | children: true, 108 | minChunks: 3 109 | }), 110 | 111 | // copy custom static assets 112 | new CopyWebpackPlugin([ 113 | { 114 | from: path.resolve(__dirname, '../static'), 115 | to: config.build.assetsSubDirectory, 116 | ignore: ['.*'] 117 | } 118 | ]) 119 | ] 120 | }); 121 | 122 | if (config.build.productionGzip) { 123 | const CompressionWebpackPlugin = require('compression-webpack-plugin'); 124 | 125 | webpackConfig.plugins.push( 126 | new CompressionWebpackPlugin({ 127 | asset: '[path].gz[query]', 128 | algorithm: 'gzip', 129 | test: new RegExp( 130 | '\\.(' + 131 | config.build.productionGzipExtensions.join('|') + 132 | ')$' 133 | ), 134 | threshold: 10240, 135 | minRatio: 0.8 136 | }) 137 | ) 138 | } 139 | 140 | if (config.build.bundleAnalyzerReport) { 141 | const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin; 142 | webpackConfig.plugins.push(new BundleAnalyzerPlugin()) 143 | } 144 | 145 | module.exports = webpackConfig; 146 | -------------------------------------------------------------------------------- /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 | 15 | // Various Dev Server settings 16 | host: '0.0.0.0', // can be overwritten by process.env.HOST 17 | port: 8085, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined 18 | autoOpenBrowser: false, 19 | errorOverlay: true, 20 | notifyOnErrors: true, 21 | poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions- 22 | 23 | 24 | /** 25 | * Source Maps 26 | */ 27 | 28 | // https://webpack.js.org/configuration/devtool/#development 29 | devtool: 'cheap-module-eval-source-map', 30 | 31 | // If you have problems debugging vue-files in devtools, 32 | // set this to false - it *may* help 33 | // https://vue-loader.vuejs.org/en/options.html#cachebusting 34 | cacheBusting: true, 35 | 36 | cssSourceMap: true 37 | }, 38 | 39 | build: { 40 | // Template for index.html 41 | index: path.resolve(__dirname, '../dist/index.html'), 42 | 43 | // Paths 44 | assetsRoot: path.resolve(__dirname, '../dist'), 45 | assetsSubDirectory: 'static', 46 | assetsPublicPath: './', 47 | 48 | /** 49 | * Source Maps 50 | */ 51 | 52 | productionSourceMap: true, 53 | // https://webpack.js.org/configuration/devtool/#production 54 | devtool: '#source-map', 55 | 56 | // Gzip off by default as many popular static hosts such as 57 | // Surge or Netlify already gzip all static assets for you. 58 | // Before setting to `true`, make sure to: 59 | // npm install --save-dev compression-webpack-plugin 60 | productionGzip: false, 61 | productionGzipExtensions: ['js', 'css'], 62 | 63 | // Run the build command with an extra argument to 64 | // View the bundle analyzer report after build finishes: 65 | // `npm run build --report` 66 | // Set to `true` or `false` to always turn it on or off 67 | bundleAnalyzerReport: process.env.npm_config_report 68 | } 69 | }; 70 | -------------------------------------------------------------------------------- /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 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 拉钩-Vue版 23 | 24 | 25 |
26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "lagou_vue", 3 | "version": "1.0.0", 4 | "description": "A Vue.js project", 5 | "author": "qb ", 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 | "analyz": "set NODE_ENV=production && set npm_config_report=true && npm run build" 12 | }, 13 | "dependencies": { 14 | "axios": "^0.18.0", 15 | "html2canvas": "^1.0.0-alpha.12", 16 | "jquery": "^3.3.1", 17 | "lodash": "latest", 18 | "mint-ui": "^2.2.13", 19 | "jspdf": "^1.4.1", 20 | "mockjs": "^1.0.1-beta3", 21 | "node-sass": "^4.9.2", 22 | "sass-loader": "^7.0.3", 23 | "swiper": "^4.3.5", 24 | "vue": "^2.5.2", 25 | "vue-router": "^3.0.1", 26 | "vuex": "^3.0.1" 27 | }, 28 | "devDependencies": { 29 | "autoprefixer": "^7.1.2", 30 | "babel-core": "^6.22.1", 31 | "babel-helper-vue-jsx-merge-props": "^2.0.3", 32 | "babel-loader": "^7.1.1", 33 | "babel-plugin-syntax-jsx": "^6.18.0", 34 | "babel-plugin-transform-runtime": "^6.22.0", 35 | "babel-plugin-transform-vue-jsx": "^3.5.0", 36 | "babel-preset-env": "^1.3.2", 37 | "babel-preset-stage-2": "^6.22.0", 38 | "chalk": "^2.0.1", 39 | "copy-webpack-plugin": "^4.0.1", 40 | "css-loader": "^0.28.0", 41 | "extract-text-webpack-plugin": "^3.0.0", 42 | "file-loader": "^1.1.4", 43 | "friendly-errors-webpack-plugin": "^1.6.1", 44 | "html-webpack-plugin": "^2.30.1", 45 | "node-notifier": "^5.1.2", 46 | "optimize-css-assets-webpack-plugin": "^3.2.0", 47 | "ora": "^1.2.0", 48 | "portfinder": "^1.0.13", 49 | "postcss-import": "^11.0.0", 50 | "postcss-loader": "^2.0.8", 51 | "postcss-url": "^7.2.1", 52 | "rimraf": "^2.6.0", 53 | "semver": "^5.3.0", 54 | "shelljs": "^0.7.6", 55 | "uglifyjs-webpack-plugin": "^1.1.1", 56 | "url-loader": "^0.5.8", 57 | "vue-lazyload": "^1.2.6", 58 | "vue-loader": "^13.3.0", 59 | "vue-style-loader": "^3.0.1", 60 | "vue-template-compiler": "^2.5.2", 61 | "webpack": "^3.6.0", 62 | "webpack-bundle-analyzer": "^2.9.0", 63 | "webpack-dev-server": ">=3.1.11", 64 | "webpack-merge": "^4.1.0" 65 | }, 66 | "engines": { 67 | "node": ">= 6.0.0", 68 | "npm": ">= 3.0.0" 69 | }, 70 | "browserslist": [ 71 | "> 1%", 72 | "last 2 versions", 73 | "not ie <= 8" 74 | ] 75 | } 76 | -------------------------------------------------------------------------------- /screenshots/ali.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qianbin01/lagou_vue/8f90eb1fac9e6387ffa239746d0913f4f7228f8b/screenshots/ali.jpg -------------------------------------------------------------------------------- /screenshots/choose_city.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qianbin01/lagou_vue/8f90eb1fac9e6387ffa239746d0913f4f7228f8b/screenshots/choose_city.gif -------------------------------------------------------------------------------- /screenshots/edit_resume.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qianbin01/lagou_vue/8f90eb1fac9e6387ffa239746d0913f4f7228f8b/screenshots/edit_resume.gif -------------------------------------------------------------------------------- /screenshots/home.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qianbin01/lagou_vue/8f90eb1fac9e6387ffa239746d0913f4f7228f8b/screenshots/home.gif -------------------------------------------------------------------------------- /screenshots/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qianbin01/lagou_vue/8f90eb1fac9e6387ffa239746d0913f4f7228f8b/screenshots/loading.gif -------------------------------------------------------------------------------- /screenshots/login.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qianbin01/lagou_vue/8f90eb1fac9e6387ffa239746d0913f4f7228f8b/screenshots/login.gif -------------------------------------------------------------------------------- /screenshots/read.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qianbin01/lagou_vue/8f90eb1fac9e6387ffa239746d0913f4f7228f8b/screenshots/read.gif -------------------------------------------------------------------------------- /screenshots/recruit.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qianbin01/lagou_vue/8f90eb1fac9e6387ffa239746d0913f4f7228f8b/screenshots/recruit.gif -------------------------------------------------------------------------------- /screenshots/recurit_want.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qianbin01/lagou_vue/8f90eb1fac9e6387ffa239746d0913f4f7228f8b/screenshots/recurit_want.gif -------------------------------------------------------------------------------- /screenshots/setting.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qianbin01/lagou_vue/8f90eb1fac9e6387ffa239746d0913f4f7228f8b/screenshots/setting.gif -------------------------------------------------------------------------------- /screenshots/sort.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qianbin01/lagou_vue/8f90eb1fac9e6387ffa239746d0913f4f7228f8b/screenshots/sort.gif -------------------------------------------------------------------------------- /screenshots/sort_2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qianbin01/lagou_vue/8f90eb1fac9e6387ffa239746d0913f4f7228f8b/screenshots/sort_2.gif -------------------------------------------------------------------------------- /screenshots/star.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qianbin01/lagou_vue/8f90eb1fac9e6387ffa239746d0913f4f7228f8b/screenshots/star.jpg -------------------------------------------------------------------------------- /screenshots/wx.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qianbin01/lagou_vue/8f90eb1fac9e6387ffa239746d0913f4f7228f8b/screenshots/wx.jpg -------------------------------------------------------------------------------- /src/App.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 44 | 45 | 123 | -------------------------------------------------------------------------------- /src/api/BaseApi.js: -------------------------------------------------------------------------------- 1 | import recruit from './recruit' 2 | import company from './company' 3 | import topic from './topic' 4 | import article from './article' 5 | import news from './news' 6 | 7 | //汇总各分类api,统一暴露方法出去 8 | export default { 9 | recruit: recruit, 10 | company: company, 11 | topic: topic, 12 | article: article, 13 | location: location, 14 | news: news 15 | } 16 | -------------------------------------------------------------------------------- /src/api/article.js: -------------------------------------------------------------------------------- 1 | import http from './index' 2 | //提问类 3 | 4 | export default { 5 | getArticles: (res) => { 6 | http.get('/api/article/list', res); 7 | }, 8 | getSingleArticle: (res, aid) => { 9 | http.get('/api/article/single', res, {aid: aid}); 10 | }, 11 | } 12 | -------------------------------------------------------------------------------- /src/api/comment.js: -------------------------------------------------------------------------------- 1 | import http from './index' 2 | //提问类 3 | 4 | export default { 5 | getComments: (res, aid) => { 6 | http.get('/api/comment/list', res, {aid: aid}); 7 | }, 8 | } 9 | -------------------------------------------------------------------------------- /src/api/company.js: -------------------------------------------------------------------------------- 1 | import http from './index' 2 | //公司类api 3 | 4 | export default { 5 | getCompanies: (res) => { 6 | http.get('/api/company/list', res); 7 | }, 8 | getSingleCompany: (res, cid) => { 9 | http.get('/api/company/single', res, {cid: cid}); 10 | }, 11 | } 12 | -------------------------------------------------------------------------------- /src/api/index.js: -------------------------------------------------------------------------------- 1 | import config from '../config' 2 | import axios from 'axios' 3 | 4 | axios.defaults.baseURL = config.BASE_API_HOST;//设置base_url 5 | axios.defaults.headers['Accept'] = 'application/json, text/plain, */*'; 6 | axios.defaults.timeout = 2000; 7 | axios.defaults.withCredentials = true;//允许携带cookies 8 | 9 | /* 对象序列化 10 | * 11 | * @param {param} 对象数据 12 | * @return 序列化后数据 13 | */ 14 | const changeParam = (param) => { 15 | if (param) { 16 | return JSON.stringify(param).replace(/:/g, '=').replace(/,/g, '&').replace(/{/g, '?').replace(/}/g, '').replace(/"/g, ''); 17 | } 18 | else { 19 | return ''; 20 | } 21 | }; 22 | 23 | export default { 24 | /* get异步封装 25 | * 26 | * @param {url} 路径可包含请求数据,包含时,data传'' 27 | * @param {res} 执行成功回调函数 28 | * @param {data} 对象化数据,如http://www.baidu.com?data=abc,可直接传{data:'abc'} 29 | * @return 无返回值 30 | */ 31 | get: function (url, res, data = '') { 32 | axios.get(`${url}${changeParam(data)}`).then(res).catch(error => { 33 | console.log(error); 34 | }) 35 | }, 36 | /* post异步封装 37 | * 38 | * @param {url} 请求路径 39 | * @param {data} 对象化数据 40 | * @param {res} 执行成功回调函数 41 | * @return 无返回值 42 | */ 43 | post: function (url, data, res) { 44 | axios.post(url, data).then(res).catch(error => { 45 | console.log(error) 46 | }); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /src/api/news.js: -------------------------------------------------------------------------------- 1 | import http from './index' 2 | //新闻类api 3 | export default { 4 | getNews: (res) => { 5 | http.get('/api/news/list', res); 6 | }, 7 | getSingleNews: (res, nid) => { 8 | http.get('/api/news/single', res, {nid: nid}); 9 | }, 10 | } 11 | -------------------------------------------------------------------------------- /src/api/recruit.js: -------------------------------------------------------------------------------- 1 | import http from './index' 2 | //职位类api 3 | const getRecruit = (res) => { 4 | http.get('/api/recruit/list', res); 5 | }; 6 | 7 | export default { 8 | getRecruit: (res) => { 9 | http.get('/api/recruit/list', res); 10 | }, 11 | getSingleRecruit: (res, rid) => { 12 | http.get('/api/recruit/single', res, {rid: rid}) 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/api/topic.js: -------------------------------------------------------------------------------- 1 | import http from './index' 2 | //话题类api 3 | 4 | export default { 5 | getTopic: (res) => { 6 | http.get('/api/topic/list', res); 7 | }, 8 | getSingleTopic: (res, tid) => { 9 | http.get('/api/topic/single', res, {tid: tid}) 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/api/user.js: -------------------------------------------------------------------------------- 1 | import http from './index' 2 | 3 | export default { 4 | register: (data, res) => { 5 | http.post('/api/user/register', data, res); 6 | }, 7 | login: (data, res) => { 8 | http.post('/api/user/login', data, res); 9 | }, 10 | } 11 | -------------------------------------------------------------------------------- /src/assets/fonts/top_font.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qianbin01/lagou_vue/8f90eb1fac9e6387ffa239746d0913f4f7228f8b/src/assets/fonts/top_font.ttf -------------------------------------------------------------------------------- /src/assets/img/arrow/arrow-down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qianbin01/lagou_vue/8f90eb1fac9e6387ffa239746d0913f4f7228f8b/src/assets/img/arrow/arrow-down.png -------------------------------------------------------------------------------- /src/assets/img/arrow/arrow-right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qianbin01/lagou_vue/8f90eb1fac9e6387ffa239746d0913f4f7228f8b/src/assets/img/arrow/arrow-right.png -------------------------------------------------------------------------------- /src/assets/img/arrow/left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qianbin01/lagou_vue/8f90eb1fac9e6387ffa239746d0913f4f7228f8b/src/assets/img/arrow/left.png -------------------------------------------------------------------------------- /src/assets/img/arrow/left_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qianbin01/lagou_vue/8f90eb1fac9e6387ffa239746d0913f4f7228f8b/src/assets/img/arrow/left_white.png -------------------------------------------------------------------------------- /src/assets/img/arrow/range.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qianbin01/lagou_vue/8f90eb1fac9e6387ffa239746d0913f4f7228f8b/src/assets/img/arrow/range.png -------------------------------------------------------------------------------- /src/assets/img/article/answer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qianbin01/lagou_vue/8f90eb1fac9e6387ffa239746d0913f4f7228f8b/src/assets/img/article/answer.png -------------------------------------------------------------------------------- /src/assets/img/article/article_bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qianbin01/lagou_vue/8f90eb1fac9e6387ffa239746d0913f4f7228f8b/src/assets/img/article/article_bg.jpg -------------------------------------------------------------------------------- /src/assets/img/article/ask.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qianbin01/lagou_vue/8f90eb1fac9e6387ffa239746d0913f4f7228f8b/src/assets/img/article/ask.png -------------------------------------------------------------------------------- /src/assets/img/article/call.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qianbin01/lagou_vue/8f90eb1fac9e6387ffa239746d0913f4f7228f8b/src/assets/img/article/call.png -------------------------------------------------------------------------------- /src/assets/img/article/collect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qianbin01/lagou_vue/8f90eb1fac9e6387ffa239746d0913f4f7228f8b/src/assets/img/article/collect.png -------------------------------------------------------------------------------- /src/assets/img/article/draft.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qianbin01/lagou_vue/8f90eb1fac9e6387ffa239746d0913f4f7228f8b/src/assets/img/article/draft.png -------------------------------------------------------------------------------- /src/assets/img/article/edit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qianbin01/lagou_vue/8f90eb1fac9e6387ffa239746d0913f4f7228f8b/src/assets/img/article/edit.png -------------------------------------------------------------------------------- /src/assets/img/article/eye.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qianbin01/lagou_vue/8f90eb1fac9e6387ffa239746d0913f4f7228f8b/src/assets/img/article/eye.png -------------------------------------------------------------------------------- /src/assets/img/article/like.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qianbin01/lagou_vue/8f90eb1fac9e6387ffa239746d0913f4f7228f8b/src/assets/img/article/like.png -------------------------------------------------------------------------------- /src/assets/img/article/man.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qianbin01/lagou_vue/8f90eb1fac9e6387ffa239746d0913f4f7228f8b/src/assets/img/article/man.png -------------------------------------------------------------------------------- /src/assets/img/article/mes_count.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qianbin01/lagou_vue/8f90eb1fac9e6387ffa239746d0913f4f7228f8b/src/assets/img/article/mes_count.png -------------------------------------------------------------------------------- /src/assets/img/article/message.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qianbin01/lagou_vue/8f90eb1fac9e6387ffa239746d0913f4f7228f8b/src/assets/img/article/message.png -------------------------------------------------------------------------------- /src/assets/img/article/message_green.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qianbin01/lagou_vue/8f90eb1fac9e6387ffa239746d0913f4f7228f8b/src/assets/img/article/message_green.png -------------------------------------------------------------------------------- /src/assets/img/article/see_count.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qianbin01/lagou_vue/8f90eb1fac9e6387ffa239746d0913f4f7228f8b/src/assets/img/article/see_count.png -------------------------------------------------------------------------------- /src/assets/img/article/share.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qianbin01/lagou_vue/8f90eb1fac9e6387ffa239746d0913f4f7228f8b/src/assets/img/article/share.png -------------------------------------------------------------------------------- /src/assets/img/article/star.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qianbin01/lagou_vue/8f90eb1fac9e6387ffa239746d0913f4f7228f8b/src/assets/img/article/star.png -------------------------------------------------------------------------------- /src/assets/img/article/topic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qianbin01/lagou_vue/8f90eb1fac9e6387ffa239746d0913f4f7228f8b/src/assets/img/article/topic.png -------------------------------------------------------------------------------- /src/assets/img/banner/banner3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qianbin01/lagou_vue/8f90eb1fac9e6387ffa239746d0913f4f7228f8b/src/assets/img/banner/banner3.jpg -------------------------------------------------------------------------------- /src/assets/img/banner/banner4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qianbin01/lagou_vue/8f90eb1fac9e6387ffa239746d0913f4f7228f8b/src/assets/img/banner/banner4.jpg -------------------------------------------------------------------------------- /src/assets/img/banner/banner6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qianbin01/lagou_vue/8f90eb1fac9e6387ffa239746d0913f4f7228f8b/src/assets/img/banner/banner6.jpg -------------------------------------------------------------------------------- /src/assets/img/banner/banner8.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qianbin01/lagou_vue/8f90eb1fac9e6387ffa239746d0913f4f7228f8b/src/assets/img/banner/banner8.jpg -------------------------------------------------------------------------------- /src/assets/img/favicon/github.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qianbin01/lagou_vue/8f90eb1fac9e6387ffa239746d0913f4f7228f8b/src/assets/img/favicon/github.jpg -------------------------------------------------------------------------------- /src/assets/img/favicon/juejin.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qianbin01/lagou_vue/8f90eb1fac9e6387ffa239746d0913f4f7228f8b/src/assets/img/favicon/juejin.jpg -------------------------------------------------------------------------------- /src/assets/img/favicon/sifou.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qianbin01/lagou_vue/8f90eb1fac9e6387ffa239746d0913f4f7228f8b/src/assets/img/favicon/sifou.jpg -------------------------------------------------------------------------------- /src/assets/img/favicon/zhihu.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qianbin01/lagou_vue/8f90eb1fac9e6387ffa239746d0913f4f7228f8b/src/assets/img/favicon/zhihu.jpg -------------------------------------------------------------------------------- /src/assets/img/head/anonymous.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qianbin01/lagou_vue/8f90eb1fac9e6387ffa239746d0913f4f7228f8b/src/assets/img/head/anonymous.png -------------------------------------------------------------------------------- /src/assets/img/head/boy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qianbin01/lagou_vue/8f90eb1fac9e6387ffa239746d0913f4f7228f8b/src/assets/img/head/boy.png -------------------------------------------------------------------------------- /src/assets/img/head/demo_head.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qianbin01/lagou_vue/8f90eb1fac9e6387ffa239746d0913f4f7228f8b/src/assets/img/head/demo_head.png -------------------------------------------------------------------------------- /src/assets/img/head/girl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qianbin01/lagou_vue/8f90eb1fac9e6387ffa239746d0913f4f7228f8b/src/assets/img/head/girl.png -------------------------------------------------------------------------------- /src/assets/img/home/article.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qianbin01/lagou_vue/8f90eb1fac9e6387ffa239746d0913f4f7228f8b/src/assets/img/home/article.png -------------------------------------------------------------------------------- /src/assets/img/home/article_click.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qianbin01/lagou_vue/8f90eb1fac9e6387ffa239746d0913f4f7228f8b/src/assets/img/home/article_click.png -------------------------------------------------------------------------------- /src/assets/img/home/company.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qianbin01/lagou_vue/8f90eb1fac9e6387ffa239746d0913f4f7228f8b/src/assets/img/home/company.png -------------------------------------------------------------------------------- /src/assets/img/home/company_click.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qianbin01/lagou_vue/8f90eb1fac9e6387ffa239746d0913f4f7228f8b/src/assets/img/home/company_click.png -------------------------------------------------------------------------------- /src/assets/img/home/flash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qianbin01/lagou_vue/8f90eb1fac9e6387ffa239746d0913f4f7228f8b/src/assets/img/home/flash.png -------------------------------------------------------------------------------- /src/assets/img/home/home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qianbin01/lagou_vue/8f90eb1fac9e6387ffa239746d0913f4f7228f8b/src/assets/img/home/home.png -------------------------------------------------------------------------------- /src/assets/img/home/home_click.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qianbin01/lagou_vue/8f90eb1fac9e6387ffa239746d0913f4f7228f8b/src/assets/img/home/home_click.png -------------------------------------------------------------------------------- /src/assets/img/home/hot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qianbin01/lagou_vue/8f90eb1fac9e6387ffa239746d0913f4f7228f8b/src/assets/img/home/hot.png -------------------------------------------------------------------------------- /src/assets/img/home/middle_one.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qianbin01/lagou_vue/8f90eb1fac9e6387ffa239746d0913f4f7228f8b/src/assets/img/home/middle_one.png -------------------------------------------------------------------------------- /src/assets/img/home/middle_three.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qianbin01/lagou_vue/8f90eb1fac9e6387ffa239746d0913f4f7228f8b/src/assets/img/home/middle_three.png -------------------------------------------------------------------------------- /src/assets/img/home/middle_two.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qianbin01/lagou_vue/8f90eb1fac9e6387ffa239746d0913f4f7228f8b/src/assets/img/home/middle_two.png -------------------------------------------------------------------------------- /src/assets/img/home/mine.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qianbin01/lagou_vue/8f90eb1fac9e6387ffa239746d0913f4f7228f8b/src/assets/img/home/mine.png -------------------------------------------------------------------------------- /src/assets/img/home/mine_click.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qianbin01/lagou_vue/8f90eb1fac9e6387ffa239746d0913f4f7228f8b/src/assets/img/home/mine_click.png -------------------------------------------------------------------------------- /src/assets/img/home/salary.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qianbin01/lagou_vue/8f90eb1fac9e6387ffa239746d0913f4f7228f8b/src/assets/img/home/salary.png -------------------------------------------------------------------------------- /src/assets/img/like/like.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qianbin01/lagou_vue/8f90eb1fac9e6387ffa239746d0913f4f7228f8b/src/assets/img/like/like.png -------------------------------------------------------------------------------- /src/assets/img/like/like_yes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qianbin01/lagou_vue/8f90eb1fac9e6387ffa239746d0913f4f7228f8b/src/assets/img/like/like_yes.png -------------------------------------------------------------------------------- /src/assets/img/like/message.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qianbin01/lagou_vue/8f90eb1fac9e6387ffa239746d0913f4f7228f8b/src/assets/img/like/message.png -------------------------------------------------------------------------------- /src/assets/img/loading/loading.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qianbin01/lagou_vue/8f90eb1fac9e6387ffa239746d0913f4f7228f8b/src/assets/img/loading/loading.png -------------------------------------------------------------------------------- /src/assets/img/loading/welcome1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qianbin01/lagou_vue/8f90eb1fac9e6387ffa239746d0913f4f7228f8b/src/assets/img/loading/welcome1.png -------------------------------------------------------------------------------- /src/assets/img/loading/welcome2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qianbin01/lagou_vue/8f90eb1fac9e6387ffa239746d0913f4f7228f8b/src/assets/img/loading/welcome2.png -------------------------------------------------------------------------------- /src/assets/img/loading/welcome3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qianbin01/lagou_vue/8f90eb1fac9e6387ffa239746d0913f4f7228f8b/src/assets/img/loading/welcome3.png -------------------------------------------------------------------------------- /src/assets/img/mine/box.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qianbin01/lagou_vue/8f90eb1fac9e6387ffa239746d0913f4f7228f8b/src/assets/img/mine/box.jpg -------------------------------------------------------------------------------- /src/assets/img/mine/cc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qianbin01/lagou_vue/8f90eb1fac9e6387ffa239746d0913f4f7228f8b/src/assets/img/mine/cc.png -------------------------------------------------------------------------------- /src/assets/img/mine/collect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qianbin01/lagou_vue/8f90eb1fac9e6387ffa239746d0913f4f7228f8b/src/assets/img/mine/collect.png -------------------------------------------------------------------------------- /src/assets/img/mine/edit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qianbin01/lagou_vue/8f90eb1fac9e6387ffa239746d0913f4f7228f8b/src/assets/img/mine/edit.png -------------------------------------------------------------------------------- /src/assets/img/mine/feedback.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qianbin01/lagou_vue/8f90eb1fac9e6387ffa239746d0913f4f7228f8b/src/assets/img/mine/feedback.png -------------------------------------------------------------------------------- /src/assets/img/mine/info.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qianbin01/lagou_vue/8f90eb1fac9e6387ffa239746d0913f4f7228f8b/src/assets/img/mine/info.png -------------------------------------------------------------------------------- /src/assets/img/mine/like_company.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qianbin01/lagou_vue/8f90eb1fac9e6387ffa239746d0913f4f7228f8b/src/assets/img/mine/like_company.png -------------------------------------------------------------------------------- /src/assets/img/mine/resume.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qianbin01/lagou_vue/8f90eb1fac9e6387ffa239746d0913f4f7228f8b/src/assets/img/mine/resume.png -------------------------------------------------------------------------------- /src/assets/img/mine/resume_bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qianbin01/lagou_vue/8f90eb1fac9e6387ffa239746d0913f4f7228f8b/src/assets/img/mine/resume_bg.jpg -------------------------------------------------------------------------------- /src/assets/img/mine/secret.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qianbin01/lagou_vue/8f90eb1fac9e6387ffa239746d0913f4f7228f8b/src/assets/img/mine/secret.png -------------------------------------------------------------------------------- /src/assets/img/mine/setting.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qianbin01/lagou_vue/8f90eb1fac9e6387ffa239746d0913f4f7228f8b/src/assets/img/mine/setting.png -------------------------------------------------------------------------------- /src/assets/img/mine/star.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qianbin01/lagou_vue/8f90eb1fac9e6387ffa239746d0913f4f7228f8b/src/assets/img/mine/star.png -------------------------------------------------------------------------------- /src/assets/img/mine/want.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qianbin01/lagou_vue/8f90eb1fac9e6387ffa239746d0913f4f7228f8b/src/assets/img/mine/want.png -------------------------------------------------------------------------------- /src/assets/img/mine/wantwhat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qianbin01/lagou_vue/8f90eb1fac9e6387ffa239746d0913f4f7228f8b/src/assets/img/mine/wantwhat.png -------------------------------------------------------------------------------- /src/assets/img/notFound.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qianbin01/lagou_vue/8f90eb1fac9e6387ffa239746d0913f4f7228f8b/src/assets/img/notFound.png -------------------------------------------------------------------------------- /src/assets/img/search/close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qianbin01/lagou_vue/8f90eb1fac9e6387ffa239746d0913f4f7228f8b/src/assets/img/search/close.png -------------------------------------------------------------------------------- /src/assets/img/search/mine.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qianbin01/lagou_vue/8f90eb1fac9e6387ffa239746d0913f4f7228f8b/src/assets/img/search/mine.png -------------------------------------------------------------------------------- /src/assets/img/search/scan.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qianbin01/lagou_vue/8f90eb1fac9e6387ffa239746d0913f4f7228f8b/src/assets/img/search/scan.png -------------------------------------------------------------------------------- /src/assets/img/search/search.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qianbin01/lagou_vue/8f90eb1fac9e6387ffa239746d0913f4f7228f8b/src/assets/img/search/search.png -------------------------------------------------------------------------------- /src/assets/img/search/star.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qianbin01/lagou_vue/8f90eb1fac9e6387ffa239746d0913f4f7228f8b/src/assets/img/search/star.png -------------------------------------------------------------------------------- /src/assets/img/search/trash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qianbin01/lagou_vue/8f90eb1fac9e6387ffa239746d0913f4f7228f8b/src/assets/img/search/trash.png -------------------------------------------------------------------------------- /src/assets/img/sort/default_sort.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qianbin01/lagou_vue/8f90eb1fac9e6387ffa239746d0913f4f7228f8b/src/assets/img/sort/default_sort.png -------------------------------------------------------------------------------- /src/assets/img/sort/time_sort.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qianbin01/lagou_vue/8f90eb1fac9e6387ffa239746d0913f4f7228f8b/src/assets/img/sort/time_sort.png -------------------------------------------------------------------------------- /src/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qianbin01/lagou_vue/8f90eb1fac9e6387ffa239746d0913f4f7228f8b/src/assets/logo.png -------------------------------------------------------------------------------- /src/components/PullToRefresh.vue: -------------------------------------------------------------------------------- 1 | 13 | 14 | 178 | 192 | -------------------------------------------------------------------------------- /src/components/banner.vue: -------------------------------------------------------------------------------- 1 | 13 | 14 | 58 | 86 | -------------------------------------------------------------------------------- /src/components/bottom.vue: -------------------------------------------------------------------------------- 1 | 18 | 19 | 83 | 133 | -------------------------------------------------------------------------------- /src/components/mHeader.vue: -------------------------------------------------------------------------------- 1 | 30 | 31 | 79 | 129 | -------------------------------------------------------------------------------- /src/components/myPopUp.vue: -------------------------------------------------------------------------------- 1 | 30 | 31 | 53 | 54 | 141 | -------------------------------------------------------------------------------- /src/components/myRange.vue: -------------------------------------------------------------------------------- 1 | 38 | 39 | 122 | 180 | -------------------------------------------------------------------------------- /src/components/recruitItem.vue: -------------------------------------------------------------------------------- 1 | 59 | 60 | 95 | 203 | -------------------------------------------------------------------------------- /src/components/recruitList.vue: -------------------------------------------------------------------------------- 1 | 18 | 19 | 68 | 105 | -------------------------------------------------------------------------------- /src/components/searchBar.vue: -------------------------------------------------------------------------------- 1 | 61 | 62 | 127 | 230 | -------------------------------------------------------------------------------- /src/components/sortContainer.vue: -------------------------------------------------------------------------------- 1 | 91 | 92 | 147 | 223 | -------------------------------------------------------------------------------- /src/components/tabSwitch.vue: -------------------------------------------------------------------------------- 1 | 14 | 15 | 42 | 69 | -------------------------------------------------------------------------------- /src/config/index.js: -------------------------------------------------------------------------------- 1 | //配置文件 2 | import cties from './cityData' 3 | 4 | let config = { 5 | MOCK_ENABLE: true, 6 | BASE_API_HOST: '', 7 | FIRST_ENTER: localStorage.getItem('firstEnter'), 8 | GUESS_LIKE: [ 9 | 'web', 'java后端', '前端实习', 'html5前端', 'java实习', 'html5', '机器学习' 10 | ], 11 | HOT_COMPANY: [ 12 | '字节跳动', '腾讯', '美团点评', '网易', '京东集团', '百度', '爱奇艺', '阿里巴巴' 13 | ], 14 | TAGS: ['不限', '免费体检', '五险一金', '六险一金', '试用期上社保', '地铁周边', '免费下午茶', '加班补贴', '免费班车', '年底双薪', '定期团建', '前景好', '股票期权', 'mac办公'], 15 | HOT_CITIES: cties.HOT_CITIES, 16 | ALL_CITIES: cties.ALL_CITIES, 17 | } 18 | ; 19 | export default config 20 | 21 | 22 | -------------------------------------------------------------------------------- /src/data/index.js: -------------------------------------------------------------------------------- 1 | import Mock from 'mockjs'; 2 | import data from './mockData'; 3 | 4 | //mock数据加载 5 | Mock.mock('/api/company/list', data.company); 6 | Mock.mock('/api/topic/list', data.topic); 7 | Mock.mock('/api/article/list', data.article); 8 | Mock.mock('/api/recruit/list', data.recruit); 9 | Mock.mock('/api/location/get', data.location); 10 | Mock.mock('/api/news/list', data.news); 11 | Mock.mock('/api/news/single?nid=1', data.newsSingle); 12 | 13 | -------------------------------------------------------------------------------- /src/main.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import store from './store' 3 | import Mint, {DatetimePicker, MessageBox, Switch, Toast} from 'mint-ui'; 4 | import App from './App' 5 | import router from './router' 6 | import config from './config' 7 | import BaseApi from './api/BaseApi' 8 | import commonUtils from './utils/commonUtils' 9 | import 'swiper/dist/css/swiper.css'; 10 | import VueLazyload from 'vue-lazyload' 11 | 12 | Vue.component(DatetimePicker.name, DatetimePicker); 13 | Vue.component(Switch.name, Switch); 14 | if (config.MOCK_ENABLE) { 15 | require('./data');//加载mock 16 | } 17 | require('./style/my-mint.scss'); 18 | Vue.use(Mint); 19 | Vue.config.productionTip = false; 20 | Vue.prototype.BaseApi = BaseApi;//将BaseApi挂载在Vue中 21 | Vue.prototype.commonUtils = commonUtils;//将commonUtils挂载在Vue中 22 | Vue.prototype.$config = config;//将config挂载在Vue中 23 | Vue.prototype.$messageBox = MessageBox;//弹窗挂载 24 | Vue.prototype.$toast = Toast;//Toast挂载 25 | Vue.use(VueLazyload); 26 | 27 | new Vue({ 28 | el: '#app', 29 | router, 30 | store, 31 | components: {App}, 32 | template: '' 33 | }); 34 | 35 | 36 | -------------------------------------------------------------------------------- /src/router/index.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import Router from 'vue-router' 3 | 4 | const welcome = r => require.ensure([], () => r(require('../views/welcome')), 'welcome'); 5 | const register = r => require.ensure([], () => r(require('../views/register')), 'register'); 6 | const baseIndex = r => require.ensure([], () => r(require('../views/baseIndex')), 'baseIndex'); 7 | 8 | const home = r => require.ensure([], () => r(require('../views/home/home')), 'home'); 9 | const chooseLocation = r => require.ensure([], () => r(require('../views/home/chooseLocation')), 'chooseLocation'); 10 | const newsList = r => require.ensure([], () => r(require('../views/home/newsList')), 'newsList'); 11 | const newsDetail = r => require.ensure([], () => r(require('../views/home/newsDetail')), 'newsDetail'); 12 | const specialRecruit = r => require.ensure([], () => r(require('../views/home/specialRecruit')), 'specialRecruit'); 13 | const recruitDetailList = r => require.ensure([], () => r(require('../views/home/recruitDetailList')), 'recruitDetailList'); 14 | const recruitDetail = r => require.ensure([], () => r(require('../views/home/recruitDetail')), 'recruitDetail'); 15 | 16 | const company = r => require.ensure([], () => r(require('../views/company/company')), 'company'); 17 | const companyDetail = r => require.ensure([], () => r(require('../views/company/companyDetail')), 'companyDetail'); 18 | 19 | const articles = r => require.ensure([], () => r(require('../views/article/articles')), 'articles'); 20 | const articleMine = r => require.ensure([], () => r(require('../views/article/articleMine')), 'articleMine'); 21 | const editArticleMine = r => require.ensure([], () => r(require('../views/article/editArticleMine')), 'editArticleMine'); 22 | const topicSquare = r => require.ensure([], () => r(require('../views/article/topicSquare')), 'topicSquare'); 23 | const askDetail = r => require.ensure([], () => r(require('../views/article/askDetail')), 'askDetail'); 24 | 25 | const mine = r => require.ensure([], () => r(require('../views/mine/mine')), 'mine'); 26 | const resume = r => require.ensure([], () => r(require('../views/mine/resume')), 'resume'); 27 | const editResume = r => require.ensure([], () => r(require('../views/mine/editResume')), 'editResume'); 28 | const priviewResume = r => require.ensure([], () => r(require('../views/mine/priviewResume')), 'priviewResume'); 29 | const send = r => require.ensure([], () => r(require('../views/mine/send')), 'send'); 30 | const like = r => require.ensure([], () => r(require('../views/mine/like')), 'like'); 31 | const likeCompany = r => require.ensure([], () => r(require('../views/mine/likeCompany')), 'likeCompany'); 32 | const cc = r => require.ensure([], () => r(require('../views/mine/cc')), 'cc'); 33 | const likeRecruit = r => require.ensure([], () => r(require('../views/mine/likeRecruit')), 'likeRecruit'); 34 | const secretSetting = r => require.ensure([], () => r(require('../views/mine/secretSetting')), 'secretSetting'); 35 | const setting = r => require.ensure([], () => r(require('../views/mine/setting')), 'setting'); 36 | const wantAsk = r => require.ensure([], () => r(require('../views/mine/wantAsk')), 'wantAsk'); 37 | 38 | 39 | Vue.use(Router); 40 | 41 | export default new Router({ 42 | routes: [ 43 | { 44 | path: '/baseIndex', 45 | name: 'baseIndex', 46 | component: baseIndex, 47 | redirect: '/baseIndex/home', 48 | children: [ 49 | { 50 | path: '/baseIndex/home', 51 | name: 'home', 52 | component: home, 53 | }, 54 | { 55 | path: '/baseIndex/company', 56 | name: 'company', 57 | component: company, 58 | }, 59 | { 60 | path: '/baseIndex/articles', 61 | name: 'articles', 62 | component: articles, 63 | }, 64 | { 65 | path: '/baseIndex/mine', 66 | name: 'mine', 67 | component: mine, 68 | }, 69 | { 70 | path: '/baseIndex/recruitDetailList', 71 | name: 'recruitDetailList', 72 | component: recruitDetailList, 73 | }, 74 | ] 75 | }, 76 | { 77 | path: '/welcome', 78 | name: 'welcome', 79 | component: welcome, 80 | }, 81 | { 82 | path: '/register', 83 | name: 'register', 84 | component: register, 85 | }, 86 | { 87 | path: '/chooseLocation', 88 | name: 'chooseLocation', 89 | component: chooseLocation, 90 | meta: { 91 | direction: 'slide-left' 92 | } 93 | }, 94 | { 95 | path: '/newsList', 96 | name: 'newsList', 97 | component: newsList, 98 | meta: { 99 | direction: 'slide-left'//需要左滑动画的属性 100 | } 101 | }, 102 | { 103 | path: '/newsDetail', 104 | name: 'newsDetail', 105 | component: newsDetail, 106 | meta: { 107 | direction: 'slide-left' 108 | } 109 | }, 110 | { 111 | path: '/specialRecruit', 112 | name: 'specialRecruit', 113 | component: specialRecruit, 114 | meta: { 115 | direction: 'slide-left' 116 | } 117 | }, 118 | { 119 | path: '/recruit/recruitDetail', 120 | name: 'recruitDetail', 121 | component: recruitDetail, 122 | meta: { 123 | direction: 'slide-left' 124 | } 125 | }, 126 | { 127 | path: '/company/companyDetail', 128 | name: 'companyDetail', 129 | component: companyDetail, 130 | meta: { 131 | direction: 'slide-left' 132 | } 133 | }, 134 | { 135 | path: '/article/askDetail', 136 | name: 'askDetail', 137 | component: askDetail, 138 | meta: { 139 | direction: 'slide-left' 140 | } 141 | }, 142 | { 143 | path: '/article/articleMine', 144 | name: 'articleMine', 145 | component: articleMine, 146 | meta: { 147 | direction: 'slide-left' 148 | } 149 | }, 150 | { 151 | path: '/article/editArticleMine', 152 | name: 'editArticleMine', 153 | component: editArticleMine, 154 | meta: { 155 | direction: 'slide-left' 156 | } 157 | }, 158 | { 159 | path: '/article/topicSquare', 160 | name: 'topicSquare', 161 | component: topicSquare, 162 | meta: { 163 | direction: 'slide-left' 164 | } 165 | }, 166 | { 167 | path: '/mine/resume', 168 | name: 'resume', 169 | component: resume, 170 | meta: { 171 | direction: 'slide-left' 172 | } 173 | }, 174 | { 175 | path: '/mine/editResume', 176 | name: 'editResume', 177 | component: editResume, 178 | meta: { 179 | direction: 'slide-left' 180 | } 181 | }, 182 | { 183 | path: '/mine/send', 184 | name: 'send', 185 | component: send, 186 | meta: { 187 | direction: 'slide-left' 188 | } 189 | }, 190 | { 191 | path: '/mine/like', 192 | name: 'like', 193 | component: like, 194 | meta: { 195 | direction: 'slide-left' 196 | } 197 | }, 198 | { 199 | path: '/mine/likeCompany', 200 | name: 'likeCompany', 201 | component: likeCompany, 202 | meta: { 203 | direction: 'slide-left' 204 | } 205 | }, 206 | { 207 | path: '/mine/cc', 208 | name: 'cc', 209 | component: cc, 210 | meta: { 211 | direction: 'slide-left' 212 | } 213 | }, 214 | { 215 | path: '/mine/priviewResume', 216 | name: 'priviewResume', 217 | component: priviewResume, 218 | meta: { 219 | direction: 'slide-left' 220 | } 221 | }, 222 | { 223 | path: '/mine/likeRecruit', 224 | name: 'likeRecruit', 225 | component: likeRecruit, 226 | meta: { 227 | direction: 'slide-left' 228 | } 229 | }, 230 | { 231 | path: '/mine/secretSetting', 232 | name: 'secretSetting', 233 | component: secretSetting, 234 | meta: { 235 | direction: 'slide-left' 236 | } 237 | }, 238 | { 239 | path: '/mine/setting', 240 | name: 'setting', 241 | component: setting, 242 | meta: { 243 | direction: 'slide-left' 244 | } 245 | }, 246 | { 247 | path: '/mine/wantAsk', 248 | name: 'wantAsk', 249 | component: wantAsk, 250 | meta: { 251 | direction: 'slide-left' 252 | } 253 | }, 254 | { 255 | path: '*', 256 | component: welcome, 257 | } 258 | ] 259 | }) 260 | -------------------------------------------------------------------------------- /src/store/index.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import vuex from 'vuex' 3 | 4 | Vue.use(vuex); 5 | export default new vuex.Store({ 6 | state: { 7 | recruitSearch: false, //是否进行职位搜索标识 8 | pullRefreshTopHeight: 0,//下拉组件中header高度 9 | bottomShow: true,//滑动过程中底部隐藏 10 | searchValue: ''//搜索框当前值 11 | }, 12 | mutations: { 13 | switchRecruitSearchTrue(state) {//这里的state对应着上面这个state 14 | state.recruitSearch = true; 15 | }, 16 | switchRecruitSearchFalse(state) { 17 | state.recruitSearch = false; 18 | }, 19 | bottomShowTrue(state) { 20 | state.bottomShow = true; 21 | }, 22 | bottomShowFalse(state) { 23 | state.bottomShow = false; 24 | }, 25 | setPullRefreshTopHeight(state, height) { 26 | state.pullRefreshTopHeight = height; 27 | }, 28 | setSearchValue(state, value) { 29 | state.searchValue = value; 30 | } 31 | }, 32 | modules: {}, 33 | }) 34 | -------------------------------------------------------------------------------- /src/style/mixin.scss: -------------------------------------------------------------------------------- 1 | $themeColor: #11A983; 2 | $themeFontColor: #dedede; 3 | $themeSecondColor: #eeeeef; 4 | 5 | $baseFontSize: 75; 6 | // 背景图片地址和大小 7 | @mixin bgConfig($url) { 8 | background: url($url) no-repeat; 9 | background-size: 100% 100%; 10 | } 11 | 12 | //定位全屏 13 | @mixin allCover { 14 | width: 100%; 15 | height: 100%; 16 | position: absolute; 17 | top: 0; 18 | right: 0; 19 | } 20 | 21 | //根据宽高定位上下左右居中 22 | @mixin locInCenterByWH($width,$height) { 23 | position: absolute; 24 | top: 50%; 25 | left: 50%; 26 | margin-top: -$height/2; 27 | margin-left: -$width/2; 28 | } 29 | 30 | //transform上下左右居中 31 | @mixin locInCenter { 32 | position: absolute; 33 | top: 50%; 34 | left: 50%; 35 | transform: translate(-50%, -50%); 36 | } 37 | 38 | //定位上下居中 39 | @mixin locInVCenter { 40 | position: absolute; 41 | top: 50%; 42 | transform: translateY(-50%); 43 | } 44 | 45 | //定位左右居中 46 | @mixin locInHCenter { 47 | position: absolute; 48 | left: 50%; 49 | transform: translateX(-50%); 50 | } 51 | 52 | //用sass计算从px到rem的转换 53 | @mixin px2rem($name, $px) { 54 | #{$name}: $px / $baseFontSize * 1rem; 55 | } 56 | 57 | 58 | -------------------------------------------------------------------------------- /src/style/my-mint.scss: -------------------------------------------------------------------------------- 1 | /* 覆盖mint-ui的primary颜色,改为自己UI的主题色 */ 2 | $color-primary: #11A983; 3 | 4 | .mint-header { 5 | background-color: $color-primary; 6 | } 7 | 8 | .mint-button:not(.is-disabled):active::after { 9 | opacity: .2 /* .6 */ 10 | } 11 | 12 | .mint-button--primary { 13 | background-color: $color-primary; 14 | } 15 | 16 | .mint-button--primary.is-plain { 17 | border: 1px solid $color-primary; 18 | color: $color-primary 19 | } 20 | 21 | .mint-badge.is-primary { 22 | background-color: $color-primary 23 | } 24 | 25 | .mint-switch-input:checked + .mint-switch-core { 26 | border-color: $color-primary; 27 | background-color: $color-primary; 28 | } 29 | 30 | .mint-navbar .mint-tab-item.is-selected { 31 | border-bottom: 3px solid $color-primary; 32 | color: $color-primary; 33 | } 34 | 35 | .mint-tabbar > .mint-tab-item.is-selected { 36 | color: $color-primary; 37 | } 38 | 39 | .mint-searchbar-cancel { 40 | color: $color-primary; 41 | } 42 | 43 | .mint-checkbox-input:checked + .mint-checkbox-core { 44 | background-color: $color-primary; 45 | border-color: $color-primary; 46 | } 47 | 48 | .mint-radio-input:checked + .mint-radio-core { 49 | background-color: $color-primary; 50 | border-color: $color-primary; 51 | } 52 | 53 | .mt-range-progress { 54 | background-color: $color-primary; 55 | } 56 | 57 | .mt-progress-progress { 58 | background-color: $color-primary; 59 | } 60 | 61 | .mint-msgbox-confirm { 62 | color: $color-primary; 63 | } 64 | 65 | .mint-msgbox-confirm:active { 66 | color: $color-primary; 67 | } 68 | 69 | .mint-datetime-action { 70 | color: $color-primary; 71 | } 72 | -------------------------------------------------------------------------------- /src/utils/commonUtils.js: -------------------------------------------------------------------------------- 1 | import html2canvas from "html2canvas"; 2 | import JsPDF from 'jspdf' 3 | // 存储localStorage 4 | const setStore = (name, content) => { 5 | if (!name) return; 6 | if (typeof content !== 'string') { 7 | content = JSON.stringify(content); 8 | } 9 | window.localStorage.setItem(name, content); 10 | }; 11 | // 读取localStorage 12 | const getStore = name => { 13 | if (!name) return; 14 | return window.localStorage.getItem(name); 15 | }; 16 | //删除localStorage 17 | const removeStore = name => { 18 | if (!name) return; 19 | window.localStorage.removeItem(name); 20 | }; 21 | export const getStyle = (element, attr, NumberMode = 'int') => { 22 | let target; 23 | // scrollTop 获取方式不同,没有它不属于style,而且只有document.body才能用 24 | if (attr === 'scrollTop') { 25 | target = element.scrollTop; 26 | } else if (element.currentStyle) { 27 | target = element.currentStyle[attr]; 28 | } else { 29 | target = document.defaultView.getComputedStyle(element, null)[attr]; 30 | } 31 | //在获取 opactiy 时需要获取小数 parseFloat 32 | return NumberMode === 'float' ? parseFloat(target) : parseInt(target); 33 | }; 34 | //判断是否为手机 35 | export const isPhone = () => { 36 | return (/Android|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent)); 37 | }; 38 | 39 | export const generateResume = (el, name) => { 40 | html2canvas(el).then((canvas) => { 41 | let contentWidth = canvas.width; 42 | let contentHeight = canvas.height; 43 | //一页pdf显示html页面生成的canvas高度; 44 | let pageHeight = contentWidth / 592.28 * 841.89; 45 | //未生成pdf的html页面高度 46 | let leftHeight = contentHeight; 47 | //页面偏移 48 | let position = 0; 49 | //a4纸的尺寸[595.28,841.89],html页面生成的canvas在pdf中图片的宽高 50 | let imgWidth = 595.28; 51 | let imgHeight = 592.28 / contentWidth * contentHeight; 52 | let pageData = canvas.toDataURL('image/jpeg', 1.0); 53 | let pdf = new JsPDF('', 'pt', 'a4'); 54 | //有两个高度需要区分,一个是html页面的实际高度,和生成pdf的页面高度(841.89) 55 | //当内容未超过pdf一页显示的范围,无需分页 56 | if (leftHeight < pageHeight) { 57 | pdf.addImage(pageData, 'JPEG', 0, 0, imgWidth, imgHeight); 58 | } else { 59 | while (leftHeight > 0) { 60 | //arg3-->距离左边距;arg4-->距离上边距;arg5-->宽度;arg6-->高度 61 | pdf.addImage(pageData, 'JPEG', 0, position, imgWidth, imgHeight); 62 | leftHeight -= pageHeight; 63 | position -= 841.89; 64 | //避免添加空白页 65 | if (leftHeight > 0) { 66 | //添加新页 67 | pdf.addPage(); 68 | } 69 | } 70 | } 71 | pdf.save(`${name}.pdf`); 72 | }); 73 | }; 74 | 75 | const commonMethods = { 76 | getStyle: getStyle, 77 | isPhone: isPhone, 78 | setStore: setStore, 79 | getStore: getStore, 80 | removeStore: removeStore, 81 | generateResume: generateResume, 82 | }; 83 | export default commonMethods; 84 | -------------------------------------------------------------------------------- /src/utils/mixin.js: -------------------------------------------------------------------------------- 1 | export const mixin = { 2 | data() { 3 | return {}; 4 | }, 5 | computed: {}, 6 | methods: {}, 7 | directives: { 8 | 'load-more': { 9 | bind: (el, binding) => { 10 | el.addEventListener('scroll', () => { 11 | let scrollHeight = el.scrollHeight; 12 | let scrollTop = el.scrollTop; 13 | let height = el.clientHeight; 14 | if (scrollTop + height >= scrollHeight - 3) { 15 | binding.value(); 16 | } 17 | }, false); 18 | } 19 | } 20 | } 21 | }; 22 | -------------------------------------------------------------------------------- /src/views/article/articleMine.vue: -------------------------------------------------------------------------------- 1 | 103 | 104 | 117 | 202 | -------------------------------------------------------------------------------- /src/views/article/articles.vue: -------------------------------------------------------------------------------- 1 | 78 | 79 | 124 | 277 | -------------------------------------------------------------------------------- /src/views/article/askDetail.vue: -------------------------------------------------------------------------------- 1 | 115 | 116 | 136 | 243 | -------------------------------------------------------------------------------- /src/views/article/editArticleMine.vue: -------------------------------------------------------------------------------- 1 | 72 | 73 | 102 | 164 | -------------------------------------------------------------------------------- /src/views/baseIndex.vue: -------------------------------------------------------------------------------- 1 | 9 | 10 | 27 | 36 | -------------------------------------------------------------------------------- /src/views/company/company.vue: -------------------------------------------------------------------------------- 1 | 56 | 57 | 124 | 242 | -------------------------------------------------------------------------------- /src/views/company/companyDetail.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 20 | 23 | -------------------------------------------------------------------------------- /src/views/home/chooseLocation.vue: -------------------------------------------------------------------------------- 1 | 28 | 29 | 120 | 181 | -------------------------------------------------------------------------------- /src/views/home/newsDetail.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 27 | 30 | -------------------------------------------------------------------------------- /src/views/home/newsList.vue: -------------------------------------------------------------------------------- 1 | 28 | 29 | 72 | 134 | -------------------------------------------------------------------------------- /src/views/home/recruitDetail.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 20 | 23 | -------------------------------------------------------------------------------- /src/views/home/specialRecruit.vue: -------------------------------------------------------------------------------- 1 | 32 | 33 | 94 | 142 | -------------------------------------------------------------------------------- /src/views/mine/cc.vue: -------------------------------------------------------------------------------- 1 | 15 | 16 | 26 | 27 | 45 | -------------------------------------------------------------------------------- /src/views/mine/like.vue: -------------------------------------------------------------------------------- 1 | 17 | 18 | 28 | 29 | 51 | -------------------------------------------------------------------------------- /src/views/mine/likeCompany.vue: -------------------------------------------------------------------------------- 1 | 15 | 16 | 26 | 27 | 49 | -------------------------------------------------------------------------------- /src/views/mine/likeRecruit.vue: -------------------------------------------------------------------------------- 1 | 59 | 60 | 96 | 97 | 210 | -------------------------------------------------------------------------------- /src/views/mine/mine.vue: -------------------------------------------------------------------------------- 1 | 90 | 91 | 104 | 194 | -------------------------------------------------------------------------------- /src/views/mine/priviewResume.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 19 | 20 | 25 | -------------------------------------------------------------------------------- /src/views/mine/resume.vue: -------------------------------------------------------------------------------- 1 | 22 | 23 | 33 | 34 | 70 | -------------------------------------------------------------------------------- /src/views/mine/secretSetting.vue: -------------------------------------------------------------------------------- 1 | 76 | 77 | 96 | 97 | 238 | -------------------------------------------------------------------------------- /src/views/mine/send.vue: -------------------------------------------------------------------------------- 1 | 23 | 24 | 44 | 45 | 75 | -------------------------------------------------------------------------------- /src/views/mine/setting.vue: -------------------------------------------------------------------------------- 1 | 30 | 31 | 74 | 75 | 128 | -------------------------------------------------------------------------------- /src/views/mine/wantAsk.vue: -------------------------------------------------------------------------------- 1 | 46 | 47 | 111 | 112 | 154 | -------------------------------------------------------------------------------- /src/views/register.vue: -------------------------------------------------------------------------------- 1 | 37 | 38 | 151 | 232 | -------------------------------------------------------------------------------- /src/views/welcome.vue: -------------------------------------------------------------------------------- 1 | 15 | 16 | 70 | 92 | -------------------------------------------------------------------------------- /static/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qianbin01/lagou_vue/8f90eb1fac9e6387ffa239746d0913f4f7228f8b/static/.gitkeep --------------------------------------------------------------------------------