diff --git a/src/App.vue b/src/App.vue index f87ba59c..152a282f 100644 --- a/src/App.vue +++ b/src/App.vue @@ -44,6 +44,12 @@ export default { return this.$u.toast("已在登录页!") } else uni.navigateTo({url: "/pages/login?back=" + encodeURIComponent(location.href?.replace(location.origin, ""))}) }) + btn.addEventListener('touchmove', e => { + let {clientX, clientY, target: {clientWidth, clientHeight}} = e.touches?.[0], + {width, height} = screen + btn.style.right = `${Math.min(Math.max(0, width - clientX - clientWidth), width - clientWidth)}px` + btn.style.top = `${Math.min(Math.max(0, clientY), height - clientHeight)}px` + }) document.body.appendChild(btn) }, getApps() { @@ -188,6 +194,7 @@ uni-button { border-radius: 8px; font-size: 24px; box-shadow: 0 0 0.61538462em rgb(0 0 0 / 40%); + z-index: 202206271112; } @keyframes mapWarn {