Commit d1e45fda by 张立顺

feat 样式功能修改

1 parent 42d18188
// components/navigationBar/navigationBar.js
import util from '../../utils/util'
const app = getApp()
Component({
options: {
styleIsolation: 'shared'
......@@ -16,7 +17,16 @@ Component({
/**
* 组件的初始数据
*/
data: {},
data: {
// navigationBarHeight: 70
// // 状态栏高度
// statusBarHeight: app.globalData.statusBarHeight,
// // 导航栏高度
// navigationBarHeight: app.globalData.navigationBarHeight,
// navigationBarStyle: 'font-size: var(--fontSize34)',
// // navigationBarTextWidth: `width:${app.globalData.navigationBarWidth / 2}rpx;padding:0 ${app.globalData.navigationBarPadding / 2}rpx; 0 ${app.globalData.navigationBarPadding / 2}rpx;`
// navigationBarTextWidth: `width:${app.globalData.navigationBarWidth / 2}rpx;padding:${app.globalData.navigationBarPadding / 2}rpx;`
},
/**
* 组件的方法列表
......@@ -33,6 +43,12 @@ Component({
* 获取自定义导航栏信息
*/
let _this = this
// 获取屏幕宽度和高度
const { windowWidth, windowHeight } = wx.getSystemInfoSync();
// 判断屏幕方向
const isLandscape = windowWidth > windowHeight; // '横屏' : '竖屏'
wx.getSystemInfo({
success(res) {
let {
......@@ -47,13 +63,14 @@ Component({
top
} = wx.getMenuButtonBoundingClientRect()
let navigationBarHeight = height + (top - statusBarHeight) * 2 + 5
// let navigationBarHeight = height + (top - statusBarHeight) * 2 + 5
let navigationBarHeight = `var(--fontSize${(height + (top - statusBarHeight) * 2 + 5) * (isLandscape ? 1 : 2)})`
let navigationBarPadding = screenWidth - right
let navigationBarWidth = screenWidth - (navigationBarPadding * 2 + width) - width
// if(deviceOrientation == 'landscape') statusBarHeight = 0
_this.setData({
statusBarHeight,
statusBarHeight: `var(--fontSize${statusBarHeight * (isLandscape ? 1 : 2)})`,
navigationBarHeight,
// navigationBarStyle: `font-size:${fontSizeSetting}px;`,
navigationBarStyle: 'font-size: var(--fontSize34)',
......@@ -72,15 +89,49 @@ Component({
},
this
)
}, 100)
}, 0)
}
},
pageLifetimes: {
resize(res) {
if (res.deviceOrientation == 'landscape') this.setData({
statusBarHeight: 0
})
else this.init()
if (res.deviceOrientation == 'landscape') {
wx.getSystemInfo({
success(res) {
let {
fontSizeSetting,
statusBarHeight,
screenWidth
} = res
const {
height,
right,
width,
top
} = wx.getMenuButtonBoundingClientRect()
// let navigationBarHeight = height + (top - statusBarHeight) * 2 + 5
let navigationBarHeight = `var(--fontSize${(height + (top - statusBarHeight) * 2 + 5)})`
let navigationBarPadding = screenWidth - right
let navigationBarWidth = screenWidth - (navigationBarPadding * 2 + width) - width
// if(deviceOrientation == 'landscape') statusBarHeight = 0
_this.setData({
statusBarHeight: `var(--fontSize${statusBarHeight})`,
navigationBarHeight,
// navigationBarStyle: `font-size:${fontSizeSetting}px;`,
navigationBarStyle: 'font-size: var(--fontSize34)',
navigationBarTextWidth: `width:${navigationBarWidth}px;padding:0 ${navigationBarPadding}px; 0 ${navigationBarPadding}px;`
})
}
})
} else {
this.init()
}
// this.setData({
// statusBarHeight: 0
// })
// else
}
},
ready() {
......
<view class='navigation-bar' id='navigation-bar' style='padding-top:{{statusBarHeight}}px;height:{{navigationBarHeight}}px;{{navStyle}}'>
<!-- hidden="{{!showNavBar}}" wx:if="{{showNavBar}}" -->
<view class="navigation-bar-box" style="{{navigationBarStyle}}">
<view class="navigation-bar-titleText" style="{{navigationBarTextWidth}}">
<slot/>
</view>
<block wx:if="{{showBack}}">
<view class="back-box" bindtap="back">
<view class="back">
<image src="../../images/back.png" />
</view>
</view>
<view class='navigation-bar' id='navigation-bar' style='padding-top:{{statusBarHeight}};height:{{navigationBarHeight}};{{navStyle}}'>
<!-- hidden="{{!showNavBar}}" wx:if="{{showNavBar}}" -->
<view class="navigation-bar-box" style="{{navigationBarStyle}}">
<view class="navigation-bar-titleText" style="{{navigationBarTextWidth}}">
<slot />
</view>
<block wx:if="{{showBack}}">
<view class="back-box" bindtap="back">
<view class="back">
<image src="../../images/back.png" />
</view>
</view>
</block>
<block wx:if="{{showMenu}}">
<view class="menu-box" bindtap="showMenuPopup">
<view class="menu-class">
<image src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/navgation-bar-menu.png" />
</view>
</view>
</block>
</view>
</view>
<view class="menu-box" bindtap="showMenuPopup">
<view class="menu-class">
<image src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/navgation-bar-menu.png" />
</view>
</view>
</block>
</view>
</view>
\ No newline at end of file
<view class="popup" hidden="{{!showPopup}}" catchtouchmove="noScroll">
<view class="popup-bg" bindtap="hidePopup" />
<view class="popup-content" style="height:{{height}}">
<block wx:if="{{title}}">
<view class="popup-title text-center">{{title}}</view>
</block>
<!-- {{isFullSucreen?title?'isFullSucreen':'isFullSucreen-notitle':''}}" -->
<view class="{{tips?'popup-slot-other':'popup-slot'}}">
<slot/>
</view>
<block wx:if="{{tips}}">
<view class="tips text-center">{{tips}}</view>
</block>
<!-- {{isFullSucreen?'isFullSucreen':''}} -->
<view class="popup-footer ">
<view class="cancel btn text-center" bindtap="hidePopup">取消</view>
<view class="confirm btn text-center" bindtap="confirm">确认</view>
</view>
</view>
</view>
<view class="popup" hidden="{{!showPopup}}">
<!-- catchtouchmove="noScroll" -->
<view class="popup-bg" bindtap="hidePopup" />
<view class="popup-content" style="height:{{height}}">
<block wx:if="{{title}}">
<view class="popup-title text-center">{{title}}</view>
</block>
<!-- {{isFullSucreen?title?'isFullSucreen':'isFullSucreen-notitle':''}}" -->
<view class="{{tips?'popup-slot-other':'popup-slot'}}">
<slot />
</view>
<block wx:if="{{tips}}">
<view class="tips text-center">{{tips}}</view>
</block>
<!-- {{isFullSucreen?'isFullSucreen':''}} -->
<view class="popup-footer ">
<view class="cancel btn text-center" bindtap="hidePopup">取消</view>
<view class="confirm btn text-center" bindtap="confirm">确认</view>
</view>
</view>
</view>
\ No newline at end of file
/* packageEquity/pages/aiInspection/aiInspection.wxss */
\ No newline at end of file
/* packageEquity/pages/aiInspectionDetail/aiInspectionDetail.wxss */
\ No newline at end of file
/* packageEquity/pages/aiInspectionReception/aiInspectionReception.wxss */
\ No newline at end of file
......@@ -158,7 +158,8 @@
</view>
</block>
<block wx:if="{{showWorkBox}}">
<view class="work-box" catchtouchmove="noScroll">
<!-- catchtouchmove="noScroll" -->
<view class="work-box">
<view class="work-bg" bindtap="showWork" />
<view class="work-content">
<view class="work-title text-center hasborder">工位设置</view>
......
......@@ -316,7 +316,7 @@ page {
overflow: hidden;
left: 0;
width: 100%;
height: 80%;
height: 73%;
overflow: scroll;
padding: 0 var(--fontSize32);
box-sizing: border-box;
......
......@@ -136,7 +136,7 @@
.headerSlot {
font-size: var(--fontSize28);
color: #347BFF;
max-width: var(--fontSize135);
max-width: var(--fontSize125);
/* max-width: 150rpx; */
/* margin-left: 3rpx; */
margin-left: var(--fontSize3);
......
......@@ -31,7 +31,7 @@
<gl-cell-staff headerSlot="{{ orderObj.staffName }}" class="{{ role != 'staff' || !orderObj.isDateWithin7Days?'disabled':'' }}" border valueAlign="right" labelText="每日填写本人该业务的新车客户接待数" label="到店流量(会员权益/延保)" requiredAfter labelWidth="500rpx" required>
<input placeholder="点击输入" class="input" type="number" placeholder-class="placeholder-class" maxlength="3" value="{{ orderObj.equityToShopCount }}" bindinput="input" data-name="equityToShopCount" disabled="{{ role != 'staff' || !orderObj.isDateWithin7Days }}" always-embed></input>
</gl-cell-staff>
<gl-cell-staff headerSlot="{{orderObj.staffName}}" class="{{role != 'staff' || !orderObj.isDateWithin7Days?'disabled':'' }}" border valueAlign="right" labelText="每日填写本人该业务的售后客户接待数" label="售后到店流量(会员权益/延保)" requiredAfter labelWidth="530rpx" required>
<gl-cell-staff headerSlot="{{orderObj.staffName}}" class="{{role != 'staff' || !orderObj.isDateWithin7Days?'disabled':'' }}" border valueAlign="right" labelText="每日填写本人该业务的售后客户接待数" label="售后到店流量(会员权益/延保)" requiredAfter labelWidth="510rpx" required>
<input placeholder="点击输入" class="input" type="number" placeholder-class="placeholder-class" maxlength="3" value="{{ orderObj.afterSaleEquityToShopCount }}" bindinput="input" data-name="afterSaleEquityToShopCount" disabled="{{ role != 'staff' || !orderObj.isDateWithin7Days }}" always-embed></input>
</gl-cell-staff>
<view class="user-portrait">
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!