头部动态根据手机调整

This commit is contained in:
mactj 2021-01-22 19:47:58 +08:00
parent e25001b942
commit d1e5f465ee
13 changed files with 46 additions and 25 deletions

View File

@ -71,7 +71,7 @@ module.exports.parseImage = parseImage;
<div style="display: flex;margin: 5px;flex-direction: column;">
<div class="cell-item" v-for="(type,index) in reasonType">
<div v-if="index === 4" class="cell-input">
<van-radio name="其他" checked-color="#AC1630">其他<van-radio/>
<van-radio name="其他" checked-color="#AC1630">其他</van-radio>
<input
v-model="text"
clearable
@ -95,7 +95,7 @@ module.exports.parseImage = parseImage;
<div style="display: flex;margin: 5px;flex-direction: column;">
<div class="cell-item" v-for="(item,index) in reasonTypes">
<div v-if="index === 4" class="cell-input">
<van-radio name="{{item}}" checked-color="#AC1630" />
<van-radio name="{{item}}" checked-color="#AC1630" > </van-radio>
<input
v-model="text"
clearable

View File

@ -21,7 +21,7 @@ module.exports.parseImage = parseImage;
<van-loading v-if="!goodsItem" style="margin-top: 200px;" />
<div v-else style="margin-top:66px;margin-bottom: 80px; width: 100%;">
<div v-else style="margin-bottom: 80px; width: 100%;" :style=" { 'margin-top' : (statusBarHeight + 46 ) + 'px' }">
<swiper indicator-dots="true" autoplay="true" interval="3000" style="height: 750rpx;">
<block v-for="(item,index) in goodsImages" wx:key="index">
@ -124,7 +124,8 @@ wepy.page({
...mapState({
'order': state => state.order,
'shoppingCar': state => state.shoppingCar
'shoppingCar': state => state.shoppingCar,
'statusBarHeight': state => state.statusBarHeight
}),
goodsImages() {
if (!this.goodsItem || !this.goodsItem.goodsImg) {

View File

@ -168,6 +168,12 @@ wepy.page({
},
ready() {
wx.getSystemInfo({
success (res) {
store.state.statusBarHeight = res.statusBarHeight
}
})
this.init()
// eventHub.$emit('onShowDialogRegist')
// appManager.login()

View File

@ -35,14 +35,16 @@ module.exports.parseImage = parseImage;
<view wx:else>
<div v-if="!currentAddress" style="display: flex;flex-direction: column;align-items: center;width: 100%;margin-top: 86px;">
<div v-if="!currentAddress" style="display: flex;flex-direction: column;align-items: center;width: 100%;"
:style=" { 'margin-top': (statusBarHeight + 66) + 'px' }">
<van-empty description="您还没有添加收货地址" />
<div style="width: 600rpx;">
<van-button round type="info" size="large" @tap="onAdd">点击添加</van-button>
</div>
</div>
<div v-else class="fream" style="margin: 86px 15px 20px 15px;" >
<div v-else class="fream" style="margin-left: 15px;margin-right: 15px;margin-bottom: 20px;"
:style=" { 'margin-top' : (statusBarHeight + 66) + 'px' }">
<div style="display: flex; justify-content: space-between;">
<van-icon name="home-o" size="60rpx" />
@ -134,7 +136,8 @@ wepy.page({
'user': state => state.user,
'navDefine': state => state.navDefine,
'userAddress': state => state.userAddress,
'order': state => state.order
'order': state => state.order,
'statusBarHeight': state => state.statusBarHeight
}),
totalPrice() {
let result = 0.0

View File

@ -14,7 +14,7 @@ module.exports.parseImage = parseImage;
<nav-bar title="退款记录" />
<div style="width: 100%;margin-top:66px;">
<div style="width: 100%;" :style=" { 'margin-top' : (statusBarHeight + 46 ) + 'px' }">
<van-tabs active="{{ activeTab }}" bind:change="onChangeTab">
@ -61,7 +61,8 @@ wepy.page({
'imageDefine': state => state.imageDefine,
'user': state => state.user,
'navDefine': state => state.navDefine,
'userAddress': state => state.userAddress
'userAddress': state => state.userAddress,
'statusBarHeight': state => state.statusBarHeight
})
},

View File

@ -14,7 +14,7 @@ module.exports.parseImage = parseImage;
<nav-bar title="我的订单" />
<div style="width: 100%;margin-top:66px;">
<div style="width: 100%;" :style=" { 'margin-top' : (statusBarHeight + 46 ) + 'px' }">
<van-tabs active="{{ activeTab }}" bind:change="onChangeTab">
@ -69,7 +69,8 @@ wepy.page({
'imageDefine': state => state.imageDefine,
'user': state => state.user,
'navDefine': state => state.navDefine,
'userAddress': state => state.userAddress
'userAddress': state => state.userAddress,
'statusBarHeight': state => state.statusBarHeight
})
},

View File

@ -14,7 +14,7 @@ module.exports.parseImage = parseImage;
<nav-bar title="我的购物车" />
<div style="width: 100%;margin-top:66px;">
<div style="width: 100%;" :style=" { 'margin-top' : (statusBarHeight + 46 ) + 'px' }">
<van-loading wx:if="{{ !isInit }}" style="margin-top: 20px;"></van-loading>
<view wx:else>
@ -104,7 +104,8 @@ wepy.page({
'user': state => state.user,
'navDefine': state => state.navDefine,
'userAddress': state => state.userAddress,
'shoppingCar': state => state.shoppingCar
'shoppingCar': state => state.shoppingCar,
'statusBarHeight': state => state.statusBarHeight
}),
totalPrice() {

View File

@ -35,7 +35,7 @@
<nav-bar title="地址管理" />
<div class="container" style="margin-top:66px;">
<div class="container" :style=" { 'margin-top' : (statusBarHeight + 46 ) + 'px' }">
<van-loading wx:if="{{ !isInit }}" style="margin-top: 20px;"></van-loading>
<view wx:else>
@ -121,7 +121,8 @@ wepy.page({
'imageDefine': state => state.imageDefine,
'user': state => state.user,
'navDefine': state => state.navDefine,
'userAddress': state => state.userAddress
'userAddress': state => state.userAddress,
'statusBarHeight': state => state.statusBarHeight
})
},

View File

@ -48,7 +48,7 @@ input {
<template>
<nav-bar :title="title" />
<div class="container">
<div class="container" :style=" { 'margin-top' : (statusBarHeight + 46 ) + 'px' }">
<div class="address-item">
@ -164,7 +164,8 @@ wepy.page({
'imageDefine': state => state.imageDefine,
'user': state => state.user,
'navDefine': state => state.navDefine,
'userAddress': state => state.userAddress
'userAddress': state => state.userAddress,
'statusBarHeight': state => state.statusBarHeight
})
},
methods: {

View File

@ -69,7 +69,7 @@ module.exports.parseImage = parseImage;
<nav-bar :title="newItem.newsTitle" />
<div class="container" style="margin-top: 66px;">
<div class="container" :style=" { 'margin-top' : (statusBarHeight + 46 ) + 'px' }">
<van-loading v-if="!newItem" style="margin-top: 136px;" />
<div v-else style="margin-bottom: 80px;">
@ -105,7 +105,10 @@ wepy.page({
computed: {
...mapState({
'imageDefine': state => state.imageDefine
'imageDefine': state => state.imageDefine,
'statusBarHeight': state => state.statusBarHeight
})
},

View File

@ -69,7 +69,7 @@ module.exports.parseImage = parseImage;
<nav-bar title="酒庄信息" />
<div class="container" style="margin-top: 66px;">
<div class="container" :style=" { 'margin-top' : (statusBarHeight + 46 ) + 'px' }">
<van-loading v-if="!wineryItem" style="margin-top: 20px;" />
<div v-else style="margin-bottom: 80px;">
<image :src="filters.parseImage(wineryItem.topImage)" style="width: 100%;height: 750rpx;" mode="aspectFit" />
@ -106,7 +106,8 @@ wepy.page({
computed: {
...mapState({
'imageDefine': state => state.imageDefine
'imageDefine': state => state.imageDefine,
'statusBarHeight': state => state.statusBarHeight
})
},

View File

@ -101,7 +101,7 @@ module.exports.parseAwards = parseAwards;
<nav-bar title="酒庄介绍" />
<!-- <div class="bg" />-->
<div class="container" style="margin-top: 66px;width: 100%;">
<div class="container" style="width: 100%;" :style=" { 'margin-top' : (statusBarHeight + 46 ) + 'px' }">
<image :src="imageDefine.WINERY_HEADER" style="width:100%;height:218px;position: absolute;" />
<div class="banner" />
@ -124,7 +124,7 @@ module.exports.parseAwards = parseAwards;
<van-image :src="filters.parseImage(item.faceImage)" width="100%" height="128px" />
<div style="margin-left: 20px;margin-top:35px;display: flex;align-items: center;">
<span style="font-size: 20px;font-weight: bold;width: 120px;">{{item.mchName}}</span>
<span style="color: #999;font-size: 12px;width: 200px;margin-left: 8px;">{{item.subtitle}}</span>
<span style="color: #999;font-size: 12px;width: 160px;margin-left: 8px;">{{item.subtitle}}</span>
</div>
@ -173,7 +173,8 @@ wepy.page({
...mapState({
'imageDefine': state => state.imageDefine,
'userInfo': state => state.user.userInfo,
'wineryDefine': state => state.wineryDefine
'wineryDefine': state => state.wineryDefine,
'statusBarHeight': state => state.statusBarHeight
})
},

View File

@ -19,6 +19,7 @@ export default new Vuex.Store({
currWebUrl: ''
},
statusBarHeight: 20,
// 热开关
hotSwitch: false,
// 订单
@ -29,7 +30,7 @@ export default new Vuex.Store({
imageDefine,
navDefine,
wineryDefine,
userAddress
userAddress,
},
mutations: {