微信小程序页面迁移校验之前 P5任务处理之前

This commit is contained in:
Neo
2026-03-09 01:19:21 +08:00
parent 263bf96035
commit 6e20987d2f
1112 changed files with 153824 additions and 219694 deletions

View File

@@ -0,0 +1,28 @@
/**
* 开发调试浮动按钮组件
*
* 仅在 develop 环境下显示,点击跳转到 dev-tools 页面。
* 使用 movable-view 实现可拖拽。
*/
Component({
data: {
visible: false,
x: 580, // 初始位置右下角附近rpx 换算后的 px 近似值)
y: 1100,
},
lifetimes: {
attached() {
// 仅 develop 环境显示
const accountInfo = wx.getAccountInfoSync()
const env = accountInfo.miniProgram.envVersion
this.setData({ visible: env === "develop" })
},
},
methods: {
goDevTools() {
wx.navigateTo({ url: "/pages/dev-tools/dev-tools" })
},
},
})