提交 a8c0c41d 编写于 作者: Huan (李卓桓)'s avatar Huan (李卓桓)

code clean

上级 eb34a561
......@@ -72,16 +72,20 @@ bot.start()
*
*/
function onScan (qrcode: string, status: ScanStatus) {
generate(qrcode)
// Generate a QR Code online via
// http://goqr.me/api/doc/create-qr-code/
const qrcodeImageUrl = [
'https://api.qrserver.com/v1/create-qr-code/?data=',
encodeURIComponent(qrcode),
].join('')
console.info('%s(%s) - %s', ScanStatus[status], status, qrcodeImageUrl)
if (status === ScanStatus.Waiting || status === ScanStatus.Timeout) {
generate(qrcode)
// Generate a QR Code online via
// http://goqr.me/api/doc/create-qr-code/
const qrcodeImageUrl = [
'https://api.qrserver.com/v1/create-qr-code/?data=',
encodeURIComponent(qrcode),
].join('')
console.info('onScan: %s(%s) - %s', ScanStatus[status], status, qrcodeImageUrl)
} else {
console.info('onScan: %s(%s)', ScanStatus[status], status)
}
// console.info(`[${ScanStatus[status]}(${status})] ${qrcodeImageUrl}\nScan QR Code above to log in: `)
}
......
......@@ -80,7 +80,7 @@
},
"dependencies": {
"brolog": "^1.8.1",
"clone-class": "^0.6.11",
"clone-class": "^0.7.3",
"cuid": "^2.1.1",
"hot-import": "^0.2.1",
"in-gfw": "^1.2.0",
......
......@@ -9,8 +9,8 @@ import { Wechaty } from './wechaty'
// use Symbol to prevent conflicting with the child class properties
// This symbol must be exported (for now).
// See: https://github.com/Microsoft/TypeScript/issues/20080
export const SYMBOL_NAME = Symbol('name')
export const SYMBOL_COUNTER = Symbol('counter')
const SYMBOL_NAME = Symbol('name')
const SYMBOL_COUNTER = Symbol('counter')
let COUNTER = 0
......@@ -155,6 +155,7 @@ export abstract class Accessory extends EventEmitter {
* FriendRequest.wechaty
* Message.wechaty
* Room.wechaty
* ... etc
*
* So it only need one `wechaty` for all the instances
*/
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册