chushihua
22
.babelrc
Normal file
@ -0,0 +1,22 @@
|
||||
{
|
||||
"presets": [
|
||||
["env", {
|
||||
"modules": false,
|
||||
"targets": {
|
||||
"browsers": ["> 1%", "last 2 versions", "not ie <= 8"]
|
||||
}
|
||||
}],
|
||||
"stage-2",
|
||||
["es2015", { "modules": false }]
|
||||
],
|
||||
"plugins": [
|
||||
"transform-vue-jsx",
|
||||
"transform-runtime",
|
||||
["component",
|
||||
{
|
||||
"libraryName": "element-ui",
|
||||
"styleLibraryName": "theme-chalk"
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
.ace-tool/
|
||||
10
.postcssrc.js
Normal file
@ -0,0 +1,10 @@
|
||||
// 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": {}
|
||||
}
|
||||
}
|
||||
36
README.en.md
Normal file
@ -0,0 +1,36 @@
|
||||
# wangtou-pc
|
||||
|
||||
#### Description
|
||||
网投PC版
|
||||
|
||||
#### Software Architecture
|
||||
Software architecture description
|
||||
|
||||
#### Installation
|
||||
|
||||
1. xxxx
|
||||
2. xxxx
|
||||
3. xxxx
|
||||
|
||||
#### Instructions
|
||||
|
||||
1. xxxx
|
||||
2. xxxx
|
||||
3. xxxx
|
||||
|
||||
#### Contribution
|
||||
|
||||
1. Fork the repository
|
||||
2. Create Feat_xxx branch
|
||||
3. Commit your code
|
||||
4. Create Pull Request
|
||||
|
||||
|
||||
#### Gitee Feature
|
||||
|
||||
1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md
|
||||
2. Gitee blog [blog.gitee.com](https://blog.gitee.com)
|
||||
3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore)
|
||||
4. The most valuable open source project [GVP](https://gitee.com/gvp)
|
||||
5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help)
|
||||
6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)
|
||||
21
README.md
Normal file
@ -0,0 +1,21 @@
|
||||
# pc
|
||||
|
||||
> 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).
|
||||
41
build/build.js
Normal file
@ -0,0 +1,41 @@
|
||||
'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'
|
||||
))
|
||||
})
|
||||
})
|
||||
54
build/check-versions.js
Normal file
@ -0,0 +1,54 @@
|
||||
'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)
|
||||
}
|
||||
}
|
||||
BIN
build/logo.png
Normal file
|
After Width: | Height: | Size: 6.7 KiB |
110
build/utils.js
Normal file
@ -0,0 +1,110 @@
|
||||
'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?importLoaders=1',
|
||||
options: {
|
||||
minimize: process.env.NODE_ENV === 'production',
|
||||
sourceMap: options.sourceMap
|
||||
}
|
||||
}
|
||||
|
||||
const postcssLoader = {
|
||||
loader: 'postcss-loader',
|
||||
options: {
|
||||
sourceMap: options.sourceMap
|
||||
}
|
||||
}
|
||||
|
||||
const px2remLoader = {
|
||||
loader: 'px2rem-loader',
|
||||
options: {
|
||||
remUnit: 75
|
||||
}
|
||||
}
|
||||
|
||||
// generate loader string to be used with extract text plugin
|
||||
function generateLoaders (loader, loaderOptions) {
|
||||
const loaders = options.usePostCSS ? [cssLoader, postcssLoader , px2remLoader] : [cssLoader,px2remLoader]
|
||||
// const loaders = [cssLoader,px2remLoader,postcssLoader]
|
||||
|
||||
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'
|
||||
})
|
||||
} 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')
|
||||
})
|
||||
}
|
||||
}
|
||||
22
build/vue-loader.conf.js
Normal file
@ -0,0 +1,22 @@
|
||||
'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'
|
||||
}
|
||||
}
|
||||
82
build/webpack.base.conf.js
Normal file
@ -0,0 +1,82 @@
|
||||
'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: './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: {
|
||||
'vue$': 'vue/dist/vue.esm.js',
|
||||
'@': 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'
|
||||
}
|
||||
}
|
||||
95
build/webpack.dev.conf.js
Normal file
@ -0,0 +1,95 @@
|
||||
'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
|
||||
}),
|
||||
// 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)
|
||||
}
|
||||
})
|
||||
})
|
||||
145
build/webpack.prod.conf.js
Normal file
@ -0,0 +1,145 @@
|
||||
'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')
|
||||
|
||||
let Version = new Date().getTime()
|
||||
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]' + Version + '.js'),
|
||||
chunkFilename: utils.assetsPath('js/[id].[chunkhash]' + Version + '.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,
|
||||
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
|
||||
8
config/dev.env.js
Normal file
@ -0,0 +1,8 @@
|
||||
'use strict'
|
||||
const merge = require('webpack-merge')
|
||||
const prodEnv = require('./prod.env')
|
||||
|
||||
module.exports = merge(prodEnv, {
|
||||
NODE_ENV: '"development"',
|
||||
API_HOST: '"/api"' // 开发环境接口地址
|
||||
})
|
||||
76
config/index.js
Normal file
@ -0,0 +1,76 @@
|
||||
'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://b.abc.com/pcapi', // 后台访问地址
|
||||
changeOrigin: true,
|
||||
pathRewrite: {
|
||||
'^/api': ''
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
// Various Dev Server settings
|
||||
host: 'localhost', // 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: false,
|
||||
// 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
|
||||
}
|
||||
}
|
||||
5
config/prod.env.js
Normal file
@ -0,0 +1,5 @@
|
||||
'use strict'
|
||||
module.exports = {
|
||||
NODE_ENV: '"production"',
|
||||
API_HOST: '"http://b.abc.com:8080/pcapi"' // 开发环境接口地址
|
||||
}
|
||||
1
dist/.htaccess
vendored
Normal file
@ -0,0 +1 @@
|
||||
|
||||
1
dist/.user.ini
vendored
Normal file
@ -0,0 +1 @@
|
||||
open_basedir=/www/wwwroot/pc/dist/:/tmp/
|
||||
7
dist/404.html
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
<html>
|
||||
<head><title>404 Not Found</title></head>
|
||||
<body>
|
||||
<center><h1>404 Not Found</h1></center>
|
||||
<hr><center>nginx</center>
|
||||
</body>
|
||||
</html>
|
||||
1
dist/index.html
vendored
Normal file
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><title></title><link rel="shortcut icon" href=./static/favicon.ico><link href=/static/css/app.79dc6a08f953e0f0024eabba79aa86d6.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=/static/js/manifest.fc2183e86bda37cd12701768032046864.js></script><script type=text/javascript src=/static/js/vendor.9e41d324bb8ddb1839371768032046864.js></script><script type=text/javascript src=/static/js/app.0a99d25499e4b956522e1768032046864.js></script></body></html>
|
||||
23
dist/legal.html
vendored
Normal file
24
dist/static/NodePlayer-full.min.js
vendored
Normal file
50
dist/static/config.json
vendored
Normal file
@ -0,0 +1,50 @@
|
||||
{
|
||||
"ApiUrl":"http://192.168.88.251:85/pcapi",
|
||||
"SockUrl":"192.168.88.251:6080",
|
||||
"ServerPort":"6080",
|
||||
"HallUrl": "https://v.yourvideo.com/yg/hall.flv",
|
||||
"LoginLogo": "http://192.168.88.251:85/static/logo/wb_logo.png",
|
||||
"LogoPng": "http://192.168.88.251:85/static/logo/wb_logo.png",
|
||||
"TitlePng": "http://192.168.88.251:85/static/logo/wb_200_60.png",
|
||||
|
||||
"entranceQrcode":"http://192.168.88.251:85/static/logo/normal_entranceQrcode.png?v=10",
|
||||
"agentUrl":"http://192.168.88.249",
|
||||
|
||||
"BgMusic": "static/sound/bg.mp3",
|
||||
"IframeUrl": "https://p.abc.com/video.html",
|
||||
"PayUrl": "",
|
||||
"AppUrl": "https://www.abc.com/",
|
||||
"AppQrcode": "http://192.168.88.251:85/static/logo/app_qrcode.png?v=10",
|
||||
"ServerQrcode": "http://192.168.88.251:85/static/logo/cus.jpeg",
|
||||
"customerLink": "https://kf.tvbn018.vip/index/index/home?visiter_id=&visiter_name=&avatar=&groupid=0&business_id=2",
|
||||
"isCancelBet": "1",
|
||||
"isChipSet": "1",
|
||||
"Title": "WINBEST",
|
||||
"baccarat": true,
|
||||
"dt": true,
|
||||
"flopTime": 1000,
|
||||
"videoZoom": false,
|
||||
"nn": false,
|
||||
"multiple": true,
|
||||
"onlyTel": false,
|
||||
"sanka": false,
|
||||
"isUpdateOnline":true,
|
||||
"isRegister":false,
|
||||
"isRecharge":false,
|
||||
"isServerCode":true,
|
||||
"isSetExpired":true,
|
||||
"sound":2,
|
||||
"switchSet":false,
|
||||
"chipInit":"1",
|
||||
"onlineTimeSet":60000,
|
||||
"onlineNum":2000,
|
||||
|
||||
"openSw":true,
|
||||
"entrance":{
|
||||
"isOpen":false,
|
||||
"username":"8899",
|
||||
"password":"9988",
|
||||
"code":"8888"
|
||||
}
|
||||
|
||||
}
|
||||
7
dist/static/css/app.79dc6a08f953e0f0024eabba79aa86d6.css
vendored
Normal file
BIN
dist/static/entranceQrcode.png
vendored
Normal file
|
After Width: | Height: | Size: 106 KiB |
BIN
dist/static/favicon.ico
vendored
Normal file
|
After Width: | Height: | Size: 4.2 KiB |
BIN
dist/static/fonts/element-icons.6f0a763.ttf
vendored
Normal file
BIN
dist/static/img/101.682cf8e.png
vendored
Normal file
|
After Width: | Height: | Size: 23 KiB |
BIN
dist/static/img/103.30ce16b.png
vendored
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
dist/static/img/104.e20ae7c.png
vendored
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
dist/static/img/105.da26514.png
vendored
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
dist/static/img/106.25f4d06.png
vendored
Normal file
|
After Width: | Height: | Size: 17 KiB |
BIN
dist/static/img/107.0ad9a6b.png
vendored
Normal file
|
After Width: | Height: | Size: 17 KiB |
BIN
dist/static/img/108.617df2e.png
vendored
Normal file
|
After Width: | Height: | Size: 20 KiB |
BIN
dist/static/img/109.ac1fafc.png
vendored
Normal file
|
After Width: | Height: | Size: 22 KiB |
BIN
dist/static/img/110.35812fd.png
vendored
Normal file
|
After Width: | Height: | Size: 21 KiB |
BIN
dist/static/img/111.7ab15d0.png
vendored
Normal file
|
After Width: | Height: | Size: 86 KiB |
BIN
dist/static/img/112.278d092.png
vendored
Normal file
|
After Width: | Height: | Size: 95 KiB |
BIN
dist/static/img/113.0bac0b0.png
vendored
Normal file
|
After Width: | Height: | Size: 88 KiB |
BIN
dist/static/img/201.70ead03.png
vendored
Normal file
|
After Width: | Height: | Size: 25 KiB |
BIN
dist/static/img/203.0132e51.png
vendored
Normal file
|
After Width: | Height: | Size: 10 KiB |
BIN
dist/static/img/204.61ee539.png
vendored
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
dist/static/img/205.3c0701c.png
vendored
Normal file
|
After Width: | Height: | Size: 13 KiB |
BIN
dist/static/img/206.7178d9e.png
vendored
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
dist/static/img/207.e5794d6.png
vendored
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
dist/static/img/208.6e217f6.png
vendored
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
dist/static/img/209.1ce4eda.png
vendored
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
dist/static/img/210.e377e28.png
vendored
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
dist/static/img/211.cf61aa6.png
vendored
Normal file
|
After Width: | Height: | Size: 97 KiB |
BIN
dist/static/img/212.d97e775.png
vendored
Normal file
|
After Width: | Height: | Size: 102 KiB |
BIN
dist/static/img/213.6e83f6c.png
vendored
Normal file
|
After Width: | Height: | Size: 98 KiB |
BIN
dist/static/img/301.5d74509.png
vendored
Normal file
|
After Width: | Height: | Size: 32 KiB |
BIN
dist/static/img/302.c0dee90.png
vendored
Normal file
|
After Width: | Height: | Size: 10 KiB |
BIN
dist/static/img/303.b02c74d.png
vendored
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
dist/static/img/304.a0867ef.png
vendored
Normal file
|
After Width: | Height: | Size: 13 KiB |
BIN
dist/static/img/305.36a6024.png
vendored
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
dist/static/img/306.63f0698.png
vendored
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
dist/static/img/307.9a24fd9.png
vendored
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
dist/static/img/308.9e7d0c0.png
vendored
Normal file
|
After Width: | Height: | Size: 22 KiB |
BIN
dist/static/img/309.50b29b5.png
vendored
Normal file
|
After Width: | Height: | Size: 23 KiB |
BIN
dist/static/img/310.a77d46b.png
vendored
Normal file
|
After Width: | Height: | Size: 24 KiB |
BIN
dist/static/img/311.ee94be6.png
vendored
Normal file
|
After Width: | Height: | Size: 92 KiB |
BIN
dist/static/img/312.d6d07a9.png
vendored
Normal file
|
After Width: | Height: | Size: 98 KiB |
BIN
dist/static/img/313.c599791.png
vendored
Normal file
|
After Width: | Height: | Size: 90 KiB |
BIN
dist/static/img/401.78a8890.png
vendored
Normal file
|
After Width: | Height: | Size: 19 KiB |
BIN
dist/static/img/403.0196036.png
vendored
Normal file
|
After Width: | Height: | Size: 9.8 KiB |
BIN
dist/static/img/404.48174f3.png
vendored
Normal file
|
After Width: | Height: | Size: 10 KiB |
BIN
dist/static/img/405.c26cb77.png
vendored
Normal file
|
After Width: | Height: | Size: 13 KiB |
BIN
dist/static/img/406.7c38a84.png
vendored
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
dist/static/img/407.6635839.png
vendored
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
dist/static/img/408.936f075.png
vendored
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
dist/static/img/409.a9488ef.png
vendored
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
dist/static/img/410.a7bfd73.png
vendored
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
dist/static/img/411.d167fb5.png
vendored
Normal file
|
After Width: | Height: | Size: 99 KiB |
BIN
dist/static/img/412.e6f1701.png
vendored
Normal file
|
After Width: | Height: | Size: 95 KiB |
BIN
dist/static/img/413.f1c67ff.png
vendored
Normal file
|
After Width: | Height: | Size: 103 KiB |
BIN
dist/static/img/agent.6ff686e.jpg
vendored
Normal file
|
After Width: | Height: | Size: 54 KiB |
BIN
dist/static/img/back-min.bad3526.png
vendored
Normal file
|
After Width: | Height: | Size: 190 KiB |
BIN
dist/static/img/back2-min.7c26aeb.png
vendored
Normal file
|
After Width: | Height: | Size: 193 KiB |
BIN
dist/static/img/banner-1.b6dbbc8.png
vendored
Normal file
|
After Width: | Height: | Size: 794 KiB |
BIN
dist/static/img/banner-10.f27cf0b.png
vendored
Normal file
|
After Width: | Height: | Size: 105 KiB |
BIN
dist/static/img/banner-9.282356d.png
vendored
Normal file
|
After Width: | Height: | Size: 134 KiB |
BIN
dist/static/img/bg.2809548.png
vendored
Normal file
|
After Width: | Height: | Size: 148 KiB |
BIN
dist/static/img/bjl.da41a5d.png
vendored
Normal file
|
After Width: | Height: | Size: 309 KiB |
BIN
dist/static/img/box_title_bg.5ed4590.png
vendored
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
dist/static/img/card_bg.4211fbc.png
vendored
Normal file
|
After Width: | Height: | Size: 33 KiB |
BIN
dist/static/img/chip.3fad944.png
vendored
Normal file
|
After Width: | Height: | Size: 86 KiB |
BIN
dist/static/img/disguise_bg.9307a88.jpg
vendored
Normal file
|
After Width: | Height: | Size: 50 KiB |
BIN
dist/static/img/entrance_bg.08fe623.jpg
vendored
Normal file
|
After Width: | Height: | Size: 63 KiB |
BIN
dist/static/img/faces.aac8164.png
vendored
Normal file
|
After Width: | Height: | Size: 97 KiB |
BIN
dist/static/img/grab.fef4bb2.png
vendored
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
dist/static/img/haoluo.975891b.png
vendored
Normal file
|
After Width: | Height: | Size: 608 KiB |
BIN
dist/static/img/lh.c90281a.png
vendored
Normal file
|
After Width: | Height: | Size: 148 KiB |
BIN
dist/static/img/login_bg.0029813.jpg
vendored
Normal file
|
After Width: | Height: | Size: 128 KiB |
BIN
dist/static/img/min_video_bg.60c619d.jpg
vendored
Normal file
|
After Width: | Height: | Size: 24 KiB |
BIN
dist/static/img/minvideo_bg.49f9c7d.jpg
vendored
Normal file
|
After Width: | Height: | Size: 41 KiB |
BIN
dist/static/img/netthrow.0fda361.jpg
vendored
Normal file
|
After Width: | Height: | Size: 107 KiB |
BIN
dist/static/img/niuniu.b98d357.png
vendored
Normal file
|
After Width: | Height: | Size: 276 KiB |
BIN
dist/static/img/play_bg.cb82022.jpg
vendored
Normal file
|
After Width: | Height: | Size: 57 KiB |