|
@@ -193,7 +193,13 @@ export default {
|
193
|
193
|
this.name = res.rst.name;
|
194
|
194
|
let msg_list = res.rst.msg_list;
|
195
|
195
|
msg_list.forEach((item) => {
|
196
|
|
- item.content = item.content ? item.content.replaceAll('%NICKNAME%', '「客户昵称」') : '';
|
|
196
|
+ // S 坑:部分浏览器不支持 replaceAll 方法
|
|
197
|
+ if (String.prototype.replaceAll) {
|
|
198
|
+ item.content = item.content ? item.content.replaceAll('%NICKNAME%', '「客户昵称」') : '';
|
|
199
|
+ } else {
|
|
200
|
+ item.content = item.content ? item.content.replace(/\%NICKNAME\%/g, '「客户昵称」') : '';
|
|
201
|
+ }
|
|
202
|
+ // E 坑:部分浏览器不支持 replaceAll 方法
|
197
|
203
|
item.attachments = item.attachments && item.attachments != '' ? JSON.parse(item.attachments) : [];
|
198
|
204
|
if(item.weeks){
|
199
|
205
|
item.weeks = item.weeks.split(',')
|
|
@@ -353,7 +359,15 @@ export default {
|
353
|
359
|
item.weeks = ''
|
354
|
360
|
}
|
355
|
361
|
// item.weeks = item.weeks.join(',');
|
356
|
|
- item.content = item.content.replaceAll('「客户昵称」', '%NICKNAME%')
|
|
362
|
+
|
|
363
|
+ // S 坑:部分浏览器不支持 replaceAll 方法
|
|
364
|
+ if (String.prototype.replaceAll) {
|
|
365
|
+ item.content = item.content.replaceAll('「客户昵称」', '%NICKNAME%')
|
|
366
|
+ } else {
|
|
367
|
+ item.content = item.content.replace(/「客户昵称」/g, '%NICKNAME%')
|
|
368
|
+ }
|
|
369
|
+ // E 坑:部分浏览器不支持 replaceAll 方法
|
|
370
|
+
|
357
|
371
|
item.attachments = item.attachments == '' || item.attachments&&item.attachments.length == 0 ? '' : JSON.stringify(item.attachments)
|
358
|
372
|
})
|
359
|
373
|
this.$loading(this.$loadingConfig)
|