wechaty-web-panel 1.6.126 → 1.6.127

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -24,11 +24,9 @@ function getQrcodeKey(qrcode) {
24
24
  let url = new URL(qrcode);
25
25
  let searchParams = new URLSearchParams(url.search.slice(1));
26
26
  if (searchParams.get('key')) {
27
- console.log('获取到二维码信息中的key');
28
27
  globalConfig.setQrKey(searchParams.get('key'));
29
28
  }
30
29
  else if (extractLastPathWithCheck(qrcode)) {
31
- console.log('获取到二维码信息中的key');
32
30
  globalConfig.setQrKey(extractLastPathWithCheck(qrcode));
33
31
  }
34
32
  else {
@@ -44,8 +42,13 @@ async function onScan(qrcode, status) {
44
42
  const aibotConfig = await getAibotConfig();
45
43
  await getVerifyCode();
46
44
  getQrcodeKey(qrcode);
47
- Qrterminal.generate(qrcode);
48
- console.log('扫描状态', status);
45
+ if (this.puppet.constructor.name === 'PuppetMatrix') {
46
+ console.log('请使用快速登录器扫码登录成功后,再启动本服务,现在请关闭当前容器,快速登录器请保持2-3天再关闭,防止出现网络异常');
47
+ }
48
+ else {
49
+ Qrterminal.generate(qrcode);
50
+ console.log('扫描状态', status);
51
+ }
49
52
  if (scanTime >= aibotConfig.scanTimes) {
50
53
  console.log('长时间推送登录状态,平台二维码不再更新,请重启服务,或直接在终端扫码登录');
51
54
  }
@@ -53,8 +56,6 @@ async function onScan(qrcode, status) {
53
56
  scanTime++;
54
57
  throttle(setQrCode(qrcode, status), 15000);
55
58
  }
56
- const qrImgUrl = ['https://api.qrserver.com/v1/create-qr-code/?data=', encodeURIComponent(qrcode)].join('');
57
- console.log(qrImgUrl);
58
59
  }
59
60
  catch (e) {
60
61
  console.log('二维码推送报错', e);
@@ -3,7 +3,7 @@
3
3
  */
4
4
  export const packageJson = {
5
5
  "name": "wechaty-web-panel",
6
- "version": "1.6.126",
6
+ "version": "1.6.127",
7
7
  "exports": {
8
8
  ".": {
9
9
  "import": "./dist/index.js"
@@ -35,7 +35,7 @@ export const packageJson = {
35
35
  "prettier": "^2.0.5",
36
36
  "tsup": "^8.5.1",
37
37
  "typescript": "^5.4",
38
- "wechaty-puppet-matrix": "^0.0.34"
38
+ "wechaty-puppet-matrix": "^0.0.48"
39
39
  },
40
40
  "readme": "README.md",
41
41
  "engines": {
@@ -500,10 +500,7 @@ async function setQrCode(url, status) {
500
500
  params: { qrUrl: url, qrStatus: status },
501
501
  };
502
502
  let content = await aiBotReq(option);
503
- if (content) {
504
- console.log('推送二维码成功');
505
- }
506
- else {
503
+ if (!content) {
507
504
  console.log('推送登录二维码失败');
508
505
  }
509
506
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wechaty-web-panel",
3
- "version": "1.6.126",
3
+ "version": "1.6.127",
4
4
  "exports": {
5
5
  ".": {
6
6
  "import": "./dist/index.js"
@@ -32,7 +32,7 @@
32
32
  "prettier": "^2.0.5",
33
33
  "tsup": "^8.5.1",
34
34
  "typescript": "^5.4",
35
- "wechaty-puppet-matrix": "^0.0.34"
35
+ "wechaty-puppet-matrix": "^0.0.48"
36
36
  },
37
37
  "readme": "README.md",
38
38
  "engines": {
@@ -26,10 +26,8 @@ function getQrcodeKey(qrcode) {
26
26
  let url = new URL(qrcode);
27
27
  let searchParams = new URLSearchParams(url.search.slice(1));
28
28
  if(searchParams.get('key')) {
29
- console.log('获取到二维码信息中的key')
30
29
  globalConfig.setQrKey(searchParams.get('key'))
31
30
  } else if(extractLastPathWithCheck(qrcode)) {
32
- console.log('获取到二维码信息中的key');
33
31
  globalConfig.setQrKey(extractLastPathWithCheck(qrcode));
34
32
  } else {
35
33
  globalConfig.setQrKey('')
@@ -41,20 +39,22 @@ function getQrcodeKey(qrcode) {
41
39
  async function onScan(qrcode, status) {
42
40
  try {
43
41
  await updatePuppetConfig({ puppetType: this.puppet.constructor.name })
42
+
44
43
  const aibotConfig = await getAibotConfig();
45
44
  await getVerifyCode();
46
45
  getQrcodeKey(qrcode)
47
- Qrterminal.generate(qrcode)
48
- console.log('扫描状态', status)
46
+ if (this.puppet.constructor.name === 'PuppetMatrix') {
47
+ console.log('请使用快速登录器扫码登录成功后,再启动本服务,现在请关闭当前容器,快速登录器请保持2-3天再关闭,防止出现网络异常')
48
+ } else {
49
+ Qrterminal.generate(qrcode)
50
+ console.log('扫描状态', status)
51
+ }
49
52
  if(scanTime >= aibotConfig.scanTimes) {
50
53
  console.log('长时间推送登录状态,平台二维码不再更新,请重启服务,或直接在终端扫码登录');
51
54
  } else {
52
55
  scanTime++
53
56
  throttle(setQrCode(qrcode, status), 15000)
54
57
  }
55
-
56
- const qrImgUrl = ['https://api.qrserver.com/v1/create-qr-code/?data=', encodeURIComponent(qrcode)].join('')
57
- console.log(qrImgUrl)
58
58
  } catch (e) {
59
59
  console.log('二维码推送报错', e)
60
60
  }
@@ -3,7 +3,7 @@
3
3
  */
4
4
  export const packageJson = {
5
5
  "name": "wechaty-web-panel",
6
- "version": "1.6.126",
6
+ "version": "1.6.127",
7
7
  "exports": {
8
8
  ".": {
9
9
  "import": "./dist/index.js"
@@ -35,7 +35,7 @@ export const packageJson = {
35
35
  "prettier": "^2.0.5",
36
36
  "tsup": "^8.5.1",
37
37
  "typescript": "^5.4",
38
- "wechaty-puppet-matrix": "^0.0.34"
38
+ "wechaty-puppet-matrix": "^0.0.48"
39
39
  },
40
40
  "readme": "README.md",
41
41
  "engines": {
@@ -497,10 +497,8 @@ async function setQrCode(url, status) {
497
497
  params: { qrUrl: url, qrStatus: status },
498
498
  }
499
499
  let content = await aiBotReq(option)
500
- if (content) {
501
- console.log('推送二维码成功')
502
- } else {
503
- console.log('推送登录二维码失败')
500
+ if (!content) {
501
+ console.log('推送登录二维码失败')
504
502
  }
505
503
  } catch (error) {
506
504
  console.log('推送登录二维码失败', error)