From 9fbb8e9faf2388172359f4c84f5a2000fe65cd8b Mon Sep 17 00:00:00 2001 From: gongfuxiang Date: Wed, 1 Dec 2021 01:42:14 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=BC=E5=AE=B9H5+=E7=BB=86=E8=8A=82?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/css/page.css | 48 +++++++++-- components/online-service/online-service.vue | 12 +-- components/popup/popup.vue | 43 +++++++-- components/quick-nav/quick-nav.vue | 16 ++-- pages/cart/cart.css | 9 +- pages/cart/cart.vue | 91 ++++++++++---------- pages/login/login.css | 4 +- pages/login/login.vue | 62 +++++++------ pages/plugins/activity/index/index.vue | 11 +-- pages/plugins/label/detail/detail.css | 23 ++--- pages/user/user.css | 21 +++-- pages/user/user.vue | 4 +- 12 files changed, 206 insertions(+), 138 deletions(-) diff --git a/common/css/page.css b/common/css/page.css index 072df838..30050fc0 100644 --- a/common/css/page.css +++ b/common/css/page.css @@ -4,7 +4,10 @@ body { } page { min-height: 100%; -} +} +/** + * 页面宽度最大800px、并居中 + */ page, iframe, .uni-page-head, @@ -18,7 +21,8 @@ iframe, .popup-top, .quick-movable-container, .online-service-movable-container, -.bottom-fixed { +.bottom-fixed, +.buy-nav { max-width: 800px !important; margin: 0 auto !important; } @@ -26,12 +30,44 @@ iframe, .goods-buy-nav, .nav-more-view, .quick-movable-container, -.online-service-movable-container { +.online-service-movable-container, +.buy-nav { left: auto !important; } iframe, .bottom-fixed { right: 0 !important; +} +/** + * 隐藏导航栏内容、仅展示返回按钮 + */ +uni-page-head { + position: absolute; + margin-top: -999999px; + z-index: 99; +} +.uni-page-head-bd { + display: none !important; +} +.uni-page-head-btn { + position: fixed; + left: auto; + bottom: 60px; + background: rgba(0, 0, 0, 0.6); + box-shadow: 0 0 10px rgb(0 0 0 / 30%); + margin: 0 0 0 10px; + border-radius: 50px; + width: 31px; + height: 31px; + text-align: center; + padding: 2px 3px 0 0; +} +.uni-page-head-btn .uni-btn-icon { + color: #fff !important; +} +.uni-app--showtabbar uni-page-wrapper, +uni-page-head[uni-page-head-type=default]~uni-page-wrapper { + height: calc(100% - var(--window-bottom)) !important; } /* #endif */ @@ -621,9 +657,6 @@ button[disabled].bg-gray { */ .scroll-box { height: 100vh; - /* #ifdef H5 */ - height: calc(100vh - 44px); - /* #endif */ } /** @@ -631,9 +664,6 @@ button[disabled].bg-gray { */ .scroll-box-ece-nav { height: calc(100vh - 80rpx); - /* #ifdef H5 */ - height: calc(100vh - 80rpx - 44px); - /* #endif */ } /** diff --git a/components/online-service/online-service.vue b/components/online-service/online-service.vue index ac2206cc..436dab70 100644 --- a/components/online-service/online-service.vue +++ b/components/online-service/online-service.vue @@ -97,7 +97,7 @@ this.setData({ is_first: 0, system: system, - x: win_width-52, + x: win_width-43, y: (system.windowHeight || 450) - 380 }); }, @@ -145,19 +145,19 @@ } .online-service-event-submit, .online-service-event-submit button { - width: 90rpx; - height: 90rpx; + width: 31px; + height: 31px; border-radius: 50%; } .online-service-event-submit button { border: 0; - padding: 15rpx; + padding: 5px; box-shadow: 0 0 10px rgba(0, 0, 0, 0.3); background: rgba(0, 0, 0, 0.6); } .online-service-event-submit image { - width: 60rpx !important; - height: 60rpx !important; + width: 21px !important; + height: 21px !important; } /* #ifdef MP-ALIPAY */ .online-service-event-submit contact-button { diff --git a/components/popup/popup.vue b/components/popup/popup.vue index 4317cd02..742841bd 100644 --- a/components/popup/popup.vue +++ b/components/popup/popup.vue @@ -2,7 +2,7 @@ - + @@ -14,13 +14,35 @@ return {}; }, components: {}, - props: { - propClassname: String, - propShow: Boolean, - propPosition: String, - propMask: Boolean, - propAnimation: Boolean, - propDisablescroll: Boolean + props: { + propClassname: { + type: String, + default: '' + }, + propShow: { + type: Boolean, + default: false + }, + propPosition: { + type: String, + default: 'bottom' + }, + propMask: { + type: Boolean, + default: true + }, + propAnimation: { + type: Boolean, + default: true + }, + propDisablescroll: { + type: Boolean, + default: false + }, + propIsBar: { + type: Boolean, + default: false + } }, methods: { onMaskTap: function onMaskTap() { @@ -99,5 +121,10 @@ .popup-right { border-top-left-radius: 20rpx; border-bottom-left-radius: 20rpx; + } + .popup-bar { + /* #ifdef H5 || APP */ + bottom: var(--window-bottom) !important; + /* #endif */ } \ No newline at end of file diff --git a/components/quick-nav/quick-nav.vue b/components/quick-nav/quick-nav.vue index 15670e7a..1422e702 100644 --- a/components/quick-nav/quick-nav.vue +++ b/components/quick-nav/quick-nav.vue @@ -8,7 +8,7 @@ - + @@ -103,8 +103,8 @@ this.setData({ is_first: 0, system: system, - x: 5, - y: (system.windowHeight || 450) - 200 + x: 12, + y: (system.windowHeight || 450) - 260 }); }, methods: { @@ -158,16 +158,16 @@ } .quick-event-submit { pointer-events: auto; - width: 100rpx; - height: 100rpx; + width: 31px; + height: 31px; border-radius: 50%; box-shadow: 0 0 10px rgba(0, 0, 0, 0.3); opacity: 0.8; } .quick-event-submit image { - width: 50rpx !important; - height: 50rpx !important; - margin: 25rpx auto 25rpx auto; + width: 17px !important; + height: 17px !important; + margin: 7px auto 7px auto; display: block; } diff --git a/pages/cart/cart.css b/pages/cart/cart.css index 727362d3..8b575525 100644 --- a/pages/cart/cart.css +++ b/pages/cart/cart.css @@ -81,10 +81,13 @@ * 操作导航 */ .buy-nav { - position: fixed; - left: 0; - bottom: 0; + position: fixed; z-index: 2; + left: 0; + bottom: 0; + /* #ifdef H5 || APP */ + bottom: var(--window-bottom); + /* #endif */ } .buy-nav, .nav-base { diff --git a/pages/cart/cart.vue b/pages/cart/cart.vue index c45fc730..73a0176c 100644 --- a/pages/cart/cart.vue +++ b/pages/cart/cart.vue @@ -1,57 +1,60 @@