upload project
This commit is contained in:
commit
06961cae04
422 changed files with 110626 additions and 0 deletions
50
subpackages/settings/settingss/settingss.js
Normal file
50
subpackages/settings/settingss/settingss.js
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
// pages/settingss/settingss.js
|
||||
const app = getApp();
|
||||
|
||||
Page({
|
||||
data: {
|
||||
menuButtonInfo: { height: 32, width: 32, top: 0 },
|
||||
statusBarHeight: 0
|
||||
},
|
||||
|
||||
onLoad() {
|
||||
this.initSystemInfo();
|
||||
},
|
||||
|
||||
initSystemInfo() {
|
||||
try {
|
||||
const systemInfo = wx.getSystemInfoSync();
|
||||
const menuButtonInfo = wx.getMenuButtonBoundingClientRect();
|
||||
this.setData({
|
||||
statusBarHeight: systemInfo.statusBarHeight || 0,
|
||||
menuButtonInfo: menuButtonInfo || this.data.menuButtonInfo
|
||||
});
|
||||
} catch (e) {
|
||||
console.error('获取系统信息失败:', e);
|
||||
}
|
||||
},
|
||||
|
||||
navigateBack() {
|
||||
wx.navigateBack();
|
||||
},
|
||||
|
||||
openFeedback() {
|
||||
wx.navigateTo({ url: '/subpackages/settings/feedback/feedback' });
|
||||
},
|
||||
|
||||
async logout() {
|
||||
wx.showModal({
|
||||
title: '退出登录',
|
||||
content: '确定要退出当前账号吗?',
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
app.logout().then(() => {
|
||||
wx.reLaunch({
|
||||
url: '/pages/login/login'
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue