feat:1.0.2 bug修复,引导页优化
This commit is contained in:
@@ -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 });
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user