代码拉取完成,页面将自动刷新
import Vue from 'vue'
export default {
initTitleNav() {
uni.getSystemInfo({
success: function (e) {
// #ifndef MP
Vue.prototype.StatusBar = e.statusBarHeight;
if (e.platform === 'android') {
Vue.prototype.CustomBar = e.statusBarHeight + 50;
} else {
Vue.prototype.CustomBar = e.statusBarHeight + 45;
}
// #endif
// #ifdef MP-WEIXIN
Vue.prototype.StatusBar = e.statusBarHeight;
let custom = wx.getMenuButtonBoundingClientRect();
Vue.prototype.Custom = custom;
Vue.prototype.CustomBar = custom.bottom + custom.top - e.statusBarHeight;
// #endif
// #ifdef MP-ALIPAY
// Vue.prototype.StatusBar = e.statusBarHeight;
// Vue.prototype.CustomBar = e.statusBarHeight + e.titleBarHeight;
// #endif
// #ifdef MP-QQ
Vue.prototype.StatusBar = e.statusBarHeight;
let customQQ = qq.getMenuButtonBoundingClientRect();
Vue.prototype.Custom = customQQ;
Vue.prototype.CustomBar = customQQ.bottom + customQQ.top - e.statusBarHeight;
if (e.model.indexOf("iPhone X") > -1) {
Vue.prototype.CustomBar = 82;
} else {
Vue.prototype.CustomBar = 60;
}
// #endif
// #ifdef MP-TOUTIAO
// Vue.prototype.StatusBar = e.statusBarHeight;
// let customTT = tt.getMenuButtonBoundingClientRect();
// Vue.prototype.Custom = customTT;
// Vue.prototype.CustomBar = customTT.bottom + customTT.top - e.statusBarHeight
// #endif
}
})
},
initShareMenu() {
// #ifdef MP-WEIXIN
wx.showShareMenu({
withShareTicket: true,
menus: ['shareAppMessage', 'shareTimeline']
})
// #endif
// #ifdef MP-QQ
uni.showShareMenu({
withShareTicket: true
})
// #endif
}
};
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。