作者 lihongjuan

1.1

正在显示 100 个修改的文件 包含 1723 行增加0 行删除

要显示太多修改。

为保证性能只显示 100 of 100+ 个文件。

{
"presets": [
["env", {
"modules": false,
"targets": {
"browsers": ["> 1%", "last 2 versions", "not ie <= 8"]
}
}],
"stage-2"
],
"plugins": ["transform-vue-jsx", "transform-runtime"]
}
... ...
root = true
[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
... ...
.DS_Store
node_modules/
/dist/
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
... ...
// https://github.com/michael-ciniawsky/postcss-load-config
module.exports = {
"plugins": {
"postcss-import": {},
"postcss-url": {},
// to edit target browsers: use "browserslist" field in package.json
"autoprefixer": {}
}
}
... ...
# school
> A Vue.js project
## Build Setup
``` bash
# install dependencies
npm install
# serve with hot reload at localhost:8080
npm run dev
# build for production with minification
npm run build
# build for production and view the bundle analyzer report
npm run build --report
```
For a detailed explanation on how things work, check out the [guide](http://vuejs-templates.github.io/webpack/) and [docs for vue-loader](http://vuejs.github.io/vue-loader).
... ...
'use strict'
require('./check-versions')()
process.env.NODE_ENV = 'production'
const ora = require('ora')
const rm = require('rimraf')
const path = require('path')
const chalk = require('chalk')
const webpack = require('webpack')
const config = require('../config')
const webpackConfig = require('./webpack.prod.conf')
const spinner = ora('building for production...')
spinner.start()
rm(path.join(config.build.assetsRoot, config.build.assetsSubDirectory), err => {
if (err) throw err
webpack(webpackConfig, (err, stats) => {
spinner.stop()
if (err) throw err
process.stdout.write(stats.toString({
colors: true,
modules: false,
children: false, // If you are using ts-loader, setting this to true will make TypeScript errors show up during build.
chunks: false,
chunkModules: false
}) + '\n\n')
if (stats.hasErrors()) {
console.log(chalk.red(' Build failed with errors.\n'))
process.exit(1)
}
console.log(chalk.cyan(' Build complete.\n'))
console.log(chalk.yellow(
' Tip: built files are meant to be served over an HTTP server.\n' +
' Opening index.html over file:// won\'t work.\n'
))
})
})
... ...
'use strict'
const chalk = require('chalk')
const semver = require('semver')
const packageConfig = require('../package.json')
const shell = require('shelljs')
function exec (cmd) {
return require('child_process').execSync(cmd).toString().trim()
}
const versionRequirements = [
{
name: 'node',
currentVersion: semver.clean(process.version),
versionRequirement: packageConfig.engines.node
}
]
if (shell.which('npm')) {
versionRequirements.push({
name: 'npm',
currentVersion: exec('npm --version'),
versionRequirement: packageConfig.engines.npm
})
}
module.exports = function () {
const warnings = []
for (let i = 0; i < versionRequirements.length; i++) {
const mod = versionRequirements[i]
if (!semver.satisfies(mod.currentVersion, mod.versionRequirement)) {
warnings.push(mod.name + ': ' +
chalk.red(mod.currentVersion) + ' should be ' +
chalk.green(mod.versionRequirement)
)
}
}
if (warnings.length) {
console.log('')
console.log(chalk.yellow('To use this template, you must update following to modules:'))
console.log()
for (let i = 0; i < warnings.length; i++) {
const warning = warnings[i]
console.log(' ' + warning)
}
console.log()
process.exit(1)
}
}
... ...
'use strict'
const path = require('path')
const config = require('../config')
const ExtractTextPlugin = require('extract-text-webpack-plugin')
const packageConfig = require('../package.json')
exports.assetsPath = function(_path) {
const assetsSubDirectory = process.env.NODE_ENV === 'production' ?
config.build.assetsSubDirectory :
config.dev.assetsSubDirectory
return path.posix.join(assetsSubDirectory, _path)
}
exports.cssLoaders = function(options) {
options = options || {}
const cssLoader = {
loader: 'css-loader',
options: {
sourceMap: options.sourceMap
}
}
const postcssLoader = {
loader: 'postcss-loader',
options: {
sourceMap: options.sourceMap
}
}
// generate loader string to be used with extract text plugin
function generateLoaders(loader, loaderOptions) {
const loaders = options.usePostCSS ? [cssLoader, postcssLoader] : [cssLoader]
if (loader) {
loaders.push({
loader: loader + '-loader',
options: Object.assign({}, loaderOptions, {
sourceMap: options.sourceMap
})
})
}
// Extract CSS when that option is specified
// (which is the case during production build)
if (options.extract) {
return ExtractTextPlugin.extract({
use: loaders,
fallback: 'vue-style-loader',
// publicPath: '../../'
})
} else {
return ['vue-style-loader'].concat(loaders)
}
}
// https://vue-loader.vuejs.org/en/configurations/extract-css.html
return {
css: generateLoaders(),
postcss: generateLoaders(),
less: generateLoaders('less'),
sass: generateLoaders('sass', { indentedSyntax: true }),
scss: generateLoaders('sass'),
stylus: generateLoaders('stylus'),
styl: generateLoaders('stylus')
}
}
// Generate loaders for standalone style files (outside of .vue)
exports.styleLoaders = function(options) {
const output = []
const loaders = exports.cssLoaders(options)
for (const extension in loaders) {
const loader = loaders[extension]
output.push({
test: new RegExp('\\.' + extension + '$'),
use: loader
})
}
return output
}
exports.createNotifierCallback = () => {
const notifier = require('node-notifier')
return (severity, errors) => {
if (severity !== 'error') return
const error = errors[0]
const filename = error.file && error.file.split('!').pop()
notifier.notify({
title: packageConfig.name,
message: severity + ': ' + error.name,
subtitle: filename || '',
icon: path.join(__dirname, 'logo.png')
})
}
}
\ No newline at end of file
... ...
'use strict'
const utils = require('./utils')
const config = require('../config')
const isProduction = process.env.NODE_ENV === 'production'
const sourceMapEnabled = isProduction
? config.build.productionSourceMap
: config.dev.cssSourceMap
module.exports = {
loaders: utils.cssLoaders({
sourceMap: sourceMapEnabled,
extract: isProduction
}),
cssSourceMap: sourceMapEnabled,
cacheBusting: config.dev.cacheBusting,
transformToRequire: {
video: ['src', 'poster'],
source: 'src',
img: 'src',
image: 'xlink:href'
}
}
... ...
'use strict'
const path = require('path')
const utils = require('./utils')
const config = require('../config')
const vueLoaderConfig = require('./vue-loader.conf')
function resolve(dir) {
return path.join(__dirname, '..', dir)
}
module.exports = {
context: path.resolve(__dirname, '../'),
entry: {
app: ['babel-polyfill', './src/main.js']
},
output: {
path: config.build.assetsRoot,
filename: '[name].js',
publicPath: process.env.NODE_ENV === 'production' ?
config.build.assetsPublicPath : config.dev.assetsPublicPath
},
resolve: {
extensions: ['.js', '.vue', '.json'],
alias: {
'@': resolve('src'),
}
},
module: {
rules: [{
test: /\.vue$/,
loader: 'vue-loader',
options: vueLoaderConfig
},
{
test: /\.js$/,
loader: 'babel-loader',
include: [resolve('src'), resolve('test'), resolve('node_modules/webpack-dev-server/client')]
},
{
test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
loader: 'url-loader',
options: {
limit: 10000,
name: utils.assetsPath('img/[name].[hash:7].[ext]')
}
},
{
test: /\.(mp4|webm|ogg|mp3|wav|flac|aac)(\?.*)?$/,
loader: 'url-loader',
options: {
limit: 10000,
name: utils.assetsPath('media/[name].[hash:7].[ext]')
}
},
{
test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
loader: 'url-loader',
options: {
limit: 10000,
name: utils.assetsPath('fonts/[name].[hash:7].[ext]')
}
}
]
},
node: {
// prevent webpack from injecting useless setImmediate polyfill because Vue
// source contains it (although only uses it if it's native).
setImmediate: false,
// prevent webpack from injecting mocks to Node native modules
// that does not make sense for the client
dgram: 'empty',
fs: 'empty',
net: 'empty',
tls: 'empty',
child_process: 'empty'
}
}
\ No newline at end of file
... ...
'use strict'
const utils = require('./utils')
const webpack = require('webpack')
const config = require('../config')
const merge = require('webpack-merge')
const path = require('path')
const baseWebpackConfig = require('./webpack.base.conf')
const CopyWebpackPlugin = require('copy-webpack-plugin')
const HtmlWebpackPlugin = require('html-webpack-plugin')
const FriendlyErrorsPlugin = require('friendly-errors-webpack-plugin')
const portfinder = require('portfinder')
const HOST = process.env.HOST
const PORT = process.env.PORT && Number(process.env.PORT)
const devWebpackConfig = merge(baseWebpackConfig, {
module: {
rules: utils.styleLoaders({ sourceMap: config.dev.cssSourceMap, usePostCSS: true })
},
// cheap-module-eval-source-map is faster for development
devtool: config.dev.devtool,
// these devServer options should be customized in /config/index.js
devServer: {
clientLogLevel: 'warning',
historyApiFallback: {
rewrites: [
{ from: /.*/, to: path.posix.join(config.dev.assetsPublicPath, 'index.html') },
],
},
hot: true,
contentBase: false, // since we use CopyWebpackPlugin.
compress: true,
host: HOST || config.dev.host,
port: PORT || config.dev.port,
open: config.dev.autoOpenBrowser,
overlay: config.dev.errorOverlay ?
{ warnings: false, errors: true } :
false,
publicPath: config.dev.assetsPublicPath,
proxy: config.dev.proxyTable,
quiet: true, // necessary for FriendlyErrorsPlugin
watchOptions: {
poll: config.dev.poll,
}
},
plugins: [
new webpack.DefinePlugin({
'process.env': require('../config/dev.env')
}),
new webpack.HotModuleReplacementPlugin(),
new webpack.NamedModulesPlugin(), // HMR shows correct file names in console on update.
new webpack.NoEmitOnErrorsPlugin(),
// https://github.com/ampedandwired/html-webpack-plugin
new HtmlWebpackPlugin({
filename: 'index.html',
template: 'index.html',
inject: true,
favicon: path.resolve(__dirname, '../static/favicon.ico')
}),
// copy custom static assets
new CopyWebpackPlugin([{
from: path.resolve(__dirname, '../static'),
to: config.dev.assetsSubDirectory,
ignore: ['.*']
}])
]
})
module.exports = new Promise((resolve, reject) => {
portfinder.basePort = process.env.PORT || config.dev.port
portfinder.getPort((err, port) => {
if (err) {
reject(err)
} else {
// publish the new Port, necessary for e2e tests
process.env.PORT = port
// add port to devServer config
devWebpackConfig.devServer.port = port
// Add FriendlyErrorsPlugin
devWebpackConfig.plugins.push(new FriendlyErrorsPlugin({
compilationSuccessInfo: {
messages: [`Your application is running here: http://${devWebpackConfig.devServer.host}:${port}`],
},
onErrors: config.dev.notifyOnErrors ?
utils.createNotifierCallback() :
undefined
}))
resolve(devWebpackConfig)
}
})
})
\ No newline at end of file
... ...
'use strict'
const path = require('path')
const utils = require('./utils')
const webpack = require('webpack')
const config = require('../config')
const merge = require('webpack-merge')
const baseWebpackConfig = require('./webpack.base.conf')
const CopyWebpackPlugin = require('copy-webpack-plugin')
const HtmlWebpackPlugin = require('html-webpack-plugin')
const ExtractTextPlugin = require('extract-text-webpack-plugin')
const OptimizeCSSPlugin = require('optimize-css-assets-webpack-plugin')
const UglifyJsPlugin = require('uglifyjs-webpack-plugin')
const env = require('../config/prod.env')
const webpackConfig = merge(baseWebpackConfig, {
module: {
rules: utils.styleLoaders({
sourceMap: config.build.productionSourceMap,
extract: true,
usePostCSS: true
})
},
devtool: config.build.productionSourceMap ? config.build.devtool : false,
output: {
path: config.build.assetsRoot,
filename: utils.assetsPath('js/[name].[chunkhash].js'),
chunkFilename: utils.assetsPath('js/[id].[chunkhash].js')
},
plugins: [
// http://vuejs.github.io/vue-loader/en/workflow/production.html
new webpack.DefinePlugin({
'process.env': env
}),
new UglifyJsPlugin({
uglifyOptions: {
compress: {
warnings: false
}
},
sourceMap: config.build.productionSourceMap,
parallel: true
}),
// extract css into its own file
new ExtractTextPlugin({
filename: utils.assetsPath('css/[name].[contenthash].css'),
// Setting the following option to `false` will not extract CSS from codesplit chunks.
// Their CSS will instead be inserted dynamically with style-loader when the codesplit chunk has been loaded by webpack.
// It's currently set to `true` because we are seeing that sourcemaps are included in the codesplit bundle as well when it's `false`,
// increasing file size: https://github.com/vuejs-templates/webpack/issues/1110
allChunks: true,
}),
// Compress extracted CSS. We are using this plugin so that possible
// duplicated CSS from different components can be deduped.
new OptimizeCSSPlugin({
cssProcessorOptions: config.build.productionSourceMap ? { safe: true, map: { inline: false } } : { safe: true }
}),
// generate dist index.html with correct asset hash for caching.
// you can customize output by editing /index.html
// see https://github.com/ampedandwired/html-webpack-plugin
new HtmlWebpackPlugin({
filename: config.build.index,
template: 'index.html',
inject: true,
favicon: path.resolve(__dirname, '../static/favicon.ico'),
minify: {
removeComments: true,
collapseWhitespace: true,
removeAttributeQuotes: true
// more options:
// https://github.com/kangax/html-minifier#options-quick-reference
},
// necessary to consistently work with multiple chunks via CommonsChunkPlugin
chunksSortMode: 'dependency'
}),
// keep module.id stable when vendor modules does not change
new webpack.HashedModuleIdsPlugin(),
// enable scope hoisting
new webpack.optimize.ModuleConcatenationPlugin(),
// split vendor js into its own file
new webpack.optimize.CommonsChunkPlugin({
name: 'vendor',
minChunks(module) {
// any required modules inside node_modules are extracted to vendor
return (
module.resource &&
/\.js$/.test(module.resource) &&
module.resource.indexOf(
path.join(__dirname, '../node_modules')
) === 0
)
}
}),
// extract webpack runtime and module manifest to its own file in order to
// prevent vendor hash from being updated whenever app bundle is updated
new webpack.optimize.CommonsChunkPlugin({
name: 'manifest',
minChunks: Infinity
}),
// This instance extracts shared chunks from code splitted chunks and bundles them
// in a separate chunk, similar to the vendor chunk
// see: https://webpack.js.org/plugins/commons-chunk-plugin/#extra-async-commons-chunk
new webpack.optimize.CommonsChunkPlugin({
name: 'app',
async: 'vendor-async',
children: true,
minChunks: 3
}),
// copy custom static assets
new CopyWebpackPlugin([{
from: path.resolve(__dirname, '../static'),
to: config.build.assetsSubDirectory,
ignore: ['.*']
}])
]
})
if (config.build.productionGzip) {
const CompressionWebpackPlugin = require('compression-webpack-plugin')
webpackConfig.plugins.push(
new CompressionWebpackPlugin({
asset: '[path].gz[query]',
algorithm: 'gzip',
test: new RegExp(
'\\.(' +
config.build.productionGzipExtensions.join('|') +
')$'
),
threshold: 10240,
minRatio: 0.8
})
)
}
if (config.build.bundleAnalyzerReport) {
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin
webpackConfig.plugins.push(new BundleAnalyzerPlugin())
}
module.exports = webpackConfig
\ No newline at end of file
... ...
const isPro = Object.is(process.env.NODE_ENV, 'production')
module.exports = {
baseUrl: isPro ? 'http://cp.zgcareer.com/api/' : 'api/'
}
\ No newline at end of file
... ...
'use strict'
const merge = require('webpack-merge')
const prodEnv = require('./prod.env')
module.exports = merge(prodEnv, {
NODE_ENV: '"development"'
})
... ...
'use strict'
// Template version: 1.3.1
// see http://vuejs-templates.github.io/webpack for documentation.
const path = require('path')
module.exports = {
dev: {
// Paths
assetsSubDirectory: 'static',
assetsPublicPath: '/',
proxyTable: {
// '/api/**': {
// target: 'http://cp.zgcareer.com',
// pathRewrite: {
// '^/api': '/'
// }
// },
},
// Various Dev Server settings
host: '192.168.1.16', // can be overwritten by process.env.HOST
port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
autoOpenBrowser: false,
errorOverlay: true,
notifyOnErrors: true,
poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions-
/**
* Source Maps
*/
// https://webpack.js.org/configuration/devtool/#development
devtool: 'cheap-module-eval-source-map',
// If you have problems debugging vue-files in devtools,
// set this to false - it *may* help
// https://vue-loader.vuejs.org/en/options.html#cachebusting
cacheBusting: true,
cssSourceMap: true
},
build: {
// Template for index.html
index: path.resolve(__dirname, '../dist/index.html'),
// Paths
assetsRoot: path.resolve(__dirname, '../dist'),
assetsSubDirectory: 'static',
assetsPublicPath: '/',
/**
* Source Maps
*/
productionSourceMap: true,
// https://webpack.js.org/configuration/devtool/#production
devtool: '#source-map',
// Gzip off by default as many popular static hosts such as
// Surge or Netlify already gzip all static assets for you.
// Before setting to `true`, make sure to:
// npm install --save-dev compression-webpack-plugin
productionGzip: false,
productionGzipExtensions: ['js', 'css'],
// Run the build command with an extra argument to
// View the bundle analyzer report after build finishes:
// `npm run build --report`
// Set to `true` or `false` to always turn it on or off
bundleAnalyzerReport: process.env.npm_config_report
}
}
\ No newline at end of file
... ...
'use strict'
module.exports = {
NODE_ENV: '"production"'
}
... ...
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv=X-UA-Compatible content="IE=edge,chrome=1,width=device-width,initial-scale=1.0">
<title>school</title>
</head>
<body>
<div id="app"></div>
<!-- built files will be auto injected -->
<!-- <script src="https://cdn.bootcss.com/babel-polyfill/6.23.0/polyfill.min.js"></script> -->
<script charset="utf-8" src="https://map.qq.com/api/js?v=2.exp&key=LQNBZ-F3L34-EQMUR-DILMD-LBR4Q-GDFOH"></script>
</body>
</html>
\ No newline at end of file
... ...
此 diff 太大无法显示。
{
"name": "school",
"version": "1.0.0",
"description": "A Vue.js project",
"author": "liuxiaoyan <lxy@bronet.cn>",
"private": true,
"scripts": {
"dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js",
"start": "npm run dev",
"build": "node build/build.js"
},
"dependencies": {
"axios": "^0.19.0",
"echarts": "^4.2.1",
"element-ui": "^2.10.0",
"lrz": "^4.9.40",
"video.js": "^7.6.0",
"videojs-contrib-hls": "^5.15.0",
"vue": "^2.5.2",
"vue-pdf": "^4.0.7",
"vue-router": "^3.0.1",
"vuex": "^3.1.1"
},
"devDependencies": {
"autoprefixer": "^7.1.2",
"babel-core": "^6.22.1",
"babel-helper-vue-jsx-merge-props": "^2.0.3",
"babel-loader": "^7.1.1",
"babel-plugin-syntax-jsx": "^6.18.0",
"babel-plugin-transform-runtime": "^6.22.0",
"babel-plugin-transform-vue-jsx": "^3.5.0",
"babel-polyfill": "^6.26.0",
"babel-preset-env": "^1.3.2",
"babel-preset-stage-2": "^6.22.0",
"chalk": "^2.0.1",
"copy-webpack-plugin": "^4.0.1",
"css-loader": "^0.28.0",
"extract-text-webpack-plugin": "^3.0.0",
"file-loader": "^1.1.4",
"friendly-errors-webpack-plugin": "^1.6.1",
"html-webpack-plugin": "^2.30.1",
"node-notifier": "^5.1.2",
"optimize-css-assets-webpack-plugin": "^3.2.0",
"ora": "^1.2.0",
"portfinder": "^1.0.13",
"postcss-import": "^11.0.0",
"postcss-loader": "^2.0.8",
"postcss-url": "^7.2.1",
"qs": "^6.7.0",
"rimraf": "^2.6.0",
"semver": "^5.3.0",
"shelljs": "^0.7.6",
"uglifyjs-webpack-plugin": "^1.1.1",
"url-loader": "^0.5.8",
"vue-loader": "^13.3.0",
"vue-style-loader": "^3.0.1",
"vue-template-compiler": "^2.5.2",
"webpack": "^3.6.0",
"webpack-bundle-analyzer": "^2.9.0",
"webpack-dev-server": "^2.9.1",
"webpack-merge": "^4.1.0"
},
"engines": {
"node": ">= 6.0.0",
"npm": ">= 3.0.0"
},
"browserslist": [
"> 1%",
"last 2 versions",
"not ie <= 8"
]
}
... ...
<template>
<div id="app">
<router-view />
</div>
</template>
<script>
export default {
name: "App"
};
</script>
<style>
#app {
font-family: Microsoft YaHei;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-align: center;
color: #0d1e2e;
overflow-y: hidden;
}
body,
html,
ol,
ul,
h1,
h2,
h3,
h4,
h5,
h6,
p,
th,
td,
dl,
dd,
form,
fieldset,
legend,
input,
textarea,
select ,
label{
margin: 0;
padding: 0;
cursor: pointer;
}
html,
body {
font: 12px "微软雅黑", "MicrosoftYaHei", HELVETICA;
background: #fff;
-webkit-text-size-adjust: 100%;
font-family: "微软雅黑";
overflow: auto;
}
a {
color: #0d1e2e;
text-decoration: none;
font-weight: normal;
}
em {
font-style: normal;
}
li {
list-style: none;
font-weight: normal;
}
img {
border: 0;
vertical-align: middle;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
p {
word-wrap: break-word;
font-weight: normal;
cursor: pointer;
}
i {
font-style: normal;
}
input {
outline: none;
border-radius: 3px;
height: 32px;
font-size: 14px;
border: 1px solid #eee;
padding-left: 14px;
}
/* 清浮动 */
.clearfix::after {
content: ".";
clear: both;
display: block;
overflow: hidden;
font-size: 0;
height: 0;
}
.clearfix {
zoom: 1;
}
/* flex布局 */
.layout {
display: -moz-box;
display: -webkit-box;
display: -ms-flexbox;
display: -webkit-flex;
display: flex;
}
/* align-item */
.align_center {
-moz-box-align: center;
-webkit-box-align: center;
-ms-flex-align: center;
-webkit-align-items: center;
align-items: center;
-moz-box-pack: center;
-webkit-box-pack: center;
-ms-flex-pack: center;
}
.align_left {
-moz-box-align: flex-start;
-webkit-box-align: flex-start;
-ms-flex-align: flex-start;
-webkit-align-items: flex-start;
align-items: flex-start;
-moz-box-pack: flex-start;
-webkit-box-pack: flex-start;
-ms-flex-pack: flex-start;
}
/* justify */
.justify {
-webkit-justify-content: space-between;
justify-content: space-between;
-moz-box-pack: space-between;
-webkit-box-pack: space-between;
box-pack: space-between;
}
.justify_around {
-webkit-justify-content: space-around;
justify-content: space-around;
-moz-box-pack: space-around;
-webkit-box-pack: space-around;
box-pack: space-around;
}
.justify_center {
justify-content: center;
-webkit-justify-content: center;
-moz-box-pack: center;
-webkit-box-pack: center;
box-pack: center;
}
/* flex-direction */
.flex_diection {
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-moz-box-orient: vertical;
-moz-box-direction: normal;
flex-direction: column;
-webkit-flex-direction: column;
}
.flex_row {
flex-direction: row;
-webkit-flex-direction: row;
-moz-flex-direction: row;
-ms-flex-direction: row;
-o-flex-direction: row;
}
/* 选课建议 */
.course_suggest .el-table tr{
color: #34485e
}
/* 轮播图按钮 */
.el-carousel__arrow{
background-color: #409eff!important;
opacity: 0.6!important;
}
/* 录入心得 */
.active_pic .el-upload--picture-card{
border:none!important;
background-color: #fff!important;
}
.active_pic .el-upload-list--picture-card .el-upload-list__item{
width:80px!important;
height: 80px!important;
}
/* 院校分页 */
.el-pagination.is-background .btn-next,
.el-pagination.is-background .btn-prev,
.el-pagination.is-background .el-pager li {
border: 1px solid #8c9198;
}
/* 专业详情 */
.el-breadcrumb {
font-size: 18px !important;
}
/* 按钮划过 */
.el-button--primary:focus, .el-button--primary:hover{
background-color: #409eff!important;
border-color:#409eff!important;
}
/* 进度条内文字 */
.el-progress-bar__innerText{
color: #FFD648 !important;
}
/* 面包屑 */
.major_title {
padding: 27px 0;
}
/* 面包屑最后一项 */
.el-breadcrumb__item:last-child .el-breadcrumb__inner {
color: #409eff !important;
cursor: pointer !important;
}
/* 双一流学科 */
/* 下拉选框 */
.project_intro .el-select {
width: 143px !important;
}
.project_intro .el-input__icon,
.school_select .el-input__icon {
line-height: 30px !important;
}
.project_intro .el-input__inner,
.school_select .el-input__inner {
line-height: 30px !important;
height: 30px !important;
background-color: #f2f5fa !important;
padding-left: 14px !important;
}
/* 报考院校 */
/* 下拉选框 */
.school_select .el-select {
width: 103px !important;
}
/* 职业代码搜索 */
.pro_select .el-select {
width: 130px !important;
}
/* 报考选课要求 */
.choice_course .el-table {
border: 1px solid #eee;
border-bottom: none;
border-top: none;
}
/* 职业介绍 */
/* 查看大图弹窗 */
.el-dialog__title {
font-weight: bold;
color: #34485e;
}
/* 个人中心 选课图表 */
.choice_course .el-table th.is-leaf,
.activity_manage .el-table th.is-leaf {
padding: 3px 0;
}
.test_score .el-table th.is-leaf {
padding: 9px 0;
}
.el-table td.gutter,
.el-table th.gutter {
display: block !important;
}
/* 成绩弹窗 */
.score_dialog .el-dialog {
width: 1200px;
margin-top: 13vh !important;
}
/* 表头 */
.score_dialog .el-dialog__header,
.comment_dialog .el-dialog__header {
font-size: 18px;
color: #34485e;
font-weight: bold;
padding-top: 36px;
padding-bottom: 0;
}
.score_dialog .el-table th.is-leaf {
padding: 3px 0;
}
.score_dialog .el-table th.is-leaf .cell {
color: #5b5e63;
}
.score_dialog .cell {
color: #34485e;
}
.score_dialog .el-table td {
padding: 23px 0;
}
.score_dialog .el-dialog__body {
padding: 30px 0 0;
}
.score_dialog .el-table .cell {
padding-left: 37px;
}
/* 评语弹窗 */
.comment_dialog .el-dialog {
width: 636px;
margin-top: 13vh !important;
}
/* 活动管理 */
.activity_manage .el-table .cell {
padding-left: 53px;
}
/* 上传图片 */
.score_dialog .el-upload-list--picture .el-upload-list__item {
width: 70px;
height: 70px;
margin: 0 0 0 15px;
padding: 0;
float: left;
border: none;
}
/* 上传成功标志 */
.el-upload-list__item.is-success .el-upload-list__item-status-label {
display: none;
}
/* 删除 */
.el-upload-list__item .el-icon-close {
top: 5px;
right: 25px;
width: 20px;
height: 20px;
line-height: 20px;
font-size: 14px;
background-color: #505861;
color: #000;
z-index: 2;
display: block;
color: #fff;
border-radius: 50%;
}
/* 录入心得后弹窗 */
.exped_dialog .el-dialog__body {
padding: 30px 24px 0;
}
/* 多元测评报告 */
/* 进度条 */
.el-progress {
width: 955px;
}
.el-progress-bar__outer {
border-radius: 3px !important;
border: 1px solid #47d1a0 !important;
background-color: #f2fffa !important;
}
.el-progress-bar__inner {
border-radius: 0 !important;
height: 36px !important;
top: 2px !important;
left: 2px !important;
background-color: #47d1a0 !important;
}
/* 高校学科结果 */
.double_subject_information .el-table td {
padding: 5px 0;
}
/* 表格 */
.el-table td,
.el-table th {
padding: 16px 0;
}
.el-table th,
.el-table tr {
color: #8c9198;
}
/* 轮播图 */
.el-carousel__button {
width: 10px !important;
height: 10px !important;
border-radius: 50%;
}
/* 上传图片 */
.el-upload--text {
width: 84px !important;
height: 84px !important;
border: 1px dashed #bdc4ce !important;
border-radius: 3px !important;
}
/* 单选框 */
.el-radio__input.is-checked + .el-radio__label,
.el-radio {
color: #8c9198;
}
.el-radio__input.is-checked .el-radio__inner {
background: #fff;
border-color: #8c9198;
}
.el-radio__inner {
border-color: #8c9198;
}
.el-radio__inner::after {
background-color: #8c9198;
width: 6px;
height: 6px;
}
/* 选项卡 */
.el-tabs__header,
.el-tabs__nav-wrap,
.el-tabs__nav {
width: 100%;
}
.main_login .el-tabs__nav {
display: -moz-box;
display: -webkit-box;
display: -ms-flexbox;
display: -webkit-flex;
display: flex;
-moz-box-align: center;
-webkit-box-align: center;
-ms-flex-align: center;
-webkit-align-items: center;
align-items: center;
-moz-box-pack: center;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: space-around;
-webkit-justify-content: space;
-moz-box-pack: space;
-webkit-box-pack: space;
box-pack: space;
height: 84px;
}
/* 字体大小 */
.main_login .el-tabs__item {
font-size: 20px;
height: 84px;
line-height: 82px;
padding: 0 20px !important;
}
/* 选中的样式 */
.main_login .el-tabs__item.is-active {
font-weight: bold;
border-bottom: 2px solid #409eff;
}
/* 下划线 */
.el-tabs__active-bar {
width: 80px !important;
left: 30px;
display: none;
}
/* 输入框 */
.login_pwd .el-input__inner {
height: 50px;
line-height: 50px;
width: 330px;
}
.el-image__error{
display: none;
}
/* 登录输入框 */
.form_position .el-input__inner {
padding-left: 45px;
}
.el-form-item {
margin-bottom: 36px !important;
}
.el-tabs__header {
margin-bottom: 36px !important;
}
/* 输入框内字体颜色 */
input::placeholder {
color: #bdc4ce;
font-size: 14px;
/* padding:0 13px; */
cursor: pointer;
}
input::-webkit-input-placeholder {
/* WebKit browsers*/
color: #bdc4ce;
font-size: 14px;
/* padding:0 13px; */
cursor: pointer;
}
input:-moz-placeholder {
/* Mozilla Firefox 4 to 18*/
color: #bdc4ce;
font-size: 14px;
/* padding:0 13px; */
cursor: pointer;
}
input::-moz-placeholder {
/* Mozilla Firefox 19+*/
color: #bdc4ce;
font-size: 14px;
/* padding:0 13px; */
cursor: pointer;
}
input:-ms-input-placeholder {
/* Internet Explorer 10+*/
color: #bdc4ce;
font-size: 14px;
/* padding:0 13px; */
cursor: pointer;
}
textarea{
max-width: 100%;
}
/* 文本框placeholder */
textarea::-webkit-input-placeholder {
/* WebKit browsers */
color: #BDC4CE;
font-size: 14px;
}
textarea:-moz-placeholder {
/* Mozilla Firefox 4 to 18 */
color: #BDC4CE;
font-size: 14px;
}
textarea::-moz-placeholder {
/* Mozilla Firefox 19+ */
color: #BDC4CE;
font-size: 14px;
}
textarea::-ms-input-placeholder {
/* Internet Explorer 10+ */
color: #BDC4CE;
font-size: 14px;
}
/* 弹窗 */
.el-dialog {
/* margin-top: 24vh !important; */
}
/* 表单label */
.el-form-item__label {
color: #06121e!important;
height: 50px;
line-height: 50px!important;
padding-right: 26px!important;
text-align: left!important;
}
.el-form-item.is-required:not(.is-no-asterisk)
.el-form-item__label-wrap
> .el-form-item__label:before,
.el-form-item.is-required:not(.is-no-asterisk) > .el-form-item__label:before {
content: "";
}
/* 找回密码 */
.demo-ruleForm {
width: 430px;
margin: 0 auto;
}
/* 登录按钮 找回密码按钮*/
.login-btn .el-button,
.demo-ruleForm .el-button {
width: 330px;
height: 50px;
font-size: 18px;
}
/* 弹窗×号 */
.el-dialog__headerbtn .el-dialog__close {
font-weight: bold;
font-size: 22px;
}
.el-dialog__body {
text-align: center !important;
}
.el-dialog {
border-radius: 3px;
}
/* 警告 */
.induc_pic,
.induc_warn_content {
float: left;
}
/* 感叹图片 */
.induc_pic {
width: 13px;
height: 11px;
line-height: 11px;
margin-right: 3px;
margin-top: -2px;
}
.induc_pic img {
width: 100%;
height: 100%;
}
/* 评测按钮 通用*/
.currency_btn {
width: 330px;
height: 50px;
background: #409eff;
box-shadow: 0px 3px 6px rgba(18, 86, 194, 0.2);
opacity: 1;
margin: 30px auto;
font-size: 18px;
font-family: Source Han Sans SC;
font-weight: 400;
line-height: 50px;
color: rgba(255, 255, 255, 1);
border-radius: 3px;
}
/* 六型介绍弹窗 */
.assessment_report .el-dialog__header {
padding-bottom: 28px;
border-bottom: 1px solid #f1f1f1;
}
.assessment_report .el-dialog__title {
color: #34485e;
font-weight: 600;
}
.assessment_report .el-dialog__body {
padding: 34px 20px 5px;
}
.assessment_report .el-dialog {
margin-top: 40vh !important;
}
/* 教师端 */
/* 查看成绩弹窗 */
.student_score_dialog .el-dialog__body {
padding: 30px 0 !important;
}
.student_score_dialog .el-table th.is-leaf {
padding: 3px 0;
}
.student_score_dialog .el-table th.is-leaf .cell {
color: #5b5e63;
}
.student_score_dialog .cell {
color: #34485e;
}
.last_row .cell{
color: #F44A5E;
}
.first_column .cell{
color: #34485e;
}
.student_score_dialog .el-table td {
padding: 3px 0;
}
/* 学生评语弹窗 */
.comment_select .el-select {
width: 160px !important;
}
.student_comment_dialog .el-dialog__body {
padding: 10px 40px;
}
/* 教师端发布测评 */
/* 测评类型 */
.evalute_type .el-select,
.evalute_type .el-input {
width: 240px;
}
.evalute_type .el-input__inner,
.evalute_type .el-input__icon {
height: 32px !important;
line-height: 32px !important;
}
.select_box .el-checkbox{
width:100%;
margin:0 0 14px 0;
}
.select_box .el-checkbox__input{
float: right;
}
.select_box .el-checkbox__label{
float: left;
}
</style>
... ...
export function TMap(key) {
return new Promise(function(resolve, reject) {
window.init = function() {
resolve(qq) //注意这里
}
var script = document.createElement("script");
script.type = "text/javascript";
script.src = "http://map.qq.com/api/js?v=2.exp&callback=init&key=" + key;
script.onerror = reject;
document.head.appendChild(script);
})
};
\ No newline at end of file
... ...
import Vue from "vue";
import router from "@/router";
import Router from '@/router/index'
import axios from "axios";
import qs from "qs";
import { Notification, Loading, Message } from "element-ui";
// var instance = axios.create({
// baseURL:'',
// timeout:5000,
// headers:{"Content-Type":"multipart/form-data"}
// });
//
// Vue.prototype.instance=instance;
//样式文件,需单独引入
import "element-ui/lib/theme-chalk/index.css";
Vue.prototype.$http = axios;
Vue.prototype.$notify = Notification;
Vue.prototype.$loading = Loading;
Vue.prototype.$message = Message;
Vue.prototype.$qs = qs;
let LoadingInstance,
token = "";
// 环境设置
// 环境的切换
if (process.env.NODE_ENV == "development") {
axios.defaults.baseURL = "http://cp.zgcareer.com";
} else if (process.env.NODE_ENV == "debug") {
axios.defaults.baseURL = "http://cp.zgcareer.com";
} else if (process.env.NODE_ENV == "production") {
axios.defaults.baseURL = "http://cp.zgcareer.com";
}
axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded';
// axios.defaults.headers.common['token'] = localStorage.getItem("token");
// 设置请求超时
axios.defaults.timeout = 10000;
// 请求拦截器
axios.interceptors.request.use(
config => {
const token = localStorage.getItem("token");
config.headers = {
'Content-Type': 'application/x-www-form-urlencoded',
};
if (localStorage.getItem("token")) {
config.params = { 'token': localStorage.getItem("token") }
}
// token && (config.headers.Authorization = token);
return config;
},
error => {
return Promise.reject(error);
}
);
// 响应拦截器
axios.interceptors.response.use(
response => {
LoadingInstance.close();
// 如果返回的状态码为1,说明接口请求成功,可以正常拿到数据
// 否则的话抛出错误
if (response.data.code == 1) {
return Promise.resolve(response);
} else {
console.log(response.data.code)
switch (response.data.code) {
case 0:
Notification.info({
title: "提示",
message: response.data.msg,
duration: 1500
});
break;
case 401: //未登录
console.log(401)
Notification.error({
title: "错误",
message: response.data.msg,
duration: 1500
});
console.log(401, 1)
let test1 = localStorage.getItem("schoolSymbol");
localStorage.clear();
Router.push({
path: "/login/" + test1
});
break;
case 500:
console.log(500, 2)
Notification.error({
title: "错误",
message: response.data.msg,
duration: 1500
});
console.log(500)
let test0 = localStorage.getItem("schoolSymbol");
localStorage.clear();
Router.push({
path: "/login/" + test0
});
break;
default:
Notification.error({
title: "错误",
message: response.data.msg,
duration: 1500
});
let test4 = localStorage.getItem("schoolSymbol");
localStorage.clear();
Router.push({
path: "/login/" + test4
});
}
return Promise.reject(response);
}
},
error => {
LoadingInstance.close();
// console.log(error.response.status)
let test2 = localStorage.getItem("schoolSymbol");
Router.push({
path: "/login/" + test2
});
if (error.response.status) {
Notification.error({
title: "错误",
message: "网络错误",
duration: 1500
});
return Promise.reject(error.response);
}
}
);
/**
* get方法,对应get请求
* @param {String} url [请求的url地址]
* @param {Object} params [请求时携带的参数]
*/
export function get(url, params, loading) {
//console.log(loading);
// headers? axios.defaults.headers.get['XX-Token'] = headers['XX-Token']:"";
if (
loading == "" ||
loading == undefined ||
typeof loading == undefined ||
loading
) {
LoadingInstance = Loading.service({
//加载loading
fullscreen: true,
lock: true,
// spinner: 'el-icon-loading',
text: "加载中...",
background: "rgba(0, 0, 0, 0)"
});
}
return new Promise((resolve, reject) => {
axios
.get(url, {
params: params
})
.then(res => {
resolve(res.data.data);
})
.catch(err => {
reject(err.data);
});
});
}
/**
* post方法,对应post请求
* @param {String} url [请求的url地址]
* @param {Object} params [请求时携带的参数]
**/
export function post(url, params, loading) {
if (loading != false) {
LoadingInstance = Loading.service({
fullscreen: true,
lock: true,
text: "加载中...",
background: "rgba(0, 0, 0, 0)"
});
}
return new Promise((resolve, reject) => {
let that = this;
axios
.post(url, qs.stringify(Object.assign({}, params)))
.then(res => {
resolve(res.data.data);
})
.catch(err => {
reject(err.data);
});
});
}
export function uploadFile(Url, data) {
//上传图片的方法
return new Promise((resolve, reject) => {
let instance = axios.create({
// http://cp.zgcareer.com
baseURL: "http://cp.zgcareer.com",
headers: {
"Content-Type": "multipart/form-data"
}
});
instance
.post(Url, data)
.then(res => {
resolve(res.data.data);
})
.catch(error => {
reject(error.data);
});
});
}
export function toast(message, type) {
//上传图片的方法
if (type == "error") {
Notification.error({
title: "错误",
message: message,
duration: 1500
});
} else {
Notification.success({
title: "提示",
message: message,
duration: 1500
});
}
}
\ No newline at end of file
... ...