From 4d3f82c38a1388a0e7659fe116e5881300ed54c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=91=E7=9A=87?= <236220500@qq.com> Date: Sun, 31 May 2020 16:45:37 +0800 Subject: [PATCH 1/4] 1 --- src/pages/shop/IncreaseWelcomeEdit.vue | 22 +++++++++++++++++++--- src/pages/shop/IncreaseWelcomeList.vue | 9 +++------ 2 files changed, 22 insertions(+), 9 deletions(-) diff --git a/src/pages/shop/IncreaseWelcomeEdit.vue b/src/pages/shop/IncreaseWelcomeEdit.vue index 0527a13..e066f0b 100644 --- a/src/pages/shop/IncreaseWelcomeEdit.vue +++ b/src/pages/shop/IncreaseWelcomeEdit.vue @@ -44,9 +44,15 @@ {{ welcome.stores[0].name }}等{{ welcome.stores.length }}家店铺 - 全部店铺 + 全部店铺 确定 @@ -63,6 +69,7 @@ :on-success="uploadImgSuccess" :format="['jpg', 'jpeg', 'png']" :max-size="2048" + :on-exceeded-size="onExceededSize" :before-upload="handleBeforeUpload" multiple type="drag" @@ -70,7 +77,7 @@ style="width: 100%;" > - 图片 + {{imageUploading ? "上传中..." : "图片"}} @@ -133,6 +140,7 @@ export default { showMini: false, id: 0, showMessageTypes: false, + imageUploading: false, welcome: { content: "", params: [], @@ -194,6 +202,9 @@ export default { this.showStoreCheck = false; this.welcome = store.getters.useData; }, + onExceededSize() { + console.log("失败"); + }, getDetail(instanceId) { let _this = this; ActivityManager.instanceDetail( @@ -283,6 +294,8 @@ export default { const me = this; let data = new FormData(); data.append("file", res); + console.log(data); + this.imageUploading = true; axios({ method: "post", url: "/upload", @@ -291,6 +304,7 @@ export default { "Content-Type": "multipart/form-data" } }).then(function(res) { + me.imageUploading = false; if (res.data.success) { // me.formValidate.logo = res.data.results; me.welcome.params.push({ @@ -312,10 +326,12 @@ export default { submit() { let _this = this; if (this.welcome.params.length <= 0) { - _this.$Message.error("请添加图片/网页/小程序消息"); + _this.$Message.error("图片/网页/小程序消息至少添加一个"); + return false; } if (this.welcome.stores.length <= 0) { _this.$Message.error("请至少选择一个店铺"); + return false; } this.$refs["welcomeForm"].validate(valid => { if (valid) { diff --git a/src/pages/shop/IncreaseWelcomeList.vue b/src/pages/shop/IncreaseWelcomeList.vue index 526c06d..28ece5e 100644 --- a/src/pages/shop/IncreaseWelcomeList.vue +++ b/src/pages/shop/IncreaseWelcomeList.vue @@ -76,15 +76,12 @@ export default { title: "配置范围", key: "shop", render(h, params) { - if (params.row.storeName == null) { - return h("span", "店铺插入中..."); - } return h( "span", - params.row.storeName + - "等" + + (params.row.companyCount || 0) + + "家零售公司, " + (params.row.storeCount || 0) + - "家公司" + "家店铺" ); } }, From 61286c65c82d4ac33fe3d215b837509a14a0c002 Mon Sep 17 00:00:00 2001 From: zhenghuang <236220500@qq.com> Date: Tue, 2 Jun 2020 10:24:12 +0800 Subject: [PATCH 2/4] 1 --- src/pages/activity/selectStoreStep.vue | 90 ++++++++++---------- src/pages/shop/IncreaseWelcomeList.vue | 112 +++++++++++++++++-------- src/pages/shop/WelcomeDetail.vue | 92 ++++++++++++++++++++ 3 files changed, 213 insertions(+), 81 deletions(-) create mode 100644 src/pages/shop/WelcomeDetail.vue diff --git a/src/pages/activity/selectStoreStep.vue b/src/pages/activity/selectStoreStep.vue index 4fa31c3..01c0977 100644 --- a/src/pages/activity/selectStoreStep.vue +++ b/src/pages/activity/selectStoreStep.vue @@ -1,41 +1,40 @@ - - - - + + + + - - + + - 上一步 - 下一步 - 完成 + 上一步 + 下一步 + 完成 @@ -56,7 +55,7 @@ export default { useActivityStepThree, useActivityStepFoure }, - data() { + data () { return { currentStep: -1, modal_loading: false, @@ -73,27 +72,28 @@ export default { } }, watch: { - show() { + show () { this.showUse = this.show; this.currentStep = 0; + this.modal_loading = false; }, - schedule() { + schedule () { store.getters.useData.scheduleId = this.schedule.id; } }, - mounted() {}, + mounted () { }, methods: { - cancel() { + cancel () { this.currentStep = 0; - if (!this.isModify) { - store.commit("RSET_useData"); - } + // if (!this.isModify) { + // store.commit("RSET_useData"); + // } this.$emit("doShow", false); this.modal_loading = false; this.showUse = false; this.currentStep = 0; }, - next() { + next () { let data = store.getters.useData; console.log("data1", data); if (this.currentStep === 0) { @@ -118,10 +118,10 @@ export default { store.commit("SET_useData", data); this.currentStep = this.currentStep + 1; }, - back() { + back () { this.currentStep = this.currentStep - 1; }, - finish() { + finish () { let that = this; this.modal_loading = true; that.$emit("doShow", false); diff --git a/src/pages/shop/IncreaseWelcomeList.vue b/src/pages/shop/IncreaseWelcomeList.vue index 28ece5e..ce1a635 100644 --- a/src/pages/shop/IncreaseWelcomeList.vue +++ b/src/pages/shop/IncreaseWelcomeList.vue @@ -1,61 +1,77 @@ - + - 配置欢迎语 + 配置欢迎语 - - - 修改 - 删除 + + + 修改 + 删除 - + + + + + + From 26bfc4f0cc605a6c0d0511f3b041e3843b04d23b Mon Sep 17 00:00:00 2001 From: zhenghuang <236220500@qq.com> Date: Tue, 2 Jun 2020 13:50:36 +0800 Subject: [PATCH 3/4] 1 --- src/pages/activity/ActivityManager.vue | 45 +++++++++++++++----------- src/pages/shop/IncreaseWelcomeList.vue | 8 ++++- 2 files changed, 33 insertions(+), 20 deletions(-) diff --git a/src/pages/activity/ActivityManager.vue b/src/pages/activity/ActivityManager.vue index 42359ba..6404df5 100644 --- a/src/pages/activity/ActivityManager.vue +++ b/src/pages/activity/ActivityManager.vue @@ -1,12 +1,19 @@ - 加载中... + 加载中... - + - + {{ item.name }} {{ item.description }} @@ -94,7 +101,7 @@ export default { }, getActivityTable () { let that = this; - ActivityManager.getActivityList({}, function (data) { + ActivityManager.getActivityList({ categoryCode: "promotion" }, function (data) { that.activityList = data.data.results; }); }, @@ -132,9 +139,9 @@ export default { diff --git a/src/pages/shop/IncreaseWelcomeList.vue b/src/pages/shop/IncreaseWelcomeList.vue index ce1a635..7141655 100644 --- a/src/pages/shop/IncreaseWelcomeList.vue +++ b/src/pages/shop/IncreaseWelcomeList.vue @@ -170,7 +170,13 @@ export default { content: "您确定要删除该欢迎语?", onOk: () => { http.deleteWelcome({ id: row.scheduleId }).then(res => { - _this.pageNum = 1; + if (_this.data.length <= 1) { + if (_this.pageNum > 1) { + _this.pageNum = _this.pageNum - 1; + } else { + _this.pageNum = 1; + } + } _this.handlePaginate() }); }, From 99fe34dcebc521a904f488d9a0ce18ebdf42fa54 Mon Sep 17 00:00:00 2001 From: zhenghuang <236220500@qq.com> Date: Tue, 2 Jun 2020 14:14:56 +0800 Subject: [PATCH 4/4] 1 --- src/pages/activity/ActivityPlan.vue | 78 ++++++++++++++++------------- src/services/CommonHttp.js | 4 +- 2 files changed, 44 insertions(+), 38 deletions(-) diff --git a/src/pages/activity/ActivityPlan.vue b/src/pages/activity/ActivityPlan.vue index 1865218..cc36071 100644 --- a/src/pages/activity/ActivityPlan.vue +++ b/src/pages/activity/ActivityPlan.vue @@ -64,21 +64,26 @@ @on-row-dblclick="showDetail" :columns="columns1" :data="data"> - - - - - - {stop(row)}">终止 - - - {modify(row)}">修改 - - - + + + + + + {stop(row)}">终止 + + + {modify(row)}">修改 + + + - - - - - {{this.showStoreName}} - - - 下载 - + + + + + {{this.showStoreName}} + + + 下载 + @@ -139,7 +146,7 @@ export default { data () { const _this = this; return { - showStoreName:"", + showStoreName: "", isShow: false, loading: false, isShowDetail: false, @@ -456,6 +463,7 @@ export default { if (params.status == 0) { params.status = undefined; } + params.categoryCode = "promotion" params.date = undefined; http.get("/activity/instance/list", params).then(res => { const data = res.data.results.this || {}; @@ -496,7 +504,7 @@ export default { debugger let fileName = index.name + "-门店码"; http.downloadImg({ - url: index.qrCodeAction + url: index.qrCodeAction }, fileName, function (/*data*/) { }) @@ -517,7 +525,7 @@ export default { } .router-btn { border: none; - color: #3496EB !important; + color: #3496eb !important; margin-left: -15px; } .table-img-qr-code { @@ -526,7 +534,7 @@ export default { width: 30px; height: 30px; } -button:hover { - background:inherit!important; +button:hover { + background: inherit !important; } diff --git a/src/services/CommonHttp.js b/src/services/CommonHttp.js index 2ceec20..c9ae297 100755 --- a/src/services/CommonHttp.js +++ b/src/services/CommonHttp.js @@ -7,9 +7,7 @@ import commonUtils from '../utils/Common' // http://mf.kiisoo.com:58080/ // axios.defaults.baseURL = 'https://wxtk.bsdits.com/kiisoo-ic/'; axios.defaults.baseURL = - process.env.NODE_ENV === 'production' - ? 'http://111.231.218.44:8080/kiisoo-ic' - : '/kiisoo-ic' + process.env.NODE_ENV === 'production' ? '/kiisoo-ic' : '/kiisoo-ic' //响应时间 axios.defaults.timeout = 120000
{{this.showStoreName}}