bug
This commit is contained in:
@ -662,7 +662,7 @@ export default {
|
|||||||
if (this.formValidate.spec_type === 1 && this.manyFormValidate.length === 0) {
|
if (this.formValidate.spec_type === 1 && this.manyFormValidate.length === 0) {
|
||||||
return this.$message.warning('请点击生成规格!');
|
return this.$message.warning('请点击生成规格!');
|
||||||
}
|
}
|
||||||
edit(this.formValidate).then(async res => {
|
add(this.formValidate).then(async res => {
|
||||||
this.$message({
|
this.$message({
|
||||||
message: '操作成功',
|
message: '操作成功',
|
||||||
type: 'success'
|
type: 'success'
|
||||||
|
|||||||
@ -222,6 +222,7 @@ export default {
|
|||||||
components: { editor, picUpload, mulpicUpload, Treeselect, MaterialList, UeditorWrap, singlePic,cgood },
|
components: { editor, picUpload, mulpicUpload, Treeselect, MaterialList, UeditorWrap, singlePic,cgood },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
isAdd:false,// 是否是添加
|
||||||
spinShow: false,myTimes: [],
|
spinShow: false,myTimes: [],
|
||||||
// 批量设置表格data
|
// 批量设置表格data
|
||||||
oneFormBatch: [
|
oneFormBatch: [
|
||||||
@ -410,6 +411,11 @@ export default {
|
|||||||
initData('api/yxSystemGroupData',{ groupName: 'yshop_seckill_time',status:1 }).then(res => {
|
initData('api/yxSystemGroupData',{ groupName: 'yshop_seckill_time',status:1 }).then(res => {
|
||||||
this.myTimes = res.content
|
this.myTimes = res.content
|
||||||
})
|
})
|
||||||
|
if(this.$route.params.id){
|
||||||
|
this.isAdd = false
|
||||||
|
} else {
|
||||||
|
this.isAdd = true
|
||||||
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
onInput(){
|
onInput(){
|
||||||
@ -654,7 +660,12 @@ export default {
|
|||||||
if(this.formValidate.spec_type === 1 && this.manyFormValidate.length===0){
|
if(this.formValidate.spec_type === 1 && this.manyFormValidate.length===0){
|
||||||
return this.$message.warning('请点击生成规格!');
|
return this.$message.warning('请点击生成规格!');
|
||||||
}
|
}
|
||||||
edit(this.formValidate).then(async res => {
|
|
||||||
|
|
||||||
|
// 判断是否是添加
|
||||||
|
if(this.isAdd){
|
||||||
|
console.log(this.formValidate)
|
||||||
|
add(this.formValidate).then(res=>{
|
||||||
this.$message({
|
this.$message({
|
||||||
message:'操作成功',
|
message:'操作成功',
|
||||||
type: 'success'
|
type: 'success'
|
||||||
@ -665,6 +676,19 @@ export default {
|
|||||||
}).catch(res => {
|
}).catch(res => {
|
||||||
this.$message.error(res.msg);
|
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 {
|
} else {
|
||||||
if(!this.formValidate.store_name || !this.formValidate.cate_id || !this.formValidate.keyword
|
if(!this.formValidate.store_name || !this.formValidate.cate_id || !this.formValidate.keyword
|
||||||
|| !this.formValidate.unit_name || !this.formValidate.store_info
|
|| !this.formValidate.unit_name || !this.formValidate.store_info
|
||||||
|
|||||||
@ -17,7 +17,7 @@
|
|||||||
icon="el-icon-plus"
|
icon="el-icon-plus"
|
||||||
@click="toAddURL"
|
@click="toAddURL"
|
||||||
>
|
>
|
||||||
新增312
|
新增
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -54,7 +54,6 @@
|
|||||||
<udOperation
|
<udOperation
|
||||||
:data="scope.row"
|
:data="scope.row"
|
||||||
:permission="permission"
|
:permission="permission"
|
||||||
:disabled-dle="scope.row.id === 1"
|
|
||||||
msg="确定删除吗,如果存在下级节点则一并删除,此操作不能撤销!"
|
msg="确定删除吗,如果存在下级节点则一并删除,此操作不能撤销!"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@ -13,8 +13,14 @@
|
|||||||
<el-button icon="el-icon-plus" @click="addDomain"/>
|
<el-button icon="el-icon-plus" @click="addDomain"/>
|
||||||
<el-button style="margin-left:0;" icon="el-icon-minus" @click.prevent="removeDomain(domain)"/>
|
<el-button style="margin-left:0;" icon="el-icon-minus" @click.prevent="removeDomain(domain)"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="邮件内容">
|
||||||
|
<ueditor-wrap v-model="form.content" :config="myConfig" @beforeInit="addCustomDialog"
|
||||||
|
style="width: 90%;"></ueditor-wrap>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
<div ref="editor" class="editor"/>
|
<div ref="editor" class="editor"/>
|
||||||
<el-button :loading="loading" style="margin-left:1.6%;" size="medium" type="primary" @click="doSubmit">发送邮件</el-button>
|
<el-button :loading="loading" style="margin-left:1.6%;" size="medium" type="primary" @click="doSubmit">发送邮件
|
||||||
|
</el-button>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -24,11 +30,19 @@ import { send } from '@/api/tools/email'
|
|||||||
import {upload} from '@/utils/upload'
|
import {upload} from '@/utils/upload'
|
||||||
import {validEmail} from '@/utils/validate'
|
import {validEmail} from '@/utils/validate'
|
||||||
import {mapGetters} from 'vuex'
|
import {mapGetters} from 'vuex'
|
||||||
import E from 'wangeditor'
|
import UeditorWrap from 'vue-ueditor-wrap';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Index',
|
name: 'Index',
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
myConfig: {
|
||||||
|
autoHeightEnabled: false, // 编辑器不自动被内容撑高
|
||||||
|
initialFrameHeight: 500, // 初始容器高度
|
||||||
|
initialFrameWidth: '100%', // 初始容器宽度
|
||||||
|
UEDITOR_HOME_URL: '/UEditor/',
|
||||||
|
serverUrl: ''
|
||||||
|
},
|
||||||
loading: false, form: {subject: '', tos: [], content: ''},
|
loading: false, form: {subject: '', tos: [], content: ''},
|
||||||
tos: [{
|
tos: [{
|
||||||
value: ''
|
value: ''
|
||||||
@ -40,6 +54,9 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
components: {
|
||||||
|
UeditorWrap
|
||||||
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters([
|
...mapGetters([
|
||||||
'imagesUploadApi'
|
'imagesUploadApi'
|
||||||
@ -68,6 +85,30 @@ export default {
|
|||||||
editor.create()
|
editor.create()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
addCustomDialog () {
|
||||||
|
window.UE.registerUI('yshop', function (editor, uiName) {
|
||||||
|
let dialog = new window.UE.ui.Dialog({
|
||||||
|
iframeUrl: '/yshop/materia/index',
|
||||||
|
editor: editor,
|
||||||
|
name: uiName,
|
||||||
|
title: '上传图片',
|
||||||
|
cssRules: 'width:1200px;height:500px;padding:20px;'
|
||||||
|
});
|
||||||
|
this.dialog = dialog;
|
||||||
|
|
||||||
|
var btn = new window.UE.ui.Button({
|
||||||
|
name: 'dialog-button',
|
||||||
|
title: '上传图片',
|
||||||
|
cssRules: `background-image: url(../../../assets/images/icons.png);background-position: -726px -77px;`,
|
||||||
|
onclick: function () {
|
||||||
|
dialog.render();
|
||||||
|
dialog.open();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
return btn;
|
||||||
|
}, 37);
|
||||||
|
},
|
||||||
removeDomain(item) {
|
removeDomain(item) {
|
||||||
var index = this.tos.indexOf(item)
|
var index = this.tos.indexOf(item)
|
||||||
if (index !== -1 && this.tos.length !== 1) {
|
if (index !== -1 && this.tos.length !== 1) {
|
||||||
@ -108,7 +149,9 @@ export default {
|
|||||||
sub = true
|
sub = true
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
if (sub) { return false }
|
if (sub) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
this.loading = true
|
this.loading = true
|
||||||
send(this.form).then(res => {
|
send(this.form).then(res => {
|
||||||
this.$notify({
|
this.$notify({
|
||||||
@ -136,6 +179,7 @@ export default {
|
|||||||
margin: 20px;
|
margin: 20px;
|
||||||
width: 730px;
|
width: 730px;
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep .w-e-text-container {
|
::v-deep .w-e-text-container {
|
||||||
height: 360px !important;
|
height: 360px !important;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user