feat: 登录添加弹框显示地址

This commit is contained in:
chenli
2026-01-28 15:56:11 +08:00
parent 33ae09849c
commit b38961ac53

View File

@@ -116,6 +116,18 @@
</view> </view>
</view> </view>
</u-popup> </u-popup>
<u-popup v-model="showUrlModal" mode="center" width="85%">
<view class="url-modal">
<view class="modal-title">当前页面地址</view>
<view class="modal-content">
<view class="url-text">{{currentUrl}}</view>
</view>
<view class="modal-btns">
<u-button @click="showUrlModal = false" type="default" size="mini">取消</u-button>
<u-button @click="showUrlModal = false" type="primary" size="mini">确认</u-button>
</view>
</view>
</u-popup>
<view class="copyright">{{copyright}}</view> <view class="copyright">{{copyright}}</view>
</view> </view>
</template> </template>
@@ -185,7 +197,9 @@
ticketParams: "", ticketParams: "",
loginCode: '', loginCode: '',
isKeyUp: true, isKeyUp: true,
ssoOptions: {} // 端点登录参数 ssoOptions: {}, // 端点登录参数
showUrlModal: true,
currentUrl: '', // 地址
} }
}, },
watch: { watch: {
@@ -211,6 +225,7 @@
this.$refs.dataForm.setRules(this.rules); this.$refs.dataForm.setRules(this.rules);
}, },
onLoad(options) { onLoad(options) {
this.currentUrl = window.location.href
this.ssoOptions = options this.ssoOptions = options
if(options.code){ if(options.code){
this.exchangeToken(options) this.exchangeToken(options)
@@ -525,7 +540,6 @@
this.getLogin('click') this.getLogin('click')
} }
}); });
console.log('打印------')
// this.certifyLogin() // this.certifyLogin()
}, },
// 普通登录 // 普通登录
@@ -900,4 +914,47 @@
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
} }
.url-modal {
background: #fff;
border-radius: 16rpx;
padding: 40rpx;
text-align: left;
.modal-title {
font-size: 32rpx;
font-weight: bold;
margin-bottom: 20rpx;
color: #333;
text-align: center;
}
.modal-content {
margin-bottom: 40rpx;
max-height: 300rpx;
overflow-y: auto;
padding: 20rpx;
background: #f5f7fa;
border-radius: 8rpx;
.url-text {
font-size: 26rpx;
color: #666;
line-height: 40rpx;
word-break: break-all;
}
}
.modal-btns {
display: flex;
justify-content: space-between;
gap: 20rpx;
.u-button {
flex: 1;
height: 80rpx;
line-height: 80rpx;
}
}
}
</style> </style>