mirror of
https://github.com/TangSengDaoDao/TangSengDaoDaoWeb
synced 2025-06-04 08:08:44 +00:00
24 lines
622 B
TypeScript
24 lines
622 B
TypeScript
import { Channel } from "wukongimjssdk";
|
|
import WKApp from "../../App";
|
|
import { ChannelQrcodeResp } from "../../Service/DataSource/DataSource";
|
|
import { ProviderListener } from "../../Service/Provider";
|
|
|
|
|
|
export class ChannelQRCodeVM extends ProviderListener {
|
|
channel!:Channel
|
|
qrcodeResp?: ChannelQrcodeResp
|
|
|
|
constructor(channel:Channel) {
|
|
super()
|
|
this.channel = channel
|
|
}
|
|
|
|
didMount(): void {
|
|
this.requestQRCode()
|
|
}
|
|
|
|
async requestQRCode() {
|
|
this.qrcodeResp = await WKApp.dataSource.channelDataSource.qrcode(this.channel)
|
|
this.notifyListener()
|
|
}
|
|
} |