Commit b550f301 by 无尘

feat: 增加旧版本好办签到导出

parent 03be284d
{
"presets": [
["env", {
"modules": false,
"targets": {
"browsers": ["> 1%", "last 2 versions", "not ie <= 8"]
}
}],
"stage-2"
],
"plugins": ["transform-vue-jsx", "transform-runtime"]
}
# http://editorconfig.org
root = true
[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
[*.md]
insert_final_newline = false
trim_trailing_whitespace = false
.DS_Store
node_modules/
/build/
/config/
/dist/
/*.js
// https://eslint.org/docs/user-guide/configuring
module.exports = {
root: true,
parserOptions: {
parser: "babel-eslint"
},
env: {
browser: true
},
extends: [
// https://github.com/vuejs/eslint-plugin-vue#priority-a-essential-error-prevention
// consider switching to `plugin:vue/strongly-recommended` or `plugin:vue/recommended` for stricter rules.
// "standard",
"plugin:vue/essential",
// https://github.com/standard/standard/blob/master/docs/RULES-en.md
"plugin:prettier/recommended"
],
// required to lint *.vue files
plugins: ["vue", "prettier"],
// add your custom rules here
rules: {
"prettier/prettier": "error",
// allow async-await
"generator-star-spacing": "off",
"no-console": process.env.NODE_ENV === "production" ? 2 : 0,
"no-alert": process.env.NODE_ENV === "production" ? 2 : 0, //禁止使用alert confirm prompt
"no-debugger": process.env.NODE_ENV === "production" ? 2 : 0,
// --------------------静态检测-----------------------------
/**
* 静态检测:
* 以下基本位能够帮助发现代码错误的规则
* */
// 禁止与负零进行比较
"no-compare-neg-zero": 2,
// 禁止将常量作为 if 或三元表达式的测试条件,比如 if (true), let foo = 0 ? 'foo' : 'bar'
"no-constant-condition": [
2,
{
checkLoops: false
}
],
// 禁止在函数参数中出现重复名称的参数 【辅助检测】
"no-dupe-args": 2,
// 禁止在对象字面量中出现重复名称的键名 【辅助检测】
"no-dupe-keys": 2,
// 禁止出现空代码块 【可读性差】
"no-empty": [
2,
{
"allowEmptyCatch": true
}
],
// 禁止将 catch 的第一个参数 error 重新赋值 【重新赋值,error将没有意义】
"no-ex-assign": 2,
// @fixable 禁止函数表达式中出现多余的括号,比如 let foo = (function () { return 1 }) 【一般不会这么写,可读性差】
"no-extra-parens": [2, "functions"],
// 禁止将一个函数申明重新赋值,如:
// function foo() {}
// foo = bar [静态检测:无意义]
"no-func-assign": 2,
// 禁止在 if 内出现函数申明或使用 var 定义变量
"no-inner-declarations": [2, "both"],
// 禁止使用特殊空白符(比如全角空格),除非是出现在字符串、正则表达式或模版字符串中
"no-irregular-whitespace": [
2,
{
skipStrings: true,
skipComments: false,
skipRegExps: true,
skipTemplates: true
}
],
// typeof 表达式比较的对象必须是 'undefined', 'object', 'boolean', 'number', 'string', 'function' 或 'symbol'
"valid-typeof": 2,
// -----------------------------------最佳实践----------------------------------------------
/**
* 最佳实践
* 这些规则通过一些最佳实践帮助你避免问题
*/
// 禁止函数的循环复杂度超过 20,【https://en.wikipedia.org/wiki/Cyclomatic_complexity】
complexity: [
2,
{
max: 20
}
],
// 不允许有空函数,除非是将一个空函数设置为某个项的默认值 【否则空函数并没有实际意义】
"no-empty-function": [
2,
{
allow: ["functions", "arrowFunctions"]
}
],
// 禁止修改原生对象 【例如 Array.protype.xxx=funcion(){},很容易出问题,比如for in 循环数组 会出问题】
"no-extend-native": 2,
// @fixable 表示小数时,禁止省略 0,比如 .5 【可读性】
"no-floating-decimal": 2,
// 禁止直接 new 一个类而不赋值 【 那么除了占用内存还有什么意义呢? @off vue语法糖大量存在此类语义 先手动关闭】
"no-new": 0,
// 禁止使用 new Function,比如 let x = new Function("a", "b", "return a + b"); 【可读性差】
"no-new-func": 2,
// 禁止将自己赋值给自己 [规则帮助检测]
"no-self-assign": 2,
// 禁止将自己与自己比较 [规则帮助检测]
"no-self-compare": 2,
// @fixable 立即执行的函数必须符合如下格式 (function () { alert('Hello') })() 【立即函数写法很多,这个是最易读最标准的】
"wrap-iife": [
2,
"inside",
{
functionPrototypeMethods: true
}
],
// 禁止使用保留字作为变量名 [规则帮助检测保留字,通常ide难以发现,生产会出现问题]
"no-shadow-restricted-names": 2,
// 禁止使用未定义的变量
"no-undef": [
2,
{
typeof: false
}
],
// 定义过的变量必须使用 【正规应该是这样的,具体可以大家讨论】
"no-unused-vars": [
2,
{
vars: "all",
args: "none",
caughtErrors: "none",
ignoreRestSiblings: true
}
],
// 变量必须先定义后使用 【ps:涉及到es6存在不允许变量提升的问题,以免引起意想不到的错误,具体可以大家讨论】
"no-use-before-define": [
2,
{
functions: false,
classes: false,
variables: false
}
],
// ----------------------------------------------------代码规范----------------------------------------------------------
/**
* 代码规范
* 有关【空格】、【链式换行】、【缩进】、【=、{}、()、首位空格】规范没有添加,怕大家一时间接受不了,目前所挑选的规则都是:保障我们的代码可读性、可维护性的
* */
// 变量名必须是 camelcase 驼峰风格的
// @off 【涉及到 很多 api 或文件名可能都不是 camelcase 先关闭】
camelcase: 0,
// @fixable 禁止在行首写逗号
"comma-style": [2, "last"],
// @fixable 一个缩进必须用两个空格替代
// @off 【不限制大家,为了关闭eslint默认值,所以手动关闭,off不可去掉】 讨论
indent: [2, 2,{ "SwitchCase": 1 }],
//@off 手动关闭//前面需要回车的规则 注释
"spaced-comment": 0,
//@off 手动关闭: 禁用行尾空白
"no-trailing-spaces": 2,
//@off 手动关闭: 不允许多行回车
"no-multiple-empty-lines": 1,
//@off 手动关闭: 逗号前必须加空格
"comma-spacing": 0,
//@off 手动关闭: 冒号后必须加空格
"key-spacing": 1,
// @fixable 结尾禁止使用分号
//@off [vue官方推荐无分号,不知道大家是否可以接受?先手动off掉] 讨论
// "semi": [2,"never"],
semi: 0,
// 代码块嵌套的深度禁止超过 5 层
"max-depth": [1, 5],
// 回调函数嵌套禁止超过 4 层,多了请用 async await 替代
"max-nested-callbacks": [2, 4],
// 函数的参数禁止超过 7 个
"max-params": [2, 7],
// new 后面的类名必须首字母大写 【面向对象编程原则】
"new-cap": [
2,
{
newIsCap: true,
capIsNew: false,
properties: true
}
],
// @fixable new 后面的类必须有小括号 【没有小括号、指针指过去没有意义】
"new-parens": 2,
// @fixable 禁止属性前有空格,比如 foo. bar() 【可读性太差,一般也没人这么写】
"no-whitespace-before-property": 2,
// @fixable 禁止 if 后面不加大括号而写两行代码 eg: if(a>b) a=0 b=0
"nonblock-statement-body-position": [
2,
"beside",
{ overrides: { while: "below" } }
],
// 禁止变量申明时用逗号一次申明多个 eg: let a,b,c,d,e,f,g = [] 【debug并不好审查、并且没办法单独写注释】
"one-var": [2, "never"],
// @fixable 【变量申明必须每行一个,同上】
"one-var-declaration-per-line": [2, "always"],
//是否使用全等
eqeqeq: 0,
//this别名
"consistent-this": [2, "that"],
// -----------------------------ECMAScript 6-------------------------------------
/**
* ECMAScript 6
* 这些规则与 ES6 有关 【请大家 尝试使用正确使用const和let代替var,以后大家熟悉之后可能会提升规则】
* */
// 禁止对定义过的 class 重新赋值
"no-class-assign": 2,
// @fixable 禁止出现难以理解的箭头函数,比如 let x = a => 1 ? 2 : 3
"no-confusing-arrow": [2, { allowParens: true }],
// 禁止对使用 const 定义的常量重新赋值
"no-const-assign": 2,
// 禁止重复定义类
"no-dupe-class-members": 2,
// 禁止重复 import 模块
"no-duplicate-imports": 2,
//@off 以后可能会开启 禁止 var
"no-var": 0,
// ---------------------------------被关闭的规则-----------------------
// parseInt必须指定第二个参数 parseInt("071",10);
radix: 0,
//强制使用一致的反勾号、双引号或单引号 (quotes) 关闭
quotes: 0,
//要求或禁止函数圆括号之前有一个空格
"space-before-function-paren": [0, "always"],
//禁止或强制圆括号内的空格
"space-in-parens": [0, "never"],
//关键字后面是否要空一格
"space-after-keywords": [0, "always"],
// 要求或禁止在函数标识符和其调用之间有空格
"func-call-spacing": [0, "never"]
}
};
.DS_Store
node_modules/
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
// https://github.com/michael-ciniawsky/postcss-load-config
module.exports = {
"plugins": {
"postcss-import": {},
"postcss-url": {},
// to edit target browsers: use "browserslist" field in package.json
"autoprefixer": {}
}
}
{
"printWidth": 208,
"tabWidth": 2,
"useTabs": false,
"singleQuote": true,
"semi": true,
"trailingComma": "none",
"bracketSpacing": true,
"jsxBracketSameLine": true,
"proseWrap": "preserve"
}
### 会员标签项目
>会员标签项目
## 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
```
'use strict'
require('./check-versions')()
process.env.NODE_ENV = 'production'
const ora = require('ora')
const rm = require('rimraf')
const path = require('path')
const chalk = require('chalk')
const webpack = require('webpack')
const config = require('../config')
const webpackConfig = require('./webpack.prod.conf')
const spinner = ora('building for production...')
spinner.start()
rm(path.join(config.build.assetsRoot, config.build.assetsSubDirectory), err => {
if (err) throw err
webpack(webpackConfig, (err, stats) => {
spinner.stop()
if (err) throw err
process.stdout.write(stats.toString({
colors: true,
modules: false,
children: false, // If you are using ts-loader, setting this to true will make TypeScript errors show up during build.
chunks: false,
chunkModules: false
}) + '\n\n')
if (stats.hasErrors()) {
console.log(chalk.red(' Build failed with errors.\n'))
process.exit(1)
}
console.log(chalk.cyan(' Build complete.\n'))
console.log(chalk.yellow(
' Tip: built files are meant to be served over an HTTP server.\n' +
' Opening index.html over file:// won\'t work.\n'
))
})
})
'use strict'
const chalk = require('chalk')
const semver = require('semver')
const packageConfig = require('../package.json')
const shell = require('shelljs')
function exec (cmd) {
return require('child_process').execSync(cmd).toString().trim()
}
const versionRequirements = [
{
name: 'node',
currentVersion: semver.clean(process.version),
versionRequirement: packageConfig.engines.node
}
]
if (shell.which('npm')) {
versionRequirements.push({
name: 'npm',
currentVersion: exec('npm --version'),
versionRequirement: packageConfig.engines.npm
})
}
module.exports = function () {
const warnings = []
for (let i = 0; i < versionRequirements.length; i++) {
const mod = versionRequirements[i]
if (!semver.satisfies(mod.currentVersion, mod.versionRequirement)) {
warnings.push(mod.name + ': ' +
chalk.red(mod.currentVersion) + ' should be ' +
chalk.green(mod.versionRequirement)
)
}
}
if (warnings.length) {
console.log('')
console.log(chalk.yellow('To use this template, you must update following to modules:'))
console.log()
for (let i = 0; i < warnings.length; i++) {
const warning = warnings[i]
console.log(' ' + warning)
}
console.log()
process.exit(1)
}
}
'use strict'
const path = require('path')
const config = require('../config')
const ExtractTextPlugin = require('extract-text-webpack-plugin')
const packageConfig = require('../package.json')
exports.assetsPath = function (_path) {
const assetsSubDirectory = process.env.NODE_ENV === 'production'
? config.build.assetsSubDirectory
: config.dev.assetsSubDirectory
return path.posix.join(assetsSubDirectory, _path)
}
exports.cssLoaders = function (options) {
options = options || {}
const cssLoader = {
loader: 'css-loader',
options: {
sourceMap: options.sourceMap
}
}
const postcssLoader = {
loader: 'postcss-loader',
options: {
sourceMap: options.sourceMap
}
}
// generate loader string to be used with extract text plugin
function generateLoaders (loader, loaderOptions) {
const loaders = options.usePostCSS ? [cssLoader, postcssLoader] : [cssLoader]
if (loader) {
loaders.push({
loader: loader + '-loader',
options: Object.assign({}, loaderOptions, {
sourceMap: options.sourceMap
})
})
}
// Extract CSS when that option is specified
// (which is the case during production build)
if (options.extract) {
return ExtractTextPlugin.extract({
use: loaders,
publicPath: '../../', //注意: 此处根据路径, 自动更改
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')
})
}
}
'use strict'
const utils = require('./utils')
const config = require('../config')
const isProduction = process.env.NODE_ENV === 'production'
const sourceMapEnabled = isProduction
? config.build.productionSourceMap
: config.dev.cssSourceMap
module.exports = {
loaders: utils.cssLoaders({
sourceMap: sourceMapEnabled,
extract: isProduction
}),
cssSourceMap: sourceMapEnabled,
cacheBusting: config.dev.cacheBusting,
transformToRequire: {
video: ['src', 'poster'],
source: 'src',
img: 'src',
image: 'xlink:href'
}
}
'use strict'
const path = require('path')
const utils = require('./utils')
const config = require('../config')
const vueLoaderConfig = require('./vue-loader.conf')
function resolve (dir) {
return path.join(__dirname, '..', dir)
}
const createLintingRule = () => ({
test: /\.(js|vue)$/,
loader: "eslint-loader",
enforce: "pre",
include: [resolve("src"), resolve("test")],
options: {
fix: true,
formatter: require("eslint-friendly-formatter"),
emitWarning: !config.dev.showEslintErrorsInOverlay
}
});
module.exports = {
context: path.resolve(__dirname, '../'),
entry: {
app: ["babel-polyfill", "./src/main.js"]
},
output: {
path: config.build.assetsRoot,
filename: '[name].js',
publicPath: process.env.NODE_ENV === 'production'
? config.build.assetsPublicPath
: config.dev.assetsPublicPath
},
externals: {
'vue': 'Vue',
'vue-router': 'VueRouter',
'vuex': 'Vuex',
'element-ui': 'Element'
},
resolve: {
extensions: ['.js', '.vue', '.json'],
alias: {
'vue$': 'vue/dist/vue.esm.js',
'@': resolve('src'),
'components': resolve('src/components'),
'view': resolve('src/view')
}
},
module: {
rules: [
...(config.dev.useEslint ? [createLintingRule()] : []),
{
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: /\.scss$/,
loaders: ["style", "css", "scss", "sass"]
},
{
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'
}
}
'use strict'
const utils = require('./utils')
const webpack = require('webpack')
const config = require('../config')
const merge = require('webpack-merge')
const path = require('path')
const baseWebpackConfig = require('./webpack.base.conf')
const CopyWebpackPlugin = require('copy-webpack-plugin')
const HtmlWebpackPlugin = require('html-webpack-plugin')
const FriendlyErrorsPlugin = require('friendly-errors-webpack-plugin')
const portfinder = require('portfinder')
const HOST = process.env.HOST
const PORT = process.env.PORT && Number(process.env.PORT)
const devWebpackConfig = merge(baseWebpackConfig, {
module: {
rules: utils.styleLoaders({ sourceMap: config.dev.cssSourceMap, usePostCSS: true })
},
// cheap-module-eval-source-map is faster for development
devtool: config.dev.devtool,
// these devServer options should be customized in /config/index.js
devServer: {
clientLogLevel: 'warning',
historyApiFallback: {
rewrites: [
{ from: /.*/, to: path.posix.join(config.dev.assetsPublicPath, 'index.html') },
],
},
hot: true,
contentBase: false, // since we use CopyWebpackPlugin.
compress: true,
host: HOST || config.dev.host,
port: PORT || config.dev.port,
open: config.dev.autoOpenBrowser,
overlay: config.dev.errorOverlay
? { warnings: false, errors: true }
: false,
publicPath: config.dev.assetsPublicPath,
proxy: config.dev.proxyTable,
quiet: true, // necessary for FriendlyErrorsPlugin
watchOptions: {
poll: config.dev.poll,
}
},
plugins: [
new webpack.DefinePlugin({
'process.env': require('../config/dev.env')
}),
new webpack.HotModuleReplacementPlugin(),
new webpack.NamedModulesPlugin(), // HMR shows correct file names in console on update.
new webpack.NoEmitOnErrorsPlugin(),
// https://github.com/ampedandwired/html-webpack-plugin
new HtmlWebpackPlugin({
filename: 'index.html',
template: 'index.html',
inject: true,
favicon: './favicon.ico'
}),
// copy custom static assets
new CopyWebpackPlugin([
{
from: path.resolve(__dirname, '../static'),
to: config.dev.assetsSubDirectory,
ignore: ['.*']
}
])
]
})
module.exports = new Promise((resolve, reject) => {
portfinder.basePort = process.env.PORT || config.dev.port
portfinder.getPort((err, port) => {
if (err) {
reject(err)
} else {
// publish the new Port, necessary for e2e tests
process.env.PORT = port
// add port to devServer config
devWebpackConfig.devServer.port = port
// Add FriendlyErrorsPlugin
devWebpackConfig.plugins.push(new FriendlyErrorsPlugin({
compilationSuccessInfo: {
messages: [`Your application is running here: http://${devWebpackConfig.devServer.host}:${port}`],
},
onErrors: config.dev.notifyOnErrors
? utils.createNotifierCallback()
: undefined
}))
resolve(devWebpackConfig)
}
})
})
'use strict'
const path = require('path')
const utils = require('./utils')
const webpack = require('webpack')
const config = require('../config')
const merge = require('webpack-merge')
const baseWebpackConfig = require('./webpack.base.conf')
const CopyWebpackPlugin = require('copy-webpack-plugin')
const HtmlWebpackPlugin = require('html-webpack-plugin')
const ExtractTextPlugin = require('extract-text-webpack-plugin')
const OptimizeCSSPlugin = require('optimize-css-assets-webpack-plugin')
const UglifyJsPlugin = require('uglifyjs-webpack-plugin')
const env = require('../config/prod.env')
const webpackConfig = merge(baseWebpackConfig, {
module: {
rules: utils.styleLoaders({
sourceMap: config.build.productionSourceMap,
extract: true,
usePostCSS: true
})
},
devtool: config.build.productionSourceMap ? config.build.devtool : false,
output: {
path: config.build.assetsRoot,
filename: utils.assetsPath('js/[name].[chunkhash].js'),
chunkFilename: utils.assetsPath('js/[id].[chunkhash].js')
},
plugins: [
// http://vuejs.github.io/vue-loader/en/workflow/production.html
new webpack.DefinePlugin({
'process.env': env
}),
new UglifyJsPlugin({
uglifyOptions: {
compress: {
warnings: false
}
},
sourceMap: config.build.productionSourceMap,
parallel: true
}),
// extract css into its own file
new ExtractTextPlugin({
filename: utils.assetsPath('css/[name].[contenthash].css'),
// Setting the following option to `false` will not extract CSS from codesplit chunks.
// Their CSS will instead be inserted dynamically with style-loader when the codesplit chunk has been loaded by webpack.
// It's currently set to `true` because we are seeing that sourcemaps are included in the codesplit bundle as well when it's `false`,
// increasing file size: https://github.com/vuejs-templates/webpack/issues/1110
allChunks: true,
}),
// Compress extracted CSS. We are using this plugin so that possible
// duplicated CSS from different components can be deduped.
new OptimizeCSSPlugin({
cssProcessorOptions: config.build.productionSourceMap
? { safe: true, map: { inline: false } }
: { safe: true }
}),
// generate dist index.html with correct asset hash for caching.
// you can customize output by editing /index.html
// see https://github.com/ampedandwired/html-webpack-plugin
new HtmlWebpackPlugin({
filename: config.build.index,
template: 'index.html',
inject: true,
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
'use strict'
const merge = require('webpack-merge')
const prodEnv = require('./prod.env')
module.exports = merge(prodEnv, {
NODE_ENV: '"development"'
})
'use strict'
// Template version: 1.3.1
// see http://vuejs-templates.github.io/webpack for documentation.
const path = require('path');
const proxyConfig = require('./proxyList');
module.exports = {
dev: {
// Paths
assetsSubDirectory: 'static',
assetsPublicPath: '/',
proxyTable: {},//proxyConfig.proxyList,
// Various Dev Server settings
// host: '0.0.0.0', // can be overwritten by process.env.HOST
host: 'localhost',//'192.168.1.20',//
port: 8001, // 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-
// Use Eslint Loader?
// If true, your code will be linted during bundling and
// linting errors and warnings will be shown in the console.
useEslint: true,
// If true, eslint errors and warnings will also be shown in the error overlay
// in the browser.
showEslintErrorsInOverlay: false,
/**
* 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
}
}
'use strict'
module.exports = {
NODE_ENV: '"production"'
}
module.exports = {
proxyList: {
'/api-auth/': {
target: 'http://gicdev.demogic.com/api-auth/',
changeOrigin: true,
pathRewrite: {
'^/api-auth': ''
}
},
'/api-admin/': {
target: 'http://gicdev.demogic.com/api-admin/',
changeOrigin: true,
pathRewrite: {
'^/api-admin': ''
}
},
'/api-plug/': {
target: 'http://gicdev.demogic.com/api-plug/',
changeOrigin: true,
pathRewrite: {
'^/api-plug': ''
}
},
'/api-mall/': {
target: 'http://gicdev.demogic.com/api-mall/',
changeOrigin: true,
pathRewrite: {
'^/api-mall': ''
}
}
}
}
<!DOCTYPE html><html><head><meta charset=utf-8><link rel="shortcut icon" href=./favicon.ico><title>GIC-会员标签</title><link href=./static/css/app.2cd56078b4ca6b35ed0e361648625c83.css rel=stylesheet></head><body style="background-color: #f0f2f5;min-width: 1400px;"><div id=app></div><script src=//web-1251519181.file.myqcloud.com/lib/vue/2.6.6/vue.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vue-router/3.0.2/vue-router.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vuex/3.1.0/vuex.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/elementUI/index.2.5.4.js></script><script src=//web-1251519181.file.myqcloud.com/components/header.2.0.07.js></script><script src=//web-1251519181.file.myqcloud.com/components/footer.2.0.02.js></script><script type=text/javascript src=./static/js/manifest.1ee771ed0215b10b405c.js></script><script type=text/javascript src=./static/js/vendor.488957d66192c4bf6ce3.js></script><script type=text/javascript src=./static/js/app.3d5f7afc1dabfa23646d.js></script></body></html>
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
@import './public.css';
.arrowico{
position: absolute;
transition: all .5s;
.icoposition(0px,25px);
}
.icoposition(@right: right,@top: top){
right: @right;
top: @top;
}
.user-form-dialog {
/deep/ .el-dialog {
min-width: 425px;
}
/*/deep/ .el-dialog__body {
padding: 0 20px;
}*/
/deep/ .el-input {
width: 260px;
}
}
.pass-form-dialog {
/deep/ .el-dialog {
min-width: 425px;
}
/*/deep/ .el-dialog__body {
padding: 0 20px;
}*/
}
@base-color: #353944;
@hover-color: #3c92eb;
@hoverbg-color: #20242d;
@main-color: #1890ff;
@navbgcolor: #04143a;
@sidebgcolor: #343c4c;
@userinfobgcolor: #ecf5ff;
@contentbgcolor: #f5f7fa;
@bordercolor: #dcdfe6;
@customnavcolor: #04143a;
@btnbgcolor: #f5f7fa;
@iconbgcolor: #e6e9f2;
.flex1(@width,@height) {
flex: 0 0 @width;
width: @width;
height: @height;
}
webpackJsonp([2],{"/HCr":function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a=s("2X9c"),i=s.n(a),n={name:"page500",data:function(){return{img_500:i.a}},methods:{changeRoute:function(t){this.$router.push(t)}},computed:{message:function(){return"抱歉,服务器出错了"}}},c={render:function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticStyle:{background:"#f0f2f5","margin-top":"-20px",height:"100%"}},[s("div",{staticClass:"wscn-http404"},[s("div",{staticClass:"pic-404"},[s("img",{staticClass:"pic-404__parent",attrs:{src:t.img_500,alt:"500"}})]),t._v(" "),s("div",{staticClass:"bullshit"},[s("div",{staticClass:"bullshit__headline"},[t._v(t._s(t.message))]),t._v(" "),s("a",{staticClass:"bullshit__return-home",on:{click:function(e){t.changeRoute("/myTagLib")}}},[t._v("返回首页")])])])])},staticRenderFns:[]};var r=s("VU/8")(n,c,!1,function(t){s("ixa6")},"data-v-609edd63",null);e.default=r.exports},"2X9c":function(t,e,s){t.exports=s.p+"static/img/error_500.ed0cba4.svg"},ixa6:function(t,e){}});
\ No newline at end of file
webpackJsonp([3],{Minx:function(t,e,s){t.exports=s.p+"static/img/error_404.bf58747.svg"},PRsh:function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=s("Minx"),n=s.n(i),a={name:"page404",data:function(){return{img_404:n.a}},methods:{changeRoute:function(t){this.$router.push(t)}},computed:{message:function(){return"抱歉,你访问的页面不存在"}},mounted:function(){}},c={render:function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticStyle:{background:"#f0f2f5","margin-top":"-20px",height:"100%"}},[s("div",{staticClass:"wscn-http404"},[s("div",{staticClass:"pic-404"},[s("img",{staticClass:"pic-404__parent",attrs:{src:t.img_404,alt:"404"}})]),t._v(" "),s("div",{staticClass:"bullshit"},[s("div",{staticClass:"bullshit__headline"},[t._v(t._s(t.message))]),t._v(" "),s("a",{staticClass:"bullshit__return-home",on:{click:function(e){t.changeRoute("/myTagLib")}}},[t._v("返回首页")])])])])},staticRenderFns:[]};var r=s("VU/8")(a,c,!1,function(t){s("YVvD")},"data-v-2aaf35c0",null);e.default=r.exports},YVvD:function(t,e){}});
\ No newline at end of file
webpackJsonp([4],{"4KSJ":function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=a("MOmO"),s=a.n(i),r={name:"page401",data:function(){return{errGif:s.a+"?"+ +new Date,ewizardClap:"https://wpimg.wallstcn.com/007ef517-bafd-4066-aae4-6883632d9646",dialogVisible:!1}},methods:{back:function(){this.$route.query.noGoBack?this.$router.push({path:"/myTagLib"}):this.$router.go(-1)}}},n={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"errPage-container"},[a("el-button",{staticClass:"pan-back-btn",attrs:{icon:"arrow-left"},on:{click:t.back}},[t._v("返回")]),t._v(" "),a("el-row",[a("el-col",{attrs:{span:12}},[a("h1",{staticClass:"text-jumbo text-ginormous"},[t._v("你没有权限去该页面!")]),t._v(" "),a("h2"),t._v(" "),a("h6"),t._v(" "),a("ul",{staticClass:"list-unstyled"})]),t._v(" "),a("el-col",{attrs:{span:12}},[a("img",{attrs:{src:t.errGif,width:"313",height:"428",alt:"Girl has dropped her ice cream."}})])],1),t._v(" "),a("el-dialog",{attrs:{title:"随便看",visible:t.dialogVisible},on:{"update:visible":function(e){t.dialogVisible=e}}},[a("img",{staticClass:"pan-img",attrs:{src:t.ewizardClap}})])],1)},staticRenderFns:[]};var l=a("VU/8")(r,n,!1,function(t){a("VhVP")},"data-v-11312fe4",null);e.default=l.exports},MOmO:function(t,e,a){t.exports=a.p+"static/img/401.089007e.gif"},VhVP:function(t,e){}});
\ No newline at end of file
webpackJsonp([5],{CkW6:function(M,L){M.exports="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMS4wLjAsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0i5Zu+5bGCXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgNDAwIDMzNSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgNDAwIDMzNTsiIHhtbDpzcGFjZT0icHJlc2VydmUiPg0KPHN0eWxlIHR5cGU9InRleHQvY3NzIj4NCgkuc3Qwe2ZpbGw6I0ZBRkNGRjt9DQoJLnN0MXtmaWxsOiNEQkU1RjE7fQ0KCS5zdDJ7ZmlsbDojREVFN0Y0O30NCgkuc3Qze2ZpbGw6I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LDAsMS4zLDAuNiwxLjMsMS4zbDAsMGMwLDAuNy0wLjYsMS4zLTEuMywxLjNoLTguMWMtMC43LDAtMS4zLTAuNi0xLjMtMS4zDQoJQzI4MywyNjUuMywyODMuNiwyNjQuNiwyODQuNCwyNjQuNiIvPg0KPHBhdGggY2xhc3M9InN0MSIgZD0iTTk5LjIsMjY0LjZoMTcxLjdjMC40LDAsMC43LDAuMSwwLjksMC40YzAuNCwwLjQsMC41LDEsMC4zLDEuNWMtMC4yLDAuNS0wLjcsMC44LTEuMiwwLjhIOTkuMQ0KCWMtMC43LDAtMS4zLTAuNi0xLjMtMS4zQzk3LjgsMjY1LjMsOTguNCwyNjQuNiw5OS4yLDI2NC42Ii8+DQo8cGF0aCBjbGFzcz0ic3QzIiBkPSJNMjM1LDk1Ljh2OC4xYzAsMC43LTAuNiwxLjMtMS4zLDEuM3MtMS4zLTAuNi0xLjMtMS4zdi04LjFjMC0wLjcsMC42LTEuMywxLjMtMS40QzIzNC40LDk0LjQsMjM1LDk1LDIzNSw5NS44Ig0KCS8+DQo8L3N2Zz4NCg=="},PTPp:function(M,L){},"aM+6":function(M,L,j){"use strict";Object.defineProperty(L,"__esModule",{value:!0});var u=j("CkW6"),N=j.n(u),w={name:"page403",data:function(){return{img_403:N.a}},methods:{changeRoute:function(M){this.$router.push(M)}},computed:{message:function(){return"抱歉,你无权访问该页面"}}},D={render:function(){var M=this,L=M.$createElement,j=M._self._c||L;return j("div",{staticStyle:{background:"#f0f2f5","margin-top":"-20px",height:"100%"}},[j("div",{staticClass:"wscn-http404"},[j("div",{staticClass:"pic-404"},[j("img",{staticClass:"pic-404__parent",attrs:{src:M.img_403,alt:"403"}})]),M._v(" "),j("div",{staticClass:"bullshit"},[j("div",{staticClass:"bullshit__headline"},[M._v(M._s(M.message))]),M._v(" "),j("a",{staticClass:"bullshit__return-home",on:{click:function(L){M.changeRoute("/myTagLib")}}},[M._v("返回首页")])])])])},staticRenderFns:[]};var C=j("VU/8")(w,D,!1,function(M){j("PTPp")},"data-v-0101b5a4",null);L.default=C.exports}});
\ No newline at end of file
webpackJsonp([7],{0:function(e,n,t){t("j1ja"),e.exports=t("NHnr")},"4qCZ":function(e,n){},"5tgt":function(e,n,t){e.exports=function(e,n){return function(r){t("Vna/")("./"+e+"/"+n+".vue").then(function(e){r(e)})}}},NHnr:function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=t("//Fk"),o=t.n(r),i=t("hKoQ"),u=t.n(i),a={render:function(){var e=this.$createElement,n=this._self._c||e;return n("div",{attrs:{id:"app"}},[n("transition",{attrs:{name:"fade",mode:"out-in"}},[n("router-view")],1)],1)},staticRenderFns:[]};var c=t("VU/8")({name:"App",data:function(){return{}}},a,!1,function(e){t("a/Gl")},null,null).exports,s=t("pRNm"),p=t.n(s),f=t("5tgt"),d=t.n(f),l=function(e){t.e(0).then(t.bind(null,"EE2z")).then(function(n){e(n)})},m=[{path:"/",name:"好办签到",redirect:"/signExport",component:d()("index","index")},{path:"/signExport",name:"好办签到",component:d()("index","index")},{path:"/403",name:"无权访问",component:l},{path:"/404",name:"error404",component:l},{path:"/500",name:"error500",component:l},{path:"*",redirect:"/404",hidden:!0}],h=new p.a({routes:m,scrollBehavior:function(){return{y:0}}}),x=t("l6IN"),v=t("Rf8U"),g=t.n(v),w=t("mtWM"),V=t.n(w);t("Xcu2"),t("4qCZ");u.a.polyfill(),Vue.config.productionTip=!1,Vue.use(g.a,V.a),Vue.axios.defaults.withCredentials=!0,Vue.axios.interceptors.request.use(function(e){return e},function(e){return o.a.reject(e)}),Vue.axios.interceptors.response.use(function(e){return 200==e.status&&e.data.errorCode,e},function(e){if(e.response)switch(e.response.status){case 401:window.location.href=window.location.origin+"/gic-web/#/";case 500:x.Message.error("服务器500")}return o.a.reject(e.response.data)}),new Vue({el:"#app",router:h,components:{App:c},template:"<App/>"})},"Vna/":function(e,n,t){var r={"./errorPage/401.vue":["4KSJ",4],"./errorPage/403.vue":["aM+6",5],"./errorPage/404.vue":["PRsh",3],"./errorPage/500.vue":["/HCr",2],"./errorPage/index.vue":["EE2z",0],"./index/index.vue":["YPWR",1]};function o(e){var n=r[e];return n?t.e(n[1]).then(function(){return t(n[0])}):Promise.reject(new Error("Cannot find module '"+e+"'."))}o.keys=function(){return Object.keys(r)},o.id="Vna/",e.exports=o},Xcu2:function(e,n){},"a/Gl":function(e,n){},l6IN:function(e,n){e.exports=Element},lRwf:function(e,n){e.exports=Vue},pRNm:function(e,n){e.exports=VueRouter}},[0]);
\ No newline at end of file
export const baseList = [
{
type: 'one',
name: '图片广告',
template: '1',
isSpace: 'Y',
imgList: [
{
imgUrl: '',
imglink: '',
crowd: ''
}
],
linkUrl: ''
},
{
type: 'two',
name: '魔方',
template: '1',
isSpace: 'Y',
imgList: [
{
imgUrl: '',
imglink: '',
crowd: ''
}
],
crowd: {
type: 'Y',
condition: ''
},
linkUrl: ''
},
{
type: 'three',
name: '文本',
content: '',
textcolor: '#333',
bgcolor: '#fff',
showPosition: '',
isSpace: 'Y',
crowd: {
type: 'Y',
condition: ''
}
},
{
type: 'four',
name: '横栏',
template: 'one',
tip: 'true',
textcolor: '#333',
bgcolor: '#fff',
imgList: [
{
label: '',
imgUrl: '',
linkUrl: '',
crowd: {
type: 'Y',
condition: ''
}
}
]
},
{
type: 'five',
name: '辅助线',
color: '#333',
margin: '10px',
style: 'solid'
},
{
type: 'six',
name: '辅助空白',
height: '10'
}
];
export const mainList = [
{
name:"进入积分", id: 1
},
{
name:"数据icon", id: 2
},
{
name:"卡券兑换", id: 3
},
{
name:"礼品兑换", id: 4
},
{
name:"订单分组", id: 5
}
];
export const mallList = [
{
name:"商品", id: 1
},
{
name:"商品分组", id: 2
},
{
name:"商品搜索", id: 3
}
];
export const saleList = [
{
name:"优惠券", id: 1
},
{
name:"拼团", id: 2
},
{
name:"周期购", id: 3
},
{
name:"限时折扣", id: 4
},
{
name:"秒杀", id: 5
},
{
name:"预售", id: 6
}
];
import { Message } from 'element-ui'
export function checkFalse(message) {
if(message) {
Message.warning(message);
return false
}else{
Message.warning('操作失败');
}
return false;
}
export function checkSuccess(message) {
if(message) {
Message.success(message);
}else{
Message.success('操作成功');
}
}
export function checkStatus(err) {
if(err == 'cancel') {
Message.info(err || 'cancel');
return false;
}else if(err.hasOwnProperty('response')){
if(err.response.status == 401) {
Message.error('登录过期');
return false;
}else if(err.response.status == 500){
Message.error('服务器错误500');
return false;
}
}else {
Message.error(err);
return false;
}
}
/*设置cookie*/
export function setCookie(c_name,value,expire) {
var date=new Date();
date.setSeconds(date.getSeconds()+expire);
document.cookie = c_name + "="+ encodeURI(value)+"; expires="+date.toGMTString();
}
/*获取cookie*/
export function getCookie(c_name){
if(document.cookie.length>0){
var name = encodeURI(c_name);
var allcookies = document.cookie;
name += "=";
var pos = allcookies.indexOf(name);
if(pos != -1){
var start = pos + name.length;
var end = allcookies.indexOf(";",start);
if(end == -1){
end = allcookies.length;
}
var value = allcookies.substring(start,end);
return decodeURI(value);
} else{
return "";
}
}
}
/*删除cookie*/
export function delCookie(c_name){
setCookie(c_name, "", -1);
}
(function () {
function CanvasAnimate(Dom,options){
options = options || {};
this.Element = Dom;
this.cvs = Dom.getContext("2d");
this.off_cvs = document.createElement("canvas");
this.off_cvs.width = Dom.width;
this.off_cvs.height = Dom.height;
this.Dom = this.off_cvs.getContext("2d");
this.width = Dom.width;
this.height = Dom.height;
this.length = options.length || 100;
this.RoundColor = options.RoundColor || "#999";
this.RoundDiameter = options.RoundDiameter || 2;
this.LineColor = options.LineColor || "#ccc";
this.LineWeight = options.LineWeight || 1;
this.clicked = options.clicked || false;
this.moveon = options.moveon || false;
this.list = [];
this.paused = true
}
CanvasAnimate.prototype.Run = function(){
if( this.clicked ){
this.Element.addEventListener( "click",this.Clicked.bind(this) )
}
if( this.moveon ){
this.Element.addEventListener( "mousemove",this.moveXY.bind(this) );
this.Element.addEventListener( "mouseout",this.moveoutXY.bind(this) )
}
this.Draw( this.getLength() )
};
CanvasAnimate.prototype.getLength=function(){
let arr = [];
for(let i=0;i< this.length ;i++){
let obj = {};
obj.x = parseInt( Math.random() * this.width );
obj.y = parseInt( Math.random() * this.height );
obj.r = parseInt( Math.random()*2 );
obj.controlX = parseInt( Math.random()*10 ) > 5 ? "left":"right";
obj.controlY = parseInt( Math.random()*10 ) > 5 ? "bottom":"top";
arr.push(obj)
}
return arr
};
CanvasAnimate.prototype.Draw = function(list){
let new_arr = [];
let line_arr = [];
list.map((item,index)=>{
let xy = this.ControlXY(item);
let obj = this.ControlRound(xy);
new_arr.push( obj )
});
new_arr.map((item1,index1)=>{
new_arr.map((item2,index2)=>{
if(item1 !== item2){
let x = item1.x - item2.x;
let y = item1.y - item2.y;
if( Math.abs(x)< 100 && Math.abs(y)<100 ){
let obj = {
x1:item1.x,
y1:item1.y,
x2:item2.x,
y2:item2.y,
};
line_arr.push(obj)
}
}
})
});
this.drawLine(line_arr);
new_arr.map((item)=>{
this.drawRound(item)
});
this.list = new_arr;
this.cvs.drawImage(this.off_cvs,0,0,this.width,this.height);
setTimeout(()=>{
if(this.paused){
this.next()
}
},60)
};
CanvasAnimate.prototype.next = function(){
this.cvs.clearRect( 0,0,this.width,this.height );
this.Dom.clearRect( 0,0,this.width,this.height );
this.Draw( this.list )
};
CanvasAnimate.prototype.drawRound = function(obj){
let {x,y,r} = obj;
this.Dom.beginPath();
this.Dom.arc( x,y,r, 0, 2*Math.PI );
this.Dom.fillStyle = this.RoundColor;
this.Dom.fill();
this.Dom.closePath()
};
CanvasAnimate.prototype.drawLine = function(list){
list.map( (item)=>{
this.Dom.beginPath();
this.Dom.moveTo( item.x1,item.y1 );
this.Dom.lineTo( item.x2,item.y2 );
this.Dom.lineWidth = this.LineWeight;
this.Dom.strokeStyle = this.LineColor;
this.Dom.stroke();
this.Dom.closePath();
})
};
CanvasAnimate.prototype.ControlXY = function(obj){
if(obj.x >= (this.width - obj.r) ){
obj.controlX = 'left'
}else if( obj.x <= parseInt(obj.r/2) ){
obj.controlX = "right"
}
if( obj.y >= (this.height - obj.r) ){
obj.controlY = "bottom"
}else if( obj.y <= parseInt(obj.r/2) ){
obj.controlY = "top"
}
return obj
}
CanvasAnimate.prototype.ControlRound = function(obj){
switch(obj.controlX){
case "right":
obj.x++;
break;
case "left":
obj.x--;
break;
}
switch(obj.controlY){
case "top":
obj.y++;
break;
case "bottom":
obj.y--;
break;
}
return obj
};
CanvasAnimate.prototype.Clicked = function(event){
let obj = {};
obj.x = event.clientX;
obj.y = event.clientY;
obj.r = parseInt( Math.random()*10 );
obj.controlX = parseInt( Math.random()*10 ) > 5 ? 'left' :'right';
obj.controlY = parseInt( Math.random()*10 ) > 5 ? 'bottom' :'top';
this.list.push(obj)
};
CanvasAnimate.prototype.moveXY = function(event){
let obj = {};
obj.x = event.clientX;
obj.y = event.clientY;
obj.r = 0;
obj.move = true;
if( this.list[0]["move"] ){
this.list[0]["x"] = obj.x;
this.list[0]["y"] = obj.y;
this.list[0]["r"] = 1
}else{
this.list.unshift(obj)
}
};
CanvasAnimate.prototype.moveoutXY = function(event){
this.list.shift()
};
CanvasAnimate.prototype.pause = function(){
this.paused = !this.paused;
if( this.paused){
this.Draw(this.list)
}
};
window.LoginAnimate = CanvasAnimate;
})();
!function(e){var n=window.webpackJsonp;window.webpackJsonp=function(r,c,a){for(var i,u,f,s=0,d=[];s<r.length;s++)u=r[s],t[u]&&d.push(t[u][0]),t[u]=0;for(i in c)Object.prototype.hasOwnProperty.call(c,i)&&(e[i]=c[i]);for(n&&n(r,c,a);d.length;)d.shift()();if(a)for(s=0;s<a.length;s++)f=o(o.s=a[s]);return f};var r={},t={8:0};function o(n){if(r[n])return r[n].exports;var t=r[n]={i:n,l:!1,exports:{}};return e[n].call(t.exports,t,t.exports,o),t.l=!0,t.exports}o.e=function(e){var n=t[e];if(0===n)return new Promise(function(e){e()});if(n)return n[2];var r=new Promise(function(r,o){n=t[e]=[r,o]});n[2]=r;var c=document.getElementsByTagName("head")[0],a=document.createElement("script");a.type="text/javascript",a.charset="utf-8",a.async=!0,a.timeout=12e4,o.nc&&a.setAttribute("nonce",o.nc),a.src=o.p+"static/js/"+e+"."+{0:"8d7157a2c6b002665d6b",1:"8ee983527b1e7b25f3f6",2:"9b606d1755f571164128",3:"5cfebacac84484523343",4:"ec744dafa07ce1b65ba7",5:"219ca1de56cd21c51dd2"}[e]+".js";var i=setTimeout(u,12e4);function u(){a.onerror=a.onload=null,clearTimeout(i);var n=t[e];0!==n&&(n&&n[1](new Error("Loading chunk "+e+" failed.")),t[e]=void 0)}return a.onerror=a.onload=u,c.appendChild(a),r},o.m=e,o.c=r,o.d=function(e,n,r){o.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},o.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(n,"a",n),n},o.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},o.p="./",o.oe=function(e){throw console.error(e),e}}([]);
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
File added
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<link rel="shortcut icon" href="./favicon.ico"/>
<title>GIC-会员标签</title>
</head>
<body style="background-color: #f0f2f5;min-width: 1400px;">
<div id="app"></div>
<!-- built files will be auto injected -->
<!-- 公共库引用 cdn -->
<script src="//web-1251519181.file.myqcloud.com/lib/vue/2.6.6/vue.min.js"></script>
<script src="//web-1251519181.file.myqcloud.com/lib/vue-router/3.0.2/vue-router.min.js"></script>
<script src="//web-1251519181.file.myqcloud.com/lib/vuex/3.1.0/vuex.min.js"></script>
<script src="//web-1251519181.file.myqcloud.com/lib/elementUI/index.2.5.4.js"></script>
<!-- 公共组件引用 cdn -->
<script src="//web-1251519181.file.myqcloud.com/components/header.2.0.07.js"></script>
<script src="//web-1251519181.file.myqcloud.com/components/footer.2.0.02.js"></script>
</body>
</html>
This source diff could not be displayed because it is too large. You can view the blob instead.
{
"name": "haoban-old",
"version": "1.0.1",
"description": "A Vue.js project",
"author": "fairyly",
"private": true,
"scripts": {
"dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js",
"start": "npm run dev",
"build": "node build/build.js",
"format": "onchange 'test/**/*.js' 'src/**/*.js' 'src/**/*.vue' -- prettier --write {{changed}}",
"formater": "onchange \"test/**/*.js\" \"src/**/*.js\" \"src/**/*.vue\" -- prettier --write {{changed}}",
"version": "conventional-changelog -p angular -i changelog.md -s -r 0 && git add changelog.md"
},
"dependencies": {
"@riophae/vue-treeselect": "0.0.29",
"@tinymce/tinymce-vue": "^1.0.8",
"element-ui": "^2.3.9",
"file-saver": "^1.3.8",
"tinymce": "^4.8.3",
"vue-clipboard2": "^0.2.0",
"xlsx": "^0.13.5"
},
"devDependencies": {
"@antv/data-set": "^0.8.9",
"@antv/g2": "^3.1.0",
"autoprefixer": "^7.1.2",
"axios": "^0.18.0",
"babel-core": "^6.22.1",
"babel-eslint": "^8.2.1",
"babel-helper-vue-jsx-merge-props": "^2.0.3",
"babel-loader": "^7.1.1",
"babel-plugin-syntax-jsx": "^6.18.0",
"babel-plugin-transform-runtime": "^6.22.0",
"babel-plugin-transform-vue-jsx": "^3.5.0",
"babel-polyfill": "^6.26.0",
"babel-preset-env": "^1.3.2",
"babel-preset-stage-2": "^6.22.0",
"chalk": "^2.0.1",
"copy-webpack-plugin": "^4.0.1",
"css-loader": "^0.28.11",
"es6-promise": "^4.2.6",
"eslint": "^4.15.0",
"eslint-config-prettier": "^4.0.0",
"eslint-friendly-formatter": "^4.0.1",
"eslint-loader": "^2.1.2",
"eslint-plugin-prettier": "^3.0.1",
"eslint-plugin-vue": "^5.2.2",
"extract-text-webpack-plugin": "^3.0.0",
"file-loader": "^1.1.4",
"friendly-errors-webpack-plugin": "^1.6.1",
"html-webpack-plugin": "^2.30.1",
"less": "^3.0.4",
"less-loader": "^4.1.0",
"node-notifier": "^5.1.2",
"node-sass": "^4.9.0",
"onchange": "^5.2.0",
"optimize-css-assets-webpack-plugin": "^3.2.0",
"ora": "^1.2.0",
"portfinder": "^1.0.13",
"postcss-import": "^11.0.0",
"postcss-loader": "^2.0.8",
"postcss-url": "^7.2.1",
"prettier": "^1.16.4",
"rimraf": "^2.6.0",
"sass-loader": "^7.0.1",
"script-loader": "^0.7.2",
"semver": "^5.3.0",
"shelljs": "^0.7.6",
"uglifyjs-webpack-plugin": "^1.1.1",
"url-loader": "^0.5.8",
"vue-axios": "^2.1.1",
"vue-loader": "^13.3.0",
"vue-style-loader": "^3.0.1",
"vue-template-compiler": "^2.5.2",
"vuedraggable": "^2.16.0",
"webpack": "^3.6.0",
"webpack-bundle-analyzer": "^2.9.0",
"webpack-dev-server": "^2.9.1",
"webpack-merge": "^4.1.0"
},
"engines": {
"node": ">= 6.0.0",
"npm": ">= 3.0.0"
},
"browserslist": [
"> 1%",
"last 2 versions",
"not ie <= 8"
]
}
<template>
<div id="app">
<transition name="fade" mode="out-in">
<router-view></router-view>
</transition>
</div>
</template>
<script>
export default {
name: 'App',
data() {
return {};
}
};
</script>
<style></style>
import Vue from 'vue';
// import axios from 'axios';
import qs from 'qs';
import { Message } from 'element-ui';
Vue.axios.defaults.timeout = 19000;
let local = window.location.origin;
if (local.indexOf('localhost') != -1) {
local = 'http://www.gicdev.com';
}
Vue.axios.interceptors.request.use(
config => {
return config;
},
err => {
Message.error({ message: '请求超时!' });
return Promise.resolve(err);
}
);
Vue.axios.interceptors.response.use(
data => {
if (data.status && data.status == 200 && data.data.errorCode == '401') {
Message.error({ message: data.data.message });
window.location.href = local + '/gic-web/#/';
return;
}
return data;
},
err => {
// Message.error({message: err.response.message});
if (err.response.status == 504 || err.response.status == 404) {
// window.location.href= local + "/gic-web/#/"
Message.error({ message: '服务异常⊙﹏⊙∥' });
} else if (err.response.status == 403) {
window.location.href = local + '/gic-web/#/';
// Message.error({message: '权限不足,请联系管理员!'});
} else {
window.location.href = local + '/gic-web/#/';
// Message.error({message: '未知错误!'});
}
return Promise.resolve(err);
}
);
// let base = local + '/gicweb/cloudweb/';
// const timeout = 15000;
// let token = ''; //sessionStorage.getItem('user');
/*
*
* 统一 get 请求方法
* @url: 请求的 url
* @params: 请求带的参数
* @header: 带 token
*
*/
export const getRequest = (url, params) => {
params.requestProject = 'gic-web';
return Vue.axios({
method: 'get',
url: `${local}${url}`,
data: {},
params: params,
headers: { 'content-type': 'application/x-www-form-urlencoded' } // "token": token
});
};
/*
*
* 统一 post 请求方法
* url: 请求的 url
* @params: 请求带的参数
* @header: 带 token
*
*/
export const postRequest = (url, params) => {
params.requestProject = 'gic-web';
return Vue.axios({
method: 'post',
url: `${local}${url}`,
data: qs.stringify(params),
headers: { 'content-type': 'application/x-www-form-urlencoded' } //multipart/form-data{"token": token}
});
};
export const postJsonRequest = (url, params) => {
params.requestProject = 'gic-web';
return Vue.axios({
method: 'post',
url: `${local}${url}`,
data: '{}',
params: params,
headers: { 'Content-Type': 'application/json;charset=UTF-8' } //multipart/form-data{"token": token}
});
};
/*
* method: 'post'
* 'Content-Type': 'application/json;charset=UTF-8'
* @data: params
* @requestProject: 'gic-web'
*
*/
export const postJson = (url, params) => {
// params.requestProject = "gic-web";
return Vue.axios({
method: 'post',
url: `${local}${url}`,
data: params,
params: { requestProject: 'gic-web' },
headers: { 'Content-Type': 'application/json;charset=UTF-8' } //multipart/form-data{"token": token}
});
};
/*
* method: 'post'
* data: params
*
*/
export const postForm = (url, params) => {
params.requestProject = 'gic-web';
return Vue.axios({
method: 'post',
url: `${local}${url}`,
data: params,
headers: {} //'content-type': 'application/x-www-form-urlencoded'multipart/form-data{"token": token}
});
};
import * as api from './api';
export default api;
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 21.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="图层_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 400 335" style="enable-background:new 0 0 400 335;" xml:space="preserve">
<style type="text/css">
.st0{fill:#FAFCFF;}
.st1{fill:#DBE5F1;}
.st2{fill:#DEE7F4;}
.st3{fill:#B9C7DB;}
.st4{fill:#FFFFFF;}
.st5{fill:none;stroke:#B9C7DB;stroke-width:4;stroke-miterlimit:10;}
.st6{fill:none;stroke:#B6C7D8;stroke-miterlimit:10;}
</style>
<path class="st5" d="M274.5,241.3c-5.3-5.3-4.4,4.4-6.7,6.7c-3.1,3.1-6.3,6-9.7,8.6H125.2c-3.4-2.7-6.6-5.6-9.7-8.7
c-28.4-28.5-38.6-70.5-26.6-109l-10.5-10.6c-5.3-5.3-5.3-13.8,0-19.2c5.2-5.3,13.7-5.3,19-0.1c0,0,0,0,0.1,0.1l6.6,6.8
c3.1,3.2,8.2,3.2,11.4,0l0,0c3.2-3.2,3.2-8.3,0-11.5L103.1,92c-3.2-3.2-3.2-8.3,0-11.5c3.1-3.2,8.2-3.2,11.4,0l0,0l17.2,17.2
c-0.9,3.7,0.9,7.6,4.4,9.3c3.5,1.7,7.7,0.6,9.9-2.5c2.3-3.1,2.1-7.4-0.5-10.3c-3.3-3.8-6.5-7.2-6.5-7.2l-7.3-7.4
c34.8-21.3,82.6-21.7,117.2,0c34.5,21.7,53.9,61.2,50,101.9l15.4,15.6c3.2,3.2,3.2,8.3,0,11.5c-3.1,3.2-8.2,3.2-11.4,0l0,0
l-15.1-15.3c-3.1-3.2-8.2-3.2-11.4,0l0,0c-3.2,3.2-3.2,8.3,0,11.5l17.1,17.2c5.2,5.3,5.2,13.8,0,19.1
C288.4,246.6,279.9,246.6,274.5,241.3C274.6,241.3,274.6,241.3,274.5,241.3L274.5,241.3z"/>
<path class="st3" d="M86.6,71.4c0,4.7,3.8,8.5,8.5,8.5c1.5,0,3-0.4,4.3-1.1c4.1-2.3,5.5-7.5,3.1-11.6c-1.5-2.6-4.3-4.3-7.4-4.3
C90.4,62.9,86.6,66.7,86.6,71.4"/>
<path class="st3" d="M216.4,145.4h24.3l-7.4,17.9c2.6,1.8,4.5,3.8,5.8,6c1.2,2.2,1.9,4.8,1.9,7.8c0,4.6-1.6,8.4-4.8,11.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9-28.9L243.8,192.7L243.8,192.7z"/>
<path class="st4" d="M238.9,154.3l-24.4,35.4l0.5,0.3l24.4-35.4L238.9,154.3z"/>
<path class="st3" d="M266.2,66.6h8c0.7,0,1.3,0.6,1.3,1.3l0,0c0,0.4-0.1,0.7-0.4,1c-0.2,0.3-0.6,0.4-0.9,0.4h-8
c-0.4,0-0.7-0.1-0.9-0.4c-0.5-0.5-0.5-1.4,0-1.9C265.5,66.7,265.8,66.6,266.2,66.6 M116.5,201.9c-4.4,0-8,3.6-8,8.1s3.6,8.1,8,8.1
s8-3.6,8-8.1S120.9,201.9,116.5,201.9L116.5,201.9z M121.4,212.1c-0.8,2-2.8,3.3-4.9,3.3c-3,0-5.3-2.4-5.3-5.4c0-2.2,1.3-4.1,3.3-5
c2-0.8,4.3-0.4,5.8,1.2C121.8,207.7,122.2,210,121.4,212.1L121.4,212.1z M191.3,78.7c-4.4,0-8,3.6-8,8.1s3.6,8.1,8,8.1
c2.1,0,4.2-0.9,5.7-2.4s2.3-3.6,2.3-5.7C199.3,82.4,195.7,78.7,191.3,78.7z M196.3,88.9c-0.8,2-2.8,3.3-4.9,3.3
c-3,0-5.3-2.4-5.3-5.4c0-2.2,1.3-4.2,3.3-5s4.3-0.4,5.8,1.2C196.6,84.6,197.1,86.9,196.3,88.9L196.3,88.9z M270.2,162.6
c-4.4,0-8,3.6-8,8.1s3.6,8.1,8,8.1s8-3.6,8-8.1C278.2,166.3,274.6,162.6,270.2,162.6z M275.1,172.8c-0.8,2-2.8,3.3-4.9,3.3
c-3,0-5.3-2.4-5.3-5.4c0-2.2,1.3-4.2,3.3-5s4.3-0.4,5.8,1.2S275.9,170.8,275.1,172.8z M230.1,31.4c-4.4,0-8,3.6-8,8.1s3.6,8.1,8,8.1
c2.1,0,4.2-0.9,5.7-2.4s2.3-3.6,2.3-5.7C238.1,35,234.5,31.4,230.1,31.4z M235,41.6c-0.8,2-2.8,3.3-4.9,3.3c-3,0-5.3-2.4-5.3-5.4
c0-2.2,1.3-4.2,3.3-5s4.3-0.4,5.8,1.2C235.4,37.2,235.8,39.5,235,41.6z"/>
<path class="st3" d="M163.2,45.9h8.2c0.4,0,0.7,0.1,1,0.4c0.5,0.5,0.5,1.3,0,1.9l0,0c-0.3,0.3-0.6,0.4-1,0.4h-8.2
c-0.4,0-0.7-0.1-1-0.4c-0.5-0.5-0.5-1.3,0-1.9l0,0C162.4,46.1,162.8,45.9,163.2,45.9 M271.7,63.5v8c0,0.4-0.1,0.7-0.4,0.9
c-0.3,0.3-0.6,0.4-1,0.4c-0.7,0-1.4-0.6-1.4-1.3l0,0v-8c0-0.4,0.1-0.7,0.4-0.9c0.5-0.5,1.4-0.5,1.9,0
C271.6,62.8,271.7,63.2,271.7,63.5"/>
<path class="st3" d="M107.4,154.8h8.2c0.4,0,0.7,0.1,1,0.4c0.3,0.2,0.4,0.6,0.4,0.9c0,0.7-0.6,1.3-1.4,1.3h-8.2
c-0.5,0-0.9-0.3-1.2-0.7c-0.2-0.4-0.2-0.9,0-1.3C106.4,155.1,106.9,154.8,107.4,154.8 M169,42.7v8c0,0.4-0.1,0.7-0.4,0.9
c-0.5,0.5-1.4,0.5-2,0c-0.2-0.2-0.4-0.6-0.4-0.9v-8c0-0.4,0.1-0.7,0.4-0.9c0.5-0.5,1.4-0.5,1.9,0C168.8,42,169,42.3,169,42.7"/>
<path class="st3" d="M230.9,110.3h8.1c0.7,0,1.3,0.6,1.3,1.4c0,0.7-0.6,1.3-1.3,1.4h-8.1c-0.8,0-1.4-0.6-1.4-1.4
c0-0.4,0.1-0.7,0.4-1C230.2,110.4,230.6,110.3,230.9,110.3"/>
<path class="st3" d="M114.6,163.8v8.2c0,0.4-0.1,0.7-0.4,1c-0.5,0.5-1.4,0.5-1.9,0c-0.3-0.3-0.4-0.6-0.4-1v-8.2c0-0.4,0.1-0.7,0.4-1
c0.5-0.5,1.4-0.5,1.9,0l0,0C114.4,163.1,114.6,163.4,114.6,163.8"/>
<path class="st1" d="M126,272.7h60.4c0.7,0,1.3,0.6,1.3,1.3l0,0c0,0.7-0.6,1.3-1.3,1.4H126c-0.7,0-1.3-0.6-1.3-1.3
C124.7,273.3,125.3,272.7,126,272.7"/>
<path class="st1" d="M218.6,272.7h34.9c0.7,0,1.3,0.6,1.3,1.3c0,0.7-0.6,1.3-1.3,1.3h-34.9c-0.7,0-1.3-0.6-1.4-1.3
c0-0.4,0.1-0.7,0.4-1C217.9,272.9,218.2,272.7,218.6,272.7"/>
<path class="st1" d="M158.2,282.2h131.5c0.7,0,1.3,0.6,1.4,1.3c0,0.4-0.1,0.7-0.4,1c-0.3,0.3-0.6,0.4-1,0.4H158.2
c-0.7,0-1.3-0.6-1.3-1.3l0,0C156.9,282.8,157.5,282.2,158.2,282.2"/>
<path class="st1" d="M93.8,282.2h34.9c0.7,0,1.3,0.6,1.3,1.3l0,0c0,0.7-0.6,1.3-1.3,1.4l0,0H93.8c-0.7,0-1.3-0.6-1.4-1.3
c0-0.4,0.1-0.7,0.4-1C93.1,282.3,93.5,282.2,93.8,282.2"/>
<path class="st1" d="M197.1,272.7h8.1c0.7,0,1.3,0.6,1.3,1.3c0,0.7-0.6,1.3-1.3,1.3h-8.1c-0.7,0.1-1.4-0.5-1.4-1.3
c-0.1-0.7,0.5-1.4,1.3-1.4C197,272.7,197.1,272.7,197.1,272.7"/>
<path class="st1" d="M284.4,264.6h8.1c0.7,0,1.3,0.6,1.3,1.3l0,0c0,0.7-0.6,1.3-1.3,1.3h-8.1c-0.7,0-1.3-0.6-1.3-1.3
C283,265.3,283.6,264.6,284.4,264.6"/>
<path class="st1" d="M99.2,264.6h171.7c0.4,0,0.7,0.1,0.9,0.4c0.4,0.4,0.5,1,0.3,1.5c-0.2,0.5-0.7,0.8-1.2,0.8H99.1
c-0.7,0-1.3-0.6-1.3-1.3C97.8,265.3,98.4,264.6,99.2,264.6"/>
<path class="st3" d="M235,95.8v8.1c0,0.7-0.6,1.3-1.3,1.3s-1.3-0.6-1.3-1.3v-8.1c0-0.7,0.6-1.3,1.3-1.4C234.4,94.4,235,95,235,95.8"
/>
</svg>
/* 后台返回消息提示 */
import { Message } from 'element-ui';
// 后台返回异常提示
export default {
errorMsg: function(response) {
let local = window.location.origin;
if (local.indexOf('localhost')) {
local = 'http://gicdev.demogic.com';
}
if (response.errorCode != 0) {
if (response.errorCode == 401) {
window.location.href = local + '/gic-web/#/';
return false;
}
Message.error({
duration: 1000,
message: response.message
});
}
}
};
// 防抖
export function _debounce(fn, delay) {
var delay = delay || 200;
var timer;
// console.log(fn)
return function() {
var that = this;
var args = arguments;
if (timer) {
clearTimeout(timer);
}
timer = setTimeout(function() {
timer = null;
fn.apply(that, args);
}, delay);
};
}
// 节流
export function _throttle(fn, interval) {
var last;
var timer;
var interval = interval || 200;
return function() {
var that = this;
var args = arguments;
var now = +new Date();
if (last && now - last < interval) {
clearTimeout(timer);
timer = setTimeout(function() {
last = now;
fn.apply(that, args);
}, interval);
} else {
last = now;
fn.apply(that, args);
}
};
}
/* 消息提示 */
import { Message } from 'element-ui';
export default {
showmsg: function(msg, type) {
Message({
duration: 1000,
message: msg,
type: type
});
}
};
/*
* 判断字符长度
* @param: str
*/
export default {
/*
* 一个汉字算两个字符,一个英文字母或数字算一个字符
*/
getByteLen: function(val) {
let len = 0;
for (let i = 0; i < val.length; i++) {
let a = val.charAt(i);
if (a.match(/[^\x00-\xff]/gi) != null) {
len += 2;
} else {
len += 1;
}
}
return len;
},
/*
* 一个汉字算一个字,一个英文字母或数字算半个字
*/
getZhLen: function(val) {
let len = 0;
for (let i = 0; i < val.length; i++) {
let a = val.charAt(i);
if (a.match(/[^\x00-\xff]/gi) != null) {
len += 1;
} else {
len += 0.5;
}
}
return Math.ceil(len);
},
/*暂无用*/
cutStr: function(str, len, type) {
let char_length = 0;
for (let i = 0; i < str.length; i++) {
let son_str = str.charAt(i);
if (type == 1) {
encodeURI(son_str).length > 2 ? (char_length += 1) : (char_length += 0.5);
}
if (type == 2) {
char_length += 1;
}
if (char_length >= len) {
let sub_len = char_length == len ? i + 1 : i;
return str.substr(0, sub_len);
}
}
},
/*
* 限制字数用, 一个汉字算一个字,两个英文/字母算一个字
*/
getByteVal: function(val, max) {
let returnValue = '';
let byteValLen = 0;
for (let i = 0; i < val.length; i++) {
if (val[i].match(/[^\x00-\xff]/gi) != null) byteValLen += 1;
else byteValLen += 0.5;
if (byteValLen > max) break;
returnValue += val[i];
}
return returnValue;
},
/*
* 限制字符数用, 一个汉字算两个字符,一个英文/字母算一个字符
*/
getCharVal: function(val, max) {
let returnValue = '';
let byteValLen = 0;
for (let i = 0; i < val.length; i++) {
if (val[i].match(/[^\x00-\xff]/gi) != null) byteValLen += 2;
else byteValLen += 1;
if (byteValLen > max) break;
returnValue += val[i];
}
return returnValue;
},
/*
* 正则校验,校验非负数字
*/
regPos: function(v) {
let regTest = /^\d+(\.\d+)?$/;
return regTest.test(v);
}
};
/*
* 时间日期转换
* @param: "10:00-22:00"/ new Date()
*/
export default {
/*
* let storeBusinessTime="10:00-22:00" to
*/
timeToDate: function(val) {
let date = new Date();
let y = date.getFullYear();
let m = date.getMonth() + 1;
let day = date.getDate();
let d = [];
let newArr = [];
let dArr = val.split('-');
dArr.forEach(function(ele, index) {
newArr.push(ele.split(':'));
});
d = [new Date(y, m, day, newArr[0][0], newArr[0][1]), new Date(y, m, day, newArr[1][0], newArr[1][1])];
return d;
},
dateToTime(val) {
// (0-9)年月数字的显示
function formatDig(num) {
return num > 9 ? '' + num : '0' + num;
}
let t;
let t1 = formatDig(new Date(val[0]).getHours()) + ':' + formatDig(new Date(val[0]).getMinutes());
let t2 = formatDig(new Date(val[1]).getHours()) + ':' + formatDig(new Date(val[1]).getMinutes());
t = t1 + '-' + t2;
return t;
},
/**
* 时间戳转时间
* @param timestamp
* 调用方法 timeToDateTime(timestamp 参数,年月日连接符(-/.))
*/
timeToDateTime(timestamp, sym) {
//格式化 timestamp 返回年月日时分秒
function formatNumber(n) {
//对于小于 10 的数字返回 0[1-9]
n = n.toString();
return n[1] ? n : '0' + n;
}
if (timestamp != null) {
let date = new Date(timestamp);
let year = date.getFullYear();
let month = date.getMonth() + 1;
let day = date.getDate();
let h = date.getHours();
let m = date.getMinutes();
let s = date.getSeconds();
// console.log(timestamp);
return [year, month, day].map(formatNumber).join(sym || '-') + ' ' + [h, m, s].map(formatNumber).join(':');
}
return '--';
}
};
var SIGN_REGEXP = /([yMdhsm])(\1*)/g;
var DEFAULT_PATTERN = 'yyyy-MM-dd';
function padding(s, len) {
var len = len - (s + '').length;
for (var i = 0; i < len; i++) { s = '0' + s; }
return s;
};
export default {
getQueryStringByName: function (name) {
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
var r = window.location.search.substr(1).match(reg);
var context = "";
if (r != null)
context = r[2];
reg = null;
r = null;
return context == null || context == "" || context == "undefined" ? "" : context;
},
formatDate: {
format: function (date, pattern) {
pattern = pattern || DEFAULT_PATTERN;
return pattern.replace(SIGN_REGEXP, function ($0) {
switch ($0.charAt(0)) {
case 'y': return padding(date.getFullYear(), $0.length);
case 'M': return padding(date.getMonth() + 1, $0.length);
case 'd': return padding(date.getDate(), $0.length);
case 'w': return date.getDay() + 1;
case 'h': return padding(date.getHours(), $0.length);
case 'm': return padding(date.getMinutes(), $0.length);
case 's': return padding(date.getSeconds(), $0.length);
}
});
},
parse: function (dateString, pattern) {
var matchs1 = pattern.match(SIGN_REGEXP);
var matchs2 = dateString.match(/(\d)+/g);
if (matchs1.length == matchs2.length) {
var _date = new Date(1970, 0, 1);
for (var i = 0; i < matchs1.length; i++) {
var _int = parseInt(matchs2[i]);
var sign = matchs1[i];
switch (sign.charAt(0)) {
case 'y': _date.setFullYear(_int); break;
case 'M': _date.setMonth(_int - 1); break;
case 'd': _date.setDate(_int); break;
case 'h': _date.setHours(_int); break;
case 'm': _date.setMinutes(_int); break;
case 's': _date.setSeconds(_int); break;
}
}
return _date;
}
return null;
}
}
};
<!--
门店分组下拉选择:
<store-tree-select
@checkStoreGroupIds="checkStoreGroupIds">
</store-tree-select>
checkStoreGroupIds: function(nodes) {
let that = this;
that.storeGroupIds = nodes;
},
-->
<template>
<el-popover placement="bottom" style="min-width: 232px" v-model="storeVisible">
<div class="select-tree-wrap">
<el-tree :data="storeData" node-key="groupId" ref="storeTree" @node-click="loadData" @node-expand="loadData" show-checkbox :props="defaultProps" @check="checkStore"></el-tree>
</div>
<div class="flex-column item-cell-select inline-block m-l-10" slot="reference">
<div class="depart-item-wrap">
<div style="width: 350px;" class="el-select el-select--large depart-item-content">
<span class="font-14 color-c0c4cc p-l-10" style="display: inline-block;line-height: 32px;color: #c0c4cc;" v-if="!storeGroupIds.length">请选择门店分组</span>
<div class="el-select__tags" style="max-width: 181px;">
<span>
<template v-for="(item, index) in storeGroupIds">
<span class="el-tag el-tag--info el-tag--small" :key="index">
<span class="el-select__tags-text">{{ item.storeGroupName || item.storeName }}</span
><!-- <i class="el-tag__close el-icon-close" @click.stop="delDepart(index, storeGroupIds)"></i> -->
</span>
</template>
</span>
</div>
</div>
</div>
</div>
</el-popover>
</template>
<script>
import { getRequest } from '@/api/api';
import errMsg from '@/common/js/error';
export default {
name: 'store-tree-select',
props: {
brandId: {
type: String,
default() {
return '';
}
},
activeGroupId: {
type: String,
default() {
return '';
}
}
},
data() {
return {
projectName: '', // 当前项目名
storeVisible: false,
storeGroupIds: [],
storeData: [],
defaultProps: {
children: 'children',
label: 'storeGroupName'
}
};
},
methods: {
/**
* 展开节点
*/
loadData(obj, node, data) {
let that = this;
if (!obj.hasOwnProperty('storeId') && !obj.hasOwnProperty('loaded')) {
obj.loaded = true;
that.getStoreData(obj);
}
},
/**
* 选择 tree 节点,获取选择节点信息
*/
checkStore: function(e) {
let that = this;
that.storeGroupIds = that.$refs.storeTree.getCheckedNodes();
that.$emit('checkStoreGroupIds', that.$refs.storeTree.getCheckedNodes());
},
/**
* 简单数组-->父子数组对象
*/
treeData(data) {
let tree = data.filter(father => {
//循环所有项
let branchArr = data.filter(child => {
return father.groupId == child.parentId; //返回每一项的子级数组
});
if (branchArr.length > 0) {
father.children = branchArr; //如果存在子级,则给父级添加一个children属性,并赋值
}
return father.groupId == 0; //返回第一层
});
return tree;
},
/**
* 根据分组 id 获取门店
*/
getStoreData(obj) {
let that = this;
let para = {
storeGroupId: obj.storeGroupId,
recursionStr: true, // 显示子分组
hasPage: false // 是否显示分页
};
getRequest('/api-admin/store-list', para)
.then(res => {
let resData = res.data;
if (resData.errorCode == 0) {
if (!!resData.result && !!resData.result.list.length) {
resData.result.list.forEach(ele => {
ele.storeGroupName = ele.storeName;
ele.storeGroupIds = ele.storeId;
obj.children.push(ele);
});
}
return;
}
errMsg.errorMsg(resData);
})
.catch(function(error) {
that.$message.error({
duration: 1000,
message: error.message
});
});
},
/**
* 获取所有门店分组
*/
getStoreGroup() {
let that = this;
getRequest('/api-admin/store-group-list', {})
.then(res => {
let resData = res.data;
if (resData.errorCode == 0) {
if (!!resData.result && !!resData.result.length) {
that.storeData = resData.result;
}
return;
}
errMsg.errorMsg(resData);
})
.catch(function(error) {
that.$message.error({
duration: 1000,
message: error.message
});
});
}
},
mounted() {
const that = this;
that.getStoreGroup();
}
};
</script>
<style lang="less" scoped>
.depart-item-content {
width: 213px;
height: 32px;
overflow: hidden;
white-space: nowrap;
border-radius: 4px;
border: 1px solid #dcdfe6;
cursor: pointer;
-webkit-box-sizing: border-box;
box-sizing: border-box;
background: #fff;
}
.select-tree-wrap {
max-height: 300px;
overflow-y: auto;
/deep/ .el-tree-node__expand-icon.is-leaf {
cursor: pointer;
color: #c0c4cc;
}
}
.item-cell-select {
/deep/ .el-select__tags {
white-space: nowrap;
overflow: hidden;
}
}
</style>
import promise from 'es6-promise';
promise.polyfill();
// import Vue from 'vue';
import App from './App';
import router from './router';
import { Message } from 'element-ui';
import VueAxios from 'vue-axios';
import axios from 'axios';
/* eslint-disable */
// import 'element-ui/lib/theme-chalk/index.css'
import '../theme/index.css';
import '../static/css/index.less';
/* import vueGicHeader from '@gic-test/vue-gic-header';
import vueGicAsideMenu from '@gic-test/vue-gic-aside-menu';
import vueAreaAb from '@gic-test/vue-area-ab';
// 新增公共 footer插件
import vueGicFooter from '@gic-test/vue-gic-footer';
import vueGicImgPreview from '@gic-test/vue-gic-img-preview';
import vueGicStoreNew from '@gic-test/vue-gic-store-new';
Vue.use(vueGicStoreNew);
Vue.use(vueGicImgPreview);
Vue.use(vueGicFooter);
Vue.use(vueAreaAb);
Vue.use(vueGicAsideMenu);
Vue.use(vueGicHeader); */
Vue.config.productionTip = false;
// Vue.use(ElementUI, { size: 'large' });
Vue.use(VueAxios, axios);
Vue.axios.defaults.withCredentials = true; // 跨域cookie访问
Vue.axios.interceptors.request.use(
config => {
return config;
},
err => {
return Promise.reject(err);
}
);
Vue.axios.interceptors.response.use(
response => {
if (response.status == 200 && response.data.errorCode == 1) {
}
return response;
},
error => {
if (error.response) {
switch (error.response.status) {
case 401:
window.location.href = window.location.origin + '/gic-web/#/';
case 500:
Message.error('服务器500');
}
}
return Promise.reject(error.response.data);
}
);
// router.beforeEach((to, from, next) => {
// if (window.location.pathname.slice(-1) !== '/') {
// window.location = window.location.pathname + '/';
// }
// })
/* eslint-disable no-new */
new Vue({
el: '#app',
router,
components: { App },
template: '<App/>'
});
/* eslint-disable */
module.exports = (parantfile, file) => r => {
import('view/' + parantfile + '/' + file + '.vue').then(module => {
r(module);
});
};
// import Vue from 'vue';
import Router from 'vue-router';
import _import from './_import.js';
// Vue.use(Router);
const errorPage = r => {
import('view/errorPage/index.vue').then(module => {
r(module);
});
};
export const constantRouterMap = [
{
path: '/',
name: '好办签到',
redirect: '/signExport',
component: _import('index', 'index')
},
{
path: '/signExport',
name: '好办签到',
component: _import('index', 'index')
},
{
path: '/403',
name: '无权访问',
component: errorPage
},
{
path: '/404',
name: 'error404',
component: errorPage
},
{
path: '/500',
name: 'error500',
component: errorPage
},
{ path: '*', redirect: '/404', hidden: true }
];
export default new Router({
// mode:'history',
routes: constantRouterMap,
scrollBehavior: () => ({ y: 0 })
});
import Vuex from 'vuex';
import Vue from 'vue';
import * as types from './types';
Vue.use(Vuex);
export default new Vuex.Store({
state: {
user: {},
token: null,
title: '',
show: false
},
mutations: {
[types.LOGIN]: (state, data) => {
sessionStorage.token = data;
state.token = data;
},
[types.LOGOUT]: state => {
sessionStorage.removeItem('token');
state.token = null;
},
[types.TITLE]: (state, data) => {
state.title = data;
},
[types.SHOW]: (state, data) => {
state.show = data;
}
}
});
export const LOGIN = 'login';
export const LOGOUT = 'logout';
export const TITLE = 'title';
export const SHOW = 'show';
import Vue from 'vue'
import Clipboard from 'clipboard'
function clipboardSuccess() {
Vue.prototype.$message({
message: 'Copy successfully',
type: 'success',
duration: 1500
})
}
function clipboardError() {
Vue.prototype.$message({
message: 'Copy failed',
type: 'error'
})
}
export default function handleClipboard(text, event) {
const clipboard = new Clipboard(event.target, {
text: () => text
})
clipboard.on('success', () => {
clipboardSuccess()
clipboard.off('error')
clipboard.off('success')
clipboard.destroy()
})
clipboard.on('error', () => {
clipboardError()
clipboard.off('error')
clipboard.off('success')
clipboard.destroy()
})
clipboard.onClick(event)
}
/*设置cookie*/
export function setCookie(c_name,value,expire) {
var date=new Date();
date.setSeconds(date.getSeconds()+expire);
document.cookie = c_name + "="+ encodeURI(value)+"; expires="+date.toGMTString();
}
/*获取cookie*/
export function getCookie(c_name){
if(document.cookie.length>0){
var name = encodeURI(c_name);
var allcookies = document.cookie;
name += "=";
var pos = allcookies.indexOf(name);
if(pos != -1){
var start = pos + name.length;
var end = allcookies.indexOf(";",start);
if(end == -1){
end = allcookies.length;
}
var value = allcookies.substring(start,end);
return decodeURI(value);
} else{
return "";
}
}
}
/*删除cookie*/
export function delCookie(c_name){
setCookie(c_name, "", -1);
}
/**
* Created by jiachenpan on 17/3/8.
*/
export default function createUniqueString() {
const timestamp = +new Date() + ''
const randomNum = parseInt((1 + Math.random()) * 65536) + ''
return (+(randomNum + timestamp)).toString(32)
}
export function fomatBirthday(val) {
if(val) {
let date = new Date(val);
let Y = date.getFullYear() + '-';
let M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-';
let D = (date.getDate() < 10 ? '0'+ (date.getDate()): date.getDate());
return Y+M+D;
}else {
return ''
}
}
// 解析时间
export function dateformat(time, fmt) {
let o = {
"M+": time.getMonth() + 1, //月份
"d+": time.getDate(), //日
"h+": time.getHours(), //小时
"m+": time.getMinutes(), //分
"s+": time.getSeconds(), //秒
"q+": Math.floor((time.getMonth() + 3) / 3), //季度
"S": time.getMilliseconds() //毫秒
};
if (/(y+)/.test(fmt)) {
fmt = fmt.replace(RegExp.$1, (time.getFullYear() + "").substr(4 - RegExp.$1.length));
}
for (var k in o) {
if (new RegExp("(" + k + ")").test(fmt)) {
fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
}
}
return fmt;
}
export const __VERSION = '1.1';
/**
* Created by jiachenpan on 16/11/18.
*/
export function parseTime(time, cFormat) {
if (arguments.length === 0) {
return null
}
const format = cFormat || '{y}-{m}-{d} {h}:{i}:{s}'
let date
if (typeof time === 'object') {
date = time
} else {
if (('' + time).length === 10) time = parseInt(time) * 1000
date = new Date(time)
}
const formatObj = {
y: date.getFullYear(),
m: date.getMonth() + 1,
d: date.getDate(),
h: date.getHours(),
i: date.getMinutes(),
s: date.getSeconds(),
a: date.getDay()
}
const time_str = format.replace(/{(y|m|d|h|i|s|a)+}/g, (result, key) => {
let value = formatObj[key]
if (key === 'a') return ['一', '二', '三', '四', '五', '六', '日'][value - 1]
if (result.length > 0 && value < 10) {
value = '0' + value
}
return value || 0
})
return time_str
}
export function formatTime(time, option) {
time = +time * 1000
const d = new Date(time)
const now = Date.now()
const diff = (now - d) / 1000
if (diff < 30) {
return '刚刚'
} else if (diff < 3600) { // less 1 hour
return Math.ceil(diff / 60) + '分钟前'
} else if (diff < 3600 * 24) {
return Math.ceil(diff / 3600) + '小时前'
} else if (diff < 3600 * 24 * 2) {
return '1天前'
}
if (option) {
return parseTime(time, option)
} else {
return d.getMonth() + 1 + '月' + d.getDate() + '日' + d.getHours() + '时' + d.getMinutes() + '分'
}
}
// 格式化时间
export function getQueryObject(url) {
url = url == null ? window.location.href : url
const search = url.substring(url.lastIndexOf('?') + 1)
const obj = {}
const reg = /([^?&=]+)=([^?&=]*)/g
search.replace(reg, (rs, $1, $2) => {
const name = decodeURIComponent($1)
let val = decodeURIComponent($2)
val = String(val)
obj[name] = val
return rs
})
return obj
}
/**
*get getByteLen
* @param {Sting} val input value
* @returns {number} output value
*/
export function getByteLen(val) {
let len = 0
for (let i = 0; i < val.length; i++) {
if (val[i].match(/[^\x00-\xff]/ig) != null) {
len += 1
} else { len += 0.5 }
}
return Math.floor(len)
}
export function cleanArray(actual) {
const newArray = []
for (let i = 0; i < actual.length; i++) {
if (actual[i]) {
newArray.push(actual[i])
}
}
return newArray
}
export function param(json) {
if (!json) return ''
return cleanArray(Object.keys(json).map(key => {
if (json[key] === undefined) return ''
return encodeURIComponent(key) + '=' +
encodeURIComponent(json[key])
})).join('&')
}
export function param2Obj(url) {
const search = url.split('?')[1]
if (!search) {
return {}
}
return JSON.parse('{"' + decodeURIComponent(search).replace(/"/g, '\\"').replace(/&/g, '","').replace(/=/g, '":"') + '"}')
}
export function html2Text(val) {
const div = document.createElement('div')
div.innerHTML = val
return div.textContent || div.innerText
}
export function objectMerge(target, source) {
/* Merges two objects,
giving the last one precedence */
if (typeof target !== 'object') {
target = {}
}
if (Array.isArray(source)) {
return source.slice()
}
Object.keys(source).forEach((property) => {
const sourceProperty = source[property]
if (typeof sourceProperty === 'object') {
target[property] = objectMerge(target[property], sourceProperty)
} else {
target[property] = sourceProperty
}
})
return target
}
export function scrollTo(element, to, duration) {
if (duration <= 0) return
const difference = to - element.scrollTop
const perTick = difference / duration * 10
setTimeout(() => {
console.log(new Date())
element.scrollTop = element.scrollTop + perTick
if (element.scrollTop === to) return
scrollTo(element, to, duration - 10)
}, 10)
}
export function toggleClass(element, className) {
if (!element || !className) {
return
}
let classString = element.className
const nameIndex = classString.indexOf(className)
if (nameIndex === -1) {
classString += '' + className
} else {
classString = classString.substr(0, nameIndex) + classString.substr(nameIndex + className.length)
}
element.className = classString
}
export const pickerOptions = [
{
text: '今天',
onClick(picker) {
const end = new Date()
const start = new Date(new Date().toDateString())
end.setTime(start.getTime())
picker.$emit('pick', [start, end])
}
}, {
text: '最近一周',
onClick(picker) {
const end = new Date(new Date().toDateString())
const start = new Date()
start.setTime(end.getTime() - 3600 * 1000 * 24 * 7)
picker.$emit('pick', [start, end])
}
}, {
text: '最近一个月',
onClick(picker) {
const end = new Date(new Date().toDateString())
const start = new Date()
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30)
picker.$emit('pick', [start, end])
}
}, {
text: '最近三个月',
onClick(picker) {
const end = new Date(new Date().toDateString())
const start = new Date()
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90)
picker.$emit('pick', [start, end])
}
}]
export function getTime(type) {
if (type === 'start') {
return new Date().getTime() - 3600 * 1000 * 24 * 90
} else {
return new Date(new Date().toDateString())
}
}
export function debounce(func, wait, immediate) {
let timeout, args, context, timestamp, result
const later = function() {
// 据上一次触发时间间隔
const last = +new Date() - timestamp
// 上次被包装函数被调用时间间隔last小于设定时间间隔wait
if (last < wait && last > 0) {
timeout = setTimeout(later, wait - last)
} else {
timeout = null
// 如果设定为immediate===true,因为开始边界已经调用过了此处无需调用
if (!immediate) {
result = func.apply(context, args)
if (!timeout) context = args = null
}
}
}
return function(...args) {
context = this
timestamp = +new Date()
const callNow = immediate && !timeout
// 如果延时不存在,重新设定延时
if (!timeout) timeout = setTimeout(later, wait)
if (callNow) {
result = func.apply(context, args)
context = args = null
}
return result
}
}
export function deepClone(source) {
if (!source && typeof source !== 'object') {
throw new Error('error arguments', 'shallowClone')
}
const targetObj = source.constructor === Array ? [] : {}
Object.keys(source).forEach((keys) => {
if (source[keys] && typeof source[keys] === 'object') {
targetObj[keys] = source[keys].constructor === Array ? [] : {}
targetObj[keys] = deepClone(source[keys])
} else {
targetObj[keys] = source[keys]
}
})
return targetObj
}
/**
*Created by jiachenpan on 16/11/29.
* @param {Sting} url
* @param {Sting} title
* @param {Number} w
* @param {Number} h
*/
export default function openWindow(url, title, w, h) {
// Fixes dual-screen position Most browsers Firefox
const dualScreenLeft = window.screenLeft !== undefined ? window.screenLeft : screen.left
const dualScreenTop = window.screenTop !== undefined ? window.screenTop : screen.top
const width = window.innerWidth ? window.innerWidth : document.documentElement.clientWidth ? document.documentElement.clientWidth : screen.width
const height = window.innerHeight ? window.innerHeight : document.documentElement.clientHeight ? document.documentElement.clientHeight : screen.height
const left = ((width / 2) - (w / 2)) + dualScreenLeft
const top = ((height / 2) - (h / 2)) + dualScreenTop
const newWindow = window.open(url, title, 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=yes, copyhistory=no, width=' + w + ', height=' + h + ', top=' + top + ', left=' + left)
// Puts focus on the newWindow
if (window.focus) {
newWindow.focus()
}
}
import axios from 'axios'
import { Message } from 'element-ui'
import store from '@/store'
import { getToken } from '@/utils/auth'
// create an axios instance
const service = axios.create({
baseURL: process.env.BASE_API, // api的base_url
timeout: 5000 // request timeout
})
// request interceptor
service.interceptors.request.use(config => {
// Do something before request is sent
if (store.getters.token) {
config.headers['X-Token'] = getToken() // 让每个请求携带token-- ['X-Token']为自定义key 请根据实际情况自行修改
}
return config
}, error => {
// Do something with request error
console.log(error) // for debug
Promise.reject(error)
})
// respone interceptor
service.interceptors.response.use(
response => response,
/**
* 下面的注释为通过response自定义code来标示请求状态,当code返回如下情况为权限有问题,登出并返回到登录页
* 如通过xmlhttprequest 状态码标识 逻辑可写在下面error中
*/
// const res = response.data;
// if (res.code !== 20000) {
// Message({
// message: res.message,
// type: 'error',
// duration: 5 * 1000
// });
// // 50008:非法的token; 50012:其他客户端登录了; 50014:Token 过期了;
// if (res.code === 50008 || res.code === 50012 || res.code === 50014) {
// MessageBox.confirm('你已被登出,可以取消继续留在该页面,或者重新登录', '确定登出', {
// confirmButtonText: '重新登录',
// cancelButtonText: '取消',
// type: 'warning'
// }).then(() => {
// store.dispatch('FedLogOut').then(() => {
// location.reload();// 为了重新实例化vue-router对象 避免bug
// });
// })
// }
// return Promise.reject('error');
// } else {
// return response.data;
// }
error => {
console.log('err' + error)// for debug
Message({
message: error.message,
type: 'error',
duration: 5 * 1000
})
return Promise.reject(error)
})
export default service
/*获取url参数*/
/**
* ?name=zhangsan&age=23
* @param {} name url 参数名
* getParamsByName(age) 23
*/
export function getParamsByName(attr) {
let ret = RegExp(`[?&]${attr}=([^&]*)`).exec(window.location.href);
return ret && decodeURIComponent(ret[1].replace(/\+/g, ' '));
}
/**
* 人群筛选器 返回具体筛选条件的个数
* @param {}
* return 筛选条件的个数
*/
export function normalizePeople(jsonStr) {
if (!jsonStr) {
return 0;
}
let ret = 0;
const jsonObj = JSON.parse(jsonStr);
if (jsonObj.list && jsonObj.list.length) {
// 如果是一个对象
jsonObj.list.forEach(ele => {
// 如果list在ele里面 表示里面包含list数组
if ('list' in ele) {
if (ele.list && ele.list.length) {
ret += ele.list.length;
}
} else {
ret += 1;
}
});
}
return ret;
}
/**
* 时间格式转换
* 20181010101010 转换成2018-10-10 10:10:10
* @param { timeStr } 要转换的时间
* @param { type } 要转换的格式
*/
export function formatLongTime(timeStr, type) {
if (!timeStr) {
return '--';
}
timeStr = '' + timeStr;
let regTest = /^(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})$/g;
if (type == 1) {
return timeStr.replace(regTest, function(match, p, p1, p2, p3, p4, p5){
return [p, p1, p2].join('-') + ' ' + [p3, p4, p5].join(':');
});
} else {
return timeStr.replace(/^(\d{4})(\d{2})(\d{2})$/g, function(match, p, p1, p2){
return [p, p1, p2].join('-');
});
}
}
/**
* 生日时间转换
* @param {}
*/
export function paddingBorth(str) {
if (!str) {
return '--';
}
str = '' + str;
// 如果是10月之前补位
if (str.length == 3) {
str = 0 + str;
}
return str.replace(/^(\d{2})(\d{2})$/g, function(match, p , p1) {
return [p, p1].join('-');
});
}
\ No newline at end of file
/**
* Created by jiachenpan on 16/11/18.
*/
export function isvalidUsername(str) {
const valid_map = ['admin', 'editor']
return valid_map.indexOf(str.trim()) >= 0
}
/* 合法uri*/
export function validateURL(textval) {
const urlregex = /^(https?|ftp):\/\/([a-zA-Z0-9.-]+(:[a-zA-Z0-9.&%$-]+)*@)*((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]?)(\.(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])){3}|([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+\.(com|edu|gov|int|mil|net|org|biz|arpa|info|name|pro|aero|coop|museum|[a-zA-Z]{2}))(:[0-9]+)*(\/($|[a-zA-Z0-9.,?'\\+&%$#=~_-]+))*$/
return urlregex.test(textval)
}
/* 小写字母*/
export function validateLowerCase(str) {
const reg = /^[a-z]+$/
return reg.test(str)
}
/* 大写字母*/
export function validateUpperCase(str) {
const reg = /^[A-Z]+$/
return reg.test(str)
}
/* 大小写字母*/
export function validateAlphabets(str) {
const reg = /^[A-Za-z]+$/
return reg.test(str)
}
/**
* validate email
* @param email
* @returns {boolean}
*/
export function validateEmail(email) {
const re = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/
return re.test(email)
}
/* eslint-disable */
/* Blob.js
* A Blob implementation.
* 2014-05-27
*
* By Eli Grey, http://eligrey.com
* By Devin Samarin, https://github.com/eboyjr
* License: X11/MIT
* See LICENSE.md
*/
/*global self, unescape */
/*jslint bitwise: true, regexp: true, confusion: true, es5: true, vars: true, white: true,
plusplus: true */
/*! @source http://purl.eligrey.com/github/Blob.js/blob/master/Blob.js */
(function (view) {
"use strict";
view.URL = view.URL || view.webkitURL;
if (view.Blob && view.URL) {
try {
new Blob;
return;
} catch (e) {}
}
// Internally we use a BlobBuilder implementation to base Blob off of
// in order to support older browsers that only have BlobBuilder
var BlobBuilder = view.BlobBuilder || view.WebKitBlobBuilder || view.MozBlobBuilder || (function(view) {
var
get_class = function(object) {
return Object.prototype.toString.call(object).match(/^\[object\s(.*)\]$/)[1];
}
, FakeBlobBuilder = function BlobBuilder() {
this.data = [];
}
, FakeBlob = function Blob(data, type, encoding) {
this.data = data;
this.size = data.length;
this.type = type;
this.encoding = encoding;
}
, FBB_proto = FakeBlobBuilder.prototype
, FB_proto = FakeBlob.prototype
, FileReaderSync = view.FileReaderSync
, FileException = function(type) {
this.code = this[this.name = type];
}
, file_ex_codes = (
"NOT_FOUND_ERR SECURITY_ERR ABORT_ERR NOT_READABLE_ERR ENCODING_ERR "
+ "NO_MODIFICATION_ALLOWED_ERR INVALID_STATE_ERR SYNTAX_ERR"
).split(" ")
, file_ex_code = file_ex_codes.length
, real_URL = view.URL || view.webkitURL || view
, real_create_object_URL = real_URL.createObjectURL
, real_revoke_object_URL = real_URL.revokeObjectURL
, URL = real_URL
, btoa = view.btoa
, atob = view.atob
, ArrayBuffer = view.ArrayBuffer
, Uint8Array = view.Uint8Array
;
FakeBlob.fake = FB_proto.fake = true;
while (file_ex_code--) {
FileException.prototype[file_ex_codes[file_ex_code]] = file_ex_code + 1;
}
if (!real_URL.createObjectURL) {
URL = view.URL = {};
}
URL.createObjectURL = function(blob) {
var
type = blob.type
, data_URI_header
;
if (type === null) {
type = "application/octet-stream";
}
if (blob instanceof FakeBlob) {
data_URI_header = "data:" + type;
if (blob.encoding === "base64") {
return data_URI_header + ";base64," + blob.data;
} else if (blob.encoding === "URI") {
return data_URI_header + "," + decodeURIComponent(blob.data);
} if (btoa) {
return data_URI_header + ";base64," + btoa(blob.data);
} else {
return data_URI_header + "," + encodeURIComponent(blob.data);
}
} else if (real_create_object_URL) {
return real_create_object_URL.call(real_URL, blob);
}
};
URL.revokeObjectURL = function(object_URL) {
if (object_URL.substring(0, 5) !== "data:" && real_revoke_object_URL) {
real_revoke_object_URL.call(real_URL, object_URL);
}
};
FBB_proto.append = function(data/*, endings*/) {
var bb = this.data;
// decode data to a binary string
if (Uint8Array && (data instanceof ArrayBuffer || data instanceof Uint8Array)) {
var
str = ""
, buf = new Uint8Array(data)
, i = 0
, buf_len = buf.length
;
for (; i < buf_len; i++) {
str += String.fromCharCode(buf[i]);
}
bb.push(str);
} else if (get_class(data) === "Blob" || get_class(data) === "File") {
if (FileReaderSync) {
var fr = new FileReaderSync;
bb.push(fr.readAsBinaryString(data));
} else {
// async FileReader won't work as BlobBuilder is sync
throw new FileException("NOT_READABLE_ERR");
}
} else if (data instanceof FakeBlob) {
if (data.encoding === "base64" && atob) {
bb.push(atob(data.data));
} else if (data.encoding === "URI") {
bb.push(decodeURIComponent(data.data));
} else if (data.encoding === "raw") {
bb.push(data.data);
}
} else {
if (typeof data !== "string") {
data += ""; // convert unsupported types to strings
}
// decode UTF-16 to binary string
bb.push(unescape(encodeURIComponent(data)));
}
};
FBB_proto.getBlob = function(type) {
if (!arguments.length) {
type = null;
}
return new FakeBlob(this.data.join(""), type, "raw");
};
FBB_proto.toString = function() {
return "[object BlobBuilder]";
};
FB_proto.slice = function(start, end, type) {
var args = arguments.length;
if (args < 3) {
type = null;
}
return new FakeBlob(
this.data.slice(start, args > 1 ? end : this.data.length)
, type
, this.encoding
);
};
FB_proto.toString = function() {
return "[object Blob]";
};
FB_proto.close = function() {
this.size = this.data.length = 0;
};
return FakeBlobBuilder;
}(view));
view.Blob = function Blob(blobParts, options) {
var type = options ? (options.type || "") : "";
var builder = new BlobBuilder();
if (blobParts) {
for (var i = 0, len = blobParts.length; i < len; i++) {
builder.append(blobParts[i]);
}
}
return builder.getBlob(type);
};
}(typeof self !== "undefined" && self || typeof window !== "undefined" && window || this.content || this));
/* eslint-disable */
require('script-loader!file-saver');
require('./Blob');
require('script-loader!xlsx/dist/xlsx.core.min');
function generateArray(table) {
var out = [];
var rows = table.querySelectorAll('tr');
var ranges = [];
for (var R = 0; R < rows.length; ++R) {
var outRow = [];
var row = rows[R];
var columns = row.querySelectorAll('td');
for (var C = 0; C < columns.length; ++C) {
var cell = columns[C];
var colspan = cell.getAttribute('colspan');
var rowspan = cell.getAttribute('rowspan');
var cellValue = cell.innerText;
if (cellValue !== "" && cellValue == +cellValue) cellValue = +cellValue;
//Skip ranges
ranges.forEach(function (range) {
if (R >= range.s.r && R <= range.e.r && outRow.length >= range.s.c && outRow.length <= range.e.c) {
for (var i = 0; i <= range.e.c - range.s.c; ++i) outRow.push(null);
}
});
//Handle Row Span
if (rowspan || colspan) {
rowspan = rowspan || 1;
colspan = colspan || 1;
ranges.push({s: {r: R, c: outRow.length}, e: {r: R + rowspan - 1, c: outRow.length + colspan - 1}});
}
;
//Handle Value
outRow.push(cellValue !== "" ? cellValue : null);
//Handle Colspan
if (colspan) for (var k = 0; k < colspan - 1; ++k) outRow.push(null);
}
out.push(outRow);
}
return [out, ranges];
};
function datenum(v, date1904) {
if (date1904) v += 1462;
var epoch = Date.parse(v);
return (epoch - new Date(Date.UTC(1899, 11, 30))) / (24 * 60 * 60 * 1000);
}
function sheet_from_array_of_arrays(data, opts) {
var ws = {};
var range = {s: {c: 10000000, r: 10000000}, e: {c: 0, r: 0}};
for (var R = 0; R != data.length; ++R) {
for (var C = 0; C != data[R].length; ++C) {
if (range.s.r > R) range.s.r = R;
if (range.s.c > C) range.s.c = C;
if (range.e.r < R) range.e.r = R;
if (range.e.c < C) range.e.c = C;
var cell = {v: data[R][C]};
if (cell.v == null) continue;
var cell_ref = XLSX.utils.encode_cell({c: C, r: R});
if (typeof cell.v === 'number') cell.t = 'n';
else if (typeof cell.v === 'boolean') cell.t = 'b';
else if (cell.v instanceof Date) {
cell.t = 'n';
cell.z = XLSX.SSF._table[14];
cell.v = datenum(cell.v);
}
else cell.t = 's';
ws[cell_ref] = cell;
}
}
if (range.s.c < 10000000) ws['!ref'] = XLSX.utils.encode_range(range);
return ws;
}
function Workbook() {
if (!(this instanceof Workbook)) return new Workbook();
this.SheetNames = [];
this.Sheets = {};
}
function s2ab(s) {
var buf = new ArrayBuffer(s.length);
var view = new Uint8Array(buf);
for (var i = 0; i != s.length; ++i) view[i] = s.charCodeAt(i) & 0xFF;
return buf;
}
export function export_table_to_excel(id) {
var theTable = document.getElementById(id);
console.log('a')
var oo = generateArray(theTable);
var ranges = oo[1];
/* original data */
var data = oo[0];
var ws_name = "SheetJS";
console.log(data);
var wb = new Workbook(), ws = sheet_from_array_of_arrays(data);
/* add ranges to worksheet */
// ws['!cols'] = ['apple', 'banan'];
ws['!merges'] = ranges;
/* add worksheet to workbook */
wb.SheetNames.push(ws_name);
wb.Sheets[ws_name] = ws;
var wbout = XLSX.write(wb, {bookType: 'xlsx', bookSST: false, type: 'binary'});
saveAs(new Blob([s2ab(wbout)], {type: "application/octet-stream"}), "test.xlsx")
}
function formatJson(jsonData) {
console.log(jsonData)
}
export function export_json_to_excel(th, jsonData, defaultTitle) {
/* original data */
var data = jsonData;
data.unshift(th);
var ws_name = "SheetJS";
var wb = new Workbook(), ws = sheet_from_array_of_arrays(data);
/* add worksheet to workbook */
wb.SheetNames.push(ws_name);
wb.Sheets[ws_name] = ws;
var wbout = XLSX.write(wb, {bookType: 'xlsx', bookSST: false, type: 'binary'});
var title = defaultTitle || '列表'
saveAs(new Blob([s2ab(wbout)], {type: "application/octet-stream"}), title + ".xlsx")
}
<template>
<div class="errPage-container">
<el-button @click="back" icon="arrow-left" class="pan-back-btn">返回</el-button>
<el-row>
<el-col :span="12">
<h1 class="text-jumbo text-ginormous">你没有权限去该页面!</h1>
<h2></h2>
<h6></h6>
<ul class="list-unstyled">
<!-- <li>或者你可以去:</li>
<li class="link-type">
<router-link to="#/companyGroup">回首页</router-link>
</li> -->
<!-- <li class="link-type"><a href="https://www.taobao.com/">随便看看</a></li>
<li><a @click.prevent="dialogVisible=true" href="#">点我看图</a></li> -->
</ul>
</el-col>
<el-col :span="12">
<img :src="errGif" width="313" height="428" alt="Girl has dropped her ice cream." />
</el-col>
</el-row>
<el-dialog title="随便看" :visible.sync="dialogVisible">
<img class="pan-img" :src="ewizardClap" />
</el-dialog>
</div>
</template>
<script>
import errGif from '@/assets/401_images/401.gif';
export default {
name: 'page401',
data() {
return {
errGif: errGif + '?' + +new Date(),
ewizardClap: 'https://wpimg.wallstcn.com/007ef517-bafd-4066-aae4-6883632d9646',
dialogVisible: false
};
},
methods: {
back() {
if (this.$route.query.noGoBack) {
this.$router.push({ path: '/myTagLib' });
} else {
this.$router.go(-1);
}
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
.errPage-container {
width: 800px;
margin: 100px auto;
.pan-back-btn {
background: #008489;
color: #fff;
}
.pan-gif {
margin: 0 auto;
display: block;
}
.pan-img {
display: block;
margin: 0 auto;
width: 100%;
}
.text-jumbo {
font-size: 60px;
font-weight: 700;
color: #484848;
}
.list-unstyled {
font-size: 14px;
li {
padding-bottom: 5px;
}
a {
color: #008489;
text-decoration: none;
&:hover {
text-decoration: underline;
}
}
}
}
</style>
<template>
<div style="background:#f0f2f5;margin-top: -20px;height:100%;">
<div class="wscn-http404">
<div class="pic-404">
<img class="pic-404__parent" :src="img_403" alt="403" />
</div>
<div class="bullshit">
<!-- <div class="bullshit__oops">403</div> -->
<div class="bullshit__headline">{{ message }}</div>
<a @click="changeRoute('/myTagLib')" class="bullshit__return-home">返回首页</a>
</div>
</div>
</div>
</template>
<script>
import img_403 from '@/assets/403_images/error_403.svg';
export default {
name: 'page403',
data() {
return {
img_403
};
},
methods: {
/**
* 路由跳转
*/
changeRoute(route) {
this.$router.push(route);
}
},
computed: {
message() {
return '抱歉,你无权访问该页面';
}
}
};
</script>
<style lang="scss" scoped>
.wscn-http404 {
position: relative;
width: 1200px;
margin: 20px auto 60px;
padding: 0 100px;
overflow: hidden;
.pic-404 {
position: relative;
float: left;
width: 600px;
padding: 150px 152px 150px 0;
text-align: right;
overflow: hidden;
&__parent {
width: 100%;
max-width: 430px;
}
&__child {
position: absolute;
&.left {
width: 80px;
top: 17px;
left: 220px;
opacity: 0;
animation-name: cloudLeft;
animation-duration: 2s;
animation-timing-function: linear;
animation-fill-mode: forwards;
animation-delay: 1s;
}
&.mid {
width: 46px;
top: 10px;
left: 420px;
opacity: 0;
animation-name: cloudMid;
animation-duration: 2s;
animation-timing-function: linear;
animation-fill-mode: forwards;
animation-delay: 1.2s;
}
&.right {
width: 62px;
top: 100px;
left: 500px;
opacity: 0;
animation-name: cloudRight;
animation-duration: 2s;
animation-timing-function: linear;
animation-fill-mode: forwards;
animation-delay: 1s;
}
@keyframes cloudLeft {
0% {
top: 17px;
left: 220px;
opacity: 0;
}
20% {
top: 33px;
left: 188px;
opacity: 1;
}
80% {
top: 81px;
left: 92px;
opacity: 1;
}
100% {
top: 97px;
left: 60px;
opacity: 0;
}
}
@keyframes cloudMid {
0% {
top: 10px;
left: 420px;
opacity: 0;
}
20% {
top: 40px;
left: 360px;
opacity: 1;
}
70% {
top: 130px;
left: 180px;
opacity: 1;
}
100% {
top: 160px;
left: 120px;
opacity: 0;
}
}
@keyframes cloudRight {
0% {
top: 100px;
left: 500px;
opacity: 0;
}
20% {
top: 120px;
left: 460px;
opacity: 1;
}
80% {
top: 180px;
left: 340px;
opacity: 1;
}
100% {
top: 200px;
left: 300px;
opacity: 0;
}
}
}
}
.bullshit {
position: relative;
float: left;
width: 300px;
padding: 150px 0;
overflow: hidden;
display: flex;
align-items: flex-start;
flex-direction: column;
justify-content: center;
height: 360px;
&__oops {
color: #434e59;
font-size: 72px;
font-weight: 600;
line-height: 72px;
margin-bottom: 24px;
/*animation-name: slideUp;
animation-duration: 0.5s;
animation-fill-mode: forwards;*/
}
&__headline {
color: rgba(0, 0, 0, 0.45);
font-size: 20px;
line-height: 28px;
margin-bottom: 16px;
/*animation-name: slideUp;
animation-duration: 0.5s;
animation-delay: 0.1s;
animation-fill-mode: forwards;*/
}
&__return-home {
display: inline-block;
height: 32px;
line-height: 32px;
font-weight: 400;
text-align: center;
-ms-touch-action: manipulation;
touch-action: manipulation;
background-image: none;
white-space: nowrap;
padding: 0 15px;
font-size: 14px;
border-radius: 4px;
border: 1px solid #1890ff;
color: #fff;
background-color: #1890ff;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.12);
-webkit-box-shadow: 0 2px 0 rgba(0, 0, 0, 0.035);
box-shadow: 0 2px 0 rgba(0, 0, 0, 0.035);
cursor: pointer;
/*animation-name: slideUp;
animation-duration: 0.5s;
animation-delay: 0.3s;
animation-fill-mode: forwards;*/
}
@keyframes slideUp {
0% {
transform: translateY(60px);
opacity: 0;
}
100% {
transform: translateY(0);
opacity: 1;
}
}
}
}
</style>
<template>
<div style="background:#f0f2f5;margin-top: -20px;height:100%;">
<div class="wscn-http404">
<div class="pic-404">
<img class="pic-404__parent" :src="img_404" alt="404" />
</div>
<div class="bullshit">
<!-- <div class="bullshit__oops">404</div> -->
<div class="bullshit__headline">{{ message }}</div>
<a @click="changeRoute('/myTagLib')" class="bullshit__return-home">返回首页</a>
</div>
</div>
</div>
</template>
<script>
import img_404 from '@/assets/404_images/error_404.svg';
export default {
name: 'page404',
data() {
return {
img_404
};
},
methods: {
/**
* 路由跳转
*/
changeRoute(route) {
this.$router.push(route);
}
},
computed: {
message() {
return '抱歉,你访问的页面不存在';
}
},
/* eslint-disable */
mounted() {
}
};
</script>
<style lang="scss" scoped>
.wscn-http404 {
position: relative;
width: 1200px;
margin: 20px auto 60px;
padding: 0 100px;
overflow: hidden;
.pic-404 {
position: relative;
float: left;
width: 600px;
padding: 150px 152px 150px 0;
text-align: right;
overflow: hidden;
&__parent {
width: 100%;
max-width: 430px;
}
&__child {
position: absolute;
&.left {
width: 80px;
top: 17px;
left: 220px;
opacity: 0;
animation-name: cloudLeft;
animation-duration: 2s;
animation-timing-function: linear;
animation-fill-mode: forwards;
animation-delay: 1s;
}
&.mid {
width: 46px;
top: 10px;
left: 420px;
opacity: 0;
animation-name: cloudMid;
animation-duration: 2s;
animation-timing-function: linear;
animation-fill-mode: forwards;
animation-delay: 1.2s;
}
&.right {
width: 62px;
top: 100px;
left: 500px;
opacity: 0;
animation-name: cloudRight;
animation-duration: 2s;
animation-timing-function: linear;
animation-fill-mode: forwards;
animation-delay: 1s;
}
@keyframes cloudLeft {
0% {
top: 17px;
left: 220px;
opacity: 0;
}
20% {
top: 33px;
left: 188px;
opacity: 1;
}
80% {
top: 81px;
left: 92px;
opacity: 1;
}
100% {
top: 97px;
left: 60px;
opacity: 0;
}
}
@keyframes cloudMid {
0% {
top: 10px;
left: 420px;
opacity: 0;
}
20% {
top: 40px;
left: 360px;
opacity: 1;
}
70% {
top: 130px;
left: 180px;
opacity: 1;
}
100% {
top: 160px;
left: 120px;
opacity: 0;
}
}
@keyframes cloudRight {
0% {
top: 100px;
left: 500px;
opacity: 0;
}
20% {
top: 120px;
left: 460px;
opacity: 1;
}
80% {
top: 180px;
left: 340px;
opacity: 1;
}
100% {
top: 200px;
left: 300px;
opacity: 0;
}
}
}
}
.bullshit {
position: relative;
float: left;
width: 300px;
padding: 150px 0;
overflow: hidden;
display: flex;
align-items: flex-start;
flex-direction: column;
justify-content: center;
height: 360px;
&__oops {
color: #434e59;
font-size: 72px;
font-weight: 600;
line-height: 72px;
margin-bottom: 24px;
/*animation-name: slideUp;
animation-duration: 0.5s;
animation-fill-mode: forwards;*/
}
&__headline {
color: rgba(0, 0, 0, 0.45);
font-size: 20px;
line-height: 28px;
margin-bottom: 16px;
/*animation-name: slideUp;
animation-duration: 0.5s;
animation-delay: 0.1s;
animation-fill-mode: forwards;*/
}
&__return-home {
display: inline-block;
height: 32px;
line-height: 32px;
font-weight: 400;
text-align: center;
-ms-touch-action: manipulation;
touch-action: manipulation;
background-image: none;
white-space: nowrap;
padding: 0 15px;
font-size: 14px;
border-radius: 4px;
border: 1px solid #1890ff;
color: #fff;
background-color: #1890ff;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.12);
-webkit-box-shadow: 0 2px 0 rgba(0, 0, 0, 0.035);
box-shadow: 0 2px 0 rgba(0, 0, 0, 0.035);
cursor: pointer;
/*animation-name: slideUp;
animation-duration: 0.5s;
animation-delay: 0.3s;
animation-fill-mode: forwards;*/
}
@keyframes slideUp {
0% {
transform: translateY(60px);
opacity: 0;
}
100% {
transform: translateY(0);
opacity: 1;
}
}
}
}
</style>
<template>
<div style="background:#f0f2f5;margin-top: -20px;height:100%;">
<div class="wscn-http404">
<div class="pic-404">
<img class="pic-404__parent" :src="img_500" alt="500" />
</div>
<div class="bullshit">
<!-- <div class="bullshit__oops">500</div> -->
<div class="bullshit__headline">{{ message }}</div>
<a @click="changeRoute('/myTagLib')" class="bullshit__return-home">返回首页</a>
</div>
</div>
</div>
</template>
<script>
import img_500 from '@/assets/500_images/error_500.svg';
export default {
name: 'page500',
data() {
return {
img_500
};
},
methods: {
/**
* 路由跳转
*/
changeRoute(route) {
this.$router.push(route);
}
},
computed: {
message() {
return '抱歉,服务器出错了';
}
}
};
</script>
<style lang="scss" scoped>
.wscn-http404 {
position: relative;
width: 1200px;
margin: 20px auto 60px;
padding: 0 100px;
overflow: hidden;
.pic-404 {
position: relative;
float: left;
width: 600px;
padding: 150px 152px 150px 0;
text-align: right;
overflow: hidden;
&__parent {
width: 100%;
max-width: 430px;
}
&__child {
position: absolute;
&.left {
width: 80px;
top: 17px;
left: 220px;
opacity: 0;
animation-name: cloudLeft;
animation-duration: 2s;
animation-timing-function: linear;
animation-fill-mode: forwards;
animation-delay: 1s;
}
&.mid {
width: 46px;
top: 10px;
left: 420px;
opacity: 0;
animation-name: cloudMid;
animation-duration: 2s;
animation-timing-function: linear;
animation-fill-mode: forwards;
animation-delay: 1.2s;
}
&.right {
width: 62px;
top: 100px;
left: 500px;
opacity: 0;
animation-name: cloudRight;
animation-duration: 2s;
animation-timing-function: linear;
animation-fill-mode: forwards;
animation-delay: 1s;
}
@keyframes cloudLeft {
0% {
top: 17px;
left: 220px;
opacity: 0;
}
20% {
top: 33px;
left: 188px;
opacity: 1;
}
80% {
top: 81px;
left: 92px;
opacity: 1;
}
100% {
top: 97px;
left: 60px;
opacity: 0;
}
}
@keyframes cloudMid {
0% {
top: 10px;
left: 420px;
opacity: 0;
}
20% {
top: 40px;
left: 360px;
opacity: 1;
}
70% {
top: 130px;
left: 180px;
opacity: 1;
}
100% {
top: 160px;
left: 120px;
opacity: 0;
}
}
@keyframes cloudRight {
0% {
top: 100px;
left: 500px;
opacity: 0;
}
20% {
top: 120px;
left: 460px;
opacity: 1;
}
80% {
top: 180px;
left: 340px;
opacity: 1;
}
100% {
top: 200px;
left: 300px;
opacity: 0;
}
}
}
}
.bullshit {
position: relative;
float: left;
width: 300px;
padding: 150px 0;
overflow: hidden;
display: flex;
align-items: flex-start;
flex-direction: column;
justify-content: center;
height: 360px;
&__oops {
color: #434e59;
font-size: 72px;
font-weight: 600;
line-height: 72px;
margin-bottom: 24px;
/*animation-name: slideUp;
animation-duration: 0.5s;
animation-fill-mode: forwards;*/
}
&__headline {
color: rgba(0, 0, 0, 0.45);
font-size: 20px;
line-height: 28px;
margin-bottom: 16px;
/*animation-name: slideUp;
animation-duration: 0.5s;
animation-delay: 0.1s;
animation-fill-mode: forwards;*/
}
&__return-home {
display: inline-block;
height: 32px;
line-height: 32px;
font-weight: 400;
text-align: center;
-ms-touch-action: manipulation;
touch-action: manipulation;
background-image: none;
white-space: nowrap;
padding: 0 15px;
font-size: 14px;
border-radius: 4px;
border: 1px solid #1890ff;
color: #fff;
background-color: #1890ff;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.12);
-webkit-box-shadow: 0 2px 0 rgba(0, 0, 0, 0.035);
box-shadow: 0 2px 0 rgba(0, 0, 0, 0.035);
cursor: pointer;
/*animation-name: slideUp;
animation-duration: 0.5s;
animation-delay: 0.3s;
animation-fill-mode: forwards;*/
}
@keyframes slideUp {
0% {
transform: translateY(60px);
opacity: 0;
}
100% {
transform: translateY(0);
opacity: 1;
}
}
}
}
</style>
<template>
<div style="background:#f0f2f5;margin-top: -20px;height:100%;">
<div class="wscn-http404">
<div class="pic-404">
<img class="pic-404__parent" :src="imgSrc" alt="404" />
</div>
<div class="bullshit">
<!-- <div class="bullshit__oops">404</div> -->
<div class="bullshit__headline">{{ message }}</div>
<a @click="changeRoute('/myTagLib')" class="bullshit__return-home">返回首页</a>
</div>
</div>
</div>
</template>
<script>
import img_403 from '@/assets/403_images/error_403.svg';
import img_404 from '@/assets/404_images/error_404.svg';
import img_500 from '@/assets/500_images/error_500.svg';
export default {
name: 'errpage',
data() {
return {
imgSrc: '',
message: '',
srcList: {
403: img_403,
404: img_404,
500: img_500
},
msgList: {
403: '抱歉,你无权访问该页面',
404: '抱歉,你访问的页面不存在',
500: '抱歉,服务器出错了'
}
};
},
methods: {
/**
* 路由跳转
*/
changeRoute(route) {
this.$router.push(route);
}
},
mounted() {
var that = this;
var path = that.$route.path.split('/')[1];
that.imgSrc = that.srcList[path];
that.message = that.msgList[path];
}
};
</script>
<style lang="scss" scoped>
.wscn-http404 {
position: relative;
width: 1200px;
margin: 20px auto 60px;
padding: 0 100px;
overflow: hidden;
.pic-404 {
position: relative;
float: left;
width: 600px;
padding: 150px 152px 150px 0;
text-align: right;
overflow: hidden;
&__parent {
width: 100%;
max-width: 430px;
}
&__child {
position: absolute;
&.left {
width: 80px;
top: 17px;
left: 220px;
opacity: 0;
animation-name: cloudLeft;
animation-duration: 2s;
animation-timing-function: linear;
animation-fill-mode: forwards;
animation-delay: 1s;
}
&.mid {
width: 46px;
top: 10px;
left: 420px;
opacity: 0;
animation-name: cloudMid;
animation-duration: 2s;
animation-timing-function: linear;
animation-fill-mode: forwards;
animation-delay: 1.2s;
}
&.right {
width: 62px;
top: 100px;
left: 500px;
opacity: 0;
animation-name: cloudRight;
animation-duration: 2s;
animation-timing-function: linear;
animation-fill-mode: forwards;
animation-delay: 1s;
}
@keyframes cloudLeft {
0% {
top: 17px;
left: 220px;
opacity: 0;
}
20% {
top: 33px;
left: 188px;
opacity: 1;
}
80% {
top: 81px;
left: 92px;
opacity: 1;
}
100% {
top: 97px;
left: 60px;
opacity: 0;
}
}
@keyframes cloudMid {
0% {
top: 10px;
left: 420px;
opacity: 0;
}
20% {
top: 40px;
left: 360px;
opacity: 1;
}
70% {
top: 130px;
left: 180px;
opacity: 1;
}
100% {
top: 160px;
left: 120px;
opacity: 0;
}
}
@keyframes cloudRight {
0% {
top: 100px;
left: 500px;
opacity: 0;
}
20% {
top: 120px;
left: 460px;
opacity: 1;
}
80% {
top: 180px;
left: 340px;
opacity: 1;
}
100% {
top: 200px;
left: 300px;
opacity: 0;
}
}
}
}
.bullshit {
position: relative;
float: left;
width: 300px;
padding: 150px 0;
overflow: hidden;
display: flex;
align-items: flex-start;
flex-direction: column;
justify-content: center;
height: 360px;
&__oops {
color: #434e59;
font-size: 72px;
font-weight: 600;
line-height: 72px;
margin-bottom: 24px;
/*animation-name: slideUp;
animation-duration: 0.5s;
animation-fill-mode: forwards;*/
}
&__headline {
color: rgba(0, 0, 0, 0.45);
font-size: 20px;
line-height: 28px;
margin-bottom: 16px;
/*animation-name: slideUp;
animation-duration: 0.5s;
animation-delay: 0.1s;
animation-fill-mode: forwards;*/
}
&__return-home {
display: inline-block;
height: 32px;
line-height: 32px;
font-weight: 400;
text-align: center;
-ms-touch-action: manipulation;
touch-action: manipulation;
background-image: none;
white-space: nowrap;
padding: 0 15px;
font-size: 14px;
border-radius: 4px;
border: 1px solid #1890ff;
color: #fff;
background-color: #1890ff;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.12);
-webkit-box-shadow: 0 2px 0 rgba(0, 0, 0, 0.035);
box-shadow: 0 2px 0 rgba(0, 0, 0, 0.035);
cursor: pointer;
/*animation-name: slideUp;
animation-duration: 0.5s;
animation-delay: 0.3s;
animation-fill-mode: forwards;*/
&:hover {
color: #fff;
background-color: #40a9ff;
border-color: #40a9ff;
}
&:active {
background: #096dd9;
border-color: #096dd9;
color: #fff;
}
}
@keyframes slideUp {
0% {
transform: translateY(60px);
opacity: 0;
}
100% {
transform: translateY(0);
opacity: 1;
}
}
}
}
</style>
<template>
<div class="sign-contain">
<div class="sign-content border-box">
<div>
<el-date-picker
class=""
v-model="choiceDate"
@change="changeDate"
:picker-options="pickerOptions"
:editable="false"
:value-format="'yyyy-MM-dd'"
type="daterange"
align="right"
unlink-panels
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
>
</el-date-picker>
</div>
<div class="m-t-20">
<store-tree-select @checkStoreGroupIds="checkStoreGroupIds"> </store-tree-select>
</div>
<div class="m-t-20">
<el-button type="primary" class="" @click="exportData">导 出</el-button>
</div>
</div>
</div>
</template>
<script>
import storeTreeSelect from '@/components/store-tree-select.vue';
export default {
name: 'index',
components: {
storeTreeSelect
},
data() {
return {
projectName: 'haoban-manage-web', // 当前项目名
contentHeight: '0px', // 页面内容高度
choiceDate: [],
choiceDateCopy: [],
pickerOptions: {
onPick: ({ maxDate, minDate }) => {
this.choiceDateCopy = [minDate.getTime()];
if (maxDate) {
this.choiceDateCopy = [];
}
},
disabledDate: time => {
if (this.choiceDateCopy.length) {
const one = 30 * 24 * 3600 * 1000;
const minTime = this.choiceDateCopy[0] - one;
const maxTime = this.choiceDateCopy[0] + one;
return time.getTime() < minTime || time.getTime() > maxTime || time.getTime() > Date.now() - 8.64e6;
}
return time.getTime() > Date.now() - 8.64e6;
}
},
storeGroupIds: []
};
},
methods: {
/**
* 导出数据
*/
exportData() {
let that = this;
if (!that.choiceDate.length) {
that.$message.error({
duration: 1000,
message: '请选择日期区间'
});
return false;
}
if (!that.storeGroupIds.length) {
that.$message.error({
duration: 1000,
message: '请选择门店分组'
});
return false;
}
that.postExportData();
},
postExportData() {
let that = this;
let storeIds = [];
let groupIds = [];
that.storeGroupIds.forEach(ele => {
if (!!ele.hasOwnProperty('storeId')) {
storeIds.push(ele.storeId);
} else {
groupIds.push(ele.storeGroupId);
}
});
let para = {
startDate: that.choiceDate[0],
endDate: that.choiceDate[1],
storeIds: storeIds.join(','),
groupIds: groupIds.join(',')
};
let urlSource = `startDate=${para.startDate}&endDate=${para.endDate}&storeIds=${para.storeIds}&groupIds=${para.groupIds}`;
window.open(`${window.location.origin}/haoban-app-sign-web/sign/export-sign-list?${urlSource}`);
},
/**
* 日期
*/
changeDate(e) {
let that = this;
if (!e) {
that.choiceDateCopy = [];
that.choiceDate = [];
} else {
that.choiceDateCopy = JSON.parse(JSON.stringify(that.choiceDate));
}
},
/**
* 选择门店分组
*/
checkStoreGroupIds: function(nodes) {
let that = this;
that.storeGroupIds = nodes;
}
}
};
</script>
<style lang="less" scoped>
.sign-contain {
width: 100%;
padding-left: 100px;
-webkit-box-sizing: border-box;
box-sizing: border-box;
.sign-content {
width: 100%;
padding: 20px;
.m-l-10 {
margin-left: 10px;
}
/* .item-cell-select {
&.m-l-10 {
margin-left: 0;
}
} */
}
}
</style>
@import './public.css';
.arrowico{
position: absolute;
transition: all .5s;
.icoposition(0px,25px);
}
.icoposition(@right: right,@top: top){
right: @right;
top: @top;
}
.user-form-dialog {
/deep/ .el-dialog {
min-width: 425px;
}
/*/deep/ .el-dialog__body {
padding: 0 20px;
}*/
/deep/ .el-input {
width: 260px;
}
}
.pass-form-dialog {
/deep/ .el-dialog {
min-width: 425px;
}
/*/deep/ .el-dialog__body {
padding: 0 20px;
}*/
}
This source diff could not be displayed because it is too large. You can view the blob instead.
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 to comment