tupianshangchuan

master
lion 3 years ago
parent 35b69c8319
commit 7956b1b9f6

@ -169,4 +169,12 @@ export function deepCopy(data) {
return data; return data;
} }
} }
export function replaceAll(str,before,after){
if(str.indexOf(before) != -1){
return str.replace(new RegExp(before, 'g'),after)
}else{
return str
}
}

@ -335,6 +335,8 @@ import {store,show,save} from "@/api/activity"
import { Message } from 'element-ui' import { Message } from 'element-ui'
import { getparameter } from "@/api/system/dictionary"; import { getparameter } from "@/api/system/dictionary";
import xyTinymce from "@/components/XyTinymce/index.vue"; import xyTinymce from "@/components/XyTinymce/index.vue";
import {replaceAll} from "@/utils/index"
export default { export default {
components:{ components:{
xyTinymce xyTinymce
@ -553,7 +555,7 @@ companykeyword:"",
// money:Number(res.money), // money:Number(res.money),
activePlaybill:res.active_playbill, activePlaybill:res.active_playbill,
sort:res.sort, sort:res.sort,
content:res.content, content:res?.content,
} }
}, },
@ -596,13 +598,14 @@ companykeyword:"",
group:this.form.group, group:this.form.group,
start_member_sum:this.form.startMemberSum, start_member_sum:this.form.startMemberSum,
member_sum:this.form.memberSum, member_sum:this.form.memberSum,
content:this.form.content,
great_services:this.form.greatServices, great_services:this.form.greatServices,
// money:this.form.money, // money:this.form.money,
apply_start:this.form.applyDate[0], apply_start:this.form.applyDate[0],
apply_end:this.form.applyDate[1], apply_end:this.form.applyDate[1],
active_playbill:this.form.activePlaybill, active_playbill:this.form.activePlaybill,
sort:this.form.sort sort:this.form.sort,
content: replaceAll(this.form.content,'../storage/files',`${process.env.VUE_APP_BASE_API}storage/files`)
}).then(res => { }).then(res => {
Message({ Message({
type:'success', type:'success',
@ -634,13 +637,14 @@ companykeyword:"",
group:this.form.group, group:this.form.group,
start_member_sum:this.form.startMemberSum, start_member_sum:this.form.startMemberSum,
member_sum:this.form.memberSum, member_sum:this.form.memberSum,
content:this.form.content,
great_services:this.form.greatServices, great_services:this.form.greatServices,
// money:this.form.money, // money:this.form.money,
apply_start:this.form.applyDate[0], apply_start:this.form.applyDate[0],
apply_end:this.form.applyDate[1], apply_end:this.form.applyDate[1],
active_playbill:this.form.activePlaybill, active_playbill:this.form.activePlaybill,
sort:this.form.sort sort:this.form.sort,
content: replaceAll(this.form.content,'../storage/files',`${process.env.VUE_APP_BASE_API}storage/files`)
}).then(res => { }).then(res => {
Message({ Message({
type:'success', type:'success',

@ -222,7 +222,8 @@
} from 'element-ui' } from 'element-ui'
// import tinymce from "@/components/Tinymce" // import tinymce from "@/components/Tinymce"
import xyTinymce from "@/components/XyTinymce/index.vue"; import xyTinymce from "@/components/XyTinymce/index.vue";
import {replaceAll} from "@/utils/index"
export default { export default {
components: { components: {
xyTinymce xyTinymce
@ -432,7 +433,14 @@
} }
}, },
// replaceAll(str,before,after){
// if(str.indexOf(before) != -1){
// return str.replace(new RegExp(before, 'g'),after)
// }else{
// return str
// }
// },
submit() { submit() {
if (this.type === 'add'||this.type === 'copy') { if (this.type === 'add'||this.type === 'copy') {
store({ store({
@ -452,7 +460,7 @@
start_time: this.form.time[0], start_time: this.form.time[0],
sortnumber: this.form.sortnumber, sortnumber: this.form.sortnumber,
end_time: this.form.time[1], end_time: this.form.time[1],
content: this.form.content content: replaceAll(this.form.content,'../storage/files',`${process.env.VUE_APP_BASE_API}storage/files`)
}).then(res => { }).then(res => {
Message({ Message({
type: 'success', type: 'success',
@ -482,7 +490,7 @@
start_time: this.form.time[0], start_time: this.form.time[0],
sortnumber: this.form.sortnumber, sortnumber: this.form.sortnumber,
end_time: this.form.time[1], end_time: this.form.time[1],
content: this.form.content content: replaceAll(this.form.content,'../storage/files',`${process.env.VUE_APP_BASE_API}storage/files`)
}).then(res => { }).then(res => {
Message({ Message({
type: 'success', type: 'success',

@ -95,6 +95,8 @@ import { Message } from 'element-ui'
// import tinymce from "@/components/Tinymce" // import tinymce from "@/components/Tinymce"
import xyTinymce from "@/components/XyTinymce/index.vue"; import xyTinymce from "@/components/XyTinymce/index.vue";
import {replaceAll} from "@/utils/index"
export default { export default {
components:{ components:{
// tinymce // tinymce
@ -172,7 +174,9 @@ export default {
price:this.form.price, price:this.form.price,
phone:this.form.phone, phone:this.form.phone,
wechat:this.form.wechat, wechat:this.form.wechat,
content:this.form.content // content:this.form.content
content: replaceAll(this.form.content,'../storage/files',`${process.env.VUE_APP_BASE_API}storage/files`)
}).then(res => { }).then(res => {
Message({ Message({
type:'success', type:'success',
@ -191,7 +195,9 @@ export default {
price:this.form.price, price:this.form.price,
phone:this.form.phone, phone:this.form.phone,
wechat:this.form.wechat, wechat:this.form.wechat,
content:this.form.content // content:this.form.content
content: replaceAll(this.form.content,'../storage/files',`${process.env.VUE_APP_BASE_API}storage/files`)
}).then(res => { }).then(res => {
Message({ Message({
type:'success', type:'success',

@ -501,6 +501,7 @@ import { getparameter } from "@/api/system/dictionary";
import { index as serviceIndex } from "@/api/marketing/service"; import { index as serviceIndex } from "@/api/marketing/service";
import { Message } from "element-ui"; import { Message } from "element-ui";
import {replaceAll} from "@/utils/index"
export default { export default {
components: { components: {
@ -829,7 +830,7 @@ export default {
sort_number: this.form.sortNumber, sort_number: this.form.sortNumber,
featured_label: this.form.featuredLabel?.toString(), featured_label: this.form.featuredLabel?.toString(),
rel_label: this.form.relLabel?.toString(), rel_label: this.form.relLabel?.toString(),
content: this.form.content, // content: this.form.content,
subheading: this.form.subheading, subheading: this.form.subheading,
recommend: this.form.recommend, recommend: this.form.recommend,
video_file: this.form.videoFile, video_file: this.form.videoFile,
@ -847,6 +848,8 @@ export default {
type: this.form.type, type: this.form.type,
merchant_list: this.form.merchant_list, merchant_list: this.form.merchant_list,
picture_list: this.form.picture_list, picture_list: this.form.picture_list,
content: replaceAll(this.form.content,'../storage/files',`${process.env.VUE_APP_BASE_API}storage/files`)
}).then((res) => { }).then((res) => {
Message({ Message({
type: "success", type: "success",
@ -867,7 +870,7 @@ export default {
sort_number: this.form.sortNumber, sort_number: this.form.sortNumber,
featured_label: this.form.featuredLabel?.toString(), featured_label: this.form.featuredLabel?.toString(),
rel_label: this.form.relLabel?.toString(), rel_label: this.form.relLabel?.toString(),
content: this.form.content, // content: this.form.content,
subheading: this.form.subheading, subheading: this.form.subheading,
recommend: this.form.recommend, recommend: this.form.recommend,
video_file: this.form.videoFile, video_file: this.form.videoFile,
@ -885,6 +888,8 @@ export default {
type: this.form.type, type: this.form.type,
merchant_list: this.form.merchant_list, merchant_list: this.form.merchant_list,
picture_list: this.form.picture_list, picture_list: this.form.picture_list,
content: replaceAll(this.form.content,'../storage/files',`${process.env.VUE_APP_BASE_API}storage/files`)
}).then((res) => { }).then((res) => {
Message({ Message({
type: "success", type: "success",

@ -325,6 +325,7 @@ import { getparameter } from "@/api/system/dictionary";
import { Message } from "element-ui"; import { Message } from "element-ui";
import xyTinymce from "@/components/XyTinymce/index.vue"; import xyTinymce from "@/components/XyTinymce/index.vue";
import {replaceAll} from "@/utils/index"
export default { export default {
components: { components: {
xyTinymce, xyTinymce,
@ -618,7 +619,7 @@ export default {
state: this.form.state ? 1 : 0, state: this.form.state ? 1 : 0,
sort_number: this.form.sortNumber, sort_number: this.form.sortNumber,
featured_label: this.form.featuredLabel?.toString(), featured_label: this.form.featuredLabel?.toString(),
content: this.form.content, // content: this.form.content,
recommend: this.form.recommend ? 1 : 0, recommend: this.form.recommend ? 1 : 0,
room_orientation: this.form.roomOrientation, room_orientation: this.form.roomOrientation,
cover_picture: this.form.coverPicture, cover_picture: this.form.coverPicture,
@ -629,6 +630,8 @@ export default {
video: this.form.video, video: this.form.video,
set_list: this.form.set_list, set_list: this.form.set_list,
picture_list: this.form.picture_list, picture_list: this.form.picture_list,
content: replaceAll(this.form.content,'../storage/files',`${process.env.VUE_APP_BASE_API}storage/files`)
}; };
if (this.type === "add") { if (this.type === "add") {
store(_form).then((res) => { store(_form).then((res) => {

@ -234,7 +234,8 @@
import { import {
Message Message
} from 'element-ui' } from 'element-ui'
import xyTinymce from "@/components/XyTinymce/index.vue"; import xyTinymce from "@/components/XyTinymce/index.vue";
import {replaceAll} from "@/utils/index"
// import tinymce from '@/components/Tinymce' // import tinymce from '@/components/Tinymce'
export default { export default {
components: { components: {
@ -413,7 +414,7 @@ import xyTinymce from "@/components/XyTinymce/index.vue";
state: this.form.state ? 1 : 0, state: this.form.state ? 1 : 0,
sort_number: this.form.sortNumber, sort_number: this.form.sortNumber,
featured_label: this.form.featuredLabel?.toString(), featured_label: this.form.featuredLabel?.toString(),
content: this.form.content, // content: this.form.content,
recommend: this.form.recommend ? 1 : 0, recommend: this.form.recommend ? 1 : 0,
room_orientation: this.form.roomOrientation, room_orientation: this.form.roomOrientation,
cover_picture: this.form.coverPicture, cover_picture: this.form.coverPicture,
@ -421,7 +422,9 @@ import xyTinymce from "@/components/XyTinymce/index.vue";
price: this.form.price, price: this.form.price,
room_area: this.form.roomArea, room_area: this.form.roomArea,
time_limit: this.form.timeLimit?.toString(), time_limit: this.form.timeLimit?.toString(),
video: this.form.video video: this.form.video,
content: replaceAll(this.form.content,'../storage/files',`${process.env.VUE_APP_BASE_API}storage/files`)
} }
if (this.type === 'add') { if (this.type === 'add') {
store(_form).then(res => { store(_form).then(res => {

@ -320,7 +320,7 @@
// import tinymce from '@/components/Tinymce' // import tinymce from '@/components/Tinymce'
import xyTinymce from "@/components/XyTinymce/index.vue"; import xyTinymce from "@/components/XyTinymce/index.vue";
import {replaceAll} from "@/utils/index"
export default { export default {
components: { components: {
// tinymce // tinymce
@ -521,7 +521,7 @@
sort_number: this.form.sortNumber, sort_number: this.form.sortNumber,
featured_label: this.form.featuredLabel?.toString(), featured_label: this.form.featuredLabel?.toString(),
rel_label: this.form.relLabel?.toString(), rel_label: this.form.relLabel?.toString(),
content: this.form.content, // content: this.form.content,
subheading: this.form.subheading, subheading: this.form.subheading,
recommend: this.form.recommend, recommend: this.form.recommend,
video_file: this.form.videoFile, video_file: this.form.videoFile,
@ -535,8 +535,11 @@
linkman_phone: this.form.linkmanPhone, linkman_phone: this.form.linkmanPhone,
work_time: this.form.workTime, work_time: this.form.workTime,
area: this.form.area, area: this.form.area,
online_customer_services_id: this.form.online_customer_services_id online_customer_services_id: this.form.online_customer_services_id,
}).then(res => { content: replaceAll(this.form.content,'../storage/files',`${process.env.VUE_APP_BASE_API}storage/files`)
}).then(res => {
Message({ Message({
type: 'success', type: 'success',
message: '新增月子会所商户成功' message: '新增月子会所商户成功'
@ -556,7 +559,7 @@
sort_number: this.form.sortNumber, sort_number: this.form.sortNumber,
featured_label: this.form.featuredLabel?.toString(), featured_label: this.form.featuredLabel?.toString(),
rel_label: this.form.relLabel?.toString(), rel_label: this.form.relLabel?.toString(),
content: this.form.content, // content: this.form.content,
subheading: this.form.subheading, subheading: this.form.subheading,
recommend: this.form.recommend, recommend: this.form.recommend,
video_file: this.form.videoFile, video_file: this.form.videoFile,
@ -570,7 +573,9 @@
linkman_phone: this.form.linkmanPhone, linkman_phone: this.form.linkmanPhone,
work_time: this.form.workTime, work_time: this.form.workTime,
area: this.form.area, area: this.form.area,
online_customer_services_id: this.form.online_customer_services_id online_customer_services_id: this.form.online_customer_services_id,
content: replaceAll(this.form.content,'../storage/files',`${process.env.VUE_APP_BASE_API}storage/files`)
}).then(res => { }).then(res => {
Message({ Message({
type: 'success', type: 'success',

@ -121,6 +121,7 @@ import {getparameter} from '@/api/system/dictionary'
import xyTinymce from "@/components/XyTinymce/index.vue"; import xyTinymce from "@/components/XyTinymce/index.vue";
import { Message } from 'element-ui' import { Message } from 'element-ui'
import {replaceAll} from "@/utils/index"
export default { export default {
components:{ components:{
xyTinymce xyTinymce
@ -211,10 +212,12 @@ export default {
state:this.form.state ? 1 : 0, state:this.form.state ? 1 : 0,
sort_number:this.form.sortNumber, sort_number:this.form.sortNumber,
title:this.form.title, title:this.form.title,
content:this.form.content, // content:this.form.content,
subheading:this.form.subheading, subheading:this.form.subheading,
label:this.form.label.toString(), label:this.form.label.toString(),
cover_picture:this.form.coverPicture cover_picture:this.form.coverPicture,
content: replaceAll(this.form.content,'../storage/files',`${process.env.VUE_APP_BASE_API}storage/files`)
}).then(res => { }).then(res => {
Message({ Message({
type:'success', type:'success',
@ -232,10 +235,12 @@ export default {
state:this.form.state ? 1 : 0, state:this.form.state ? 1 : 0,
sort_number:this.form.sortNumber, sort_number:this.form.sortNumber,
title:this.form.title, title:this.form.title,
content:this.form.content, // content:this.form.content,
subheading:this.form.subheading, subheading:this.form.subheading,
label:this.form.label.toString(), label:this.form.label.toString(),
cover_picture:this.form.coverPicture cover_picture:this.form.coverPicture,
content: replaceAll(this.form.content,'../storage/files',`${process.env.VUE_APP_BASE_API}storage/files`)
}).then(res => { }).then(res => {
Message({ Message({
type:'success', type:'success',

Loading…
Cancel
Save