提交 5825bffc 编写于 作者: tao.wu's avatar tao.wu

調試頭部組件分享

上级 8c917d90
......@@ -9,6 +9,8 @@ header{
}
.head-wrap{
width: 375px;
height: 44Px;
line-height: 44Px;
box-sizing: border-box;
padding: 0 20px 0 16px;
display: flex;
......
<template>
<header>
<div class="status" :class="{'bgfff': isScroll}" :style="{height: statusBarHeight + 'px', background: bgColor}"></div>
<div class="head-wrap" :class="{'bgfff': isScroll}" :style="{height: titleHeight + 'px'}">
<div class="status" :class="{'bgfff': isScroll}" :style="{height: statusBarHeight + 'Px', background: bgColor}"></div>
<!-- <div class="head-wrap" :class="{'bgfff': isScroll}" :style="{height: titleHeight + 'px'}"> -->
<div class="head-wrap" :class="{'bgfff': isScroll}">
<img @click="goBack" :src="leftIcon">
<span v-if="isScroll">{{title}}</span>
<img @click="goShare" :src="rightIcon">
......@@ -72,13 +73,12 @@
methods: {
// 从APP获取电池栏高度并设置高度
setHeaderHeight(){
// this.statusBarHeight = 20 * window.devicePixelRatio; // 给一个默认值,20 * 2
// this.titleHeight = 44 * window.devicePixelRatio; // title高度默认是44px
this.$rocNative.getStatusBarHeight().then(res=>{
const dpr = window.devicePixelRatio;
if(this.$rocNative.isIOS){
this.statusBarHeight = res.statusBarHeight * dpr;
this.titleHeight = this.titleHeight * dpr;
// this.statusBarHeight = res.statusBarHeight * dpr;
// this.titleHeight = this.titleHeight * dpr;
this.statusBarHeight = res.statusBarHeight;
}else{
this.bgColor = '#ccc';
this.statusBarHeight = res.statusBarHeight / dpr;
......
......@@ -258,6 +258,9 @@
hospitalLevelScore: [100, 300, 700], // 三阶段达标分值, 数组返回
targetRequiredScore: '10', // 再获得多少分 // 再获得10勤奋分即可上升到前10名获得欧姆龙温度计
targetRank: '5', // 上升到多少名
todayDate: 0,
yesterdayDate: 0,
userYesterdayRank: 0, // 用戶昨日排名
},
clockSuccessVisible: false, // 是否显示 打卡成功 弹窗
......@@ -324,6 +327,7 @@
},
mounted() {
vm.getUserActivityInfo();
vm.shareObj = {
shareUrl: window.location.href,
title1: '分享title分享title',
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册