Commit bf8b905e by leic

页面优化

1 parent eada8a3e
Showing with 3812 additions and 557 deletions
......@@ -7,7 +7,8 @@
],
"plugins": ["transform-runtime", ["component", [
{
"libraryName": "element-ui"
"libraryName": "element-ui",
"styleLibraryName": "theme-chalk"
}
]]],
"env": {
......
......@@ -98,7 +98,7 @@ module.exports = {
// 引入外部库, 无需webpack打包处理
externals: {
mockjs: 'Mock',
echarts: 'echarts',
// echarts: 'echarts',
ueditor: 'UE'
}
}
'use strict'
const path = require('path')
const utils = require('./utils')
const webpack = require('webpack')
const config = require('../config')
const merge = require('webpack-merge')
const baseWebpackConfig = require('./webpack.base.conf')
const CopyWebpackPlugin = require('copy-webpack-plugin')
const HtmlWebpackPlugin = require('html-webpack-plugin')
const ExtractTextPlugin = require('extract-text-webpack-plugin')
const OptimizeCSSPlugin = require('optimize-css-assets-webpack-plugin')
const UglifyJsPlugin = require('uglifyjs-webpack-plugin')
"use strict";
const path = require("path");
const utils = require("./utils");
const webpack = require("webpack");
const config = require("../config");
const merge = require("webpack-merge");
const baseWebpackConfig = require("./webpack.base.conf");
const CopyWebpackPlugin = require("copy-webpack-plugin");
const HtmlWebpackPlugin = require("html-webpack-plugin");
const ExtractTextPlugin = require("extract-text-webpack-plugin");
const OptimizeCSSPlugin = require("optimize-css-assets-webpack-plugin");
const UglifyJsPlugin = require("uglifyjs-webpack-plugin");
const env = process.env.NODE_ENV === 'testing'
? require('../config/test.env')
: require('../config/prod.env')
const env =
process.env.NODE_ENV === "testing"
? require("../config/test.env")
: require("../config/prod.env");
const webpackConfig = merge(baseWebpackConfig, {
module: {
rules: utils.styleLoaders({
sourceMap: config.build.productionSourceMap,
extract: true,
usePostCSS: true
})
},
devtool: config.build.productionSourceMap ? config.build.devtool : false,
output: {
path: config.build.assetsRoot,
filename: utils.assetsPath('js/[name].js'),
chunkFilename: utils.assetsPath('js/[id].js')
},
plugins: [
// http://vuejs.github.io/vue-loader/en/workflow/production.html
new webpack.DefinePlugin({
'process.env': env
}),
new UglifyJsPlugin({
uglifyOptions: {
compress: {
warnings: false
}
},
sourceMap: config.build.productionSourceMap,
parallel: true
}),
// extract css into its own file
new ExtractTextPlugin({
filename: utils.assetsPath('css/[name].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,
}),
// Compress extracted CSS. We are using this plugin so that possible
// duplicated CSS from different components can be deduped.
new OptimizeCSSPlugin({
cssProcessorOptions: config.build.productionSourceMap
? { safe: true, map: { inline: false } }
: { safe: true }
}),
// generate dist index.html with correct asset hash for caching.
// you can customize output by editing /index.html
// see https://github.com/ampedandwired/html-webpack-plugin
new HtmlWebpackPlugin({
filename: process.env.NODE_ENV === 'testing'
? 'index.html'
: config.build.index,
template: 'index.html',
inject: false,
minify: {
removeComments: true,
collapseWhitespace: true,
removeAttributeQuotes: true
// more options:
// https://github.com/kangax/html-minifier#options-quick-reference
},
// necessary to consistently work with multiple chunks via CommonsChunkPlugin
chunksSortMode: 'dependency'
}),
// keep module.id stable when vender modules does not change
new webpack.HashedModuleIdsPlugin(),
// enable scope hoisting
new webpack.optimize.ModuleConcatenationPlugin(),
// split vendor js into its own file
new webpack.optimize.CommonsChunkPlugin({
name: 'vendor',
minChunks (module) {
// any required modules inside node_modules are extracted to vendor
return (
module.resource &&
/\.js$/.test(module.resource) &&
module.resource.indexOf(
path.join(__dirname, '../node_modules')
) === 0
)
}
}),
// extract webpack runtime and module manifest to its own file in order to
// prevent vendor hash from being updated whenever app bundle is updated
new webpack.optimize.CommonsChunkPlugin({
name: 'manifest',
minChunks: Infinity
}),
// This instance extracts shared chunks from code splitted chunks and bundles them
// in a separate chunk, similar to the vendor chunk
// see: https://webpack.js.org/plugins/commons-chunk-plugin/#extra-async-commons-chunk
new webpack.optimize.CommonsChunkPlugin({
name: 'app',
async: 'vendor-async',
children: true,
minChunks: 3
}),
module: {
rules: utils.styleLoaders({
sourceMap: config.build.productionSourceMap,
extract: true,
usePostCSS: true
})
},
devtool: config.build.productionSourceMap ? config.build.devtool : false,
output: {
path: config.build.assetsRoot,
filename: utils.assetsPath("js/[name].js"),
chunkFilename: utils.assetsPath("js/[name].[chunkhash].js")
},
plugins: [
// http://vuejs.github.io/vue-loader/en/workflow/production.html
new webpack.DefinePlugin({
"process.env": env
}),
new UglifyJsPlugin({
uglifyOptions: {
compress: {
warnings: false,
drop_debugger: true,
drop_console: false //(true)关闭log
}
},
sourceMap: config.build.productionSourceMap,
parallel: true
}),
// extract css into its own file
new ExtractTextPlugin({
filename: utils.assetsPath("css/[name].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
}),
// Compress extracted CSS. We are using this plugin so that possible
// duplicated CSS from different components can be deduped.
new OptimizeCSSPlugin({
cssProcessorOptions: config.build.productionSourceMap
? { safe: true, map: { inline: false } }
: { safe: true }
}),
// generate dist index.html with correct asset hash for caching.
// you can customize output by editing /index.html
// see https://github.com/ampedandwired/html-webpack-plugin
new HtmlWebpackPlugin({
filename:
process.env.NODE_ENV === "testing"
? "index.html"
: config.build.index,
template: "index.html",
inject: false,
minify: {
removeComments: true,
collapseWhitespace: true,
removeAttributeQuotes: true
// more options:
// https://github.com/kangax/html-minifier#options-quick-reference
},
// necessary to consistently work with multiple chunks via CommonsChunkPlugin
chunksSortMode: "dependency"
}),
// keep module.id stable when vender modules does not change
new webpack.HashedModuleIdsPlugin(),
// enable scope hoisting
new webpack.optimize.ModuleConcatenationPlugin(),
// split vendor js into its own file
new webpack.optimize.CommonsChunkPlugin({
name: "vendor",
minChunks(module) {
// any required modules inside node_modules are extracted to vendor
return (
module.resource &&
/\.js$/.test(module.resource) &&
module.resource.indexOf(
path.join(__dirname, "../node_modules")
) === 0
);
}
}),
// extract webpack runtime and module manifest to its own file in order to
// prevent vendor hash from being updated whenever app bundle is updated
new webpack.optimize.CommonsChunkPlugin({
name: "manifest",
minChunks: Infinity
}),
// This instance extracts shared chunks from code splitted chunks and bundles them
// in a separate chunk, similar to the vendor chunk
// see: https://webpack.js.org/plugins/commons-chunk-plugin/#extra-async-commons-chunk
new webpack.optimize.CommonsChunkPlugin({
name: "app",
async: "vendor-async",
children: true,
minChunks: 3
}),
// copy custom static assets
new CopyWebpackPlugin([
{
from: path.resolve(__dirname, '../static'),
to: config.build.assetsSubDirectory,
ignore: ['.*']
}
])
]
})
// copy custom static assets
new CopyWebpackPlugin([
{
from: path.resolve(__dirname, "../static"),
to: config.build.assetsSubDirectory,
ignore: [".*"]
}
])
]
});
if (config.build.productionGzip) {
const CompressionWebpackPlugin = require('compression-webpack-plugin')
const CompressionWebpackPlugin = require("compression-webpack-plugin");
webpackConfig.plugins.push(
new CompressionWebpackPlugin({
asset: '[path].gz[query]',
algorithm: 'gzip',
test: new RegExp(
'\\.(' +
config.build.productionGzipExtensions.join('|') +
')$'
),
threshold: 10240,
minRatio: 0.8
})
)
webpackConfig.plugins.push(
new CompressionWebpackPlugin({
asset: "[path].gz[query]",
algorithm: "gzip",
test: new RegExp(
"\\.(" + config.build.productionGzipExtensions.join("|") + ")$"
),
threshold: 10240,
minRatio: 0.8
})
);
}
if (config.build.bundleAnalyzerReport) {
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin
webpackConfig.plugins.push(new BundleAnalyzerPlugin({ analyzerMode: 'static' }))
const BundleAnalyzerPlugin = require("webpack-bundle-analyzer")
.BundleAnalyzerPlugin;
webpackConfig.plugins.push(
new BundleAnalyzerPlugin({ analyzerMode: "static" })
);
}
module.exports = webpackConfig
module.exports = webpackConfig;
'use strict'
"use strict";
// Template version: 1.2.5
// see http://vuejs-templates.github.io/webpack for documentation.
const path = require('path')
const devEnv = require('./dev.env')
const path = require("path");
const devEnv = require("./dev.env");
module.exports = {
dev: {
dev: {
// Paths
assetsSubDirectory: "static",
assetsPublicPath: "/",
// 代理列表, 是否开启代理通过[./dev.env.js]配置
proxyTable:
devEnv.OPEN_PROXY === false
? {}
: {
"/proxyApi": {
target: "http://1.12.76.77:8181/sqx_fast/",
// target: 'https://admin.sj088.cn/sqx_fast/',
changeOrigin: true,
logLevel: "debug",
pathRewrite: {
"^/proxyApi": ""
}
},
"/ldyApi": {
target: "http://api.kuaidi.ledianyun.com/",
changeOrigin: true,
logLevel: "debug",
pathRewrite: {
"^/ldyApi": ""
}
},
"/api": {
target: "http://v2.api.haodanku.com/",
changeOrigin: true,
pathRewrite: {
"^/api": ""
}
}
},
// Paths
assetsSubDirectory: 'static',
assetsPublicPath: '/',
// 代理列表, 是否开启代理通过[./dev.env.js]配置
proxyTable: devEnv.OPEN_PROXY === false ? {} : {
'/proxyApi': {
target: 'http://1.12.76.77:8181/sqx_fast/',
// target: 'https://admin.sj088.cn/sqx_fast/',
changeOrigin: true,
logLevel: 'debug',
pathRewrite: {
'^/proxyApi': ''
}
},
'/api': {
target: 'http://v2.api.haodanku.com/',
changeOrigin: true,
pathRewrite: {
'^/api': ''
}
},
},
// Various Dev Server settings
host: "127.0.0.1", // can be overwritten by process.env.HOST
port: 8001, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
autoOpenBrowser: true,
errorOverlay: true,
notifyOnErrors: true,
poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions-
// Various Dev Server settings
host: '127.0.0.1', // can be overwritten by process.env.HOST
port: 8001, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
autoOpenBrowser: true,
errorOverlay: true,
notifyOnErrors: true,
poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions-
// Use Eslint Loader?
// If true, your code will be linted during bundling and
// linting errors and warnings will be shown in the console.
useEslint: true,
// If true, eslint errors and warnings will also be shown in the error overlay
// in the browser.
showEslintErrorsInOverlay: false,
// Use Eslint Loader?
// If true, your code will be linted during bundling and
// linting errors and warnings will be shown in the console.
useEslint: true,
// If true, eslint errors and warnings will also be shown in the error overlay
// in the browser.
showEslintErrorsInOverlay: false,
/**
* Source Maps
*/
/**
* Source Maps
*/
// https://webpack.js.org/configuration/devtool/#development
devtool: "eval-source-map",
// 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,
// 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
},
// 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: {
// Template for index.html
index: path.resolve(__dirname, "../dist/index.html"),
build: {
// Template for index.html
index: path.resolve(__dirname, '../dist/index.html'),
// Paths
assetsRoot: path.resolve(__dirname, "../dist"),
assetsSubDirectory: "static",
assetsPublicPath: "./",
// Paths
assetsRoot: path.resolve(__dirname, '../dist'),
assetsSubDirectory: 'static',
assetsPublicPath: './',
/**
* Source Maps
*/
/**
* Source Maps
*/
productionSourceMap: false,
// https://webpack.js.org/configuration/devtool/#production
devtool: "#source-map",
productionSourceMap: false,
// https://webpack.js.org/configuration/devtool/#production
devtool: '#source-map',
// Gzip off by default as many popular static hosts such as
// Surge or Netlify already gzip all static assets for you.
// Before setting to `true`, make sure to:
// npm install --save-dev compression-webpack-plugin
productionGzip: false,
productionGzipExtensions: ["js", "css"],
// Gzip off by default as many popular static hosts such as
// Surge or Netlify already gzip all static assets for you.
// Before setting to `true`, make sure to:
// npm install --save-dev compression-webpack-plugin
productionGzip: false,
productionGzipExtensions: ['js', 'css'],
// Run the build command with an extra argument to
// View the bundle analyzer report after build finishes:
// `npm run build --report`
// Set to `true` or `false` to always turn it on or off
bundleAnalyzerReport: process.env.npm_config_report
}
}
// Run the build command with an extra argument to
// View the bundle analyzer report after build finishes:
// `npm run build --report`
// Set to `true` or `false` to always turn it on or off
bundleAnalyzerReport: process.env.npm_config_report
}
};
......@@ -82,5 +82,17 @@ gulp.task('themetask', function () {
.pipe(cleanCSS())
.pipe(gulp.dest('./src/assets/theme/theme_3E8EF7'));// 生成的css文件存放的目录
return merge(theme_0BB2D4, theme_3E8EF7);
//主题3
var theme_11C26D = gulp.src(path.resolve('./src/element-ui-theme/element-#11C26D/index.css')) // 需要添加类名的css文件,支持正则表达式
.pipe(cssWrap({ selector: '.theme_11C26D' })) // 添加的类名
.pipe(cleanCSS())
.pipe(gulp.dest('./src/assets/theme/theme_11C26D'));// 生成的css文件存放的目录
//主题4
var theme_9463F7 = gulp.src(path.resolve('./src/element-ui-theme/element-#9463F7/index.css')) // 需要添加类名的css文件,支持正则表达式
.pipe(cssWrap({ selector: '.theme_9463F7' })) // 添加的类名
.pipe(cleanCSS())
.pipe(gulp.dest('./src/assets/theme/theme_9463F7'));// 生成的css文件存放的目录
return merge(theme_0BB2D4, theme_3E8EF7, theme_11C26D, theme_9463F7);
})
......@@ -13,7 +13,6 @@
<link rel="shortcut icon" type="image/x-icon" href="./static/img/favicon.ico">
<script src="./static/config/index.js"></script>
<script src="./static/plugins/mock-1.0.0-beta3/mock-min.js"></script>
<script src="./static/plugins/echarts-3.8.5/echarts.common.min.js"></script>
<script src="./static/plugins/ueditor-1.4.3.3/ueditor.config.js"></script>
<script src="./static/plugins/ueditor-1.4.3.3/ueditor.all.min.js"></script>
<script src="./static/plugins/ueditor-1.4.3.3/lang/zh-cn/zh-cn.js"></script>
......@@ -25,7 +24,6 @@
<link rel="shortcut icon" type="image/x-icon" href="./static/img/favicon.ico">
<script src="./static/config/index.js"></script>
<script src="./static/plugins/mock-1.0.0-beta3/mock-min.js"></script>
<script src="./static/plugins/echarts-3.8.5/echarts.common.min.js"></script>
<script src="./static/plugins/ueditor-1.4.3.3/ueditor.config.js"></script>
<script src="./static/plugins/ueditor-1.4.3.3/ueditor.all.min.js"></script>
<script src="./static/plugins/ueditor-1.4.3.3/lang/zh-cn/zh-cn.js"></script>
......@@ -38,6 +36,12 @@
const mainHost = isDev ? 'kuaidi.ledianyun.com' : document.domain.substring(document.domain.indexOf('.') + 1);
// const mainHost = location.hostname.substring(location.hostname.indexOf('.') + 1);
const configUrl = 'https://api.ledianyun.com/tool/config/detail?k=' + mainHost + '&appid=lestore&showWay=jsonp&type=lestore_webpc&env=dev';
// var script = document.createElement('script');
// script.type = 'text/javascript';
// script.async == false;
// script.src = configUrl;
// var root = document.getElementsByTagName('script')[0];
// root.parentNode.insertBefore(script, root);
document.write('<script src="' + configUrl + '"><\/script>');
</script>
</head>
......
......@@ -384,7 +384,7 @@
},
"array-slice": {
"version": "1.1.0",
"resolved": "https://registry.npmmirror.com/array-slice/-/array-slice-1.1.0.tgz",
"resolved": "https://registry.npmjs.org/array-slice/-/array-slice-1.1.0.tgz",
"integrity": "sha512-B1qMD3RBP7O8o0H2KbrXDyB0IccejMF15+87Lvlor12ONPRHP6gTjXMNkt/d3ZuOGbAe66hFmaCfECI24Ufp6w==",
"dev": true
},
......@@ -537,8 +537,8 @@
},
"async-validator": {
"version": "1.8.5",
"resolved": "https://registry.npm.taobao.org/async-validator/download/async-validator-1.8.5.tgz?cache=0&sync_timestamp=1605751798748&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fasync-validator%2Fdownload%2Fasync-validator-1.8.5.tgz",
"integrity": "sha1-3D4I7B/Q3dtn5ghC8CwM0c7G1/A=",
"resolved": "https://registry.npmmirror.com/async-validator/-/async-validator-1.8.5.tgz",
"integrity": "sha512-tXBM+1m056MAX0E8TL2iCjg8WvSyXu0Zc8LNtYqrVeyoL3+esHRZ4SieE9fKQyyU09uONjnMEjrNBMqT0mbvmA==",
"requires": {
"babel-runtime": "6.x"
}
......@@ -3271,6 +3271,11 @@
"randomfill": "^1.0.3"
}
},
"crypto-js": {
"version": "3.1.9-1",
"resolved": "https://registry.npmmirror.com/crypto-js/-/crypto-js-3.1.9-1.tgz",
"integrity": "sha512-W93aKztssqf29OvUlqfikzGyYbD1rpkXvGP9IQ1JchLY3bxaLXZSWYbwrtib2vk8DobrDzX7PIXcDWHp0B6Ymw=="
},
"css": {
"version": "2.2.4",
"resolved": "https://registry.npmmirror.com/css/-/css-2.2.4.tgz",
......@@ -3594,8 +3599,8 @@
},
"deepmerge": {
"version": "1.5.2",
"resolved": "https://registry.npm.taobao.org/deepmerge/download/deepmerge-1.5.2.tgz",
"integrity": "sha1-EEmdhohEza1P7ghC34x/bwyVp1M="
"resolved": "https://registry.npmmirror.com/deepmerge/-/deepmerge-1.5.2.tgz",
"integrity": "sha512-95k0GDqvBjZavkuvzx/YqVLv/6YYa17fz6ILMSf7neqQITCPbnfEnQvEgMPNjH4kgobe7+WIL0yJEHku+H3qtQ=="
},
"default-require-extensions": {
"version": "1.0.0",
......@@ -4065,9 +4070,9 @@
}
},
"element-ui": {
"version": "2.8.2",
"resolved": "https://registry.npm.taobao.org/element-ui/download/element-ui-2.8.2.tgz",
"integrity": "sha1-Iaeky5Jhaw+LddTU5jfToc2MCd4=",
"version": "2.15.13",
"resolved": "https://registry.npmmirror.com/element-ui/-/element-ui-2.15.13.tgz",
"integrity": "sha512-LJoatEYX6WV74FqXBss8Xfho9fh9rjDSzrDrTyREdGb1h1R3uRvmLh5jqp2JU137aj4/BgqA3K06RQpQBX33Bg==",
"requires": {
"async-validator": "~1.8.1",
"babel-helper-vue-jsx-merge-props": "^2.0.0",
......@@ -5407,7 +5412,7 @@
},
"fined": {
"version": "1.2.0",
"resolved": "https://registry.npmmirror.com/fined/-/fined-1.2.0.tgz",
"resolved": "https://registry.npmjs.org/fined/-/fined-1.2.0.tgz",
"integrity": "sha512-ZYDqPLGxDkDhDZBjZBb+oD1+j0rA4E0pXY50eplAAOPg2N/gUBSSk5IM1/QhPfyVo19lJ+CvXpqfvk+b2p/8Ng==",
"dev": true,
"requires": {
......@@ -5426,7 +5431,7 @@
},
"flagged-respawn": {
"version": "1.0.1",
"resolved": "https://registry.npmmirror.com/flagged-respawn/-/flagged-respawn-1.0.1.tgz",
"resolved": "https://registry.npmjs.org/flagged-respawn/-/flagged-respawn-1.0.1.tgz",
"integrity": "sha512-lNaHNVymajmk0OJMBn8fVUAU1BtDeKIqKoVhk4xAALB57aALg6b4W0MfJ/cUE0g9YBXy5XhSlPIpYIJ7HaY/3Q==",
"dev": true
},
......@@ -5987,7 +5992,7 @@
},
"global-modules": {
"version": "1.0.0",
"resolved": "https://registry.npmmirror.com/global-modules/-/global-modules-1.0.0.tgz",
"resolved": "https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz",
"integrity": "sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==",
"dev": true,
"requires": {
......@@ -7405,7 +7410,7 @@
},
"is-absolute": {
"version": "1.0.0",
"resolved": "https://registry.npmmirror.com/is-absolute/-/is-absolute-1.0.0.tgz",
"resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-1.0.0.tgz",
"integrity": "sha512-dOWoqflvcydARa360Gvv18DZ/gRuHKi2NU/wU5X1ZFzdYfH29nkiNZsF3mp4OJ3H4yo9Mx8A/uAGNzpzPN3yBA==",
"dev": true,
"requires": {
......@@ -7699,7 +7704,7 @@
},
"is-relative": {
"version": "1.0.0",
"resolved": "https://registry.npmmirror.com/is-relative/-/is-relative-1.0.0.tgz",
"resolved": "https://registry.npmjs.org/is-relative/-/is-relative-1.0.0.tgz",
"integrity": "sha512-Kw/ReK0iqwKeu0MITLFuj0jbPAmEiOsIwyIXvvbfa6QfmN9pkD1M+8pdk7Rl/dTKbH34/XBFMbgD4iMJhLQbGA==",
"dev": true,
"requires": {
......@@ -7750,7 +7755,7 @@
},
"is-unc-path": {
"version": "1.0.0",
"resolved": "https://registry.npmmirror.com/is-unc-path/-/is-unc-path-1.0.0.tgz",
"resolved": "https://registry.npmjs.org/is-unc-path/-/is-unc-path-1.0.0.tgz",
"integrity": "sha512-mrGpVd0fs7WWLfVsStvgF6iEJnbjDFZh9/emhRDcGWTduTfNHd9CHeUwH3gYIjdbwo4On6hunkztwOaAw0yllQ==",
"dev": true,
"requires": {
......@@ -9464,7 +9469,7 @@
},
"make-iterator": {
"version": "1.0.1",
"resolved": "https://registry.npmmirror.com/make-iterator/-/make-iterator-1.0.1.tgz",
"resolved": "https://registry.npmjs.org/make-iterator/-/make-iterator-1.0.1.tgz",
"integrity": "sha512-pxiuXh0iVEq7VM7KMIhs5gxsfxCux2URptUQaXo4iZZJxBAzTPOLE2BumO5dbfVYq/hBJFBR/a1mFDmOx5AGmw==",
"dev": true,
"requires": {
......@@ -9939,6 +9944,11 @@
}
}
},
"moment": {
"version": "2.29.4",
"resolved": "https://registry.npmmirror.com/moment/-/moment-2.29.4.tgz",
"integrity": "sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w=="
},
"move-concurrently": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/move-concurrently/-/move-concurrently-1.0.1.tgz",
......@@ -10464,8 +10474,8 @@
},
"normalize-wheel": {
"version": "1.0.1",
"resolved": "https://registry.npm.taobao.org/normalize-wheel/download/normalize-wheel-1.0.1.tgz",
"integrity": "sha1-rsiGr/2wRQcNhWRH32Ls+GFG7EU="
"resolved": "https://registry.npmmirror.com/normalize-wheel/-/normalize-wheel-1.0.1.tgz",
"integrity": "sha512-1OnlAPZ3zgrk8B91HyRj+eVv+kS5u+Z0SCsak6Xil/kmgEia50ga7zfkumayonZrImffAxPU/5WcyGhzetHNPA=="
},
"npm": {
"version": "6.14.11",
......@@ -16089,8 +16099,8 @@
},
"resize-observer-polyfill": {
"version": "1.5.1",
"resolved": "https://registry.npm.taobao.org/resize-observer-polyfill/download/resize-observer-polyfill-1.5.1.tgz",
"integrity": "sha1-DpAg3T0hAkRY1OvSfiPkAmmBBGQ="
"resolved": "https://registry.npmmirror.com/resize-observer-polyfill/-/resize-observer-polyfill-1.5.1.tgz",
"integrity": "sha512-LwZrotdHOo12nQuZlHEmtuXdqGoOD0OhaxopaNFxWzInpEgaLWoVuAMbTzixuosCx2nEG58ngzW3vxdWoxIgdg=="
},
"resolve": {
"version": "1.19.0",
......@@ -17273,7 +17283,7 @@
},
"stream-consume": {
"version": "0.1.1",
"resolved": "https://registry.npmmirror.com/stream-consume/-/stream-consume-0.1.1.tgz",
"resolved": "https://registry.npmjs.org/stream-consume/-/stream-consume-0.1.1.tgz",
"integrity": "sha512-tNa3hzgkjEP7XbCkbRXe1jpg+ievoa0O4SCFlMOYEscGSS4JJsckGL8swUyAa/ApGU3Ae4t6Honor4HhL+tRyg==",
"dev": true
},
......@@ -17843,8 +17853,8 @@
},
"throttle-debounce": {
"version": "1.1.0",
"resolved": "https://registry.npm.taobao.org/throttle-debounce/download/throttle-debounce-1.1.0.tgz?cache=0&sync_timestamp=1604315662384&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fthrottle-debounce%2Fdownload%2Fthrottle-debounce-1.1.0.tgz",
"integrity": "sha1-UYU9o3vmihVctugns1FKPEIuic0="
"resolved": "https://registry.npmmirror.com/throttle-debounce/-/throttle-debounce-1.1.0.tgz",
"integrity": "sha512-XH8UiPCQcWNuk2LYePibW/4qL97+ZQ1AN3FNXwZRBNPPowo/NRU5fAlDCSNBJIYCKbioZfuYtMhG4quqoJhVzg=="
},
"through": {
"version": "2.3.8",
......
......@@ -17,15 +17,17 @@
"axios": "^0.17.1",
"babel-plugin-component": "0.10.1",
"babel-polyfill": "6.26.0",
"crypto-js": "^3.1.9-1",
"echarts": "^5.4.0",
"element-china-area-data": "^5.0.2",
"element-ui": "2.8.2",
"element-ui": "^2.15.13",
"fs": "0.0.1-security",
"gulp-concat": "2.6.1",
"gulp-load-plugins": "1.5.0",
"gulp-replace": "0.6.1",
"gulp-shell": "0.6.5",
"lodash": "4.17.5",
"moment": "^2.29.4",
"npm": "^6.9.0",
"sass-loader": "6.0.6",
"svg-sprite-loader": "3.7.3",
......
......@@ -5,9 +5,13 @@
</template>
<script>
import { setCookie } from './utils/cookie';
import { initTheme } from './utils/theme';
export default {
created() {
// setCookie('token')
},
mounted() {
initTheme()
}
......
import $http from '@/utils/httpRequest.js'
import store from '@/store'
import {
getMallToken,
} from '@/utils/cookie'
export function paymentList(req_type, data) {
let params = {}
if (req_type === 'GET') {
let token = getMallToken();
const {
filter_time_type,
start_time,
end_time,
filter_amount_type,
amount_judge,
amount,
keyword,
status,
page,
page_size
} = data;
params.url = $http.adornLdyUrl(`payments/funds/lists/payment/export?token=${token}&filter_time_type=${filter_time_type}&start_time=${start_time}&end_time=${end_time}&filter_amount_type=${filter_amount_type}&amount_judge=${amount_judge}&amount=${amount}&keyword=${keyword}&status=${status}&page=${page}&page_size=${page_size}`);
params.method = 'get';
let url = process.env.NODE_ENV === 'development' ? store.state.designTestURL : store.state.designBaseURL;
return url + params.url;
}
if (req_type === 'POST') {
params.url = $http.adornLdyUrl('payments/funds/lists/payment');
params.method = 'post';
params.data = $http.adornData(data);
params.source = 'cm'
return $http(params);
}
}
// 充值记录
export function preChargeListAPI(data) {
return $http({
url: $http.adornUrl("expressageAccount/chargeRecordList"),
method: "post",
data: $http.adornData(data),
});
}
// 余额账户详情
export function preChargeSumDetailAPI(data) {
return $http({
url: $http.adornUrl("expressageAccount/detail"),
method: "post",
data: $http.adornData(data),
});
}
import axios from 'axios'
export default function getUpToken(key) {
let data = new FormData();
data.append('key', key);
return axios.get( 'https://api.ledianyun.com/api/get/qiniuUploadToken', data).then(res => res.data)
}
import $http from '@/utils/httpRequest.js'
//已开通渠道列表
export const getExpressageCompanySimpleAPI = () => {
return $http({
url: $http.adornUrl("expresssageCompany/getExpressageCompanySimple"),
method: "post",
data: $http.adornData(),
});
};
//异常订单
export const errorOrderSummaryAPI = () => {
return $http({
url: $http.adornUrl("expressage/errorOrderSummary"),
method: "post",
data: $http.adornData(),
});
};
import $http from '@/utils/httpRequest.js'
//获取体验者列表
const getTestUserList = () => {
return $http({
url: $http.adornLdyUrl("business/MallLiteManager/getTestUserList"),
method: "post",
data: $http.adornData(),
source: 'cm'
});
};
let addTestUser = function (data) {
return $http({
url: $http.adornLdyUrl("business/MallLiteManager/addTestUser"),
method: "post",
data: $http.adornData(data),
source: 'cm'
});
};
let deleteTestUser = function (data) {
return $http({
url: $http.adornLdyUrl("business/MallLiteManager/deleteTestUser"),
method: "post",
data: $http.adornData(data),
source: 'cm'
});
};
//获取授权链接
let toDoAuth = function (data) {
return $http({
url: $http.adornLdyUrl("business/MallLiteManager/toDoAuth"),
method: "post",
data: $http.adornData(data),
source: 'cm'
});
};
//上传代码
let upLoadCode = function (data) {
return $http({
url: $http.adornLdyUrl("business/MallLiteManager/upLoadCode"),
method: "post",
data: $http.adornData(data),
source: 'cm'
});
};
//提交审核
let submitAudi = function (data) {
return $http({
url: $http.adornLdyUrl("business/MallLiteManager/submitAudit"),
method: "post",
data: $http.adornData(data),
source: 'cm'
});
};
//查询审核状态
let saveLastestAuditStatus = function (data) {
return $http({
url: $http.adornLdyUrl("business/MallLiteManager/saveLastestAuditStatus"),
method: "post",
data: $http.adornData(data),
source: 'cm'
});
};
//发布审核代码
let releaseCode = function (data) {
return $http({
url: $http.adornLdyUrl("business/MallLiteManager/saveLastestAuditStatus"),
method: "post",
data: $http.adornData(data),
source: 'cm'
});
};
//重新授权
let refreshAuth = function (data) {
return $http({
url: $http.adornLdyUrl("business/MallLiteManager/refreshAuth"),
method: "post",
data: $http.adornData(data),
source: 'cm'
});
};
//取消授权
let deleteAuth = function (data) {
return $http({
url: $http.adornLdyUrl("business/MallLiteManager/deleteAuth"),
method: "post",
data: $http.adornData(data),
source: 'cm'
});
};
//取消授权
let baseInfo = function (data) {
return $http({
url: $http.adornLdyUrl("business/mall/baseInfo"),
method: "post",
data: $http.adornData(data),
source: 'cm'
});
};
//基础版伪授权
let basisAuth = function (data) {
return $http({
url: $http.adornLdyUrl("business/mall/basisAuth/auth"),
method: "post",
data: $http.adornData(data),
source: 'cm'
});
};
//获取基础版店铺信息
let getBasisAuth = function (data) {
return $http({
url: $http.adornLdyUrl("business/mall/basisAuth/get"),
method: "post",
data: $http.adornData(data),
source: 'cm'
});
};
//获取基础版店铺信息
let refresh = function (data) {
return $http({
url: $http.adornLdyUrl("business/mall/basisAuth/refresh"),
method: "post",
data: $http.adornData(data),
source: 'cm'
});
};
//获取基础版店铺信息
let getBaseInfo = function (data) {
return $http({
url: $http.adornLdyUrl("business/mall/baseInfo"),
method: "post",
data: $http.adornData(data),
source: 'cm'
});
};
//小程序信息获取类目
let mallLiteManagerCategory = function (data) {
return $http({
url: $http.adornLdyUrl("business/mallLiteManager/lite/category"),
method: "post",
data: $http.adornData(data),
source: 'cm'
});
};
//撤回小程序审核
let reviewWithdrawal = function (data) {
return $http({
url: $http.adornLdyUrl("business/mallLiteManager/reviewWithdrawal"),
method: "post",
data: $http.adornData(data),
source: 'cm'
});
};
//刷新小程序码
let refreshWxaCode = function (data) {
return $http({
url: $http.adornLdyUrl("business/mallLiteManager/saveQrcode"),
method: "post",
data: $http.adornData(data),
source: 'cm'
});
};
export {
getTestUserList,
addTestUser,
deleteTestUser,
toDoAuth,
upLoadCode,
submitAudi,
saveLastestAuditStatus,
releaseCode,
deleteAuth,
refreshAuth,
baseInfo,
basisAuth,
getBasisAuth,
refresh,
getBaseInfo,
mallLiteManagerCategory,
reviewWithdrawal,
refreshWxaCode
}
import $http from "@/utils/httpRequest";
export function branchAdd(data) {
return $http({
url: $http.adornLdyUrl("storemarketing/branch/add"),
method: "post",
data: $http.adornData(data),
});
}
export function branchList(data) {
return $http({
url: $http.adornLdyUrl("storemarketing/branch/list"),
method: "post",
data: $http.adornData(data),
});
}
export function branchDetail(data) {
return $http({
url: $http.adornLdyUrl("storemarketing/branch/detail"),
method: "post",
data: $http.adornData(data),
source: "test"
});
}
export function branchQrcode(data) {
return $http({
url: $http.adornLdyUrl("storemarketing/branch/qrcode"),
method: "post",
data: $http.adornData(data),
});
}
export function branchMyl(data) {
return $http({
url: $http.adornLdyUrl("storemarketing/branch/myl"),
method: "post",
data: $http.adornData(data),
});
}
export function branchSetting({ type, data }) {
return $http({
url: $http.adornLdyUrl("storemarketing/branch/setting/" + type),
method: "post",
data: $http.adornData(data),
});
}
export function branchDelete(data) {
return $http({
url: $http.adornLdyUrl("storemarketing/branch/handle/delete"),
method: "post",
data: $http.adornData(data),
});
}
export function branchAccount(data) {
return $http({
url: $http.adornLdyUrl("storemarketing/branch/account"),
method: "post",
data: $http.adornData(data),
});
}
export function branchStatus(data) {
return $http({
url: $http.adornLdyUrl("storemarketing/branch/handle/status"),
method: "post",
data: $http.adornData(data),
});
}
export function accountRelate(data) {
return $http({
url: $http.adornLdyUrl("storemarketing/branch/account/relate"),
method: "post",
data: $http.adornData(data),
});
}
export function accountDetail(data) {
return $http({
url: $http.adornLdyUrl("storemarketing/branch/account/detail"),
method: "post",
data: $http.adornData(data),
});
}
export function settingVerify(data) {
return $http({
url: $http.adornLdyUrl("storemarketing/branch/setting/verify"),
method: "post",
data: $http.adornData(data),
});
}
//判断是否需要商户号按钮
export function isNeedMerchantNumber(data) {
return $http({
url: $http.adornLdyUrl("payments/api/canConfig"),
method: "post",
data: $http.adornData(data),
source: "cm"
});
}
//设置商户号
export function setMerchantNumber(data) {
return $http({
url: $http.adornLdyUrl("payments/fupay/config"),
method: "post",
data: $http.adornData(data),
source: "cm"
});
}
//获取商户号信息
export function getMerchantNumber(data) {
return $http({
url: $http.adornLdyUrl("payments/fupay/config/info"),
method: "post",
data: $http.adornData(data),
source: "cm"
});
}
//配置商户/子商户基础支付通道
export function setMerchantPaystatus(data) {
return $http({
url: $http.adornLdyUrl("payments/api/baseConfig/save"),
method: "post",
data: $http.adornData(data),
source: "cm"
});
}
//获取商户/子商户基础支付通道信息
export function getMerchantPaystatus(data) {
return $http({
url: $http.adornLdyUrl("payments/api/baseConfig/get"),
method: "post",
data: $http.adornData(data),
source: "cm"
});
}
//网点联系方式编辑
export function branchContactEdit(data) {
return $http({
url: $http.adornLdyUrl("storemarketing/branchContact/updateContactPhone"),
method: "post",
data: $http.adornData(data),
});
}
//网点联系方式详情
export function branchContactDetail(data) {
return $http({
url: $http.adornLdyUrl("storemarketing/branchContact/detail"),
method: "post",
data: $http.adornData(data),
});
}
import $http from "@/utils/httpRequest.js";
export function conversationLists(data) {
return $http({
url: $http.adornLdyUrl("messages/Customer/conversationLists"),
method: "post",
data: $http.adornData(data),
source: "cm"
});
}
export function getNoticeList(data) {
return $http({
url: $http.adornLdyUrl("messages/notice/lists"),
method: "post",
data: $http.adornData(data),
source: "cm"
});
}
export function currentlists(data) {
return $http({
url: $http.adornLdyUrl("messages/notice/lists/current"),
method: "post",
data: $http.adornData(data),
source: "cm"
});
}
export function operationRead(data) {
return $http({
url: $http.adornLdyUrl("messages/notice/operation/read"),
method: "post",
data: $http.adornData(data),
source: "cm"
});
}
export function readAll(data) {
return $http({
url: $http.adornLdyUrl("messages/notice/readAll"),
method: "post",
data: $http.adornData(data),
source: "cm"
});
}
export function operationDelete(data) {
return $http({
url: $http.adornLdyUrl("messages/notice/operation/delete"),
method: "post",
data: $http.adornData(data),
source: "cm"
});
}
import $http from '@/utils/httpRequest.js'
//超重超轻列表
export function selectWeightErrorExpressageListAPI(data) {
return $http({
url: $http.adornUrl("expressage/selectWeightErrorExpressageList"),
method: "get",
params: $http.adornParams(data)
});
}
import $http from "@/utils/httpRequest.js";
//资金统计
export function fundStatistics(data) {
return $http({
url: $http.adornLdyUrl("funds/general/fundStatistics"),
method: "post",
data: $http.adornData(data),
source: "cm"
});
}
//余额充值
export function rechargeAPI(data) {
return $http({
url: $http.adornUrl("expressageAccount/doCharge"),
method: "post",
data: $http.adornData(data)
});
}
//余额充值详情
export function rechargeDetailAPI(data) {
return $http({
url: $http.adornUrl("expressageAccount/chargeRecordDetail"),
method: "get",
params: $http.adornParams(data)
});
}
//查询支付结果
export function inquireResult(data) {
return $http({
url: $http.adornLdyUrl("funds/recharge/result"),
method: "post",
data: $http.adornData(data),
source: "cm"
});
}
//商户基础信息
export function baseInfo(data) {
return $http({
url: $http.adornLdyUrl("payments/funds/basic"),
method: "post",
data: $http.adornData(data),
source: "cm"
});
}
//商户余额
export function getBalance(data) {
return $http({
url: $http.adornLdyUrl("payments/funds/balance"),
method: "post",
data: $http.adornData(data),
source: "cm"
});
}
//充值记录payments/funds/withdraw/fee
export function rechargeList(data) {
return $http({
url: $http.adornLdyUrl("funds/recharge/list"),
method: "post",
data: $http.adornData(data),
source: "cm"
});
}
//查询提现手续费
export function withdrawFee(data) {
return $http({
url: $http.adornLdyUrl("payments/funds/withdraw/fee"),
method: "post",
data: $http.adornData(data),
source: "cm"
});
}
//提现(资产中心的账户总览这里已经废弃)
export function withdraw(data) {
return $http({
url: $http.adornLdyUrl("payments/funds/withdraw"),
method: "post",
data: $http.adornData(data),
source: "cm"
});
}
//提现funds/recharge/total
export function withdrawList(data) {
return $http({
url: $http.adornLdyUrl("payments/funds/withdrawLists"),
method: "post",
data: $http.adornData(data),
source: "cm"
});
}
//累计充值
export function totalRecharge(data) {
return $http({
url: $http.adornLdyUrl("funds/recharge/total"),
method: "post",
data: $http.adornData(data),
source: "cm"
});
}
//---------------------
//账户可提现金额
export function getWithDrawBalanceAPI(data) {
return $http({
url: $http.adornLdyUrl("/funds/platform/get"),
method: "post",
data: $http.adornData(data),
source: "gt"
});
}
//账户总览模块提现接口
export function getWithDrawAPI(data) {
return $http({
url: $http.adornLdyUrl("/funds/Withdraw/run"),
method: "post",
data: $http.adornData(data),
source: "gt"
});
}
//充值记录(新)
export function rechargeListAPI(data) {
return $http({
url: $http.adornLdyUrl("funds/Recharge/rechargeRecords"),
method: "post",
data: $http.adornData(data),
source: "gt"
});
}
//提现记录(新)
export function withdrawListAPI(data) {
return $http({
url: $http.adornLdyUrl("/funds/Withdraw/Records"),
method: "post",
data: $http.adornData(data),
source: "gt"
});
}
//备用金提现记录
export function pettyCashRechargeList(data) {
return $http({
url: $http.adornLdyUrl("payments/transfer/amount/account/changeLists"),
method: "post",
data: $http.adornData(data),
source: "cm"
});
}
//使用记录
export function pettyCashRechargeList2(data) {
return $http({
url: $http.adornLdyUrl("/funds/Withdraw/logs"),
method: "post",
data: $http.adornData(data),
source: "gt"
});
}
//获取现金账户详情
export function cashAccountDetail(data) {
return $http({
url: $http.adornLdyUrl("payments/transfer/amount/account/details"),
method: "post",
data: $http.adornData(data),
source: "cm"
});
}
//提现备用金账户充值
export function pettyCashRecharge(data) {
return $http({
url: $http.adornLdyUrl("payments/transfer/amount/account/recharge"),
method: "post",
data: $http.adornData(data),
source: "cm"
});
}
//余额充值
export function pettyCashRechargeDetails(data) {
return $http({
url: $http.adornLdyUrl("payments/transfer/amount/account/recharge/details"),
method: "post",
data: $http.adornData(data),
source: "cm"
});
}
// 资源包列表
export function packageListAPI(data) {
return $http({
url: $http.adornLdyUrl("logistics/logisticsAccount/packageList"),
method: "post",
data: $http.adornData(data),
source: "cm"
});
}
// 资源包订购
export function doChargeAPI(data) {
return $http({
url: $http.adornLdyUrl("logistics/logisticsAccount/doCharge"),
method: "post",
data: $http.adornData(data),
source: "cm"
});
}
// 资源包订购记录
export function chargeRecordAPI(data) {
return $http({
url: $http.adornLdyUrl("logistics/logisticsAccount/chargeRecord"),
method: "post",
data: $http.adornData(data),
source: "cm"
});
}
// 充值记录详情
export function chargeDetailAPI(data) {
return $http({
url: $http.adornLdyUrl("logistics/logisticsAccount/detail"),
method: "post",
data: $http.adornData(data),
source: "cm"
});
}
//运营账号服务号授权
export function operateAccountAuth(data) {
return $http({
url: $http.adornLdyUrl("funds/recharge/official/authUrl"),
method: "post",
data: $http.adornData(data),
source: "gt"
});
}
//运营账户授权详情
export function operateAccountAuthDetail(data) {
return $http({
url: $http.adornLdyUrl("funds/recharge/official/authDetails"),
method: "post",
data: $http.adornData(data),
source: "gt"
});
}
//解除授权绑定(运营账户授权)
export function unBindOperateAccountAuth(data) {
return $http({
url: $http.adornLdyUrl("funds/recharge/official/authRelieve"),
method: "post",
data: $http.adornData(data),
source: "gt"
});
}
//判断是否为总公司账户(返回账户详情)
export function accountDetails(data) {
return $http({
url: $http.adornLdyUrl("funds/api/accountDetails"),
method: "post",
data: $http.adornData(data),
source: "gt"
});
}
//判断是否为代理站点
export function agentSiteStatusAPI(data) {
return $http({
url: $http.adornLdyUrl("funds/Platform/isPublic"),
method: "post",
data: $http.adornData(data),
source: "gt"
});
}
import $http from "@/utils/httpRequest.js";
//获取支付信息
export function getPayConfigs() {
return $http({
url: $http.adornLdyUrl("payments/api/getPayConfig"),
method: "post",
source: "cm"
});
}
//获取店铺唯一标识码
export function getIdentifier() {
return $http({
url: $http.adornLdyUrl("business/mall/identifier"),
method: "post",
source: "cm"
});
}
// 支付中心扩展设置
export function settingExtends() {
return $http({
url: $http.adornLdyUrl("payments/api/settingExtends"),
method: "post",
source: "cm"
});
}
// 银行分支行记录(联行号信息)
export function bankBranch(data) {
return $http({
url: $http.adornLdyUrl("payments/api/bankBranch"),
method: "post",
source: "cm",
data: $http.adornData(data),
});
}
// 商户报备(资质提交)
export function meepay(data) {
return $http({
url: $http.adornLdyUrl("payments/meepay/create"),
method: "post",
source: "cm",
data: $http.adornData(data),
});
}
//商户报备资料及状态查询
export function meepayDetails(data) {
return $http({
url: $http.adornLdyUrl("payments/meepay/details"),
method: "post",
source: "cm",
data: $http.adornData(data),
});
}
//获取基础支付配置
export function getBaseConfig(data) {
return $http({
url: $http.adornLdyUrl("payments/api/baseConfig/get"),
method: "post",
source: "cm",
data: $http.adornData(data),
});
}
export function saveBaseConfig(data) {
return $http({
url: $http.adornLdyUrl("payments/api/baseConfig/save"),
method: "post",
source: "cm",
data: $http.adornData(data),
});
}
//微信支付配置
export function wxpayConfigSave(data) {
return $http({
url: $http.adornLdyUrl("payments/wxpay/config/save"),
method: "post",
source: "cm",
data: $http.adornData(data),
headers: {
"Content-Type": "multipart/form-data"
}
});
}
//支付配置获取
export function wxpayConfigGet(data) {
return $http({
url: $http.adornLdyUrl("payments/wxpay/config"),
method: "post",
source: "cm",
data: $http.adornData(data),
});
}
export function fupayAreaLists(data) {
return $http({
url: $http.adornLdyUrl("payments/fupay/areaLists"),
method: "post",
source: "cm",
data: $http.adornData(data),
});
}
//行业类目
export function fyIndustryCategoryLists(data) {
return $http({
url: $http.adornLdyUrl("payments/fupay/industryCategoryLists"),
method: "post",
source: "cm",
data: $http.adornData(data),
});
}
export function fupayCheckName(data) {
return $http({
url: $http.adornLdyUrl("payments/fupay/checkName"),
method: "post",
source: "cm",
data: $http.adornData(data),
});
}
export function fybankBranchLists(data) {
return $http({
url: $http.adornLdyUrl("payments/fupay/bankBranchLists"),
method: "post",
source: "cm",
data: $http.adornData(data),
});
}
//富有支付创建
export function fupaySave(data) {
return $http({
url: $http.adornLdyUrl("payments/fupay/save"),
method: "post",
source: "cm",
data: $http.adornData(data),
});
}
export function fupayDetails(data) {
return $http({
url: $http.adornLdyUrl("payments/fupay/details"),
method: "post",
source: "cm",
data: $http.adornData(data),
});
}
//自有账户配置存储
export function cusAccountConfigSave(data) {
return $http({
url: $http.adornLdyUrl("payments/transfer/amount/config/save"),
method: "post",
source: "cm",
data: $http.adornData(data),
});
}
//自有账户配置详情
export function cusAccountConfigDetail(data) {
return $http({
url: $http.adornLdyUrl("payments/transfer/amount/config"),
method: "post",
source: "cm",
data: $http.adornData(data),
});
}
//账户类型切换(自有账户,官方账户)
export function accountConfigSwitch(data) {
return $http({
url: $http.adornLdyUrl("payments/transfer/amount/account/type"),
method: "post",
source: "cm",
data: $http.adornData(data),
});
}
//自有账户服务号授权
export function customAccountAuth(data) {
return $http({
url: $http.adornLdyUrl("payments/transfer/amount/official/authUrl"),
method: "post",
data: $http.adornData(data),
source: "cm"
});
}
//解除授权绑定(自有账户授权)
export function unBindCustomAccountAuth(data) {
return $http({
url: $http.adornLdyUrl("payments/transfer/amount/official/authRelieve"),
method: "post",
data: $http.adornData(data),
source: "cm"
});
}
// 平台配置接口
// 销售比例配置
export function salesPercentageAPI() {}
// 提示配置
export function reminderAPI() {}
// 开关配置
export function switchAPI() {}
//修改密码
export function updatePassword(data) {
return $http({
url: $http.adornLdyUrl('business/AccountManage/modifyPassword'),
method: 'post',
data: $http.adornData(data),
source : 'cm'
});
}
import $http from "@/utils/httpRequest";
//编辑设置订单取消时间
export function subAccountLists(data) {
return $http({
url: $http.adornLdyUrl("business/mall/subAccountLists"),
method: "post",
data: $http.adornData(data),
source: "cm"
});
}
//员工角色创建
export function subAccountSave(data) {
return $http({
url: $http.adornLdyUrl("business/mall/subAccountSave"),
method: "post",
data: $http.adornData(data),
source: "cm"
});
}
//验证是不是添加过账号
export function checkBusinessAccount(data) {
return $http({
url: $http.adornLdyUrl("business/api/checkBusinessAccount"),
method: "post",
data: $http.adornData(data),
source: "cm"
});
}
//发送短信验证码
export function subAccountSmsSend(data) {
return $http({
url: $http.adornLdyUrl("business/mall/subAccountSmsSend"),
method: "post",
data: $http.adornData(data),
source: "cm"
});
}
//员工详情
export function subAccountDetails(data) {
return $http({
url: $http.adornLdyUrl("business/mall/subAccountDetails"),
method: "post",
data: $http.adornData(data),
source: "cm"
});
}
//角色列表
export function subAccountRole(data) {
return $http({
url: $http.adornLdyUrl("business/mall/subAccountRole"),
method: "post",
data: $http.adornData(data),
source: "cm"
});
}
//操作
export function todoUser(type, data) {
return $http({
url: $http.adornLdyUrl(`business/mall/subAccountOperation/${type}`),
method: "post",
data: $http.adornData(data),
source: "cm"
});
}
//店铺子账号创建权限信息
export function subAccountAuthInfo(type, data) {
return $http({
url: $http.adornLdyUrl("business/mall/subAccountAuthInfo"),
method: "post",
data: $http.adornData(data),
source: "cm"
});
}
<?xml version="1.0" encoding="UTF-8"?>
<svg width="266px" height="60px" viewBox="0 0 266 60" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>编组 12</title>
<defs>
<linearGradient x1="50%" y1="100%" x2="50%" y2="3.061617e-15%" id="linearGradient-1">
<stop stop-color="#FFFFFF" offset="0%"></stop>
<stop stop-color="#5B8FF9" offset="100%"></stop>
</linearGradient>
</defs>
<g id="区块-指标卡/统计数值" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g transform="translate(-548.000000, -1913.000000)" id="总分/主次关系-2">
<g transform="translate(232.000000, 1804.000000)">
<g id="编组-3" transform="translate(317.000000, 25.000000)">
<g id="编组-12" transform="translate(0.000000, 85.000000)">
<polygon id="Stroke-362" fill="url(#linearGradient-1)" opacity="0.25" points="29.0847509 59 58.1694915 39 87.2542373 39 116.338983 39 145.423729 39 174.508475 21.3648652 203.59322 8.63143167 232.677966 7.26767333 264 1 264 59 0 59"></polygon>
<polyline id="Stroke-362" stroke="#5B8FF9" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" points="0 58 29.0847774 58 58.1695444 38 87.2543166 38 116.339089 38 145.423861 38 174.508633 19.9890936 203.593405 7.64564307 232.678178 6.24311304 264 -2.05252482e-13"></polyline>
</g>
</g>
</g>
</g>
</g>
</svg>
\ No newline at end of file
......@@ -12,6 +12,18 @@ body {
background-color: #fff;
}
h1,
h2,
h3,
h4,
h5,
h6 {
margin-top: 0;
margin-bottom: 0.5em;
color: rgba(0, 0, 0, .85);
font-weight: 500;
}
a {
color: mix(#fff, $--color-primary, 20%);
text-decoration: none;
......@@ -19,7 +31,7 @@ a {
&:focus,
&:hover {
color: $--color-primary;
text-decoration: underline;
text-decoration: none;
}
}
......@@ -28,7 +40,9 @@ img {
}
.theme_0BB2D4,
.theme_3E8EF7 {
.theme_3E8EF7,
.theme_11C26D,
.theme_9463F7 {
/* Utils
------------------------------ */
......@@ -127,13 +141,13 @@ img {
.site-sidebar,
.site-sidebar__inner,
.site-sidebar__menu.el-menu,
.site-navbar__menu,
.site-sidebar__menu-icon,
.site-content__wrapper,
.site-content--tabs>.el-tabs .el-tabs__header {
transition: inline-block .3s, left .3s, width .3s, margin-left .3s, font-size .3s;
}
/* Navbar
------------------------------ */
.site-navbar {
......@@ -270,7 +284,7 @@ img {
width: 30px;
height: auto;
margin-right: 5px;
border-radius: 100%;
// border-radius: 100%;
vertical-align: middle;
}
}
......@@ -366,7 +380,7 @@ img {
.el-menu-item.is-active,
.el-submenu.is-active>.el-submenu__title {
// color: mix(#4f9dec, $sidebar--color-text-dark, 100%);
// color: mix(var(--primary-color), $sidebar--color-text-dark, 100%);
color: #fff;
background-color: var(--primary-color);
......@@ -391,9 +405,12 @@ img {
.site-navbar__avatar {
width: 100%;
margin-top: 4px;
margin-bottom: 4px;
text-align: center;
background-color: $navbar--background-color;
// margin-bottom: 4px;
display: flex;
align-items: center;
justify-content: center;
// background-color: $navbar--background-color;
background-color: #2f4c68;
border-top: 1px solid rgba(0, 0, 0, .25);
.el-dropdown-link {
......@@ -408,7 +425,7 @@ img {
}
&:hover {
background-color: transparent;
background-color: #486785;
}
.site-navbar_dropdown {
......@@ -443,7 +460,7 @@ img {
}
/* Content
/* Content
------------------------------ */
.site-content {
position: relative;
......@@ -460,7 +477,7 @@ img {
&--tabs {
padding: 64px 0 0;
}
// 导航标签栏
>.el-tabs {
>.el-tabs__header {
position: fixed;
......@@ -468,8 +485,8 @@ img {
left: 230px;
right: 0;
z-index: 930;
padding: 0 55px 0 15px;
box-shadow: 0 2px 4px 0 rgba(0, 0, 0, .12), 0 0 6px 0 rgba(0, 0, 0, .04);
padding: 0 55px 0 10px;
// box-shadow: 0 2px 4px 0 rgba(0, 0, 0, .12), 0 0 6px 0 rgba(0, 0, 0, .04);
background-color: #fff;
margin-bottom: 24px;
......@@ -494,7 +511,7 @@ img {
padding: 0 12px;
font-size: 16px;
line-height: 40px;
background-color: $content--background-color;
// background-color: $content--background-color;
cursor: pointer;
.el-icon--right {
......@@ -505,6 +522,58 @@ img {
}
}
// 复制按钮
.copy_icon {
cursor: pointer;
color: var(--primary-color);
}
// badge样式
.badgecommon {
display: inline-block;
width: 8px;
height: 8px;
background-color: #909399;
border-radius: 50%;
margin: 0 5px;
&.success {
background-color: #67C23A;
}
&.warning {
background-color: #e6a23c;
}
&.danger {
background-color: #f56c6c;
}
&.primary {
background-color: var(--primary-color);
}
}
// 输入框样式
.el-input__inner,
.el-textarea__inner {
border-radius: 2px;
}
// 按钮样式
.el-button {
// height: 32px;
// padding: 4px 15px;
// font-size: 14px;
border-radius: 2px;
}
.el-button--text {
&.text-danger {
color: #f56c6c;
}
}
.el-table__expand-icon {
display: inline-block;
width: 14px;
......@@ -521,11 +590,275 @@ img {
th {
font-weight: 500;
background-color: #fafafa;
position: relative;
// &.is-leaf:not(:last-child){
// border-right: 1px solid #ebeef5;
// }
// &.el-table__cell:not(:first-child)::before {
// position: absolute;
// top: 50%;
// left: -1px;
// width: 1px;
// height: 1.6em;
// background-color: #EBEEF5;
// transform: translateY(-50%);
// transition: background-color .3s;
// content: "";
// }
}
}
.el-table__empty-block {
margin: 32px 0;
margin: 56px 0 32px;
width: 100% !important;
position: sticky;
left: 0;
}
}
.el-table__fixed,
.el-table__fixed-right,
.el-table__fixed-left {
height: 100% !important;
}
// 设置页面抽屉样式
.setting_drawer {
.el-drawer__body {
padding: 24px;
.setting_drawer_content {
position: relative;
min-height: 100%;
.content_wrapper {
margin-bottom: 24px;
.title {
margin: 0;
margin-bottom: 12px;
color: rgba(0, 0, 0, .85);
font-size: 14px;
line-height: 22px;
}
.theme-color {
margin-top: 16px;
overflow: hidden;
.theme-color-block {
float: left;
width: 20px;
height: 20px;
margin-top: 8px;
margin-right: 8px;
color: #fff;
font-weight: 700;
text-align: center;
border-radius: 2px;
cursor: pointer;
.themeicon-check {
display: inline-block;
color: inherit;
font-style: normal;
line-height: 0;
text-align: center;
text-transform: none;
vertical-align: -0.125em;
text-rendering: optimizelegibility;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
}
}
}
}
}
}
// 普通卡片样式
.card-common {
border: 0;
border-radius: 0;
.card_header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 16px 24px 0;
.card_title {
font-weight: 500;
font-size: 16px;
}
}
.card_content {
color: rgba(0, 0, 0, .85);
font-size: 24px;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
}
}
.el-card.notCard,
.el-card.isModule {
background-color: transparent;
border: 0;
box-shadow: none;
}
// 表单输入框提示语样式
.form_item_explain {
clear: both;
color: rgba(0, 0, 0, .45);
font-size: 14px;
line-height: 1.5715;
transition: color .3s cubic-bezier(.215, .61, .355, 1);
padding-top: 0;
display: flex;
flex-wrap: nowrap;
margin-bottom: -15px;
}
// 退出按钮菜单
.avatar-drop {
width: 120px;
}
// 表格操作按钮
.table_option_btns {
display: flex;
justify-content: flex-end;
}
// 自定义checkcard
.checkcard-wrapper {
position: relative;
.checkcard {
position: relative;
display: inline-block;
width: 100%;
margin-right: 16px;
margin-bottom: 16px;
color: rgba(0, 0, 0, .85);
font-size: 14px;
line-height: 1.5715;
vertical-align: top;
background-color: #fff;
border: 1px solid #d9d9d9;
border-radius: 2px;
cursor: pointer;
transition: all .2s;
&.checkcard-checked,
&:hover {
border-color: var(--primary-color);
}
&.checkcard-checked {
background-color: var(--primary-color) 50%;
&::after {
position: absolute;
top: 2px;
right: 2px;
width: 0;
height: 0;
border: 6px solid var(--primary-color);
border-bottom: 6px solid transparent;
border-left: 6px solid transparent;
border-top-right-radius: 2px;
content: "";
}
}
.checkcard-avatar {
background-color: transparent;
margin-right: 8px;
}
.checkcard-content {
display: flex;
padding: 12px 16px;
.checkcard-title {
overflow: hidden;
color: rgba(0, 0, 0, .85);
font-weight: 500;
font-size: 14px;
white-space: nowrap;
text-overflow: ellipsis;
}
.checkcard-description {
color: rgba(0, 0, 0, .45);
}
}
}
.ribbon {
box-sizing: border-box;
margin: 0;
color: rgba(0, 0, 0, .85);
font-size: 14px;
font-variant: tabular-nums;
line-height: 1.5715;
list-style: none;
font-feature-settings: "tnum", "tnum";
position: absolute;
top: 8px;
height: 22px;
padding: 0 8px;
color: #fff;
line-height: 22px;
white-space: nowrap;
background-color: var(--primary-color);
border-radius: 2px;
&.volcano {
color: #fa541c;
background: #fa541c;
}
&.placement-end {
right: -8px;
border-bottom-right-radius: 0;
}
&.placement-end {
.ribbon-corner {
right: 0;
border-color: currentcolor transparent transparent currentcolor;
}
}
&-corner {
position: absolute;
top: 100%;
width: 8px;
height: 8px;
color: currentcolor;
border: 4px solid;
transform: scaleY(.75);
transform-origin: top;
&:after {
position: absolute;
top: -4px;
left: -4px;
width: inherit;
height: inherit;
color: rgba(0, 0, 0, .25);
border: inherit;
content: "";
}
}
&-text {
color: #fff;
}
}
}
}
\ No newline at end of file
html,
body,
div,
ul,
li,
h1,
h2,
h3,
h4,
h5,
h6,
p,
dl,
dt,
dd,
ol,
form,
input,
textarea,
th,
td,
select {
margin: 0;
padding: 0;
}
/* 重置列表元素 */
ul, ol { list-style: none; }
\ No newline at end of file
@import "normalize"; // api: https://github.com/necolas/normalize.css/
@import "variables"; // 站点变量
@import "reset";
@import "base";
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
<template>
<div class="page_loading" v-loading="true"></div>
</template>
<script>
export default {
}
</script>
<style scoped lang="scss">
.page_loading {
width: 100%;
height: 300px;
padding-top: 100px;
}
</style>
\ No newline at end of file
<!-- 搜索表单 -->
<template>
<div class="search_form">
<el-form :model="searchData" :size="size" :label-width="labelWidth" ref="searchForm">
<el-row class="search_form_box" :gutter="10">
<el-col :xs="24" :sm="24" :md="12" :lg="8" :xl="6" v-for='item in searchForm' :key='item.prop'>
<el-form-item :label="item.label" :prop="item.prop">
<!-- 输入框 -->
<el-input v-if="item.type === 'Input'" v-model="searchData[item.prop]"
:placeholder="item.placeholder || '请输入'"></el-input>
<!-- 下拉框 -->
<el-select v-if="item.type === 'Select'" v-model="searchData[item.prop]" clearable :disabled="item.disabled" :placeholder="item.placeholder || '请选择'">
<el-option v-for="op in item.options" :label="op.label" :value="op.value"
:key="op.value"></el-option>
</el-select>
<!-- 单选 -->
<el-radio-group v-if="item.type === 'Radio'" v-model="searchData[item.prop]">
<el-radio v-for="ra in item.radios" :label="ra.value" :key="ra.value">{{ ra.label }}</el-radio>
</el-radio-group>
<!-- 单选按钮 -->
<el-radio-group v-if="item.type === 'RadioButton'" v-model="searchData[item.prop]">
<el-radio-button v-for="ra in item.radios" :label="ra.value" :key="ra.value">{{ ra.label
}}</el-radio-button>
</el-radio-group>
<!-- 复选框 -->
<el-checkbox-group v-if="item.type === 'Checkbox'" v-model="searchData[item.prop]" :placeholder="item.placeholder || '请选择'">
<el-checkbox v-for="ch in item.checkboxs" :label="ch.value" :key="ch.value">{{ ch.label
}}</el-checkbox>
</el-checkbox-group>
<!-- 日期 -->
<el-date-picker v-if="item.type === 'Date'" v-model="searchData[item.prop]" clearable :placeholder="item.placeholder || '请选择'"></el-date-picker>
<!-- 日期范围选择 -->
<el-date-picker v-if="item.type === 'DateRange'" type='daterange' v-model="searchData[item.prop]" clearable start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
<!-- 时间 -->
<el-time-select v-if="item.type === 'Time'" v-model="searchData[item.prop]"
type='' clearable></el-time-select>
<!-- 日期时间 -->
<el-date-picker v-if="item.type === 'DateTime'" type='datetime' v-model="searchData[item.prop]"
:disabled="item.disable && item.disable(searchData[item.prop])" clearable :placeholder="item.placeholder || '请选择'"></el-date-picker>
<!-- 滑块 -->
<!-- <el-slider v-if="item.type==='Slider'" v-model="searchData[item.prop]"></el-slider> -->
<!-- 开关 -->
<el-switch v-if="item.type === 'Switch'" v-model="searchData[item.prop]"></el-switch>
</el-form-item>
</el-col>
<el-col :xs="{span: 24}" :sm="{span: 24}" :md="{span: 12}" :lg="{span: 8}" :xl="{span: 6}">
<el-form-item style="display: flex;justify-content: flex-start;">
<div style="display: flex;">
<el-button type="primary" @click="searchHandle">查询</el-button>
<el-button @click="resetFields">重置</el-button>
<slot name="searchFormOptions"></slot>
<!-- <el-button v-if="!isOpen" type="text" icon="el-icon-arrow-down"
@click="toggleForm">展开</el-button>
<el-button v-else type="text" icon="el-icon-arrow-up"
@click="toggleForm">收起</el-button> -->
</div>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
</template>
<script>
export default {
props: {
labelWidth: {
type: String,
default: '120px'
},
size: {
type: String,
default: 'small'
},
searchForm: {
type: Array,
default: []
},
searchData: {
type: Object,
default: {}
}
},
data() {
return {
isOpen: false
};
},
mounted() {
// if(this.searchForm.length > 2) {
// this.searchForm = this.searchForm.slice(0, 2);
// this.isOpen = false;
// }
},
methods: {
// 查询
searchHandle() {
this.$emit('search')
},
// 清空form表单事件
resetFields() {
this.$refs.searchForm.resetFields();
this.searchHandle();
},
// 展开收起
toggleForm() {
this.isOpen = !this.isOpen;
}
}
}
</script>
<style lang="scss">
.search_form {
margin-bottom: 16px;
padding: 24px 24px 0;
background: #fff;
.search_form_box {
display: flex;
flex-wrap: wrap;
justify-content: flex-start;
}
.el-form-item__label {
padding-right: 10px;
}
.el-select, .el-date-editor.el-input {
width: 100%;
}
.el-input__inner {
border-radius: 0;
}
}</style>
\ No newline at end of file
......@@ -8,17 +8,44 @@
</path>
</svg>
</span>
<el-drawer custom-class="setting_drawer" :visible.sync="isOpen" :size="300" :with-header="false" append-to-body>
<div class="setting_drawer_content">
<div class="content_wrapper">
<h3 class="title">主题色</h3>
<div class="theme-color">
<div class="theme-color-content">
<div class="theme-color-block" v-for="(color, index) in colorList" :key="index"
:style="{ backgroundColor: color }" @click="themeClick(color)">
<span class="themeicon-check" v-if="currentColor === color">
<i class="el-icon-check"></i>
</span>
</div>
</div>
</div>
</div>
</div>
</el-drawer>
</div>
</template>
<script>
import themeList from '@/element-ui-theme'
import { changeTheme } from '../../utils/theme'
export default {
data() {
isOpen: false
return {
isOpen: false,
currentColor: sessionStorage.getItem('theme'),
colorList: themeList.list.slice(0, 4)
}
},
methods: {
openSetting() {
this.isOpen = true
},
themeClick(color) {
this.currentColor = color
changeTheme(this.currentColor)
}
}
}
......@@ -27,7 +54,7 @@ export default {
<style scoped lang="scss">
.setting_container {
position: fixed;
top: 240px;
top: 270px;
right: 0;
z-index: 0;
display: flex;
......@@ -41,6 +68,7 @@ export default {
border-radius: 4px 0 0 4px;
cursor: pointer;
pointer-events: auto;
z-index: 9999;
.action-setting {
display: inline-block;
......
<template>
<div class="images-list">
<el-upload v-if="showFileList" class="avatar-uploader" :action="uploadUrl" :before-upload="handleBeforeUpload"
:on-success="handleSuccess" :on-error="handleUploadError" :on-remove="handleRemove" :on-exceed="handleExceed"
:file-list="fileList" :multiple="fileLimit > 1" :data="paramsData" :limit="fileLimit" :list-type="listType"
:show-file-list="true">
<i v-if="listType === 'picture-card'" class="el-icon-plus"></i>
<el-button v-else size="small" type="primary">点击上传</el-button>
<div v-if="showTip" slot="tip" class="el-upload__tip">只能上传{{ fileTypeName || 'jpg/png' }}文件,且不超过 {{ fileSize }}MB
</div>
</el-upload>
<el-upload class="avatar-uploader" :action="uploadUrl" :before-upload="handleBeforeUpload" :on-success="handleSuccess"
:on-error="handleUploadError" :on-remove="handleRemove" :on-exceed="handleExceed" :multiple="false"
:show-file-list="false"
:data="paramsData" :list-type="listType">
<img v-if="value" :src="value" class="avatar">
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
<div v-if="showTip" slot="tip" class="el-upload__tip">只能上传{{ fileTypeName || 'jpg/png' }}文件,且不超过 {{ fileSize }}MB
</div>
</el-upload>
</div>
</template>
<script>
export default {
props: {
// 值
value: [String, Object, Array],
// 大小限制(MB)
fileSize: {
type: Number,
default: 5,
},
// 文件类型, 例如["doc", "xls", "ppt", "txt", "pdf"]
fileType: {
type: Array,
default: () => ['png', 'jpg', 'jpeg'],
},
// 文件列表类型 text/picture/picture-card
listType: {
type: String,
default: 'picture'
},
// 是否显示提示
isShowTip: {
type: Boolean,
default: false
},
// 最大允许上传个数
fileLimit: {
type: Number,
default: 99
},
// 是否显示文件列表
showFileList: {
type: Boolean,
default: false
}
},
data() {
return {
uploadUrl: "https://xxxxxxxxxxxxxxxxxxx/upload", // 上传的图片服务器地址
paramsData: {
}, // 上传携带的参数,看需求要不要
fileList: [],
tempFileList: [] // 因为 fileList为只读属性,所以用了一个中间变量来进行数据改变的交互。
}
},
watch: {
value: {
handler: function (newVal, oldVa) {
this.tempFileList = newVal
},
immediate: true,
deep: true
}
},
computed: {
// 是否显示提示
showTip() {
return this.isShowTip && (this.fileType || this.fileSize);
},
fileTypeName() {
let typeName = ''
this.fileType.forEach(item => {
typeName += `${item},`
})
return typeName
},
fileAccept() {
let fileAccept = ''
this.fileType.forEach(element => {
fileAccept += `.${element},`
})
return fileAccept
}
},
created() {
console.log(this.value)
if (this.value) {
if (Array.isArray(this.value)) {
this.fileList = JSON.parse(JSON.stringify(this.value))
} else {
this.fileList = [{ name: '1', url: this.value }]
}
}
},
methods: {
// 上传前校检格式和大小
handleBeforeUpload(file) {
// 校检文件类型
if (this.fileType && file) {
let fileExtension = "";
if (file.name.lastIndexOf(".") > -1) {
fileExtension = file.name.slice(file.name.lastIndexOf(".") + 1);
}
const isTypeOk = this.fileType.some((type) => {
if (file.type.indexOf(type) > -1) return true;
if (fileExtension && fileExtension.indexOf(type) > -1) return true;
return false;
});
if (!isTypeOk & file) {
this.$message.error(`文件格式不正确, 请上传${this.fileType.join("/")}格式文件!`);
return false;
}
}
// 校检文件大小
if (this.fileSize && file) {
const isLt = file.size / 1024 / 1024 < this.fileSize;
if (!isLt) {
this.$message.error(`上传文件大小不能超过 ${this.fileSize} MB!`);
return false;
}
}
return true;
},
handleUploadError(err) {
this.$message.error("上传失败, 请重试");
},
// 文件个数超出
handleExceed() {
this.$message.error(`超出上传文件个数,请删除以后再上传!`);
},
// 文件上传成功的钩子
handleSuccess(res, file, fileList) {
this.$message.success("上传成功")
this.changeFileList(fileList)
},
// 文件列表移除文件时的钩子
handleRemove(file, fileList) {
this.changeFileList(fileList)
},
// 文件列表改变的时候,更新组件的v-model的文的数据
changeFileList(fileList) {
const tempFileList = fileList.map(item => {
let tempItem = {
name: item.name,
url: item.response ? item.response.url : item.url
}
return tempItem
})
this.$emit("input", tempFileList)
}
},
}
</script>
<style lang="scss" scoped>
.images-list {
// border: 1px dashed #d5d5d5;
// padding: 10px;
// border-radius: 4px;
// background: #fff;
.avatar-uploader {
/deep/ .el-upload {
border: 1px dashed #d9d9d9;
border-radius: 6px;
cursor: pointer;
position: relative;
overflow: hidden;
&:hover {
border-color: var(--primary-color);
}
}
}
.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>
\ No newline at end of file
// 引入 echarts 核心模块,核心模块提供了 echarts 使用必须要的接口。
import * as echarts from "echarts/core";
/** 引入柱状图and折线图图表,图表后缀都为 Chart */
import { BarChart, LineChart } from "echarts/charts";
// 引入提示框,标题,直角坐标系,数据集,内置数据转换器组件,组件后缀都为 Component
import {
TitleComponent,
TooltipComponent,
GridComponent,
DatasetComponent,
TransformComponent,
LegendComponent,
ToolboxComponent
} from "echarts/components";
// 标签自动布局,全局过渡动画等特性
import { LabelLayout, UniversalTransition } from "echarts/features";
// 引入 Canvas 渲染器,注意引入 CanvasRenderer 或者 SVGRenderer 是必须的一步
import { CanvasRenderer } from "echarts/renderers";
// 注册必须的组件
echarts.use([
TitleComponent,
TooltipComponent,
GridComponent,
DatasetComponent,
TransformComponent,
BarChart,
LabelLayout,
UniversalTransition,
CanvasRenderer,
LineChart,
LegendComponent,
ToolboxComponent
]);
// 导出
export default echarts;
\ No newline at end of file
<template>
<div class="recharge_pop">
<el-dialog title="收银台" :visible.sync="visible" width="500px" center @close="closeDialog"
@before-close="beforeCloseDialog" append-to-body>
<div>
<!-- <p style="margin-bottom: 14px;">商家名称:{{ store.state.app.shop_name }}</p> -->
<p>
支付金额:
<!-- <span style="color: #F56C6C;">¥{{ inputMoney < 1 ? Number(inputMoney) + 0.01 : (Number(inputMoney) +
(Number(inputMoney) * 0.006)).toFixed(2) }}</span> -->
<span style="color: #F56C6C;">¥{{ Number(inputMoney).toFixed(2) }}</span>
</p>
</div>
<div slot="footer" class="dialog-footer"
style="display: flex;flex-direction: column;justify-content: center;align-items: center;">
<div
style="border: 1px solid #3583FF;padding: 10px;border-radius: 8px;width: 220px;height: 220px;position: relative;">
<div v-if="paySuccess" class="pay-success-mask">
<img src="../../assets/img/paySuccess.png" alt="">
<span>充值成功</span>
</div>
<img v-else :src="codeURL" width="200px" height="200px" />
</div>
<div style="margin-top: 20px;display: flex;flex-direction: row;">
<img src="../../assets/wechat/WeChatPay.png" style="margin-right: 5px;" />
微信支付
<img width="16px" height="16px" src="../../assets/wechat/aliPay.png"
style="margin-right: 5px;margin-left: 10px;" />
支付宝
</div>
<p style="font-size: 20px;margin: 20px 0;">扫一扫完成支付</p>
</div>
</el-dialog>
</div>
</template>
<script>
import { rechargeAPI, rechargeDetailAPI } from '@/api/ldy/pay/general'
export default {
props: {
inputMoney: {
type: String | Number,
default: 0
},
tradeNo: {
type: String,
}
},
data() {
return {
visible: false,
codeURL: "", //支付二维码
timeInterval: null,
paySuccess: false
}
},
watch: {
visible(val) {
if (val) {
this.getPayInfo();
}else {
this.closeDialog();
}
}
},
methods: {
// 资源包订购详情
getPayInfo() {
let params = {
amount: this.inputMoney * 100
}
if (this.tradeNo) {
// 如果从充值记录发起支付
params.tradeNo = this.tradeNo
}
rechargeAPI(params).then(response => {
let res = response.data
if (res.error == 0 && res.code == 0 && res.data) {
this.codeURL =
this.$store.state.baseURL + "api/builder/qrcode?data=" + res.data.url;
let tradeNo = this.tradeNo || res.data.trade_no;
this.timeInterval = setInterval(() => {
rechargeDetailAPI({
tradeNo
}).then(resp => {
let res = resp.data
if (res.error == 0 && res.code == 0 && res.data) {
if (res.data.state == 1) {
this.$message.success("充值成功");
this.paySuccess = true
this.closeDialog()
setTimeout(() => {
this.visible = false;
this.$emit('success')
}, 2000)
}
}
}).catch(() => {
this.closeDialog()
});
}, 2000);
}
});
},
closeDialog() {
clearInterval(this.timeInterval);
this.timeInterval = null;
},
beforeCloseDialog() {
if (this.timeInterval != null) {
this.closeDialog()
}
}
}
}
</script>
<style scoped lang="scss">
.pay-success-mask {
width: 100%;
height: 100%;
padding: 10px;
border-radius: 8px;
position: absolute;
left: 0;
top: 0;
background-color: rgba(255, 255, 255, 0.9);
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
& > span {
display: inline-block;
margin-top: 15px;
font-size: 15px;
}
}
</style>
\ No newline at end of file
<template>
<div class="my-skeleton-box">
<div class="my-skeleton-item">
<el-skeleton-item style="flex: 0 0 90%;"></el-skeleton-item>
</div>
<div class="my-skeleton-item">
<el-skeleton-item style="flex: 0 0 40%;"></el-skeleton-item>
<el-skeleton-item style="margin-left: 8px; flex: 0 0 52%;"></el-skeleton-item>
</div>
<div class="my-skeleton-item">
<el-skeleton-item style="flex: 0 0 30%;"></el-skeleton-item>
<el-skeleton-item style="margin-left: 8px; flex: 0 0 67%;"></el-skeleton-item>
</div>
<div class="my-skeleton-item">
<el-skeleton-item style="flex: 0 0 50%;"></el-skeleton-item>
<el-skeleton-item style="margin-left: 8px; flex: 0 0 40%;"></el-skeleton-item>
</div>
<div class="my-skeleton-item">
<el-skeleton-item style="flex: 0 0 20%;"></el-skeleton-item>
<el-skeleton-item style="margin-left: 8px; flex: 0 0 10%;"></el-skeleton-item>
<el-skeleton-item style="margin-left: 8px; flex: 0 0 62%;"></el-skeleton-item>
</div>
</div>
</template>
<script>
export default {
}
</script>
<style scoped lang="scss">
.my-skeleton-box {
height: 100%;
width: 100%;
padding: 20px;
position: relative;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
.my-skeleton-item {
width: 100%;
display: flex;
flex-wrap: nowrap;
}
/deep/ .el-skeleton__item {
height: 14px;
margin: 4px 0;
border-radius: 2px;
}
}
</style>
\ No newline at end of file
<template>
<div>
<el-dialog title="修改" :visible.sync="dialogFormVisible" center>
<el-form :model="form">
<el-form-item label="配置类型:" :label-width="formLabelWidth">
<el-input v-model="form.min" style="width:65%;" readonly></el-input>
</el-form-item>
<el-form-item label="内容:" :label-width="formLabelWidth">
<quill-editor v-if="form.conditionFrom == 'xieyi'" ref="myTextEditor" v-model="form.value"
:options="quillOption"
style="padding-bottom: 50px;height: 300px;width: 72%;display: inline-table;margin-bottom: 60px;">
</quill-editor>
<div v-else-if="form.conditionFrom == 'image'">
<el-upload class="avatar-uploader" v-model="form.value"
action="https://admin.sj088.cn/sqx_fast/alioss/upload" :show-file-list="false"
:on-success="handleAvatarSuccess1">
<img v-if="form.value" :src="form.value" class="avatar" style="width: 148px;height: 148px;" />
<i v-else class="el-icon-plus avatar-uploader-icon" style="font-size: 28px;color: #8c939d"></i>
</el-upload>
</div>
<div v-else-if="form.conditionFrom == 'coupon'">
<div style="height: 150px;width: 72%;border: 1px solid #efefef;border-radius: 6px;padding: 10px;">
<span v-for="(item, index) in form.couponList" style="border: 1px;margin-right: 5px;"
:key="index">
{{ item.couponName }}
<i class="el-icon-circle-close" @click="del(index, item)"></i>
</span>
</div>
<el-button type="primary" @click="yhqbtn()" style="margin: 5px;">选择优惠券</el-button>
</div>
<div v-else-if="form.conditionFrom == 'kaiguan'">
<div>
<el-radio-group v-model="form.value">
<el-radio label="是"></el-radio>
<el-radio label="否"></el-radio>
</el-radio-group>
</div>
</div>
<el-input v-else v-model="form.value" style="width:65%;"></el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogFormVisible = false">取 消</el-button>
<el-button type="primary" @click="amendNoticeTo()">确 定</el-button>
</div>
</el-dialog>
<el-dialog title="优惠券列表" :visible.sync="dialogFormVisibleYhq" center>
<div style="display: inline-block;float: right;">
<el-button style='margin-left:15px;' size="mini" type="primary" icon="document" @click="refresh">刷新
</el-button>
</div>
<el-table v-loading="tableDataLoadingY" :data="tableDataYhq.list">
<el-table-column prop="couponId" label="编号" width="80">
</el-table-column>
<el-table-column prop="couponName" label="优惠券名称">
</el-table-column>
<el-table-column prop="couponPicture" label="优惠券图片">
<template slot-scope="scope">
<img v-if="scope.row.couponPicture" :src="scope.row.couponPicture" alt="" width="40" height="40">
</template>
</el-table-column>
<el-table-column prop="money" label="优惠券面值" width="100">
</el-table-column>
<el-table-column prop="minMoney" label="优惠券最低消费" width="150">
</el-table-column>
<el-table-column prop="endDate" label="优惠券有效期限(天)" width="150">
</el-table-column>
<el-table-column label="操作" width="150" fixed="right">
<template slot-scope="scope">
<el-button size="mini" type="primary" @click="discuss(scope.$index, scope.row)">确认选择
</el-button>
</template>
</el-table-column>
</el-table>
<div style="text-align: center;margin-top: 10px;">
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
:page-sizes="[10, 20, 30, 50, 100]" :page-size="size1" :current-page="page1"
layout="total,sizes, prev, pager, next" :total="tableDataYhq.totalCount">
</el-pagination>
</div>
</el-dialog>
</div>
</template>
<script>
import { quillEditor } from 'vue-quill-editor'
import 'quill/dist/quill.core.css'
import 'quill/dist/quill.snow.css'
import 'quill/dist/quill.bubble.css'
import quillConfig from '@/views/locality/quill-config.js'
export default {
components: {
quillEditor
},
props: {
formInfo: {
type: Object,
default: {}
}
},
data() {
return {
size1: 10,
page1: 1,
dialogFormVisible: false,
dialogFormVisibleYhq: false,
dialogFormVisible1: false,
tableDataLoadingY: false,
quillOption: quillConfig,
tableDataYhq: {},
formLabelWidth: '200px',
form: {
id: '',
min: '',
value: '',
type: '',
couponList: []
},
}
},
watch: {
dialogFormVisible(val) {
if(val) {
this.form = this.formInfo
}
}
},
methods: {
handleSizeChange(val) {
this.size1 = val;
this.yhqSelect();
},
handleCurrentChange(val) {
this.page1 = val;
this.yhqSelect();
},
handleAvatarSuccess1(file, fileList) {
this.form.value = file.data
},
// 点击获取优惠券
yhqbtn() {
console.log('this.couponList', this.form.couponList)
this.page1 = 1
this.yhqSelect()
this.dialogFormVisibleYhq = true
},
// 优惠券列表数据
yhqSelect() {
this.tableDataLoading = true
this.$http({
url: this.$http.adornUrl('admin/coupon/seleteAllCoupon'),
method: 'get',
params: this.$http.adornParams({
'page': this.page1,
'limit': this.size1
})
}).then(({
data
}) => {
if (data && data.code === 0) {
this.tableDataLoading = false
let returnData = data.data;
this.tableDataYhq = returnData
}
})
},
// 修改
amendNoticeTo() {
if (this.form.conditionFrom == 'coupon') {
this.values = []
for (var i in this.form.couponList) {
this.values.push(this.form.couponList[i].couponId)
}
this.form.value = this.values.toString()
}
this.$http({
url: this.$http.adornUrl('common/update'),
method: 'post',
data: this.$http.adornData({
'id': this.form.id,
'type': this.form.type,
'value': this.form.value,
'min': this.form.min,
'max': this.form.max,
'createAt': this.form.createAt,
'conditionFrom': this.form.conditionFrom
})
}).then(({
data
}) => {
if (data && data.code === 0) {
this.dialogFormVisible = false
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.dataSelect()
}
})
} else {
this.$message.error(data.msg)
}
})
},
// 获取数据列表
dataSelect() {
this.$emit('confirm')
},
refresh() {
this.page1 = 1
this.yhqSelect()
},
// 确认选择
discuss(index, row) {
// this.values.push(row.couponId)
this.form.couponList.push(row)
this.dialogFormVisibleYhq = false
},
}
}
</script>
<style></style>
\ No newline at end of file
<template>
<div>
<div class="table_option_btns">
<el-button class="btn" type="primary" @click="refresh">刷新</el-button>
</div>
<el-table v-loading="loading" :data="data">
<!-- <el-table-column prop="type" label="编号" align="center" width="80">
</el-table-column> -->
<el-table-column prop="min" label="类型" width="250">
</el-table-column>
<el-table-column prop="value" label="内容">
<template slot-scope="scope">
<el-tooltip placement="top" popper-class="sysSetTable_tooltip">
<div slot="content">
{{ scope.row.value }}
</div>
<div
style="display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 3;overflow: hidden;max-height:80px;">
{{ scope.row.value }}
</div>
</el-tooltip>
</template>
</el-table-column>
<el-table-column prop="createAt" label="创建时间" width="180">
</el-table-column>
<el-table-column label="操作" prop="id" width="120">
<template slot-scope="scope">
<el-button size="mini" type="primary" :disabled="!isAuth('sysSetting:update')"
@click="amend(scope.$index, scope.row)">编辑
</el-button>
</template>
</el-table-column>
</el-table>
<!-- 修改弹框 -->
<sysSetDialog ref="sysSetDialogRef" :formInfo="form" @confirm="sysConfirm" />
</div>
</template>
<script>
import sysSetDialog from '@/components/sysSetDialog'
export default {
props: {
data: {
type: Array,
default: []
},
loading: {
type: Boolean,
default: false
},
},
components: {
sysSetDialog
},
data() {
return {
form: {
id: '',
min: '',
value: '',
type: '',
couponList: []
},
}
},
methods: {
// 修改弹框
amend(index, rows) {
this.form.id = rows.id;
this.form.type = rows.type
this.form.min = rows.min;
this.form.value = rows.value;
this.form.max = rows.max;
this.form.createAt = rows.createAt;
if (rows.couponList) {
this.form.couponList = rows.couponList
} else {
this.form.couponList = []
}
this.form.conditionFrom = rows.conditionFrom
this.$refs.sysSetDialogRef.dialogFormVisible = true;
},
// 弹窗确认
sysConfirm() {
//刷新表格数据
this.refresh();
},
refresh() {
//刷新表格数据
this.$emit('refresh');
}
}
}
</script>
<style>
.sysSetTable_tooltip {
max-width: 80%;
}
</style>
\ No newline at end of file
......@@ -8,13 +8,13 @@
// import './element-#3E8EF7/index.css' // 当前主题色
export default {
list: [
'#0BB2D4', // 青色
'#3E8EF7', // 蓝色
'#0BB2D4', // 青色
'#11C26D', // 绿色
'#9463F7', // 紫色
'#17B3A3', // 蓝绿色
'#667AFA', // 靛青色
'#997B71', // 棕色
'#9463F7', // 紫色
'#757575', // 灰色
'#EB6709', // 橙色
'#F74584', // 粉红色
......
......@@ -75,7 +75,13 @@ import {
Loading,
MessageBox,
Message,
Notification
Notification,
Drawer,
Image,
Link,
Avatar,
Skeleton,
SkeletonItem
} from 'element-ui'
Vue.use(Pagination)
......@@ -141,6 +147,12 @@ Vue.use(Header)
Vue.use(Aside)
Vue.use(Main)
Vue.use(Footer)
Vue.use(Drawer)
Vue.use(Image)
Vue.use(Link)
Vue.use(Avatar)
Vue.use(Skeleton)
Vue.use(SkeletonItem)
Vue.use(Loading.directive)
......
......@@ -5,10 +5,18 @@ import store from '@/store' // api: https://github.com/vuejs/v
import VueCookie from 'vue-cookie' // api: https://github.com/alfhen/vue-cookie
import '@/element-ui' // api: https://github.com/ElemeFE/element
import '@/icons' // api: http://www.iconfont.cn/
// 引入echarts
import echarts from "@/components/ecahrts";
// 挂载到vue实例中
Vue.prototype.$echarts = echarts
// import '@/element-ui-theme'
// 引入主题样式
import '@/assets/theme/theme_0BB2D4/index.css'
import '@/assets/theme/theme_3E8EF7/index.css'
import '@/assets/theme/theme_11C26D/index.css'
import '@/assets/theme/theme_9463F7/index.css'
import '@/assets/scss/index.scss'
import httpRequest from '@/utils/httpRequest' // api: https://github.com/axios/axios
......@@ -22,7 +30,7 @@ Vue.use(VueClipboard)
// 全局注册表格empty组件
import TableEmpty from '@/components/TableEmpty/'
import { setCookie } from './utils/cookie'
import { isEmpty } from '@/utils/validate.js'
Vue.component('TableEmpty', TableEmpty)
Vue.use(VueJsonp)
......@@ -42,7 +50,7 @@ if (process.env.NODE_ENV !== 'production') {
// 挂载全局
Vue.prototype.$http = httpRequest // ajax请求方法
Vue.prototype.isAuth = isAuth // 权限方法
setCookie('token')
Vue.prototype.isEmpty = isEmpty //非空判断
// 保存整站vuex本地储存初始状态
window.SITE_CONFIG['storeState'] = cloneDeep(store.state)
......
module.exports = file => require('@/views/' + file + '.vue').default
module.exports = file => () => import('@/views/' + file + '.vue')
......@@ -3,6 +3,7 @@ import Vuex from "vuex";
import cloneDeep from "lodash/cloneDeep";
import common from "./modules/common";
import user from "./modules/user";
import app from "./modules/app";
import { getMallRole } from "../utils/cookie";
Vue.use(Vuex);
......@@ -12,23 +13,31 @@ const isDev = process.env.NODE_ENV === "development";
export default new Vuex.Store({
state: {
baseURL: !isDev
? "https://pc.kuaidi.ledianyun.com/"
: "https://pc.kuaidi.ledianyun.com/",
? "http://api.kuaidi.ledianyun.com/"
: "http://api.kuaidi.ledianyun.com/",
domainURL: !isDev
? "http://pc.kuaidi.ledianyun.com/"
: "http://pc.kuaidi.ledianyun.com/",
designBaseURL: "http://api.kuaidi.ledianyun.com/",
designBaseURL2: "http://1.12.76.77:8181/sqx_fast/",
designTestURL: "http://api.kuaidi.ledianyun.com/",
pageLoading: false
},
modules: {
common,
user,
app
},
mutations: {
// 重置vuex本地储存状态
resetStore(state) {
Object.keys(state).forEach((key) => {
Object.keys(state).forEach(key => {
state[key] = cloneDeep(window.SITE_CONFIG["storeState"][key]);
});
},
setPageLoading(state, isShow) {
state.pageLoading = isShow;
}
},
strict: process.env.NODE_ENV !== "production",
strict: process.env.NODE_ENV !== "production"
});
export default {
state: {
shop_name: ""
},
mutations: {}
};
import { getMallRole } from "./cookie";
export function arrHas(min, max) {
for (let item of min) {
if (max.includes(item)) {
return true;
}
}
return false;
}
export function setRole(role) {
let str = null;
if (role) {
str = JSON.stringify(role);
}
window.sessionStorage.setItem("role", str);
}
export function getRole() {
return window.sessionStorage.getItem("role")
? JSON.parse(window.sessionStorage.getItem("role"))
: [];
}
export function filterRouter(routers, role) {
let newRouter = {};
for (let i in routers) {
let item = routers[i];
if (i == "index") {
newRouter[i] = [];
}
let arr;
arr = item.map(item => {
if (!item.disabled) {
if (!arrHas(role, item.role)) {
item.noAuth = true;
} else {
item.noAuth = false;
}
}
return item;
});
if (arr.length > 0) {
newRouter[i] = arr;
}
}
return newRouter;
}
export function canUseBtn(disableArr) {
let role = getMallRole();
if (arrHas(disableArr, role)) {
return true;
} else {
return false;
}
}
import Vue from "vue";
import { Decrypt } from "./secret";
// let domain = process.env.NODE_ENV == 'development' ? '' : config.extraData.cookie.domain;
const cookie_pre = config.extraData.cookie.pre ? config.extraData.cookie.pre : 'kuaidi';
const cookie_pre = config.extraData.cookie.pre
? config.extraData.cookie.pre
: "kuaidi";
export function getMallToken() {
let token =
"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiIsImp0aSI6IiJ9.eyJpc3MiOiIiLCJhdWQiOiIiLCJqdGkiOiIiLCJpYXQiOjE2ODIyNDY0MzgsIm5iZiI6MTY4MjI0NjQzOCwiZXhwIjoxNjgyODUxMjM4LCJ0b2tlbiI6ImI0M2I3OWMzYTdlMTE5Y2ZmOTYyYmQwY2Y0MTk1YTRmIiwiYnRva2VuIjoiYjQzYjc5YzNhN2UxMTljZmY5NjJiZDBjZjQxOTVhNGYiLCJyb2xlIjoiYnVzaW5lc3MiLCJiaWQiOiIxIiwibmFtZSI6IjE4NzEwODQ3MzA4IiwicGhvbmUiOiIxODcxMDg0NzMwOCIsInNvdXJjZSI6InBjIiwiaW5kdXN0cnlfaWQiOiIxIiwiaW5kdXN0cnlfYWxpYXMiOiJzdG9yZSIsImluZHVzdHJ5X2xldmVsX2lkIjoiMiIsImluZHVzdHJ5X2xldmVsX2FsaWFzIjoiYWR2YW5jZWQiLCJzaG9wX2lkIjoiMSIsIm10b2tlbiI6IjkyM2YyNjlmNTdmZGJhZWU4ZTFhMjA3ZjlmMWYyYThkIiwidHlwZSI6IiIsInRoaXJkX2FwcGlkIjoiIiwiY3VycmVudF9idG9rZW4iOiJiNDNiNzljM2E3ZTExOWNmZjk2MmJkMGNmNDE5NWE0ZiIsImFjY291bnRfdHlwZSI6IjEiLCJhY2NvdW50X3JvbGVzIjpbIm1hc3RlciJdLCJzd2l0Y2hfdGltZSI6MTY4MjQxNTQwNn0.XHJXEZdOOC3V8sdQsk6xQBccrWSCVPdXXqbkJ5zuzr0";
if (process.env.NODE_ENV === "development") {
return token;
} else return getCookie("token");
}
export function getMallRole() {
let role = ["master"];
let Roles = Vue.cookie.get(cookie_pre+"token");
if (Roles) {
return JSON.parse(Decrypt(Roles)).roles;
} else {
return role;
}
let role = ["master"];
let Roles = getMallToken();
if (Roles) {
return JSON.parse(Decrypt(Roles)).roles;
} else {
return role;
}
}
// 获取店铺信息
export function getMallInfo() {
return getCookie(cookie_pre + "storeMallInfo");
}
export function setCookie(cookie) {
if(cookie == 'token'){
Vue.cookie.set(cookie_pre+"token", 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiIsImp0aSI6IiJ9.eyJpc3MiOiIiLCJhdWQiOiIiLCJqdGkiOiIiLCJpYXQiOjE2ODEyMDUwNzYsIm5iZiI6MTY4MTIwNTA3NiwiZXhwIjoxNjgxODA5ODc2LCJ0b2tlbiI6ImI0M2I3OWMzYTdlMTE5Y2ZmOTYyYmQwY2Y0MTk1YTRmIiwiYnRva2VuIjoiYjQzYjc5YzNhN2UxMTljZmY5NjJiZDBjZjQxOTVhNGYiLCJyb2xlIjoiYnVzaW5lc3MiLCJiaWQiOiIxIiwibmFtZSI6IjE4NzEwODQ3MzA4IiwicGhvbmUiOiIxODcxMDg0NzMwOCIsInNvdXJjZSI6InBjIiwiY2VtZXRlcnlfaWQiOiIiLCJpbmR1c3RyeV9pZCI6IjEiLCJpbmR1c3RyeV9hbGlhcyI6InN0b3JlIiwiaW5kdXN0cnlfbGV2ZWxfaWQiOiIyIiwiaW5kdXN0cnlfbGV2ZWxfYWxpYXMiOiJhZHZhbmNlZCIsInNob3BfaWQiOiIxIiwibXRva2VuIjoiOTIzZjI2OWY1N2ZkYmFlZThlMWEyMDdmOWYxZjJhOGQiLCJ0eXBlIjoiIiwidGhpcmRfYXBwaWQiOiIiLCJjdXJyZW50X2J0b2tlbiI6ImI0M2I3OWMzYTdlMTE5Y2ZmOTYyYmQwY2Y0MTk1YTRmIiwiYWNjb3VudF90eXBlIjoiMSIsImFjY291bnRfcm9sZXMiOlsibWFzdGVyIl0sInN3aXRjaF90aW1lIjoxNjgxMjA1NDk0fQ._D73SkAoataYGsDhKy_-0_tyobYsEM2EFkPVaAL5QAk')
}else{
Vue.cookie.set(cookie)
}
if (cookie == "token") {
Vue.cookie.set(
cookie_pre + "storeMallToken",
"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiIsImp0aSI6IiJ9.eyJpc3MiOiIiLCJhdWQiOiIiLCJqdGkiOiIiLCJpYXQiOjE2ODEyMDUwNzYsIm5iZiI6MTY4MTIwNTA3NiwiZXhwIjoxNjgxODA5ODc2LCJ0b2tlbiI6ImI0M2I3OWMzYTdlMTE5Y2ZmOTYyYmQwY2Y0MTk1YTRmIiwiYnRva2VuIjoiYjQzYjc5YzNhN2UxMTljZmY5NjJiZDBjZjQxOTVhNGYiLCJyb2xlIjoiYnVzaW5lc3MiLCJiaWQiOiIxIiwibmFtZSI6IjE4NzEwODQ3MzA4IiwicGhvbmUiOiIxODcxMDg0NzMwOCIsInNvdXJjZSI6InBjIiwiY2VtZXRlcnlfaWQiOiIiLCJpbmR1c3RyeV9pZCI6IjEiLCJpbmR1c3RyeV9hbGlhcyI6InN0b3JlIiwiaW5kdXN0cnlfbGV2ZWxfaWQiOiIyIiwiaW5kdXN0cnlfbGV2ZWxfYWxpYXMiOiJhZHZhbmNlZCIsInNob3BfaWQiOiIxIiwibXRva2VuIjoiOTIzZjI2OWY1N2ZkYmFlZThlMWEyMDdmOWYxZjJhOGQiLCJ0eXBlIjoiIiwidGhpcmRfYXBwaWQiOiIiLCJjdXJyZW50X2J0b2tlbiI6ImI0M2I3OWMzYTdlMTE5Y2ZmOTYyYmQwY2Y0MTk1YTRmIiwiYWNjb3VudF90eXBlIjoiMSIsImFjY291bnRfcm9sZXMiOlsibWFzdGVyIl0sInN3aXRjaF90aW1lIjoxNjgxMjA1NDk0fQ._D73SkAoataYGsDhKy_-0_tyobYsEM2EFkPVaAL5QAk"
);
} else {
Vue.cookie.set(cookie);
}
}
export function getCookie(cookie) {
if(cookie == 'token'){
return Vue.cookie.get(cookie_pre+"token")
}
return Vue.cookie.get(cookie)
if (cookie == "token") {
console.log(
"----token---",
Vue.cookie.get(cookie_pre + "storeMallToken")
);
return Vue.cookie.get(cookie_pre + "storeMallToken");
}
return Vue.cookie.get(cookie_pre + cookie);
}
export function removeCookie(cookie) {
if(cookie == 'token'){
Vue.cookie.delete(cookie_pre + "storeMallToken")
}else{
Vue.cookie.delete(cookie)
}
if (cookie == "token") {
Vue.cookie.delete(cookie_pre + "storeMallToken");
} else {
Vue.cookie.delete(cookie);
}
}
import Vue from 'vue'
import axios from 'axios'
import router from '@/router'
import qs from 'qs'
import merge from 'lodash/merge'
import { clearLoginInfo } from '@/utils'
import store from '../store'
import { getCookie } from './cookie'
import Vue from "vue";
import axios from "axios";
import router from "@/router";
import qs from "qs";
import merge from "lodash/merge";
import { clearCookie } from "@/utils";
import store from "../store";
import { getMallToken } from "./cookie";
import { Message } from "element-ui";
const http = axios.create({
timeout: 1000 * 30,
headers: {
'Content-Type': 'application/json; charset=utf-8',
'Accept': '*/*'
}
})
timeout: 1000 * 30,
headers: {
"Content-Type": "application/json; charset=utf-8",
Accept: "*/*"
}
});
/**
* 请求拦截
*/
http.interceptors.request.use(config => {
config.headers['token'] = getCookie('token') // 请求头带上token
return config
}, error => {
return Promise.reject(error)
})
http.interceptors.request.use(
config => {
config.headers["token"] = getMallToken(); // 请求头带上token
//判断baseURL
// if (config.source === 'cm') config.baseURL = store.state.baseURL;
return config;
},
error => {
return Promise.reject(error);
}
);
/**
* 响应拦截
*/
http.interceptors.response.use(response => {
let authErrors = [10001, 10002, 10003, 10004, 401];
if (response.data && authErrors.indexOf(response.data.code) > -1) { // 401, token失效
Message({
message: response.data['message'] + ',请重新选择',
type: 'error',
duration: 1.5 * 1000,
onClose: () => {
clearLoginInfo()
sessionStorage.clear()
// window.location.href = store.state.domainURL + 'shoplist';
}
})
// router.push({ name: 'login' })
}
return response
}, error => {
return Promise.reject(error)
})
http.interceptors.response.use(
response => {
let authErrors = [10001, 10002, 10003, 10004, 401];
if (response.data && authErrors.indexOf(response.data.code) > -1) {
// 401, token失效
Message({
message: response.data["msg"],
type: "error",
duration: 1.5 * 1000,
onClose: () => {
clearCookie();
sessionStorage.clear();
window.location.href = store.state.domainURL + 'shoplist';
}
});
// router.push({ name: 'login' })
} else if (response.data.error && response.data.error !== 0) {
console.log("----------", response.data);
Message({
message: response.data["error_reason"],
type: "error",
duration: 1.5 * 1000
});
} else if (response.data.code && response.data.code !== 0) {
Message({
message: response.data["msg"],
type: "error",
duration: 1.5 * 1000
});
}
return (response.data.error != null && response.data.code != null) ? response : response.data;
},
error => {
Message({
message: "哎呀!网络繁忙,请刷新重试!",
type: "error",
duration: 3 * 1000
});
return Promise.reject(error);
}
);
/**
* 请求地址处理
* @param {*} actionName action方法名称
*/
http.adornUrl = (actionName) => {
// 非生产环境 && 开启代理, 接口前缀统一使用[/proxyApi/]前缀做代理拦截!
return (process.env.NODE_ENV !== 'production' && process.env.OPEN_PROXY ? '/proxyApi/' : window.SITE_CONFIG.baseUrl) + actionName
http.adornUrl = actionName => {
// 非生产环境 && 开启代理, 接口前缀统一使用[/proxyApi/]前缀做代理拦截!
return (
(process.env.NODE_ENV !== "production" && process.env.OPEN_PROXY
? "/proxyApi/"
: window.SITE_CONFIG.baseUrl) + actionName
);
// return 'http://1.12.76.77:8181/sqx_fast' + actionName
// return 'https://admin.sj088.cn/sqx_fast/' + actionName
}
};
http.adornLdyUrl = actionName => {
// 非生产环境 && 开启代理, 接口前缀统一使用[/ldyApi/]前缀做代理拦截!
return (
(process.env.NODE_ENV !== "production" && process.env.OPEN_PROXY
? "/ldyApi/"
: window.SITE_CONFIG.baseUrl_ldy) + actionName
);
};
http.adornUrl2 = (actionName) => {
// 非生产环境 && 开启代理, 接口前缀统一使用[/sqx_fast/]前缀做代理拦截!
// return (process.env.NODE_ENV !== 'production' && process.env.OPEN_PROXY ? '/sqx_fast/' : window.SITE_CONFIG.baseUrl) + actionName
return '/api' + actionName
}
http.adornUrl2 = actionName => {
// 非生产环境 && 开启代理, 接口前缀统一使用[/sqx_fast/]前缀做代理拦截!
// return (process.env.NODE_ENV !== 'production' && process.env.OPEN_PROXY ? '/sqx_fast/' : window.SITE_CONFIG.baseUrl) + actionName
return "/api" + actionName;
};
/**
* get请求参数处理
* @param {*} params 参数对象
* @param {*} openDefultParams 是否开启默认参数?
*/
http.adornParams = (params = {}, openDefultParams = false) => {
var defaults = {
't': new Date().getTime()
}
return openDefultParams ? merge(defaults, params) : params
}
var defaults = {
t: new Date().getTime()
};
return openDefultParams ? merge(defaults, params) : params;
};
/**
* post请求数据处理
......@@ -84,12 +124,12 @@ http.adornParams = (params = {}, openDefultParams = false) => {
* json: 'application/json; charset=utf-8'
* form: 'application/x-www-form-urlencoded; charset=utf-8'
*/
http.adornData = (data = {}, openDefultdata = false, contentType = 'json') => {
var defaults = {
't': new Date().getTime()
}
data = openDefultdata ? merge(defaults, data) : data
return contentType === 'json' ? JSON.stringify(data) : qs.stringify(data)
}
http.adornData = (data = {}, openDefultdata = false, contentType = "json") => {
var defaults = {
t: new Date().getTime()
};
data = openDefultdata ? merge(defaults, data) : data;
return contentType === "json" ? JSON.stringify(data) : qs.stringify(data);
};
export default http
export default http;
......@@ -49,12 +49,24 @@ export function treeDataTranslate (data, id = 'id', pid = 'parentId') {
return res
}
// 删除信息
export function clearCookie () {
removeCookie('storeMallToken');
removeCookie('storeMallInfo');
}
/**
* 清除登录信息
*/
export function clearLoginInfo () {
// Vue.cookie.delete('token')
removeCookie('token');
removeCookie('storeMallRoles');
removeCookie('userToken');
removeCookie('userInfo');
removeCookie('storeMallInfo');
removeCookie('storeMallToken');
removeCookie('designToken');
store.commit('resetStore')
router.options.isAddDynamicMenuRoutes = false
}
......@@ -3,8 +3,6 @@ const CryptoJS = require('crypto-js'); //引用AES源码js
const key = CryptoJS.enc.Utf8.parse("wTuQtvphrscRMoNY"); //十六位十六进制数作为秘钥
const iv = CryptoJS.enc.Utf8.parse('yku3fNnI2HJQWKd3'); //十六位十六进制数作为秘钥偏移量
//解密方法
export function Decrypt(word) {
let decrypted = CryptoJS.AES.decrypt(word, key, { iv: iv, mode: CryptoJS.mode.CBC , padding: CryptoJS.pad.Pkcs7 });
......
......@@ -14,6 +14,6 @@ export function initTheme() {
changeTheme(theme);
} else {
// 默认颜色
changeTheme(elTheme.list[1]);
changeTheme(elTheme.list[0]);
}
}
......@@ -29,3 +29,8 @@ export function isPhone (s) {
export function isURL (s) {
return /^http[s]?:\/\/.*/.test(s)
}
// 非空判断,不包括0
export function isEmpty(val) {
return val == null || val === ''
}
......@@ -5,8 +5,12 @@
<el-button style="margin: 10px 0;" :disabled="!isAuth('bannerList:add')" size="mini" type="primary"
icon="document" @click="addNotice">添加轮播图</el-button>
</div>
<el-table v-loading="tableDataLoading" :data="tableData" >
<el-table-column fixed prop="id" label="编号" width="50"></el-table-column>
<el-table :key="activeName" v-loading="tableDataLoading" :data="tableData" >
<!-- ele 暂无数据插槽 -->
<template slot="empty">
<TableEmpty />
</template>
<el-table-column fixed type="index" label="编号" width="50"></el-table-column>
<el-table-column prop="imageUrl" label="头像">
<template slot-scope="scope">
  <img :src="scope.row.imageUrl" width="60" height="60" />
......@@ -89,8 +93,8 @@
</el-table-column>
<el-table-column prop="type" label="类型">
<template slot-scope="scope">
<span style="color: #4f9dec;cursor: pointer;" v-if="scope.row.type === 2 ">链接</span>
<span style="color: #4f9dec;cursor: pointer;" v-if="scope.row.type === 1 ">文本</span>
<span style="color: var(--primary-color);cursor: pointer;" v-if="scope.row.type === 2 ">链接</span>
<span style="color: var(--primary-color);cursor: pointer;" v-if="scope.row.type === 1 ">文本</span>
</template>
</el-table-column>
<el-table-column prop="url" label="链接">
......@@ -161,8 +165,12 @@
<el-button style="margin: 10px 0;" :disabled="!isAuth('bannerList:add')" size="mini" type="primary"
icon="document" @click="addNotice">添加</el-button>
</div>
<el-table v-loading="tableDataLoading" :data="tableData" >
<el-table-column fixed prop="id" label="编号" width="50"></el-table-column>
<el-table :key="activeName" v-loading="tableDataLoading" :data="tableData">
<!-- ele 暂无数据插槽 -->
<template slot="empty">
<TableEmpty />
</template>
<el-table-column fixed type="index" label="编号" width="50"></el-table-column>
<el-table-column prop="imageUrl" label="头像">
<template slot-scope="scope">
  <img :src="scope.row.imageUrl" width="60" height="60" />
......@@ -208,8 +216,12 @@
<el-button style="margin: 10px 0;" :disabled="!isAuth('bannerList:add')" size="mini" type="primary"
icon="document" @click="addNotice">添加</el-button>
</div>
<el-table v-loading="tableDataLoading" :data="tableData" >
<el-table-column fixed prop="id" label="编号" width="50"></el-table-column>
<el-table :key="activeName" v-loading="tableDataLoading" :data="tableData" >
<!-- ele 暂无数据插槽 -->
<template slot="empty">
<TableEmpty />
</template>
<el-table-column fixed type="index" label="编号" width="50"></el-table-column>
<el-table-column prop="imageUrl" label="头像">
<template slot-scope="scope">
  <img :src="scope.row.imageUrl" width="60" height="60" />
......@@ -255,8 +267,12 @@
<el-button style="margin: 10px 0;" :disabled="!isAuth('bannerList:add')" size="mini" type="primary"
icon="document" @click="addNotice">添加背景图</el-button>
</div>
<el-table v-loading="tableDataLoading" :data="tableData" >
<el-table-column fixed prop="id" label="编号" width="50"></el-table-column>
<el-table v-loading="tableDataLoading" :data="tableData" :key="activeName">
<!-- ele 暂无数据插槽 -->
<template slot="empty">
<TableEmpty />
</template>
<el-table-column fixed type="index" label="编号" width="50"></el-table-column>
<el-table-column prop="imageUrl" label="头像">
<template slot-scope="scope">
  <img :src="scope.row.imageUrl" width="60" height="60" />
......@@ -300,8 +316,12 @@
<el-button style="margin: 10px 0;" :disabled="!isAuth('bannerList:add')" size="mini" type="primary"
icon="document" @click="addNotice">添加分享图</el-button>
</div>
<el-table v-loading="tableDataLoading" :data="tableData" >
<el-table-column fixed prop="id" label="编号" width="50"></el-table-column>
<el-table v-loading="tableDataLoading" :data="tableData" :key="activeName">
<!-- ele 暂无数据插槽 -->
<template slot="empty">
<TableEmpty />
</template>
<el-table-column fixed type="index" label="编号" width="50"></el-table-column>
<el-table-column prop="imageUrl" label="头像">
<template slot-scope="scope">
  <img :src="scope.row.imageUrl" width="60" height="60" />
......
<template>
<div>
<search-form :labelWidth="'50px'" :searchForm="formItems" :searchData="searchData" @search="serachHandle">
<template slot="searchFormOptions" v-if="isSlot">
<el-button size="mini" type="warning" :disabled="!isAuth('coupon:delete')" @click="excelStair">导出excel
</el-button>
</template>
</search-form>
<el-table :key="activeName" v-loading="tableDataLoading" :data="tableData.list">
<!-- ele 暂无数据插槽 -->
<template slot="empty">
<TableEmpty />
</template>
<!-- <el-table-column prop="couponCardId" fixed="left" label="编号" width="80">
</el-table-column> -->
<el-table-column type="index" fixed="left" label="编号" width="80">
</el-table-column>
<el-table-column prop="couponCardNo" label="卡密">
</el-table-column>
<el-table-column label="领取用户">
<template slot-scope="scope">
<span style="color: var(--primary-color);cursor: pointer;" @click="updates(scope.row)"
v-if="scope.row.user">{{
scope.row.user.userName }}</span>
</template>
</el-table-column>
<el-table-column label="状态">
<template slot-scope="scope">
<span style="color: var(--primary-color);" v-if="scope.row.status == 1">待领取</span>
<span v-if="scope.row.status == 2">已领取</span>
</template>
</el-table-column>
<el-table-column prop="createTime" label="创建时间" width="150">
</el-table-column>
</el-table>
<div style="text-align: center;margin-top: 10px;">
<el-pagination @size-change="handleSizeChangeList" @current-change="handleCurrentChangeList"
:page-sizes="[10, 20, 30, 50, 100]" :page-size="size" :current-page="page"
layout="total,sizes, prev, pager, next" :total="tableData.totalCount">
</el-pagination>
</div>
</div>
</template>
<script>
import SearchForm from '@/components/SearchForm'
export default {
props: {
couponCardTypeId: {
type: String | Number,
default: ''
},
isSlot: {
type: Boolean,
default: false
},
activeName: {
type: String,
default: 'kami'
},
},
components: { SearchForm },
watch: {
couponCardTypeId(val) {
if (val) {
this.serachHandle()
}
}
},
data() {
return {
searchData: {
couponIssueNameT: '',
status: 0,
},
formItems: [
{
label: '卡密',
prop: 'couponIssueNameT',
type: 'Input',
},
{
label: '状态',
prop: 'status',
type: 'Select',
options: [
{
label: '全部',
value: 0
},
{
label: '待领取',
value: 1
},
{
label: '已领取',
value: 2
}
]
},
],
size: 10,
page: 1,
tableDataLoading: false,
dialogFormVisible: false,
tableData: [],
}
},
methods: {
// 查询
serachHandle() {
this.page = 1
this.dataSelect()
},
handleSizeChangeList(val) {
this.size = val;
this.dataSelect()
},
handleCurrentChangeList(val) {
this.page = val;
this.dataSelect()
},
// 卡密列表
dataSelect() {
this.tableDataLoading = true
this.$http({
url: this.$http.adornUrl('couponCard/selectCouponCardList'),
method: 'get',
params: this.$http.adornParams({
'page': this.page,
'limit': this.size,
'couponCardNo': this.searchData.couponIssueNameT,
'status': this.searchData.status,
'couponCardTypeId': this.couponCardTypeId,
})
}).then(({
data
}) => {
this.tableDataLoading = false
let returnData = data.data;
this.tableData = returnData
})
},
// 导出
excelStair() {
// var endTime = this.endTime
// if (this.endTime != '') {
// endTime = this.endTime + " 23:59:59"
// }
this.$http({
url: this.$http.adornUrl('couponCard/excelCouponCardList'),
method: 'get',
responseType: 'blob',
params: this.$http.adornParams({
'couponCardNo': this.searchData.couponIssueNameT,
'status': this.searchData.status,
'couponCardTypeId': this.couponCardTypeId,
})
}).then(({
data
}) => {
let blob = new Blob([data], {
type: 'application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
})
if (window.navigator.msSaveOrOpenBlob) {
navigator.msSaveBlob(blob)
} else {
let url = window.URL.createObjectURL(blob)
let elink = document.createElement('a')
elink.download = '订单列表.xlsx'
elink.style.display = 'none'
elink.href = url
document.body.appendChild(elink)
elink.click()
document.body.removeChild(elink)
}
})
},
// 详情跳转
updates(row) {
this.$router.push({
path: '/userDetail',
query: {
userId: row.userId
}
})
},
},
mounted() {
this.dataSelect()
}
};
</script>
<style scoped="scoped"></style>
<template>
<div>
<div style="display: inline-block;">
<div style="margin:2% 0;display: inline-block;">
<span>优惠券名称:</span>
<el-input style="width:200px;" @keydown.enter.native="select" clearable placeholder="请输入优惠券名称"
v-model="couponName"></el-input>
</div>
<div style="margin:2% 0;display: inline-block;">
<span>手机号:</span>
<el-input style="width:200px;" @keydown.enter.native="select" clearable placeholder="请输入手机号"
v-model="phone"></el-input>
</div>
<div style="margin:2% 0;display: inline-block;">
<span>状态:</span>
<el-select v-model="status" style="width:150px;margin-left: 10px;" @change="select(status)">
<el-option v-for="item in statesnum" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>&nbsp;&nbsp;&nbsp;&nbsp;
</div>
<el-button style='margin-left:15px;' size="mini" type="primary" icon="document" @click="select">查询
</el-button>
<el-button style='margin-left:15px;' size="mini" type="primary" icon="document" @click="cleans">重置
</el-button>
<el-button style='margin-left:15px;' size="mini" type="primary" icon="document" @click="refresh">刷新
</el-button>
</div>
<el-table v-loading="tableDataLoading" :data="tableData.list">
<el-table-column prop="id" label="编号" width="80">
</el-table-column>
<el-table-column prop="couponName" label="优惠券名称" width="150">
</el-table-column>
<el-table-column prop="couponPicture" label="优惠券图片">
<template slot-scope="scope">
<img v-if="scope.row.couponPicture" :src="scope.row.couponPicture" alt="" width="40" height="40">
</template>
</el-table-column>
<el-table-column prop="nickName" label="所属用户">
<template slot-scope="scope">
<span style="color: #3E8EF7;cursor: pointer;" @click="updates(scope.row)"
v-if="scope.row.nickName">{{scope.row.nickName}}</span>
</template>
</el-table-column>
<el-table-column prop="avatar" label="用户头像">
<template slot-scope="scope">
<img v-if="scope.row.avatar" :src="scope.row.avatar" alt="" width="40" height="40">
<search-form :searchForm="formItems" :searchData="searchData" @search="serachHandle">
</search-form>
<el-card shadow="never" class="card-common">
<el-table v-loading="tableDataLoading" :data="tableData.list">
<!-- ele 暂无数据插槽 -->
<template slot="empty">
<TableEmpty />
</template>
</el-table-column>
<el-table-column prop="phone" label="手机号">
</el-table-column>
<el-table-column prop="money" label="优惠券面值">
</el-table-column>
<el-table-column prop="minMoney" label="优惠券最低消费">
</el-table-column>
<el-table-column prop="expirationTime" label="优惠券失效时间" width="150">
</el-table-column>
<el-table-column label="状态">
<template slot-scope="scope">
<span style="color: #3E8EF7;" v-if="scope.row.status == 0">未使用</span>
<span v-if="scope.row.status == 1">已使用</span>
<span v-if="scope.row.status == 2">已过期</span>
</template>
</el-table-column>
<el-table-column prop="createTime" label="创建时间" width="150">
</el-table-column>
</el-table>
<div style="text-align: center;margin-top: 10px;">
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
:page-sizes="[10, 20, 30, 50, 100]" :page-size="size" :current-page="page"
layout="total,sizes, prev, pager, next" :total="tableData.totalCount">
</el-pagination>
</div>
<!-- <el-table-column prop="id" label="编号" width="80"> -->
<el-table-column type="index" label="编号" width="80">
</el-table-column>
<el-table-column prop="couponName" label="优惠券名称" width="150">
</el-table-column>
<el-table-column prop="couponPicture" label="优惠券图片">
<template slot-scope="scope">
<img v-if="scope.row.couponPicture" :src="scope.row.couponPicture" alt="" width="40" height="40">
</template>
</el-table-column>
<el-table-column prop="nickName" label="所属用户">
<template slot-scope="scope">
<span style="color: #3E8EF7;cursor: pointer;" @click="updates(scope.row)"
v-if="scope.row.nickName">{{
scope.row.nickName }}</span>
</template>
</el-table-column>
<el-table-column prop="avatar" label="用户头像">
<template slot-scope="scope">
<img v-if="scope.row.avatar" :src="scope.row.avatar" alt="" width="40" height="40">
</template>
</el-table-column>
<el-table-column prop="phone" label="手机号">
</el-table-column>
<el-table-column prop="money" label="优惠券面值">
</el-table-column>
<el-table-column prop="minMoney" label="优惠券最低消费">
</el-table-column>
<el-table-column prop="expirationTime" label="优惠券失效时间" width="150">
</el-table-column>
<el-table-column label="状态">
<template slot-scope="scope">
<span style="color: #3E8EF7;" v-if="scope.row.status == 0">未使用</span>
<span v-if="scope.row.status == 1">已使用</span>
<span v-if="scope.row.status == 2">已过期</span>
</template>
</el-table-column>
<el-table-column prop="createTime" label="创建时间" width="150">
</el-table-column>
</el-table>
<div style="text-align: center;margin-top: 10px;">
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
:page-sizes="[10, 20, 30, 50, 100]" :page-size="size" :current-page="page"
layout="total,sizes, prev, pager, next" :total="tableData.totalCount">
</el-pagination>
</div>
</el-card>
</div>
</template>
<script>
export default {
data() {
return {
size: 10,
page: 1,
import SearchForm from '@/components/SearchForm'
export default {
components: { SearchForm },
data() {
return {
searchData: {
couponName: '',
formLabelWidth: '200px',
tableDataLoading: false,
dialogFormVisible: false,
tableData: [],
phone: '',
status:'',
statesnum: [{
label: '全部',
value: ''
},
{
label: '未使用',
value: 0
},
{
label: '已使用',
value: 1
},
{
label: '已过期',
value: 2
},
],
}
},
methods: {
handleSizeChange(val) {
this.size = val;
this.dataSelect()
},
handleCurrentChange(val) {
this.page = val;
this.dataSelect()
},
// 查询
select() {
this.page = 1
this.dataSelect()
},
// 重置
cleans() {
this.page = 1
this.phone = ''
this.status = ''
this.couponName = ''
this.dataSelect()
},
// 刷新
refresh() {
this.dataSelect()
},
//获取已发布优惠券数据
dataSelect() {
this.tableDataLoading = true
this.$http({
url: this.$http.adornUrl('couponUser/selectCouponUserList'),
method: 'get',
params: this.$http.adornParams({
'page': this.page,
'limit': this.size,
'couponName': this.couponName,
'phone': this.phone,
'status':this.status,
})
}).then(({
data
}) => {
this.tableDataLoading = false
let returnData = data.data;
this.tableData = returnData
})
},
// 详情跳转
updates(row) {
this.$router.push({
path: '/userDetail',
query: {
userId: row.userId
}
})
status: '',
},
formItems: [
{
label: '优惠券名称',
prop: 'couponName',
type: 'Input',
},
{
label: '手机号',
prop: 'phone',
type: 'Input',
},
{
label: '状态',
prop: 'status',
type: 'Select',
options: [
{
label: '全部',
value: ''
},
{
label: '未使用',
value: 0
},
{
label: '已使用',
value: 1
},
{
label: '已过期',
value: 2
}
]
},
],
size: 10,
page: 1,
tableDataLoading: false,
dialogFormVisible: false,
tableData: [],
}
},
methods: {
// 查询
serachHandle() {
this.page = 1
this.dataSelect()
},
mounted() {
handleSizeChange(val) {
this.size = val;
this.dataSelect()
}
};
},
handleCurrentChange(val) {
this.page = val;
this.dataSelect()
},
// 刷新
refresh() {
this.dataSelect()
},
//获取已发布优惠券数据
dataSelect() {
this.tableDataLoading = true
this.$http({
url: this.$http.adornUrl('couponUser/selectCouponUserList'),
method: 'get',
params: this.$http.adornParams({
'page': this.page,
'limit': this.size,
'couponName': this.couponName,
'phone': this.phone,
'status': this.status,
})
}).then(({
data
}) => {
this.tableDataLoading = false
let returnData = data.data;
this.tableData = returnData
})
},
// 详情跳转
updates(row) {
this.$router.push({
path: '/userDetail',
query: {
userId: row.userId
}
})
},
},
created() {
this.dataSelect()
}
};
</script>
<style scoped="scoped">
.divhove {
position: absolute;
width: 100%;
height: 100%;
left: 0;
top: 0;
opacity: 0;
cursor: default;
text-align: center;
padding-top: 50%;
border-radius: 6px;
background-color: rgba(0, 0, 0, .5);
-webkit-transition: opacity .3s;
transition: opacity .3s;
}
.divhove {
position: absolute;
width: 100%;
height: 100%;
left: 0;
top: 0;
opacity: 0;
cursor: default;
text-align: center;
padding-top: 50%;
border-radius: 6px;
background-color: rgba(0, 0, 0, .5);
-webkit-transition: opacity .3s;
transition: opacity .3s;
}
.el-tag--medium {
margin-right: 10px;
}
.el-tag--medium {
margin-right: 10px;
}
.divhove:hover {
opacity: 0.8;
}
.divhove:hover {
opacity: 0.8;
}
</style>
......@@ -56,15 +56,15 @@
</el-table-column>
<!-- <el-table-column prop="userName" label="等级">
<template slot-scope="scope">
<div style="color: #4f9dec;cursor: pointer;" v-if="">
<div style="color: var(--primary-color);cursor: pointer;" v-if="">
{{scope.row.userName?scope.row.userName:'未绑定'}}
</div>
</template>
</el-table-column> -->
<el-table-column prop="phone" label="开通匹配">
<template slot-scope="scope">
<div style="color: #4f9dec;cursor: pointer;" v-if="scope.row.allowAddBill==1">正在匹配</div>
<div style="color: red;cursor: pointer;" v-if="scope.row.allowAddBill==0">禁止匹配</div>
<div style="color: var(--primary-color);cursor: pointer;" v-if="scope.row.allowAddBill==1">正在匹配</div>
<div style="color: #f56c6c;cursor: pointer;" v-if="scope.row.allowAddBill==0">禁止匹配</div>
</template>
</el-table-column>
<el-table-column prop="counts" label="渠道" width="200">
......@@ -273,15 +273,15 @@
</el-table-column>
<!-- <el-table-column prop="userName" label="等级">
<template slot-scope="scope">
<div style="color: #4f9dec;cursor: pointer;" v-if="">
<div style="color: var(--primary-color);cursor: pointer;" v-if="">
{{scope.row.userName?scope.row.userName:'未绑定'}}
</div>
</template>
</el-table-column> -->
<el-table-column prop="phone" label="开通匹配">
<template slot-scope="scope">
<div style="color: #4f9dec;cursor: pointer;" v-if="scope.row.allowAddBill==1">正在匹配</div>
<div style="color: red;cursor: pointer;" v-if="scope.row.allowAddBill==0">禁止匹配</div>
<div style="color: var(--primary-color);cursor: pointer;" v-if="scope.row.allowAddBill==1">正在匹配</div>
<div style="color: #f56c6c;cursor: pointer;" v-if="scope.row.allowAddBill==0">禁止匹配</div>
</template>
</el-table-column>
<el-table-column prop="counts" label="渠道" width="200">
......
<template>
<div class="notice_container">
<div class="tabs-nav">
<el-tabs v-model="activeName" @tab-click="togglePage(activeName)">
<el-tab-pane label="系统通知" name="4"></el-tab-pane>
</el-tabs>
<el-select v-model="filter" class="filter-status" size="small" placeholder="请选择" @change="getList(1)">
<el-option label="全部/不限" value="0"></el-option>
<el-option label="已读" value="2"></el-option>
<el-option label="未读" value="1"></el-option>
</el-select>
</div>
<div class="notice_box">
<template v-if="tableData.length > 0">
<div class="item" :class="{ 'readed': item.is_read == 2 }" v-for="(item, index) in tableData" :key="index"
@click="toDetail(item)">
<div class="header">
<h4 class="title">{{ item.title }}</h4>
</div>
<p class="info-content">{{ item.content }}
<span class="to-detail" v-if="activeName != 4" @click="toDetail(item)">【详情】</span>
</p>
<span class="time">
{{ item.post_time }}
<span class="to-read" v-if="item.is_read == 1 && activeName != 4"
@click="toRead(item.unique_id)">标记为已读</span>
</span>
<span class="del" @click="toDel(item.unique_id)" v-if="activeName != 4">
<i class="el-icon-circle-close"></i>
</span>
</div>
</template>
<!-- ele 暂无数据插槽 -->
<!-- <template v-else>
<TableEmpty />
</template> -->
<div class="nodata" v-else>
暂无通知
</div>
<div class="footer flex-box">
<el-pagination @current-change="handleCurrentChange" :current-page.sync="currentPage"
:page-sizes="[10, 20, 30]" :page-size="pageSize" layout="total,sizes, prev, pager, next,jumper"
@size-change="changePageSize" :total="total">
</el-pagination>
</div>
</div>
</div>
</template>
<script>
import { getNoticeList, operationRead, operationDelete } from "@/api/ldy/notice";
export default {
data() {
return {
activeName: '4',
filter: '0',
pageSize: 10,
currentPage: 1,
total: 0,
tableData: []
}
},
mounted() {
this.getList(1);
},
watch: {
$route: {
handler() {
this.activeName = this.$route.query.to ? this.$route.query.to : '4';
},
immediate: true
}
},
methods: {
toDetail(item) {
// new goAnyWhere(this, item)
this.$router.push({ name: 'noticeDetail', query: { noticeDetail: JSON.stringify(item) } })
},
togglePage(activeName) {
this.$router.push({ path: this.$route.path, query: { to: activeName } });
this.getList(1)
},
handleCurrentChange(val) {
this.getList(val)
},
changePageSize(val) {
this.pageSize = val
this.getList(1)
},
toRead(id) {
operationRead({ id }).then(res => {
if (res.error == 0) {
this.getList(this.currentPage)
}
})
},
toDel(id) {
operationDelete({ id }).then(res => {
if (res.error == 0) {
let page = this.currentPage > 1 && this.tableData.length == 1 ? this.currentPage - 1 : this.currentPage;
this.getList(page)
}
})
},
getList(val) {
let data = {
page: val,
page_size: this.pageSize,
category: this.activeName
}
if (this.filter != 0) {
data.is_read = this.filter
}
getNoticeList(data).then(res => {
this.currentPage = 1;
this.total = 0;
this.tableData = [
{
attach: "W4VAI56js5r611s99satp3bbIh1TIRs6",
category: 4,
content: "您好,教培行业整体解决方案上线,详细请咨询客户经理!",
created_at: "2021-07-01 07:17:42",
industry: "ADVANCED",
is_read: "1",
origin_unique_id: "26",
post_time: "2021-07-01 07:17",
role: "BUSINESS",
scene: "SYSTEM_UPGRADE",
title: "系统升级",
type: "LESTORE_NOTICE",
unique_id: "8B927B78-21BB-5C01-33AD-8CDCF3DEF27B",
}
];
// if (res.error == 0 && res.data) {
// this.currentPage = val;
// this.total = res.data.count;
// this.tableData = res.data.item;
// }
})
}
}
}
</script>
<style scoped lang="scss">
.notice_container {
.tabs-nav {
display: flex;
justify-content: space-between;
align-items: center;
}
.filter-status {
width: 120px;
margin-top: -6px;
}
.title {
margin: 0;
font-size: 15px;
line-height: 28px;
font-weight: 500;
}
.nodata {
font-size: 14px;
line-height: 120px;
color: #666;
text-align: center;
}
.footer {
margin-top: 15px;
text-align: right;
}
.item {
padding: 16px;
cursor: pointer;
&:first-child {
padding-top: 0;
}
.info-content,
.time {
font-size: 14px;
line-height: 24px;
color: #666;
}
}
}
</style>
\ No newline at end of file
<template>
<div class="notice_detail">
<el-card shadow="never" class="card-common" style="min-height: 200px">
<div slot="header" class="card_header">
<span class="card_title">{{noticeDetail.title}}</span>
</div>
<div class="content">
{{noticeDetail.content}}
</div>
</el-card>
</div>
</template>
<script>
export default {
data() {
return {
noticeDetail: {}
}
},
created() {
let noticeDetail = JSON.parse(this.$route.query.noticeDetail)
this.noticeDetail = noticeDetail || {}
}
}
</script>
<style scoped lang="scss">
.notice_detail{
.card_header {
display: flex;
justify-content: center;
}
}
</style>
\ No newline at end of file
<template>
<div>
<search-form :searchForm="formItems" :searchData="searchData" @search="serachHandle">
</search-form>
<el-card shadow="never" class="card-common">
<el-table v-loading="tableDataLoading" :data="tableData.records">
<!-- ele 暂无数据插槽 -->
<template slot="empty">
<TableEmpty />
</template>
<el-table-column prop="id" label="金额">
</el-table-column>
<el-table-column prop="userName" label="变化前">
</el-table-column>
<el-table-column prop="phone" label="变化后">
</el-table-column>
<el-table-column prop="type" label="类型">
<template slot-scope="scope">
<span v-if="scope.row.type == 1"><span class="badge—common primary"></span>订单支付</span>
<span v-if="scope.row.type == 2"><span class="badge—common"></span>订单退款</span>
</template>
</el-table-column>
<el-table-column prop="ordersNo" label="订单号">
</el-table-column>
<el-table-column prop="remark" label="备注">
</el-table-column>
<el-table-column prop="createTime" label="创建时间">
</el-table-column>
</el-table>
<div style="text-align: center;margin-top: 10px;">
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
:page-sizes="[5, 10, 15]" :page-size="size" :current-page="page"
layout="total,sizes, prev, pager, next,jumper" :total="tableData.total">
</el-pagination>
</div>
</el-card>
</div>
</template>
<script>
import SearchForm from '@/components/SearchForm'
import moment from 'moment';
export default {
components: {
SearchForm
},
data() {
return {
activeName: 'first',
size: 10,
page: 1,
totalnum: 0,
tableDataLoading: false,
tableData: [],
searchData: {
type: '', //类型
ordersNo: '', //订单号
remark: '', //备注
},
formItems: [
{
label: '类型',
prop: 'type',
type: 'Select',
options: [
{
label: '订单支付',
value: 1,
},
{
label: '订单退款',
value: 2,
},
],
},
{
label: '订单号',
prop: 'ordersNo',
type: 'Input',
},
{
label: '备注',
prop: 'remark',
type: 'Input',
},
]
}
},
methods: {
// 查询
serachHandle() {
this.page = 1
this.getTableData()
},
handleSizeChange(val) {
this.size = val;
this.getTableData()
},
handleCurrentChange(val) {
this.page = val;
this.getTableData()
},
//获取列表数据
getTableData() {
this.tableDataLoading = true
this.$http({
url: this.$http.adornUrl('Details/selectCouponList'),
method: 'get',
params: this.$http.adornParams({
'page': this.page,
'limit': this.size,
...this.searchData
})
}).then(({
data
}) => {
this.tableDataLoading = false
let tableData = data.data
this.tableData = tableData
this.totalnum = tableData.totalCount
})
},
// 复制
copys(number) {
var _this = this
this.$copyText(number).then(function (e) {
_this.$message({
message: '复制成功',
type: 'success'
});
}, function (e) {
_this.$message.error('复制失败');
})
},
},
created() {
this.getTableData()
}
};
</script>
<style scoped="scoped"></style>
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!