* @description 生成二维码
()
| 469 | * @description 生成二维码 |
| 470 | */ |
| 471 | async function generateQRCode() { |
| 472 | try { |
| 473 | // 推送 |
| 474 | const res = await fetch(API_CONFIG.generateQRCode, { |
| 475 | method: 'GET', |
| 476 | mode: 'cors', |
| 477 | }); |
| 478 | // 请求成功 |
| 479 | if (res.ok) { |
| 480 | const data = await res.json(); |
| 481 | if (data.success) { |
| 482 | return data.result; |
| 483 | } |
| 484 | } |
| 485 | } |
| 486 | catch (error) { } |
| 487 | } |
| 488 | /** |
| 489 | * @description 用二维码登录 |
| 490 | */ |