From b6b1a34a610795ed5ea8dd8658955ea4c9a0d401 Mon Sep 17 00:00:00 2001
From: peng <peng.com>
Date: 星期五, 27 六月 2025 15:54:04 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/dev' into dev
---
pages/tabbar/user/utils/tool.vue | 13 -
pages/kitchen/KitchenVideo.vue | 18 ++-
pages/tabbar/cart/cartList.vue | 10 +
pages/health/healthVideo.vue | 7 +
pages/video/video-play.vue | 12 +
components/custom-tabbar.vue | 228 ++++++++++++++++++++++----------------------
pages/tabbar/index/home.vue | 7 +
7 files changed, 153 insertions(+), 142 deletions(-)
diff --git a/components/custom-tabbar.vue b/components/custom-tabbar.vue
index 7d29bed..5fb34e7 100644
--- a/components/custom-tabbar.vue
+++ b/components/custom-tabbar.vue
@@ -1,126 +1,126 @@
<!-- components/custom-tabbar.vue -->
<template>
- <view class="custom-tabbar" :style="{backgroundColor: bgColor}">
- <view
- v-for="(item, index) in list"
- :key="index"
- class="tabbar-item"
- @click="switchTab(item)"
- >
- <image
- :src="selected === item.key ? item.selectedIconPath : item.iconPath"
- :class="{'tabbar-icon': true, 'video-add': item.key == 'video'}"
- />
- <text class="tabbar-text" v-if="item.text" :style="{color: selected === item.key ? selectedTextColor : color}">
- {{item.text}}
- </text>
- </view>
- </view>
+ <view class="custom-tabbar" :style="{backgroundColor: bgColor, marginBottom: marginBottom + 'px'}">
+ <view v-for="(item, index) in list" :key="index" class="tabbar-item" @click="switchTab(item)">
+ <image :src="selected === item.key ? item.selectedIconPath : item.iconPath"
+ :class="{'tabbar-icon': true, 'video-add': item.key == 'video'}" />
+ <text class="tabbar-text" v-if="item.text"
+ :style="{color: selected === item.key ? selectedTextColor : color}">
+ {{item.text}}
+ </text>
+ </view>
+ </view>
</template>
<script>
-export default {
- name: "CustomTabbar",
- props: {
- selected: {
- type: String,
- default: 'index'
- },
- bgColor: {
- type: String,
- default: '#333333'
- },
- selectedTextColor: {
- type: String,
- default: '#ff573e'
- }
- },
- data() {
- return {
- color: '#999999',
- list: [
- {
- "pagePath": "/pages/tabbar/index/home",
- "iconPath": "/static/tabbar/home.png",
- "selectedIconPath": "/static/tabbar/home-s.png",
- "text": "棣栭〉",
- "key": 'index'
- },
- {
- // "pagePath": "/pages/tabbar/category/category",
- "pagePath": "/pages/kitchen/KitchenVideo",
-
- "iconPath": "/static/tabbar/category.png",
- "selectedIconPath": "/static/tabbar/category-s.png",
- "text": "绁炲帹",
- "key": 'kitchen'
- },
- {
- "pagePath": "/pages/tabbar/video/video",
- "iconPath": "/static/tabbar/video1.png",
- "selectedIconPath": "/static/tabbar/video1-selected.png",
- "key": 'video'
+ export default {
+ name: "CustomTabbar",
+ props: {
+ selected: {
+ type: String,
+ default: 'index'
},
- {
- "pagePath": "/pages/tabbar/cart/cartList",
- "iconPath": "/static/tabbar/cart.png",
- "selectedIconPath": "/static/tabbar/cart-s.png",
- "text": "璐墿杞�",
- "key": 'buyCar'
- },
- {
- "pagePath": "/pages/tabbar/user/my",
- "iconPath": "/static/tabbar/mine.png",
- "selectedIconPath": "/static/tabbar/mine-s.png",
- "text": "鎴戠殑",
- "key": 'my'
- }
- ]
- }
- },
- methods: {
- switchTab(item) {
- console.log("鎵ц鍔�", item);
- if (this.selected === item.key) return;
- uni.switchTab({
- url: item.pagePath
- });
- }
- }
-}
+ bgColor: {
+ type: String,
+ default: '#333333'
+ },
+ selectedTextColor: {
+ type: String,
+ default: '#ff573e'
+ }
+ },
+ data() {
+ return {
+ color: '#999999',
+ marginBottom: 0,
+ list: [{
+ "pagePath": "/pages/tabbar/index/home",
+ "iconPath": "/static/tabbar/home.png",
+ "selectedIconPath": "/static/tabbar/home-s.png",
+ "text": "棣栭〉",
+ "key": 'index'
+ },
+ {
+ // "pagePath": "/pages/tabbar/category/category",
+ "pagePath": "/pages/kitchen/KitchenVideo",
+
+ "iconPath": "/static/tabbar/category.png",
+ "selectedIconPath": "/static/tabbar/category-s.png",
+ "text": "绁炲帹",
+ "key": 'kitchen'
+ },
+ {
+ "pagePath": "/pages/tabbar/video/video",
+ "iconPath": "/static/tabbar/video1.png",
+ "selectedIconPath": "/static/tabbar/video1-selected.png",
+ "key": 'video'
+ },
+ {
+ "pagePath": "/pages/tabbar/cart/cartList",
+ "iconPath": "/static/tabbar/cart.png",
+ "selectedIconPath": "/static/tabbar/cart-s.png",
+ "text": "璐墿杞�",
+ "key": 'buyCar'
+ },
+ {
+ "pagePath": "/pages/tabbar/user/my",
+ "iconPath": "/static/tabbar/mine.png",
+ "selectedIconPath": "/static/tabbar/mine-s.png",
+ "text": "鎴戠殑",
+ "key": 'my'
+ }
+ ]
+ }
+ },
+ created() {
+ console.log("搴曢儴瀹夊叏鍖哄煙", uni.getSystemInfoSync().safeAreaInsets);
+ this.marginBottom = uni.getSystemInfoSync().safeAreaInsets.bottom
+ },
+ methods: {
+ switchTab(item) {
+ console.log("鎵ц鍔�", item);
+ if (this.selected === item.key) return;
+ uni.switchTab({
+ url: item.pagePath
+ });
+ }
+ }
+ }
</script>
<style>
-.custom-tabbar {
- position: fixed;
- bottom: 0;
- left: 0;
- right: 0;
- height: 50px;
- display: flex;
- align-items: center;
- justify-content: space-around;
- border-top: 1px solid #ededed;
- box-sizing: border-box;
-}
+ .custom-tabbar {
+ position: fixed;
+ bottom: 0;
+ left: 0;
+ right: 0;
+ height: 50px;
+ display: flex;
+ align-items: center;
+ justify-content: space-around;
+ border-top: 1px solid #ededed;
+ box-sizing: border-box;
+ }
-.tabbar-item {
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
-}
-.video-add {
- width: 30px !important;
- height: 30px !important;
-}
-.tabbar-icon {
- width: 24px;
- height: 24px;
- margin-bottom: 4px;
-}
+ .tabbar-item {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+ }
-.tabbar-text {
- font-size: 10px;
-}
+ .video-add {
+ width: 30px !important;
+ height: 30px !important;
+ }
+
+ .tabbar-icon {
+ width: 24px;
+ height: 24px;
+ margin-bottom: 4px;
+ }
+
+ .tabbar-text {
+ font-size: 10px;
+ }
</style>
\ No newline at end of file
diff --git a/pages/health/healthVideo.vue b/pages/health/healthVideo.vue
index c404e82..3bf49d0 100644
--- a/pages/health/healthVideo.vue
+++ b/pages/health/healthVideo.vue
@@ -53,6 +53,7 @@
@touchstart.stop="handleTouchStart"
@touchmove.stop="handleTouchMove"
@touchend.stop="handleTouchEnd"
+ :style="{bottom: marginBottom + 'px'}"
class="container">
<!-- 杩涘害鏉� - 鏁翠釜鍖哄煙鍙嫋鍔� -->
<view class="process-warp" :style="{ opacity: showProcess ? 1 : 0 }">
@@ -118,7 +119,7 @@
<!-- 瑙嗛淇℃伅灞� -->
- <view class="video-info">
+ <view class="video-info" :style="{bottom: marginBottom + 20 + 'px'}">
<view>
<text class="video-author">@{{item.authorName}}</text>
</view>
@@ -325,7 +326,8 @@
pageNumber: 1,
pageSize: 10,
videoFrom: 'recommend'
- }
+ },
+ marginBottom: 0 // 搴曢儴瀹夊叏鍖哄煙
}
},
onShow() {
@@ -347,6 +349,7 @@
this.startHidenTime = Date.now()
},
onLoad(option) {
+ this.marginBottom = uni.getSystemInfoSync().safeAreaInsets.bottom
const token = storage.getAccessToken();
if (! token) {
this.wxSilentLogin(() => {
diff --git a/pages/kitchen/KitchenVideo.vue b/pages/kitchen/KitchenVideo.vue
index 0e4729a..0223187 100644
--- a/pages/kitchen/KitchenVideo.vue
+++ b/pages/kitchen/KitchenVideo.vue
@@ -56,6 +56,7 @@
@touchstart.stop="handleTouchStart"
@touchmove.stop="handleTouchMove"
@touchend.stop="handleTouchEnd"
+ :style="{bottom: marginBottom + 'px'}"
class="container">
<!-- 杩涘害鏉� - 鏁翠釜鍖哄煙鍙嫋鍔� -->
<view class="process-warp" :style="{ opacity: showProcess ? 1 : 0 }">
@@ -121,7 +122,7 @@
<!-- 瑙嗛淇℃伅灞� -->
- <view class="video-info">
+ <view class="video-info" :style="{bottom: marginBottom + 20 + 'px'}">
<view>
<text class="video-author">@{{item.authorName}}</text>
</view>
@@ -349,7 +350,8 @@
pageSize: 6,
videoFrom: 'recommend',
videoType: 'cook'
- }
+ },
+ marginBottom: 0 // 搴曢儴瀹夊叏鍖哄煙
}
},
onShow() {
@@ -365,11 +367,12 @@
this.startHidenTime = Date.now()
},
onLoad() {
- // 鑾峰彇鐘舵�佹爮楂樺害
- const systemInfo = uni.getSystemInfoSync();
- this.buttonHeight = systemInfo.statusBarHeight;
- this.getKitchenTypeList();
- this.loadVideos();
+ this.marginBottom = uni.getSystemInfoSync().safeAreaInsets.bottom
+ // 鑾峰彇鐘舵�佹爮楂樺害
+ const systemInfo = uni.getSystemInfoSync();
+ this.buttonHeight = systemInfo.statusBarHeight;
+ this.getKitchenTypeList();
+ this.loadVideos();
},
onReady() {
// 鍒濆鍖栬棰戜笂涓嬫枃
@@ -963,7 +966,6 @@
.video-item {
width: 100%;
height: 100%;
- object-fit: cover;
}
.play-icon {
diff --git a/pages/tabbar/cart/cartList.vue b/pages/tabbar/cart/cartList.vue
index c6e1e61..f1dfa7f 100644
--- a/pages/tabbar/cart/cartList.vue
+++ b/pages/tabbar/cart/cartList.vue
@@ -6,7 +6,7 @@
</div>
</u-navbar>
<!-- 绌虹櫧椤�-->
- <view v-if="!loading && (cartDetail.cartList == '' || cartDetail.cartList == [] || !cartDetail)" class="empty">
+ <view v-if="!loading && (cartDetail.cartList == '' || cartDetail.cartList == [] || !cartDetail)" class="empty" :style="{height: windowHeight - marginBottom - 50 + 'px'}">
<image src="/static/emptyCart.png" mode="aspectFit"></image>
<view class="empty-tips">
绌虹┖濡備篃
@@ -14,7 +14,7 @@
</view>
</view>
<!-- 搴楅摵鍟嗗搧淇℃伅 -->
- <div class="content">
+ <div class="content" :style="{height: windowHeight - marginBottom - 50 + 'px'}">
<div class="box box2" :class="{ invalid: isInvalid(item) }" v-for="(item, index) in cartDetail.cartList"
:key="index">
<view class="tab">
@@ -126,7 +126,7 @@
<u-modal v-model="deleteShow" :confirm-style="{'color':lightColor}" @confirm="deleteConfirm" show-cancel-button
:content="deleteContent" :async-close="true"></u-modal>
<!-- 缁撹处 -->
- <div class="box box6">
+ <div class="box box6" :style="{bottom: marginBottom + 50 + 'px'}">
<view class="navL">
<u-checkbox shape="circle" :active-color="lightColor" v-model="checkout" @change="checkOut()" label-size="24">鍏ㄩ��
</u-checkbox>
@@ -219,10 +219,14 @@
isEdit: false, // 鏄惁鏄紪杈�
checkout: false, //鍏ㄩ�夋寜閽�
WEIXIN_num: "", //璐墿杞﹀吋瀹瑰井淇℃杩涘櫒
+ marginBottom: 0 ,// 搴曢儴瀹夊叏鍖哄煙
+ windowHeight: 0 // 鍙娇鐢ㄥ睆骞曢珮搴�
};
},
mounted() {
+ this.marginBottom = uni.getSystemInfoSync().safeAreaInsets.bottom
+ this.windowHeight = uni.getSystemInfoSync().windowHeight
// #ifdef MP-WEIXIN
// 灏忕▼搴忛粯璁ゅ垎浜�
uni.showShareMenu({ withShareTicket: true });
diff --git a/pages/tabbar/index/home.vue b/pages/tabbar/index/home.vue
index 4f3b20f..078a1bb 100644
--- a/pages/tabbar/index/home.vue
+++ b/pages/tabbar/index/home.vue
@@ -53,6 +53,7 @@
@touchstart.stop="handleTouchStart"
@touchmove.stop="handleTouchMove"
@touchend.stop="handleTouchEnd"
+ :style="{bottom: marginBottom + 'px'}"
class="container">
<!-- 杩涘害鏉� - 鏁翠釜鍖哄煙鍙嫋鍔� -->
<view class="process-warp" :style="{ opacity: showProcess ? 1 : 0 }">
@@ -118,7 +119,7 @@
<!-- 瑙嗛淇℃伅灞� -->
- <view class="video-info">
+ <view class="video-info" :style="{bottom: marginBottom + 20 + 'px'}">
<view>
<text class="video-author">@{{item.authorName}}</text>
</view>
@@ -326,7 +327,8 @@
pageNumber: 1,
pageSize: 10,
videoFrom: 'recommend'
- }
+ },
+ marginBottom: 0 // 搴曢儴瀹夊叏鍖哄煙
}
},
onShow() {
@@ -348,6 +350,7 @@
this.startHidenTime = Date.now()
},
onLoad(option) {
+ this.marginBottom = uni.getSystemInfoSync().safeAreaInsets.bottom
const token = storage.getAccessToken();
if (! token) {
this.wxSilentLogin(() => {
diff --git a/pages/tabbar/user/utils/tool.vue b/pages/tabbar/user/utils/tool.vue
index 2849927..c7567f9 100644
--- a/pages/tabbar/user/utils/tool.vue
+++ b/pages/tabbar/user/utils/tool.vue
@@ -52,11 +52,6 @@
<view>鎴戠殑娲诲姩</view>
</view>
- <view class="interact-item" @click="navigateTo('/pages/mine/activity/reportActivity')">
- <image src="/static/mine/shensu.png" mode=""></image>
- <view>娲诲姩</view>
- </view>
-
<view class="interact-item" @click="navigateTo('/pages/mine/myCollect/myCollect')">
<image src="/static/mine/shensu.png" mode=""></image>
<view>鎴戠殑鏀惰棌</view>
@@ -88,10 +83,10 @@
- <view class="interact-item" @click="navigateTo('/pages/mine/signIn')">
+<!-- <view class="interact-item" @click="navigateTo('/pages/mine/signIn')">
<image src="/static/mine/sign.png" mode=""></image>
<view>姣忔棩绛惧埌</view>
- </view>
+ </view> -->
<view class="interact-item" @click="navigateTo('/pages/cart/coupon/couponCenter')">
<image src="/static/mine/couponcenter.png" mode=""></image>
@@ -100,10 +95,10 @@
- <view class="interact-item" @click="navigateTo('/pages/promotion/bargain/log')">
+<!-- <view class="interact-item" @click="navigateTo('/pages/promotion/bargain/log')">
<image src="/static/mine/kanjia.png" mode=""></image>
<view>鐮嶄环璁板綍</view>
- </view>
+ </view> -->
diff --git a/pages/video/video-play.vue b/pages/video/video-play.vue
index a1eb904..157db00 100644
--- a/pages/video/video-play.vue
+++ b/pages/video/video-play.vue
@@ -18,7 +18,7 @@
@touchmove="handleSwiperMove"
@touchend="handleSwiperEnd(item)"
>
- <view style="width: 100%;height: 100%;" v-if="item.videoContentType === 'video'">
+ <view :style="{width: '100%', height: windowHeight - marginBottom + 'px'}" v-if="item.videoContentType === 'video'">
<!-- 鎾斁鎸夐挳锛堜粎褰撹棰戞殏鍋滄椂鏄剧ず锛� -->
<view
class="play-icon"
@@ -319,7 +319,9 @@
pageSize: 10,
authorId: '',
videoFrom: ''
- }
+ },
+ marginBottom: 0, // 搴曢儴瀹夊叏鍖哄煙
+ windowHeight: 0 // 鍙娇鐢ㄥ睆骞曢珮搴�
}
},
onShow() {
@@ -340,6 +342,8 @@
},
onLoad(option) {
+ this.marginBottom = uni.getSystemInfoSync().safeAreaInsets.bottom
+ this.windowHeight = uni.getSystemInfoSync().windowHeight
const playInfo = uni.getStorageSync("playInfo", playInfo);
if(playInfo) {
this.currentIndex = playInfo.playIndex;
@@ -951,7 +955,7 @@
.video-info {
width: 70%;
position: absolute;
- bottom: 20px;
+ bottom: 40px;
left: 20px;
color: #f8f8f8;
z-index: 10;
@@ -1294,7 +1298,7 @@
flex-direction: column;
align-items: center;
position: absolute;
- bottom: 0;
+ bottom: 20px;
width: 100%;
}
--
Gitblit v1.8.0