竖屏
效果

代码
<view class="rect submit_btn flexbox_auto" id="btn" style="top:{
{
top}}px;left:{
{
left}}px;" bindtap="onSubmit" bindtouchmove="onTouchmove" bindtouchstart="onTouchStart">
提交
</view>
let startX = 0
let startY = 0
let x = 0
let y = 0
let cSys = {
}
let btnsRect = []
let defaultH = 100
let defaultW = 100
Component({
lifetimes: {
ready: function () {
const query = wx.createSelectorQuery().in(this)
query.select('#btn').boundingClientRect(res => {
cSys = wx.getSystemInfoSync()
btnsRect = [res.width, res.height]
const top = Math.floor(cSys.windowHeight - btnsRect[1] - defaultH)
const left = Math.floor(cSys.windowWidth - btnsRect[0] - defaultW)
this