feat:1.0.2 bug修复,引导页优化

This commit is contained in:
2025-07-03 11:04:52 +08:00
parent fdf8a31f32
commit ef39c86d5f
9 changed files with 120 additions and 39 deletions
+13 -2
View File
@@ -1,11 +1,13 @@
Page({
data: {
header: 'wechat'
header: 'wechat',
enableDebug: false
},
onLoad() {
const header = getApp().getPrintHeader() || 'wechat';
this.setData({ header });
const enableDebug = wx.getStorageSync('enableDebug') || false;
this.setData({ header, enableDebug });
},
onChangeHeader(e: WechatMiniprogram.CustomEvent) {
@@ -20,6 +22,15 @@ Page({
onConfirm() {
getApp().setPrintHeader(this.data.header);
const enableDebug = this.data.enableDebug;
wx.setStorageSync('enableDebug', enableDebug);
wx.setEnableDebug({ enableDebug });
wx.navigateBack();
},
/** 真机调试线上包 */
toggleDebug() {
const enableDebug = !this.data.enableDebug;
this.setData({ enableDebug });
}
});