Authored by yyq

Merge branch 'feature/0530' into release/6.9.5

<template>
<div class="article-footer-wrapper">
<slot name="before"></slot>
<div class="tool-bar">
<WidgetIconBtn ref="favIcon" class="item" type="fav" :pos-id="sceneId" :text="praiseCount" :articleId="articleId" :option="optionPraise" :share="share"></WidgetIconBtn>
<WidgetIconBtn class="item" type="star" :pos-id="sceneId" :text="favoriteCount" :articleId="articleId" :option="optionFav" :share="share"></WidgetIconBtn>
<WidgetIconBtn class="item" type="msg" :text="commentCount" :option="optionComment" :share="share" @click="onComment"></WidgetIconBtn>
<div class="article-footer-wrapper" :style="actionBarStyle">
<div class="footer-wrapper-content">
<slot name="before"></slot>
<div class="tool-bar">
<WidgetIconBtn ref="favIcon" class="item" type="fav" :pos-id="sceneId" :text="praiseCount" :articleId="articleId" :option="optionPraise" :share="share"></WidgetIconBtn>
<WidgetIconBtn class="item" type="star" :pos-id="sceneId" :text="favoriteCount" :articleId="articleId" :option="optionFav" :share="share"></WidgetIconBtn>
<WidgetIconBtn class="item" type="msg" :text="commentCount" :option="optionComment" :share="share" @click="onComment"></WidgetIconBtn>
</div>
<slot name="after">
<div class="close ml20" @click="onClose">收起</div>
</slot>
</div>
<slot name="after">
<div class="close ml20" @click="onClose">收起</div>
</slot>
</div>
</template>
<script>
import {mapState} from 'vuex';
import YAS from 'utils/yas-constants';
export default {
... ... @@ -29,6 +31,16 @@ export default {
};
},
computed: {
...mapState(['yoho']),
actionBarStyle() {
if (this.yoho.window.actionBarHeight) {
return {
paddingBottom: this.yoho.window.actionBarHeight + 'px'
};
}
return {};
},
optionPraise() {
return {
selected: this.hasPraise === 'Y'
... ... @@ -59,8 +71,6 @@ export default {
<style lang="scss" scoped>
.article-footer-wrapper {
display: flex;
height: 100px;
border-top: 1px solid #f0f0f0;
background-color: white;
position: relative;
... ... @@ -74,6 +84,11 @@ export default {
right: 0;
z-index: 3;
}
.footer-wrapper-content {
display: flex;
height: 100px;
}
}
.tool-bar {
... ...
... ... @@ -359,6 +359,11 @@ export default {
p {
font-size: 28px!important;
* {
font-size: 28px!important;
letter-spacing: normal!important;
}
}
b,
... ...
... ... @@ -23,6 +23,7 @@ export default function(mergeState = {}) {
window: {
statusBarStatus: false,
statusBarHeight: 0,
actionBarHeight: 0,
statusBarColor: 'black',
clientHeight: 0,
clientWidth: 0,
... ... @@ -96,6 +97,9 @@ export default function(mergeState = {}) {
[Types.SET_STATUS_BAR_HEIGHT](state, {height}) {
state.window.statusBarHeight = height;
},
[Types.SET_ACTION_BAR_HEIGHT](state, {height}) {
state.window.actionBarHeight = height;
},
[Types.SET_STATUS_BAR_COLOR](state, {color}) {
if (state.context.env.isYohoBuy && state.context.env.isiOS && state.window.statusBarStatus) {
state.window.statusBarColor = color || 'black';
... ...
... ... @@ -12,6 +12,7 @@ export const SET_SUPPORT_WEBP = 'SET_SUPPORT_WEBP';
export const SET_STATUS_BAR_STATUS = 'SET_STATUS_BAR_STATUS';
export const SET_STATUS_BAR_HEIGHT = 'SET_STATUS_BAR_HEIGHT';
export const SET_STATUS_BAR_COLOR = 'SET_STATUS_BAR_COLOR';
export const SET_ACTION_BAR_HEIGHT = 'SET_ACTION_BAR_HEIGHT';
export const FETCH_USER_INFO_FAILD = 'FETCH_USER_INFO_FAILD';
export const FETCH_USER_INFO_SUCCESS = 'FETCH_USER_INFO_SUCCESS';
... ...
... ... @@ -6,16 +6,24 @@ import version from 'utils/version';
const setStatusBar = (width, height, store) => {
const statusBar = {
statusBarStatus: false,
statusBarHeight: 0,
statusBarHeight: 0
};
// 仅支持ios
if (yoho.isYohoBuy && yoho.isiOS) {
statusBar.statusBarHeight = (height / width) > 2.1 ? 44 : 22;
store && store.commit('SET_STATUS_BAR_HEIGHT', {
height: statusBar.statusBarHeight
});
let isX = (height / width) > 2.1;
let actionBarHeight = isX ? 44 : 0;
statusBar.statusBarHeight = isX ? 44 : 22;
if (store) {
store.commit('SET_STATUS_BAR_HEIGHT', {
height: statusBar.statusBarHeight
});
store.commit('SET_ACTION_BAR_HEIGHT', {
height: actionBarHeight
});
}
function getAppVersion(str, split) {
const match = str.match(new RegExp('(^|)app_version=([^' + split + ']*)(' + split + '|$)'));
... ...