Skip to content

Commit

Permalink
fix: 修改二维码内容
Browse files Browse the repository at this point in the history
  • Loading branch information
xixiIBN5100 committed Oct 12, 2024
1 parent 3a0cab7 commit 9ce0aed
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/components/QrCode.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import QrcodeVue from 'qrcode.vue'
import { NCard } from 'naive-ui'
import { ref } from 'vue'
import { onMounted } from '@vue/runtime-core'
import { getUserData } from '../utility'
const props = defineProps(['method'])
Expand All @@ -19,11 +20,11 @@ onMounted(() => {
const flushCode = () => {
if (method === 'user') {
const jwt = localStorage.getItem('jwt')
const userData = ref(getUserData())
const time = new Date().getTime()
qrcode.value = JSON.stringify({
status: 3,
name: userData.value.name,
type: 3,
jwt: "Bearer " + jwt,
time: time
})
Expand All @@ -33,7 +34,7 @@ const flushCode = () => {
const time = new Date().getTime()
qrcode.value = JSON.stringify({
status: 1,
type: 1,
team_id: teamData.value['id'],
time: time
})
Expand Down

0 comments on commit 9ce0aed

Please sign in to comment.