diff --git a/src/api/finance/marketing.js b/src/api/finance/marketing.js index 4f86586..548554a 100644 --- a/src/api/finance/marketing.js +++ b/src/api/finance/marketing.js @@ -1,150 +1,150 @@ -import request from '@/utils/request' -var service_name = 'oil-mall' -var group_name = 'mallAdvertise' -var new_group_name = 'mallHomeRecommended' -export default { - getByPage(page) { - // 分页查询 - return request({ - url: `/${service_name}/${group_name}/getByPage`, - method: 'post', - data: page - }) - }, - - save(data) { - // 新增广告 - return request({ - url: `/${service_name}/${group_name}/save`, - method: 'post', - data: data - }) - }, - update(data) { - // 修改广告 - return request({ - url: `/${service_name}/${group_name}/update`, - method: 'post', - data: data - }) - }, - delete(data) { - // 删除广告 - return request({ - url: `/${service_name}/${group_name}/delete`, - method: 'post', - data: data - }) - }, - - get(id) { - // 查询广告详情 - return request({ - url: `/${service_name}/${group_name}/get/${id}`, - method: 'get' - }) - }, - goOnlineAndGoOffline(page) { - // 广告上下线 - return request({ - url: `/${service_name}/${group_name}/goOnlineAndGoOffline`, - method: 'post', - data: page - }) - }, - - getHomeByPage(page) { - // 分页查询 - return request({ - url: `/${service_name}/${new_group_name}/getByPage`, - method: 'post', - data: page - }) - }, - topOne(id) { - // 置顶 - return request({ - url: `/${service_name}/${new_group_name}/topOne/${id}`, - method: 'get' - }) - }, - - homeDelete(page) { - // 删除首页推荐 - return request({ - url: `/${service_name}/${new_group_name}/delete`, - method: 'post', - data: page - }) - }, - whetherToRecommend(page) { - // 修改是否推荐 - return request({ - url: `/${service_name}/${new_group_name}/whetherToRecommend`, - method: 'post', - data: page - }) - }, - chooseProducts(page) { - // 选择商品新增推荐 - return request({ - url: `/${service_name}/${new_group_name}/chooseProducts`, - method: 'post', - data: page - }) - }, - getModuleByPage(page) { - // 模块分页查询 - return request({ - url: `/${service_name}/mallModule/getByPage`, - method: 'post', - data: page - }) - }, - getProductByPage(page) { - // 商品分页查询 - return request({ - url: `/${service_name}/mallProductInfo/getByPage`, - method: 'post', - data: page - }) - }, - getByPageNew(page) { - // 搜索统计列表 - return request({ - url: `/${service_name}/mallSearch/getByPageNew`, - method: 'post', - data: page - }) - }, - getProductByPage(page) { - // 商品销售列表 - return request({ - url: `/${service_name}/mallProductInfo/getPage`, - method: 'post', - data: page - }) - }, - commodityChart(time) { - // 商品统计图 - return request({ - url: `/${service_name}/mallProductClassification/commodityChart/${time}`, - method: 'get' - }) - }, - updateModule(page) { - // 模块显示隐藏 - return request({ - url: `/${service_name}/mallModule/update`, - method: 'post', - data: page - }) - }, - fluctuation(id, type) { - // 模块上下移动 - return request({ - url: `/${service_name}/mallModule/fluctuation/${id}/${type}`, - method: 'get' - }) - } -} +import request from '@/utils/request' +var service_name = 'oil-mall' +var group_name = 'mallAdvertise' +var new_group_name = 'mallHomeRecommended' +export default { + getByPage(page) { + // 分页查询 + return request({ + url: `/${service_name}/${group_name}/getByPage`, + method: 'post', + data: page + }) + }, + + save(data) { + // 新增广告 + return request({ + url: `/${service_name}/${group_name}/save`, + method: 'post', + data: data + }) + }, + update(data) { + // 修改广告 + return request({ + url: `/${service_name}/${group_name}/update`, + method: 'post', + data: data + }) + }, + delete(data) { + // 删除广告 + return request({ + url: `/${service_name}/${group_name}/delete`, + method: 'post', + data: data + }) + }, + + get(id) { + // 查询广告详情 + return request({ + url: `/${service_name}/${group_name}/get/${id}`, + method: 'get' + }) + }, + goOnlineAndGoOffline(page) { + // 广告上下线 + return request({ + url: `/${service_name}/${group_name}/goOnlineAndGoOffline`, + method: 'post', + data: page + }) + }, + + getHomeByPage(page) { + // 分页查询 + return request({ + url: `/${service_name}/${new_group_name}/getByPage`, + method: 'post', + data: page + }) + }, + topOne(id) { + // 置顶 + return request({ + url: `/${service_name}/${new_group_name}/topOne/${id}`, + method: 'get' + }) + }, + + homeDelete(page) { + // 删除首页推荐 + return request({ + url: `/${service_name}/${new_group_name}/delete`, + method: 'post', + data: page + }) + }, + whetherToRecommend(page) { + // 修改是否推荐 + return request({ + url: `/${service_name}/${new_group_name}/whetherToRecommend`, + method: 'post', + data: page + }) + }, + chooseProducts(page) { + // 选择商品新增推荐 + return request({ + url: `/${service_name}/${new_group_name}/chooseProducts`, + method: 'post', + data: page + }) + }, + getModuleByPage(page) { + // 模块分页查询 + return request({ + url: `/${service_name}/mallModule/getByPage`, + method: 'post', + data: page + }) + }, + getProductByPage(page) { + // 商品分页查询 + return request({ + url: `/${service_name}/mallProductInfo/getByPage`, + method: 'post', + data: page + }) + }, + getByPageNew(page) { + // 搜索统计列表 + return request({ + url: `/${service_name}/mallSearch/getByPageNew`, + method: 'post', + data: page + }) + }, + getProductByPage(page) { + // 商品销售列表 + return request({ + url: `/${service_name}/mallProductInfo/getByPage`, + method: 'post', + data: page + }) + }, + commodityChart(time) { + // 商品统计图 + return request({ + url: `/${service_name}/mallProductClassification/commodityChart/${time}`, + method: 'get' + }) + }, + updateModule(page) { + // 模块显示隐藏 + return request({ + url: `/${service_name}/mallModule/update`, + method: 'post', + data: page + }) + }, + fluctuation(id, type) { + // 模块上下移动 + return request({ + url: `/${service_name}/mallModule/fluctuation/${id}/${type}`, + method: 'get' + }) + } +} diff --git a/src/components/Upload/index.vue b/src/components/Upload/index.vue index e0d1aed..8fe7248 100644 --- a/src/components/Upload/index.vue +++ b/src/components/Upload/index.vue @@ -1,123 +1,138 @@ - - - - - + + + + + diff --git a/src/views/marketing/advertisement/advertisementAdd.vue b/src/views/marketing/advertisement/advertisementAdd.vue index 97bd073..536ae06 100644 --- a/src/views/marketing/advertisement/advertisementAdd.vue +++ b/src/views/marketing/advertisement/advertisementAdd.vue @@ -1,117 +1,119 @@ - - - + + + diff --git a/src/views/marketing/advertisement/advertisementList.vue b/src/views/marketing/advertisement/advertisementList.vue index dcf479b..bab6710 100644 --- a/src/views/marketing/advertisement/advertisementList.vue +++ b/src/views/marketing/advertisement/advertisementList.vue @@ -1,279 +1,279 @@ - - - - + + + + diff --git a/src/views/marketing/advertisement/advertisementUpdate.vue b/src/views/marketing/advertisement/advertisementUpdate.vue index 48524e1..3336ce3 100644 --- a/src/views/marketing/advertisement/advertisementUpdate.vue +++ b/src/views/marketing/advertisement/advertisementUpdate.vue @@ -1,111 +1,118 @@ - - - + + + diff --git a/src/views/order/orderListCancle.vue b/src/views/order/orderListCancle.vue index 89776bd..0d4d007 100644 --- a/src/views/order/orderListCancle.vue +++ b/src/views/order/orderListCancle.vue @@ -1,93 +1,93 @@ - - - + + + diff --git a/src/views/order/orderListDetail.vue b/src/views/order/orderListDetail.vue index 7e64ef7..96ec758 100644 --- a/src/views/order/orderListDetail.vue +++ b/src/views/order/orderListDetail.vue @@ -1,296 +1,299 @@ - - - - + + + + diff --git a/src/views/order/orderRefundListDetail.vue b/src/views/order/orderRefundListDetail.vue index ebfc475..3fbe360 100644 --- a/src/views/order/orderRefundListDetail.vue +++ b/src/views/order/orderRefundListDetail.vue @@ -1,265 +1,283 @@ - - - - + + + + diff --git a/src/views/statistics/productStatisticsList.vue b/src/views/statistics/productStatisticsList.vue index a537313..b3c7f96 100644 --- a/src/views/statistics/productStatisticsList.vue +++ b/src/views/statistics/productStatisticsList.vue @@ -1,550 +1,551 @@ - - - - + + + + diff --git a/vue.config.js b/vue.config.js index 05ad053..5ecc24f 100644 --- a/vue.config.js +++ b/vue.config.js @@ -1,144 +1,144 @@ -'use strict' -const path = require('path') -const defaultSettings = require('./src/settings.js') - -function resolve(dir) { - return path.join(__dirname, dir) -} - -const name = defaultSettings.title || '星油能源运营管理平台' -const port = 9528 - -module.exports = { - publicPath: './', - outputDir: 'dist', - assetsDir: './static', - lintOnSave: process.env.NODE_ENV === 'development', - productionSourceMap: false, // 改为false可一定程度上解决浏览器f12查看到源码的问题 - devServer: { - disableHostCheck: true, - port: port, - overlay: { - warnings: false, - errors: true - }, - proxy: { - [process.env.VUE_APP_BASE_API]: { - // target: `cls`, - // target: `http://192.168.0.6:38080`, - target: `http://192.168.0.18:38080`, - // target: `http://192.168.1.83:38080`, - // target: 'http://222.132.26.119:8081', - // target: `https://www.xingoil.com/adminapi`, - // target: 'http://uat.xingoil.com/adminapi', - changeOrigin: true, - pathRewrite: { - ['^' + process.env.VUE_APP_BASE_API]: '' - } - }, - [process.env.VUE_APP_UPLOAD_URL]: { - target: `http://127.0.0.1:38080`, - changeOrigin: true, - pathRewrite: { - ['^' + process.env.VUE_APP_BASE_API]: '' - } - }, - [process.env.VUE_APP_BASE_LSM_API]: { - target: `http://121.41.3.91:8085`, - changeOrigin: true, - pathRewrite: { - ['^' + process.env.VUE_APP_BASE_LSM_API]: '' - } - } - } - // https:true, - }, - configureWebpack: { - name: name, - resolve: { - alias: { - '@': resolve('src') // 别名。开启后@表示src下目录 - } - }, - externals: { - './cptable': 'var cptable', - AMap: 'AMap' - } - }, - chainWebpack(config) { - config.plugins.delete('preload') // TODO: need test - config.plugins.delete('prefetch') // TODO: need test - config.entry.app = ['babel-polyfill', './src/main.js'] - // set svg-sprite-loader - config.module - .rule('svg') - .exclude.add(resolve('src/icons')) - .end() - config.module - .rule('icons') - .test(/\.svg$/) - .include.add(resolve('src/icons')) - .end() - .use('svg-sprite-loader') - .loader('svg-sprite-loader') - .options({ - symbolId: 'icon-[name]' - }) - .end() - - if (process.env.use_analyzer) { - // 分析 - config.plugin('webpack-bundle-analyzer').use(require('webpack-bundle-analyzer').BundleAnalyzerPlugin) - } - - // set preserveWhitespace - config.module - .rule('vue') - .use('vue-loader') - .loader('vue-loader') - .tap(options => { - options.compilerOptions.preserveWhitespace = true - return options - }) - .end() - - config - // https://webpack.js.org/configuration/devtool/#development.when(process.env.NODE_ENV === 'development', config => config.devtool('cheap-source-map')) - config.when(process.env.NODE_ENV !== 'development', config => { - config - .plugin('ScriptExtHtmlWebpackPlugin') - .after('html') - .use('script-ext-html-webpack-plugin', [ - { - // `runtime` must same as runtimeChunk name. default is `runtime` - inline: /runtime\..*\.js$/ - } - ]) - .end() - config.optimization.splitChunks({ - chunks: 'all', - cacheGroups: { - libs: { - name: 'chunk-libs', - test: /[\\/]node_modules[\\/]/, - priority: 10, - chunks: 'initial' // only package third parties that are initially dependent - }, - elementUI: { - name: 'chunk-elementUI', // split elementUI into a single package - priority: 20, // the weight needs to be larger than libs and app or it will be packaged into libs or app - test: /[\\/]node_modules[\\/]_?element-ui(.*)/ // in order to adapt to cnpm - }, - commons: { - name: 'chunk-commons', - test: resolve('src/components'), // can customize your rules - minChunks: 3, // minimum common number - priority: 5, - reuseExistingChunk: true - } - } - }) - config.optimization.runtimeChunk('single') - }) - } -} +'use strict' +const path = require('path') +const defaultSettings = require('./src/settings.js') + +function resolve(dir) { + return path.join(__dirname, dir) +} + +const name = defaultSettings.title || '星油能源运营管理平台' +const port = 9528 + +module.exports = { + publicPath: './', + outputDir: 'dist', + assetsDir: './static', + lintOnSave: process.env.NODE_ENV === 'development', + productionSourceMap: false, // 改为false可一定程度上解决浏览器f12查看到源码的问题 + devServer: { + disableHostCheck: true, + port: port, + overlay: { + warnings: false, + errors: true + }, + proxy: { + [process.env.VUE_APP_BASE_API]: { + // target: `cls`, + // target: `http://192.168.0.6:38080`, + target: `http://192.168.0.24:38080`, + // target: `http://192.168.1.83:38080`, + // target: 'http://222.132.26.119:8081', + // target: `https://www.xingoil.com/adminapi`, + // target: 'http://uat.xingoil.com/adminapi', + changeOrigin: true, + pathRewrite: { + ['^' + process.env.VUE_APP_BASE_API]: '' + } + }, + [process.env.VUE_APP_UPLOAD_URL]: { + target: `http://127.0.0.1:38080`, + changeOrigin: true, + pathRewrite: { + ['^' + process.env.VUE_APP_BASE_API]: '' + } + }, + [process.env.VUE_APP_BASE_LSM_API]: { + target: `http://121.41.3.91:8085`, + changeOrigin: true, + pathRewrite: { + ['^' + process.env.VUE_APP_BASE_LSM_API]: '' + } + } + } + // https:true, + }, + configureWebpack: { + name: name, + resolve: { + alias: { + '@': resolve('src') // 别名。开启后@表示src下目录 + } + }, + externals: { + './cptable': 'var cptable', + AMap: 'AMap' + } + }, + chainWebpack(config) { + config.plugins.delete('preload') // TODO: need test + config.plugins.delete('prefetch') // TODO: need test + config.entry.app = ['babel-polyfill', './src/main.js'] + // set svg-sprite-loader + config.module + .rule('svg') + .exclude.add(resolve('src/icons')) + .end() + config.module + .rule('icons') + .test(/\.svg$/) + .include.add(resolve('src/icons')) + .end() + .use('svg-sprite-loader') + .loader('svg-sprite-loader') + .options({ + symbolId: 'icon-[name]' + }) + .end() + + if (process.env.use_analyzer) { + // 分析 + config.plugin('webpack-bundle-analyzer').use(require('webpack-bundle-analyzer').BundleAnalyzerPlugin) + } + + // set preserveWhitespace + config.module + .rule('vue') + .use('vue-loader') + .loader('vue-loader') + .tap(options => { + options.compilerOptions.preserveWhitespace = true + return options + }) + .end() + + config + // https://webpack.js.org/configuration/devtool/#development.when(process.env.NODE_ENV === 'development', config => config.devtool('cheap-source-map')) + config.when(process.env.NODE_ENV !== 'development', config => { + config + .plugin('ScriptExtHtmlWebpackPlugin') + .after('html') + .use('script-ext-html-webpack-plugin', [ + { + // `runtime` must same as runtimeChunk name. default is `runtime` + inline: /runtime\..*\.js$/ + } + ]) + .end() + config.optimization.splitChunks({ + chunks: 'all', + cacheGroups: { + libs: { + name: 'chunk-libs', + test: /[\\/]node_modules[\\/]/, + priority: 10, + chunks: 'initial' // only package third parties that are initially dependent + }, + elementUI: { + name: 'chunk-elementUI', // split elementUI into a single package + priority: 20, // the weight needs to be larger than libs and app or it will be packaged into libs or app + test: /[\\/]node_modules[\\/]_?element-ui(.*)/ // in order to adapt to cnpm + }, + commons: { + name: 'chunk-commons', + test: resolve('src/components'), // can customize your rules + minChunks: 3, // minimum common number + priority: 5, + reuseExistingChunk: true + } + } + }) + config.optimization.runtimeChunk('single') + }) + } +}