diff --git a/pages/p2p/authorizeWechat.vue b/pages/p2p/authorizeWechat.vue
index 4068106..b9de33e 100644
--- a/pages/p2p/authorizeWechat.vue
+++ b/pages/p2p/authorizeWechat.vue
@@ -42,6 +42,12 @@
微信会收到视频通话请求
+
+ 获取ticket
+
@@ -100,6 +106,41 @@
}
})
+ const getTicket = async () => {
+ uni.showLoading({
+ title: '加载中...'
+ })
+ const result = await getInfo()
+ uni.hideLoading()
+ if (result.code === 0) {
+ const ticket = result.data.WXIoTDeviceInfo.SNTicket
+ uni.showModal({
+ title: '票据',
+ content: ticket,
+ showCancel: false,
+ confirmText: '复制',
+ success: ({ confirm }) => {
+ if (confirm) {
+ uni.setClipboardData({
+ data: ticket,
+ success: () => {
+ uni.showToast({
+ title: '复制成功',
+ icon: 'none'
+ })
+ }
+ })
+ }
+ }
+ })
+ } else {
+ uni.showToast({
+ title: result.message,
+ icon: 'none'
+ })
+ }
+ }
+
const getDeviceVoIPList = async () => {
return new Promise(resolve => {
wx.getDeviceVoIPList({