获取二维码时, 改为主动获取

This commit is contained in:
wangdongbo 2026-06-02 14:29:17 +08:00
parent 3e3b2a1fe8
commit f8838cc1f9
3 changed files with 5 additions and 5 deletions

View File

@ -94,7 +94,7 @@ function toFriend(userid) {
} }
async function getQrcode(userid) { async function getQrcode(userid) {
const res = await api('addContactWay', { corpUserId: userid, corpId: corpId.value, unionid: account.value?.openid }); const res = await api('addContactWay', { corpUserId: userid, corpId: corpId.value, unionid: account.value?.openid, fetchType: 'realtime' });
if (res && res.data) { if (res && res.data) {
qrcode.value = res.data; qrcode.value = res.data;
} }

View File

@ -56,7 +56,7 @@ async function getMember() {
} }
async function getQrcode() { async function getQrcode() {
const res = await api('addContactWay', { corpUserId: userid.value, corpId: corpId.value, unionid: account.value?.openid }); const res = await api('addContactWay', { corpUserId: userid.value, corpId: corpId.value, unionid: account.value?.openid, fetchType: 'realtime' });
if (res && res.data) { if (res && res.data) {
qrcode.value = res.data; qrcode.value = res.data;
} }
@ -92,4 +92,4 @@ watch(member, n => {
width: 560rpx; width: 560rpx;
height: 560rpx; height: 560rpx;
} }
</style> </style>

View File

@ -137,7 +137,7 @@ async function getMember() {
} }
async function getQrcode() { async function getQrcode() {
const res = await api('addContactWay', { corpUserId: userid.value, corpId: corpId.value, unionid: account.value?.openid }); const res = await api('addContactWay', { corpUserId: userid.value, corpId: corpId.value, unionid: account.value?.openid, fetchType: 'realtime' });
if (res && res.data) { if (res && res.data) {
qrcode.value = res.data; qrcode.value = res.data;
} }
@ -192,4 +192,4 @@ page {
width: 560rpx; width: 560rpx;
height: 560rpx; height: 560rpx;
} }
</style> </style>