-
{{item.title}}
+
{{item.title}}
-
-
+
@@ -24,20 +28,23 @@ export default {
data() {
return {
month: "", // 月份
-
- selectedWay: { // 可选时间项
+
+ selectedWay: {
+ // 可选时间项
title: "最近7天",
selected: true,
searchType: "LAST_SEVEN",
},
storeId: "", // 店铺id
dates: [], // 日期列表
- params: { // 请求参数
+ params: {
+ // 请求参数
pageNumber: 1,
pageSize: 10,
storeName: "",
},
- dateList: [ // 筛选条件
+ dateList: [
+ // 筛选条件
{
title: "今天",
selected: false,
@@ -71,7 +78,6 @@ export default {
methods: {
// 页面触底
handleReachBottom() {
-
setTimeout(() => {
if (this.params.pageNumber * this.params.pageSize <= this.shopTotal) {
this.params.pageNumber++;
@@ -144,7 +150,15 @@ export default {
this.month = "";
if (item.searchType == "") {
- item.searchType = "LAST_SEVEN";
+ if (
+ dateList.some((date) => {
+ return date.title == item.title;
+ })
+ ) {
+ item.searchType = date.searchType;
+ } else {
+ item.searchType = "LAST_SEVEN";
+ }
}
this.selectedWay = item;
diff --git a/manager/src/views/promotion/couponActivity/coupon.vue b/manager/src/views/promotion/couponActivity/coupon.vue
index d08d046d..b350639a 100644
--- a/manager/src/views/promotion/couponActivity/coupon.vue
+++ b/manager/src/views/promotion/couponActivity/coupon.vue
@@ -78,7 +78,7 @@ export default {
},
},
{
- title: "优惠券类型",
+ title: "活动范围",
key: "activityScope",
minWidth: 120,
render: (h, params) => {
diff --git a/manager/vue.config.js b/manager/vue.config.js
index 3f9dcc1a..0dab49e7 100644
--- a/manager/vue.config.js
+++ b/manager/vue.config.js
@@ -1,6 +1,6 @@
const path = require("path");
const CompressionPlugin = require("compression-webpack-plugin");
-const UglifyJsPlugin = require('uglifyjs-webpack-plugin')
+const UglifyJsPlugin = require("uglifyjs-webpack-plugin");
const resolve = dir => {
return path.join(__dirname, dir);
};
@@ -47,9 +47,27 @@ let cdn = {
]
};
-// 判断是否需要加载CDN
+// 删除注释
+let jsPlugin = [
+ new UglifyJsPlugin({
+ uglifyOptions: {
+ // 删除注释
+ output: {
+ comments: false
+ },
+ compress: {
+ drop_console: true, // 删除所有调式带有console的
+ drop_debugger: true,
+ pure_funcs: ["console.log"] // 删除console.log
+ }
+ }
+ })
+];
+
+// 判断是否需要加载CDN,线上删除注释
cdn = enableProduction ? cdn : { css: [], js: [] };
externals = enableProduction ? externals : {};
+jsPlugin = enableProduction ? jsPlugin : [];
module.exports = {
css: {
loaderOptions: {
@@ -79,24 +97,9 @@ module.exports = {
threshold: 10240 // 对超过10k文件压缩
})
],
- mode: "production",
optimization: {
runtimeChunk: "single",
- minimizer: [
- new UglifyJsPlugin({
- uglifyOptions: {
- // 删除注释
- output: {
- comments: false
- },
- compress: {
- drop_console: true, // 删除所有调式带有console的
- drop_debugger: true,
- pure_funcs: ["console.log"] // 删除console.log
- }
- }
- })
- ],
+ minimizer: jsPlugin,
splitChunks: {
chunks: "all",
maxInitialRequests: Infinity,
diff --git a/seller/src/views/lili-components/affix-time.vue b/seller/src/views/lili-components/affix-time.vue
index 96587dcf..54461bb9 100644
--- a/seller/src/views/lili-components/affix-time.vue
+++ b/seller/src/views/lili-components/affix-time.vue
@@ -112,8 +112,16 @@ export default {
item.storeId = this.storeId;
this.month = "";
- if (item.searchType == "") {
- item.searchType = "LAST_SEVEN";
+ if (item.searchType == "") {
+ if (
+ dateList.some((date) => {
+ return date.title == item.title;
+ })
+ ) {
+ item.searchType = date.searchType;
+ } else {
+ item.searchType = "LAST_SEVEN";
+ }
}
this.selectedWay = item;