Commit 23874f93 authored by 王苓芝's avatar 王苓芝

Initial commit

parents
Pipeline #1302 failed with stages
{
"presets": [
["env", { "modules": false }],
"stage-2"
],
"plugins": ["transform-runtime"],
"comments": false,
"env": {
"test": {
"presets": ["env", "stage-2"],
"plugins": [ "istanbul" ]
}
}
}
node_modules/*
build/*
config/*
dist/*
lib/*
static/*
\ No newline at end of file
module.exports = {
root: true,
parserOptions: {
parser: 'babel-eslint',
},
env: {
browser: true,
node: true,
},
extends: [
'plugin:vue/essential',
// "plugin:vue/recommended",
"eslint:recommended",
// "@vue/prettier"
],
plugins: [
'vue',
'html',
'prettier',
],
rules: {
'prettier/prettier': 'error',
// 防止iview的标签报错
'vue/no-parsing-error': [2, { 'x-invalid-end-tag': false }],
'eqeqeq': 'off',
'vue/max-attributes-per-line': 'off',
'no-empty': ["error", { "allowEmptyCatch": true }],
'vue/no-v-html': 'off',
'vue/require-default-prop': 'off',
'arrow-parens': 'off', // allow paren-less arrow functions
'generator-star-spacing': 'off', // allow async-await
'no-unused-vars': 'error', // disabled no ununsed var
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off', // no use debugger in production
'indent': [2, 2, { SwitchCase: 1 }], // 2 space for tab for perttier
// 'space-before-function-paren': ['error', 'never'], // no space in function name for perttier
'no-console': ["off", { allow: ["warn", "error"] }],
"prefer-const": 2,//首选const
},
globals: {
Qiniu: true,
moment: true,
http: true,
LocalStorage: true,
Cookies: true,
Bus: true,
}
}
# Created by .ignore support plugin (hsz.mobi)
.idea
node_modules
dist
.eslintcache
\ No newline at end of file
// https://github.com/michael-ciniawsky/postcss-load-config
module.exports = {
"plugins": {
// to edit target browsers: use "browserlist" field in package.json
"autoprefixer": {}
}
}
// module.exports = {
// "printWidth": 200,
// "trailingComma": "es5",
// "singleQuote": true,
// }
module.exports = {
printWidth: 200, // 设置prettier单行输出(不折行)的(最大)长度
trailingComma: "es5",
tabWidth: 2, // 设置工具每一个水平缩进的空格数
semi: true, // 在语句末尾添加分号
singleQuote: true, // 使用单引号而非双引号
arrowParens: 'avoid', // 为单行箭头函数的参数添加圆括号,参数个数为1时可以省略圆括号
rangeStart: 0, // 只格式化某个文件的一部分
rangeEnd: Infinity, // 只格式化某个文件的一部分
};
\ No newline at end of file
module.exports = {
// Sentry options are required
organization: 'sentry',
project: 'new-op-ui',
apiKey: '2e7e0678d81d4542b09cdbc35812f1cbb07a4993cd13435ba49d9511be11ec95',
// Release version name/hash is required
release: 'new-op-ui@1.0.1',
baseSentryURL: 'http://sentry.quantgroups.com/api/0',
deleteAfterCompile: true,
include: /static\/js\//, // 只上传js和map文件
ignore: ['node_modules'],
suppressErrors: true,
filenameTransform: function (filename) {
return '~/' + filename
},
}
## 常见问题
* Sentry Plugin: StatusCodeError: 409
sentry版本号重复了,修改.sentryclirc.js的release属性,增加版本号
\ No newline at end of file
require('./check-versions')()
process.env.NODE_ENV = 'production'
var ora = require('ora')
var rm = require('rimraf')
var path = require('path')
var chalk = require('chalk')
var webpack = require('webpack')
var config = require('../config')
var webpackConfig = require('./webpack.prod.conf')
var spinner = ora('building for production...')
spinner.start()
rm(path.join(config.build.assetsRoot, config.build.assetsSubDirectory), err => {
if (err) throw err
webpack(webpackConfig, function (err, stats) {
spinner.stop()
if (err) throw err
process.stdout.write(stats.toString({
colors: true,
modules: false,
children: false,
chunks: false,
chunkModules: false
}) + '\n\n')
console.log(chalk.cyan(' Build complete.\n'))
console.log(chalk.yellow(
' Tip: built files are meant to be served over an HTTP server.\n' +
' Opening index.html over file:// won\'t work.\n'
))
})
})
var chalk = require('chalk')
var semver = require('semver')
var packageConfig = require('../package.json')
var shell = require('shelljs')
function exec (cmd) {
return require('child_process').execSync(cmd).toString().trim()
}
var versionRequirements = [
{
name: 'node',
currentVersion: semver.clean(process.version),
versionRequirement: packageConfig.engines.node
},
]
if (shell.which('npm')) {
versionRequirements.push({
name: 'npm',
currentVersion: exec('npm --version'),
versionRequirement: packageConfig.engines.npm
})
}
module.exports = function () {
var warnings = []
for (var i = 0; i < versionRequirements.length; i++) {
var mod = versionRequirements[i]
if (!semver.satisfies(mod.currentVersion, mod.versionRequirement)) {
warnings.push(mod.name + ': ' +
chalk.red(mod.currentVersion) + ' should be ' +
chalk.green(mod.versionRequirement)
)
}
}
if (warnings.length) {
console.log('')
console.log(chalk.yellow('To use this template, you must update following to modules:'))
console.log()
for (var i = 0; i < warnings.length; i++) {
var warning = warnings[i]
console.log(' ' + warning)
}
console.log()
process.exit(1)
}
}
/* eslint-disable */
require('eventsource-polyfill')
var hotClient = require('webpack-hot-middleware/client?noInfo=true&reload=true')
hotClient.subscribe(function (event) {
if (event.action === 'reload') {
window.location.reload()
}
})
require('./check-versions')()
var config = require('../config')
if (!process.env.NODE_ENV) {
process.env.NODE_ENV = JSON.parse(config.dev.env.NODE_ENV)
}
var opn = require('opn')
var path = require('path')
var express = require('express')
var webpack = require('webpack')
var proxyMiddleware = require('http-proxy-middleware')
var webpackConfig = require('./webpack.dev.conf')
// default port where dev server listens for incoming traffic
var port = process.env.PORT || config.dev.port
// automatically open browser, if not set will be false
var autoOpenBrowser = !!config.dev.autoOpenBrowser
// Define HTTP proxies to your custom API backend
// https://github.com/chimurai/http-proxy-middleware
var proxyTable = config.dev.proxyTable
var app = express()
var compiler = webpack(webpackConfig)
var devMiddleware = require('webpack-dev-middleware')(compiler, {
publicPath: webpackConfig.output.publicPath,
quiet: true
})
var hotMiddleware = require('webpack-hot-middleware')(compiler, {
log: () => {}
})
// force page reload when html-webpack-plugin template changes
compiler.plugin('compilation', function (compilation) {
compilation.plugin('html-webpack-plugin-after-emit', function (data, cb) {
hotMiddleware.publish({ action: 'reload' })
cb()
})
})
// proxy api requests
Object.keys(proxyTable).forEach(function (context) {
var options = proxyTable[context]
if (typeof options === 'string') {
options = { target: options }
}
app.use(proxyMiddleware(options.filter || context, options))
})
// 设置允许跨域访问该服务.
app.all('*', function (req, res, next) {
res.header('Access-Control-Allow-Origin', '*');
next()
})
// handle fallback for HTML5 history API
app.use(require('connect-history-api-fallback')())
// serve webpack bundle output
app.use(devMiddleware)
// enable hot-reload and state-preserving
// compilation error display
app.use(hotMiddleware)
// serve pure static assets
var staticPath = path.posix.join(config.dev.assetsPublicPath, config.dev.assetsSubDirectory)
app.use(staticPath, express.static('./static'))
var uri = 'http://localhost:' + port
var _resolve
var readyPromise = new Promise(resolve => {
_resolve = resolve
})
console.log('> Starting dev server...')
devMiddleware.waitUntilValid(() => {
console.log('> Listening at ' + uri + '\n')
// when env is testing, don't need open it
if (autoOpenBrowser && process.env.NODE_ENV !== 'testing') {
opn(uri)
}
_resolve()
})
var server = app.listen(port)
module.exports = {
ready: readyPromise,
close: () => {
server.close()
}
}
var path = require('path')
var config = require('../config')
var ExtractTextPlugin = require('extract-text-webpack-plugin')
exports.assetsPath = function (_path) {
var assetsSubDirectory = process.env.NODE_ENV === 'production'
? config.build.assetsSubDirectory
: config.dev.assetsSubDirectory
return path.posix.join(assetsSubDirectory, _path)
}
exports.cssLoaders = function (options) {
options = options || {}
var cssLoader = {
loader: 'css-loader',
options: {
minimize: process.env.NODE_ENV === 'production',
sourceMap: options.sourceMap
}
}
// generate loader string to be used with extract text plugin
function generateLoaders (loader, loaderOptions) {
var loaders = [cssLoader]
if (loader) {
loaders.push({
loader: loader + '-loader',
options: Object.assign({}, loaderOptions, {
sourceMap: options.sourceMap
})
})
}
// Extract CSS when that option is specified
// (which is the case during production build)
if (options.extract) {
return ExtractTextPlugin.extract({
use: loaders,
fallback: 'vue-style-loader'
})
} else {
return ['vue-style-loader'].concat(loaders)
}
}
// https://vue-loader.vuejs.org/en/configurations/extract-css.html
return {
css: generateLoaders(),
postcss: generateLoaders(),
less: generateLoaders('less'),
sass: generateLoaders('sass', { indentedSyntax: true }),
scss: generateLoaders('sass'),
stylus: generateLoaders('stylus'),
styl: generateLoaders('stylus')
}
}
// Generate loaders for standalone style files (outside of .vue)
exports.styleLoaders = function (options) {
var output = []
var loaders = exports.cssLoaders(options)
for (var extension in loaders) {
var loader = loaders[extension]
output.push({
test: new RegExp('\\.' + extension + '$'),
use: loader
})
}
return output
}
var utils = require('./utils')
var config = require('../config')
var isProduction = process.env.NODE_ENV === 'production'
module.exports = {
loaders: utils.cssLoaders({
sourceMap: isProduction
? config.build.productionSourceMap
: config.dev.cssSourceMap,
extract: isProduction
})
}
var path = require('path')
var utils = require('./utils')
var config = require('../config')
var vueLoaderConfig = require('./vue-loader.conf')
var { name } = require('../package')
name = name.replace(/-/g, '')
function resolve (dir) {
return path.join(__dirname, '..', dir)
}
module.exports = {
entry: {
app: './src/main.js'
},
output: {
// 把子应用打包成 umd 库格式
library: `${name}-[name]`,
libraryTarget: 'umd',
jsonpFunction: `webpackJsonp_${name}`,
publicPath: "/"
},
externals: {
'vue': 'Vue',
'iview': 'iview',
'vue-router': 'VueRouter',
'vue-resource': 'VueResource',
'vuex': 'Vuex',
'axios': 'axios',
'es6-promise': 'ES6Promise',
'moment': 'moment',
},
resolve: {
extensions: ['.js', '.vue', '.json'],
alias: {
'vue$': 'vue/dist/vue.esm.js',
'@': resolve('src')
}
},
module: {
rules: [
// {
// test: /\.(js|vue)$/,
// loader: 'eslint-loader',
// enforce: 'pre',
// include: [resolve('src'), resolve('test')],
// options: {
// formatter: require('eslint-friendly-formatter')
// }
// },
{
test: /\.vue$/,
loader: 'vue-loader',
options: vueLoaderConfig
},
{
test: /\.js$/,
loader: 'babel-loader',
include: [resolve('src'), resolve('test'), resolve('node_modules/@qg/sys-sdk')]
},
{
test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
loader: 'url-loader',
options: {
limit: 10000,
name: utils.assetsPath('img/[name].[hash:7].[ext]')
}
},
{
test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
loader: 'url-loader',
options: {
limit: 10000,
name: utils.assetsPath('fonts/[name].[hash:7].[ext]')
}
}
]
}
}
var utils = require('./utils')
var webpack = require('webpack')
var config = require('../config')
var merge = require('webpack-merge')
var baseWebpackConfig = require('./webpack.base.conf')
var HtmlWebpackPlugin = require('html-webpack-plugin')
var FriendlyErrorsPlugin = require('friendly-errors-webpack-plugin')
// add hot-reload related code to entry chunks
Object.keys(baseWebpackConfig.entry).forEach(function (name) {
baseWebpackConfig.entry[name] = ['./build/dev-client'].concat(baseWebpackConfig.entry[name])
})
module.exports = merge(baseWebpackConfig, {
module: {
rules: utils.styleLoaders({ sourceMap: config.dev.cssSourceMap })
},
// cheap-module-eval-source-map is faster for development
devtool: '#cheap-module-eval-source-map',
plugins: [
new webpack.DefinePlugin({
'process.env': config.dev.env
}),
// https://github.com/glenjamin/webpack-hot-middleware#installation--usage
new webpack.HotModuleReplacementPlugin(),
new webpack.NoEmitOnErrorsPlugin(),
// https://github.com/ampedandwired/html-webpack-plugin
new HtmlWebpackPlugin({
filename: 'index.html',
template: 'index.html',
inject: true
}),
new FriendlyErrorsPlugin()
]
})
var path = require('path')
var utils = require('./utils')
var webpack = require('webpack')
var config = require('../config')
var merge = require('webpack-merge')
var baseWebpackConfig = require('./webpack.base.conf')
var CopyWebpackPlugin = require('copy-webpack-plugin')
var HtmlWebpackPlugin = require('html-webpack-plugin')
var ExtractTextPlugin = require('extract-text-webpack-plugin')
var OptimizeCSSPlugin = require('optimize-css-assets-webpack-plugin')
const SentryPlugin = require('webpack-sentry-plugin')
const SentryConfig = require('../.sentryclirc')
var env = config.build.env
var webpackConfig = merge(baseWebpackConfig, {
module: {
rules: utils.styleLoaders({
sourceMap: config.build.productionSourceMap,
extract: true
})
},
devtool: config.build.productionSourceMap ? '#source-map' : false,
output: {
path: config.build.assetsRoot,
filename: utils.assetsPath('js/[name].[chunkhash].js'),
chunkFilename: utils.assetsPath('js/[id].[chunkhash].js')
},
plugins: [
// http://vuejs.github.io/vue-loader/en/workflow/production.html
new webpack.DefinePlugin({
'process.env': env
}),
new webpack.optimize.UglifyJsPlugin({
compress: {
warnings: false
},
sourceMap: true
}),
// extract css into its own file
new ExtractTextPlugin({
filename: utils.assetsPath('css/[name].[contenthash].css')
}),
// Compress extracted CSS. We are using this plugin so that possible
// duplicated CSS from different components can be deduped.
new OptimizeCSSPlugin({
cssProcessorOptions: {
safe: true
}
}),
// generate dist index.html with correct asset hash for caching.
// you can customize output by editing /index.html
// see https://github.com/ampedandwired/html-webpack-plugin
new HtmlWebpackPlugin({
filename: config.build.index,
template: 'index.html',
inject: true,
minify: {
removeComments: true,
collapseWhitespace: true,
removeAttributeQuotes: true
// more options:
// https://github.com/kangax/html-minifier#options-quick-reference
},
// necessary to consistently work with multiple chunks via CommonsChunkPlugin
chunksSortMode: 'dependency'
}),
// split vendor js into its own file
new webpack.optimize.CommonsChunkPlugin({
name: 'vendor',
minChunks: function (module, count) {
// 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',
chunks: ['vendor']
}),
// copy custom static assets
new CopyWebpackPlugin([
{
from: path.resolve(__dirname, '../static'),
to: config.build.assetsSubDirectory,
ignore: ['.*']
}
])
]
})
if (config.build.productionGzip) {
var CompressionWebpackPlugin = require('compression-webpack-plugin')
webpackConfig.plugins.push(
new CompressionWebpackPlugin({
asset: '[path].gz[query]',
algorithm: 'gzip',
test: new RegExp(
'\\.(' +
config.build.productionGzipExtensions.join('|') +
')$'
),
threshold: 10240,
minRatio: 0.8
})
)
}
if (config.build.bundleAnalyzerReport) {
var BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin
webpackConfig.plugins.push(new BundleAnalyzerPlugin())
}
if (config.build.productionSourceMap) {
webpackConfig.plugins.push(new SentryPlugin(SentryConfig))
}
module.exports = webpackConfig
var merge = require('webpack-merge')
var prodEnv = require('./prod.env')
module.exports = merge(prodEnv, {
NODE_ENV: '"development"'
})
// see http://vuejs-templates.github.io/webpack for documentation.
var path = require('path')
module.exports = {
build: {
env: require('./prod.env'),
index: path.resolve(__dirname, '../dist/index.html'),
assetsRoot: path.resolve(__dirname, '../dist'),
assetsSubDirectory: 'static',
assetsPublicPath: '/',
productionSourceMap: process.env.SENTRY_ENV !== 'test',
// 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
},
dev: {
env: require('./dev.env'),
port: 7060,
autoOpenBrowser: true,
assetsSubDirectory: 'static',
assetsPublicPath: '/',
proxyTable: {
'/sapi': {
target: 'http://mo-config-arch.liangkebang.net',
changeOrigin: true,
pathRewrite: {
'^/sapi': ''
}
}
},
// 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
}
}
const SENTRY_ENV = '"' + process.env.SENTRY_ENV + '"';
module.exports = {
NODE_ENV: '"production"',
SENTRY_ENV: SENTRY_ENV,
}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>运营系统优化版</title>
<link rel="shortcut icon" type="image/png" href="/static/logo.png"/>
<link rel="stylesheet" href="https://activitystatic.lkbang.net/iview/2.9.0/styles/iview.css">
</head>
<body>
<div id="app"></div>
<script src="https://activitystatic.lkbang.net/vue/2.3.1/vue.min.js"></script>
<script src="https://activitystatic.lkbang.net/iview/2.9.0/iview.min.js"></script>
<script src="https://activitystatic.lkbang.net/vue-router/3.0.1/vue-router.min.js"></script>
<script src="https://activitystatic.lkbang.net/vuex/3.1.2/vuex.min.js"></script>
<script src="https://activitystatic.lkbang.net/vue-resource/1.2.1/vue-resource.min.js"></script>
<script src="https://activitystatic.lkbang.net/axios/0.19.2/axios.min.js"></script>
<script src="https://activitystatic.lkbang.net/es6-promise/4.1.1/es6-promise.min.js"></script>
<script src="https://lib.baomitu.com/moment.js/2.24.0/moment.min.js"></script>
<script src="https://cdn.staticfile.org/plupload/2.1.2/plupload.full.min.js"></script>
<!-- built files will be auto injected -->
</body>
</html>
This diff is collapsed.
{
"name": "store-manage-ui",
"version": "1.0.0",
"description": "A Vue.js project",
"author": "wangze <neu_wangze@126.com>",
"private": true,
"scripts": {
"dev": "node build/dev-server.js",
"start": "node build/dev-server.js",
"build": "node build/build.js",
"lint": "eslint --fix --cache --ext .js,.vue src"
},
"dependencies": {
"@qg/sys-sdk": "^1.0.14",
"@riophae/vue-treeselect": "^0.4.0",
"@vue/eslint-config-prettier": "^6.0.0",
"awe-dnd": "^0.3.4",
"bluebird": "^3.5.0",
"file-saver": "~1.3.2",
"js-cookie": "^2.1.4",
"jsmind": "^0.4.3",
"less": "^2.7.2",
"less-loader": "^4.0.3",
"mockjs": "^1.1.0",
"moment": "^2.24.0",
"qiniu-js": "^1.0.22",
"qs": "^6.5.0",
"raven-js": "^3.27.2",
"script-loader": "^0.7.2",
"vue-quill-editor": "^3.0.4",
"vuedraggable": "^2.24.3",
"xlsx": "^0.15.2"
},
"devDependencies": {
"autoprefixer": "^6.7.2",
"babel-core": "^6.22.1",
"babel-eslint": "^7.2.3",
"babel-loader": "^6.2.10",
"babel-plugin-transform-runtime": "^6.22.0",
"babel-preset-env": "^1.3.2",
"babel-preset-stage-2": "^6.22.0",
"babel-register": "^6.22.0",
"chalk": "^1.1.3",
"connect-history-api-fallback": "^1.3.0",
"copy-webpack-plugin": "^4.0.1",
"css-loader": "^0.28.0",
"eslint": "^5.16.0",
"eslint-config-prettier": "^6.7.0",
"eslint-config-standard": "^6.2.1",
"eslint-friendly-formatter": "^2.0.7",
"eslint-loader": "^1.9.0",
"eslint-plugin-html": "^6.1.2",
"eslint-plugin-import": "^2.19.1",
"eslint-plugin-node": "^10.0.0",
"eslint-plugin-prettier": "^3.1.2",
"eslint-plugin-promise": "^3.8.0",
"eslint-plugin-standard": "^2.3.1",
"eslint-plugin-vue": "^6.0.1",
"eventsource-polyfill": "^0.9.6",
"express": "^4.14.1",
"extract-text-webpack-plugin": "^2.0.0",
"file-loader": "^0.11.1",
"friendly-errors-webpack-plugin": "^1.1.3",
"html-webpack-plugin": "^2.28.0",
"http-proxy-middleware": "^0.17.3",
"husky": "^3.1.0",
"opn": "^4.0.2",
"optimize-css-assets-webpack-plugin": "^1.3.0",
"ora": "^1.2.0",
"prettier": "^1.19.1",
"rimraf": "^2.6.0",
"semver": "^5.3.0",
"shelljs": "^0.7.6",
"url-loader": "^0.5.8",
"vue-loader": "^11.3.4",
"vue-style-loader": "^2.0.5",
"vue-template-compiler": "^2.2.6",
"webpack": "^2.3.3",
"webpack-bundle-analyzer": "^2.2.1",
"webpack-dev-middleware": "^1.10.0",
"webpack-hot-middleware": "^2.18.0",
"webpack-merge": "^4.1.0",
"webpack-sentry-plugin": "^1.16.0"
},
"engines": {
"node": ">= 4.0.0",
"npm": ">= 3.0.0"
},
"browserslist": [
"> 1%",
"last 2 versions",
"not ie <= 8"
],
"husky": {
"hooks": {
"pre-commit": "npm run lint"
}
}
}
<template>
<div id="app">
<router-view :store="store" />
</div>
</template>
<script>
export default {
name: 'App',
props: {
store: {
type: Object,
default() {
return {};
},
},
},
};
</script>
<style>
@import './styles/comment.less';
#app {
position: absolute;
top: 0;
bottom: 0;
width: 100%;
}
</style>
This diff is collapsed.
<template>
<div class="loading">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="100px" height="100px" viewBox="0 0 24 30" style="enable-background:new 0 0 50 50" xml:space="preserve">
<rect x="0" y="9.22656" width="4" height="12.5469" fill="#2d8cf0">
<animate attributeName="height" attributeType="XML" values="5;21;5" begin="0s" dur="0.6s" repeatCount="indefinite" />
<animate attributeName="y" attributeType="XML" values="13; 5; 13" begin="0s" dur="0.6s" repeatCount="indefinite" />
</rect>
<rect x="10" y="5.22656" width="4" height="20.5469" fill="#2d8cf0">
<animate attributeName="height" attributeType="XML" values="5;21;5" begin="0.15s" dur="0.6s" repeatCount="indefinite" />
<animate attributeName="y" attributeType="XML" values="13; 5; 13" begin="0.15s" dur="0.6s" repeatCount="indefinite" />
</rect>
<rect x="20" y="8.77344" width="4" height="13.4531" fill="#2d8cf0">
<animate attributeName="height" attributeType="XML" values="5;21;5" begin="0.3s" dur="0.6s" repeatCount="indefinite" />
<animate attributeName="y" attributeType="XML" values="13; 5; 13" begin="0.3s" dur="0.6s" repeatCount="indefinite" />
</rect>
</svg>
</div>
</template>
<style lang="less" scoped>
.loading {
width: 100%;
height: 100%;
position: fixed;
top: 0px;
left: 0px;
background: #000;
opacity: 0.8;
z-index: 9999;
display: flex;
justify-content: center;
align-items: center;
}
</style>
<template>
<Input v-model="myValue" :clearable="clearable" @on-blur="onChange" />
</template>
<script>
import { isNumber } from '../services/util.js';
export default {
props: {
value: {
type: [String, Number],
default: '',
},
clearable: Boolean,
},
data() {
return {
myValue: this.value,
};
},
watch: {
value(newVal) {
this.myValue = newVal;
},
myValue(newVal) {
this.$emit('input', newVal);
},
},
methods: {
onChange() {
if (!isNumber(this.myValue)) {
this.myValue = '';
}
},
},
};
</script>
<template>
<Poptip :placement="placement">
<img :src="src" width="100" height="50" />
<a slot="title" :href="src" target="_blank">{{ src }}</a>
<div slot="content" class="content">
<img :src="src" width="100%" />
</div>
</Poptip>
</template>
<script>
export default {
props: {
src: {
type: String,
default: function() {
return '';
},
},
placement: {
type: String,
default: function() {
return 'right-end';
},
},
},
};
</script>
<style lang="less" scoped>
.content {
width: 400px;
max-height: 300px;
}
</style>
<style>
.upload {
display: block;
width: 100%;
}
.upload-pickfiles-lists {
width: 120px;
padding: 2px;
display: inline-block;
}
.xg-upload-pickfiles img {
width: 100px;
height: 100px;
}
.upload-container {
display: inline-block;
width: 100px;
height: 100px;
text-align: center;
vertical-align: top;
border: 2px dashed #aaa;
position: relative;
}
.upload-pickfiles {
width: 100px;
height: 100px;
position: absolute;
z-index: 10;
top: 30px;
left: 0;
}
</style>
<template>
<div class="upload">
<div style="margin:5px 0">
<i-button style="width:100px" type="primary" :disabled="uploadurlNew.length >= max">上传图片</i-button>
</div>
<div v-for="(item, index) in uploadurlNew" :key="index" class="upload-pickfiles-lists">
<div class="xg-upload-pickfiles">
<img :src="qiniuHost + item" />
</div>
<i-button type="error" style="width:100px" :disabled="messageSaveSuccess" @click="del(index)">删除</i-button>
</div>
<div v-if="uploadurlNew.length < max" :id="container" class="upload-container">
<div class="upload-pickfiles">
请上传图片
</div>
</div>
</div>
</template>
<script>
import config from '../config';
import { Notice } from 'iview';
const opapiHost = config.opapiHost;
const qiniuHost = config.qiniuHost;
export default {
props: {
// 最大上传数量
max: {
type: Number,
twoWay: true,
},
messageSaveSuccess: {
type: Boolean,
twoWay: true,
},
// 返回的上传地址
uploadurl: {
type: Array,
twoWay: true,
},
// 拖拽区域
container: {
type: String,
twoWay: false,
},
// 多选上传
multiple: {
type: Boolean,
twoWay: false,
},
qiniuHost: {
type: String,
default: qiniuHost,
},
extensions: {
type: String,
default: 'JPEG,jpg,png',
},
maxSize: {
type: String,
},
},
data() {
return {
uploadurlNew: this.uploadurl,
};
},
watch: {
uploadurl(val) {
if (!val) {
this.uploadurlNew = [];
return;
}
this.uploadurlNew = val; // 新增result的watch,监听变更并同步到myResult上
this.$emit('imgChange', val);
},
},
mounted() {
this.qiniu();
},
created() {
// 等待DOM渲染完成后执行
// this.$nextTick(() => {
// this.qiniu();
// });
},
methods: {
qiniu() {
const self = this;
Qiniu.uploader({
runtimes: 'html5,flash,html4', // 上传模式,依次退化
browse_button: self.$children[0].$el, // 上传选择的点选按钮,**必需**
uptoken_url: opapiHost + '/upload/getToken', // Ajax请求upToken的Url,**强烈建议设置**(服务端提供)
// uptoken : '', //若未指定uptoken_url,则必须指定 uptoken ,uptoken由其他程序生成
// unique_names: true, // 默认 false,key为文件名。若开启该选项,SDK为自动生成上传成功后的key(文件名)。
save_key: true, // 默认 false。若在服务端生成uptoken的上传策略中指定了 `sava_key`,则开启,SDK会忽略对key的处理
domain: qiniuHost, // bucket 域名,下载资源时用到,**必需**
get_new_uptoken: false, // 设置上传文件的时候是否每次都重新获取新的token
container: self.container, // 上传区域DOM ID,默认是browser_button的父元素,
max_file_size: self.maxSize || '1mb', // 最大文件体积限制
flash_swf_url: 'js/plupload/Moxie.swf', // 引入flash,相对路径
max_retries: 3, // 上传失败最大重试次数
// dragdrop: true, //开启可拖曳上传
// drop_element: 'container', //拖曳上传区域元素的ID,拖曳文件或文件夹后可触发上传
chunk_size: '4mb', // 分块上传时,每片的体积
auto_start: true, // 选择文件后自动上传,若关闭需要自己绑定事件触发上传
multi_selection: self.multiple, // 多选上传
filters: {
max_file_size: self.maxSize || '1mb',
prevent_duplicates: false, // 不允许选取重复文件
mime_types: [
{ title: 'Image files', extensions: self.extensions }, // 限定jpg,gif,png后缀上传
],
},
init: {
FileUploaded(up, file, info) {
// const domain = up.getOption('domain');
const res = JSON.parse(info.response);
const sourceLink = self.qiniuHost === '' ? `${qiniuHost}${res.hash}` : res.hash;
if (self.max === 1 && self.uploadurlNew.length !== 0) {
self.uploadurlNew.splice(0, 1, sourceLink);
return;
}
self.uploadurlNew.push(sourceLink);
},
Error(up, err) {
if (err.code === -600) {
Notice.error({ desc: `超过限制的最大图片${self.maxSize || '1mb'}尺寸,请重新上传` });
}
// $('table').show();
// const progress = new FileProgress(err.file, 'fsUploadProgress');
// progress.setError();
// progress.setStatus(errTip);
},
},
});
},
del(index) {
this.uploadurlNew.splice(index, 1);
},
},
};
</script>
const qiniuHost = 'https://appsync.lkbang.net/';
const opapiHost = 'https://opapi-test4.liangkebang.net';
// const opapiHost = 'http://192.168.29.89:8097';
const limitApi = `http://backstms-test4.liangkebang.net`;
const baseURI = 'http://zeus-test4.liangkebang.net';
const smsApiBaseUrls = `${opapiHost}/msgTmp`;
const opUrl = '//op-test4.liangkebang.net';
const moConfigApi = '/sapi';
const appApi = `${opapiHost}/kdspOp`;
// const appApi = `${opapiHost}/`;
// const appApi = `${opapiHost}`;
// const appApi = 'http://192.168.29.89:8097';
// const appApi = `${opapiHost}`;
const hostUrl = 'vcc-spider-test4.liangkebang.net/';
// const homeApi = 'https://kdsp-operation-test42.liangkebang.net';
export default {
qiniuHost,
opapiHost,
limitApi,
baseURI,
smsApiBaseUrls,
opUrl,
moConfigApi,
appApi,
hostUrl,
// homeApi,
// testEnv,
};
var _exports = {};
_exports = process.env.NODE_ENV === 'production' ? require('./production.config.js') : require('./env.config.js');
module.exports = _exports;
/*
GLY: 管理员
KF: 客服人员
CPVP:产品vp
YY:运营
KFZY: 客服专员
TM:脱敏
CW:财务人员
*/
import { nav } from './nav.page';
import localStorage from '../services/localStorage.service';
import config from '../config';
const opApiHost = config.opapiHost;
const opRedirectUrl = `${opApiHost}/user/toLogin`;
const user = localStorage.get('user');
const menu = nav.slice(0);
const role = [];
const loopNav = menu => {
for (let k = 0; k < menu.length; k++) {
let num = 0;
for (let i = 0; i < role.length; i++) {
if (menu[k].role) {
if (menu[k].role.indexOf(role[i]) === -1) {
num++;
if (num === role.length) {
menu.splice(k, 1);
--k;
continue;
}
}
}
if (!menu[k].role) {
menu.splice(k, 1);
--k;
continue;
}
if (menu[k].children) {
loopNav(menu[k].children);
}
}
}
};
if (user && user.privilege && user.privilege.XYYXT) {
var roles = user.privilege.XYYXT.roles;
} else {
var href = window.location.href;
href = href.replace(/\?token=[a-z0-9\-A-Z]+/g, '');
window.location.href = opRedirectUrl + '?url=' + window.btoa(href);
}
for (let i = 0; i < roles.length; i++) {
role.push(roles[i]);
}
if (role.length && role.indexOf('GLY') === -1) {
// 如果非管理员,只能访问,当前权限的
loopNav(menu);
}
var page = menu;
export default page;
export const nav = [
{
name: '首页',
role: ['KF', 'CPVP', 'YY', 'KFZY', 'TM'],
path: 'dashboard',
},
{
name: '显示配置',
role: ['YY'],
},
{
name: '新广告位列表',
path: 'newAdList',
role: ['YY'],
},
{
name: '借款首页',
path: 'loanHomePage',
children: [
{
name: '广告位列表',
path: 'adList',
role: ['YY'],
},
{
name: '借款首页',
path: 'loanHomePage',
role: ['YY'],
},
],
},
{
name: '发送管理',
role: ['YY', 'DXZT'],
children: [
{
name: '消息模板管理',
path: 'templateManage',
role: ['YY'],
},
{
name: '策略管理',
path: 'strategyManage',
role: ['YY'],
},
{
name: '发送营销短信',
path: 'createMessage',
role: ['YY'],
},
{
name: '发送push',
path: 'sendPush',
role: ['YY'],
},
{
name: '发送站内信',
path: 'sendMail',
role: ['YY'],
},
{
name: '发送微信公众号通知',
path: 'wechatMessage',
role: ['YY'],
},
],
},
{
name: '积分',
role: ['YY'],
children: [
{
name: '积分列表',
path: 'pointList',
role: ['YY'],
},
{
name: '积分明细记录',
path: 'pointRecord',
role: ['YY'],
},
],
},
{
name: '用户管理',
role: ['YY'],
children: [
{
name: '邀请好友记录',
path: 'friendRecord',
role: ['YY'],
},
],
},
{
name: '活动管理',
role: ['YY'],
children: [
{
name: '活动专题列表',
path: 'activityTopicList',
role: ['YY'],
},
{
name: '拼团订单查询',
path: 'orderQuery',
role: ['YY'],
},
],
},
{
name: '客户订单管理',
role: ['YY'],
children: [
{
name: '客户订单',
path: 'customerOrder',
role: ['YY'],
},
],
},
{
name: '活动商品管理',
role: ['YY'],
children: [
{
name: '商品专题列表',
path: 'specialList',
role: ['YY'],
},
{
name: '商品标签列表',
path: 'labelList',
role: ['YY'],
},
{
name: '商品列表',
path: 'productList',
role: ['YY'],
},
],
},
];
const protocol = window.location.protocol;
const qiniuHost = 'https://appsync.lkbang.net/';
const opapiHost = `${protocol}//opapi.xyqb.com`;
const smsapiHost = '//msgapi.xyqb.com';
const baseURI = `${opapiHost}/zeus`;
const limitApi = `${opapiHost}/backStms`;
const smsApiBaseUrls = `${opapiHost}/msgTmp`;
const opUrl = '//op.q-gp.com';
const moConfigApi = `${opapiHost}/moConfig`;
const appApi = `${opapiHost}/kdspOp`;
// const hostUrl = 'vcc-spider.xyqb.com';
const hostUrl = 'vcc-spider.q-gp.com';
const kdspUrl = '//kdsp-op-vcc.liangkebang.net/';
export default {
qiniuHost,
smsapiHost,
kdspUrl,
limitApi,
baseURI,
smsApiBaseUrls,
opapiHost,
opUrl,
moConfigApi,
appApi,
hostUrl,
};
// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import './public-path';
import 'qiniu-js';
import Vue from 'vue';
import store from './vuex/store';
import App from './App';
import routes from './router';
import iView from 'iview';
import Raven from 'raven-js';
import RavenVue from 'raven-js/plugins/vue';
import VueRouter from 'vue-router';
import config from './config';
import { release } from '../.sentryclirc.js';
import VueDND from 'awe-dnd';
if (process.env.SENTRY_ENV !== 'test' && process.env.NODE_ENV === 'production') {
Raven.config('//dd42a22b816a4ef18521487202048591@sentry.q-gp.com/28', {
release,
environment: 'production',
})
.addPlugin(RavenVue, Vue)
.install();
}
Vue.use(iView);
// 注册-拖拽组件
Vue.use(VueDND);
Vue.config.productionTip = false;
/* eslint-disable no-new */
let instance = null;
let router = null;
let timer = null;
export async function bootstrap() {}
export async function mount({ data = {}, http, Cookies, Bus, localStorage } = {}) {
if (!window.__POWERED_BY_QIANKUN__) {
({ http, localStorage, Cookies, Bus } = require('@qg/sys-sdk'));
http._extend({
loginUrl: `${config.opUrl}/access/login`, // token过期后的登录地址
notice: iView.Notice, // 发生错误时提示信息的组件
refresTokenHost: `http://backstms.q-gp.com`, // 刷新tokenhost
});
}
window.http = http;
window.LocalStorage = localStorage;
window.Cookies = Cookies;
window.Bus = Bus;
// 兼容子应用不同的解析规则
http._extend({ dataParseMode: 'default' });
router = new VueRouter({
base: window.__POWERED_BY_QIANKUN__ ? '/micro/new-op-optimized-ui' : '/',
mode: 'history',
routes,
});
router.beforeEach(async (to, from, next) => {
if (to.path !== '/access/login' && !localStorage.get('token')) {
let { href } = window.location;
const { origin } = window.location;
const opRedirectUrl = `${origin}/access/login`;
href = href.replace(/\?token=[a-z0-9\-A-Z]+/g, '');
window.location.href = opRedirectUrl + '?url=' + window.btoa(href);
return;
}
next();
});
timer = setTimeout(() => {
instance = new Vue({
el: '#app',
router,
store, // 使用store
render(h) {
return h(App, {
props: {
store: data,
},
});
},
});
});
}
export async function unmount() {
if (timer) clearTimeout(timer);
console.log('$destroy', instance, instance && instance.$destroy);
if (instance) instance.$destroy();
timer = null;
instance = null;
router = null;
}
// 单独开发环境
window.__POWERED_BY_QIANKUN__ || mount();
require('./userBillUpdate.js');
const Mock = require('mockjs');
Mock.setup({
timeout: 0 - 300,
});
import config from '@/config';
const opapiHost = config.opapiHost;
const ApiBaseUrl = opapiHost + '/ex';
const Mock = require('mockjs');
var billData = Mock.mock({
data: {
'detail|1-10': [
{
loanId: '@natural(1, 800)',
planId: '@natural(1, 100)',
userId: '@natural(1, 200)',
fundId: '@natural(1, 800)',
termNo: '@natural(1, 20)',
'repayStatus|1': [1, 0],
overdueDays: '@natural(1, 200)',
deadline: '@datetime',
repaidAt: '@datetime',
requiredRepayment: '@natural(1, 800)',
currentRequiredRepayment: ' @natural(1, 100)',
actualRepayment: '@natural(1, 200)',
principal: '@natural(1, 800)',
interest: '@natural(1, 800)',
overdueInterest: '@natural(1, 800)',
serviceFee: ' @natural(1, 100)',
otherFee: '@natural(1, 200)',
collectionRelief: '@natural(1, 800)',
'auditStatus|1': [0, 1, 2],
offlineRepaySupport: '@boolean',
'operateRecord|1-20': [
{
operateNo: '@email()',
operateName: '@cname',
'content|1': ['审批通过', '提交申请', '审批拒绝'],
operateAt: '@datetime',
remark: '@ctitle',
},
],
'ext|1-3': ['@image(100x100)'],
auditNo: '@natural(4787348374837843, 47873483748378430)',
tradeFlowNo: '@natural(2787348374837843, 37873483748378430)',
remark: '@ctitle',
},
],
hasLoan: '@boolean',
},
msg: 'success',
code: '0000',
bussinessCode: '0000',
succsee: true,
});
Mock.mock(RegExp(ApiBaseUrl + '/offline_repay/plans.*'), 'get', billData);
/* eslint-disable */
if (window.__POWERED_BY_QIANKUN__) {
// eslint-disable-next-line no-undef
console.log('__webpack_public_path__', window.__INJECTED_PUBLIC_PATH_BY_QIANKUN__);
__webpack_public_path__ = window.__INJECTED_PUBLIC_PATH_BY_QIANKUN__;
}
import Vue from 'vue';
import VueRouter from 'vue-router';
Vue.use(VueRouter);
const home = r => require.ensure([], () => r(require('../view/common/Home.vue')), 'home');
const micro = r => require.ensure([], () => r(require('../view/common/Micro.vue')), 'microLayout');
const adList = r => require.ensure([], () => r(require('../view/operation/AdList.vue')), 'adList');
const newAdList = r => require.ensure([], () => r(require('../view/operation/newAdList.vue')), 'newAdList');
const loanHomePage = r => require.ensure([], () => r(require('../view/operation/LoanHomePage.vue')), 'loanHomePage');
const templateManage = r => require.ensure([], () => r(require('../view/sendManagement/templateManage.vue')), 'templateManage');
const strategyManage = r => require.ensure([], () => r(require('../view/sendManagement/StrategyManage.vue')), 'strategyManage');
const createMessage = r => require.ensure([], () => r(require('../view/sendManagement/CreateMessage.vue')), 'CreateMessage');
const dashboard = r => require.ensure([], () => r(require('../view/common/Dashboard.vue')), 'dashboard');
const sendPush = r => require.ensure([], () => r(require('../view/sendManagement/sendPush.vue')), 'sendPush');
const sendMail = r => require.ensure([], () => r(require('../view/sendManagement/sendMail.vue')), 'sendMail');
const linkTransform = r => require.ensure([], () => r(require('../view/sendManagement/linkTransform.vue')), 'linkTransform');
// 积分系列
const pointList = r => require.ensure([], () => r(require('../view/myPoint/pointList.vue')), 'pointList');
const pointRecord = r => require.ensure([], () => r(require('../view/myPoint/pointRecord.vue')), 'pointRecord');
// 用户管理
const friendRecord = r => require.ensure([], () => r(require('../view/userManagement/friendRecord.vue')), 'friendRecord');
// 奖券管理
const couponRecord = r => require.ensure([], () => r(require('../view/couponManagement/couponRecord.vue')), 'couponRecord');
const couponQuery = r => require.ensure([], () => r(require('../view/couponManagement/couponQuery.vue')), 'couponQuery');
const couponConsumption = r => require.ensure([], () => r(require('../view/couponManagement/couponConsumption.vue')), 'couponConsumption');
const smsNodeManage = r => require.ensure([], () => r(require('../view/sendManagement/smsNodeManage.vue')), 'smsNodeManage');
const infoSendRecord = r => require.ensure([], () => r(require('../view/sendManagement/infoSendRecord.vue')), 'infoSendRecord');
const blacklist = r => require.ensure([], () => r(require('../view/sendManagement/blacklist.vue')), 'blacklist');
const appconfig = r => require.ensure([], () => r(require('../view/appconfig/appConfig.vue')), 'appconfig');
const topNavigation = r => require.ensure([], () => r(require('../view/appconfig/topNavigation.vue')), 'topNavigation');
const tabDeploy = r => require.ensure([], () => r(require('../view/tabDeploy/tabDeploy.vue')), 'tabDeploy');
const appPopup = r => require.ensure([], () => r(require('../view/appPopup')), 'appPopup');
// 活动管理
const activityTopicList = r => require.ensure([], () => r(require('../view/activityManag/activityTopicList.vue')), 'activityactivityTopicList');
const orderQuery = r => require.ensure([], () => r(require('../view/activityManag/orderQuery.vue')), 'orderQuery');
// 活动商品管理
const specialList = r => require.ensure([], () => r(require('../view/activityGoodManag/specialList')), 'specialList');
const labelList = r => require.ensure([], () => r(require('../view/activityGoodManag/labelList')), 'labelList');
const productList = r => require.ensure([], () => r(require('../view/activityGoodManag/productList')), 'productList');
const activeTemplateManage = r => require.ensure([], () => r(require('../view/activeTemplateManage')), 'activeTemplateManage');
// 公众号通知消息模块
const wechatMessage = r => require.ensure([], () => r(require('../view/wechatMessage/wechatMessage.vue')), 'wechatMessage');
// 会员权益
const memberLevel = r => require.ensure([], () => r(require('../view/member/memberLevel.vue')), 'memberLevel');
const memberRights = r => require.ensure([], () => r(require('../view/member/memberRights.vue')), 'memberRights');
// 流量工厂模块
const kaManage = r => require.ensure([], () => r(require('../view/trafficFactory/kaManage.vue')), 'kaManage');
const userGroup = r => require.ensure([], () => r(require('../view/userGroup')), 'userGroup');
const marketingAllocation = r => require.ensure([], () => r(require('../view/trafficFactory/marketingAllocation.vue')), 'kaManage');
const homePageLayout = r => require.ensure([], () => r(require('../view/homePageLayout/index.vue')), 'homePageLayout');
const routes = [
{
path: '/',
redirect: '/home/dashboard',
},
{
path: '/home',
component: window.__POWERED_BY_QIANKUN__ ? micro : home,
meta: {
requireAuth: true,
},
children: [
{
path: 'specialList',
component: specialList,
},
{
path: 'labelList',
component: labelList,
},
{
path: 'productList',
component: productList,
},
{
path: 'couponConsumption',
component: couponConsumption,
},
{
path: 'couponQuery',
component: couponQuery,
},
{
path: 'couponRecord',
component: couponRecord,
},
{
path: 'activityTopicList',
component: activityTopicList,
},
{
path: 'orderQuery',
component: orderQuery,
},
{
path: 'activityTopicList',
component: activityTopicList,
},
{
path: 'friendRecord',
component: friendRecord,
},
{
path: 'pointList',
component: pointList,
},
{
path: 'appPopup',
component: appPopup,
},
{
path: 'pointRecord',
component: pointRecord,
},
{
path: 'dashboard',
component: dashboard,
},
{
path: 'createMessage',
component: createMessage,
},
{
path: 'adList',
component: adList,
},
{
path: 'newAdList',
component: newAdList,
},
{
path: 'memberRights',
component: memberRights,
},
{
path: 'memberLevel',
component: memberLevel,
},
{
path: 'loanHomePage',
component: loanHomePage,
},
{
path: 'templateManage',
component: templateManage,
},
{
path: 'strategyManage',
component: strategyManage,
},
{
path: 'sendPush',
component: sendPush,
},
{
path: 'sendMail',
component: sendMail,
},
{
path: 'smsNodeManage',
component: smsNodeManage,
},
{
path: 'infoSendRecord',
component: infoSendRecord,
},
{
path: 'blacklist',
component: blacklist,
},
{
path: 'appconfig',
component: appconfig,
},
{
path: 'appPopup',
component: appPopup,
},
{
path: 'activeTemplateManage',
component: activeTemplateManage,
},
{
path: 'linkTransform',
component: linkTransform,
},
{
path: 'wechatMessage',
component: wechatMessage,
},
{
path: 'kaManage',
component: kaManage,
},
{
path: 'userGroup',
component: userGroup,
},
{
path: 'marketingAllocation',
component: marketingAllocation,
},
{
path: 'homePageLayout',
component: homePageLayout,
},
{
path: 'topNavigation',
component: topNavigation,
},
{
path: 'tabDeploy',
component: tabDeploy,
},
],
},
];
export default routes;
const GOODINFO_COLUMNS = [
{
title: '商品名称',
key: 'skuName',
align: 'center',
},
{
title: '商品属性',
key: 'skuName',
align: 'center',
},
{
title: '商品件数(件)',
key: 'skuName',
align: 'center',
},
{
title: '物流公司',
key: 'categoryNames',
align: 'center',
},
{
title: '物流单号',
key: 'categoryNames',
align: 'center',
},
];
export default {
GOODINFO_COLUMNS,
};
import config from '../../config';
import fileSaver from 'file-saver';
import { getDate } from '../util';
const { appApi } = config;
import qs from 'qs';
export default {
// 获取商品类目
categoryQuery() {
return http.get(`${appApi}/api/kdsp/op/rear-category/query/all`);
},
// 商品列表-查询
skuInfo(params) {
return http.post(`${appApi}/api/kdsp/activity/activity-goods/sku-info/list`, params);
},
// 商品列表-修改反显数据查询
skuInfoList(params) {
return http.post(`${appApi}/api/kdsp/activity/activity-goods/sku-info/get`, params);
},
// 商品管理-商品列表-修改
skuInfoUpdate(params) {
return http.post(`${appApi}/api/kdsp/activity/activity-goods/sku-info/update`, params);
},
// 商品管理-获取商品标签列表
labelInfoList(params) {
return http.post(`${appApi}/api/kdsp/activity/activity-goods/label-info/list`, params);
},
// 批量标记商品
markTag(params) {
return http.post(`${appApi}/api/kdsp/activity/activity-goods/sku-info/adds-label`, params);
},
// 批量下架商品
updatesOffline(params) {
return http.post(`${appApi}/api/kdsp/activity/activity-goods/sku-info/updates-offline`, qs.stringify(params), {
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
},
});
},
// 商品管理-商品标签列表_分页
listPage(params) {
return http.post(`${appApi}/api/kdsp/activity/activity-goods/label-info/list-page`, params);
// return http.post(`${appApi}/api/kdsp/activity/activity-goods/label-info/list`, params);
},
// 商品管理-商品标签列表_新增
labelInfoAdd(params) {
return http.post(`${appApi}/api/kdsp/activity/activity-goods/label-info/add`, params);
},
// 商品管理-商品标签列表_修改
labelInfoUpdate(params) {
return http.post(`${appApi}/api/kdsp/activity/activity-goods/label-info/update`, params, {
headers: {
'Content-Type': ' application/json',
},
});
},
// 修改状态
getStatus(params) {
return http.post(`${appApi}/api/kdsp/activity/activity-goods/label-info/update-status`, params);
},
// 商品管理-商品专题列表_分页
specialPage(params) {
return http.post(`${appApi}/api/kdsp/activity/activity-goods/special/list-page`, params);
},
// 商品管理-商品专题列表_新增专题
specialAdd(params) {
return http.post(`${appApi}/api/kdsp/activity/activity-goods/special/add`, params, {
headers: {
'Content-Type': ' application/json',
},
});
},
// 商品管理-商品专题列表_修改专题
specialUpdate(params) {
return http.post(`${appApi}/api/kdsp/activity/activity-goods/special/update`, params, {
headers: {
'Content-Type': ' application/json',
},
});
},
specialGet(params) {
return http.post(`${appApi}/api/kdsp/activity/activity-goods/special/get`, params, {
// return http.post(`http://192.168.29.79/api/kdsp/activity/activity-goods/special/get`, params, {
headers: {
'Content-Type': ' application/json',
},
});
},
// 商品管理-商品专题列表_删除专题下标签
specialDeleteLabel(params) {
return http.post(`${appApi}/api/kdsp/activity/activity-goods/special/delete-label`, qs.stringify(params));
},
// 商品管理-商品专题列表_排序列表
specialRank(params) {
return http.post(`${appApi}/api/kdsp/activity/activity-goods/special-detail/list-page`, params);
},
// 商品管理-商品专题列表_修改专题商品
updateGoods(params) {
return http.post(`${appApi}/api/kdsp/activity/activity-goods/special-detail/update`, params);
},
// 查询完成结点
nodeList() {
return http.get(`${appApi}/api/kdsp/points/task/node/list`);
},
// 准备下载商品专题数据
readyLoad(params) {
return http.post(`${appApi}/api/kdsp/activity/activity-goods/special-detail/ready-load`, params);
},
// 批量上传标记商品
batchLable(file) {
const params = new FormData();
params.append('file', file);
return http.post(`${appApi}/api/kdsp/sku/sku-info/batch_lable`, params);
},
// 商品渠道
getSkuSource() {
return http.post(`${appApi}/api/kdsp/sku/sku-info/getSkuSource`);
},
// 下载商品列表
pullSku(params) {
return http
.post(`${appApi}/api/kdsp/sku/sku-info/pull_valid_sku`, qs.stringify(params), {
responseType: 'arraybuffer',
})
.then(data => {
if (data.byteLength > 0) {
const blob = new Blob([data], { type: 'application/vnd.ms-excel;' });
fileSaver.saveAs(blob, `商品列表${getDate()}.xls`);
}
});
},
// 下载模板
templateDown() {
return http
.post(`${appApi}/api/kdsp/sku/sku-info/example_download`, null, {
responseType: 'arraybuffer',
})
.then(data => {
if (data.byteLength > 0) {
const blob = new Blob([data], { type: 'application/vnd.ms-excel;' });
fileSaver.saveAs(blob, `标记商品模板.xls`);
}
});
},
// 获取标签下的商品列表
getLabelProductList(params) {
return http.post(`${appApi}/api/kdsp/activity/activity-goods/label-info/sku-label/list-page`, params);
},
downloadProductByLabel(params) {
return http
.post(`${appApi}/api/kdsp/activity/activity-goods/label-info/download`, params, {
responseType: 'arraybuffer',
})
.then(data => {
if (data.byteLength > 0) {
const blob = new Blob([data], { type: 'application/vnd.ms-excel;' });
fileSaver.saveAs(blob, `${params.id}-${params.labelName}标签商品列表.xls`);
}
});
},
changeProductLableStatus(params) {
return http.post(`${appApi}/api/kdsp/activity/activity-goods/label-info/sku-label/update`, params);
},
getSpecialPreview(params) {
return http.post(`${appApi}/api/kdsp/activity/activity-goods/special/preview`, params);
},
specialPreviewSaveNext(params) {
return http.post(`${appApi}/api/kdsp/activity/activity-goods/special/preview/save-next`, params);
},
// 保存时候检查
specialSaveCheck(params) {
return http.post(`${appApi}/api/kdsp/activity/activity-goods/special/check-save`, params);
},
specialSaveNew(params) {
return http.post(`${appApi}/api/kdsp/activity/activity-goods/special/save-new`, params);
},
specialUpdateNew(params) {
return http.post(`${appApi}/api/kdsp/activity/activity-goods/special/update-new`, params);
},
specialDownloadTemplate(params) {
return http
.post(`${appApi}/api/kdsp/activity/activity-goods/special/download-template`, params, {
responseType: 'arraybuffer',
})
.then(data => {
if (data.byteLength > 0) {
const blob = new Blob([data], { type: 'application/vnd.ms-excel;' });
fileSaver.saveAs(blob, `商品列表.xls`);
}
});
},
specialUploadTemplate(file, previewId) {
const params = new FormData();
params.append('file', file);
params.append('previewId', previewId);
return http.post(`${appApi}/api/kdsp/activity/activity-goods/special/upload-template`, params);
},
};
import config from '../../config';
const { appApi } = config;
import qs from 'qs';
export default {
// 活动专题列表--检索
uniqueActivityList(params) {
return http.get(`${appApi}/api/kdsp/activity/activity-goods/special/list-ge-now?${qs.stringify(params)}`);
},
// 上下线
lineStatus(params) {
return http.post(`${appApi}/api/kdsp/activity/activity-info/update`, params);
},
// 活动名称列表
activityNameList(params) {
return http.get(`${appApi}/api/kdsp/activity/activity-info/list-ge-now?${qs.stringify(params)}`);
},
// 活动列表-分页
activityList(params) {
return http.post(`${appApi}/api/kdsp/activity/activity-info/list-page`, params);
},
// 模板管理-商品品类满减-列表
reductionList(params) {
return http.get(`${appApi}/api/kdsp/activity/activity-template/list-ge-now?${qs.stringify(params)}`);
},
// 活动管理-列表-新增
newActivity(params) {
return http.post(`${appApi}/api/kdsp/activity/activity-info/add`, params);
},
// 活动管理-列表-修改
updateActivity(params) {
return http.post(`${appApi}/api/kdsp/activity/activity-info/update`, params);
},
// 活动管理-列表-单个查询,反显数据使用
getINfo(params) {
return http.post(`${appApi}/api/kdsp/activity/activity-info/get`, params);
},
createPost(params) {
return http.post(`${appApi}/api/kdsp/activity/activity-info/makePlayBillPicUrl`, qs.stringify(params));
},
downloadPost(params) {
return http.post(`${appApi}/api/kdsp/activity/activity-info/getPlayBillPicUrl`, qs.stringify(params));
},
search(params) {
return http.get(`${appApi}/api/kdsp/op/group-order/list?${qs.stringify(params)}`);
},
getGroupCntList() {
return http.get(`${appApi}/api/kdsp/op/group-cnt/list`);
},
};
import config from '../../config';
const { appApi } = config;
import qs from 'qs';
// 显示配置
export default {
// 模板管理- 新增
activityAdd(params) {
return http.post(`${appApi}/api/kdsp/activity/activity-template/add`, params);
},
// 模板管理-修改
activityEdit(params) {
return http.post(`${appApi}/api/kdsp/activity/activity-template/update`, params);
},
// 模板管理-列表-分页
search(params) {
return http.post(`${appApi}/api/kdsp/activity/activity-template/list-page`, params);
},
// 模板管理-单条
templateGet(params) {
return http.post(`${appApi}/api/kdsp/activity/activity-template/get`, params);
},
// 模板管理-修改
templateUpdate(params) {
return http.post(`${appApi}/api/kdsp/activity/activity-template/update`, params);
},
// 商品管理-商品专题列表-查询1
listNow() {
return http.get(`${appApi}/api/kdsp/activity/activity-goods/special/list-ge-now`);
},
// 获取商品类目
categoryQuery() {
return http.get(`${appApi}/api/kdsp/op/rear-category/query/all`);
},
// 获取对应商品id的json串
getJson(params) {
return http.post(`${appApi}/api/kdsp/activity/activity-template/update-full-recd-temp`, params);
},
// 查询渠道列表_简版
getSimpleList(params) {
return http.get(`${appApi}/api/kdsp/op/ka/channel/simple-list?${qs.stringify(params)}`);
},
};
import config from '../../config';
import qs from 'qs';
const { appApi } = config;
// 显示配置
export default {
search(params) {
for (const key in params) {
if (!params[key]) {
delete params[key];
}
}
return http.post(`${appApi}/api/kdsp/app/app-config-push/list`, params);
},
add(params) {
return http.post(`${appApi}/api/kdsp/app/app-config-push/save`, params);
},
update(params) {
return http.post(`${appApi}/api/kdsp/app/app-config-push/update`, params);
},
find(params) {
return http.get(`${appApi}/api/kdsp/app/app-config-push/find?id=${params}`);
},
delItem(params) {
return http.post(`${appApi}/api/kdsp/app/app-config-item/delete`, params);
},
whiteList(params) {
return http.post(`${appApi}/api/kdsp/app/app-config-push/white-list/save`, qs.stringify(params));
},
};
/**
* Created by sunxiaoying on 2017/7/21.
*/
import config from '../../config';
import qs from 'qs';
const { appApi } = config;
// const appApi = 'http://192.168.28.41';
// 显示配置
export default {
// 新增积分任务
taskAdd(params) {
return http.post(`${appApi}/api/kdsp/points/task/add`, params, {
headers: {
'Content-Type': 'application/json',
},
});
},
// 积分任务状态变更
statusSwitch(params) {
return http.post(`${appApi}/api/kdsp/points/task/status/switch?taskId=${params.taskId}`);
},
// 积分列表查询
pointUrl(params) {
return http.post(`${appApi}/api/kdsp/points/task/list`, params, {
headers: {
'Content-Type': 'application/json',
},
});
},
// 积分明细列表查询
detailList(params) {
return http.post(`${appApi}/api/kdsp/points/detail/list`, params, {
headers: {
'Content-Type': 'application/json',
},
});
},
// 查询邀请好友记录
inviteList(params) {
return http.post(`${appApi}/api/kdsp/invite/list`, params, {
headers: {
'Content-Type': 'application/json',
},
});
},
// 查询完成结点
nodeList() {
return http.get(`${appApi}/api/kdsp/points/task/node/list`);
},
// 获取任务列表
// getEventList() {
// return http.get(`${appApi}/api/kdsp/op/userBenefits/user-benefits-event/event_list`);
// },
// 获取任务名称
// getEventNameList(params) {
// return http.get(`${appApi}/api/kdsp/op/userBenefits/user-benefits-event/event_detail_list?event_type=${params}`);
// },
// 新增任务确认
// addNewEvent(params) {
// return http.post(`${appApi}/api/kdsp/op/userBenefits/user-benefits-rule/add_rule`, params);
// },
// 发布下线
updatesOffline(params) {
return http.get(`${appApi}/api/kdsp/op/userBenefits/user-benefits-point-level/update_status?ids=${params.ids}&enable=${params.enable}`);
},
// 会员等级列表获取
memberLevelList(params) {
return http.get(`${appApi}/api/kdsp/op/userBenefits/user-benefits-point-level/query_List`, params);
},
// 新增会员等级
addNewLevel(params) {
return http.post(`${appApi}/api/kdsp/op/userBenefits/user-benefits-point-level/add_level`, qs.stringify(params), {
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
},
});
},
// 会员等级查看详情
detailLevel(params) {
return http.get(`${appApi}/api/kdsp/op/userBenefits/user-benefits-point-level/detail?id=${params}`);
},
// 会员等级编辑确定
editNewLevel(params) {
return http.post(`${appApi}/api/kdsp/op/userBenefits/user-benefits-point-level/update_level`, qs.stringify(params));
},
// 会员权益获取列表页
queryRightList(params) {
return http.get(`${appApi}/api/kdsp/op/userBenefits/user-benefits-point-level-attr/query_List?pageNo=${params.pageNo}&pageSize=${params.pageSize}`);
},
// 会员权益更新状态
updateStatus(params) {
return http.get(`${appApi}/api/kdsp/op/userBenefits/user-benefits-point-level-attr/update_status?ids=${params.ids}&enable=${params.enable}`);
},
// 会员权益获取等级名称
getLevelList() {
return http.get(`${appApi}/api/kdsp/op/userBenefits/user-benefits-point-level-attr/query_level_list`);
},
// 会员权益获取权益名称
getRightList() {
return http.get(`${appApi}/api/kdsp/op/userBenefits/user-benefits-point-level-attr/benefits_list_detail`);
},
// 会员权益编辑获取系统反显
detailRight(params) {
return http.get(`${appApi}/api/kdsp/op/userBenefits/user-benefits-point-level-attr/detail?id=${params}`);
},
getCouponList(params) {
return http.post(`${appApi}/api/kdsp/op/coupon/list`, params);
},
// 新增会员权益
addNewRight(params) {
return http.post(`${appApi}/api/kdsp/op/userBenefits/user-benefits-point-level-attr/add_attr`, qs.stringify(params));
},
// 更新会员权益
updateRight(params) {
return http.post(`${appApi}/api/kdsp/op/userBenefits/user-benefits-point-level-attr/update_attr`, qs.stringify(params));
},
};
import config from '../../config';
const { appApi } = config;
import qs from 'qs';
// 显示配置
export default {
search(params) {
for (const key in params) {
if (!params[key]) {
delete params[key];
}
}
return http.post(`${appApi}/api/kdsp/app/app-config/list`, params);
},
add(params) {
return http.post(`${appApi}/api/kdsp/app/app-config/add`, params, {
headers: { Account: 'yapi' },
});
},
update(params) {
return http.post(`${appApi}/api/kdsp/app/app-config/update`, params, {
headers: { Account: 'yapi' },
});
},
find(params) {
return http.post(`${appApi}/api/kdsp/app/app-config/find`, params);
},
delItem(params) {
return http.post(`${appApi}/api/kdsp/app/app-config-item/delete`, params);
},
activityList(params) {
return http.get(`${appApi}/api/kdsp/activity/activity-info/list-current-valid?${qs.stringify(params)}`);
},
labelList() {
return http.post(`${appApi}/api/kdsp/activity/activity-goods/label-info/list`);
},
skuList(params) {
// console.log(params, 'params');
return http.post(`${appApi}/api/kdsp/sku/sku-info/sku-list`, params);
},
secActivityList(params) {
return http.post(`${appApi}/api/kdsp/activity/activity-info/current-valid-activity`, params, {
headers: {
'Content-Type': 'application/json',
},
});
},
addTop(params) {
return http.post(`${appApi}/api/kdsp/index/top-tab/save`, params, {
headers: { Account: 'yapi' },
});
},
updateTop(params) {
return http.put(`${appApi}/api/kdsp/index/top-tab/update`, params, {
headers: { Account: 'yapi' },
});
},
getList(params) {
return http.post(`${appApi}/api/kdsp/index/top-tab/list-page`, params, {
headers: {
'Content-Type': 'application/json',
},
});
},
detial(params) {
return http.post(`${appApi}/api/kdsp/index/top-tab/view`, params);
},
editSecondNav(params) {
console.log(params);
return http.post(`${appApi}/api/kdsp/index/top-tab/save2`, params, {
headers: { Account: 'yapi' },
});
},
};
import config from '../../config';
const { appApi } = config;
// const appApi = 'http://192.168.29.89:8097';
// 显示配置
export default {
// 系统发放优惠券
systemSendCoupon(params) {
return http.post(`${appApi}/api/kdsp/op/coupon/receiver/system-send-post`, params, {
headers: {
'Content-Type': 'application/json',
},
});
},
// 优惠券使用列表
usedList(params) {
return http.post(`${appApi}/api/kdsp/op/coupon/used/list`, params, {
headers: {
'Content-Type': 'application/json',
},
});
},
// 批量发放上传文件
upload(params) {
const form = new FormData();
form.append('file', params.file);
form.append('overWrite', params.overWrite);
form.append('couponId', params.couponId);
form.append('queryUser', params.queryUser);
return http.post(`${appApi}/api/kdsp/op/coupon/receiver/excel/upload`, form);
},
// 获取文件处理状态
getProcess(params) {
return http.get(`${appApi}/api/kdsp/op/coupon/receiver/excel/upload-process-result?couponId=${params.couponId}`);
},
// 下载结果
downResult(params) {
return http.get(`${appApi}/api/kdsp/op/coupon/receiver/excel/failed-result?couponId=${params.couponId}`).then(res => {
const data = res.fileUrl;
window.location.href = data;
});
},
// 优惠券领取列表
receiverList(params) {
return http.post(`${appApi}/api/kdsp/op/coupon/receiver/list`, params, {
headers: {
'Content-Type': 'application/json',
},
});
},
couponUpdate(params) {
return http.post(`${appApi}/api/kdsp/op/coupon/status/update`, params);
},
// 优惠券编辑更新
addEdit(params) {
return http.post(`${appApi}/api/kdsp/op/coupon/add-edit`, params, {
headers: {
'Content-Type': 'application/json',
},
});
},
// 后端类目查询接口
categoryQuery() {
return http.get(`${appApi}/api/kdsp/op/rear-category/query/all`);
},
// 用户领取的优惠券冻结解冻(是否可用)
receiverUpdate(params) {
return http.post(`${appApi}/api/kdsp/op/coupon/receiver/update`, params);
},
// 优惠券搜索列表
couponList(params) {
return http.post(`${appApi}/api/kdsp/op/coupon/list`, params, {
headers: {
'Content-Type': 'application/json',
},
});
},
labelInfoList() {
return http.post(`${appApi}/api/kdsp/activity/activity-goods/label-info/list`);
},
// 优惠券消费记录页面导出
download(params) {
return http.post(`${appApi}/api/kdsp/op/coupon/used/list/export-excel`, params).then(res => {
const data = res.downloadUrl;
window.location.href = data;
});
},
};
import config from '../../config/index.js';
const { opapiHost } = config;
export default {
query(params) {
return http.post(`${opapiHost}/kdspOp/api/kdsp/index/layout/list-page`, params);
// return http.post(`http://yapi.quantgroups.com/mock/431/api/kdsp/index/layout/list-page`, params);
},
add(params) {
return http.post(`${opapiHost}/kdspOp/api/kdsp/index/layout/save`, params, { headers: { account: 'lingzhi.wang' } });
},
edit(params) {
return http.post(`${opapiHost}/kdspOp/api/kdsp/index/layout/edit`, params, { headers: { account: 'lingzhi.wang' } });
},
// 根据组件类型返回数据
getEles(params) {
return http.post(`${opapiHost}/kdspOp/api/kdsp/index/layout/valid-element`, params);
},
// 改变布局的发布状态
changeStatus(params) {
return http.post(`${opapiHost}/kdspOp/api/kdsp/index/layout/edit-status`, params, { headers: { account: 'lingzhi.wang' } });
},
// 根据组件id获取详情数据
configFind(params) {
return http.post(`${opapiHost}/kdspOp/api/kdsp/index/layout/app-config/find`, params, { headers: { account: 'lingzhi.wang' } });
},
// 通过布局id获取预览数据
getLayoutView(params) {
return http.post(`${opapiHost}/kdspOp/api/kdsp/index/layout/view`, params, { headers: { account: 'lingzhi.wang' } });
},
// 获取顶部tab list 数据
getTopTabList(params) {
return http.post(`${opapiHost}/kdspOp/api/kdsp/index/top-tab/list`, params, { headers: { account: 'lingzhi.wang' } });
},
};
import qs from 'qs';
import fileSaver from 'file-saver';
import config from '../../config';
import { getDate } from '../util';
const { appApi } = config;
// appApi = 'https://opapi-vcc3.liangkebang.net/kdspOp'
export default {
// 查询渠道列表
getChannelList(params) {
return http.get(`${appApi}/api/kdsp/op/ka/channel/list?${qs.stringify(params)}`);
},
// 查询(合作类型)简版
getCooperationType() {
return http.get(`${appApi}/api/kdsp/op/ka/channel/cooperation_type`);
},
// 查询子渠道列表
getChildList(params) {
return http.get(`${appApi}/api/kdsp/op/ka/query_childList?${qs.stringify(params)}`);
},
// 更新子渠道状态
updateChildStatus(params) {
return http.post(`${appApi}/api/kdsp/op/ka/update_child_status`, qs.stringify(params));
},
// 增加渠道信息
addInfo(params) {
return http.post(`${appApi}/api/kdsp/op/ka/add_info`, qs.stringify(params));
},
// 查询某渠道对应的数据信息
queryAll(params) {
return http.get(`${appApi}/api/kdsp/op/ka/query_all?${qs.stringify(params)}`);
},
// 下载excel(导出链接)
download(params) {
return http
.post(`${appApi}/api/kdsp/op/ka/channel/ka-detail-downLoad`, qs.stringify(params), {
responseType: 'arraybuffer',
})
.then(data => {
if (data.byteLength > 0) {
const blob = new Blob([data], { type: 'application/vnd.ms-excel;' });
fileSaver.saveAs(blob, `KA合作列表_${getDate()}.xls`);
}
});
},
// 查询KA流程配置组(合作类型)
getProcessGroup(params) {
return http.get(`${appApi}/api/kdsp/op/ka/query_process_group?${qs.stringify(params)}`);
},
// 批量修改主渠道状态
batchUpdate(params) {
return http.post(`${appApi}/api/kdsp/op/ka/batch_update_status`, qs.stringify(params));
},
// 渠道信息修改
updateInfo(params) {
return http.post(`${appApi}/api/kdsp/op/ka/update_info`, qs.stringify(params));
},
};
import qs from 'qs';
import config from '../../config';
const { appApi } = config;
// appApi = 'https://opapi-vcc3.liangkebang.net/kdspOp'
export default {
// 查询商品标签列表
getLabelList() {
return http.get(`${appApi}/api/kdsp/op/ka/label/querylist`);
},
// 查询优惠券批次列表
getCouponList(params) {
return http.post(`${appApi}/api/kdsp/op/coupon/list`, params);
},
// 检查渠道编码
checkChannel(params) {
return http.get(`${appApi}/api/kdsp/op/ka-depoy/check_channel?${qs.stringify(params)}`);
},
// 新增配置
addInfo(params) {
return http.get(`${appApi}/api/kdsp/op/ka-depoy/add_info?${qs.stringify(params)}`);
},
editInfo(params) {
return http.get(`${appApi}/api/kdsp/op/ka-depoy/update_info?${qs.stringify(params)}`);
},
// 列表页
getKAList(params) {
return http.get(`${appApi}/api/kdsp/op/ka-depoy/queryList?${qs.stringify(params)}`);
},
// 查询配置信息
getInfo(params) {
return http.get(`${appApi}/api/kdsp/op/ka-depoy/queryInfo?${qs.stringify(params)}`);
},
// 发布||下线
changeStatus(params) {
return http.get(`${appApi}/api/kdsp/op/ka-depoy/update_status?${qs.stringify(params)}`);
},
};
import config from '../../config';
import qs from 'qs';
const { appApi } = config;
export default {
// 小咩分部分
// 任务类型 下拉列表
getEventList() {
return http.get(`${appApi}/api/kdsp/op/userBenefits/user-benefits-event/event_list`);
},
// 任务名称
eventDetailList(params) {
return http.get(`${appApi}/api/kdsp/op/userBenefits/user-benefits-event/event_detail_list?event_type=${params}`);
},
// 小咩分--增加小咩分规则 提交按钮
addRule(params) {
return http.post(`${appApi}/api/kdsp/op/userBenefits/user-benefits-rule/add_rule`, qs.stringify(params));
},
// 查询规则列表
getQueryList(params) {
return http.get(`${appApi}/api/kdsp/op/userBenefits/user-benefits-rule/query_List?${qs.stringify(params)}`);
},
// 小咩分规则--修改状态
updateStatus(params) {
return http.get(`${appApi}/api/kdsp/op/userBenefits/user-benefits-rule/update_status?ids=${params.ids}&enable=${params.enable}`);
},
// 小咩分查看详情
detailRules(params) {
return http.get(`${appApi}/api/kdsp/op/userBenefits/user-benefits-rule/detail?id=${params.id}`);
},
// 编辑更新
updateRule(params) {
return http.post(`${appApi}/api/kdsp/op/userBenefits/user-benefits-rule/update_rule`, qs.stringify(params));
},
// 小咩分明细部分
// 小咩分搜索列表页
detailUpdateStatus(params) {
return http.get(`${appApi}/api/kdsp/op/userBenefits/user-benefits-detail/query_List?${qs.stringify(params)}`);
},
};
/**
* Created by sunxiaoying on 2017/7/21.
*/
import qs from 'qs';
import config from '../../config';
const { baseURI, appApi } = config;
// 显示配置
export default {
// 新增
newAddeBanner(params) {
return http.post(`${appApi}/api/kdsp/app/app-config-push/save`, params);
},
// 查询多条
newGetList(params) {
return http.post(`${appApi}/api/kdsp/app/app-config-push/list`, params);
},
// 编辑/修改
compileListItem(params) {
return http.post(`${appApi}/api/kdsp/app/app-config-push/update`, params);
},
// 查询单条
searchOneData(params) {
return http.post(`${appApi}/api/kdsp/app/app-config-push/find`, qs.stringify(params));
},
getPositionList() {
return http.get(`${baseURI}/config/ad/default-type`);
},
getList(params) {
return http.get(`${baseURI}/config/ad/ad-list/1?${qs.stringify(params)}`);
},
getAdvInfo(id) {
return http.get(`${baseURI}/config/ad/query-ad-detail/${id}/1`);
},
enableAdv(id, enable) {
return http.post(`${baseURI}/config/ad/enable/${id}/${enable}/1`);
},
move(sourceId, targetId) {
return http.post(`${baseURI}/config/ad/move/${sourceId}/${targetId}/1`);
},
buoyInfo(state) {
return http.get(`${baseURI}/config/page/card-buoy-info/${state}`);
},
buoySave(params) {
return http.post(`${baseURI}/config/page/save-card-buoy`, params);
},
borrowInfo(state) {
return http.get(`${baseURI}/config/page/borrowing-info/${state}`);
},
borrowSave(params) {
return http.post(`${baseURI}/config/page/save-borrowing`, qs.stringify(params), {
headers: {
'Content-Type': ' application/x-www-form-urlencoded',
},
});
},
cardTitleInfo(state) {
return http.get(`${baseURI}/config/page/card-title-info/${state}`);
},
cardTitleSave(params) {
return http.post(`${baseURI}/config/page/save-card-title`, params);
},
cardInfo(state) {
return http.get(`${baseURI}/config/page/card-copy-info/${state}`);
},
cardSave(params) {
return http.post(`${baseURI}/config/page/save-card-copy`, qs.stringify(params), {
headers: {
'Content-Type': ' application/x-www-form-urlencoded',
},
});
},
buttonInfo(state) {
return http.get(`${baseURI}/config/page/button-info/${state}`);
},
buttonSave(params) {
return http.post(`${baseURI}/config/page/save-button`, qs.stringify(params), {
headers: {
'Content-Type': ' application/x-www-form-urlencoded',
},
});
},
newAdv(params) {
return http.post(`${baseURI}/config/ad/add-ad/1`, qs.stringify(params));
},
detailInfo(state) {
return http.get(`${baseURI}/config/page/see-detail/${state}`);
},
detailSave(params) {
return http.post(`${baseURI}/config/page/save-see-detail`, qs.stringify(params), {
headers: {
'Content-Type': ' application/x-www-form-urlencoded',
},
});
},
queryConfig(loanState) {
return http.get(`${baseURI}/config/page/query-config?loanState=${loanState}`);
},
addBanner(params) {
return http.post(`${baseURI}/config/page/add-banner`, qs.stringify(params), {
headers: {
'Content-Type': ' application/x-www-form-urlencoded',
},
});
},
updateBanner(params) {
params.updateStates = params.displayCode;
return http.post(`${baseURI}/config/page/update-banner`, qs.stringify(params), {
headers: {
'Content-Type': ' application/x-www-form-urlencoded',
},
});
},
bannerInfo(id, loanState) {
return http.get(`${baseURI}/config/page/get-banner?id=${id}&loanState=${loanState}`);
},
moveBanner(sourceId, targetId, loanState) {
const params = {
loanState,
targetId,
sourceId,
};
return http.post(`${baseURI}/config/page/move-banner`, qs.stringify(params), {
headers: {
'Content-Type': ' application/x-www-form-urlencoded',
},
});
},
enableBanner(id, enable, loanState) {
const params = {
id,
enable,
loanState,
};
return http.post(`${baseURI}/config/page/enable-banner`, qs.stringify(params), {
headers: {
'Content-Type': ' application/x-www-form-urlencoded',
},
});
},
bannerQuery(params) {
return http.get(`${baseURI}/config/page/banners?enable=${params.enable || ''}&loanState=${params['userState']}`);
},
getAdUserStatusList() {
return http.get(`${baseURI}/config/ad/loan-states`);
},
};
/**
* Created by sunxiaoying on 2017/10/14.
*/
import qs from 'qs';
import config from '../../config';
import fileSaver from 'file-saver';
const { baseURI: apiBaseUrls, smsApiBaseUrls, moConfigApi, appApi } = config;
export default {
getTemplatePage(params) {
return http.post(`${smsApiBaseUrls}/middle_office/template/page`, params);
},
getTemplateInfo(id) {
return http.get(`${smsApiBaseUrls}/middle_office/template/${id}`);
},
templateEnable(id, enable) {
return http.delete(`${smsApiBaseUrls}/middle_office/template/${id}/${enable}?author=test&authorName=test`);
},
updateTemplate(params) {
return http.post(`${smsApiBaseUrls}/middle_office/template`, params);
},
template() {
return http.get(`${smsApiBaseUrls}/middle_office/select/templateType`);
},
channelType() {
return http.get(`${smsApiBaseUrls}/middle_office/select/channelType`);
},
msgType() {
return http.get(`${smsApiBaseUrls}/middle_office/select/msgType`);
},
getParamsList(templateType) {
return http.get(`${smsApiBaseUrls}/middle_office/select/fields?templateType=${templateType}`);
},
getPlatformType() {
return http.get(`${smsApiBaseUrls}/middle_office/select/smsMarketPlatformType`); // 获取通道下拉列表
},
templateType(templateType) {
return http.get(`${smsApiBaseUrls}/middle_office/template/list/${templateType}`);
},
sign(platform) {
return http.get(`${smsApiBaseUrls}/middle_office/sign_market/${platform}`);
},
addSignature(params) {
return http.post(`${smsApiBaseUrls}/middle_office/sign_market?author=test&authorName=test`, params);
},
getChannelList() {
return http.get(`${apiBaseUrls}/message/query-send-channel`);
},
send(params) {
const form = new FormData();
for (const key in params) {
form.append(key, params[key]);
}
return http.post(`${apiBaseUrls}/message/send`, form);
},
down() {
window.location.href = `${apiBaseUrls}/template.xlsx`;
},
messageType() {
return http.get(`${apiBaseUrls}/message/batch/messagetype`);
},
querySendList(params) {
return http.post(`${apiBaseUrls}/message/batch/list/${params.page}/${params.size}`, params);
},
updateCtr() {
return http.post(`${apiBaseUrls}/message/batch/update-ctr`);
},
downFile(id, sendTime) {
return http
.get(`${apiBaseUrls}/message/batch/download/${id}`, {
responseType: 'arraybuffer',
})
.then(data => {
if (data.byteLength > 0) {
const blob = new Blob([data], { type: 'application/vnd.ms-excel;' });
fileSaver.saveAs(blob, `${sendTime}.xlsx`);
}
});
},
getNodeInfo(id) {
return http.get(`${moConfigApi}/msg/fund_channel_node/${id}`);
},
updateNodeStatus({ id, enable }) {
return http.delete(`${moConfigApi}/msg/fund_channel_node/${id}?enable=${enable}`);
},
saveNode(params) {
return http.post(`${moConfigApi}/msg/fund_channel_node`, params);
},
queryNode(params) {
return http.get(`${moConfigApi}/msg/fund_channel_node/page?${qs.stringify(params)}`);
},
getNodeStatus() {
return http.get(`${moConfigApi}/select/fund_channel_node_type`);
},
getBlackInfo(id) {
return http.get(`${smsApiBaseUrls}/middle_office/sms_market_black_list/${id}`);
},
updateBlackStatus({ id, enable, description }) {
return http.delete(`${smsApiBaseUrls}/middle_office/sms_market_black_list/${id}/${enable}?description=${description}`);
},
saveBlack(params) {
return http.post(`${smsApiBaseUrls}/middle_office/sms_market_black_list`, params);
},
queryBlackList(params) {
return http.post(`${smsApiBaseUrls}/middle_office/sms_market_black_list/page`, params);
},
getSmsPlatformType() {
return http.get(`${smsApiBaseUrls}/middle_office/select/smsPlatformType`);
},
// 转换短链接
uploadShortUrl(file) {
const params = new FormData();
params.append('file', file);
return http.post(`${appApi}/api/kdsp/shortUrl/upload_short_url`, params);
},
// 下载模板
templateDown() {
return http
.post(`${appApi}/api/kdsp/shortUrl/example_download`, null, {
responseType: 'arraybuffer',
})
.then(data => {
if (data.byteLength > 0) {
const blob = new Blob([data], { type: 'application/vnd.ms-excel;' });
fileSaver.saveAs(blob, `长链接转短链接上传模板.xls`);
}
});
},
// 查询状态
checkStatus() {
return http.get(`${appApi}/api/kdsp/shortUrl/check_status`);
},
// 下载
relaDown() {
return http.get(`${appApi}/api/kdsp/shortUrl/real_download`);
},
};
import config from '../../config/index.js';
const { baseURI: ApiBaseUrl, moConfigApi } = config;
export default {
query(params) {
return http.post(`${ApiBaseUrl}/config/strategy/query`, params);
},
saveStrategy(params) {
return http.post(`${ApiBaseUrl}/config/strategy/modify`, params);
},
getUserState() {
return http.get(`${ApiBaseUrl}/config/strategy/query-user-state`);
},
getUserTemplateIds(id) {
return http.get(`${ApiBaseUrl}/config/strategy/get-template_ids/${id}`);
},
getChannel(idPrefix) {
return http.get(`${moConfigApi}/select/channel/${idPrefix}`, {
headers: {
_isLoading: false,
},
});
},
};
import config from '../../config';
const { appApi } = config;
import qs from 'qs';
export default {
// APP配置-添加底部导航
tabAdd(params) {
return http.post(`${appApi}/api/kdsp/app-config/bottom-tab/add`, params);
},
// APP配置-修改底部导航
tabUpdate(params) {
return http.post(`${appApi}/api/kdsp/app-config/bottom-tab/update`, params);
},
// APP配置-获取底部导航列表
tabList(params) {
return http.post(`${appApi}/api/kdsp/app-config/bottom-tab/list`, params);
},
// 修改状态
tabStatus(params) {
return http.post(`${appApi}/api/kdsp/app-config/bottom-tab/update-status`, params, qs.stringify(params), {
headers: {
'Content-Type': 'application/json',
},
});
},
};
This diff is collapsed.
import qs from 'qs';
import config from '../../config';
const { appApi } = config;
// 用户分群
export default {
// 新增
saveCrowd(params) {
return http.post(`${appApi}/api/kdsp/op/crowd/saveCrowd`, params);
},
// 更新
updateCrowd(params) {
return http.post(`${appApi}/api/kdsp/op/crowd/updateCrowd`, params);
},
// 详情
infoCrowd(params) {
return http.post(`${appApi}/api/kdsp/op/crowd/info`, qs.stringify(params));
},
// 查询
getCrowdList(params) {
return http.post(`${appApi}/api/kdsp/op/crowd/getCrowdList`, qs.stringify(params));
},
// 地区列表
addressList() {
return http.get(`${appApi}/api/kdsp/op/crowd/address/list`);
},
channelList(params) {
return http.get(`${appApi}/api/kdsp/op/crowd/channel/list?${qs.stringify(params)}`);
},
};
import config from '../../config';
import qs from 'qs';
import fileSaver from 'file-saver';
const { appApi } = config;
// let appApi = 'http://192.168.28.41';
export default {
// 获取微信模板ID
getTemplates(params) {
// console.log(params);
return http.get(`${appApi}/api/kdsp/weixin/getTemplates?${qs.stringify(params)}`, {
headers: {
'Content-Type': 'application/json',
},
});
},
// 真实下载(含手机号)
downloadPhone() {
return http.get(`${appApi}/api/kdsp/weixin/example_download`, {
headers: {
'Content-Type': 'application/json',
},
});
},
// 微信模板上传并转换
sendMsg(params) {
// return http.post(`${appApi}/api/kdsp/weixin/sendMsg`, params, {
// headers: {
// 'Content-Type': 'multipart/form-data',
// }
// });
const form = new FormData();
for (const key in params) {
form.append(key, params[key]);
}
return http.post(`${appApi}/api/kdsp/weixin/sendMsg`, form);
},
onDownLoad() {
return http
.post(`${appApi}/api/kdsp/weixin/example_download`, null, {
responseType: 'arraybuffer',
})
.then(data => {
if (data.byteLength > 0) {
const blob = new Blob([data], { type: 'application/vnd.ms-excel;' });
fileSaver.saveAs(blob, `公众号通知消息模板.xls`);
}
});
},
};
This diff is collapsed.
This diff is collapsed.
/**
* Created by sunxiaoying on 2017/7/28.
*/
import config from '../config';
const opapiHost = config.opapiHost;
const qiniuHost = config.qiniuHost;
export function uploadQiniu(uploadPic) {
Qiniu.uploader({
runtimes: 'html5,flash,html4', // 上传模式,依次退化
browse_button: uploadPic, // 上传选择的点选按钮,**必需**
uptoken_url: opapiHost + '/upload/getToken', // Ajax请求upToken的Url,**强烈建议设置**(服务端提供)
domain: qiniuHost, // bucket 域名,下载资源时用到,**必需**
get_new_uptoken: false, // 设置上传文件的时候是否每次都重新获取新的token
max_file_size: '10mb', // 最大文件体积限制
chunk_size: '4mb', // 分块上传时,每片的体积
auto_start: true, // 选择文件后自动上传,若关闭需要自己绑定事件触发上传
filters: {
max_file_size: '100mb',
prevent_duplicates: false, // 不允许选取重复文件
mime_types: [
{ title: 'Image files', extensions: 'JPEG,jpg,png' }, // 限定jpg,gif,png后缀上传
],
},
init: {
FileUploaded(up, file, info) {
const res = JSON.parse(info.response);
const hash = res.hash;
console.log(hash);
},
},
});
}
This diff is collapsed.
.select-width-280{
width: 280px;
}
.select-width-200{
width: 200px;
}
.select-width-150{
width: 150px;
}
.select-width-100{
width: 100px;
}
.inline-block{
display: inline-block;
}
.block{
display: block;
}
.margin-20{
margin-top: 20px;
}
.marginL-20{
margin-left: 20px;
}
@deep: ~'>>>';
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment