|
@@ -247,16 +247,16 @@ export default {
|
247
|
247
|
user_nick.remark = data.remark
|
248
|
248
|
}).catch(err => {
|
249
|
249
|
Toast.loading({
|
250
|
|
- duration:0,
|
|
250
|
+ duration:2000,
|
251
|
251
|
message: err,
|
252
|
252
|
forbidClick: true,
|
253
|
253
|
});
|
254
|
254
|
})
|
255
|
255
|
}
|
256
|
|
- const campaignNameBlur=(e)=>{
|
|
256
|
+ const campaignNameBlur=(e)=>{//获取光标位置
|
257
|
257
|
pointerIndex.value = e.srcElement.selectionStart
|
258
|
258
|
}
|
259
|
|
- const appendCon = (type)=>{
|
|
259
|
+ const appendCon = (type)=>{//将昵称添加到指定位置
|
260
|
260
|
let con = actionedit_obj.actioneditCon
|
261
|
261
|
if(type==1){
|
262
|
262
|
actionedit_obj.actioneditCon = con.slice(0,pointerIndex.value) + ' ' + user_nick.name + ' ' + con.slice(pointerIndex.value)
|
|
@@ -276,13 +276,11 @@ export default {
|
276
|
276
|
|
277
|
277
|
onBeforeMount(() => {//组件挂载之前
|
278
|
278
|
if(getQueryString('againJump')){
|
279
|
|
- // alert(`${'have_againJump'+window.location.href}`)
|
280
|
279
|
configInfo.corpid = getQueryString('corpid')
|
281
|
280
|
getRadarGrouplist()
|
282
|
281
|
wx_getuserinfo()
|
283
|
282
|
getWxConfig(()=>{get_external_userid()});
|
284
|
283
|
}else{//获取code
|
285
|
|
- // alert(`${'no_againJump'+window.location.href}`)
|
286
|
284
|
overshow.value = true;
|
287
|
285
|
getWxConfig('',(authInfo)=>{url_pin(authInfo) });
|
288
|
286
|
}
|
|
@@ -303,17 +301,14 @@ export default {
|
303
|
301
|
configInfo.external_userid = res.userId ; //返回当前外部联系人userId
|
304
|
302
|
}else {
|
305
|
303
|
Toast.loading({
|
306
|
|
- duration:0,
|
|
304
|
+ duration:2000,
|
307
|
305
|
message: '当前外部联系人userId获取错误',
|
308
|
306
|
forbidClick: true,
|
309
|
307
|
});
|
310
|
308
|
}
|
311
|
309
|
});
|
312
|
310
|
}
|
313
|
|
- function wx_getuserinfo(){
|
314
|
|
- //获取user_id
|
315
|
|
- // alert(`${'corpid_wx_getuserinfo:'+configInfo.corpid}`);
|
316
|
|
- // alert(`${'code:'+getQueryString('code')}`);
|
|
311
|
+ function wx_getuserinfo(){ //获取user_id
|
317
|
312
|
(proxy as any).$axios.get("/api/oauth2/userInfo", {
|
318
|
313
|
corpid:configInfo.corpid,
|
319
|
314
|
code:getQueryString('code'),
|
|
@@ -323,14 +318,14 @@ export default {
|
323
|
318
|
configInfo.user_id = data.user_id;
|
324
|
319
|
}else{
|
325
|
320
|
Toast.loading({
|
326
|
|
- duration:0,
|
|
321
|
+ duration:2000,
|
327
|
322
|
message: res.err,
|
328
|
323
|
forbidClick: true,
|
329
|
324
|
});
|
330
|
325
|
}
|
331
|
326
|
}).catch( err => {
|
332
|
327
|
Toast.loading({
|
333
|
|
- duration:0,
|
|
328
|
+ duration:2000,
|
334
|
329
|
message: err,
|
335
|
330
|
forbidClick: true,
|
336
|
331
|
});
|
|
@@ -338,7 +333,6 @@ export default {
|
338
|
333
|
}
|
339
|
334
|
|
340
|
335
|
const getRadarGrouplist=()=>{
|
341
|
|
- // alert(`${'corpid_getRadarGrouplist:'+configInfo.corpid}`);
|
342
|
336
|
overshow.value = true;
|
343
|
337
|
(proxy as any).$axios.get("/api/h5/chatMenuPage/groupList", {
|
344
|
338
|
corpid: configInfo.corpid,
|
|
@@ -356,7 +350,7 @@ export default {
|
356
|
350
|
|
357
|
351
|
}else{
|
358
|
352
|
Toast.loading({
|
359
|
|
- duration:0,
|
|
353
|
+ duration:2000,
|
360
|
354
|
message: res.err,
|
361
|
355
|
forbidClick: true,
|
362
|
356
|
});
|
|
@@ -364,14 +358,21 @@ export default {
|
364
|
358
|
}).catch(err => {
|
365
|
359
|
overshow.value = false;
|
366
|
360
|
Toast.loading({
|
367
|
|
- duration:0,
|
|
361
|
+ duration:2000,
|
368
|
362
|
message: err,
|
369
|
363
|
forbidClick: true,
|
370
|
364
|
});
|
371
|
365
|
})
|
372
|
366
|
}
|
373
|
367
|
const getRadarlist=(group_id)=>{
|
374
|
|
- // alert(`${'corpid_getRadarlist:'+configInfo.corpid}`);
|
|
368
|
+ if(!group_id){
|
|
369
|
+ Toast.loading({
|
|
370
|
+ duration:2000,
|
|
371
|
+ message: '暂无数据',
|
|
372
|
+ forbidClick: true,
|
|
373
|
+ });
|
|
374
|
+ return
|
|
375
|
+ }
|
375
|
376
|
overshow.value = true;
|
376
|
377
|
(proxy as any).$axios.get("/api/h5/chatMenuPage/list", {
|
377
|
378
|
corpid: configInfo.corpid,
|
|
@@ -390,10 +391,9 @@ export default {
|
390
|
391
|
})
|
391
|
392
|
})
|
392
|
393
|
radarlist.value = data.data
|
393
|
|
- console.log(radarlist.value);
|
394
|
394
|
}else{
|
395
|
395
|
Toast.loading({
|
396
|
|
- duration:0,
|
|
396
|
+ duration:2000,
|
397
|
397
|
message: res.err,
|
398
|
398
|
forbidClick: true,
|
399
|
399
|
});
|
|
@@ -401,7 +401,7 @@ export default {
|
401
|
401
|
}).catch(err => {
|
402
|
402
|
overshow.value = false;
|
403
|
403
|
Toast.loading({
|
404
|
|
- duration:0,
|
|
404
|
+ duration:2000,
|
405
|
405
|
message: err,
|
406
|
406
|
forbidClick: true,
|
407
|
407
|
});
|
|
@@ -425,8 +425,6 @@ export default {
|
425
|
425
|
}
|
426
|
426
|
}
|
427
|
427
|
const getmesBody=(rule_id,msg_id,editCon)=>{
|
428
|
|
- // alert(`${'corpid_getmesBody:'+configInfo.corpid}`);
|
429
|
|
- // alert(`${'user_id_getmesBody:'+configInfo.user_id}`);
|
430
|
428
|
overshow.value = true;
|
431
|
429
|
(proxy as any).$axios.get("/api/h5/chatMenuPage/chatMessage", {
|
432
|
430
|
corpid: configInfo.corpid,
|
|
@@ -444,7 +442,7 @@ export default {
|
444
|
442
|
}else{
|
445
|
443
|
overshow.value = false;
|
446
|
444
|
Toast.loading({
|
447
|
|
- duration:0,
|
|
445
|
+ duration:2000,
|
448
|
446
|
message: '失败了,请联系管理员',
|
449
|
447
|
forbidClick: true,
|
450
|
448
|
});
|
|
@@ -452,7 +450,7 @@ export default {
|
452
|
450
|
}).catch(err => {
|
453
|
451
|
overshow.value = false;
|
454
|
452
|
Toast.loading({
|
455
|
|
- duration:0,
|
|
453
|
+ duration:2000,
|
456
|
454
|
message: err,
|
457
|
455
|
forbidClick: true,
|
458
|
456
|
});
|
|
@@ -481,9 +479,7 @@ export default {
|
481
|
479
|
let enterChat_obj={enterChat: true}
|
482
|
480
|
let synthetic_obj = {...enterChat_obj,...sendMes.value}
|
483
|
481
|
wx.invoke('sendChatMessage', synthetic_obj, function (res) {
|
484
|
|
- if (res.err_msg == 'sendChatMessage:ok') {
|
485
|
|
- //发送成功
|
486
|
|
- // console.log('发送成功');
|
|
482
|
+ if (res.err_msg == 'sendChatMessage:ok') { //发送成功
|
487
|
483
|
}else if(res.err_msg == 'sendChatMessage:fail_unexpect err'){
|
488
|
484
|
Toast.loading({
|
489
|
485
|
duration:2000,
|