liuxiaona 2 years ago
parent
commit
92bc59b417
1 changed files with 8 additions and 5 deletions
  1. 8 5
      project/src/components/channelCode/createChannelCode.vue

+ 8 - 5
project/src/components/channelCode/createChannelCode.vue

@@ -633,13 +633,16 @@ export default {
633 633
       msg_data.push(this.main_msg_data)
634 634
       msg_data.forEach((item) => {
635 635
         if(item.weeks&&item.weeks.length>0){
636
-          let now_weeks=[]
637
-          item.weeks.forEach(i=>{
638
-            now_weeks.push(i)
636
+          if(typeof item.weeks == 'string'){
637
+            item.weeks = item.weeks.split(',')
638
+          }
639
+          let now_weeks=''
640
+          item.weeks.forEach(n=>{
641
+            now_weeks += n +','
639 642
           })
640
-          item.weeks = now_weeks
643
+          item.weeks = now_weeks.slice(0,now_weeks.length-1)
641 644
         }else{
642
-          item.weeks = []
645
+          item.weeks = ''
643 646
         }
644 647
         item.content = item.content.replace('「客户昵称」', '%NICKNAME%')
645 648
         item.attachments = item.attachments == '' || item.attachments.length == 0 ? '' : JSON.stringify(item.attachments)