From 6014d686b52d85e55615cb54e4ca8c5d3dc663f5 Mon Sep 17 00:00:00 2001 From: kahu474 Date: Tue, 13 Jul 2021 18:45:05 +0800 Subject: [PATCH] bug --- src/views/activity/combination/form.vue | 2 +- src/views/activity/seckill/form.vue | 46 +++++++++--- src/views/activity/seckill/index.vue | 2 +- src/views/shop/cate/index.vue | 1 - src/views/tools/email/send.vue | 98 ++++++++++++++++++------- 5 files changed, 108 insertions(+), 41 deletions(-) diff --git a/src/views/activity/combination/form.vue b/src/views/activity/combination/form.vue index 94933b6..6204b09 100644 --- a/src/views/activity/combination/form.vue +++ b/src/views/activity/combination/form.vue @@ -662,7 +662,7 @@ export default { if (this.formValidate.spec_type === 1 && this.manyFormValidate.length === 0) { return this.$message.warning('请点击生成规格!'); } - edit(this.formValidate).then(async res => { + add(this.formValidate).then(async res => { this.$message({ message: '操作成功', type: 'success' diff --git a/src/views/activity/seckill/form.vue b/src/views/activity/seckill/form.vue index 9f4df88..759a845 100644 --- a/src/views/activity/seckill/form.vue +++ b/src/views/activity/seckill/form.vue @@ -222,6 +222,7 @@ export default { components: { editor, picUpload, mulpicUpload, Treeselect, MaterialList, UeditorWrap, singlePic,cgood }, data() { return { + isAdd:false,// 是否是添加 spinShow: false,myTimes: [], // 批量设置表格data oneFormBatch: [ @@ -410,6 +411,11 @@ export default { initData('api/yxSystemGroupData',{ groupName: 'yshop_seckill_time',status:1 }).then(res => { this.myTimes = res.content }) + if(this.$route.params.id){ + this.isAdd = false + } else { + this.isAdd = true + } }, methods: { onInput(){ @@ -654,17 +660,35 @@ export default { if(this.formValidate.spec_type === 1 && this.manyFormValidate.length===0){ return this.$message.warning('请点击生成规格!'); } - edit(this.formValidate).then(async res => { - this.$message({ - message:'操作成功', - type: 'success' - }); - setTimeout(() => { - this.$router.push({ path: '/activity/seckill' }); - }, 500); - }).catch(res => { - this.$message.error(res.msg); - }) + + + // 判断是否是添加 + if(this.isAdd){ + console.log(this.formValidate) + add(this.formValidate).then(res=>{ + this.$message({ + message:'操作成功', + type: 'success' + }); + setTimeout(() => { + this.$router.push({ path: '/activity/seckill' }); + }, 500); + }).catch(res => { + this.$message.error(res.msg); + }) + }else{ + add(this.formValidate).then(async res => { + this.$message({ + message:'操作成功', + type: 'success' + }); + setTimeout(() => { + this.$router.push({ path: '/activity/seckill' }); + }, 500); + }).catch(res => { + this.$message.error(res.msg); + }) + } } else { if(!this.formValidate.store_name || !this.formValidate.cate_id || !this.formValidate.keyword || !this.formValidate.unit_name || !this.formValidate.store_info diff --git a/src/views/activity/seckill/index.vue b/src/views/activity/seckill/index.vue index e9b817d..867fca0 100644 --- a/src/views/activity/seckill/index.vue +++ b/src/views/activity/seckill/index.vue @@ -17,7 +17,7 @@ icon="el-icon-plus" @click="toAddURL" > - 新增312 + 新增 diff --git a/src/views/shop/cate/index.vue b/src/views/shop/cate/index.vue index bc2028f..b1a0322 100644 --- a/src/views/shop/cate/index.vue +++ b/src/views/shop/cate/index.vue @@ -54,7 +54,6 @@ diff --git a/src/views/tools/email/send.vue b/src/views/tools/email/send.vue index 4690100..6af5a89 100644 --- a/src/views/tools/email/send.vue +++ b/src/views/tools/email/send.vue @@ -2,44 +2,61 @@
- + - - - + + + -
- 发送邮件 + + + + +
+ 发送邮件 +