Commit 2aa9245c by 严立

更换专家注册下载文件 | 邮箱校验规则 | 备案跳转地址

parent b8ba49a5
Showing with 2442 additions and 2417 deletions
{ {
"presets": [ "presets": [
["env", { ["env", {
"modules": false, "modules": false,
"targets": { "targets": {
"browsers": ["> 1%", "last 2 versions", "not ie <= 8"] "browsers": ["> 1%", "last 2 versions", "not ie <= 8"]
} }
}], }],
"stage-2" "stage-2"
], ],
"plugins": ["transform-vue-jsx", "transform-runtime"] "plugins": ["transform-vue-jsx", "transform-runtime"]
} }
root = true root = true
[*] [*]
charset = utf-8 charset = utf-8
indent_style = space indent_style = space
indent_size = 4 indent_size = 4
end_of_line = lf end_of_line = lf
insert_final_newline = true insert_final_newline = true
trim_trailing_whitespace = true trim_trailing_whitespace = true
.DS_Store .DS_Store
node_modules/ node_modules/
/dist/ /dist/
npm-debug.log* npm-debug.log*
yarn-debug.log* yarn-debug.log*
yarn-error.log* yarn-error.log*
# Editor directories and files # Editor directories and files
.idea .idea
.vscode .vscode
*.suo *.suo
*.ntvs* *.ntvs*
*.njsproj *.njsproj
*.sln *.sln
// https://github.com/michael-ciniawsky/postcss-load-config // https://github.com/michael-ciniawsky/postcss-load-config
module.exports = { module.exports = {
"plugins": { "plugins": {
"postcss-import": {}, "postcss-import": {},
"postcss-url": {}, "postcss-url": {},
// to edit target browsers: use "browserslist" field in package.json // to edit target browsers: use "browserslist" field in package.json
"autoprefixer": {} "autoprefixer": {}
} }
} }
# merchant2.1.x # merchant2.1.x
> A Vue.js project > A Vue.js project
## Build Setup ## Build Setup
``` bash ``` bash
# install dependencies # install dependencies
npm install npm install
# serve with hot reload at localhost:8080 # serve with hot reload at localhost:8080
npm run dev npm run dev
# build for production with minification # build for production with minification
npm run build npm run build
# build for production and view the bundle analyzer report # build for production and view the bundle analyzer report
npm run build --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). 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' 'use strict'
require('./check-versions')() require('./check-versions')()
process.env.NODE_ENV = 'production' process.env.NODE_ENV = 'production'
const ora = require('ora') const ora = require('ora')
const rm = require('rimraf') const rm = require('rimraf')
const path = require('path') const path = require('path')
const chalk = require('chalk') const chalk = require('chalk')
const webpack = require('webpack') const webpack = require('webpack')
const config = require('../config') const config = require('../config')
const webpackConfig = require('./webpack.prod.conf') const webpackConfig = require('./webpack.prod.conf')
const spinner = ora('building for production...') const spinner = ora('building for production...')
spinner.start() spinner.start()
rm(path.join(config.build.assetsRoot, config.build.assetsSubDirectory), err => { rm(path.join(config.build.assetsRoot, config.build.assetsSubDirectory), err => {
if (err) throw err if (err) throw err
webpack(webpackConfig, (err, stats) => { webpack(webpackConfig, (err, stats) => {
spinner.stop() spinner.stop()
if (err) throw err if (err) throw err
process.stdout.write(stats.toString({ process.stdout.write(stats.toString({
colors: true, colors: true,
modules: false, modules: false,
children: false, // If you are using ts-loader, setting this to true will make TypeScript errors show up during build. children: false, // If you are using ts-loader, setting this to true will make TypeScript errors show up during build.
chunks: false, chunks: false,
chunkModules: false chunkModules: false
}) + '\n\n') }) + '\n\n')
if (stats.hasErrors()) { if (stats.hasErrors()) {
console.log(chalk.red(' Build failed with errors.\n')) console.log(chalk.red(' Build failed with errors.\n'))
process.exit(1) process.exit(1)
} }
console.log(chalk.cyan(' Build complete.\n')) console.log(chalk.cyan(' Build complete.\n'))
console.log(chalk.yellow( console.log(chalk.yellow(
' Tip: built files are meant to be served over an HTTP server.\n' + ' Tip: built files are meant to be served over an HTTP server.\n' +
' Opening index.html over file:// won\'t work.\n' ' Opening index.html over file:// won\'t work.\n'
)) ))
}) })
}) })
'use strict' 'use strict'
const chalk = require('chalk') const chalk = require('chalk')
const semver = require('semver') const semver = require('semver')
const packageConfig = require('../package.json') const packageConfig = require('../package.json')
const shell = require('shelljs') const shell = require('shelljs')
function exec (cmd) { function exec (cmd) {
return require('child_process').execSync(cmd).toString().trim() return require('child_process').execSync(cmd).toString().trim()
} }
const versionRequirements = [ const versionRequirements = [
{ {
name: 'node', name: 'node',
currentVersion: semver.clean(process.version), currentVersion: semver.clean(process.version),
versionRequirement: packageConfig.engines.node versionRequirement: packageConfig.engines.node
} }
] ]
if (shell.which('npm')) { if (shell.which('npm')) {
versionRequirements.push({ versionRequirements.push({
name: 'npm', name: 'npm',
currentVersion: exec('npm --version'), currentVersion: exec('npm --version'),
versionRequirement: packageConfig.engines.npm versionRequirement: packageConfig.engines.npm
}) })
} }
module.exports = function () { module.exports = function () {
const warnings = [] const warnings = []
for (let i = 0; i < versionRequirements.length; i++) { for (let i = 0; i < versionRequirements.length; i++) {
const mod = versionRequirements[i] const mod = versionRequirements[i]
if (!semver.satisfies(mod.currentVersion, mod.versionRequirement)) { if (!semver.satisfies(mod.currentVersion, mod.versionRequirement)) {
warnings.push(mod.name + ': ' + warnings.push(mod.name + ': ' +
chalk.red(mod.currentVersion) + ' should be ' + chalk.red(mod.currentVersion) + ' should be ' +
chalk.green(mod.versionRequirement) chalk.green(mod.versionRequirement)
) )
} }
} }
if (warnings.length) { if (warnings.length) {
console.log('') console.log('')
console.log(chalk.yellow('To use this template, you must update following to modules:')) console.log(chalk.yellow('To use this template, you must update following to modules:'))
console.log() console.log()
for (let i = 0; i < warnings.length; i++) { for (let i = 0; i < warnings.length; i++) {
const warning = warnings[i] const warning = warnings[i]
console.log(' ' + warning) console.log(' ' + warning)
} }
console.log() console.log()
process.exit(1) process.exit(1)
} }
} }
'use strict' 'use strict'
const path = require('path') const path = require('path')
const config = require('../config') const config = require('../config')
const ExtractTextPlugin = require('extract-text-webpack-plugin') const ExtractTextPlugin = require('extract-text-webpack-plugin')
const packageConfig = require('../package.json') const packageConfig = require('../package.json')
exports.assetsPath = function (_path) { exports.assetsPath = function (_path) {
const assetsSubDirectory = process.env.NODE_ENV === 'production' const assetsSubDirectory = process.env.NODE_ENV === 'production'
? config.build.assetsSubDirectory ? config.build.assetsSubDirectory
: config.dev.assetsSubDirectory : config.dev.assetsSubDirectory
return path.posix.join(assetsSubDirectory, _path) return path.posix.join(assetsSubDirectory, _path)
} }
exports.cssLoaders = function (options) { exports.cssLoaders = function (options) {
options = options || {} options = options || {}
const cssLoader = { const cssLoader = {
loader: 'css-loader', loader: 'css-loader',
options: { options: {
sourceMap: options.sourceMap sourceMap: options.sourceMap
} }
} }
const postcssLoader = { const postcssLoader = {
loader: 'postcss-loader', loader: 'postcss-loader',
options: { options: {
sourceMap: options.sourceMap sourceMap: options.sourceMap
} }
} }
// generate loader string to be used with extract text plugin // generate loader string to be used with extract text plugin
function generateLoaders (loader, loaderOptions) { function generateLoaders (loader, loaderOptions) {
const loaders = options.usePostCSS ? [cssLoader, postcssLoader] : [cssLoader] const loaders = options.usePostCSS ? [cssLoader, postcssLoader] : [cssLoader]
if (loader) { if (loader) {
loaders.push({ loaders.push({
loader: loader + '-loader', loader: loader + '-loader',
options: Object.assign({}, loaderOptions, { options: Object.assign({}, loaderOptions, {
sourceMap: options.sourceMap sourceMap: options.sourceMap
}) })
}) })
} }
// Extract CSS when that option is specified // Extract CSS when that option is specified
// (which is the case during production build) // (which is the case during production build)
if (options.extract) { if (options.extract) {
return ExtractTextPlugin.extract({ return ExtractTextPlugin.extract({
use: loaders, use: loaders,
fallback: 'vue-style-loader' fallback: 'vue-style-loader'
}) })
} else { } else {
return ['vue-style-loader'].concat(loaders) return ['vue-style-loader'].concat(loaders)
} }
} }
// https://vue-loader.vuejs.org/en/configurations/extract-css.html // https://vue-loader.vuejs.org/en/configurations/extract-css.html
return { return {
css: generateLoaders(), css: generateLoaders(),
postcss: generateLoaders(), postcss: generateLoaders(),
less: generateLoaders('less').concat({ less: generateLoaders('less').concat({
loader: 'sass-resources-loader', loader: 'sass-resources-loader',
options: { options: {
resources: path.resolve(__dirname, '../src/common/css/global.less') resources: path.resolve(__dirname, '../src/common/css/global.less')
} }
}), }),
sass: generateLoaders('sass', { indentedSyntax: true }), sass: generateLoaders('sass', { indentedSyntax: true }),
scss: generateLoaders('sass'), scss: generateLoaders('sass'),
stylus: generateLoaders('stylus'), stylus: generateLoaders('stylus'),
styl: generateLoaders('stylus') styl: generateLoaders('stylus')
} }
} }
// Generate loaders for standalone style files (outside of .vue) // Generate loaders for standalone style files (outside of .vue)
exports.styleLoaders = function (options) { exports.styleLoaders = function (options) {
const output = [] const output = []
const loaders = exports.cssLoaders(options) const loaders = exports.cssLoaders(options)
for (const extension in loaders) { for (const extension in loaders) {
const loader = loaders[extension] const loader = loaders[extension]
output.push({ output.push({
test: new RegExp('\\.' + extension + '$'), test: new RegExp('\\.' + extension + '$'),
use: loader use: loader
}) })
} }
return output return output
} }
exports.createNotifierCallback = () => { exports.createNotifierCallback = () => {
const notifier = require('node-notifier') const notifier = require('node-notifier')
return (severity, errors) => { return (severity, errors) => {
if (severity !== 'error') return if (severity !== 'error') return
const error = errors[0] const error = errors[0]
const filename = error.file && error.file.split('!').pop() const filename = error.file && error.file.split('!').pop()
notifier.notify({ notifier.notify({
title: packageConfig.name, title: packageConfig.name,
message: severity + ': ' + error.name, message: severity + ': ' + error.name,
subtitle: filename || '', subtitle: filename || '',
icon: path.join(__dirname, 'logo.png') icon: path.join(__dirname, 'logo.png')
}) })
} }
} }
'use strict' 'use strict'
const utils = require('./utils') const utils = require('./utils')
const config = require('../config') const config = require('../config')
const isProduction = process.env.NODE_ENV === 'production' const isProduction = process.env.NODE_ENV === 'production'
const sourceMapEnabled = isProduction const sourceMapEnabled = isProduction
? config.build.productionSourceMap ? config.build.productionSourceMap
: config.dev.cssSourceMap : config.dev.cssSourceMap
module.exports = { module.exports = {
loaders: utils.cssLoaders({ loaders: utils.cssLoaders({
sourceMap: sourceMapEnabled, sourceMap: sourceMapEnabled,
extract: isProduction extract: isProduction
}), }),
cssSourceMap: sourceMapEnabled, cssSourceMap: sourceMapEnabled,
cacheBusting: config.dev.cacheBusting, cacheBusting: config.dev.cacheBusting,
transformToRequire: { transformToRequire: {
video: ['src', 'poster'], video: ['src', 'poster'],
source: 'src', source: 'src',
img: 'src', img: 'src',
image: 'xlink:href' image: 'xlink:href'
} }
} }
'use strict' 'use strict'
const path = require('path') const path = require('path')
const utils = require('./utils') const utils = require('./utils')
const config = require('../config') const config = require('../config')
const vueLoaderConfig = require('./vue-loader.conf') const vueLoaderConfig = require('./vue-loader.conf')
function resolve (dir) { function resolve (dir) {
return path.join(__dirname, '..', dir) return path.join(__dirname, '..', dir)
} }
module.exports = { module.exports = {
context: path.resolve(__dirname, '../'), context: path.resolve(__dirname, '../'),
entry: { entry: {
app: ['babel-polyfill', './src/main.js'] app: ['babel-polyfill', './src/main.js']
}, },
output: { output: {
path: config.build.assetsRoot, path: config.build.assetsRoot,
filename: '[name].js', filename: '[name].js',
publicPath: process.env.NODE_ENV === 'production' publicPath: process.env.NODE_ENV === 'production'
? config.build.assetsPublicPath ? config.build.assetsPublicPath
: config.dev.assetsPublicPath : config.dev.assetsPublicPath
}, },
resolve: { resolve: {
extensions: ['.js', '.vue', '.json'], extensions: ['.js', '.vue', '.json'],
alias: { alias: {
'vue$': 'vue/dist/vue.esm.js', 'vue$': 'vue/dist/vue.esm.js',
'@': resolve('src'), '@': resolve('src'),
} }
}, },
module: { module: {
rules: [ rules: [
{ {
test: /\.vue$/, test: /\.vue$/,
loader: 'vue-loader', loader: 'vue-loader',
options: vueLoaderConfig options: vueLoaderConfig
}, },
{ {
test: /\.js$/, test: /\.js$/,
loader: 'babel-loader', loader: 'babel-loader',
options:{ options:{
presets: ['es2015'] presets: ['es2015']
}, },
include: [ include: [
resolve('src'), resolve('test'), resolve('node_modules/webpack-dev-server/client'), resolve('src'), resolve('test'), resolve('node_modules/webpack-dev-server/client'),
resolve('src'), resolve('test'), resolve('node_modules/element-ui/src'), resolve('src'), resolve('test'), resolve('node_modules/element-ui/src'),
resolve('src'), resolve('test'), resolve('node_modules/element-ui/packages'), resolve('src'), resolve('test'), resolve('node_modules/element-ui/packages'),
] ]
}, },
{ {
test: /\.(png|jpe?g|gif|svg)(\?.*)?$/, test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
loader: 'url-loader', loader: 'url-loader',
options: { options: {
limit: 10000, limit: 10000,
name: utils.assetsPath('img/[name].[hash:7].[ext]') name: utils.assetsPath('img/[name].[hash:7].[ext]')
} }
}, },
{ {
test: /\.(mp4|webm|ogg|mp3|wav|flac|aac)(\?.*)?$/, test: /\.(mp4|webm|ogg|mp3|wav|flac|aac)(\?.*)?$/,
loader: 'url-loader', loader: 'url-loader',
options: { options: {
limit: 10000, limit: 10000,
name: utils.assetsPath('media/[name].[hash:7].[ext]') name: utils.assetsPath('media/[name].[hash:7].[ext]')
} }
}, },
{ {
test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/, test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
loader: 'url-loader', loader: 'url-loader',
options: { options: {
limit: 10000, limit: 10000,
name: utils.assetsPath('fonts/[name].[hash:7].[ext]') name: utils.assetsPath('fonts/[name].[hash:7].[ext]')
} }
} }
] ]
}, },
node: { node: {
// prevent webpack from injecting useless setImmediate polyfill because Vue // prevent webpack from injecting useless setImmediate polyfill because Vue
// source contains it (although only uses it if it's native). // source contains it (although only uses it if it's native).
setImmediate: false, setImmediate: false,
// prevent webpack from injecting mocks to Node native modules // prevent webpack from injecting mocks to Node native modules
// that does not make sense for the client // that does not make sense for the client
dgram: 'empty', dgram: 'empty',
fs: 'empty', fs: 'empty',
net: 'empty', net: 'empty',
tls: 'empty', tls: 'empty',
child_process: 'empty' child_process: 'empty'
} }
} }
'use strict' 'use strict'
const utils = require('./utils') const utils = require('./utils')
const webpack = require('webpack') const webpack = require('webpack')
const config = require('../config') const config = require('../config')
const merge = require('webpack-merge') const merge = require('webpack-merge')
const path = require('path') const path = require('path')
const baseWebpackConfig = require('./webpack.base.conf') const baseWebpackConfig = require('./webpack.base.conf')
const CopyWebpackPlugin = require('copy-webpack-plugin') const CopyWebpackPlugin = require('copy-webpack-plugin')
const HtmlWebpackPlugin = require('html-webpack-plugin') const HtmlWebpackPlugin = require('html-webpack-plugin')
const FriendlyErrorsPlugin = require('friendly-errors-webpack-plugin') const FriendlyErrorsPlugin = require('friendly-errors-webpack-plugin')
const portfinder = require('portfinder') const portfinder = require('portfinder')
const HOST = process.env.HOST const HOST = process.env.HOST
const PORT = process.env.PORT && Number(process.env.PORT) const PORT = process.env.PORT && Number(process.env.PORT)
const devWebpackConfig = merge(baseWebpackConfig, { const devWebpackConfig = merge(baseWebpackConfig, {
module: { module: {
rules: utils.styleLoaders({ sourceMap: config.dev.cssSourceMap, usePostCSS: true }) rules: utils.styleLoaders({ sourceMap: config.dev.cssSourceMap, usePostCSS: true })
}, },
// cheap-module-eval-source-map is faster for development // cheap-module-eval-source-map is faster for development
devtool: config.dev.devtool, devtool: config.dev.devtool,
// these devServer options should be customized in /config/index.js // these devServer options should be customized in /config/index.js
devServer: { devServer: {
clientLogLevel: 'warning', clientLogLevel: 'warning',
historyApiFallback: { historyApiFallback: {
rewrites: [ rewrites: [
{ from: /.*/, to: path.posix.join(config.dev.assetsPublicPath, 'index.html') }, { from: /.*/, to: path.posix.join(config.dev.assetsPublicPath, 'index.html') },
], ],
}, },
hot: true, hot: true,
contentBase: false, // since we use CopyWebpackPlugin. contentBase: false, // since we use CopyWebpackPlugin.
compress: true, compress: true,
host: HOST || config.dev.host, host: HOST || config.dev.host,
port: PORT || config.dev.port, port: PORT || config.dev.port,
open: config.dev.autoOpenBrowser, open: config.dev.autoOpenBrowser,
overlay: config.dev.errorOverlay overlay: config.dev.errorOverlay
? { warnings: false, errors: true } ? { warnings: false, errors: true }
: false, : false,
publicPath: config.dev.assetsPublicPath, publicPath: config.dev.assetsPublicPath,
proxy: config.dev.proxyTable, proxy: config.dev.proxyTable,
quiet: true, // necessary for FriendlyErrorsPlugin quiet: true, // necessary for FriendlyErrorsPlugin
watchOptions: { watchOptions: {
poll: config.dev.poll, poll: config.dev.poll,
} }
}, },
plugins: [ plugins: [
new webpack.DefinePlugin({ new webpack.DefinePlugin({
'process.env': require('../config/dev.env') 'process.env': require('../config/dev.env')
}), }),
new webpack.HotModuleReplacementPlugin(), new webpack.HotModuleReplacementPlugin(),
new webpack.NamedModulesPlugin(), // HMR shows correct file names in console on update. new webpack.NamedModulesPlugin(), // HMR shows correct file names in console on update.
new webpack.NoEmitOnErrorsPlugin(), new webpack.NoEmitOnErrorsPlugin(),
// https://github.com/ampedandwired/html-webpack-plugin // https://github.com/ampedandwired/html-webpack-plugin
new HtmlWebpackPlugin({ new HtmlWebpackPlugin({
filename: 'index.html', filename: 'index.html',
template: 'index.html', template: 'index.html',
inject: true inject: true
}), }),
// copy custom static assets // copy custom static assets
new CopyWebpackPlugin([ new CopyWebpackPlugin([
{ {
from: path.resolve(__dirname, '../static'), from: path.resolve(__dirname, '../static'),
to: config.dev.assetsSubDirectory, to: config.dev.assetsSubDirectory,
ignore: ['.*'] ignore: ['.*']
} }
]) ])
] ]
}) })
module.exports = new Promise((resolve, reject) => { module.exports = new Promise((resolve, reject) => {
portfinder.basePort = process.env.PORT || config.dev.port portfinder.basePort = process.env.PORT || config.dev.port
portfinder.getPort((err, port) => { portfinder.getPort((err, port) => {
if (err) { if (err) {
reject(err) reject(err)
} else { } else {
// publish the new Port, necessary for e2e tests // publish the new Port, necessary for e2e tests
process.env.PORT = port process.env.PORT = port
// add port to devServer config // add port to devServer config
devWebpackConfig.devServer.port = port devWebpackConfig.devServer.port = port
// Add FriendlyErrorsPlugin // Add FriendlyErrorsPlugin
devWebpackConfig.plugins.push(new FriendlyErrorsPlugin({ devWebpackConfig.plugins.push(new FriendlyErrorsPlugin({
compilationSuccessInfo: { compilationSuccessInfo: {
messages: [`Your application is running here: http://${devWebpackConfig.devServer.host}:${port}`], messages: [`Your application is running here: http://${devWebpackConfig.devServer.host}:${port}`],
}, },
onErrors: config.dev.notifyOnErrors onErrors: config.dev.notifyOnErrors
? utils.createNotifierCallback() ? utils.createNotifierCallback()
: undefined : undefined
})) }))
resolve(devWebpackConfig) resolve(devWebpackConfig)
} }
}) })
}) })
'use strict' 'use strict'
const merge = require('webpack-merge') const merge = require('webpack-merge')
const prodEnv = require('./prod.env') const prodEnv = require('./prod.env')
module.exports = merge(prodEnv, { module.exports = merge(prodEnv, {
NODE_ENV: '"development"' NODE_ENV: '"development"'
}) })
'use strict' 'use strict'
// Template version: 1.3.1 // Template version: 1.3.1
// see http://vuejs-templates.github.io/webpack for documentation. // see http://vuejs-templates.github.io/webpack for documentation.
const path = require('path') const path = require('path')
module.exports = { module.exports = {
dev: { dev: {
// Paths // Paths
assetsSubDirectory: 'static', assetsSubDirectory: 'static',
assetsPublicPath: '/', assetsPublicPath: '/',
proxyTable: { proxyTable: {
'/api': { '/api': {
target: 'http://192.168.31.231:8084',//设置你调用的接口域名和端口号 别忘了加http target: 'http://192.168.31.231:8084',//设置你调用的接口域名和端口号 别忘了加http
changeOrigin: true, changeOrigin: true,
pathRewrite: { pathRewrite: {
// '^/api': '' //这里理解成用‘/api’代替target里面的地址,后面组件中我们掉接口时直接用api代替 比如我要调用'https://api.douban.com/user/add',直接写‘/api/user/add’即可,此处的‘api’可以设置为自己想要设置的任何词语,符合规范即可 // '^/api': '' //这里理解成用‘/api’代替target里面的地址,后面组件中我们掉接口时直接用api代替 比如我要调用'https://api.douban.com/user/add',直接写‘/api/user/add’即可,此处的‘api’可以设置为自己想要设置的任何词语,符合规范即可
} }
} }
}, },
// Various Dev Server settings // Various Dev Server settings
host: '127.0.0.1', // can be overwritten by process.env.HOST host: '127.0.0.1', // 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 port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
autoOpenBrowser: false, autoOpenBrowser: false,
disableHostCheck: true, disableHostCheck: true,
errorOverlay: true, errorOverlay: true,
notifyOnErrors: true, notifyOnErrors: true,
poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions- poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions-
/** /**
* Source Maps * Source Maps
*/ */
// https://webpack.js.org/configuration/devtool/#development // https://webpack.js.org/configuration/devtool/#development
devtool: 'cheap-module-eval-source-map', devtool: 'cheap-module-eval-source-map',
// If you have problems debugging vue-files in devtools, // If you have problems debugging vue-files in devtools,
// set this to false - it *may* help // set this to false - it *may* help
// https://vue-loader.vuejs.org/en/options.html#cachebusting // https://vue-loader.vuejs.org/en/options.html#cachebusting
cacheBusting: true, cacheBusting: true,
cssSourceMap: true cssSourceMap: true
}, },
build: { build: {
// Template for index.html // Template for index.html
index: path.resolve(__dirname, '../dist/index.html'), index: path.resolve(__dirname, '../dist/index.html'),
// Paths // Paths
assetsRoot: path.resolve(__dirname, '../dist'), assetsRoot: path.resolve(__dirname, '../dist'),
assetsSubDirectory: 'static', assetsSubDirectory: 'static',
assetsPublicPath: '/', assetsPublicPath: '/',
/** /**
* Source Maps * Source Maps
*/ */
productionSourceMap: true, productionSourceMap: true,
// https://webpack.js.org/configuration/devtool/#production // https://webpack.js.org/configuration/devtool/#production
devtool: '#source-map', devtool: '#source-map',
// Gzip off by default as many popular static hosts such as // Gzip off by default as many popular static hosts such as
// Surge or Netlify already gzip all static assets for you. // Surge or Netlify already gzip all static assets for you.
// Before setting to `true`, make sure to: // Before setting to `true`, make sure to:
// npm install --save-dev compression-webpack-plugin // npm install --save-dev compression-webpack-plugin
productionGzip: false, productionGzip: false,
productionGzipExtensions: ['js', 'css'], productionGzipExtensions: ['js', 'css'],
// Run the build command with an extra argument to // Run the build command with an extra argument to
// View the bundle analyzer report after build finishes: // View the bundle analyzer report after build finishes:
// `npm run build --report` // `npm run build --report`
// Set to `true` or `false` to always turn it on or off // Set to `true` or `false` to always turn it on or off
bundleAnalyzerReport: process.env.npm_config_report bundleAnalyzerReport: process.env.npm_config_report
} }
} }
'use strict' 'use strict'
module.exports = { module.exports = {
NODE_ENV: '"production"' NODE_ENV: '"production"'
} }
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0"> <meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon"> <link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
<title>建信招标采购平台</title> <title>建信招标采购平台</title>
</head> </head>
<body> <body>
<div id="app"></div> <div id="app"></div>
<!-- built files will be auto injected --> <!-- built files will be auto injected -->
</body> </body>
</html> </html>
<template> <template>
<div id="app"> <div id="app">
<router-view></router-view> <router-view></router-view>
</div> </div>
</template> </template>
<script> <script>
export default { export default {
data: function () { data: function () {
return { return {
} }
} }
} }
</script> </script>
<style lang="less"> <style lang="less">
#app { #app {
display: flex; display: flex;
min-width: 1200px; min-width: 1200px;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
background: #F8F8F8; background: #F8F8F8;
} }
.about-code { .about-code {
li { li {
width: 130px; width: 130px;
height: 130px; height: 130px;
margin: 0; margin: 0;
padding: 0; padding: 0;
} }
} }
</style> </style>
\ No newline at end of file
/* SAMCSS-layout */ /* SAMCSS-layout */
.row { .row {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
} }
.col { .col {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
} }
.con-s { .con-s {
justify-content: flex-start; justify-content: flex-start;
} }
.con-c { .con-c {
justify-content: center; justify-content: center;
} }
.con-e { .con-e {
justify-content: flex-end; justify-content: flex-end;
} }
.con-b { .con-b {
justify-content: space-between; justify-content: space-between;
} }
.con-a { .con-a {
justify-content: space-around; justify-content: space-around;
} }
.align-s { .align-s {
align-items: flex-start; align-items: flex-start;
} }
.align-c { .align-c {
align-items: center; align-items: center;
} }
.align-e { .align-e {
align-items: flex-end; align-items: flex-end;
} }
\ No newline at end of file
/*声明 WebFont*/ /*声明 WebFont*/
@font-face { @font-face {
font-family: 'siyuanyahei'; font-family: 'siyuanyahei';
src: url('../../assets/NotoSansHans-Light.ttf'); src: url('../../assets/NotoSansHans-Light.ttf');
font-weight: normal; font-weight: normal;
font-style: normal; font-style: normal;
} }
@font-face { @font-face {
font-family: 'siyuanyahei'; font-family: 'siyuanyahei';
src: url('../../assets/NotoSansHans-Light.otf'); src: url('../../assets/NotoSansHans-Light.otf');
font-weight: normal; font-weight: normal;
font-style: normal; font-style: normal;
} }
@font-face { @font-face {
font-family: 'siyuanyahei'; font-family: 'siyuanyahei';
src: url('../../assets/NotoSansHans-Light.woff'); src: url('../../assets/NotoSansHans-Light.woff');
font-weight: normal; font-weight: normal;
font-style: normal; font-style: normal;
} }
html,body, div, span, applet, object, iframe, html,body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre, h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code, a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp, del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var, small, strike, strong, sub, sup, tt, var,
b, u, i, center, b, u, i, center,
dl, dt, dd, ol, ul, li, dl, dt, dd, ol, ul, li,
fieldset, form, label, legend, fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td, table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed, article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup, figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary, menu, nav, output, ruby, section, summary,
time, mark, audio, video { time, mark, audio, video {
font-family: 'siyuanyahei', arial; font-family: 'siyuanyahei', arial;
box-sizing: border-box !important; box-sizing: border-box !important;
margin: 0; margin: 0;
padding: 0; padding: 0;
} }
input, input,
input:focus, input:focus,
input:hover { input:hover {
outline: none !important; outline: none !important;
border-color: #dcdfe6 !important; border-color: #dcdfe6 !important;
} }
li { li {
list-style-type: none; list-style-type: none;
} }
button { button {
outline: none !important; outline: none !important;
} }
\ No newline at end of file
This diff could not be displayed because it is too large.
let output = { let output = {
/** /**
* 重新渲染表格 * 重新渲染表格
* 修复 element-ui table 不会跟随屏幕宽度自适应的问题 * 修复 element-ui table 不会跟随屏幕宽度自适应的问题
* @function * @function
* @returns * @returns
*/ */
tableRender: function (funcVue, funcContainerWidth, funcTableItemWidth, funcTableItemWidthProportion) { tableRender: function (funcVue, funcContainerWidth, funcTableItemWidth, funcTableItemWidthProportion) {
let funcWidth = 0 let funcWidth = 0
if (document.body.clientHeight > document.documentElement.clientHeight) { if (document.body.clientHeight > document.documentElement.clientHeight) {
funcWidth = funcContainerWidth / 100 funcWidth = funcContainerWidth / 100
} else { } else {
funcWidth = (funcContainerWidth - 17) / 100 funcWidth = (funcContainerWidth - 17) / 100
} }
for (let i = 0, len = funcTableItemWidth.length; i < len; i++) { for (let i = 0, len = funcTableItemWidth.length; i < len; i++) {
funcTableItemWidth[i] = Math.floor(funcTableItemWidthProportion[i] * funcWidth) funcTableItemWidth[i] = Math.floor(funcTableItemWidthProportion[i] * funcWidth)
} }
funcVue.tableShow = true funcVue.tableShow = true
}, },
} }
export default output export default output
\ No newline at end of file
let output = { let output = {
sendType: 'json', // 数据发送方式 sendType: 'json', // 数据发送方式
sendTypeEnumeration: [ 'params', 'json','form', 'formdata'], sendTypeEnumeration: [ 'params', 'json','form', 'formdata'],
method: 'post', // 请求方式 method: 'post', // 请求方式
methodEnumeration: [ 'get', 'post' ], methodEnumeration: [ 'get', 'post' ],
timeout: 10000, // 超时设置 timeout: 10000, // 超时设置
isToken: true, // 是否携带 isToken: true, // 是否携带
isLog: true, // 是否打印请求相关信息 isLog: true, // 是否打印请求相关信息
errorCode: [ 101 ], errorCode: [ 101 ],
} }
export default output export default output
\ No newline at end of file
let output = function (funcParams, funcType) { let output = function (funcParams, funcType) {
funcType = funcType.toLowerCase() funcType = funcType.toLowerCase()
switch (funcType) { switch (funcType) {
case 'url': case 'url':
if (JSON.stringify(funcParams) !== '{}') { if (JSON.stringify(funcParams) !== '{}') {
let funcQuery = '?' let funcQuery = '?'
Object.keys(funcParams).forEach((funcKey) => { Object.keys(funcParams).forEach((funcKey) => {
funcQuery = funcQuery + funcKey + '=' + funcParams[funcKey] + '&' funcQuery = funcQuery + funcKey + '=' + funcParams[funcKey] + '&'
}) })
return funcQuery.substring(0, funcQuery.length - 1) return funcQuery.substring(0, funcQuery.length - 1)
} else { } else {
return '' return ''
} }
break break
case 'json': case 'json':
return JSON.stringify(funcParams) return JSON.stringify(funcParams)
break break
case 'formdata': case 'formdata':
let funcFormData = new FormData() let funcFormData = new FormData()
Object.keys(funcParams).forEach((funcKey) => { Object.keys(funcParams).forEach((funcKey) => {
funcFormData.append(funcKey, funcParams[funcKey]) funcFormData.append(funcKey, funcParams[funcKey])
}) })
return funcFormData return funcFormData
break break
} }
} }
export default output export default output
\ No newline at end of file
let output = function (funcXMLHttpRequest, funcConfigure) { let output = function (funcXMLHttpRequest, funcConfigure) {
funcXMLHttpRequest.setRequestHeader('expires', '-10') funcXMLHttpRequest.setRequestHeader('expires', '-10')
funcXMLHttpRequest.setRequestHeader('pragma', 'no-cache') funcXMLHttpRequest.setRequestHeader('pragma', 'no-cache')
funcXMLHttpRequest.setRequestHeader('Cache-Control', 'no-cache') funcXMLHttpRequest.setRequestHeader('Cache-Control', 'no-cache')
switch (funcConfigure.sendType) { switch (funcConfigure.sendType) {
case 'json': case 'json':
funcXMLHttpRequest.setRequestHeader('Content-Type', 'application/json;') funcXMLHttpRequest.setRequestHeader('Content-Type', 'application/json;')
break break
case 'file': case 'file':
funcXMLHttpRequest.setRequestHeader('Content-Type', 'multipart/form-data;') funcXMLHttpRequest.setRequestHeader('Content-Type', 'multipart/form-data;')
break break
case 'form': case 'form':
funcXMLHttpRequest.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded;') funcXMLHttpRequest.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded;')
break break
case 'formdata': case 'formdata':
// 浏览器自行设置表头 // 浏览器自行设置表头
break break
case 'params': case 'params':
break break
} }
} }
export default output export default output
\ No newline at end of file
// 0630 // 0630
let output = { let output = {
isInt: function (value, isZero) { isInt: function (value, isZero) {
let regExp let regExp
if (isZero) { if (isZero) {
regExp = new RegExp('^(0|[1-9][0-9]*)$') regExp = new RegExp('^(0|[1-9][0-9]*)$')
} else { } else {
regExp = new RegExp('^([1-9][0-9]*)$') regExp = new RegExp('^([1-9][0-9]*)$')
} }
return regExp.test(value) return regExp.test(value)
}, },
isMoney: function (value) { isMoney: function (value) {
let regExp = new RegExp('^[0-9]+(.[0-9]{1,2})?$') let regExp = new RegExp('^[0-9]+(.[0-9]{1,2})?$')
return regExp.test(value) return regExp.test(value)
}, },
isChinese: function (value) { isChinese: function (value) {
let regExp = new RegExp('[\u4e00-\u9fa5]+', 'ig') let regExp = new RegExp('[\u4e00-\u9fa5]+', 'ig')
return regExp.test(value) return regExp.test(value)
}, },
isPhone: function (value) { isPhone: function (value) {
let regExp = new RegExp(/^(13[0-9]|14[5|7]|15[0|1|2|3|4|5|6|7|8|9]|18[0|1|2|3|5|6|7|8|9]|19[0-9])[0-9]{8}$/, 'ig') let regExp = new RegExp(/^(13[0-9]|14[5|7]|15[0|1|2|3|4|5|6|7|8|9]|18[0|1|2|3|5|6|7|8|9]|19[0-9])[0-9]{8}$/, 'ig')
return regExp.test(value) return regExp.test(value)
}, },
isFixedPhone: function (value) { isFixedPhone: function (value) {
let regExp = new RegExp(/^\d{3}-\d{7,8}|\d{4}-\d{7,8}$/, 'ig') let regExp = new RegExp(/^\d{3}-\d{7,8}|\d{4}-\d{7,8}$/, 'ig')
return regExp.test(value) return regExp.test(value)
} }
} }
export default output export default output
\ No newline at end of file
import iAtom from './atom.js' import iAtom from './atom.js'
let output = { let output = {
// 文本,除emoji符号 // 文本,除emoji符号
predefineRoutineText: function (rule, value, callback) { predefineRoutineText: function (rule, value, callback) {
let funcRegExp = new RegExp(/[\uD83C[\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F]|\uD83D[\uDE80-\uDEFF]|[\u2700-\u27BF]\uFE0F]/, 'ig') let funcRegExp = new RegExp(/[\uD83C[\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F]|\uD83D[\uDE80-\uDEFF]|[\u2700-\u27BF]\uFE0F]/, 'ig')
if (funcRegExp.test(value)) { if (funcRegExp.test(value)) {
callback(new Error('不允许使用表情符号')) callback(new Error('不允许使用表情符号'))
return return
} }
callback() callback()
}, },
// 文本,仅数字、英文字母(区分大小写) // 文本,仅数字、英文字母(区分大小写)
predefineNumeralText: function (rule, value, callback) { predefineNumeralText: function (rule, value, callback) {
let funcRegExp = new RegExp(/^[0-9a-z]+$/, 'ig') let funcRegExp = new RegExp(/^[0-9a-z]+$/, 'ig')
if (!funcRegExp.test(value)) { if (!funcRegExp.test(value)) {
callback(new Error(rule.message)) callback(new Error(rule.message))
return return
} }
callback() callback()
}, },
// 文本,仅数字 // 文本,仅数字
predefineNumeral: function (rule, value, callback) { predefineNumeral: function (rule, value, callback) {
let funcRegExp = new RegExp(/^[0-9]+$/, 'ig') let funcRegExp = new RegExp(/^[0-9]+$/, 'ig')
if (!funcRegExp.test(value)) { if (!funcRegExp.test(value)) {
callback(new Error(rule.message)) callback(new Error(rule.message))
return return
} }
callback() callback()
}, },
email: function (rule, value, callback) { email: function (rule, value, callback) {
let funcRegExp = new RegExp(/^[.A-Za-z0-9\u4e00-\u9fa5]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/, 'ig') let funcRegExp = new RegExp(/^[.A-Za-z0-9\u4e00-\u9fa5]+@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)+$/, 'ig')
if (!funcRegExp.test(value)) { if (!funcRegExp.test(value)) {
callback(new Error(rule.message)) callback(new Error(rule.message))
return return
} }
callback() callback()
}, },
idCard: function (rule, value, callback) { idCard: function (rule, value, callback) {
let funcRegExp = new RegExp(/^[1-9][0-9]{5}(18|19|20)[0-9]{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)[0-9]{3}[0-9Xx]$/, 'ig') let funcRegExp = new RegExp(/^[1-9][0-9]{5}(18|19|20)[0-9]{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)[0-9]{3}[0-9Xx]$/, 'ig')
if (!funcRegExp.test(value)) { if (!funcRegExp.test(value)) {
callback(new Error(rule.message)) callback(new Error(rule.message))
return return
} }
callback() callback()
}, },
phone: function (rule, value, callback) { phone: function (rule, value, callback) {
let funcRegExp = new RegExp(/^(13[0-9]|14[5|7]|15[0|1|2|3|4|5|6|7|8|9]|18[0|1|2|3|5|6|7|8|9]|19[0-9])[0-9]{8}$/, 'ig') let funcRegExp = new RegExp(/^(13[0-9]|14[5|7]|15[0|1|2|3|4|5|6|7|8|9]|18[0|1|2|3|5|6|7|8|9]|19[0-9])[0-9]{8}$/, 'ig')
if (!funcRegExp.test(value)) { if (!funcRegExp.test(value)) {
callback(new Error(rule.message)) callback(new Error(rule.message))
return return
} }
callback() callback()
}, },
fixedPhone: function (rule, value, callback) { fixedPhone: function (rule, value, callback) {
let funcRegExp = new RegExp(/^[0-9*#-]+$/, 'ig') let funcRegExp = new RegExp(/^[0-9*#-]+$/, 'ig')
if (!funcRegExp.test(value)) { if (!funcRegExp.test(value)) {
callback(new Error(rule.message)) callback(new Error(rule.message))
return return
} }
callback() callback()
}, },
phoneAndFixedPhone: function (rule, value, callback) { phoneAndFixedPhone: function (rule, value, callback) {
if (!iAtom.isPhone(value) && !iAtom.isFixedPhone(value)) { if (!iAtom.isPhone(value) && !iAtom.isFixedPhone(value)) {
callback(new Error(rule.message)) callback(new Error(rule.message))
return return
} }
callback() callback()
}, },
password: function (rule, value, callback) { password: function (rule, value, callback) {
let funcRegulation let funcRegulation
let funcComplexity = 0 let funcComplexity = 0
funcRegulation = /[0-9]+/ig funcRegulation = /[0-9]+/ig
if (funcRegulation.test(value)) { if (funcRegulation.test(value)) {
funcComplexity = funcComplexity + 1 funcComplexity = funcComplexity + 1
} }
funcRegulation = /[a-z]+/ig funcRegulation = /[a-z]+/ig
if (funcRegulation.test(value)) { if (funcRegulation.test(value)) {
funcComplexity = funcComplexity + 1 funcComplexity = funcComplexity + 1
} }
funcRegulation = /((?=[\x21-\x7e]+)[^A-Za-z0-9])/ig funcRegulation = /((?=[\x21-\x7e]+)[^A-Za-z0-9])/ig
if (funcRegulation.test(value)) { if (funcRegulation.test(value)) {
funcComplexity = funcComplexity + 1 funcComplexity = funcComplexity + 1
} }
if (funcComplexity < 2) { if (funcComplexity < 2) {
callback(new Error(rule.message)) callback(new Error(rule.message))
return return
} }
callback() callback()
}, },
passwordRepeat: function (rule, value, callback, password) { passwordRepeat: function (rule, value, callback, password) {
if (value !== password) { if (value !== password) {
callback(new Error(rule.message)) callback(new Error(rule.message))
return return
} }
callback() callback()
}, },
unEmoji: function (rule, value, callback) { unEmoji: function (rule, value, callback) {
let funcRegExp = new RegExp(/[\uD83C|\uD83D|\uD83E][\uDC00-\uDFFF][\u200D|\uFE0F]|[\uD83C|\uD83D|\uD83E][\uDC00-\uDFFF]|[0-9|*|#]\uFE0F\u20E3|[0-9|#]\u20E3|[\u203C-\u3299]\uFE0F\u200D|[\u203C-\u3299]\uFE0F|[\u2122-\u2B55]|\u303D|[\A9|\AE]\u3030|\uA9|\uAE|\u3030/, 'ig') let funcRegExp = new RegExp(/[\uD83C|\uD83D|\uD83E][\uDC00-\uDFFF][\u200D|\uFE0F]|[\uD83C|\uD83D|\uD83E][\uDC00-\uDFFF]|[0-9|*|#]\uFE0F\u20E3|[0-9|#]\u20E3|[\u203C-\u3299]\uFE0F\u200D|[\u203C-\u3299]\uFE0F|[\u2122-\u2B55]|\u303D|[\A9|\AE]\u3030|\uA9|\uAE|\u3030/, 'ig')
if (funcRegExp.test(value)) { if (funcRegExp.test(value)) {
callback(new Error(rule.message)) callback(new Error(rule.message))
return return
} }
callback() callback()
}, },
unSpace: function (rule, value, callback) { unSpace: function (rule, value, callback) {
let funcRegExp = new RegExp(/ /, 'ig') let funcRegExp = new RegExp(/ /, 'ig')
if (funcRegExp.test(value)) { if (funcRegExp.test(value)) {
callback(new Error(rule.message)) callback(new Error(rule.message))
return return
} }
callback() callback()
}, },
unChinese: function (rule, value, callback) { unChinese: function (rule, value, callback) {
let regExp = new RegExp('[\u4e00-\u9fa5]+', 'ig') let regExp = new RegExp('[\u4e00-\u9fa5]+', 'ig')
regExp.test(value) ? callback(new Error(rule.message)) : callback() regExp.test(value) ? callback(new Error(rule.message)) : callback()
}, },
// 无符号正整数 // 无符号正整数
signlessInteger: function (rule, value, callback) { signlessInteger: function (rule, value, callback) {
if (!iAtom.isInt(value, true)) { if (!iAtom.isInt(value, true)) {
callback(new Error(rule.message)) callback(new Error(rule.message))
return return
} }
callback() callback()
}, },
// 无符号非零正整数 // 无符号非零正整数
signlessIntegerNonZero: function (rule, value, callback) { signlessIntegerNonZero: function (rule, value, callback) {
if (!iAtom.isInt(value, false)) { if (!iAtom.isInt(value, false)) {
callback(new Error(rule.message)) callback(new Error(rule.message))
return return
} }
callback() callback()
} }
} }
export default output export default output
\ No newline at end of file
let output = function () { let output = function () {
return new Date() return new Date()
// return 1590564000000 // return 1590564000000
// return 1590654903000 // 2020-05-28 16:35:03 // return 1590654903000 // 2020-05-28 16:35:03
// return 1591778103000 // 2020-06-10 16:35:03 // return 1591778103000 // 2020-06-10 16:35:03
// return 1592469303000 // 2020-06-18 16:35:03 // return 1592469303000 // 2020-06-18 16:35:03
// return 1592728503000 // 2020-06-21 16:35:03 // return 1592728503000 // 2020-06-21 16:35:03
} }
export default output export default output
\ No newline at end of file
import iBase64 from 'js-base64'; import iBase64 from 'js-base64';
let output = { let output = {
/** /**
* 提取令牌有效期限 * 提取令牌有效期限
* @function * @function
* @param {event} * @param {event}
* @returns * @returns
*/ */
term: function (funcToken) { term: function (funcToken) {
let funcIndex = funcToken.indexOf('.') + 1 let funcIndex = funcToken.indexOf('.') + 1
let funcDateBase = funcToken.substring(funcIndex) let funcDateBase = funcToken.substring(funcIndex)
funcIndex = funcDateBase.indexOf('.') funcIndex = funcDateBase.indexOf('.')
funcDateBase = funcDateBase.substring(0, funcIndex) funcDateBase = funcDateBase.substring(0, funcIndex)
let funcDateInfo = iBase64.Base64.decode(funcDateBase) let funcDateInfo = iBase64.Base64.decode(funcDateBase)
let funcDateKey = '"exp":' let funcDateKey = '"exp":'
let funcDateString = funcDateInfo.substring(funcDateInfo.indexOf(funcDateKey) + funcDateKey.length, funcDateInfo.length) let funcDateString = funcDateInfo.substring(funcDateInfo.indexOf(funcDateKey) + funcDateKey.length, funcDateInfo.length)
funcDateString = funcDateString.substring(0, funcDateString.indexOf(',')) funcDateString = funcDateString.substring(0, funcDateString.indexOf(','))
return Number(funcDateString) return Number(funcDateString)
}, },
/** /**
* 根据时间判断当前令牌状态 * 根据时间判断当前令牌状态
* @function * @function
* @param {string} - funcToken * @param {string} - funcToken
* @returns * @returns
*/ */
state: function (funcToken) { state: function (funcToken) {
let funcDate = output.term(funcToken) let funcDate = output.term(funcToken)
let funcNowDate = Math.round(new Date() / 1000) let funcNowDate = Math.round(new Date() / 1000)
// 令牌有效 // 令牌有效
if (funcNowDate < funcDate) { if (funcNowDate < funcDate) {
// 判断当前时间是否小于令牌期限 // 判断当前时间是否小于令牌期限
if (funcNowDate + 1200 < funcDate) { if (funcNowDate + 1200 < funcDate) {
// 令牌有效时间大于安全时间 // 令牌有效时间大于安全时间
console.log('[token] valid') console.log('[token] valid')
return 'valid' return 'valid'
} else { } else {
console.log('[token] refresh') console.log('[token] refresh')
return 'refresh' return 'refresh'
} }
} }
// 令牌无效继续判断刷新令牌是否有效 // 令牌无效继续判断刷新令牌是否有效
funcDate = output.term(localStorage.getItem('refresh')) funcDate = output.term(localStorage.getItem('refresh'))
// 令牌过期,刷新令牌有效需要重新登录 // 令牌过期,刷新令牌有效需要重新登录
if (funcNowDate < funcDate) { if (funcNowDate < funcDate) {
console.log('[token] relist') console.log('[token] relist')
return 'relist' return 'relist'
} }
// 令牌过期,刷新令牌过期默认游客身份 // 令牌过期,刷新令牌过期默认游客身份
if (funcNowDate > funcDate) { if (funcNowDate > funcDate) {
console.log('[token] invalid') console.log('[token] invalid')
return 'invalid' return 'invalid'
} }
}, },
} }
export default output export default output
\ No newline at end of file
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
<div class="record-info global-maxwidth row con-c align-c"> <div class="record-info global-maxwidth row con-c align-c">
<span>©2020</span> <span>©2020</span>
<span>建信发展(厦门)采购招标有限公司</span> <span>建信发展(厦门)采购招标有限公司</span>
<span><a href="http://www.beian.miit.gov.cn/" target="view_window">备案号:闽ICP备18026805号-4</a></span> <span><a href="https://beian.miit.gov.cn/" target="view_window">备案号:闽ICP备18026805号-4</a></span>
</div> </div>
</div> </div>
</template> </template>
......
<template> <template>
<!-- 通用组件 - 侧边菜单 --> <!-- 通用组件 - 侧边菜单 -->
<div class="components-navigation-top"> <div class="components-navigation-top">
</div> </div>
</template> </template>
<script> <script>
export default { export default {
name: 'componentsNavigationTop', name: 'componentsNavigationTop',
data () { data () {
return { return {
formSignIn: { formSignIn: {
account: '', // 账号 account: '', // 账号
password: '', // 密码 password: '', // 密码
code: '' // 动态密令 code: '' // 动态密令
}, },
rule: { rule: {
account: [ account: [
{ required: true, message: '请输入活动名称', trigger: 'blur' }, { required: true, message: '请输入活动名称', trigger: 'blur' },
], ],
password: [ password: [
{ required: true, message: '请选择活动区域', trigger: 'change' } { required: true, message: '请选择活动区域', trigger: 'change' }
], ],
code: [ code: [
{ required: true, message: '请选择活动区域', trigger: 'change' } { required: true, message: '请选择活动区域', trigger: 'change' }
] ]
} }
} }
} }
} }
</script> </script>
<style lang="less"> <style lang="less">
</style> </style>
<template> <template>
<!-- 信息模板 - 相关公告 --> <!-- 信息模板 - 相关公告 -->
<div class="components-relation col con-b"> <div class="components-relation col con-b">
<div class="list"> <div class="list">
<div class="item global-overflow-ellipsis" v-for="(item, index) in noticeBuffer" :key="index"> <div class="item global-overflow-ellipsis" v-for="(item, index) in noticeBuffer" :key="index">
<span class="global-cursor" @click="onBidDetails(item)">{{item.title}}</span> <span class="global-cursor" @click="onBidDetails(item)">{{item.title}}</span>
</div> </div>
</div> </div>
<div class="pagination row con-c align-c"> <div class="pagination row con-c align-c">
<div class="current row con-c align-c" v-for="(item, index) in noticeTotal" :key="index" @click="onPagination(index, 'current', searchOtherNotice)"> <div class="current row con-c align-c" v-for="(item, index) in noticeTotal" :key="index" @click="onPagination(index, 'current', searchOtherNotice)">
<div :class="index === searchOtherNotice.current ? 'active' : 'unactive'"></div> <div :class="index === searchOtherNotice.current ? 'active' : 'unactive'"></div>
</div> </div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import iFramePagination from '@/common/frame/pagination/pagination.js' import iFramePagination from '@/common/frame/pagination/pagination.js'
export default { export default {
data () { data () {
return { return {
noticeTotal: 1, noticeTotal: 1,
noticeBuffer: [], noticeBuffer: [],
searchOtherNotice: { searchOtherNotice: {
size: 8, size: 8,
total: 0, total: 0,
current: 0, current: 0,
} }
} }
}, },
computed: { computed: {
componentNotice: function () { componentNotice: function () {
return this.$store.state.componentNotice return this.$store.state.componentNotice
}, },
}, },
watch: { watch: {
componentNotice: { componentNotice: {
handler: function (funcNewValue, funcOldValue) { handler: function (funcNewValue, funcOldValue) {
this.setNotice() this.setNotice()
}, },
deep: true, deep: true,
immediate: true, immediate: true,
} }
}, },
created: function () { created: function () {
this.setNotice() this.setNotice()
}, },
methods: { methods: {
setNotice: function () { setNotice: function () {
let funcSize = this.searchOtherNotice.size let funcSize = this.searchOtherNotice.size
let funcIndex = this.searchOtherNotice.current let funcIndex = this.searchOtherNotice.current
this.noticeBuffer = [] this.noticeBuffer = []
this.noticeTotal = Math.ceil(this.componentNotice.length / this.searchOtherNotice.size) this.noticeTotal = Math.ceil(this.componentNotice.length / this.searchOtherNotice.size)
for (let i = funcSize * funcIndex, len = funcSize * (funcIndex + 1); i < len; i++) { for (let i = funcSize * funcIndex, len = funcSize * (funcIndex + 1); i < len; i++) {
if (this.componentNotice[i]) { if (this.componentNotice[i]) {
this.noticeBuffer.push(this.componentNotice[i]) this.noticeBuffer.push(this.componentNotice[i])
} }
} }
}, },
onBidDetails: function (funcItem) { onBidDetails: function (funcItem) {
this.$router.replace('/bid/notice?type=' + funcItem.type + '&id=' + funcItem.id) this.$router.replace('/bid/notice?type=' + funcItem.type + '&id=' + funcItem.id)
}, },
onPagination: function (funcValue, funcType, funcUpdateObject) { onPagination: function (funcValue, funcType, funcUpdateObject) {
iFramePagination(funcValue, funcType, funcUpdateObject) iFramePagination(funcValue, funcType, funcUpdateObject)
this.setNotice() this.setNotice()
}, },
} }
} }
</script> </script>
<style lang="less"> <style lang="less">
.components-relation { .components-relation {
width: 100%; width: 100%;
height: 200px; height: 200px;
.list { .list {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
justify-content: space-between; justify-content: space-between;
flex-wrap: wrap; flex-wrap: wrap;
.item { .item {
width: 50%; width: 50%;
margin-bottom: 20px; margin-bottom: 20px;
padding-right: 30px; padding-right: 30px;
font-size: @fontSize01; font-size: @fontSize01;
::before { ::before {
content: '·'; content: '·';
display: inline-block; display: inline-block;
width: 4px; width: 4px;
height: 4px; height: 4px;
margin-right: 8px; margin-right: 8px;
} }
} }
} }
.pagination { .pagination {
.current { .current {
width: 20px; width: 20px;
height: 20px; height: 20px;
> div { > div {
width: 8px; width: 8px;
height: 8px; height: 8px;
border-radius: 50%; border-radius: 50%;
} }
} }
.active { .active {
background: #CF2F1E; background: #CF2F1E;
} }
.unactive { .unactive {
background: #00468C; background: #00468C;
} }
} }
} }
</style> </style>
const output = { const output = {
urlFormat: function (value) { urlFormat: function (value) {
if (!value) return value if (!value) return value
let funcRegExp = new RegExp('^(https://)|(http://)', 'i') let funcRegExp = new RegExp('^(https://)|(http://)', 'i')
if (!funcRegExp.test(value)) { if (!funcRegExp.test(value)) {
value = 'http://' + value value = 'http://' + value
} }
console.log('[filter]', value) console.log('[filter]', value)
return value return value
} }
} }
export default output export default output
\ No newline at end of file
import 'babel-polyfill' import 'babel-polyfill'
import Vue from 'vue' import Vue from 'vue'
import App from './App' import App from './App'
import store from './store/store.js' import store from './store/store.js'
import filter from './filter/filter.js' import filter from './filter/filter.js'
import router from './router/router.js' import router from './router/router.js'
Object.keys(filter).forEach(key => { Object.keys(filter).forEach(key => {
Vue.filter(key, filter[key]) Vue.filter(key, filter[key])
}) })
import ElementUi from 'element-ui' import ElementUi from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css' import 'element-ui/lib/theme-chalk/index.css'
import './common/css/reset.css' import './common/css/reset.css'
import './common/css/flex.css' import './common/css/flex.css'
Vue.use(ElementUi) Vue.use(ElementUi)
Vue.config.productionTip = false Vue.config.productionTip = false
/* eslint-disable no-new */ /* eslint-disable no-new */
let output = new Vue({ let output = new Vue({
'el': '#app', 'el': '#app',
'store': store, 'store': store,
'router': router, 'router': router,
'components': { App }, 'components': { App },
'template': '<App/>' 'template': '<App/>'
}) })
export default output export default output
\ No newline at end of file
localStorage localStorage
请求令牌 - {string} token: '' 请求令牌 - {string} token: ''
刷新令牌 - {string} refresh: '' 刷新令牌 - {string} refresh: ''
专家登录信息 - {object} signInInfo: {} | { phone: '', password: '' } 专家登录信息 - {object} signInInfo: {} | { phone: '', password: '' }
供应登录信息 - {object} signInInfo: {} | { phone: '', password: '' } 供应登录信息 - {object} signInInfo: {} | { phone: '', password: '' }
登录身份 - {string} identity: '' - 1 - 专家, 2 - 供应商 登录身份 - {string} identity: '' - 1 - 专家, 2 - 供应商
注册状态 - {string} register: '' - 0 - 审核中, 1 - 通过, 2 - 不通过 注册状态 - {string} register: '' - 0 - 审核中, 1 - 通过, 2 - 不通过
sessionStorage sessionStorage
\ No newline at end of file
<template> <template>
<div class="not-found"> <div class="not-found">
<span>404</span> <span>404</span>
</div> </div>
</template> </template>
<script> <script>
import iRule from '@/common/js/request/request.js' import iRule from '@/common/js/request/request.js'
import iRequest from '@/common/js/request/request.js' import iRequest from '@/common/js/request/request.js'
export default { export default {
components: {}, components: {},
data: function () { data: function () {
return { return {
} }
}, },
created: function () { created: function () {
this.$router.push('/') this.$router.push('/')
}, },
watch: {}, watch: {},
methods: {}, methods: {},
} }
</script> </script>
<style lang="less"> <style lang="less">
</style> </style>
<template> <template>
<div class="about col align-c"> <div class="about col align-c">
<componentHeader></componentHeader> <componentHeader></componentHeader>
<componentNavigation></componentNavigation> <componentNavigation></componentNavigation>
<div class="about-banner row con-c align-c"> <div class="about-banner row con-c align-c">
<img src="../assets/about.png" alt=""> <img src="../assets/about.png" alt="">
</div> </div>
<div class="global-maxwidth about-us row con-c"> <div class="global-maxwidth about-us row con-c">
<div class="about-us-info"> <div class="about-us-info">
<p><span>厦门建发集团有限公司</span>系厦门市属国有企业,创立于1980年12月,经过三十多年的创新与变革,公司已发展成为注册资本65.5亿元、年营业收入超过2800亿元、资产总额超过2500亿元的大型实业投资企业集团,业务涵盖供应链运营、房地产开发、旅游酒店、会展业、医疗、投资等,排名2019年度《财富》"世界500强"第277位、2019中国企业500强第71位、中国服务业500强第39位。</p> <p><span>厦门建发集团有限公司</span>系厦门市属国有企业,创立于1980年12月,经过三十多年的创新与变革,公司已发展成为注册资本65.5亿元、年营业收入超过2800亿元、资产总额超过2500亿元的大型实业投资企业集团,业务涵盖供应链运营、房地产开发、旅游酒店、会展业、医疗、投资等,排名2019年度《财富》"世界500强"第277位、2019中国企业500强第71位、中国服务业500强第39位。</p>
<p>今后集团将通过扩大现有核心产业的投资、适度增强现有新兴产业投资、积极对现有其他投资企业进行资本运作,并尝试一些新领域投资,将采取传统产业项目与高科技项目相结合、产业投资与战略投资、风险投资相结合、独立投资经营与合资合作相结合的策略,促进重点领域核心竞争力的形成与升级,实现投资收益的较大增长和核心产业品牌增值,促使集团稳步发展。</p> <p>今后集团将通过扩大现有核心产业的投资、适度增强现有新兴产业投资、积极对现有其他投资企业进行资本运作,并尝试一些新领域投资,将采取传统产业项目与高科技项目相结合、产业投资与战略投资、风险投资相结合、独立投资经营与合资合作相结合的策略,促进重点领域核心竞争力的形成与升级,实现投资收益的较大增长和核心产业品牌增值,促使集团稳步发展。</p>
<p><span>地址:厦门市思明区创想中心A座1801单元</span></p> <p><span>地址:厦门市思明区创想中心A座1801单元</span></p>
<p><span>电话:0592-5859311</span></p> <p><span>电话:0592-5859311</span></p>
</div> </div>
<div class="about-us-amp"> <div class="about-us-amp">
<img src="../assets/about-map.png" alt=""> <img src="../assets/about-map.png" alt="">
</div> </div>
</div> </div>
<componentFooter></componentFooter> <componentFooter></componentFooter>
</div> </div>
</template> </template>
<script> <script>
import iHeader from '@/components/currency-header.vue' import iHeader from '@/components/currency-header.vue'
import iNavigation from '@/components/currency-navigation.vue' import iNavigation from '@/components/currency-navigation.vue'
import iFooter from '@/components/currency-footer.vue' import iFooter from '@/components/currency-footer.vue'
export default { export default {
components: { components: {
componentHeader: iHeader, componentHeader: iHeader,
componentNavigation: iNavigation, componentNavigation: iNavigation,
componentFooter: iFooter, componentFooter: iFooter,
}, },
data: function () { data: function () {
return { return {
} }
} }
} }
</script> </script>
<style lang="less"> <style lang="less">
.about { .about {
width: 100%; width: 100%;
background-image: url(@backgroundImageUrl); background-image: url(@backgroundImageUrl);
background-repeat: no-repeat; background-repeat: no-repeat;
.about-banner { .about-banner {
align-items: center; align-items: center;
flex-direction: column; flex-direction: column;
max-width: 100%; max-width: 100%;
width: 100%; width: 100%;
overflow: hidden; overflow: hidden;
img { img {
height: 400px; height: 400px;
} }
} }
.about-us { .about-us {
width: 1200px; width: 1200px;
height: 508px; height: 508px;
margin: 50px 0; margin: 50px 0;
padding: 54px 44px 54px 32px; padding: 54px 44px 54px 32px;
background: @colorWhite; background: @colorWhite;
box-shadow: 0px 0px 20px 0px rgba(41, 41, 41, 0.05); box-shadow: 0px 0px 20px 0px rgba(41, 41, 41, 0.05);
.about-us-info { .about-us-info {
margin-right: 26px; margin-right: 26px;
> p { > p {
margin-bottom: 8px; margin-bottom: 8px;
line-height: 2.0; line-height: 2.0;
font-size: @fontSize02; font-size: @fontSize02;
color: @colorGrey60; color: @colorGrey60;
text-indent: 2em; text-indent: 2em;
span { span {
color: @colorGrey00; color: @colorGrey00;
} }
} }
} }
} }
.bm-view { .bm-view {
width: 100%; width: 100%;
height: 300px; height: 300px;
} }
} }
</style> </style>
\ No newline at end of file
<template> <template>
<div class="public-information"> <div class="public-information">
<span>public-information</span> <span>public-information</span>
</div> </div>
</template> </template>
<script> <script>
export default { export default {
name: 'publicInformation' name: 'publicInformation'
} }
</script> </script>
<style lang="less"> <style lang="less">
</style> </style>
\ No newline at end of file
<template> <template>
<!-- 用户中心组件 - 侧边菜单 --> <!-- 用户中心组件 - 侧边菜单 -->
<div class="components-personal-sidebar row con-b align-c"> <div class="components-personal-sidebar row con-b align-c">
<el-menu class="sidebar" @select="onSelectItem"> <el-menu class="sidebar" @select="onSelectItem">
<el-menu-item v-if="info ? info.register === 1 : true" index="1"> <el-menu-item v-if="info ? info.register === 1 : true" index="1">
<span slot="title">工作台首页</span> <span slot="title">工作台首页</span>
</el-menu-item> </el-menu-item>
<el-submenu v-if="info ? info.register === 1 : true" index="2"> <el-submenu v-if="info ? info.register === 1 : true" index="2">
<template slot="title"> <template slot="title">
<span>投标管理</span> <span>投标管理</span>
</template> </template>
<el-menu-item index="2-1">我投标的项目</el-menu-item> <el-menu-item index="2-1">我投标的项目</el-menu-item>
<el-menu-item index="2-2">我竞价的项目</el-menu-item> <el-menu-item index="2-2">我竞价的项目</el-menu-item>
</el-submenu> </el-submenu>
<el-menu-item v-if="info ? info.register === 1 : true" index="3"> <el-menu-item v-if="info ? info.register === 1 : true" index="3">
<span slot="title">我的订单</span> <span slot="title">我的订单</span>
</el-menu-item> </el-menu-item>
<el-submenu index="4"> <el-submenu index="4">
<template slot="title"> <template slot="title">
<span>账号管理</span> <span>账号管理</span>
</template> </template>
<el-menu-item index="4-1">企业信息</el-menu-item> <el-menu-item index="4-1">企业信息</el-menu-item>
<el-menu-item index="4-2">更换手机号码</el-menu-item> <el-menu-item index="4-2">更换手机号码</el-menu-item>
<el-menu-item index="4-3">修改登录密码</el-menu-item> <el-menu-item index="4-3">修改登录密码</el-menu-item>
</el-submenu> </el-submenu>
</el-menu> </el-menu>
</div> </div>
</template> </template>
<script> <script>
export default { export default {
data: function () { data: function () {
return { return {
} }
}, },
computed: { computed: {
info: function () { info: function () {
return this.$store.state.info return this.$store.state.info
}, },
}, },
watch: { watch: {
info: { info: {
handler: function (funcNewValue, funcOldValue) { handler: function (funcNewValue, funcOldValue) {
}, },
deep: true, deep: true,
immediate: true, immediate: true,
}, },
}, },
methods: { methods: {
onSelectItem: function (funcIndex) { onSelectItem: function (funcIndex) {
switch (funcIndex) { switch (funcIndex) {
case '1': case '1':
this.$router.push('/supplier') this.$router.push('/supplier')
break break
case '2-1': case '2-1':
this.$router.push('/supplier/bidding') this.$router.push('/supplier/bidding')
break break
case '2-2': case '2-2':
this.$router.push('/supplier/auction') this.$router.push('/supplier/auction')
break break
case '3': case '3':
this.$router.push('/supplier/orders') this.$router.push('/supplier/orders')
break break
case '4-1': case '4-1':
this.$router.push('/supplier/info') this.$router.push('/supplier/info')
break break
case '4-2': case '4-2':
this.$router.push('/supplier/infophone') this.$router.push('/supplier/infophone')
break break
case '4-3': case '4-3':
this.$router.push('/supplier/infopassword') this.$router.push('/supplier/infopassword')
break break
} }
}, },
} }
} }
</script> </script>
<style lang="less"> <style lang="less">
.components-personal-sidebar { .components-personal-sidebar {
.sidebar { .sidebar {
width: 220px; width: 220px;
height: 100%; height: 100%;
min-height: 908px; min-height: 908px;
background: #FBFBFB; background: #FBFBFB;
border: 1px solid #EFEFEF; border: 1px solid #EFEFEF;
.el-menu-item { .el-menu-item {
height: 50px; height: 50px;
} }
div, div,
ul, ul,
li { li {
background: #FBFBFB; background: #FBFBFB;
} }
} }
} }
</style> </style>
<template> <template>
<!-- 用户中心 --> <!-- 用户中心 -->
<div class="supplier"> <div class="supplier">
<componentHeader></componentHeader> <componentHeader></componentHeader>
<div class="row"> <div class="row">
<componentSidebar></componentSidebar> <componentSidebar></componentSidebar>
<div class="main"> <div class="main">
<router-view></router-view> <router-view></router-view>
</div> </div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import iRule from '@/common/js/request/request.js' import iRule from '@/common/js/request/request.js'
import iRequest from '@/common/js/request/request.js' import iRequest from '@/common/js/request/request.js'
import iHeader from './component/personal-header.vue' import iHeader from './component/personal-header.vue'
import iSidebar from './component/personal-sidebar.vue' import iSidebar from './component/personal-sidebar.vue'
export default { export default {
components: { components: {
componentHeader: iHeader, componentHeader: iHeader,
componentSidebar: iSidebar, componentSidebar: iSidebar,
}, },
data: function () { data: function () {
return { return {
// 仅能访问的受限页面 // 仅能访问的受限页面
authorityLimit: [ authorityLimit: [
'/supplier/info', '/supplier/info',
'/supplier/infochange', '/supplier/infochange',
'/supplier/inforecord', '/supplier/inforecord',
'/supplier/infophone', '/supplier/infophone',
'/supplier/infopassword', '/supplier/infopassword',
'/supplier/notify', '/supplier/notify',
] ]
} }
}, },
computed: { computed: {
info: function () { info: function () {
return this.$store.state.info return this.$store.state.info
}, },
}, },
watch: { watch: {
info: { info: {
handler: function (funcNewValue, funcOldValue) { handler: function (funcNewValue, funcOldValue) {
}, },
deep: true, deep: true,
immediate: true, immediate: true,
}, },
$route: { $route: {
handler: function (funcNewValue, funcOldValue) { handler: function (funcNewValue, funcOldValue) {
this.authority(funcNewValue.fullPath) this.authority(funcNewValue.fullPath)
}, },
deep: true, deep: true,
immediate: true, immediate: true,
}, },
}, },
methods: { methods: {
authority: function (funcPath) { authority: function (funcPath) {
if (!this.info) return if (!this.info) return
switch(this.info.register) { switch(this.info.register) {
// 注册账号未通过初审 // 注册账号未通过初审
case 0: case 0:
if (this.authorityLimit.indexOf(funcPath) === -1) { if (this.authorityLimit.indexOf(funcPath) === -1) {
this.$router.push('/supplier/info') this.$router.push('/supplier/info')
} }
break break
} }
}, },
}, },
} }
</script> </script>
<style lang="less"> <style lang="less">
.supplier { .supplier {
width: 100%; width: 100%;
background: #FFFFFF; background: #FFFFFF;
.main { .main {
position: relative; position: relative;
width: 100%; width: 100%;
padding: 0 32px; padding: 0 32px;
} }
} }
</style> </style>
<template> <template>
<div class="public-bid col align-c"> <div class="public-bid col align-c">
<componentHeader></componentHeader> <componentHeader></componentHeader>
<componentNavigation></componentNavigation> <componentNavigation></componentNavigation>
<router-view></router-view> <router-view></router-view>
<componentFooter></componentFooter> <componentFooter></componentFooter>
</div> </div>
</template> </template>
<script> <script>
import iHeader from '@/components/currency-header.vue' import iHeader from '@/components/currency-header.vue'
import iNavigation from '@/components/currency-navigation.vue' import iNavigation from '@/components/currency-navigation.vue'
import iFooter from '@/components/currency-footer.vue' import iFooter from '@/components/currency-footer.vue'
export default { export default {
components: { components: {
componentHeader: iHeader, componentHeader: iHeader,
componentNavigation: iNavigation, componentNavigation: iNavigation,
componentFooter: iFooter componentFooter: iFooter
}, },
data: function () { data: function () {
return { return {
} }
}, },
methods: { methods: {
} }
} }
</script> </script>
<style lang="less"> <style lang="less">
.public-bid { .public-bid {
width: 100%; width: 100%;
background-image: url(@backgroundImageUrl); background-image: url(@backgroundImageUrl);
background-repeat: no-repeat; background-repeat: no-repeat;
} }
</style> </style>
\ No newline at end of file
<template> <template>
<div class="public-help col align-c"> <div class="public-help col align-c">
<componentHeader></componentHeader> <componentHeader></componentHeader>
<componentNavigation></componentNavigation> <componentNavigation></componentNavigation>
<router-view></router-view> <router-view></router-view>
<componentFooter></componentFooter> <componentFooter></componentFooter>
</div> </div>
</template> </template>
<script> <script>
import iHeader from '@/components/currency-header.vue' import iHeader from '@/components/currency-header.vue'
import iNavigation from '@/components/currency-navigation.vue' import iNavigation from '@/components/currency-navigation.vue'
import iFooter from '@/components/currency-footer.vue' import iFooter from '@/components/currency-footer.vue'
export default { export default {
components: { components: {
componentHeader: iHeader, componentHeader: iHeader,
componentNavigation: iNavigation, componentNavigation: iNavigation,
componentFooter: iFooter componentFooter: iFooter
}, },
data: function () { data: function () {
return { return {
} }
}, },
methods: { methods: {
} }
} }
</script> </script>
<style lang="less"> <style lang="less">
.public-help { .public-help {
width: 100%; width: 100%;
background-image: url(@backgroundImageUrl); background-image: url(@backgroundImageUrl);
background-repeat: no-repeat; background-repeat: no-repeat;
} }
</style> </style>
\ No newline at end of file
<template> <template>
<div class="public-policy-details col align-c"> <div class="public-policy-details col align-c">
<div class="title row con-c align-c"> <div class="title row con-c align-c">
<div class="global-maxwidth"> <div class="global-maxwidth">
<span>政策法规</span> <span>政策法规</span>
</div> </div>
</div> </div>
<div class="main global-maxwidth"> <div class="main global-maxwidth">
<!-- 页面地图 --> <!-- 页面地图 -->
<div> <div>
<currencyMap></currencyMap> <currencyMap></currencyMap>
</div> </div>
<div class="info-title col align-c"> <div class="info-title col align-c">
<span>{{title}}</span> <span>{{title}}</span>
<span>{{'发布时间:' + releaseTime}}</span> <span>{{'发布时间:' + releaseTime}}</span>
</div> </div>
<!-- 政策法规 --> <!-- 政策法规 -->
<div class="info-item content"> <div class="info-item content">
<div v-html="content"></div> <div v-html="content"></div>
</div> </div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import iMiment from 'miment' import iMiment from 'miment'
import iHost from '@/common/js/host.js' import iHost from '@/common/js/host.js'
import iRequest from '@/common/js/request/request.js' import iRequest from '@/common/js/request/request.js'
import iCurrencyMap from '@/components/currency-map.vue' import iCurrencyMap from '@/components/currency-map.vue'
export default { export default {
components: { components: {
currencyMap: iCurrencyMap currencyMap: iCurrencyMap
}, },
data: function () { data: function () {
return { return {
title: '', title: '',
releaseTime: '', releaseTime: '',
content: '' content: ''
} }
}, },
created: function () { created: function () {
this.initInfoDetails() this.initInfoDetails()
this.$store.commit('redirectPath', this.$route.fullPath) this.$store.commit('redirectPath', this.$route.fullPath)
}, },
methods: { methods: {
initInfoDetails: function () { initInfoDetails: function () {
let funcParam = { let funcParam = {
'id': this.$route.query.id 'id': this.$route.query.id
} }
iRequest.request(iHost.base + 'bid/zPolicy/detail', funcParam, 'json', 'post') iRequest.request(iHost.base + 'bid/zPolicy/detail', funcParam, 'json', 'post')
.then((funcResponse) => { .then((funcResponse) => {
this.title = this.content = funcResponse.zPolicy.title this.title = this.content = funcResponse.zPolicy.title
this.releaseTime = iMiment(funcResponse.zPolicy.releaseTime).format('YYYY-MM-DD hh:mm') this.releaseTime = iMiment(funcResponse.zPolicy.releaseTime).format('YYYY-MM-DD hh:mm')
this.content = funcResponse.zPolicy.content this.content = funcResponse.zPolicy.content
}) })
.catch((funcError) => { .catch((funcError) => {
this.$message.error(funcError.message) this.$message.error(funcError.message)
}) })
} }
} }
} }
</script> </script>
<style lang="less"> <style lang="less">
.public-policy-details { .public-policy-details {
width: 100%; width: 100%;
background-image: url(@backgroundImageUrl); background-image: url(@backgroundImageUrl);
background-repeat: no-repeat; background-repeat: no-repeat;
.title { .title {
width: 100%; width: 100%;
height: 90px; height: 90px;
background-image: url(../../assets/bg-title.png); background-image: url(../../assets/bg-title.png);
background-repeat: no-repeat; background-repeat: no-repeat;
span { span {
font-size: @fontSize06; font-size: @fontSize06;
color: @colorWhite; color: @colorWhite;
} }
} }
.main { .main {
min-height: 400px; min-height: 400px;
margin: 36px 0; margin: 36px 0;
padding: 32px 32px 0 32px; padding: 32px 32px 0 32px;
background: @colorWhite; background: @colorWhite;
box-shadow:0px 0px 20px 0px rgba(41,41,41,0.05); box-shadow:0px 0px 20px 0px rgba(41,41,41,0.05);
.info-title { .info-title {
margin: 30px 0; margin: 30px 0;
padding-bottom: 38px; padding-bottom: 38px;
border-bottom: 1px @colorGrey90 solid; border-bottom: 1px @colorGrey90 solid;
> span:nth-child(1) { > span:nth-child(1) {
font-size: @fontSize06; font-size: @fontSize06;
} }
> span:nth-child(2) { > span:nth-child(2) {
margin-top: 14px; margin-top: 14px;
color: @colorGrey40; color: @colorGrey40;
font-size: @fontSize01; font-size: @fontSize01;
} }
} }
.info-item { .info-item {
margin-bottom: 54px; margin-bottom: 54px;
} }
.content { .content {
overflow: hidden; overflow: hidden;
line-height: 1.5; line-height: 1.5;
// 对应后台富文本编辑边框样式 // 对应后台富文本编辑边框样式
table { table {
border-top: 1px solid #ccc; border-top: 1px solid #ccc;
border-left: 1px solid #ccc; border-left: 1px solid #ccc;
th { th {
border-bottom: 1px solid #ccc; border-bottom: 1px solid #ccc;
border-right: 1px solid #ccc; border-right: 1px solid #ccc;
text-align: center; text-align: center;
} }
td { td {
border-bottom: 1px solid #ccc; border-bottom: 1px solid #ccc;
border-right: 1px solid #ccc; border-right: 1px solid #ccc;
padding: 3px 5px; padding: 3px 5px;
} }
} }
} }
} }
} }
</style> </style>
\ No newline at end of file
<template> <template>
<div class="public-bid col align-c"> <div class="public-bid col align-c">
<componentHeader></componentHeader> <componentHeader></componentHeader>
<componentNavigation></componentNavigation> <componentNavigation></componentNavigation>
<router-view></router-view> <router-view></router-view>
<componentFooter></componentFooter> <componentFooter></componentFooter>
</div> </div>
</template> </template>
<script> <script>
import iHeader from '@/components/currency-header.vue' import iHeader from '@/components/currency-header.vue'
import iNavigation from '@/components/currency-navigation.vue' import iNavigation from '@/components/currency-navigation.vue'
import iFooter from '@/components/currency-footer.vue' import iFooter from '@/components/currency-footer.vue'
export default { export default {
components: { components: {
componentHeader: iHeader, componentHeader: iHeader,
componentNavigation: iNavigation, componentNavigation: iNavigation,
componentFooter: iFooter componentFooter: iFooter
}, },
data: function () { data: function () {
return { return {
} }
}, },
methods: { methods: {
} }
} }
</script> </script>
<style lang="less"> <style lang="less">
.public-bid { .public-bid {
width: 100%; width: 100%;
background-image: url(@backgroundImageUrl); background-image: url(@backgroundImageUrl);
background-repeat: no-repeat; background-repeat: no-repeat;
} }
</style> </style>
\ No newline at end of file
<template> <template>
<div class="public-question col align-c"> <div class="public-question col align-c">
<componentHeader></componentHeader> <componentHeader></componentHeader>
<componentNavigation></componentNavigation> <componentNavigation></componentNavigation>
<router-view></router-view> <router-view></router-view>
<componentFooter></componentFooter> <componentFooter></componentFooter>
</div> </div>
</template> </template>
<script> <script>
import iHeader from '@/components/currency-header.vue' import iHeader from '@/components/currency-header.vue'
import iNavigation from '@/components/currency-navigation.vue' import iNavigation from '@/components/currency-navigation.vue'
import iFooter from '@/components/currency-footer.vue' import iFooter from '@/components/currency-footer.vue'
export default { export default {
components: { components: {
componentHeader: iHeader, componentHeader: iHeader,
componentNavigation: iNavigation, componentNavigation: iNavigation,
componentFooter: iFooter componentFooter: iFooter
}, },
data: function () { data: function () {
return { return {
} }
}, },
methods: { methods: {
} }
} }
</script> </script>
<style lang="less"> <style lang="less">
.public-question { .public-question {
width: 100%; width: 100%;
background-image: url(@backgroundImageUrl); background-image: url(@backgroundImageUrl);
background-repeat: no-repeat; background-repeat: no-repeat;
} }
</style> </style>
\ No newline at end of file
<template> <template>
<div class="public-trends-details col align-c"> <div class="public-trends-details col align-c">
<div class="title row con-c align-c"> <div class="title row con-c align-c">
<div class="global-maxwidth"> <div class="global-maxwidth">
<span>招标动态</span> <span>招标动态</span>
</div> </div>
</div> </div>
<div class="main global-maxwidth"> <div class="main global-maxwidth">
<!-- 页面地图 --> <!-- 页面地图 -->
<div> <div>
<currencyMap></currencyMap> <currencyMap></currencyMap>
</div> </div>
<div class="info-title col align-c"> <div class="info-title col align-c">
<span>{{title}}</span> <span>{{title}}</span>
<span>{{'发布时间:' + releaseTime}}</span> <span>{{'发布时间:' + releaseTime}}</span>
</div> </div>
<!-- 政策法规 --> <!-- 政策法规 -->
<div class="info-item content"> <div class="info-item content">
<div v-html="content"></div> <div v-html="content"></div>
</div> </div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import iMiment from 'miment' import iMiment from 'miment'
import iHost from '@/common/js/host.js' import iHost from '@/common/js/host.js'
import iRequest from '@/common/js/request/request.js' import iRequest from '@/common/js/request/request.js'
import iCurrencyMap from '@/components/currency-map.vue' import iCurrencyMap from '@/components/currency-map.vue'
export default { export default {
components: { components: {
currencyMap: iCurrencyMap currencyMap: iCurrencyMap
}, },
data: function () { data: function () {
return { return {
title: '', title: '',
releaseTime: '', releaseTime: '',
content: '' content: ''
} }
}, },
created: function () { created: function () {
this.initInfoDetails() this.initInfoDetails()
this.$store.commit('redirectPath', this.$route.fullPath) this.$store.commit('redirectPath', this.$route.fullPath)
}, },
methods: { methods: {
initInfoDetails: function () { initInfoDetails: function () {
let funcParam = { let funcParam = {
'id': this.$route.query.id 'id': this.$route.query.id
} }
iRequest.request(iHost.base + 'bid/zTenderDynamic/detail', funcParam, 'json', 'post') iRequest.request(iHost.base + 'bid/zTenderDynamic/detail', funcParam, 'json', 'post')
.then((funcResponse) => { .then((funcResponse) => {
this.title = this.content = funcResponse.zTenderDynamic.title this.title = this.content = funcResponse.zTenderDynamic.title
this.releaseTime = iMiment(funcResponse.zTenderDynamic.releaseTime).format('YYYY-MM-DD hh:mm') this.releaseTime = iMiment(funcResponse.zTenderDynamic.releaseTime).format('YYYY-MM-DD hh:mm')
this.content = funcResponse.zTenderDynamic.content this.content = funcResponse.zTenderDynamic.content
}) })
.catch((funcError) => { .catch((funcError) => {
this.$message.error(funcError.message) this.$message.error(funcError.message)
}) })
} }
} }
} }
</script> </script>
<style lang="less"> <style lang="less">
.public-trends-details { .public-trends-details {
width: 100%; width: 100%;
background-image: url(@backgroundImageUrl); background-image: url(@backgroundImageUrl);
background-repeat: no-repeat; background-repeat: no-repeat;
.title { .title {
width: 100%; width: 100%;
height: 90px; height: 90px;
background-image: url(../../assets/bg-title.png); background-image: url(../../assets/bg-title.png);
background-repeat: no-repeat; background-repeat: no-repeat;
span { span {
font-size: @fontSize06; font-size: @fontSize06;
color: @colorWhite; color: @colorWhite;
} }
} }
.main { .main {
min-height: 400px; min-height: 400px;
margin: 36px 0; margin: 36px 0;
padding: 32px 32px 0 32px; padding: 32px 32px 0 32px;
background: @colorWhite; background: @colorWhite;
box-shadow: 0px 0px 20px 0px rgba(41, 41, 41, 0.05); box-shadow: 0px 0px 20px 0px rgba(41, 41, 41, 0.05);
.info-title { .info-title {
margin: 30px 0; margin: 30px 0;
padding-bottom: 38px; padding-bottom: 38px;
border-bottom: 1px @colorGrey90 solid; border-bottom: 1px @colorGrey90 solid;
> span:nth-child(1) { > span:nth-child(1) {
font-size: @fontSize06; font-size: @fontSize06;
} }
> span:nth-child(2) { > span:nth-child(2) {
margin-top: 14px; margin-top: 14px;
color: @colorGrey40; color: @colorGrey40;
font-size: @fontSize01; font-size: @fontSize01;
} }
} }
.info-item { .info-item {
margin-bottom: 54px; margin-bottom: 54px;
} }
.content { .content {
overflow: hidden; overflow: hidden;
// 对应后台富文本编辑边框样式 // 对应后台富文本编辑边框样式
table { table {
border-top: 1px solid #ccc; border-top: 1px solid #ccc;
border-left: 1px solid #ccc; border-left: 1px solid #ccc;
th { th {
border-bottom: 1px solid #ccc; border-bottom: 1px solid #ccc;
border-right: 1px solid #ccc; border-right: 1px solid #ccc;
text-align: center; text-align: center;
} }
td { td {
border-bottom: 1px solid #ccc; border-bottom: 1px solid #ccc;
border-right: 1px solid #ccc; border-right: 1px solid #ccc;
padding: 3px 5px; padding: 3px 5px;
} }
} }
} }
} }
} }
</style> </style>
\ No newline at end of file
<template> <template>
<div class="public-trends col align-c"> <div class="public-trends col align-c">
<componentHeader></componentHeader> <componentHeader></componentHeader>
<componentNavigation></componentNavigation> <componentNavigation></componentNavigation>
<router-view></router-view> <router-view></router-view>
<componentFooter></componentFooter> <componentFooter></componentFooter>
</div> </div>
</template> </template>
<script> <script>
import iHeader from '@/components/currency-header.vue' import iHeader from '@/components/currency-header.vue'
import iNavigation from '@/components/currency-navigation.vue' import iNavigation from '@/components/currency-navigation.vue'
import iFooter from '@/components/currency-footer.vue' import iFooter from '@/components/currency-footer.vue'
export default { export default {
components: { components: {
componentHeader: iHeader, componentHeader: iHeader,
componentNavigation: iNavigation, componentNavigation: iNavigation,
componentFooter: iFooter componentFooter: iFooter
}, },
data: function () { data: function () {
return { return {
} }
}, },
methods: { methods: {
} }
} }
</script> </script>
<style lang="less"> <style lang="less">
.public-trends { .public-trends {
width: 100%; width: 100%;
background-image: url(@backgroundImageUrl); background-image: url(@backgroundImageUrl);
background-repeat: no-repeat; background-repeat: no-repeat;
} }
</style> </style>
\ No newline at end of file
No preview for this file type
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment