feat:隐藏debug页入口

This commit is contained in:
2025-07-03 08:54:30 +08:00
parent 8006695f65
commit fdf8a31f32
3 changed files with 8 additions and 2 deletions
+1 -1
View File
@@ -5,7 +5,7 @@ App<IAppOption>({
}, },
onLaunch() { onLaunch() {
const accountInfo = wx.getAccountInfoSync(); const accountInfo = wx.getAccountInfoSync();
const env = accountInfo.miniProgram.envVersion; const env = accountInfo.miniProgram.envVersion || 'release';
this.globalData.env = env; this.globalData.env = env;
if (env !== 'release') { if (env !== 'release') {
const printHeader = wx.getStorageSync('printHeader') || 'wechat'; const printHeader = wx.getStorageSync('printHeader') || 'wechat';
+6 -1
View File
@@ -16,7 +16,7 @@ Page({
currentColor: '', currentColor: '',
showIntroductionPopup: false, showIntroductionPopup: false,
showSelectWordPopup: false, // 选择文字弹窗 showSelectWordPopup: false, // 选择文字弹窗
env: getApp().globalData.env || 'release', env: 'release',
}, },
onLoad() { onLoad() {
@@ -34,6 +34,11 @@ Page({
{ color: '#8A2BE2', word: '您' }, { color: '#8A2BE2', word: '您' },
], ],
showIntroductionPopup: true, showIntroductionPopup: true,
env: getApp().globalData.env || 'release',
});
} else {
this.setData({
env: getApp().globalData.env || 'release',
}); });
} }
}, },
+1
View File
@@ -71,6 +71,7 @@
</view> </view>
</view> </view>
<van-cell <van-cell
wx:if="{{env !== 'release'}}"
is-link is-link
title="debug页面" title="debug页面"
link-type="navigateTo" link-type="navigateTo"