1.顶部返回导航改为组件并优化返回导航

master
sws 2023-10-13 14:20:19 +08:00
parent 5259ccf99a
commit f24b8212f1
8 changed files with 22 additions and 17 deletions

View File

@ -67,11 +67,11 @@
// tabbar
tabbar_pages: ['/pages/index/index', '/pages/goods-category/goods-category', '/pages/cart/cart', '/pages/user/user'],
//
request_url: 'https://new.shopxo.vip/',
// request_url: 'http://shopxo.com/',
// request_url: 'https://new.shopxo.vip/',
request_url: 'http://shopxo.com/',
// publicpublichttps://d1.shopxo.vip/public/
static_url: 'https://new.shopxo.vip/',
// static_url: 'http://shopxo.com/',
// static_url: 'https://new.shopxo.vip/',
static_url: 'http://shopxo.com/',
// default
system_type: 'default',
//

View File

@ -1,9 +1,9 @@
<template>
<view>
<view class="112233 pa-w" :class="(propFixed ? 'pf z-i left-0 top-0 right-0' : '') + ' ' + propClass" :style="'padding-top:' + (status_bar_height > 0 ? status_bar_height + 5 : 0) + 'px;background-color:rgba(255,255,255,' + opacity + ');' + propStyle">
<view class="pa-w" :class="(propFixed ? 'pf z-i left-0 top-0 right-0' : '') + ' ' + propClass" :style="'padding-top:' + (status_bar_height > 0 ? status_bar_height + 5 : 0) + 'px;background-color:rgba(255,255,255,' + opacity + ');' + propStyle">
<!-- 返回 -->
<!-- #ifdef MP-WEIXIN || MP-QQ || MP-KUAISHOU || H5 || APP -->
<view v-if="is_realstore_top_nav_back == 1" class="nav-back padding-horizontal-main round va-m flex-row align-c" :class="(opacity > 0.3 ? 'cr-black ' : 'cr-white ') + (status_bar_height > 0 ? '' : 'padding-vertical-main')">
<view v-if="is_realstore_top_nav_back == 1" class="nav-back padding-horizontal-main round va-m flex-row align-c" :class="(opacity > 0.3 ? 'cr-black ' : 'cr-white ') + (status_bar_height > 0 ? 'padding-bottom-main' : 'padding-vertical-main')">
<view v-if="propName" class="text-size tc pa left-0 right-0 padding-top-xs" :style="propNameOpacity ? (opacity ? 'color:rgba(51,51,51,' + opacity + ')' : '') : ''">{{ propName }}</view>
<iconfont name="icon-tongyong-fanhui" size="40rpx" @tap="top_nav_left_back_event" class="pr top-xs z-i" :color="propColor"></iconfont>
<slot name="right"></slot>

View File

@ -4,11 +4,9 @@
}
.scroll-box {
height: calc(100vh - 166rpx - var(--status-bar-height) + 34rpx);
padding-top: calc(166rpx + var(--status-bar-height) + 34rpx);
height: calc(100vh - 194rpx - var(--status-bar-height) - 5px);
/* #ifdef H5 */
height: calc(100vh - 166rpx);
padding-top: 166rpx;
height: calc(100vh - 170rpx);
/* #endif */
}

View File

@ -1,13 +1,13 @@
<template>
<view>
<component-nav-back prop-class="bg-white" prop-color="#333">
<template slot="right" :class="status_bar_height > 0 ? 'top-search-width' : 'flex-1 flex-width'">
<view class="margin-left-main" :class="status_bar_height > 0 ? 'top-search-width' : 'flex-1 flex-width'">
<component-nav-back :prop-fixed="false" prop-class="bg-white" prop-color="#333">
<template slot="right" :class="status_bar_height > 0 ? 'top-search-width' : ''">
<view class="margin-left-main" :class="status_bar_height > 0 ? '' : 'flex-1 flex-width'">
<component-search @onsearch="search_button_event" propIsOnEvent :propIsRequired="false" propIconColor="#ccc" propPlaceholderClass="cr-grey-c" propBgColor="#f6f6f6"></component-search>
</view>
</template>
<template slot="content">
<view v-if="nav_list.length > 0" class="answers-type flex-row jc-sa align-c" :class="status_bar_height > 0 ? 'padding-top-main' : ''">
<view v-if="nav_list.length > 0" class="answers-type flex-row jc-sa align-c">
<view v-for="(item, index) in nav_list" :key="index" class="flex-1 padding-vertical-sm tc" :class="nav_index === index ? 'cr-main fw-b nav-active-line' : 'cr-base'" :data-index="index" :data-type="item.type" @tap="nav_change_event">{{ item.name }}</view>
</view>
</template>

View File

@ -29,6 +29,13 @@
/**
*
*/
.head-top {
padding-top: calc(94rpx + var(--status-bar-height) + 5px);
/* #ifdef H5 */
padding-top: 94rpx;
/* #endif */
}
.data-list .item {
width: calc(100% / 3);
margin-bottom: 20rpx;

View File

@ -4,7 +4,7 @@
<view v-if="(data_base || null) != null" class="bg-white">
<view class="pr wh-auto oh">
<image :src="membership_level_vip + 'bg.png'" mode="widthFix" class="vip-bg"></image>
<view class="banner oh pa top-0 pa-w wh-auto">
<view class="banner oh pa top-0 pa-w wh-auto head-top">
<view class="tc">
<image :src="membership_level_vip + 'title.png'" mode="widthFix" class="title-img"></image>
<!-- 标题 -->

View File

@ -56,7 +56,7 @@
*
*/
.scroll-y {
height: calc(100vh - 234rpx - var(--status-bar-height) - 5px);
height: calc(100vh - 258rpx - var(--status-bar-height) - 5px);
/* #ifdef H5 */
height: calc(100vh - 234rpx);
/* #endif */

View File

@ -89,7 +89,7 @@
status_bar_height: parseInt(app.globalData.get_system_info('statusBarHeight', 0)),
//
is_realstore_top_nav_back: app.globalData.data.is_realstore_top_nav_back || 0,
seckill_bg: 'background: url(' + seckill_static_url + 'app/header-bg.png) top/100% no-repeat;',
seckill_bg: 'background: url(' + seckill_static_url + 'app/header-bg.png) top/100% no-repeat;background-size:100% 100%;',
seckill_title_url: seckill_static_url + 'seckill-title.png',
scroll_top: 0,
scroll_top_old: 0,