二维码转跳登录

This commit is contained in:
WindowBird 2025-08-21 15:07:36 +08:00
parent 2a62263d62
commit b3c938c0a5
2 changed files with 11 additions and 3 deletions

View File

@ -59,11 +59,12 @@ export default {
initQrcodeValue() {
const userId = getLocalUserId()
if (userId) {
this.qrcodeValue = userId
console.log('使用用户ID作为二维码内容:', userId)
// ID
this.qrcodeValue = `https://wx.ccttiot.com/cf/i?agentId=${userId}`
console.log('二维码内容:', this.qrcodeValue)
} else {
// ID使
this.qrcodeValue = '123456'
this.qrcodeValue = 'https://wx.ccttiot.com/cf/i?agentId=123456'
console.warn('未找到用户ID使用默认二维码内容')
}
},

View File

@ -91,6 +91,7 @@ export default {
serviceTermsContent: '',
privacyPolicyContent: '',
scrollTop: 0,
agentId: '', // agentId
}
},
computed: {
@ -100,6 +101,8 @@ export default {
},
onLoad() {
this.pageLoading = new AutoLoadingManager()
this.agentId = this.$Route.query.agentId || '' //
console.log('登录页面接收到的agentId:', this.agentId)
},
onUnload() {
forceHideLoading()
@ -237,7 +240,11 @@ export default {
console.log('登录!', res)
const data = {
loginCode: res.code,
agentId: this.agentId, // agentId
}
console.log('登录请求携带的agentId:', this.agentId)
console.log('登录请求数据:', data)
if (this.pageLoading) {
this.pageLoading.show('登录中...')