从服务端归档恢复项目源码(服务端 upload-pack 异常,无法 clone)

This commit is contained in:
CodeBuddy
2026-10-26 16:35:28 +08:00
commit 875976a120
318 changed files with 42625 additions and 0 deletions
+16
View File
@@ -0,0 +1,16 @@
// 只计算设备布局,不保存接口数据。
function getLayout() {
var info = {};
try { info = wx.getWindowInfo ? wx.getWindowInfo() : wx.getSystemInfoSync(); } catch (e) {}
var status = info.statusBarHeight || 20;
var capsule;
try { capsule = wx.getMenuButtonBoundingClientRect(); } catch (e) {}
var bar = capsule && capsule.height > 0 && capsule.top >= status
? capsule.height + (capsule.top - status) * 2 : 44;
var height = status + bar;
var width = info.windowWidth || 375;
var side = capsule && capsule.left > width / 2 ? width - capsule.left + 12 : 100;
return { statusBarHeight: status, barHeight: bar, navHeight: height, navSide: side,
layoutStyle: '--nav-height:' + height + 'px;--status-height:' + status + 'px;' };
}
module.exports = { getLayout };