购物车顶部导航优化,适配支付宝小程序

master
gongfuxiang 2024-02-23 15:09:33 +08:00
parent 442040e7fc
commit c7fa3545dd
2 changed files with 2 additions and 4 deletions

View File

@ -35,7 +35,7 @@
</view>
</block>
<block v-else>
<!-- #ifdef MP-WEIXIN || MP-BAIDU || MP-QQ || MP-KUAISHOU || APP -->
<!-- #ifdef MP-WEIXIN || MP-BAIDU || MP-QQ || MP-KUAISHOU || MP-ALIPAY || APP -->
<component-nav-back propClass="bg-white" propNameClass="cr-black" :propName="$t('common.cart')" :propFixed="false" :propIsShowBack="propSourceType !== 'page' ? false : true" :propIsRightSlot="false"></component-nav-back>
<!-- #endif -->
</block>

View File

@ -3,8 +3,8 @@
<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">
<!-- 返回 -->
<view v-if="(propName || null) != null || propIsRightSlot || propIsShowBack" 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')">
<!-- #ifndef MP-ALIPAY -->
<view v-if="(propName || null) != null" :class="'text-size-md tc pa left-0 right-0 padding-top-xs '+propNameClass" :style="propNameOpacity ? (opacity ? 'color:rgba(51,51,51,' + opacity + ')' : '') : ''">{{ propName }}</view>
<!-- #ifndef MP-ALIPAY -->
<iconfont v-if="propIsShowBack" name="icon-arrow-left" size="40rpx" @tap="top_nav_left_back_event" propClass="pr top-xs z-i" :color="propColor"></iconfont>
<!-- #endif -->
<slot v-if="propIsRightSlot" name="right"></slot>
@ -77,7 +77,6 @@
};
},
mounted() {
// #ifndef MP-ALIPAY
var self = this;
uni.$on('onPageScroll', function (e) {
var top = e.scrollTop > 47 ? 1 : e.scrollTop / 47;
@ -85,7 +84,6 @@
opacity: top,
});
});
// #endif
},
methods: {
top_nav_left_back_event() {