@@ -1,8 +1,6 @@ | |||||
{ | { | ||||
"presets": [ | "presets": [ | ||||
["env", { | |||||
"modules": false | |||||
}], | |||||
["env", { "modules": false }], | |||||
"stage-2" | "stage-2" | ||||
], | ], | ||||
"plugins": ["transform-runtime"] | "plugins": ["transform-runtime"] | ||||
@@ -1,3 +1,4 @@ | |||||
# http://editorconfig.org | |||||
root = true | root = true | ||||
[*] | [*] | ||||
@@ -7,3 +8,7 @@ indent_size = 2 | |||||
end_of_line = lf | end_of_line = lf | ||||
insert_final_newline = true | insert_final_newline = true | ||||
trim_trailing_whitespace = true | trim_trailing_whitespace = true | ||||
[*.md] | |||||
insert_final_newline = false | |||||
trim_trailing_whitespace = false |
@@ -0,0 +1,3 @@ | |||||
build/*.js | |||||
config/*.js | |||||
src/assets |
@@ -0,0 +1,144 @@ | |||||
module.exports = { | |||||
root: true, | |||||
parser: 'babel-eslint', | |||||
parserOptions: { | |||||
sourceType: 'module' | |||||
}, | |||||
env: { | |||||
browser: true, | |||||
node: true, | |||||
es6: true, | |||||
}, | |||||
extends: 'eslint:recommended', | |||||
// required to lint *.vue files | |||||
plugins: [ | |||||
'html' | |||||
], | |||||
// check if imports actually resolve | |||||
'settings': { | |||||
'import/resolver': { | |||||
'webpack': { | |||||
'config': 'build/webpack.base.conf.js' | |||||
} | |||||
} | |||||
}, | |||||
// add your custom rules here | |||||
//it is base on https://github.com/vuejs/eslint-config-vue | |||||
'rules': { | |||||
'accessor-pairs': 2, | |||||
'arrow-spacing': [2, { 'before': true, 'after': true }], | |||||
'block-spacing': [2, 'always'], | |||||
'brace-style': [2, '1tbs', { 'allowSingleLine': true }], | |||||
'camelcase': [0, { 'properties': 'always' }], | |||||
'comma-dangle': [2, 'never'], | |||||
'comma-spacing': [2, { 'before': false, 'after': true }], | |||||
'comma-style': [2, 'last'], | |||||
'constructor-super': 2, | |||||
'curly': [2, 'multi-line'], | |||||
'dot-location': [2, 'property'], | |||||
'eol-last': 2, | |||||
'eqeqeq': [2, 'allow-null'], | |||||
'generator-star-spacing': [2, { 'before': true, 'after': true }], | |||||
'handle-callback-err': [2, '^(err|error)$' ], | |||||
'indent': [2, 2, { 'SwitchCase': 1 }], | |||||
'jsx-quotes': [2, 'prefer-single'], | |||||
'key-spacing': [2, { 'beforeColon': false, 'afterColon': true }], | |||||
'keyword-spacing': [2, { 'before': true, 'after': true }], | |||||
'new-cap': [2, { 'newIsCap': true, 'capIsNew': false }], | |||||
'new-parens': 2, | |||||
'no-array-constructor': 2, | |||||
'no-caller': 2, | |||||
'no-console': 'off', | |||||
'no-class-assign': 2, | |||||
'no-cond-assign': 2, | |||||
'no-const-assign': 2, | |||||
'no-control-regex': 2, | |||||
'no-delete-var': 2, | |||||
'no-dupe-args': 2, | |||||
'no-dupe-class-members': 2, | |||||
'no-dupe-keys': 2, | |||||
'no-duplicate-case': 2, | |||||
'no-empty-character-class': 2, | |||||
'no-empty-pattern': 2, | |||||
'no-eval': 2, | |||||
'no-ex-assign': 2, | |||||
'no-extend-native': 2, | |||||
'no-extra-bind': 2, | |||||
'no-extra-boolean-cast': 2, | |||||
'no-extra-parens': [2, 'functions'], | |||||
'no-fallthrough': 2, | |||||
'no-floating-decimal': 2, | |||||
'no-func-assign': 2, | |||||
'no-implied-eval': 2, | |||||
'no-inner-declarations': [2, 'functions'], | |||||
'no-invalid-regexp': 2, | |||||
'no-irregular-whitespace': 2, | |||||
'no-iterator': 2, | |||||
'no-label-var': 2, | |||||
'no-labels': [2, { 'allowLoop': false, 'allowSwitch': false }], | |||||
'no-lone-blocks': 2, | |||||
'no-mixed-spaces-and-tabs': 2, | |||||
'no-multi-spaces': 2, | |||||
'no-multi-str': 2, | |||||
'no-multiple-empty-lines': [2, { 'max': 1 }], | |||||
'no-native-reassign': 2, | |||||
'no-negated-in-lhs': 2, | |||||
'no-new-object': 2, | |||||
'no-new-require': 2, | |||||
'no-new-symbol': 2, | |||||
'no-new-wrappers': 2, | |||||
'no-obj-calls': 2, | |||||
'no-octal': 2, | |||||
'no-octal-escape': 2, | |||||
'no-path-concat': 2, | |||||
'no-proto': 2, | |||||
'no-redeclare': 2, | |||||
'no-regex-spaces': 2, | |||||
'no-return-assign': [2, 'except-parens'], | |||||
'no-self-assign': 2, | |||||
'no-self-compare': 2, | |||||
'no-sequences': 2, | |||||
'no-shadow-restricted-names': 2, | |||||
'no-spaced-func': 2, | |||||
'no-sparse-arrays': 2, | |||||
'no-this-before-super': 2, | |||||
'no-throw-literal': 2, | |||||
'no-trailing-spaces': 2, | |||||
'no-undef': 2, | |||||
'no-undef-init': 2, | |||||
'no-unexpected-multiline': 2, | |||||
'no-unmodified-loop-condition': 2, | |||||
'no-unneeded-ternary': [2, { 'defaultAssignment': false }], | |||||
'no-unreachable': 2, | |||||
'no-unsafe-finally': 2, | |||||
'no-unused-vars': [2, { 'vars': 'all', 'args': 'none' }], | |||||
'no-useless-call': 2, | |||||
'no-useless-computed-key': 2, | |||||
'no-useless-constructor': 2, | |||||
'no-useless-escape': 0, | |||||
'no-whitespace-before-property': 2, | |||||
'no-with': 2, | |||||
'one-var': [2, { 'initialized': 'never' }], | |||||
'operator-linebreak': [2, 'after', { 'overrides': { '?': 'before', ':': 'before' } }], | |||||
'padded-blocks': [2, 'never'], | |||||
'quotes': [2, 'single', { 'avoidEscape': true, 'allowTemplateLiterals': true }], | |||||
'semi': [2, 'never'], | |||||
'semi-spacing': [2, { 'before': false, 'after': true }], | |||||
'space-before-blocks': [2, 'always'], | |||||
'space-before-function-paren': [2, 'never'], | |||||
'space-in-parens': [2, 'never'], | |||||
'space-infix-ops': 2, | |||||
'space-unary-ops': [2, { 'words': true, 'nonwords': false }], | |||||
'spaced-comment': [2, 'always', { 'markers': ['global', 'globals', 'eslint', 'eslint-disable', '*package', '!', ','] }], | |||||
'template-curly-spacing': [2, 'never'], | |||||
'use-isnan': 2, | |||||
'valid-typeof': 2, | |||||
'wrap-iife': [2, 'any'], | |||||
'yield-star-spacing': [2, 'both'], | |||||
'yoda': [2, 'never'], | |||||
'prefer-const': 2, | |||||
'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0, | |||||
'object-curly-spacing': [2, 'always', { objectsInObjects: false }], | |||||
'array-bracket-spacing': [2, 'never'] | |||||
} | |||||
} |
@@ -1,13 +1,7 @@ | |||||
.DS_Store | .DS_Store | ||||
node_modules/ | node_modules/ | ||||
dist/ | dist/ | ||||
npm-debug.log | |||||
yarn-error.log | |||||
# Editor directories and files | |||||
.idea | |||||
.vscode | |||||
*.suo | |||||
*.ntvs* | |||||
*.njsproj | |||||
*.sln | |||||
npm-debug.log* | |||||
yarn-debug.log* | |||||
yarn-error.log* | |||||
yarn.lock |
@@ -3,7 +3,6 @@ | |||||
module.exports = { | module.exports = { | ||||
"plugins": { | "plugins": { | ||||
// to edit target browsers: use "browserslist" field in package.json | // to edit target browsers: use "browserslist" field in package.json | ||||
"postcss-import": {}, | |||||
"autoprefixer": {} | "autoprefixer": {} | ||||
} | } | ||||
} | } |
@@ -1,21 +1,15 @@ | |||||
# posweb | |||||
基于 Vue.js 和 element | |||||
> A Vue.js project | |||||
veu | |||||
文档:https://cn.vuejs.org/v2/guide/routing.html | |||||
## Build Setup | |||||
element | |||||
文档:http://element-cn.eleme.io/#/zh-CN/component/installation | |||||
``` 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 | |||||
``` | |||||
项目初始化 | |||||
npm install | |||||
For a detailed explanation on how things work, check out the [guide](http://vuejs-templates.github.io/webpack/) and [docs for vue-loader](http://vuejs.github.io/vue-loader). | |||||
运行开发环境 | |||||
npm run dev |
@@ -1,17 +1,16 @@ | |||||
'use strict' | |||||
require('./check-versions')() | require('./check-versions')() | ||||
process.env.NODE_ENV = 'production' | 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') | |||||
var ora = require('ora') | |||||
var rm = require('rimraf') | |||||
var path = require('path') | |||||
var chalk = require('chalk') | |||||
var webpack = require('webpack') | |||||
var config = require('../config') | |||||
var webpackConfig = require('./webpack.prod.conf') | |||||
const spinner = ora('building for production...') | |||||
var spinner = ora('building for production...') | |||||
spinner.start() | spinner.start() | ||||
rm(path.join(config.build.assetsRoot, config.build.assetsSubDirectory), err => { | rm(path.join(config.build.assetsRoot, config.build.assetsSubDirectory), err => { | ||||
@@ -27,11 +26,6 @@ rm(path.join(config.build.assetsRoot, config.build.assetsSubDirectory), err => { | |||||
chunkModules: false | chunkModules: false | ||||
}) + '\n\n') | }) + '\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.cyan(' Build complete.\n')) | ||||
console.log(chalk.yellow( | console.log(chalk.yellow( | ||||
' Tip: built files are meant to be served over an HTTP server.\n' + | ' Tip: built files are meant to be served over an HTTP server.\n' + | ||||
@@ -1,18 +1,17 @@ | |||||
'use strict' | |||||
const chalk = require('chalk') | |||||
const semver = require('semver') | |||||
const packageConfig = require('../package.json') | |||||
const shell = require('shelljs') | |||||
var chalk = require('chalk') | |||||
var semver = require('semver') | |||||
var packageConfig = require('../package.json') | |||||
var shell = require('shelljs') | |||||
function exec (cmd) { | function exec (cmd) { | ||||
return require('child_process').execSync(cmd).toString().trim() | return require('child_process').execSync(cmd).toString().trim() | ||||
} | } | ||||
const versionRequirements = [ | |||||
var versionRequirements = [ | |||||
{ | { | ||||
name: 'node', | name: 'node', | ||||
currentVersion: semver.clean(process.version), | currentVersion: semver.clean(process.version), | ||||
versionRequirement: packageConfig.engines.node | versionRequirement: packageConfig.engines.node | ||||
} | |||||
}, | |||||
] | ] | ||||
if (shell.which('npm')) { | if (shell.which('npm')) { | ||||
@@ -24,9 +23,9 @@ if (shell.which('npm')) { | |||||
} | } | ||||
module.exports = function () { | module.exports = function () { | ||||
const warnings = [] | |||||
for (let i = 0; i < versionRequirements.length; i++) { | |||||
const mod = versionRequirements[i] | |||||
var warnings = [] | |||||
for (var i = 0; i < versionRequirements.length; i++) { | |||||
var mod = versionRequirements[i] | |||||
if (!semver.satisfies(mod.currentVersion, mod.versionRequirement)) { | if (!semver.satisfies(mod.currentVersion, mod.versionRequirement)) { | ||||
warnings.push(mod.name + ': ' + | warnings.push(mod.name + ': ' + | ||||
chalk.red(mod.currentVersion) + ' should be ' + | chalk.red(mod.currentVersion) + ' should be ' + | ||||
@@ -39,8 +38,8 @@ module.exports = function () { | |||||
console.log('') | console.log('') | ||||
console.log(chalk.yellow('To use this template, you must update following to modules:')) | console.log(chalk.yellow('To use this template, you must update following to modules:')) | ||||
console.log() | console.log() | ||||
for (let i = 0; i < warnings.length; i++) { | |||||
const warning = warnings[i] | |||||
for (var i = 0; i < warnings.length; i++) { | |||||
var warning = warnings[i] | |||||
console.log(' ' + warning) | console.log(' ' + warning) | ||||
} | } | ||||
console.log() | console.log() | ||||
@@ -0,0 +1,9 @@ | |||||
/* eslint-disable */ | |||||
require('eventsource-polyfill') | |||||
var hotClient = require('webpack-hot-middleware/client?noInfo=true&reload=true') | |||||
hotClient.subscribe(function (event) { | |||||
if (event.action === 'reload') { | |||||
window.location.reload() | |||||
} | |||||
}) |
@@ -73,7 +73,6 @@ console.log('> Starting dev server...') | |||||
devMiddleware.waitUntilValid(() => { | devMiddleware.waitUntilValid(() => { | ||||
console.log('> Listening at ' + uri + '\n') | console.log('> Listening at ' + uri + '\n') | ||||
// when env is testing, don't need open it | // when env is testing, don't need open it | ||||
if (autoOpenBrowser && process.env.NODE_ENV !== 'testing') { | if (autoOpenBrowser && process.env.NODE_ENV !== 'testing') { | ||||
opn(uri) | opn(uri) | ||||
} | } | ||||
@@ -1,11 +1,9 @@ | |||||
'use strict' | |||||
const path = require('path') | |||||
const config = require('../config') | |||||
const ExtractTextPlugin = require('extract-text-webpack-plugin') | |||||
const pkg = require('../package.json') | |||||
var path = require('path') | |||||
var config = require('../config') | |||||
var ExtractTextPlugin = require('extract-text-webpack-plugin') | |||||
exports.assetsPath = function (_path) { | exports.assetsPath = function (_path) { | ||||
const assetsSubDirectory = process.env.NODE_ENV === 'production' | |||||
var assetsSubDirectory = process.env.NODE_ENV === 'production' | |||||
? config.build.assetsSubDirectory | ? config.build.assetsSubDirectory | ||||
: config.dev.assetsSubDirectory | : config.dev.assetsSubDirectory | ||||
return path.posix.join(assetsSubDirectory, _path) | return path.posix.join(assetsSubDirectory, _path) | ||||
@@ -14,23 +12,17 @@ exports.assetsPath = function (_path) { | |||||
exports.cssLoaders = function (options) { | exports.cssLoaders = function (options) { | ||||
options = options || {} | options = options || {} | ||||
const cssLoader = { | |||||
var cssLoader = { | |||||
loader: 'css-loader', | loader: 'css-loader', | ||||
options: { | options: { | ||||
sourceMap: options.sourceMap | |||||
} | |||||
} | |||||
var postcssLoader = { | |||||
loader: 'postcss-loader', | |||||
options: { | |||||
minimize: process.env.NODE_ENV === 'production', | |||||
sourceMap: options.sourceMap | sourceMap: options.sourceMap | ||||
} | } | ||||
} | } | ||||
// generate loader string to be used with extract text plugin | // generate loader string to be used with extract text plugin | ||||
function generateLoaders (loader, loaderOptions) { | function generateLoaders (loader, loaderOptions) { | ||||
const loaders = options.usePostCSS ? [cssLoader, postcssLoader] : [cssLoader] | |||||
var loaders = [cssLoader] | |||||
if (loader) { | if (loader) { | ||||
loaders.push({ | loaders.push({ | ||||
loader: loader + '-loader', | loader: loader + '-loader', | ||||
@@ -66,10 +58,10 @@ exports.cssLoaders = function (options) { | |||||
// Generate loaders for standalone style files (outside of .vue) | // Generate loaders for standalone style files (outside of .vue) | ||||
exports.styleLoaders = function (options) { | exports.styleLoaders = function (options) { | ||||
const output = [] | |||||
const loaders = exports.cssLoaders(options) | |||||
for (const extension in loaders) { | |||||
const loader = loaders[extension] | |||||
var output = [] | |||||
var loaders = exports.cssLoaders(options) | |||||
for (var extension in loaders) { | |||||
var loader = loaders[extension] | |||||
output.push({ | output.push({ | ||||
test: new RegExp('\\.' + extension + '$'), | test: new RegExp('\\.' + extension + '$'), | ||||
use: loader | use: loader | ||||
@@ -77,22 +69,3 @@ exports.styleLoaders = function (options) { | |||||
} | } | ||||
return output | return output | ||||
} | } | ||||
exports.createNotifierCallback = function () { | |||||
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: pkg.name, | |||||
message: severity + ': ' + error.name, | |||||
subtitle: filename || '', | |||||
icon: path.join(__dirname, 'logo.png') | |||||
}) | |||||
} | |||||
} |
@@ -1,23 +1,12 @@ | |||||
'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 | |||||
var utils = require('./utils') | |||||
var config = require('../config') | |||||
var isProduction = process.env.NODE_ENV === 'production' | |||||
module.exports = { | module.exports = { | ||||
loaders: utils.cssLoaders({ | loaders: utils.cssLoaders({ | ||||
sourceMap: sourceMapEnabled, | |||||
sourceMap: isProduction | |||||
? config.build.productionSourceMap | |||||
: config.dev.cssSourceMap, | |||||
extract: isProduction | extract: isProduction | ||||
}), | |||||
cssSourceMap: sourceMapEnabled, | |||||
cacheBusting: config.dev.cacheBusting, | |||||
transformToRequire: { | |||||
video: 'src', | |||||
source: 'src', | |||||
img: 'src', | |||||
image: 'xlink:href' | |||||
} | |||||
}) | |||||
} | } |
@@ -1,16 +1,13 @@ | |||||
'use strict' | |||||
const path = require('path') | |||||
const utils = require('./utils') | |||||
const config = require('../config') | |||||
const vueLoaderConfig = require('./vue-loader.conf') | |||||
const vuxLoader = require('vux-loader') | |||||
var path = require('path') | |||||
var utils = require('./utils') | |||||
var config = require('../config') | |||||
var vueLoaderConfig = require('./vue-loader.conf') | |||||
function resolve (dir) { | function resolve (dir) { | ||||
return path.join(__dirname, '..', dir) | return path.join(__dirname, '..', dir) | ||||
} | } | ||||
let webpackConfig = { | |||||
context: path.resolve(__dirname, '../'), | |||||
module.exports = { | |||||
entry: { | entry: { | ||||
app: './src/main.js' | app: './src/main.js' | ||||
}, | }, | ||||
@@ -25,11 +22,20 @@ let webpackConfig = { | |||||
extensions: ['.js', '.vue', '.json'], | extensions: ['.js', '.vue', '.json'], | ||||
alias: { | alias: { | ||||
'vue$': 'vue/dist/vue.esm.js', | 'vue$': 'vue/dist/vue.esm.js', | ||||
'@': resolve('src'), | |||||
'@': resolve('src') | |||||
} | } | ||||
}, | }, | ||||
module: { | module: { | ||||
rules: [ | rules: [ | ||||
// { | |||||
// test: /\.(js|vue)$/, | |||||
// loader: 'eslint-loader', | |||||
// enforce: 'pre', | |||||
// include: [resolve('src'), resolve('test')], | |||||
// options: { | |||||
// formatter: require('eslint-friendly-formatter') | |||||
// } | |||||
// }, | |||||
{ | { | ||||
test: /\.vue$/, | test: /\.vue$/, | ||||
loader: 'vue-loader', | loader: 'vue-loader', | ||||
@@ -38,22 +44,23 @@ let webpackConfig = { | |||||
{ | { | ||||
test: /\.js$/, | test: /\.js$/, | ||||
loader: 'babel-loader', | loader: 'babel-loader', | ||||
include: [resolve('src'), resolve('test')] | |||||
include: [resolve('src'), resolve('test'),resolve('/node_modules/element-ui/src'),resolve('/node_modules/element-ui/packages')] | |||||
}, | }, | ||||
{ | { | ||||
test: /\.(png|jpe?g|gif|svg)(\?.*)?$/, | |||||
loader: 'url-loader', | |||||
test: /\.svg$/, | |||||
loader: 'svg-sprite-loader', | |||||
include: [resolve('src/icons')], | |||||
options: { | options: { | ||||
limit: 10000, | |||||
name: utils.assetsPath('img/[name].[hash:7].[ext]') | |||||
symbolId: 'icon-[name]' | |||||
} | } | ||||
}, | }, | ||||
{ | { | ||||
test: /\.(mp4|webm|ogg|mp3|wav|flac|aac)(\?.*)?$/, | |||||
test: /\.(png|jpe?g|gif|svg)(\?.*)?$/, | |||||
loader: 'url-loader', | loader: 'url-loader', | ||||
exclude: [resolve('src/icons')], | |||||
options: { | options: { | ||||
limit: 10000, | limit: 10000, | ||||
name: utils.assetsPath('media/[name].[hash:7].[ext]') | |||||
name: utils.assetsPath('img/[name].[hash:7].[ext]') | |||||
} | } | ||||
}, | }, | ||||
{ | { | ||||
@@ -67,27 +74,3 @@ let webpackConfig = { | |||||
] | ] | ||||
} | } | ||||
} | } | ||||
module.exports = vuxLoader.merge(webpackConfig, { | |||||
plugins: [ | |||||
'vux-ui', | |||||
'progress-bar', | |||||
{ | |||||
name: 'duplicate-style', | |||||
options: { | |||||
cssProcessorOptions : { | |||||
safe: true, | |||||
zindex: false, | |||||
autoprefixer: { | |||||
add: true, | |||||
browsers: [ | |||||
'iOS >= 7', | |||||
'Android >= 4.1' | |||||
] | |||||
} | |||||
} | |||||
} | |||||
} | |||||
] | |||||
}) |
@@ -1,79 +1,41 @@ | |||||
'use strict' | |||||
const utils = require('./utils') | |||||
const webpack = require('webpack') | |||||
const config = require('../config') | |||||
const merge = require('webpack-merge') | |||||
const baseWebpackConfig = require('./webpack.base.conf') | |||||
const HtmlWebpackPlugin = require('html-webpack-plugin') | |||||
const FriendlyErrorsPlugin = require('friendly-errors-webpack-plugin') | |||||
const portfinder = require('portfinder') | |||||
var utils = require('./utils') | |||||
var path = require('path') | |||||
var webpack = require('webpack') | |||||
var config = require('../config') | |||||
var merge = require('webpack-merge') | |||||
var baseWebpackConfig = require('./webpack.base.conf') | |||||
var HtmlWebpackPlugin = require('html-webpack-plugin') | |||||
var FriendlyErrorsPlugin = require('friendly-errors-webpack-plugin') | |||||
const devWebpackConfig = merge(baseWebpackConfig, { | |||||
function resolveApp(relativePath) { | |||||
return path.resolve(relativePath); | |||||
} | |||||
// add hot-reload related code to entry chunks | |||||
Object.keys(baseWebpackConfig.entry).forEach(function (name) { | |||||
baseWebpackConfig.entry[name] = ['./build/dev-client'].concat(baseWebpackConfig.entry[name]) | |||||
}) | |||||
module.exports = merge(baseWebpackConfig, { | |||||
module: { | module: { | ||||
rules: utils.styleLoaders({ sourceMap: config.dev.cssSourceMap, usePostCSS: true }) | |||||
rules: utils.styleLoaders({ sourceMap: config.dev.cssSourceMap }) | |||||
}, | }, | ||||
// cheap-module-eval-source-map is faster for development | // 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: true, | |||||
hot: true, | |||||
compress: true, | |||||
host: process.env.HOST || config.dev.host, | |||||
port: process.env.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, | |||||
} | |||||
}, | |||||
devtool: '#cheap-module-eval-source-map', | |||||
plugins: [ | plugins: [ | ||||
new webpack.DefinePlugin({ | new webpack.DefinePlugin({ | ||||
'process.env': require('../config/dev.env') | |||||
'process.env': config.dev.env | |||||
}), | }), | ||||
// https://github.com/glenjamin/webpack-hot-middleware#installation--usage | |||||
new webpack.HotModuleReplacementPlugin(), | new webpack.HotModuleReplacementPlugin(), | ||||
new webpack.NamedModulesPlugin(), // HMR shows correct file names in console on update. | |||||
new webpack.NoEmitOnErrorsPlugin(), | new webpack.NoEmitOnErrorsPlugin(), | ||||
// https://github.com/ampedandwired/html-webpack-plugin | // https://github.com/ampedandwired/html-webpack-plugin | ||||
new HtmlWebpackPlugin({ | new HtmlWebpackPlugin({ | ||||
filename: 'index.html', | filename: 'index.html', | ||||
template: 'index.html', | template: 'index.html', | ||||
favicon: resolveApp('favicon.ico'), | |||||
inject: true | inject: true | ||||
}), | }), | ||||
new FriendlyErrorsPlugin() | |||||
] | ] | ||||
}) | }) | ||||
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://${config.dev.host}:${port}`], | |||||
messages: [`Your application is running here: http://${devWebpackConfig.devServer.host}:${port}`], | |||||
}, | |||||
onErrors: config.dev.notifyOnErrors | |||||
? utils.createNotifierCallback() | |||||
: undefined | |||||
})) | |||||
resolve(devWebpackConfig) | |||||
} | |||||
}) | |||||
}) |
@@ -1,26 +1,28 @@ | |||||
'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') | |||||
var path = require('path') | |||||
var utils = require('./utils') | |||||
var webpack = require('webpack') | |||||
var config = require('../config') | |||||
var merge = require('webpack-merge') | |||||
var baseWebpackConfig = require('./webpack.base.conf') | |||||
var CopyWebpackPlugin = require('copy-webpack-plugin') | |||||
var HtmlWebpackPlugin = require('html-webpack-plugin') | |||||
var ExtractTextPlugin = require('extract-text-webpack-plugin') | |||||
var OptimizeCSSPlugin = require('optimize-css-assets-webpack-plugin') | |||||
const env = require('../config/prod.env') | |||||
var env = config.build.env | |||||
const webpackConfig = merge(baseWebpackConfig, { | |||||
function resolveApp(relativePath) { | |||||
return path.resolve(relativePath); | |||||
} | |||||
var webpackConfig = merge(baseWebpackConfig, { | |||||
module: { | module: { | ||||
rules: utils.styleLoaders({ | rules: utils.styleLoaders({ | ||||
sourceMap: config.build.productionSourceMap, | sourceMap: config.build.productionSourceMap, | ||||
extract: true, | |||||
usePostCSS: true | |||||
extract: true | |||||
}) | }) | ||||
}, | }, | ||||
devtool: config.build.productionSourceMap ? config.build.devtool : false, | |||||
devtool: config.build.productionSourceMap ? '#source-map' : false, | |||||
output: { | output: { | ||||
path: config.build.assetsRoot, | path: config.build.assetsRoot, | ||||
filename: utils.assetsPath('js/[name].[chunkhash].js'), | filename: utils.assetsPath('js/[name].[chunkhash].js'), | ||||
@@ -31,21 +33,22 @@ const webpackConfig = merge(baseWebpackConfig, { | |||||
new webpack.DefinePlugin({ | new webpack.DefinePlugin({ | ||||
'process.env': env | 'process.env': env | ||||
}), | }), | ||||
// UglifyJs do not support ES6+, you can also use babel-minify for better treeshaking: https://github.com/babel/minify | |||||
new webpack.optimize.UglifyJsPlugin({ | new webpack.optimize.UglifyJsPlugin({ | ||||
compress: { | compress: { | ||||
warnings: false | warnings: false | ||||
}, | }, | ||||
sourceMap: config.build.productionSourceMap, | |||||
parallel: true | |||||
sourceMap: true | |||||
}), | }), | ||||
// extract css into its own file | // extract css into its own file | ||||
new ExtractTextPlugin({ | new ExtractTextPlugin({ | ||||
filename: utils.assetsPath('css/[name].[contenthash].css'), | |||||
// set the following option to `true` if you want to extract CSS from | |||||
// codesplit chunks into this main css file as well. | |||||
// This will result in *all* of your app's CSS being loaded upfront. | |||||
allChunks: false, | |||||
filename: utils.assetsPath('css/[name].[contenthash].css') | |||||
}), | |||||
// Compress extracted CSS. We are using this plugin so that possible | |||||
// duplicated CSS from different components can be deduped. | |||||
new OptimizeCSSPlugin({ | |||||
cssProcessorOptions: { | |||||
safe: true | |||||
} | |||||
}), | }), | ||||
// generate dist index.html with correct asset hash for caching. | // generate dist index.html with correct asset hash for caching. | ||||
// you can customize output by editing /index.html | // you can customize output by editing /index.html | ||||
@@ -54,6 +57,7 @@ const webpackConfig = merge(baseWebpackConfig, { | |||||
filename: config.build.index, | filename: config.build.index, | ||||
template: 'index.html', | template: 'index.html', | ||||
inject: true, | inject: true, | ||||
favicon: resolveApp('favicon.ico'), | |||||
minify: { | minify: { | ||||
removeComments: true, | removeComments: true, | ||||
collapseWhitespace: true, | collapseWhitespace: true, | ||||
@@ -64,14 +68,12 @@ const webpackConfig = merge(baseWebpackConfig, { | |||||
// necessary to consistently work with multiple chunks via CommonsChunkPlugin | // necessary to consistently work with multiple chunks via CommonsChunkPlugin | ||||
chunksSortMode: 'dependency' | chunksSortMode: 'dependency' | ||||
}), | }), | ||||
// keep module.id stable when vender modules does not change | |||||
// cache Module Identifiers | |||||
new webpack.HashedModuleIdsPlugin(), | new webpack.HashedModuleIdsPlugin(), | ||||
// enable scope hoisting | |||||
new webpack.optimize.ModuleConcatenationPlugin(), | |||||
// split vendor js into its own file | // split vendor js into its own file | ||||
new webpack.optimize.CommonsChunkPlugin({ | new webpack.optimize.CommonsChunkPlugin({ | ||||
name: 'vendor', | name: 'vendor', | ||||
minChunks: function (module) { | |||||
minChunks: function (module, count) { | |||||
// any required modules inside node_modules are extracted to vendor | // any required modules inside node_modules are extracted to vendor | ||||
return ( | return ( | ||||
module.resource && | module.resource && | ||||
@@ -86,18 +88,8 @@ const webpackConfig = merge(baseWebpackConfig, { | |||||
// prevent vendor hash from being updated whenever app bundle is updated | // prevent vendor hash from being updated whenever app bundle is updated | ||||
new webpack.optimize.CommonsChunkPlugin({ | new webpack.optimize.CommonsChunkPlugin({ | ||||
name: 'manifest', | name: 'manifest', | ||||
minChunks: Infinity | |||||
chunks: ['vendor'] | |||||
}), | }), | ||||
// 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 | // copy custom static assets | ||||
new CopyWebpackPlugin([ | new CopyWebpackPlugin([ | ||||
{ | { | ||||
@@ -109,9 +101,26 @@ const webpackConfig = merge(baseWebpackConfig, { | |||||
] | ] | ||||
}) | }) | ||||
if (config.build.productionGzip) { | |||||
var 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) { | if (config.build.bundleAnalyzerReport) { | ||||
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin | |||||
var BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin | |||||
webpackConfig.plugins.push(new BundleAnalyzerPlugin()) | webpackConfig.plugins.push(new BundleAnalyzerPlugin()) | ||||
} | } | ||||
@@ -1,8 +1,10 @@ | |||||
'use strict' | |||||
const merge = require('webpack-merge') | |||||
const prodEnv = require('./prod.env') | |||||
var merge = require('webpack-merge') | |||||
var prodEnv = require('./prod.env') | |||||
module.exports = merge(prodEnv, { | module.exports = merge(prodEnv, { | ||||
NODE_ENV: '"development"', | |||||
BASE_API: '"http://10.209.96.72:8080/"', | |||||
NODE_ENV: '"development"', | |||||
// BASE_API: '" https://easy-mock.com/mock/5a5ee345dec01f1bea369aee"', | |||||
// BASE_API: '"http://10.209.96.72:8080/"', | |||||
BASE_API: '"http://localhost:8080/"', | |||||
// BASE_API: '"http://ota.neusoft.com:28080/"'//阿里测试服务器 | |||||
}) | }) |
@@ -1,74 +1,38 @@ | |||||
'use strict' | |||||
// Template version: 1.2.4 | |||||
// see http://vuejs-templates.github.io/webpack for documentation. | // see http://vuejs-templates.github.io/webpack for documentation. | ||||
const path = require('path') | |||||
var path = require('path') | |||||
module.exports = { | module.exports = { | ||||
dev: { | |||||
// Paths | |||||
assetsSubDirectory: 'static', | |||||
assetsPublicPath: '/', | |||||
proxyTable: {}, | |||||
// Various Dev Server settings | |||||
host: '0.0.0.0', // can be overwritten by process.env.HOST | |||||
port: 8011, // 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: false, | |||||
// 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: '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, | |||||
// CSS Sourcemaps off by default because relative paths are "buggy" | |||||
// with this option, according to the CSS-Loader README | |||||
// (https://github.com/webpack/css-loader#sourcemaps) | |||||
// In our experience, they generally work as expected, | |||||
// just be aware of this issue when enabling this option. | |||||
cssSourceMap: false, | |||||
}, | |||||
build: { | build: { | ||||
// Template for index.html | |||||
env: require('./prod.env'), | |||||
index: path.resolve(__dirname, '../dist/index.html'), | index: path.resolve(__dirname, '../dist/index.html'), | ||||
// Paths | |||||
assetsRoot: path.resolve(__dirname, '../dist'), | assetsRoot: path.resolve(__dirname, '../dist'), | ||||
assetsSubDirectory: 'static', | assetsSubDirectory: 'static', | ||||
assetsPublicPath: '/', | |||||
/** | |||||
* Source Maps | |||||
*/ | |||||
assetsPublicPath: './', | |||||
productionSourceMap: true, | productionSourceMap: true, | ||||
// https://webpack.js.org/configuration/devtool/#production | |||||
devtool: '#source-map', | |||||
// Gzip off by default as many popular static hosts such as | |||||
// Surge or Netlify already gzip all static assets for you. | |||||
// Before setting to `true`, make sure to: | |||||
// npm install --save-dev compression-webpack-plugin | |||||
productionGzip: false, | |||||
productionGzipExtensions: ['js', 'css'], | |||||
// Run the build command with an extra argument to | // Run the build command with an extra argument to | ||||
// View the bundle analyzer report after build finishes: | // View the bundle analyzer report after build finishes: | ||||
// `npm run build --report` | // `npm run build --report` | ||||
// Set to `true` or `false` to always turn it on or off | // Set to `true` or `false` to always turn it on or off | ||||
bundleAnalyzerReport: process.env.npm_config_report | bundleAnalyzerReport: process.env.npm_config_report | ||||
}, | |||||
dev: { | |||||
env: require('./dev.env'), | |||||
port: 9528, | |||||
autoOpenBrowser: true, | |||||
assetsSubDirectory: 'static', | |||||
assetsPublicPath: '/', | |||||
proxyTable: {}, | |||||
// CSS Sourcemaps off by default because relative paths are "buggy" | |||||
// with this option, according to the CSS-Loader README | |||||
// (https://github.com/webpack/css-loader#sourcemaps) | |||||
// In our experience, they generally work as expected, | |||||
// just be aware of this issue when enabling this option. | |||||
cssSourceMap: false | |||||
} | } | ||||
} | |||||
} |
@@ -1,5 +1,6 @@ | |||||
'use strict' | |||||
module.exports = { | module.exports = { | ||||
NODE_ENV: '"production"', | |||||
BASE_API: '"http://ota.neusoft.com/"' | |||||
NODE_ENV: '"production"', | |||||
// BASE_API: '"http://47.93.28.53:8080/"', | |||||
BASE_API: '"http://ota.neusoft.com/"' | |||||
// BASE_API: '"http://ota.neusoft.com:28080/"'//阿里测试服务器 | |||||
} | } |
@@ -2,11 +2,10 @@ | |||||
<html> | <html> | ||||
<head> | <head> | ||||
<meta charset="utf-8"> | <meta charset="utf-8"> | ||||
<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0"> | |||||
<title>东软智能云POS管理系统</title> | <title>东软智能云POS管理系统</title> | ||||
</head> | </head> | ||||
<body> | <body> | ||||
<div id="app-box"></div> | |||||
<div id="app"></div> | |||||
<!-- built files will be auto injected --> | <!-- built files will be auto injected --> | ||||
</body> | </body> | ||||
</html> | </html> |
@@ -1,73 +1,83 @@ | |||||
{ | { | ||||
"name": "posweb", | |||||
"name": "vue-admin-template", | |||||
"version": "1.0.0", | "version": "1.0.0", | ||||
"description": "A Vue.js project", | |||||
"author": "", | |||||
"private": true, | |||||
"license": "MIT", | |||||
"description": "A vue admin template with Element UI & axios & iconfont & permission control & lint", | |||||
"author": "Pan <panfree23@gmail.com>", | |||||
"scripts": { | "scripts": { | ||||
"dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js", | |||||
"start": "npm run dev", | |||||
"build": "node build/build.js" | |||||
"dev": "node build/dev-server.js", | |||||
"start": "node build/dev-server.js", | |||||
"build": "node build/build.js", | |||||
"lint": "eslint --ext .js,.vue src" | |||||
}, | }, | ||||
"dependencies": { | "dependencies": { | ||||
"element-ui": "^2.3.7", | |||||
"fastclick": "^1.0.6", | |||||
"js-cookie": "^2.2.0", | |||||
"vue": "^2.5.2", | |||||
"vue-router": "^3.0.1", | |||||
"vuex": "^2.5.0", | |||||
"vuex-i18n": "^1.3.1", | |||||
"vux": "^2.2.0", | |||||
"vux-uploader": "^0.1.9" | |||||
"axios": "0.16.2", | |||||
"browser-md5-file": "^1.0.0", | |||||
"element-ui": "^2.4.9", | |||||
"file-saver": "^1.3.3", | |||||
"js-cookie": "2.1.4", | |||||
"lodash": "^4.17.10", | |||||
"normalize.css": "7.0.0", | |||||
"nprogress": "0.2.0", | |||||
"qrcode": "^1.2.0", | |||||
"sortablejs": "^1.7.0", | |||||
"vue": "2.5.10", | |||||
"vue-router": "2.7.0", | |||||
"vue2-editor": "^2.4.2", | |||||
"vuex": "2.3.1", | |||||
"xlsx": "^0.11.16" | |||||
}, | }, | ||||
"devDependencies": { | "devDependencies": { | ||||
"autoprefixer": "^7.1.2", | |||||
"babel-core": "^6.22.1", | |||||
"babel-loader": "^7.1.1", | |||||
"babel-plugin-transform-runtime": "^6.22.0", | |||||
"babel-preset-env": "^1.3.2", | |||||
"babel-preset-es2015": "^6.24.1", | |||||
"babel-preset-stage-2": "^6.22.0", | |||||
"babel-register": "^6.22.0", | |||||
"chalk": "^2.0.1", | |||||
"connect-history-api-fallback": "^1.3.0", | |||||
"copy-webpack-plugin": "^4.0.1", | |||||
"css-loader": "^0.28.0", | |||||
"eventsource-polyfill": "^0.9.6", | |||||
"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": "^2.7.1", | |||||
"less-loader": "^2.2.3", | |||||
"node-notifier": "^5.1.2", | |||||
"optimize-css-assets-webpack-plugin": "^3.2.0", | |||||
"ora": "^1.2.0", | |||||
"portfinder": "^1.0.13", | |||||
"postcss-import": "^11.0.0", | |||||
"postcss-loader": "^2.0.8", | |||||
"rimraf": "^2.6.0", | |||||
"semver": "^5.3.0", | |||||
"shelljs": "^0.7.6", | |||||
"url-loader": "^0.5.8", | |||||
"vue-loader": "^13.3.0", | |||||
"vue-style-loader": "^3.0.1", | |||||
"vue-template-compiler": "^2.5.2", | |||||
"vux-loader": "^1.0.56", | |||||
"webpack": "^3.6.0", | |||||
"webpack-bundle-analyzer": "^2.9.0", | |||||
"webpack-dev-middleware": "^1.10.0", | |||||
"webpack-dev-server": "^2.9.1", | |||||
"webpack-hot-middleware": "^2.16.1", | |||||
"webpack-merge": "^4.1.0", | |||||
"yaml-loader": "^0.4.0" | |||||
"autoprefixer": "6.7.2", | |||||
"babel-core": "6.22.1", | |||||
"babel-eslint": "7.1.1", | |||||
"babel-loader": "6.2.10", | |||||
"babel-plugin-transform-runtime": "6.22.0", | |||||
"babel-preset-env": "1.3.2", | |||||
"babel-preset-stage-2": "6.22.0", | |||||
"babel-register": "6.22.0", | |||||
"chalk": "1.1.3", | |||||
"connect-history-api-fallback": "1.3.0", | |||||
"copy-webpack-plugin": "4.0.1", | |||||
"css-loader": "0.28.0", | |||||
"eslint": "3.19.0", | |||||
"eslint-friendly-formatter": "2.0.7", | |||||
"eslint-loader": "1.7.1", | |||||
"eslint-plugin-html": "2.0.0", | |||||
"eventsource-polyfill": "0.9.6", | |||||
"express": "^4.14.1", | |||||
"extract-text-webpack-plugin": "2.0.0", | |||||
"file-loader": "0.11.1", | |||||
"friendly-errors-webpack-plugin": "1.1.3", | |||||
"html-webpack-plugin": "2.28.0", | |||||
"http-proxy-middleware": "0.17.3", | |||||
"node-sass": "^4.9.0", | |||||
"opn": "4.0.2", | |||||
"optimize-css-assets-webpack-plugin": "1.3.0", | |||||
"ora": "1.2.0", | |||||
"rimraf": "2.6.0", | |||||
"sass-loader": "6.0.5", | |||||
"script-loader": "0.7.2", | |||||
"semver": "5.3.0", | |||||
"shelljs": "0.7.6", | |||||
"svg-sprite-loader": "3.2.4", | |||||
"url-loader": "0.5.8", | |||||
"vue-loader": "13.0.4", | |||||
"vue-style-loader": "3.0.1", | |||||
"vue-template-compiler": "2.5.10", | |||||
"webpack": "2.6.1", | |||||
"webpack-bundle-analyzer": "2.2.1", | |||||
"webpack-dev-middleware": "1.10.0", | |||||
"webpack-hot-middleware": "2.18.0", | |||||
"webpack-merge": "4.1.0" | |||||
}, | }, | ||||
"engines": { | "engines": { | ||||
"node": ">= 4.0.0", | "node": ">= 4.0.0", | ||||
"npm": ">= 3.0.0" | "npm": ">= 3.0.0" | ||||
}, | }, | ||||
"browserslist": [ | "browserslist": [ | ||||
"iOS >= 7", | |||||
"Android >= 4.1" | |||||
"> 1%", | |||||
"last 2 versions", | |||||
"not ie <= 8" | |||||
] | ] | ||||
} | } |
@@ -10,18 +10,7 @@ export default { | |||||
} | } | ||||
</script> | </script> | ||||
<style lang="less"> | |||||
@import '~vux/src/styles/reset.less'; | |||||
body { | |||||
background-color: #fbf9fe; | |||||
} | |||||
.el-message{ | |||||
width: 90%; | |||||
min-width: auto; | |||||
} | |||||
.el-message-box{ | |||||
width: 90%; | |||||
width: auto; | |||||
} | |||||
<style lang="scss"> | |||||
@import '~normalize.css/normalize.css';// normalize.css 样式格式化 | |||||
@import './styles/index.scss'; // 全局自定义的css样式 | |||||
</style> | </style> |
@@ -0,0 +1,50 @@ | |||||
import fetch from '@/utils/fetch' | |||||
// 帐号列表 | |||||
export function manageList(params) { | |||||
return fetch({ | |||||
url: '/service-user/user/all', | |||||
method: 'get', | |||||
params | |||||
}) | |||||
} | |||||
// /帐号删除 | |||||
export function manageDel(id) { | |||||
return fetch({ | |||||
url: '/service-user/user/del/' + id, | |||||
method: 'delete' | |||||
}) | |||||
} | |||||
// 帐号信息 | |||||
export function manageInfo(id) { | |||||
return fetch({ | |||||
url: '/service-user/user/single?id=' + id, | |||||
method: 'get' | |||||
}) | |||||
} | |||||
// 帐号添加 | |||||
export function manageAdd(params) { | |||||
return fetch({ | |||||
url: '/service-user/user/createUser', | |||||
method: 'post', | |||||
data: params | |||||
}) | |||||
} | |||||
// 帐号修改 | |||||
export function manageEdit(params) { | |||||
return fetch({ | |||||
url: '/service-user/user/alter', | |||||
method: 'post', | |||||
data: params | |||||
}) | |||||
} | |||||
// 密码修改 | |||||
export function manageResetPass(params) { | |||||
return fetch({ | |||||
url: '/service-user/user/changePassword', | |||||
method: 'post', | |||||
data: params | |||||
}) | |||||
} |
@@ -0,0 +1,23 @@ | |||||
import fetch from '@/utils/fetch' | |||||
export function getAllPermissions(id) { | |||||
return fetch({ | |||||
url: '/service-user/permission/all/' + id, | |||||
method: 'get' | |||||
}) | |||||
} | |||||
export function checkPermissions(id) { | |||||
return fetch({ | |||||
url: '/service-user/permission/checked/' + id, | |||||
method: 'get' | |||||
}) | |||||
} | |||||
export function updatePermissions(id, checked) { | |||||
return fetch({ | |||||
url: '/service-user/permission/checked/' + id, | |||||
method: 'post', | |||||
data: checked | |||||
}) | |||||
} |
@@ -55,6 +55,13 @@ export function getImgResoures() { | |||||
method: 'get', | method: 'get', | ||||
}) | }) | ||||
} | } | ||||
//获取apk下载OSS地址接口 | |||||
export function getApkResoures() { | |||||
return fetch({ | |||||
url: '/unionService/AliOSS/apk/oss/url', | |||||
method: 'get', | |||||
}) | |||||
} | |||||
//获取省市 | //获取省市 | ||||
export function getCitys(id) { | export function getCitys(id) { | ||||
@@ -62,4 +69,4 @@ export function getCitys(id) { | |||||
url: '/service-org/Region/getCitys?parentId='+id, | url: '/service-org/Region/getCitys?parentId='+id, | ||||
method: 'get', | method: 'get', | ||||
}) | }) | ||||
} | |||||
} |
@@ -1,62 +0,0 @@ | |||||
import fetch from '@/utils/fetch' | |||||
//列表商品 | |||||
export function goodsList(params) { | |||||
return fetch({ | |||||
url: '/service-goods/catering/menus', | |||||
method: 'get', | |||||
params | |||||
}) | |||||
} | |||||
//添加商品 | |||||
export function goodsAdd(params) { | |||||
return fetch({ | |||||
url: '/service-goods/catering/menus', | |||||
method: 'post', | |||||
data: params | |||||
}) | |||||
} | |||||
//修改商品 | |||||
export function goodsEdit(params) { | |||||
return fetch({ | |||||
url: '/service-goods/catering/menus', | |||||
method: 'patch', | |||||
data: params, | |||||
// params: params | |||||
}) | |||||
} | |||||
//删除商品 | |||||
export function goodsDel(id) { | |||||
return fetch({ | |||||
url: '/service-goods/catering/menus/' + id, | |||||
method: 'delete', | |||||
}) | |||||
} | |||||
//菜品类别列表 | |||||
export function goodsCategories(id) { | |||||
return fetch({ | |||||
url: '/service-goods/catering/menus/categories?preset=1', | |||||
method: 'get', | |||||
}) | |||||
} | |||||
// /菜品标签列表 | |||||
export function goodsTags(id) { | |||||
return fetch({ | |||||
url: '/service-goods/catering/menus/tags?preset=1', | |||||
method: 'get', | |||||
}) | |||||
} | |||||
//单菜品查询 | |||||
// /菜品标签列表 | |||||
export function goodsFind(id) { | |||||
return fetch({ | |||||
url: '/service-goods/catering/menus/'+id, | |||||
method: 'get', | |||||
}) | |||||
} |
@@ -14,3 +14,10 @@ export function getInfo() { | |||||
}) | }) | ||||
} | } | ||||
export function register(registerForm) { | |||||
return fetch({ | |||||
url: '/unionService/register', | |||||
method: 'post', | |||||
data: registerForm | |||||
}) | |||||
} |
@@ -0,0 +1,28 @@ | |||||
import fetch from '@/utils/fetch' | |||||
//广告资源添加 | |||||
export function advAdd(par) { | |||||
return fetch({ | |||||
url: '/service-advertisement/mediaResource', | |||||
method: 'post', | |||||
data: par | |||||
}) | |||||
} | |||||
//广告列表 | |||||
export function advList(par) { | |||||
return fetch({ | |||||
url: '/service-advertisement/mediaResources', | |||||
method: 'post', | |||||
data: par | |||||
}) | |||||
} | |||||
//广告删除 | |||||
export function advDel(id) { | |||||
return fetch({ | |||||
url: '/service-advertisement/mediaResource/'+id, | |||||
method: 'DELETE', | |||||
}) | |||||
} | |||||
@@ -0,0 +1,37 @@ | |||||
import fetch from '@/utils/fetch' | |||||
//广告策略添加 | |||||
export function strategyAdd(par) { | |||||
return fetch({ | |||||
url: '/service-advertisement/mediaResourceStrategy', | |||||
method: 'post', | |||||
data: par | |||||
}) | |||||
} | |||||
//广告策略列表 | |||||
export function strategyList(par) { | |||||
return fetch({ | |||||
url: '/service-advertisement/mediaResourceStrategies', | |||||
method: 'post', | |||||
data: par | |||||
}) | |||||
} | |||||
//广告策略取消 | |||||
export function strategyDel(groupId) { | |||||
return fetch({ | |||||
url: '/unionService/adv/mediaResourceStrategy/cancel/'+groupId, | |||||
method: 'put', | |||||
}) | |||||
} | |||||
//广告策略详情 | |||||
export function getStrategyDtl(groupId) { | |||||
return fetch({ | |||||
url: '/unionService/adv/mediaResourceStrategy/relation/'+groupId, | |||||
method: 'get', | |||||
}) | |||||
} | |||||
@@ -0,0 +1,52 @@ | |||||
import fetch from '@/utils/fetch' | |||||
//集团添加 | |||||
export function manageAdd(par) { | |||||
return fetch({ | |||||
url: '/unionService/org/org', | |||||
method: 'post', | |||||
data: par | |||||
}) | |||||
} | |||||
//集团列表 | |||||
export function manageList(par) { | |||||
return fetch({ | |||||
url: '/service-org/org/list', | |||||
method: 'get', | |||||
params: par | |||||
}) | |||||
} | |||||
//集团列表 | |||||
export function groupList(par) { | |||||
return fetch({ | |||||
url: '/service-org/org/list', | |||||
method: 'get', | |||||
params: par | |||||
}) | |||||
} | |||||
//集团删除 | |||||
export function manageDel(id) { | |||||
return fetch({ | |||||
url: '/service-org/org/delete?orgId=' + id, | |||||
method: 'DELETE', | |||||
}) | |||||
} | |||||
//集团查询 | |||||
export function manageFind(id) { | |||||
return fetch({ | |||||
url: '/service-org/org/detail?orgId=' + id, | |||||
method: 'get', | |||||
}) | |||||
} | |||||
//集团修改 | |||||
export function manageEdit(par) { | |||||
return fetch({ | |||||
url: '/service-org/org/update', | |||||
method: 'put', | |||||
data: par | |||||
}) | |||||
} | |||||
@@ -0,0 +1,27 @@ | |||||
import fetch from '@/utils/fetch' | |||||
// 级别列表查询 | |||||
export function gradeList(params) { | |||||
return fetch({ | |||||
url: '/service-member/member-level', | |||||
method: 'get', | |||||
params | |||||
}) | |||||
} | |||||
// 级别添加修改 | |||||
export function gradeAdd(params) { | |||||
return fetch({ | |||||
url: '/service-member/member-level', | |||||
method: 'post', | |||||
data:params | |||||
}) | |||||
} | |||||
// 级别添加修改 | |||||
export function gradeDel(params) { | |||||
return fetch({ | |||||
url: '/service-member/member-level', | |||||
method: 'delete', | |||||
data:params | |||||
}) | |||||
} |
@@ -0,0 +1,40 @@ | |||||
import fetch from '@/utils/fetch' | |||||
// 列表查询 | |||||
export function memberList(params) { | |||||
return fetch({ | |||||
url: '/service-member/members', | |||||
method: 'get', | |||||
params | |||||
}) | |||||
} | |||||
// 核销积分 | |||||
export function writeOffPoint(params) { | |||||
return fetch({ | |||||
url: '/service-member/memberCapitalChange/point/writeOff', | |||||
method: 'post', | |||||
data:params | |||||
}) | |||||
} | |||||
// 历史查询 | |||||
export function memberHistory(params) { | |||||
return fetch({ | |||||
url: '/service-member/memberCapitalChanges', | |||||
method: 'post', | |||||
data:params | |||||
}) | |||||
} | |||||
// 用户查询查询 | |||||
export function memberFind(id) { | |||||
return fetch({ | |||||
url: '/service-member/members/'+id, | |||||
method: 'get', | |||||
}) | |||||
} | |||||
// 会员更新查询 | |||||
export function memberUpdate(params) { | |||||
return fetch({ | |||||
url: '/service-member/members', | |||||
method: 'patch', | |||||
data:params | |||||
}) | |||||
} |
@@ -0,0 +1,34 @@ | |||||
import fetch from '@/utils/fetch' | |||||
//集团列表 | |||||
export function getList() { | |||||
return fetch({ | |||||
url: '/table/list', | |||||
method: 'get', | |||||
}) | |||||
} | |||||
//集团信息 | |||||
export function info(params) { | |||||
return fetch({ | |||||
url: '/table/list', | |||||
method: 'get', | |||||
params | |||||
}) | |||||
} | |||||
//集团添加 | |||||
export function add(params) { | |||||
return fetch({ | |||||
url: '/table/list', | |||||
method: 'get', | |||||
params | |||||
}) | |||||
} | |||||
//集团修改 | |||||
export function update(params) { | |||||
return fetch({ | |||||
url: '/table/list', | |||||
method: 'get', | |||||
params | |||||
}) | |||||
} |
@@ -0,0 +1,72 @@ | |||||
import fetch from '@/utils/fetch' | |||||
//获取支付字典 | |||||
export function payTypeList() { | |||||
return fetch({ | |||||
url: '/service-trade/payTypeDict/payTypes', | |||||
method: 'get', | |||||
}) | |||||
} | |||||
//支付列表 | |||||
export function payList(params) { | |||||
return fetch({ | |||||
url: '/service-trade/payChannel/payChannels', | |||||
method: 'get', | |||||
params | |||||
}) | |||||
} | |||||
//支付信息 | |||||
export function payFind(params) { | |||||
return fetch({ | |||||
url: '/service-trade/payChannel/payChannel', | |||||
method: 'get', | |||||
params | |||||
}) | |||||
} | |||||
//支付添加 | |||||
export function payAdd(params) { | |||||
return fetch({ | |||||
url: '/service-trade/payChannel/payChannel', | |||||
method: 'post', | |||||
data: params | |||||
}) | |||||
} | |||||
//支付修改 | |||||
export function payUpdate(params) { | |||||
return fetch({ | |||||
url: '/service-trade/payChannel/payChannel', | |||||
method: 'put', | |||||
data: params | |||||
}) | |||||
} | |||||
//支付删除 | |||||
export function payDel(params) { | |||||
return fetch({ | |||||
url: '/service-trade/payChannel/payChannel', | |||||
method: 'delete', | |||||
params | |||||
}) | |||||
} | |||||
//支付停用 | |||||
export function payStop(params) { | |||||
return fetch({ | |||||
url: '/service-trade/payChannel/payChannelDisable', | |||||
method: 'put', | |||||
data:params | |||||
}) | |||||
} | |||||
//支付启用 | |||||
export function payOn(params) { | |||||
return fetch({ | |||||
url: '/service-trade/payChannel/payChannelEnable', | |||||
method: 'put', | |||||
data:params | |||||
}) | |||||
} |
@@ -0,0 +1,43 @@ | |||||
import fetch from '@/utils/fetch' | |||||
// 支付营销添加 | |||||
export function addPaymentPromotion(params) { | |||||
return fetch({ | |||||
url: '/service-promotion/payment/promotion', | |||||
method: 'post', | |||||
data: params | |||||
}) | |||||
} | |||||
// 支付营销添加 | |||||
export function updatePaymentPromotion(params) { | |||||
return fetch({ | |||||
url: '/service-promotion/payment/promotion', | |||||
method: 'put', | |||||
data: params | |||||
}) | |||||
} | |||||
// 支付营销添加 | |||||
export function queryPaymentPromotions(params) { | |||||
return fetch({ | |||||
url: '/service-promotion/payment/promotions', | |||||
method: 'post', | |||||
data: params | |||||
}) | |||||
} | |||||
// 支付营销删除 | |||||
export function deletePaymentPromotion(id) { | |||||
return fetch({ | |||||
url: '/service-promotion/payment/promotion/' + id, | |||||
method: 'delete' | |||||
}) | |||||
} | |||||
export function getPaymentPromotion(id) { | |||||
return fetch({ | |||||
url: '/service-promotion/payment/promotion/' + id, | |||||
method: 'get' | |||||
}) | |||||
} |
@@ -19,7 +19,7 @@ export function storeAdd(params) { | |||||
// 门店查询 | // 门店查询 | ||||
export function storeFind(id) { | export function storeFind(id) { | ||||
return fetch({ | return fetch({ | ||||
url: '/service-org/shop/detail?shopId=' + id, | |||||
url: '/unionService/shop/detail?shopId=' + id, | |||||
method: 'get' | method: 'get' | ||||
}) | }) | ||||
} | } |
@@ -0,0 +1,33 @@ | |||||
import fetch from '@/utils/fetch' | |||||
// 餐桌列表 | |||||
export function tableList(shopid) { | |||||
return fetch({ | |||||
url: '/service-org/tables/shop/' + shopid, | |||||
// url: 'https://easy-mock.com/mock/5a5ee345dec01f1bea369aee/service-org/tables/shop/', | |||||
method: 'get', | |||||
}) | |||||
} | |||||
// 餐桌添加修改 | |||||
export function tableSub(params) { | |||||
var method = 'post' | |||||
if (params.id) { | |||||
method = 'put' | |||||
} | |||||
return fetch({ | |||||
url: '/service-org/tables', | |||||
method: method, | |||||
params | |||||
}) | |||||
} | |||||
// 餐桌删除 | |||||
export function tableDel(id) { | |||||
return fetch({ | |||||
url: '/service-org/tables/' + id, | |||||
method: 'delete', | |||||
}) | |||||
} | |||||
@@ -0,0 +1,40 @@ | |||||
import fetch from '@/utils/fetch' | |||||
// 餐桌列表 | |||||
export function tableGroupList(shopid) { | |||||
return fetch({ | |||||
url: '/service-org/tableGroups/shop/' + shopid, | |||||
// url: 'https://easy-mock.com/mock/5a5ee345dec01f1bea369aee/service-org/tables/shop/', | |||||
method: 'get', | |||||
}) | |||||
} | |||||
// 餐桌添加修改 | |||||
export function tableSub(params) { | |||||
var method = 'post' | |||||
if (params.id) { | |||||
method = 'put' | |||||
return fetch({ | |||||
url: '/service-org/tableGroups', | |||||
method: method, | |||||
params | |||||
}) | |||||
}else{ | |||||
return fetch({ | |||||
url: '/service-org/tableGroups', | |||||
method: method, | |||||
data:params | |||||
}) | |||||
} | |||||
} | |||||
// 餐桌删除 | |||||
export function tableDel(id) { | |||||
return fetch({ | |||||
url: '/service-org/tableGroups/' + id, | |||||
method: 'delete', | |||||
}) | |||||
} | |||||
@@ -1,46 +0,0 @@ | |||||
import fetch from '@/utils/fetch' | |||||
//订单首页列表 | |||||
export function orderIndex(par) { | |||||
return fetch({ | |||||
url: '/unionService/orderStatistics/shopOrderSummary', | |||||
method: 'get', | |||||
params:par | |||||
}) | |||||
} | |||||
//订单交易流水列表 | |||||
export function orderflow(par) { | |||||
return fetch({ | |||||
url: '/unionService/orderStatistics/shopOrderDetails', | |||||
method: 'get', | |||||
params:par | |||||
}) | |||||
} | |||||
//订单交易流水列表 | |||||
export function orderStatistics(par) { | |||||
return fetch({ | |||||
url: '/service-trade/tradeStatistics/payChannelSummary', | |||||
method: 'get', | |||||
params:par | |||||
}) | |||||
} | |||||
//日报统计 | |||||
//订单交易流水列表 | |||||
export function orderDatestatistics(par) { | |||||
return fetch({ | |||||
url: '/unionService/tradeStatistics/daily', | |||||
method: 'get', | |||||
params:par | |||||
}) | |||||
} | |||||
//占比统计 | |||||
export function orderRationstatistics(par) { | |||||
return fetch({ | |||||
url: '/service-trade/tradeStatistics/payChannelProportion', | |||||
method: 'get', | |||||
params:par | |||||
}) | |||||
} |
@@ -0,0 +1,70 @@ | |||||
import fetch from '@/utils/fetch' | |||||
// 列表 | |||||
export function appList(params) { | |||||
return fetch({ | |||||
url: '/service-ota/apps', | |||||
method: 'post', | |||||
data: params | |||||
}) | |||||
} | |||||
// apk列表 | |||||
export function apkList(appId) { | |||||
return fetch({ | |||||
url: '/service-ota/apkVersions/' + appId, | |||||
method: 'get' | |||||
}) | |||||
} | |||||
// 添加 | |||||
export function appAdd(params) { | |||||
return fetch({ | |||||
url: '/service-ota/app', | |||||
method: 'post', | |||||
data: params | |||||
}) | |||||
} | |||||
// apkAdd添加 | |||||
export function apkAdd(params) { | |||||
return fetch({ | |||||
url: '/service-ota/apkVersion', | |||||
method: 'post', | |||||
data: params | |||||
}) | |||||
} | |||||
// 更新状态 | |||||
export function appDel(params) { | |||||
return fetch({ | |||||
url: '/service-ota/app/status', | |||||
method: 'put', | |||||
data: params | |||||
}) | |||||
} | |||||
// 添加策略 | |||||
export function appStrategy(params) { | |||||
return fetch({ | |||||
url: '/service-ota/apkVersionStrategy', | |||||
method: 'post', | |||||
data: params | |||||
}) | |||||
} | |||||
// 策略列表 | |||||
export function listStrategy(params) { | |||||
return fetch({ | |||||
url: '/service-ota/apkVersionStrategies', | |||||
method: 'post', | |||||
data: params | |||||
}) | |||||
} | |||||
// 详情 | |||||
export function showStrategy(id) { | |||||
return fetch({ | |||||
url: '/unionService/OTA/apkVersionStrategy/detail/' + id, | |||||
method: 'get' | |||||
}) | |||||
} |
@@ -0,0 +1,28 @@ | |||||
import fetch from '@/utils/fetch' | |||||
//列表 | |||||
export function configureList(params) { | |||||
return fetch({ | |||||
url: '/service-device/configStrategyGroups', | |||||
method: 'post', | |||||
data: params | |||||
}) | |||||
} | |||||
//添加 | |||||
export function configureAdd(params) { | |||||
return fetch({ | |||||
url: '/service-device/configStrategyGroup', | |||||
method: 'post', | |||||
data: params | |||||
}) | |||||
} | |||||
//查看详情 | |||||
export function configureShow(id) { | |||||
return fetch({ | |||||
url: '/service-device/configStrategy/'+id, | |||||
method: 'get', | |||||
// params: params | |||||
}) | |||||
} |
@@ -0,0 +1,19 @@ | |||||
import fetch from '@/utils/fetch' | |||||
//历史列表 | |||||
export function historyList(params) { | |||||
return fetch({ | |||||
url: '/unionService/OTA/upgradeHistories', | |||||
method: 'post', | |||||
data: params | |||||
}) | |||||
} | |||||
//设备状态列表 | |||||
export function deviceStatusList(params) { | |||||
return fetch({ | |||||
url: '/unionService/device/status', | |||||
method: 'post', | |||||
data: params | |||||
}) | |||||
} |
@@ -0,0 +1,49 @@ | |||||
import fetch from '@/utils/fetch' | |||||
//设备列表 | |||||
export function getList(params) { | |||||
return fetch({ | |||||
url: '/service-device/devices', | |||||
method: 'post', | |||||
data:params | |||||
}) | |||||
} | |||||
//设备添加 | |||||
export function macadd(params) { | |||||
return fetch({ | |||||
url: '/unionService/device', | |||||
method: 'post', | |||||
data:params | |||||
}) | |||||
} | |||||
//设备修改 | |||||
export function macedit(params) { | |||||
return fetch({ | |||||
url: '/unionService/device', | |||||
method: 'put', | |||||
data:params | |||||
}) | |||||
} | |||||
//设备导入提交 | |||||
export function macimport(params) { | |||||
return fetch({ | |||||
url: '/unionService/device/batch', | |||||
method: 'post', | |||||
data:params | |||||
}) | |||||
} | |||||
//修改设备状态 | |||||
export function macupdatestatus(params) { | |||||
return fetch({ | |||||
url: '/unionService/device/status', | |||||
method: 'put', | |||||
data:params | |||||
}) | |||||
}//导出 | |||||
export function macExport(params) { | |||||
return fetch({ | |||||
url: '/service-device/device/export', | |||||
method: 'post', | |||||
data:params | |||||
}) | |||||
} | |||||
@@ -0,0 +1,60 @@ | |||||
import fetch from '@/utils/fetch' | |||||
// 获取打印模板 | |||||
export function getTemplates() { | |||||
return fetch({ | |||||
url: '/service-org/printerDictionary/printerTemplates', | |||||
method: 'get' | |||||
}) | |||||
} | |||||
// 获取打印模板 | |||||
export function getPrintRules() { | |||||
return fetch({ | |||||
url: '/service-org/printerDictionary/printerRules', | |||||
method: 'get' | |||||
}) | |||||
} | |||||
// 添加打印机 | |||||
export function addPrinter(params) { | |||||
return fetch({ | |||||
url: '/service-org/printer/print', | |||||
method: 'post', | |||||
data: params | |||||
}) | |||||
} | |||||
// 修改打印机 | |||||
export function updatePrinter(params) { | |||||
return fetch({ | |||||
url: '/service-org/printer/print', | |||||
method: 'put', | |||||
data: params | |||||
}) | |||||
} | |||||
// 添加打印机 | |||||
export function queryPrinters(params) { | |||||
return fetch({ | |||||
url: '/service-org/printer/printers', | |||||
method: 'post', | |||||
data: params | |||||
}) | |||||
} | |||||
// 更新状态 | |||||
export function updateStatus(printerId, status) { | |||||
return fetch({ | |||||
url: '/service-org/printer/print/status/' + printerId + '/' + status, | |||||
method: 'put' | |||||
}) | |||||
} | |||||
// 获取打印模板 | |||||
export function getPrinter(id) { | |||||
return fetch({ | |||||
url: '/service-org/printer/printer?printerId=' + id, | |||||
method: 'get' | |||||
}) | |||||
} |
@@ -0,0 +1,36 @@ | |||||
import fetch from '@/utils/fetch' | |||||
//列表 | |||||
export function upgradeList(params) { | |||||
return fetch({ | |||||
url: '/service-ota/upgradeStrategies', | |||||
method: 'post', | |||||
data: params | |||||
}) | |||||
} | |||||
//添加 | |||||
export function upgradeAdd(params) { | |||||
return fetch({ | |||||
url: '/service-ota/upgradeStrategy', | |||||
method: 'post', | |||||
data: params | |||||
}) | |||||
} | |||||
//修改状态 | |||||
export function upgradeUpdatestatus(id) { | |||||
return fetch({ | |||||
url: '/service-ota/upgradeStrategy/cancel/'+id, | |||||
method: 'put', | |||||
// params: params | |||||
}) | |||||
} | |||||
//查看策略详情 | |||||
export function upgradeShow(id) { | |||||
return fetch({ | |||||
url: '/unionService/OTA/upgradeStrategy/relation/' + id, | |||||
method: 'get', | |||||
}) | |||||
} |
@@ -0,0 +1,35 @@ | |||||
import fetch from '@/utils/fetch' | |||||
//列表 | |||||
export function versionList(params) { | |||||
return fetch({ | |||||
url: '/service-ota/upgradePackages', | |||||
method: 'post', | |||||
data: params | |||||
}) | |||||
} | |||||
//添加 | |||||
export function versionAdd(params) { | |||||
return fetch({ | |||||
url: '/service-ota/upgradePackage', | |||||
method: 'post', | |||||
data: params | |||||
}) | |||||
} | |||||
//修改状态 | |||||
export function versionUpdatestatus(params) { | |||||
return fetch({ | |||||
url: '/service-ota/upgradePackage', | |||||
method: 'delete', | |||||
data: params, | |||||
// params: params | |||||
}) | |||||
}//删除版本 | |||||
export function versionDel(id) { | |||||
return fetch({ | |||||
url: '/service-ota/upgradePackage/'+id, | |||||
method: 'delete', | |||||
}) | |||||
} |
@@ -0,0 +1,18 @@ | |||||
import fetch from '@/utils/fetch' | |||||
// | |||||
export function refreshHeadersRedis(resp) { | |||||
return fetch({ | |||||
url: '/unionService/redis/loadUserData2Redis', | |||||
method: 'get' | |||||
}).then(() => { | |||||
return resp | |||||
}) | |||||
} | |||||
export function refreshHeadersRedisByShop(params) { | |||||
return fetch({ | |||||
url: '/unionService/redis/loadUserData2RedisByShop', | |||||
method: 'get', | |||||
params | |||||
}) | |||||
} |
@@ -0,0 +1,56 @@ | |||||
import fetch from '@/utils/fetch' | |||||
// 列表类型 | |||||
export function typeList(params) { | |||||
return fetch({ | |||||
url: '/service-inventory/goods/category/', | |||||
method: 'get', | |||||
params | |||||
}) | |||||
} | |||||
// 添加类别 | |||||
export function typeAdd(params) { | |||||
return fetch({ | |||||
url: '/service-inventory/goods/category', | |||||
method: 'post', | |||||
data: params | |||||
}) | |||||
} | |||||
// 修改类型 | |||||
export function typeEdit(id, params) { | |||||
return fetch({ | |||||
url: '/service-inventory/goods/category/' + id, | |||||
method: 'put', | |||||
data: params | |||||
// params: params | |||||
}) | |||||
} | |||||
// 修改类型 | |||||
export function typeOrderUpdate(params) { | |||||
return fetch({ | |||||
url: '/service-inventory/goods/category/re-order/', | |||||
method: 'post', | |||||
data: params | |||||
// params: params | |||||
}) | |||||
} | |||||
// 删除商品 | |||||
export function typeDel(id) { | |||||
return fetch({ | |||||
url: '/service-inventory/goods/category/catering/' + id, | |||||
method: 'delete' | |||||
}) | |||||
} | |||||
// 树形列表类型 | |||||
export function categoryTree(params) { | |||||
return fetch({ | |||||
url: '/service-inventory/goods/category/tree', | |||||
method: 'get', | |||||
params | |||||
}) | |||||
} |
@@ -0,0 +1,90 @@ | |||||
import fetch from '@/utils/fetch' | |||||
//列表商品 | |||||
export function goodsList(params) { | |||||
return fetch({ | |||||
url: '/service-inventory/goods/catering/menus', | |||||
method: 'get', | |||||
params | |||||
}) | |||||
} | |||||
//添加商品 | |||||
export function goodsAdd(params) { | |||||
return fetch({ | |||||
url: '/service-inventory/goods/catering/menus', | |||||
method: 'post', | |||||
data: params | |||||
}) | |||||
} | |||||
//修改商品 | |||||
export function goodsEdit(params) { | |||||
return fetch({ | |||||
url: '/service-inventory/goods/catering/menus', | |||||
method: 'patch', | |||||
data: params, | |||||
// params: params | |||||
}) | |||||
} | |||||
//删除商品 | |||||
export function goodsDel(id) { | |||||
return fetch({ | |||||
url: '/service-inventory/goods/catering/menus/' + id, | |||||
method: 'delete', | |||||
}) | |||||
} | |||||
//菜品类别列表 | |||||
export function goodsCategories(id) { | |||||
return fetch({ | |||||
url: '/service-inventory/goods/catering/menus/categories?preset=1', | |||||
method: 'get', | |||||
}) | |||||
} | |||||
// /菜品标签列表 | |||||
export function goodsTags(id) { | |||||
return fetch({ | |||||
url: '/service-inventory/goods/catering/menus/tags?preset=1', | |||||
method: 'get', | |||||
}) | |||||
} | |||||
//单菜品查询 | |||||
// /菜品标签列表 | |||||
export function goodsFind(id) { | |||||
return fetch({ | |||||
url: '/service-inventory/goods/catering/menus/'+id, | |||||
method: 'get', | |||||
}) | |||||
} | |||||
//设备绑定菜品修改 | |||||
export function otagoodsUpdate(sn,params) { | |||||
return fetch({ | |||||
url: '/service-inventory/goods/catering/menus/pos/'+sn, | |||||
method: 'post', | |||||
data: params | |||||
}) | |||||
} | |||||
//菜单审核列表 | |||||
export function examinegoods(params) { | |||||
return fetch({ | |||||
url: '/service-inventory/goods/catering/menus/approvals', | |||||
method: 'post', | |||||
data: params | |||||
}) | |||||
} | |||||
//菜单审核 | |||||
export function approval(params) { | |||||
return fetch({ | |||||
url: '/service-inventory/goods/catering/menus/approval', | |||||
method: 'put', | |||||
data: params | |||||
}) | |||||
} | |||||
@@ -0,0 +1,107 @@ | |||||
import fetch from '@/utils/fetch' | |||||
//盘点列表 | |||||
export function pdList(params) { | |||||
return fetch({ | |||||
url: '/service-inventory/inventory/check-stock/list', | |||||
method: 'get', | |||||
params | |||||
}) | |||||
} | |||||
//盘点列表详情 | |||||
export function pdShowList(params) { | |||||
return fetch({ | |||||
url: '/service-inventory/inventory/check-stock/detail', | |||||
method: 'get', | |||||
params | |||||
}) | |||||
} | |||||
//盘点统计 | |||||
export function pdTotalList(params) { | |||||
return fetch({ | |||||
url: '/service-inventory/inventory/check-stock/summary', | |||||
method: 'get', | |||||
params | |||||
}) | |||||
} | |||||
//列表库存流水 | |||||
export function historyList(params) { | |||||
return fetch({ | |||||
url: '/service-inventory/inventory/history', | |||||
method: 'get', | |||||
params | |||||
}) | |||||
} | |||||
//列表库存 | |||||
export function inventoryList(params) { | |||||
return fetch({ | |||||
url: '/service-inventory/inventory/list', | |||||
method: 'get', | |||||
params | |||||
}) | |||||
} | |||||
//入库 | |||||
export function ingoods(params) { | |||||
return fetch({ | |||||
url: '/service-inventory/inventory/stockIn', | |||||
method: 'post', | |||||
data:params | |||||
}) | |||||
} | |||||
//盘盈 | |||||
export function wingoods(params) { | |||||
return fetch({ | |||||
url: '/service-inventory/inventory/checkAdd', | |||||
method: 'post', | |||||
data:params | |||||
}) | |||||
} | |||||
//退货 | |||||
export function returngoods(params) { | |||||
return fetch({ | |||||
url: '/service-inventory/inventory/userReturn', | |||||
method: 'post', | |||||
data:params | |||||
}) | |||||
} | |||||
//领用 | |||||
export function outgoods(params) { | |||||
return fetch({ | |||||
url: '/service-inventory/inventory/goodsTake', | |||||
method: 'put', | |||||
data:params | |||||
}) | |||||
} | |||||
//盘损 | |||||
export function losegoods(params) { | |||||
return fetch({ | |||||
url: '/service-inventory/inventory/checkDec', | |||||
method: 'put', | |||||
data:params | |||||
}) | |||||
} | |||||
//.向供应商退货接口 | |||||
export function supReturngoods(params) { | |||||
return fetch({ | |||||
url: '/service-inventory/inventory/supReturn', | |||||
method: 'put', | |||||
data:params | |||||
}) | |||||
} | |||||
//统计 | |||||
export function totalamount(params) { | |||||
return fetch({ | |||||
url: '/service-inventory/inventory/total-amount', | |||||
method: 'get', | |||||
params | |||||
}) | |||||
} | |||||
@@ -0,0 +1,70 @@ | |||||
import fetch from '@/utils/fetch' | |||||
//列表商品 | |||||
export function retailList(params) { | |||||
return fetch({ | |||||
url: '/service-inventory/goods/retail/goods', | |||||
method: 'get', | |||||
params | |||||
}) | |||||
} | |||||
//添加商品 | |||||
export function retailAdd(params) { | |||||
return fetch({ | |||||
url: '/service-inventory/goods/retail/goods', | |||||
method: 'post', | |||||
data: params | |||||
}) | |||||
} | |||||
//修改商品 | |||||
export function retailEdit(params) { | |||||
return fetch({ | |||||
url: '/service-inventory/goods/retail/goods', | |||||
method: 'patch', | |||||
data: params, | |||||
// params: params | |||||
}) | |||||
} | |||||
//删除商品 | |||||
export function retailDel(id) { | |||||
return fetch({ | |||||
url: '/service-inventory/goods/retail/goods/' + id, | |||||
method: 'delete', | |||||
}) | |||||
} | |||||
//菜品类别列表 | |||||
export function retailCategories(id) { | |||||
return fetch({ | |||||
url: '/service-inventory/goods/catering/menus/categories?preset=1', | |||||
method: 'get', | |||||
}) | |||||
} | |||||
// /菜品标签列表 | |||||
export function retailTags(id) { | |||||
return fetch({ | |||||
url: '/service-inventory/goods/catering/menus/tags?preset=1', | |||||
method: 'get', | |||||
}) | |||||
} | |||||
//单菜品查询 | |||||
// /菜品标签列表 | |||||
export function retailFind(id) { | |||||
return fetch({ | |||||
url: '/service-inventory/goods/retail/goods/'+id, | |||||
method: 'get', | |||||
}) | |||||
} | |||||
// /导入 | |||||
export function retailImport(params) { | |||||
return fetch({ | |||||
url: '/service-inventory/goods/retail/goods/batch', | |||||
method: 'post', | |||||
data:params | |||||
}) | |||||
} |
@@ -0,0 +1,32 @@ | |||||
import fetch from '@/utils/fetch' | |||||
//供应商列表 | |||||
export function supplierList(params) { | |||||
return fetch({ | |||||
url: '/service-inventory/inventory/supplier/list', | |||||
method: 'get', | |||||
params | |||||
}) | |||||
} | |||||
//添加修改供应商 | |||||
export function supplierAdd(params) { | |||||
var method ='post' | |||||
if (params.id) { | |||||
method = 'put' | |||||
} | |||||
return fetch({ | |||||
url: '/service-inventory/inventory/supplier/', | |||||
method: method, | |||||
data: params | |||||
}) | |||||
} | |||||
//删除供应商 | |||||
export function supplierDel(id) { | |||||
return fetch({ | |||||
url: '/service-inventory/inventory/supplier/' + id, | |||||
method: 'delete', | |||||
}) | |||||
} |
@@ -1,36 +1,36 @@ | |||||
import fetch from '@/utils/fetch' | import fetch from '@/utils/fetch' | ||||
//列表类型 | //列表类型 | ||||
export function typeList(params) { | |||||
export function tasetList(params) { | |||||
return fetch({ | return fetch({ | ||||
url: '/service-goods/category/', | |||||
url: '/service-inventory/goods/tag/', | |||||
method: 'get', | method: 'get', | ||||
params | params | ||||
}) | }) | ||||
} | } | ||||
//添加类别 | //添加类别 | ||||
export function typeAdd(params) { | |||||
export function tasteAdd(params) { | |||||
return fetch({ | return fetch({ | ||||
url: '/service-goods/category', | |||||
url: '/service-inventory/goods/tag', | |||||
method: 'post', | method: 'post', | ||||
data: params | data: params | ||||
}) | }) | ||||
} | } | ||||
//修改类型 | //修改类型 | ||||
export function typeEdit(id,params) { | |||||
export function tasetEdit(id,params) { | |||||
return fetch({ | return fetch({ | ||||
url: '/service-goods/category/' + id, | |||||
url: '/service-inventory/goods/tag/' + id, | |||||
method: 'put', | method: 'put', | ||||
data: params, | data: params, | ||||
// params: params | // params: params | ||||
}) | }) | ||||
} | } | ||||
//修改类型 | //修改类型 | ||||
export function typeOrderUpdate(params) { | |||||
export function tasetOrderUpdate(params) { | |||||
return fetch({ | return fetch({ | ||||
url: '/service-goods/category/re-order/', | |||||
url: '/service-inventory/goods/tag/re-order/', | |||||
method: 'post', | method: 'post', | ||||
data: params, | data: params, | ||||
// params: params | // params: params | ||||
@@ -38,9 +38,9 @@ export function typeOrderUpdate(params) { | |||||
} | } | ||||
//删除商品 | //删除商品 | ||||
export function typeDel(id) { | |||||
export function tasetDel(id) { | |||||
return fetch({ | return fetch({ | ||||
url: '/service-goods/category/catering/' + id, | |||||
url: '/service-inventory/goods/tag/' + id, | |||||
method: 'delete', | method: 'delete', | ||||
}) | }) | ||||
} | } |
@@ -0,0 +1,9 @@ | |||||
import fetch from '@/utils/fetch' | |||||
export function getList(params) { | |||||
return fetch({ | |||||
url: 'https://easy-mock.com/mock/5a5ee345dec01f1bea369aee/table/list', | |||||
method: 'get', | |||||
params | |||||
}) | |||||
} |
@@ -0,0 +1,56 @@ | |||||
import fetch from '@/utils/fetch' | |||||
// 订单首页列表 | |||||
export function orderIndex(par) { | |||||
return fetch({ | |||||
url: '/unionService/orderStatistics/shopOrderSummary', | |||||
method: 'get', | |||||
params: par | |||||
}) | |||||
} | |||||
// 订单交易流水列表 | |||||
export function orderflow(par) { | |||||
return fetch({ | |||||
url: '/unionService/orderStatistics/shopOrderDetails', | |||||
method: 'get', | |||||
params: par | |||||
}) | |||||
} | |||||
// 订单交易流水列表 | |||||
export function orderStatistics(par) { | |||||
return fetch({ | |||||
url: '/service-trade/tradeStatistics/payChannelSummary', | |||||
method: 'get', | |||||
params: par | |||||
}) | |||||
} | |||||
// 日报统计 | |||||
// 订单交易流水列表 | |||||
export function orderDatestatistics(par) { | |||||
return fetch({ | |||||
url: '/unionService/tradeStatistics/daily', | |||||
method: 'get', | |||||
params: par | |||||
}) | |||||
} | |||||
// 占比统计 | |||||
export function orderRationstatistics(par) { | |||||
return fetch({ | |||||
url: '/service-trade/tradeStatistics/payChannelProportion', | |||||
method: 'get', | |||||
params: par | |||||
}) | |||||
} | |||||
// 门店各支付方式汇总统计 | |||||
export function shopPaymentTypeStatistics(par) { | |||||
return fetch({ | |||||
url: '/unionService/tradeStatistics/payTypeTradeSummary', | |||||
method: 'get', | |||||
params: par | |||||
}) | |||||
} |
@@ -0,0 +1,132 @@ | |||||
import fetch from '@/utils/fetch' | |||||
// 判断结算数据是否存在 | |||||
export function validateSettle(par) { | |||||
return fetch({ | |||||
url: '/service-trade/bill/billExistStatus', | |||||
method: 'get', | |||||
params: par | |||||
}) | |||||
} | |||||
// 结算或者查看结算 | |||||
export function settleOrView(par) { | |||||
return fetch({ | |||||
url: '/unionService/bill/noAcceptBills', | |||||
method: 'get', | |||||
params: par | |||||
}) | |||||
} | |||||
// 归档数据 | |||||
export function archive(par) { | |||||
return fetch({ | |||||
url: '/service-trade/bill/billAccept', | |||||
method: 'put', | |||||
data: par | |||||
}) | |||||
} | |||||
// 查看已归档数据 | |||||
export function archivedView(par) { | |||||
return fetch({ | |||||
url: '/unionService/bill/acceptBills', | |||||
method: 'get', | |||||
params: par | |||||
}) | |||||
} | |||||
// 查看结算订单详情 | |||||
export function viewDetail(par) { | |||||
return fetch({ | |||||
url: '/unionService/bill/billDetails', | |||||
method: 'get', | |||||
params: par | |||||
}) | |||||
} | |||||
// 查询未结算周期列表 | |||||
export function scheduleList() { | |||||
return fetch({ | |||||
url: '/service-trade/bill/noAcceptBillNumbers', | |||||
method: 'get' | |||||
}) | |||||
} | |||||
// 查询集团结算周期 | |||||
export function getOrgSettleSchedule() { | |||||
return fetch({ | |||||
url: '/service-trade/billSettlementCycle/billSettlementCycle', | |||||
method: 'get' | |||||
}) | |||||
} | |||||
// 创建集团结算周期 | |||||
export function createOrgSettleSchedule(par) { | |||||
return fetch({ | |||||
url: '/service-trade/billSettlementCycle/billSettlementCycle', | |||||
method: 'post', | |||||
data: par | |||||
}) | |||||
} | |||||
// 修改集团结算周期 | |||||
export function updateOrgSettleSchedule(par) { | |||||
return fetch({ | |||||
url: '/service-trade/billSettlementCycle/billSettlementCycle', | |||||
method: 'put', | |||||
data: par | |||||
}) | |||||
} | |||||
// 查询结算[支付]规则 | |||||
export function getSettleRules(par) { | |||||
return fetch({ | |||||
url: '/unionService/billSettlementRule/billSettlementRule?ruleId=' + par, | |||||
method: 'get' | |||||
}) | |||||
} | |||||
// 创建集团结算数据 | |||||
export function createSettleConfig(par) { | |||||
return fetch({ | |||||
url: '/service-trade/billSettlementRule/billSettlementRule', | |||||
method: 'post', | |||||
data: par | |||||
}) | |||||
} | |||||
// 修改集团结算数据 | |||||
export function updateSettleConfig(par) { | |||||
return fetch({ | |||||
url: '/service-trade/billSettlementRule/billSettlementRule', | |||||
method: 'put', | |||||
data: par | |||||
}) | |||||
} | |||||
// 查询所有规则列表 | |||||
export function getSettleConfigs() { | |||||
return fetch({ | |||||
url: '/unionService/billSettlementRule/billSettlementRules', | |||||
method: 'get' | |||||
}) | |||||
} | |||||
// 删除规则 | |||||
export function deleteSettleConfigs(id) { | |||||
return fetch({ | |||||
url: '/service-trade/billSettlementRule/billSettlementRule?ruleId=' + id, | |||||
method: 'delete' | |||||
}) | |||||
} | |||||
// 列表重拍 | |||||
export function reorderIndex(par) { | |||||
return fetch({ | |||||
url: '/service-trade/billSettlementRule/billSettlementRuleSort', | |||||
method: 'put', | |||||
data: par | |||||
}) | |||||
} |
@@ -0,0 +1,45 @@ | |||||
<template> | |||||
<div> | |||||
<svg t="1492500959545" @click="toggleClick" class="svg-icon hamburger" :class="{'is-active':isActive}" style="" viewBox="0 0 1024 1024" | |||||
version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1691" xmlns:xlink="http://www.w3.org/1999/xlink" width="64" height="64"> | |||||
<path d="M966.8023 568.849776 57.196677 568.849776c-31.397081 0-56.850799-25.452695-56.850799-56.850799l0 0c0-31.397081 25.452695-56.849776 56.850799-56.849776l909.605623 0c31.397081 0 56.849776 25.452695 56.849776 56.849776l0 0C1023.653099 543.397081 998.200404 568.849776 966.8023 568.849776z" | |||||
p-id="1692"></path> | |||||
<path d="M966.8023 881.527125 57.196677 881.527125c-31.397081 0-56.850799-25.452695-56.850799-56.849776l0 0c0-31.397081 25.452695-56.849776 56.850799-56.849776l909.605623 0c31.397081 0 56.849776 25.452695 56.849776 56.849776l0 0C1023.653099 856.07443 998.200404 881.527125 966.8023 881.527125z" | |||||
p-id="1693"></path> | |||||
<path d="M966.8023 256.17345 57.196677 256.17345c-31.397081 0-56.850799-25.452695-56.850799-56.849776l0 0c0-31.397081 25.452695-56.850799 56.850799-56.850799l909.605623 0c31.397081 0 56.849776 25.452695 56.849776 56.850799l0 0C1023.653099 230.720755 998.200404 256.17345 966.8023 256.17345z" | |||||
p-id="1694"></path> | |||||
</svg> | |||||
</div> | |||||
</template> | |||||
<script> | |||||
export default { | |||||
name: 'hamburger', | |||||
props: { | |||||
isActive: { | |||||
type: Boolean, | |||||
default: false | |||||
}, | |||||
toggleClick: { | |||||
type: Function, | |||||
default: null | |||||
} | |||||
} | |||||
} | |||||
</script> | |||||
<style scoped> | |||||
.hamburger { | |||||
display: inline-block; | |||||
cursor: pointer; | |||||
width: 20px; | |||||
height: 20px; | |||||
transform: rotate(0deg); | |||||
transition: .38s; | |||||
transform-origin: 50% 50%; | |||||
} | |||||
.hamburger.is-active { | |||||
transform: rotate(90deg); | |||||
} | |||||
</style> |
@@ -0,0 +1,22 @@ | |||||
<template> | |||||
<svg class="svg-icon" aria-hidden="true"> | |||||
<use :xlink:href="iconName"></use> | |||||
</svg> | |||||
</template> | |||||
<script> | |||||
export default { | |||||
name: 'icon-svg', | |||||
props: { | |||||
iconClass: { | |||||
type: String, | |||||
required: true | |||||
} | |||||
}, | |||||
computed: { | |||||
iconName() { | |||||
return `#icon-${this.iconClass}` | |||||
} | |||||
} | |||||
} | |||||
</script> |
@@ -0,0 +1,43 @@ | |||||
<template> | |||||
<el-pagination | |||||
class="pagination" | |||||
@size-change="handleSizeChange" | |||||
@current-change="handleCurrentChange" | |||||
:current-page="currPage" | |||||
:page-sizes="[10, 30, 50, 100]" | |||||
:page-size="pagesize" | |||||
layout="total, sizes, prev, pager, next, jumper" | |||||
:total="total"> | |||||
</el-pagination> | |||||
</template> | |||||
<script> | |||||
// props: { | |||||
// isEdit: { | |||||
// type: Boolean, | |||||
// default: false | |||||
// } | |||||
export default { | |||||
name:'pageination', | |||||
props:{ | |||||
total:Number, | |||||
currPage:{type:Number,default:1}, | |||||
pagesize:{type:Number,default:10}, | |||||
}, | |||||
methods: { | |||||
handleSizeChange(val) { | |||||
this.$emit("changePage",{'pagesize':val,'currPage':1}); | |||||
}, | |||||
handleCurrentChange(val) { | |||||
this.$emit("changePage",{'pagesize':this.pagesize,'currPage':val}); | |||||
} | |||||
}, | |||||
} | |||||
</script> | |||||
<style> | |||||
.pagination{ | |||||
float: right; | |||||
margin-top: 20px; | |||||
} | |||||
</style> |
@@ -0,0 +1,67 @@ | |||||
<template> | |||||
<el-uploads | |||||
:action="upUrl" | |||||
:show-file-list="false" | |||||
:on-success="handleAvatarSuccess" | |||||
:before-upload="beforeAvatarUpload"> | |||||
<el-button size="small" type="primary">点击上传</el-button> | |||||
</el-uploads> | |||||
</template> | |||||
<style> | |||||
.avatar-uploader .el-upload { | |||||
border: 1px dashed #d9d9d9; | |||||
border-radius: 6px; | |||||
cursor: pointer; | |||||
position: relative; | |||||
overflow: hidden; | |||||
} | |||||
.avatar-uploader .el-upload:hover { | |||||
border-color: #409EFF; | |||||
} | |||||
.avatar-uploader-icon { | |||||
font-size: 28px; | |||||
color: #8c939d; | |||||
width: 178px; | |||||
height: 178px; | |||||
line-height: 178px; | |||||
text-align: center; | |||||
} | |||||
.avatar { | |||||
width: 178px; | |||||
height: 178px; | |||||
display: block; | |||||
} | |||||
</style> | |||||
<script> | |||||
import axios from 'axios' | |||||
export default { | |||||
data(){ | |||||
return { | |||||
upUrl:process.env.BASE_API | |||||
} | |||||
}, | |||||
methods: { | |||||
handleAvatarSuccess(res, file) { | |||||
this.imageUrl = URL.createObjectURL(file.raw); | |||||
}, | |||||
beforeAvatarUpload(file) { | |||||
alert(process.env.BASE_API) | |||||
const isJPG = file.type === 'image/jpeg'; | |||||
const isLt2M = file.size / 1024 / 1024 < 2; | |||||
if (!isJPG) { | |||||
this.$message.error('上传头像图片只能是 JPG 格式!'); | |||||
} | |||||
if (!isLt2M) { | |||||
this.$message.error('上传头像图片大小不能超过 2MB!'); | |||||
} | |||||
return isJPG && isLt2M; | |||||
} | |||||
} | |||||
} | |||||
</script> |
@@ -0,0 +1,73 @@ | |||||
<template> | |||||
<el-upload | |||||
class="avatar-uploader" | |||||
:action="upUrl" | |||||
:show-file-list="false" | |||||
:on-success="handleAvatarSuccess" | |||||
:before-upload="beforeAvatarUpload"> | |||||
<img v-if="imageUrl" :src="imageUrl" class="avatar"> | |||||
<i v-else class="el-icon-plus avatar-uploader-icon"></i> | |||||
</el-upload> | |||||
</template> | |||||
<style> | |||||
.avatar-uploader .el-upload { | |||||
border: 1px dashed #d9d9d9; | |||||
border-radius: 6px; | |||||
cursor: pointer; | |||||
position: relative; | |||||
overflow: hidden; | |||||
} | |||||
.avatar-uploader .el-upload:hover { | |||||
border-color: #409EFF; | |||||
} | |||||
.avatar-uploader-icon { | |||||
font-size: 28px; | |||||
color: #8c939d; | |||||
width: 178px; | |||||
height: 178px; | |||||
line-height: 178px; | |||||
text-align: center; | |||||
} | |||||
.avatar { | |||||
width: 178px; | |||||
height: 178px; | |||||
display: block; | |||||
} | |||||
</style> | |||||
<script> | |||||
import axios from 'axios' | |||||
export default { | |||||
props: { | |||||
imageUrl: String | |||||
}, | |||||
data(){ | |||||
return { | |||||
upUrl:process.env.BASE_API | |||||
} | |||||
}, | |||||
methods: { | |||||
handleAvatarSuccess(res, file) { | |||||
this.imageUrl = URL.createObjectURL(file.raw); | |||||
}, | |||||
beforeAvatarUpload(file) { | |||||
alert(process.env.BASE_API) | |||||
const isJPG = file.type === 'image/jpeg'; | |||||
const isLt2M = file.size / 1024 / 1024 < 2; | |||||
if (!isJPG) { | |||||
this.$message.error('上传头像图片只能是 JPG 格式!'); | |||||
} | |||||
if (!isLt2M) { | |||||
this.$message.error('上传头像图片大小不能超过 2MB!'); | |||||
} | |||||
return isJPG && isLt2M; | |||||
} | |||||
} | |||||
} | |||||
</script> |
@@ -0,0 +1,71 @@ | |||||
<template> | |||||
<div> | |||||
<el-select v-model="re.pid" clearable @change="clearciye"> | |||||
<el-option | |||||
v-for="item in groupList" | |||||
:key="item.regionNumber" | |||||
:label="item.regionName" | |||||
:value="item.regionNumber"> | |||||
</el-option> | |||||
</el-select> | |||||
<el-select v-model="re.cid" clearable v-if="parm.step!=1"> | |||||
<el-option | |||||
v-for="item in cityList" | |||||
:key="item.regionNumber" | |||||
:label="item.regionName" | |||||
:value="item.regionNumber"> | |||||
</el-option> | |||||
</el-select> | |||||
</div> | |||||
</template> | |||||
<script> | |||||
import {mapGetters} from 'vuex' | |||||
import {manageList} from '@/api/marketing/group/manage' | |||||
import {storeList} from '@/api/marketing/shop/store' | |||||
import {getCitys} from '@/api/comm' | |||||
export default { | |||||
name: 'groupStore', | |||||
props: [ | |||||
"parm" | |||||
], | |||||
created() { | |||||
getCitys("").then(response => { | |||||
this.groupList = response.result | |||||
}) | |||||
}, | |||||
data() { | |||||
return { | |||||
groupList: [], | |||||
cityList: [], | |||||
re: [], | |||||
} | |||||
}, | |||||
watch: { | |||||
"parm":function () { | |||||
this.re=this.parm | |||||
}, | |||||
"re.pid": function (id) { | |||||
if (id) { | |||||
getCitys(id).then(response => { | |||||
this.cityList = response.result | |||||
}) | |||||
} else { | |||||
this.cityList = [] | |||||
} | |||||
// this.re.cid = '' | |||||
this.$emit("getCity", this.re) | |||||
}, | |||||
"re.cid": function (id) { | |||||
this.$emit("getCity", this.re) | |||||
} | |||||
}, | |||||
methods: { | |||||
clearciye:function () { | |||||
this.re.cid = '' | |||||
} | |||||
} | |||||
} | |||||
</script> | |||||
@@ -0,0 +1,70 @@ | |||||
<template> | |||||
<div> | |||||
<el-form-item label=""> | |||||
<el-select v-model="re.oid" placeholder="所属集团" clearable @change="groupChange" filterable > | |||||
<el-option | |||||
v-for="item in groupList" | |||||
:key="item.id" | |||||
:label="item.name" | |||||
:value="item.id"> | |||||
</el-option> | |||||
</el-select> | |||||
<el-select v-model="re.sid" placeholder="所属门店" v-if="parm.step!=1"> | |||||
<el-option | |||||
v-for="item in storeList" | |||||
:key="item.id" | |||||
:label="item.name" | |||||
:value="item.id"> | |||||
</el-option> | |||||
</el-select> | |||||
</el-form-item> | |||||
</div> | |||||
</template> | |||||
<script> | |||||
import {mapGetters} from 'vuex' | |||||
import {manageList} from '@/api/marketing/group/manage' | |||||
import {storeList} from '@/api/marketing/shop/store' | |||||
export default { | |||||
name: 'groupStore', | |||||
props: [ | |||||
"parm" | |||||
], | |||||
created() { | |||||
manageList().then(response => { | |||||
this.groupList = response.result.rows | |||||
}) | |||||
}, | |||||
data() { | |||||
return { | |||||
groupList: [], | |||||
storeList: [], | |||||
re: [] | |||||
} | |||||
}, | |||||
watch: { | |||||
"parm": function () { | |||||
this.re = this.parm | |||||
}, | |||||
"re.oid": function (id) { | |||||
if (id&&this.parm.step!=1) { | |||||
storeList({org: id,}).then(response => { | |||||
this.storeList = response.result.rows | |||||
}) | |||||
} else { | |||||
this.storeList = [] | |||||
} | |||||
this.$emit("getGroup", this.re) | |||||
}, | |||||
"re.sid": function (id) { | |||||
this.$emit("getGroup", this.re) | |||||
} | |||||
}, | |||||
methods: { | |||||
groupChange(id) { | |||||
this.re.sid = '' | |||||
}, | |||||
} | |||||
} | |||||
</script> | |||||
@@ -1,261 +0,0 @@ | |||||
<template> | |||||
<div> | |||||
<x-header :left-options="{backText: ''}" style="width: 100%;position: fixed;left: 0px;top: 0px;z-index: 100;"> | |||||
商品添加 | |||||
</x-header> | |||||
<div class="app-container" style="padding: 60px 0px 10px 0px;height: 100%"> | |||||
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" size="small"> | |||||
<el-form-item label="门店" prop="shop" v-if="this.usertype=='user'"> | |||||
<el-select v-model="ruleForm.shop" placeholder="门店"> | |||||
<el-option | |||||
v-for="item in shopList" | |||||
:key="item.id" | |||||
:label="item.name" | |||||
:value="item.id"> | |||||
</el-option> | |||||
</el-select> | |||||
</el-form-item> | |||||
<el-form-item label="菜品名" prop="name"> | |||||
<el-input v-model.trim="ruleForm.name" style="width: 90%" placeholder="最多40字"></el-input> | |||||
</el-form-item> | |||||
<el-form-item label="菜品价格" prop="price"> | |||||
<el-input v-model.trim="ruleForm.price" style="width: 90%"></el-input> | |||||
</el-form-item> | |||||
<el-form-item label="菜品类别" prop="category"> | |||||
<el-select v-model="ruleForm.category" placeholder="请选择"> | |||||
<el-option | |||||
v-for="item in cateType" | |||||
:key="item.id" | |||||
:label="item.name" | |||||
:value="item.id"/> | |||||
</el-select> | |||||
</el-form-item> | |||||
<el-form-item label="菜品图片" style="width: 50%" prop="image"> | |||||
<el-tag type="warning">图片最大200kb,建议宽高174*143</el-tag> | |||||
<el-upload | |||||
id="img" | |||||
class="avatar-uploader" | |||||
:action="updata.url" | |||||
:show-file-list="true" | |||||
:fileList="fileList" | |||||
:on-success="handleAvatarSuccess" | |||||
:before-upload="beforeAvatarUpload" | |||||
:data="updata.data" | |||||
accept="image/*" | |||||
> | |||||
<img v-if="ruleForm.image" :src="ruleForm.image+'?x-oss-process=image/resize,m_fixed,h_143,w_174'" class="avatar"> | |||||
<i v-else class="el-icon-plus avatar-uploader-icon"></i> | |||||
</el-upload> | |||||
</el-form-item> | |||||
<el-form-item label="菜品标签" prop="tags"> | |||||
<el-checkbox-group v-model="ruleForm.tags"> | |||||
<el-checkbox v-for="item in tagsTyes" | |||||
:key="item.id" | |||||
:label="item.id" | |||||
>{{item.name}} | |||||
</el-checkbox> | |||||
</el-checkbox-group> | |||||
</el-form-item> | |||||
<el-form-item label="是否上架" prop="onSale"> | |||||
<el-radio-group v-model="ruleForm.onSale"> | |||||
<el-radio :label="0">下架</el-radio> | |||||
<el-radio :label="1">上架</el-radio> | |||||
</el-radio-group> | |||||
</el-form-item> | |||||
<el-form-item> | |||||
<el-button type="primary" @click="submitForm('ruleForm')">立即创建</el-button> | |||||
<el-button @click="resetForm('ruleForm')">重置</el-button> | |||||
</el-form-item> | |||||
</el-form> | |||||
</div> | |||||
</div> | |||||
</template> | |||||
<script> | |||||
import {goodsCategories, goodsTags, goodsAdd} from '@/api/goods' | |||||
import {getOSSSignature, getImgResoures} from '@/api/comm' | |||||
import {storeList} from '@/api/store' | |||||
import {typeList} from "@/api/goodstype"; | |||||
export default { | |||||
created() { | |||||
goodsTags().then(response => { | |||||
this.tagsTyes = response.result | |||||
}) | |||||
//上传签名初始化 | |||||
getOSSSignature("img").then(response => { | |||||
this.updata.data.policy = response.result.policy | |||||
this.updata.data.OSSAccessKeyId = response.result.accessid | |||||
this.updata.data.success_action_status = '200' | |||||
this.updata.data.signature = response.result.signature | |||||
this.updata.url = response.result.host | |||||
}) | |||||
getImgResoures().then(res => { | |||||
this.mediaUrl = res.result | |||||
}) | |||||
if (this.usertype == 'user') { | |||||
//多个门店选择 | |||||
storeList().then(response => { | |||||
this.shopList = response.result.rows | |||||
this.ruleForm.shop = this.shopList[0]['id'] | |||||
}) | |||||
}else{ | |||||
typeList({ | |||||
store:this.ruleForm.shop, | |||||
industry: '1', | |||||
}).then(response => { | |||||
this.cateType = response.result | |||||
this.ruleForm.category='' | |||||
}); | |||||
} | |||||
this.listLoading = false | |||||
}, | |||||
data() { | |||||
return { | |||||
usertype: this.$store.getters.usertype, | |||||
shopList: [], | |||||
fileList:[], | |||||
updata: { | |||||
url: '', | |||||
data: {} | |||||
}, | |||||
ruleForm: { | |||||
name: '', | |||||
price: "", | |||||
category: "", | |||||
tags: [], | |||||
onSale: 1, | |||||
image: "", | |||||
// org: '', | |||||
shop: '', | |||||
}, | |||||
rules: { | |||||
shop: [ | |||||
{required: true, message: '请选择门店', trigger: 'blur'}, | |||||
], | |||||
name: [ | |||||
{required: true, message: '请输入菜品名称', trigger: 'blur'}, | |||||
{max: 40, message: '最多40字', trigger: 'blur'}, | |||||
], | |||||
price: [ | |||||
{required: true, message: '请输入价格', trigger: 'blur'}, | |||||
{pattern: /^(0|[1-9][0-9]{0,9})(\.[0-9]{1,2})?$/, message: '请输入正确的价格', trigger: 'blur'} | |||||
], | |||||
category: [ | |||||
{required: true, message: '请输选择类别', trigger: 'blur'}, | |||||
], | |||||
}, | |||||
cateType: [], | |||||
tagsTyes: [], | |||||
}; | |||||
}, | |||||
watch:{ | |||||
"ruleForm.shop":function () { | |||||
if(this.ruleForm.shop){ | |||||
typeList({ | |||||
store:this.ruleForm.shop, | |||||
industry: '1', | |||||
}).then(response => { | |||||
this.cateType = response.result | |||||
this.ruleForm.category='' | |||||
}); | |||||
}else{ | |||||
this.cateType=[] | |||||
} | |||||
this.$refs['ruleForm'].clearValidate(); | |||||
} | |||||
}, | |||||
methods: { | |||||
submitForm(formName) { | |||||
this.$refs[formName].validate((valid) => { | |||||
if (valid) { | |||||
goodsAdd(this.ruleForm).then(res => { | |||||
var router = this.$router; | |||||
this.$message({ | |||||
message: '操作成功', | |||||
type: 'success', | |||||
duration: 1000, | |||||
onClose: function () { | |||||
router.push({path: 'index'}) | |||||
} | |||||
}); | |||||
}) | |||||
} else { | |||||
console.log('error submit!!', this.ruleForm.mediaUuid); | |||||
return false; | |||||
} | |||||
}); | |||||
}, | |||||
resetForm(formName) { | |||||
this.$refs[formName].resetFields(); | |||||
}, | |||||
handleAvatarSuccess(res, file) { | |||||
this.filename = file.name | |||||
this.ruleForm.image = this.mediaUrl + file.uid | |||||
this.fileList=[] | |||||
}, | |||||
beforeAvatarUpload(file) { | |||||
// var reader = new FileReader(); | |||||
//// console.log(file,reader) | |||||
// reader.readAsDataURL(file); | |||||
// reader.onload = function(theFile) { | |||||
// var image = new Image(); | |||||
// image.src = theFile.target.result; | |||||
// image.onload = function() { | |||||
// console.log("图片的宽度为"+this.width+",长度为"+this.height); | |||||
// }; | |||||
// }; | |||||
// const isLt2M = file.size / 1024 < 200; | |||||
// if (!isLt2M) { | |||||
// this.$message.error('上传图片大小不能超过 200kb!'); | |||||
// return false | |||||
// } | |||||
this.updata.data.key = "img/" + file.uid | |||||
return true | |||||
}, | |||||
} | |||||
} | |||||
</script> | |||||
<style> | |||||
.el-transfer-panel { | |||||
width: 40%; | |||||
} | |||||
.avatar-uploader .el-upload { | |||||
border: 1px dashed #d9d9d9; | |||||
border-radius: 6px; | |||||
cursor: pointer; | |||||
position: relative; | |||||
overflow: hidden; | |||||
} | |||||
.avatar-uploader .el-upload:hover { | |||||
border-color: #409EFF; | |||||
} | |||||
.avatar-uploader-icon { | |||||
font-size: 28px; | |||||
color: #8c939d; | |||||
width: 11rem; | |||||
height:9rem; | |||||
line-height: 150px; | |||||
text-align: center; | |||||
} | |||||
.avatar { | |||||
width: 11rem; | |||||
height:9rem; | |||||
display: block; | |||||
} | |||||
#img{ | |||||
width:11rem | |||||
} | |||||
</style> |
@@ -1,124 +0,0 @@ | |||||
<template> | |||||
<div> | |||||
<x-header :left-options="{backText: ''}" style="width: 100%;position: fixed;left: 0px;top: 0px;z-index: 100;"> | |||||
商品管理 | |||||
</x-header> | |||||
<div style="padding: 50px 0px 51px 0px;height: 100%"> | |||||
<flexbox style="margin-bottom:5px" orient="vertical"> | |||||
<flexbox-item v-if="usertype=='user'"> | |||||
<selector title="选择门店" :options="opts" v-model="listQuery.shopId" | |||||
:value-map="['id','name']" @on-change="fetchData"></selector> | |||||
</flexbox-item> | |||||
<flexbox-item> | |||||
<router-link to="add"> | |||||
<el-button type="primary" style="margin-left: 10px" size="small">添加商品</el-button> | |||||
</router-link> | |||||
<router-link to="type"> | |||||
<el-button type="success" size="small">商品分类</el-button> | |||||
</router-link> | |||||
</flexbox-item> | |||||
</flexbox> | |||||
<x-table full-bordered class="goodstable"> | |||||
<thead> | |||||
<tr> | |||||
<th>名称</th> | |||||
<th width="20%">价格</th> | |||||
<th width="20%">类别</th> | |||||
<th width="15%">状态</th> | |||||
<th width="15%">操作</th> | |||||
</tr> | |||||
</thead> | |||||
<tbody> | |||||
<tr v-for="vo in list"> | |||||
<td>{{vo.name}}</td> | |||||
<td>{{vo.price}}</td> | |||||
<td>{{vo.cateName}}</td> | |||||
<td>{{onSaleType[vo.onSale]}}</td> | |||||
<td> | |||||
<router-link :to="{ path: 'update/'+vo.id}"> <el-button type="text" size="small">编辑</el-button> </router-link> | |||||
</td> | |||||
</tr> | |||||
<tr v-if="list.length==0"> | |||||
<td colspan="5">暂无数据</td> | |||||
</tr> | |||||
</tbody> | |||||
</x-table> | |||||
</div> | |||||
<myfooter activeIndex="1"> | |||||
</myfooter> | |||||
</div> | |||||
</template> | |||||
<script> | |||||
import {XTable, Tabbar, TabbarItem, Flexbox, FlexboxItem, Selector} from 'vux' | |||||
import {goodsList, goodsCategories, goodsTags, goodsDel} from '@/api/goods' | |||||
import Myfooter from '@/components/layout/Myfooter' | |||||
import {storeList} from '@/api/store' | |||||
export default { | |||||
components: { | |||||
XTable, Tabbar, TabbarItem, Flexbox, FlexboxItem, Selector, Myfooter | |||||
}, | |||||
data() { | |||||
return { | |||||
list: [], | |||||
listQuery: { | |||||
id: '', | |||||
shopId: '', | |||||
name: '', | |||||
categories: '', | |||||
tags: '', | |||||
onSale: '', | |||||
limit: 25, | |||||
offset: 0 | |||||
}, | |||||
cateType: [], | |||||
opts: [], | |||||
onSaleType: {1: '上架', 0: '下架'}, | |||||
usertype: this.$store.getters.usertype, | |||||
} | |||||
}, | |||||
created() { | |||||
console.log(this.usertype) | |||||
if (this.usertype == "user") { | |||||
storeList().then(response => { | |||||
if (response.result.rows.length > 0) { | |||||
this.opts = response.result.rows | |||||
this.listQuery.shopId = this.opts[0]['id'] | |||||
} | |||||
}).then(() => { | |||||
this.fetchData() | |||||
}) | |||||
} else { | |||||
this.fetchData() | |||||
} | |||||
}, | |||||
methods: { | |||||
fetchData() { | |||||
goodsList(this.listQuery).then(response => { | |||||
this.list = response.result.data | |||||
}) | |||||
}, | |||||
} | |||||
} | |||||
</script> | |||||
<style> | |||||
.headercss { | |||||
width: 100%; | |||||
position: absolute; | |||||
left: 0px; | |||||
top: 0px; | |||||
z-index: 100; | |||||
} | |||||
.goodstable { | |||||
font-size: 14px; | |||||
} | |||||
</style> |
@@ -1,64 +0,0 @@ | |||||
<template> | |||||
<el-menu :default-active="activeIndex" class=" footerLayout el-menu-demo " mode="horizontal" @select="handleSelect" | |||||
menu-trigger="click"> | |||||
<el-menu-item index="1">商品管理</el-menu-item> | |||||
<!--<el-submenu index="1">--> | |||||
<!--<template slot="title">商品管理{{activeIndex}}</template>--> | |||||
<!--<el-menu-item index="2-1" class="fontCss">商品列表</el-menu-item>--> | |||||
<!--<el-menu-item index="2-2" class="fontCss">商品分类</el-menu-item>--> | |||||
<!--</el-submenu>--> | |||||
<el-menu-item index="2" class="fontCss">交易管理</el-menu-item> | |||||
</el-menu> | |||||
</template> | |||||
<script> | |||||
import {Tabbar, TabbarItem} from 'vux' | |||||
export default { | |||||
components: { | |||||
Tabbar, TabbarItem | |||||
}, | |||||
props: { | |||||
activeIndex: {default: '1'}, | |||||
}, | |||||
methods: { | |||||
handleSelect(key, keyPath) { | |||||
var path = "" | |||||
switch (key) { | |||||
case '1': | |||||
path = "/goods/index"; | |||||
break; | |||||
case '2': | |||||
path = "/order/ratiostatistics"; | |||||
break; | |||||
} | |||||
this.$router.push({path: path}); | |||||
} | |||||
} | |||||
} | |||||
</script> | |||||
<style> | |||||
.footerLayout { | |||||
width: 100%; | |||||
position: fixed; | |||||
left: 0px; | |||||
bottom: 0px; | |||||
z-index: 100; | |||||
} | |||||
.footerLayout .el-menu-item { | |||||
height: 50px; | |||||
line-height: 50px; | |||||
} | |||||
.footerLayout li { | |||||
width: 50%; | |||||
text-align: center; | |||||
/*font-size: 16px;*/ | |||||
} | |||||
.fontCss { | |||||
text-align: center; | |||||
} | |||||
</style> |
@@ -1,154 +0,0 @@ | |||||
<template> | |||||
<div class="bjimg"> | |||||
<x-header :left-options="{showBack: false}">{{token}}登录</x-header> | |||||
<box gap="20px 30px"> | |||||
<flexbox orient="vertical" style=""> | |||||
<flexbox-item> | |||||
<h2 style="color: white;text-align:center;margin: 30px 0 15px 0">东软智能云POS管理系统</h2> | |||||
</flexbox-item> | |||||
<flexbox-item> | |||||
<x-input title="" placeholder="用户名" class="inputcss" v-model.trim="loginForm.username"> | |||||
<img slot="label" style="padding-right:10px;display:block;" | |||||
src="../assets/user.png" width="20" height="20"> | |||||
</x-input> | |||||
</flexbox-item> | |||||
<flexbox-item> | |||||
<x-input title="" placeholder="密码" type="password" class="inputcss" | |||||
v-model.trim="loginForm.password"> | |||||
<img slot="label" style="padding-right:10px;display:block;" | |||||
src="../assets/password.png" width="20" height="20"> | |||||
</x-input> | |||||
</flexbox-item> | |||||
<flexbox-item> | |||||
<x-input title="验证码" placeholder="验证码" class="inputcss" v-model.trim="loginForm.captcha"> | |||||
<img slot="label" style="padding-right:10px;display:block;" | |||||
src="../assets/yzm.png" width="20" height="20"> | |||||
<img slot="right-full-height" | |||||
@click="reRand" :src="captcha" width="100" | |||||
height="50"> | |||||
</x-input> | |||||
</flexbox-item> | |||||
<flexbox-item> | |||||
<!--<x-button type="default" style="width: 85%;margin-top: 20px" @click.native="sub">登录</x-button>--> | |||||
<el-button type="primary" style="width:100%;margin-top: 15px" | |||||
@click.native.prevent="sub"> | |||||
立即登录 | |||||
</el-button> | |||||
</flexbox-item> | |||||
</flexbox> | |||||
<toast v-model="showMessage" type="text" width="16em">{{msg}}</toast> | |||||
</box> | |||||
</div> | |||||
</template> | |||||
<script> | |||||
import {XInput, Flexbox, FlexboxItem, XButton, Box} from 'vux' | |||||
import {login} from "@/api/login"; | |||||
export default { | |||||
components: { | |||||
Flexbox, | |||||
FlexboxItem, | |||||
XInput, | |||||
XButton, | |||||
Box | |||||
}, | |||||
created() { | |||||
this.randStr = Math.random().toString() | |||||
}, | |||||
data() { | |||||
return { | |||||
randStr: "", | |||||
msg: '', | |||||
showMessage: false, | |||||
loginForm: { | |||||
username: "", | |||||
password: "", | |||||
captcha: "" | |||||
}, | |||||
token: this.$store.getters.name | |||||
} | |||||
}, | |||||
methods: { | |||||
reRand() { | |||||
this.randStr = Math.random().toString() | |||||
}, | |||||
sub() { | |||||
// console.log(this.loginForm.username, this.loginForm.password, this.loginForm.captcha) | |||||
var username = this.loginForm.username | |||||
var password = this.loginForm.password | |||||
var captcha = this.loginForm.captcha | |||||
const reg = /^[a-zA-Z0-9]+$/ | |||||
if (!reg.test(username)) { | |||||
this.msg = "请输入正确的用户名" | |||||
this.showMessage = true | |||||
return | |||||
} | |||||
if (password.length < 6) { | |||||
this.msg = "密码不能小于6位" | |||||
this.showMessage = true | |||||
return | |||||
} | |||||
if (captcha.length != 5) { | |||||
this.msg = "验证码有误" | |||||
this.showMessage = true | |||||
return | |||||
} | |||||
this.msg = "" | |||||
login(this.loginForm).then(response => { | |||||
if (response.code != 200) { | |||||
this.msg = response.message | |||||
this.showMessage = true | |||||
} else { | |||||
if (response.result.type == "sa" || response.result.type == "ca") { | |||||
this.msg = '无权登录' | |||||
this.showMessage = true | |||||
} else { | |||||
this.$store.dispatch("Login", response.result) | |||||
.then(() => { | |||||
this.$router.push({path: "/order/ratiostatistics"}); | |||||
}); | |||||
} | |||||
} | |||||
}) | |||||
// this.showMessage = true | |||||
} | |||||
}, | |||||
computed: { | |||||
captcha: function () { | |||||
return process.env.BASE_API + "service-user/login/captcha?rand=" + this.randStr | |||||
} | |||||
} | |||||
} | |||||
</script> | |||||
<style> | |||||
.vux-demo { | |||||
text-align: center; | |||||
} | |||||
.logo { | |||||
width: 100px; | |||||
height: 100px | |||||
} | |||||
.weui-input::placeholder { | |||||
color: white; | |||||
} | |||||
.bjimg { | |||||
position:absolute; | |||||
width:100%; | |||||
height:100%; | |||||
background-image: url('../assets/background.png'); | |||||
overflow:hidden | |||||
} | |||||
.inputcss { | |||||
border: 1px solid hsla(0, 0%, 100%, .1); | |||||
background: rgba(0, 0, 0, .1); | |||||
border-radius: 5px; | |||||
color: white; | |||||
margin-top: 8px; | |||||
} | |||||
</style> |
@@ -1,177 +0,0 @@ | |||||
<template> | |||||
<div> | |||||
<div class="headercss"> | |||||
<x-header :left-options="{backText: ''}">交易管理</x-header> | |||||
</div> | |||||
<div style="padding-top: 15px;margin-top: 35px"> | |||||
<flexbox style="margin-bottom:3px"> | |||||
<flexbox-item> | |||||
<selector title="选择门店" :options="opts" v-model="listQuery.shopId" :value-map="['id','name']" | |||||
@on-change="fetchData()"></selector> | |||||
</flexbox-item> | |||||
</flexbox> | |||||
<flexbox> | |||||
<flexbox-item :span="3"> | |||||
<x-button type="primary" mini style="margin-left: 15px;" @click.native="nowOrder">当日</x-button> | |||||
</flexbox-item> | |||||
<flexbox-item> | |||||
<calendar v-model="date" title="切换日期" disable-future placeholder="" @on-change="fetchData()" ></calendar> | |||||
</flexbox-item> | |||||
</flexbox> | |||||
</div> | |||||
<card class="cardcss"> | |||||
<div slot="content" class="card-demo-flex card-demo-content01"> | |||||
<div class="vux-1px-r"> | |||||
<span style=" color: #f74c31;">{{todayAmount}}</span> | |||||
<br/> | |||||
实收总金额 | |||||
</div> | |||||
<div class="vux-1px-r"> | |||||
<span>{{todayCount}}</span> | |||||
<br/> | |||||
收单数 | |||||
</div> | |||||
<div class="vux-1px-r"> | |||||
<span>{{todayRefundAmount}}</span> | |||||
<br/> | |||||
退款总金额 | |||||
</div> | |||||
<div> | |||||
<span>{{todayRefundCount}}</span> | |||||
<br/> | |||||
退款笔数 | |||||
</div> | |||||
</div> | |||||
</card> | |||||
<div style="padding: 2px 0px 51px 0px;margin-top: 10px"> | |||||
<x-table full-bordered class="xtable"> | |||||
<thead> | |||||
<tr> | |||||
<th width="28%">支付方式</th> | |||||
<th>消费金额</th> | |||||
<th>折扣金额</th> | |||||
<th>消费笔数</th> | |||||
<th>退款金额</th> | |||||
<th>退款笔数</th> | |||||
<th>实收金额</th> | |||||
</tr> | |||||
</thead> | |||||
<tbody> | |||||
<tr v-for="vo in list"> | |||||
<td>{{vo.payTypeName}}</td> | |||||
<td>{{vo.payAmount}}</td> | |||||
<td>{{vo.discountAmount}}</td> | |||||
<td>{{vo.payCount}}</td> | |||||
<td>{{vo.refundAmount}}</td> | |||||
<td>{{vo.refundCount}}</td> | |||||
<td>{{vo.amount}}</td> | |||||
</tr> | |||||
</tbody> | |||||
</x-table> | |||||
</div> | |||||
<myfooter activeIndex="2"> | |||||
</myfooter> | |||||
</div> | |||||
</template> | |||||
<script> | |||||
import {XTable, Tabbar, TabbarItem, Flexbox, FlexboxItem, Calendar, Selector, Card, dateFormat} from 'vux' | |||||
import {orderStatistics} from '@/api/order' | |||||
import {storeList} from '@/api/store' | |||||
import Myfooter from '@/components/layout/Myfooter' | |||||
export default { | |||||
components: { | |||||
XTable, Tabbar, TabbarItem, Flexbox, FlexboxItem, Calendar, Selector, Card,Myfooter | |||||
}, | |||||
data() { | |||||
return { | |||||
date: '', | |||||
token: this.$store.getters.name, | |||||
opts: [], | |||||
listQuery: { | |||||
shopId: '', | |||||
timeMode: '1', | |||||
}, | |||||
list: null, | |||||
todayAmount: 0, | |||||
todayCount: 0, | |||||
todayRefundAmount: 0, | |||||
todayRefundCount: 0, | |||||
} | |||||
}, | |||||
created() { | |||||
storeList().then(response => { | |||||
if (response.result.rows.length > 0) { | |||||
this.opts = response.result.rows | |||||
} | |||||
}).then(() => { | |||||
this.listQuery.shopId = this.opts[0]['id'] | |||||
}) | |||||
}, | |||||
methods: { | |||||
fetchData() { | |||||
if (!this.date) { | |||||
this.date = dateFormat(new Date(), 'YYYY-MM-DD') | |||||
} | |||||
this.listQuery.startTime=this.date | |||||
this.listQuery.endTime=this.date | |||||
orderStatistics(this.listQuery).then(response => { | |||||
this.list = response.result.payChannels | |||||
}) | |||||
}, | |||||
nowOrder(){ | |||||
this.date='' | |||||
this.fetchData() | |||||
} | |||||
}, | |||||
watch: { | |||||
"list": function (list) { | |||||
let payAmount = 0, payCount = 0, refundAmount = 0, refundCount = 0 | |||||
list.forEach(function (x) { | |||||
payAmount += x.amount | |||||
payCount += x.payCount | |||||
refundAmount += x.refundAmount | |||||
refundCount += x.refundCount | |||||
}); | |||||
this.todayAmount = payAmount.toFixed(2) | |||||
this.todayCount = payCount | |||||
this.todayRefundAmount = refundAmount.toFixed(2) | |||||
this.todayRefundCount = refundCount | |||||
} | |||||
} | |||||
} | |||||
</script> | |||||
<style scoped lang="less"> | |||||
@import '~vux/src/styles/1px.less'; | |||||
.card-demo-flex { | |||||
display: flex; | |||||
} | |||||
.card-demo-content01 { | |||||
padding: 6px 0; | |||||
} | |||||
.card-padding { | |||||
padding: 15px; | |||||
} | |||||
.card-demo-flex > div { | |||||
flex: 1; | |||||
text-align: center; | |||||
font-size: 14px; | |||||
} | |||||
.cardcss { | |||||
margin-top: 0px; | |||||
} | |||||
.xtable{ | |||||
font-size: 10px; | |||||
} | |||||
thead th { | |||||
/*font-weight: bold;*/ | |||||
} | |||||
.headercss{ | |||||
position: fixed;top: 0px;width: 100%; | |||||
} | |||||
</style> |
@@ -0,0 +1,13 @@ | |||||
const C = { | |||||
'title': '东软智能云POS管理系统', | |||||
'menu': { | |||||
1: { 't': '营销系统', 'url': '/marketing/shop/store/index' }, | |||||
2: { 't': '帐号系统', 'url': '/accounts/manage/index' }, | |||||
3: { 't': '设备管理', 'url': '/ota/mac/index' }, | |||||
4: { 't': '交易管理', 'url': '/transaction/order/index', 'type': 'sa' }, | |||||
5: { 't': '库存管理', 'url': '/stock/goods/index', 'type': 'sa' } | |||||
} | |||||
} | |||||
export default C | |||||
@@ -0,0 +1,9 @@ | |||||
import Vue from 'vue' | |||||
import IconSvg from '@/components/Icon-svg'// svg组件 | |||||
// register globally | |||||
Vue.component('icon-svg', IconSvg) | |||||
const requireAll = requireContext => requireContext.keys().map(requireContext) | |||||
const req = require.context('./svg', false, /\.svg$/) | |||||
requireAll(req) |
@@ -0,0 +1 @@ | |||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1503994850540" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="10206" xmlns:xlink="http://www.w3.org/1999/xlink" width="64" height="64"><defs><style type="text/css"></style></defs><path d="M931.6 585.6l0 79c28.6-60.2 44.8-127.4 44.8-198.4C976.4 211 769.4 4 514.2 4S52 211 52 466.2c0 3.2 0.2 6.4 0.2 9.6l166-206 96.4 0L171.8 485.6l46.4 0 0-54.8 99.2-154.6 0 209.4 0 100 0 82.4-99.2 0 0-82.4L67.6 585.6c43 161 170.6 287.4 332.4 328.6-10.4 26.2-40.6 89.4-90.8 100.6-62.2 14 168.8 3.4 333.6-104.6 126.6-36.6 230.8-125.8 287.4-242.2l-97.6 0 0-82.4-166.2 0 0-87.2 0-12.8L666.4 476l166.2-206.2 94 0-140.4 215.8 46.4 0 0-59 99.2-154 0 213.2L931.8 585.6zM366.2 608c-4.8-11.2-7.2-23.2-7.2-36L359 357.6c0-12.8 2.4-24.8 7.2-36 4.8-11.2 11.4-21 19.6-29.2 8.2-8.2 18-14.8 29.2-19.6 11.2-4.8 23.2-7.2 36-7.2l81.6 0c12.8 0 24.8 2.4 36 7.2 11 4.8 20.6 11.2 28.8 19.2l-88.6 129.4 0-23c0-4.8-1.6-8.8-4.8-12-3.2-3.2-7.2-4.8-12-4.8-4.8 0-8.8 1.6-12 4.8-3.2 3.2-4.8 7.2-4.8 12l0 72L372.6 620C370.2 616.2 368 612.2 366.2 608zM624.4 572c0 12.8-2.4 24.8-7.2 36-4.8 11.2-11.4 21-19.6 29.2-8.2 8.2-18 14.8-29.2 19.6-11.2 4.8-23.2 7.2-36 7.2l-81.6 0c-12.8 0-24.8-2.4-36-7.2-11.2-4.8-21-11.4-29.2-19.6-3.6-3.6-7-7.8-10-12l99.2-144.6 0 50.6c0 4.8 1.6 8.8 4.8 12 3.2 3.2 7.2 4.8 12 4.8 4.8 0 8.8-1.6 12-4.8 3.2-3.2 4.8-7.2 4.8-12l0-99.6 92.6-135.2c6.6 7.4 12 15.8 16 25.2 4.8 11.2 7.2 23.2 7.2 36L624.2 572z" p-id="10207"></path></svg> |
@@ -0,0 +1 @@ | |||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1503994842272" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="10097" xmlns:xlink="http://www.w3.org/1999/xlink" width="64" height="64"><defs><style type="text/css"></style></defs><path d="M625.664 132.608V199.68h309.76v43.008h-309.76V312.32h309.76v43.008h-309.76v68.608h309.76v43.008h-309.76v68.608h309.76v43.008h-309.76v68.608h309.76v43.008h-309.76v68.096h309.76v43.008h-309.76v89.088H1024v-757.76h-398.336zM0 914.944L577.024 1024V0L0 109.056" p-id="10098"></path><path d="M229.376 660.48H139.776l118.272-187.904-112.64-180.736h92.16l65.536 119.808L370.688 291.84h89.088l-112.64 177.664L466.944 660.48H373.248l-70.144-125.44L229.376 660.48z" p-id="10099"></path></svg> |
@@ -0,0 +1 @@ | |||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1503994155726" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="8554" xmlns:xlink="http://www.w3.org/1999/xlink" width="64" height="64"><defs><style type="text/css"></style></defs><path d="M44.521739 0h44.521739v979.478261H44.521739zM267.130435 534.26087h44.521739v445.217391H267.130435zM489.73913 311.652174h44.52174v667.826087h-44.52174zM712.347826 712.347826h44.521739v267.130435h-44.521739zM934.956522 445.217391h44.521739v534.26087h-44.521739z" fill="" p-id="8555"></path></svg> |
@@ -0,0 +1 @@ | |||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1503994177895" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="8894" xmlns:xlink="http://www.w3.org/1999/xlink" width="64" height="64"><defs><style type="text/css"></style></defs><path d="M712.347826 0h44.521739v979.478261h-44.521739zM267.130435 534.26087h44.521739v445.217391H267.130435zM489.73913 311.652174h44.52174v667.826087h-44.52174zM44.521739 712.347826h44.521739v267.130435H44.521739zM934.956522 445.217391h44.521739v534.26087h-44.521739z" fill="" p-id="8895"></path></svg> |
@@ -0,0 +1 @@ | |||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1517188022178" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1044" xmlns:xlink="http://www.w3.org/1999/xlink" width="64" height="64"><defs><style type="text/css"></style></defs><path d="M512 877.737822 575.918775 813.819047 320.245721 558.145993 877.247658 558.145993 877.247658 466.834334 320.245721 466.834334 575.918775 211.161281 512 147.243529 146.753365 512.491187Z" p-id="1045"></path></svg> |
@@ -0,0 +1 @@ | |||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1503994864347" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="10314" xmlns:xlink="http://www.w3.org/1999/xlink" width="64" height="64"><defs><style type="text/css"></style></defs><path d="M969.142857 548.571429q0 14.848-10.861714 25.709714t-25.709714 10.861714l-128 0q0 97.718857-38.290286 165.705143l118.857143 119.442286q10.861714 10.861714 10.861714 25.709714t-10.861714 25.709714q-10.276571 10.861714-25.709714 10.861714t-25.709714-10.861714l-113.152-112.566857q-2.852571 2.852571-8.557714 7.424t-23.990857 16.274286-37.156571 20.845714-46.848 16.566857-55.442286 7.424l0-512-73.142857 0 0 512q-29.147429 0-58.002286-7.716571t-49.700571-18.870857-37.705143-22.272-24.868571-18.578286l-8.557714-8.009143-104.557714 118.272q-11.446857 11.995429-27.428571 11.995429-13.714286 0-24.576-9.142857-10.861714-10.276571-11.702857-25.417143t8.850286-26.587429l115.419429-129.718857q-33.133714-65.133714-33.133714-156.562286l-128 0q-14.848 0-25.709714-10.861714t-10.861714-25.709714 10.861714-25.709714 25.709714-10.861714l128 0 0-168.009143-98.852571-98.852571q-10.861714-10.861714-10.861714-25.709714t10.861714-25.709714 25.709714-10.861714 25.709714 10.861714l98.852571 98.852571 482.304 0 98.852571-98.852571q10.861714-10.861714 25.709714-10.861714t25.709714 10.861714 10.861714 25.709714-10.861714 25.709714l-98.852571 98.852571 0 168.009143 128 0q14.848 0 25.709714 10.861714t10.861714 25.709714zM694.857143 219.428571l-365.714286 0q0-75.995429 53.430857-129.426286t129.426286-53.430857 129.426286 53.430857 53.430857 129.426286z" p-id="10315"></path></svg> |
@@ -0,0 +1 @@ | |||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1503994166937" class="icon" style="" viewBox="0 0 1131 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="8786" xmlns:xlink="http://www.w3.org/1999/xlink" width="70.6875" height="64"><defs><style type="text/css"></style></defs><path d="M0 0h53.894737v970.105263H0zM269.473684 431.157895h53.894737v538.947368H269.473684zM538.947368 161.684211h53.894737v808.421052h-53.894737zM808.421053 646.736842h53.894736v323.368421h-53.894736zM1077.894737 323.368421h53.894737v646.736842h-53.894737z" fill="" p-id="8787"></path></svg> |
@@ -0,0 +1 @@ | |||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1503994210967" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="9120" xmlns:xlink="http://www.w3.org/1999/xlink" width="64" height="64"><defs><style type="text/css"></style></defs><path d="M513 583.8l448.5-448.5c-11.6-4.7-24.3-7.3-37.5-7.3L100 128c-12.7 0-24.9 2.4-36.1 6.7L513 583.8z" p-id="9121"></path><path d="M513 674.3 14.6 175.9C5.3 191.1 0 208.9 0 228l0 568c0 55.2 44.8 100 100 100l824 0c55.2 0 100-44.8 100-100l0-568c0-18.5-5.1-35.9-13.9-50.8L513 674.3z" p-id="9122"></path></svg> |
@@ -0,0 +1 @@ | |||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1503993937334" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="8099" xmlns:xlink="http://www.w3.org/1999/xlink" width="64" height="64"><defs><style type="text/css"></style></defs><path d="M960 256v64H64v-64c0-35.2 28.8-64 64-64h768c35.2 0 64 28.8 64 64z m0 128v384c0 35.2-28.8 64-64 64H128c-35.2 0-64-28.8-64-64V384h896zM256 640H128v32h128v-32z m128-64H128v32h256v-32z" p-id="8100"></path></svg> |
@@ -0,0 +1,13 @@ | |||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | |||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> | |||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="18px" height="18px" viewBox="0 0 18 18" enable-background="new 0 0 18 18" xml:space="preserve"> <image id="image0" width="18" height="18" x="0" y="0" | |||||
xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAQAAAD8x0bcAAAABGdBTUEAALGPC/xhBQAAACBjSFJN | |||||
AAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAAmJLR0QA/4ePzL8AAAAHdElN | |||||
RQfiBAkKJwdW5ltzAAAAwElEQVQoz4WQy5HCMBQEGxcBKASF4Ax2r3AiBDKBTCgiIISFCCAD+0CZ | |||||
I2TQHCwvlvj1O2k0Ne+D/FdwZWNP48ow/DwstVdzGmNuCilj58Jfl+n1l5uWY1GMKS2KVPT8ALBl | |||||
oOUEQASYJvFAC+x5EAG4AaPB89qk0Yvtni26eGcKHlW9Wj/faaidqsfhRq9MdUoJY7UipwZgn7ZK | |||||
TAtTyxo45OJEvlO2m9HRMSvUYvBO1S5Xq5f5k89Jcy+enefqHTgeCKOO85ObAAAAJXRFWHRkYXRl | |||||
OmNyZWF0ZQAyMDE4LTA0LTA5VDEwOjM5OjA3KzA4OjAwD8LALwAAACV0RVh0ZGF0ZTptb2RpZnkA | |||||
MjAxOC0wNC0wOVQxMDozOTowNyswODowMH6feJMAAAAZdEVYdFNvZnR3YXJlAEFkb2JlIEltYWdl | |||||
UmVhZHlxyWU8AAAAAElFTkSuQmCC" /> | |||||
</svg> |
@@ -0,0 +1 @@ | |||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1504000178424" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="14764" xmlns:xlink="http://www.w3.org/1999/xlink" width="64" height="64"><defs><style type="text/css"></style></defs><path d="M871.424 61.44q18.432 0 34.816 6.656t28.672 18.944 19.456 28.672 7.168 35.84l0 720.896q0 38.912-25.088 64.512t-62.976 25.6l-721.92 0q-40.96 0-66.048-26.624t-25.088-66.56l0-718.848q0-35.84 24.576-62.464t65.536-26.624l720.896 0zM633.856 829.44q18.432 0 26.624-8.704t8.192-23.04q0-13.312-8.192-22.528t-26.624-9.216l-62.464 0q1.024-2.048 1.024-6.144l0-507.904 63.488 0q18.432 0 25.6-9.216t7.168-22.528-7.168-22.528-25.6-9.216l-249.856 0q-18.432 0-25.6 9.216t-7.168 22.528 7.168 22.528 25.6 9.216l57.344 0 0 507.904q0 2.048 0.512 3.072t0.512 3.072l-56.32 0q-18.432 0-26.624 9.216t-8.192 22.528q0 14.336 8.192 23.04t26.624 8.704l245.76 0z" p-id="14765"></path></svg> |
@@ -0,0 +1,14 @@ | |||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | |||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> | |||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="18px" height="18px" viewBox="0 0 18 18" enable-background="new 0 0 18 18" xml:space="preserve"> <image id="image0" width="18" height="18" x="0" y="0" | |||||
xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAQAAAD8x0bcAAAABGdBTUEAALGPC/xhBQAAACBjSFJN | |||||
AAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAAmJLR0QA/4ePzL8AAAAHdElN | |||||
RQfiBAkKIAJpzTk7AAAA+UlEQVQoz63QIUtDURjG8d+9U8aCLFhkE3RNMM22alizCIJtfoBZtRgH | |||||
+wAOhhbTksFgNJiWBMEgKwaLYrEoziDjGC4b926z+T/lvM95eN/3PILMKYd+6IfVIAhLYRAGYT+I | |||||
pSk4V1FxpoBIUVFexpTTVQVVXTkjo+QhbWqpT+51LV9OkmJhIjc1MqMbXnSUIQqJtOtUJEtw6Mqa | |||||
58S07cKiWX4cuE06bblUMJ9ve+6jsO7asr95txOFG5tgJDezU7LlY6wEOt5menzqgFLs2FBPe+6o | |||||
tp6ho3EE3CWZpPiwMR3m+NOvWJFPi/GU6UlNzUNWnDbN5f9Mv5+HRT+/OFiyAAAAJXRFWHRkYXRl | |||||
OmNyZWF0ZQAyMDE4LTA0LTA5VDEwOjMyOjAyKzA4OjAwpRoUfwAAACV0RVh0ZGF0ZTptb2RpZnkA | |||||
MjAxOC0wNC0wOVQxMDozMjowMiswODowMNRHrMMAAAAZdEVYdFNvZnR3YXJlAEFkb2JlIEltYWdl | |||||
UmVhZHlxyWU8AAAAAElFTkSuQmCC" /> | |||||
</svg> |
@@ -0,0 +1 @@ | |||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1516948182993" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="672" xmlns:xlink="http://www.w3.org/1999/xlink" width="64" height="64"><defs><style type="text/css"></style></defs><path d="M983.9 312.7c-25.7-61-62.5-115.7-109.3-162.7-46.8-47-101.4-83.9-162.2-109.7C649.5 13.5 582.7 0 513.8 0c-68.9 0-135.7 13.5-198.6 40.3C254.4 66.1 199.8 103 153 150c-46.8 47-83.6 101.8-109.3 162.7C17.1 375.9 3.6 442.9 3.6 512c0 69.1 13.5 136.1 40.1 199.3C69.4 772.2 106.1 827 153 874c46.8 47 101.4 83.9 162.2 109.7 62.9 26.7 129.8 40.3 198.6 40.3 68.9 0 135.7-13.5 198.6-40.3C773.2 957.9 827.8 921 874.6 874c46.8-47 83.6-101.8 109.3-162.7 26.6-63.1 40.1-130.2 40.1-199.3C1024 442.9 1010.5 375.9 983.9 312.7zM958.9 480 807.1 480c-3.1-74.1-17-146.7-41.4-216.3 27.1-15.5 52.8-33.6 77-54.1C908.8 281.9 951.5 376.1 958.9 480zM545.8 65.1c12.2 0.9 24.2 2.2 36.1 4.1 42 49.7 76.4 104.8 102.5 163.4-43.9 18.3-90.6 29.6-138.6 33L545.8 65.1zM481.8 265.6c-48-3.5-94.7-14.7-138.6-33 26.1-58.6 60.5-113.7 102.5-163.4 11.9-1.8 23.9-3.2 36.1-4.1L481.8 265.6zM481.8 329.7 481.8 480 284.5 480c3-64.3 15-127.5 35.4-187.8C371.1 313.4 425.7 326.2 481.8 329.7zM481.8 544l0 150.3c-56.1 3.5-110.7 16.3-161.9 37.5-20.4-60.3-32.4-123.4-35.4-187.8L481.8 544zM481.8 758.4l0 200.4c-12.2-0.9-24.2-2.2-36.1-4.1-42-49.7-76.4-104.8-102.5-163.4C387.1 773.1 433.8 761.9 481.8 758.4zM545.8 758.4c48 3.5 94.7 14.7 138.6 33-26.1 58.6-60.5 113.7-102.5 163.4-11.9 1.8-23.9 3.2-36.1 4.1L545.8 758.4zM545.8 694.3 545.8 544 743 544c-3 64.3-15 127.5-35.4 187.8C656.5 710.6 601.9 697.8 545.8 694.3zM545.8 480 545.8 329.7c56.1-3.5 110.7-16.3 161.9-37.5C728 352.5 740 415.7 743 480L545.8 480zM796 165.2c-17.2 14.2-35.4 27-54.3 38.4C725 166.6 705.4 131.2 683 97.5 724.1 114.4 762.1 137.4 796 165.2zM344.6 97.5c-22.4 33.7-42 69.2-58.6 106.1-18.9-11.4-37-24.2-54.3-38.4C265.5 137.4 303.5 114.4 344.6 97.5zM184.9 209.5c24.1 20.5 49.9 38.6 77 54.1-24.4 69.6-38.3 142.2-41.4 216.3L68.7 479.9C76.1 376.1 118.8 281.9 184.9 209.5zM68.7 544l151.8 0c3.1 74.1 17 146.7 41.4 216.3-27.1 15.5-52.8 33.6-77 54.1C118.8 742.1 76.1 647.9 68.7 544zM231.6 858.8c17.2-14.2 35.4-27 54.3-38.4 16.7 36.9 36.2 72.4 58.6 106.1C303.5 909.6 265.5 886.6 231.6 858.8zM683 926.5c22.4-33.7 42-69.2 58.6-106.1 18.9 11.4 37.1 24.2 54.3 38.4C762.1 886.6 724.1 909.6 683 926.5zM842.7 814.4c-24.2-20.5-49.9-38.6-77-54.1 24.4-69.6 38.3-142.2 41.4-216.3l151.8 0C951.5 647.9 908.8 742.1 842.7 814.4z" p-id="673"></path></svg> |
@@ -0,0 +1 @@ | |||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1503994678729" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="9229" xmlns:xlink="http://www.w3.org/1999/xlink" width="64" height="64"><defs><style type="text/css"></style></defs><path d="M780.8 354.579692 665.6 354.579692 665.6 311.689846c0-72.310154-19.849846-193.299692-153.6-193.299692-138.870154 0-153.6 135.049846-153.6 193.299692l0 42.889846L243.2 354.579692 243.2 311.689846C243.2 122.249846 348.790154 0 512 0s268.8 122.249846 268.8 311.689846L780.8 354.579692zM588.8 669.420308C588.8 625.900308 554.220308 590.769231 512 590.769231s-76.8 35.131077-76.8 78.651077c0 29.459692 15.399385 54.468923 38.439385 67.820308l0 89.639385c0 21.740308 17.250462 39.699692 38.4 39.699692s38.4-17.959385 38.4-39.699692l0-89.639385C573.44 723.889231 588.8 698.88 588.8 669.420308zM896 512l0 393.609846c0 65.260308-51.869538 118.390154-115.2 118.390154L243.2 1024c-63.291077 0-115.2-53.129846-115.2-118.390154L128 512c0-65.220923 51.869538-118.390154 115.2-118.390154l537.6 0C844.130462 393.609846 896 446.779077 896 512z" p-id="9230"></path></svg> |