xuqiaoying 3 年 前
コミット
751ff4c525

+ 5 - 3
components/u-tabbar/u-tabbar.vue

@@ -238,14 +238,16 @@
 	}
 
 	.u-tabbar {
-
+		height: 100rpx;
 		&__content {
 			@include vue-flex;
 			align-items: center;
 			position: relative;
 			position: fixed;
-			bottom: 0;
-			left: 0;
+			// bottom: 0;
+			// left: 0;
+			bottom: 0rpx;
+			left: 0rpx;
 			width: 100%;
 			z-index: 998;
 			/* #ifndef APP-NVUE */

+ 10 - 10
pages.json

@@ -1032,32 +1032,32 @@
 		"backgroundColor": "#fff",
 		"list": [{
 				"pagePath": "pages/index/index",
-				// "iconPath": "static/nav1.png",
-				// "selectedIconPath": "static/nav1_on.png",
+				"iconPath": "static/nav1.png",
+				"selectedIconPath": "static/nav1_on.png",
 				"text": "首页"
 			},
 			{
 				"pagePath": "pages/course/index",
-				// "iconPath": "static/nav2.png",
-				// "selectedIconPath": "static/nav2_on.png",
+				"iconPath": "static/nav2.png",
+				"selectedIconPath": "static/nav2_on.png",
 				"text": "选课"
 			},
             {
 				"pagePath": "pages/learn/index",
-				// "iconPath": "static/nav6.png",
-				// "selectedIconPath": "static/nav6_on.png",
+				"iconPath": "static/nav6.png",
+				"selectedIconPath": "static/nav6_on.png",
 				"text": "学习"
 			},
 			{
 				"pagePath": "pages/shopping/shoppingCart",
-				// "iconPath": "static/nav3.png",
-				// "selectedIconPath": "static/nav3_on.png",
+				"iconPath": "static/nav3.png",
+				"selectedIconPath": "static/nav3_on.png",
 				"text": "购物车"
 			},
 			{
 				"pagePath": "pages/wd/index",
-				// "iconPath": "static/nav5.png",
-				// "selectedIconPath": "static/nav5_on.png",
+				"iconPath": "static/nav5.png",
+				"selectedIconPath": "static/nav5_on.png",
 				"text": "我的"
 			}
 		]

+ 3 - 3
pages/course/index.vue

@@ -137,16 +137,16 @@
 			</view>
 		</view>
 
-		<tab-bar v-model="current" :list="tabbarlist" :mid-button="true" :mid-button-size="50" class="tab_items"></tab-bar>
+		<!-- <tab-bar v-model="current" :list="tabbarlist" :mid-button="true" :mid-button-size="50" class="tab_items"></tab-bar> -->
 	</view>
 </template>
 
 <script>
-import TabBar from '@/components/u-tabbar/u-tabbar.vue';
+// import TabBar from '@/components/u-tabbar/u-tabbar.vue';
 import { mapGetters } from 'vuex';
 export default {
 	components: {
-		TabBar
+		// TabBar
 	},
 	data() {
 		return {

+ 4 - 3
pages/index/index.vue

@@ -181,16 +181,17 @@
 			</view>
 		</view>
 
-		<tab-bar v-model="current" :list="tabbarlist" :mid-button="true" :mid-button-size="50" class="tab_items"></tab-bar>
+		<!-- <tab-bar v-model="current" :list="tabbarlist" :mid-button="true" :mid-button-size="50" class="tab_items"></tab-bar> -->
+
 	</view>
 </template>
 
 <script>
 import { mapGetters, mapActions } from 'vuex';
 import { socket_url, version} from '@/common/request.js';
-import TabBar from '@/components/u-tabbar/u-tabbar.vue';
+// import TabBar from '@/components/u-tabbar/u-tabbar.vue';
 export default {
-	components: { TabBar },
+	// components: { TabBar },
 	data() {
 		return {
 			tabNum: 0,

+ 3 - 3
pages/learn/index.vue

@@ -430,7 +430,7 @@
 			</view>
 		</u-modal>
 
-		<tab-bar v-model="current" :list="tabbarlist" :mid-button="true" :mid-button-size="50" class="tab_items"></tab-bar>
+		<!-- <tab-bar v-model="current" :list="tabbarlist" :mid-button="true" :mid-button-size="50" class="tab_items"></tab-bar> -->
     </view>
 </template>
 
@@ -438,9 +438,9 @@
 var curTime = new Date().getTime() // 当前时间的时间戳
 import {mapGetters,mapActions} from 'vuex'
 import { WEBVIEW_URL } from '@/common/request.js'
-import TabBar from '@/components/u-tabbar/u-tabbar.vue';
+// import TabBar from '@/components/u-tabbar/u-tabbar.vue';
 export default {
-	components: { TabBar },
+	// components: { TabBar },
     data() {
         return {
 			leftDays: 0,

+ 59 - 23
pages/shopping/shoppingCart.vue

@@ -59,25 +59,7 @@
 						</u-checkbox-group>
 					</uni-swipe-action>
 				</view>
-				<view class="bottomBox" v-if="!hideBuyState">
-					<view class="bottons_all">
-						<view class="check_alls">
-							<u-checkbox label="all" name="all" shape="circle" @change="checkboxAllChange" v-model="allChecked"></u-checkbox>
-							<text class="checkall">全选</text>
-							<!-- <text class="rmb">¥</text> -->
-							<view class="all_sum">结算:</view>
-							<view class="priceTag">¥ {{ toFixed(totalPrice) }}</view>
-						</view>
-						<view style="display: flex;align-items: center;">
-							<!-- <view style="color: #999999;margin-right: 8rpx;">合计</view> -->
-							<view style="display: flex;color: #FFFFFF;align-items: center;" @click="goBuy()">
-								<view class="btn2">结算</view>
-								<!-- <u-icon name="arrow-right" color="#fff" size="30"></u-icon> -->
-							</view>
-						</view>
-					</view>
-					
-				</view>
+				
 			</view>
 			<u-popup v-model="show" mode="bottom" border-radius="40">
 				<view class="popup_box">
@@ -155,15 +137,37 @@
 			</view>
 		</view>
 
-		<tab-bar v-model="current" :list="tabbarlist" :mid-button="true" :mid-button-size="50" class="tab_items"></tab-bar>
+		<!-- <view class="half_circle">
+			<view class="bulge"></view>
+		</view> -->
+		<view class="bottomBox" v-if="!hideBuyState">
+			<view class="bottons_all">
+				<view class="check_alls">
+					<u-checkbox label="all" name="all" shape="circle" @change="checkboxAllChange" v-model="allChecked"></u-checkbox>
+					<text class="checkall">全选</text>
+					<!-- <text class="rmb">¥</text> -->
+					<view class="all_sum">结算:</view>
+					<view class="priceTag">¥ {{ toFixed(totalPrice) }}</view>
+				</view>
+				<view style="display: flex;align-items: center;">
+					<!-- <view style="color: #999999;margin-right: 8rpx;">合计</view> -->
+					<view style="display: flex;color: #FFFFFF;align-items: center;" @click="goBuy()">
+						<view class="btn2">结算</view>
+						<!-- <u-icon name="arrow-right" color="#fff" size="30"></u-icon> -->
+					</view>
+				</view>
+			</view>
+			
+		</view>
+		<!-- <tab-bar v-model="current" :list="tabbarlist" :mid-button="true" :mid-button-size="50" class="tab_items"></tab-bar> -->
 	</view>
 </template>
 
 <script>
 import { mapGetters } from 'vuex';
-import TabBar from '@/components/u-tabbar/u-tabbar.vue';
+// import TabBar from '@/components/u-tabbar/u-tabbar.vue';
 export default {
-	components: { TabBar },
+	// components: { TabBar },
 	data() {
 		return {
 			gradeValue: -1,
@@ -207,6 +211,22 @@ export default {
 				uni.removeStorageSync('updateCart'); //消费购物车刷新事件
 			}
 		}
+		let systemInfo = wx.getSystemInfoSync()
+		// px转换到rpx的比例
+		let pxToRpxScale = 750 / systemInfo.windowWidth;
+		// 状态栏的高度
+		let ktxStatusHeight = systemInfo.statusBarHeight * pxToRpxScale
+		// 导航栏的高度
+		let navigationHeight = 44 * pxToRpxScale
+		// window的宽度
+		let ktxWindowWidth = systemInfo.windowWidth * pxToRpxScale
+		// window的高度
+		let ktxWindowHeight = systemInfo.windowHeight * pxToRpxScale
+		// 屏幕的高度
+		let ktxScreentHeight = systemInfo.screenHeight * pxToRpxScale
+		// 底部tabBar的高度
+		let tabBarHeight = ktxScreentHeight - ktxStatusHeight - navigationHeight - ktxWindowHeight
+		console.log('tabBarHeighttabBarHeight:', tabBarHeight)
 	},
 	methods: {
 		toFixed(num) {
@@ -664,7 +684,7 @@ page {
 }
 .bottomBox {
 	position: fixed;
-	bottom: 170rpx;
+	bottom: 0rpx;
 	width: 100%;
 	left: 0;
 	height: 132rpx;
@@ -720,4 +740,20 @@ page {
 		font-size: 28rpx;
 	}
 }
+.half_circle {
+	position: fixed;
+	bottom: 0rpx;
+	width: 100%;
+	left: 0;
+	height: 20rpx;
+	border: 1rpx solid;
+	display: flex;
+    justify-content: center;
+	.bulge {
+		width: 110rpx;
+		height: 55rpx;
+		border-radius: 55px 55px 0px 0px;
+		background-color: #fff;
+	}
+}
 </style>

+ 3 - 3
pages/wd/index.vue

@@ -133,16 +133,16 @@
 			<view class="slot-wrap"><image src="/static/logo.png" style="width: 178rpx;height: 31rpx;margin-left: 30rpx;"></image></view>
 		</u-navbar> -->
 
-		<tab-bar v-model="current" :list="tabbarlist" :mid-button="true" :mid-button-size="50" class="tab_items"></tab-bar>
+		<!-- <tab-bar v-model="current" :list="tabbarlist" :mid-button="true" :mid-button-size="50" class="tab_items"></tab-bar> -->
 	</view>
 </template>
 
 <script>
 // import { websocket } from '@/common/socket.js';
 import { mapGetters } from 'vuex';
-import TabBar from '@/components/u-tabbar/u-tabbar.vue';
+// import TabBar from '@/components/u-tabbar/u-tabbar.vue';
 export default {
-	components: {TabBar},
+	// components: {TabBar},
 	data() {
 		return {
 			list: [23, 24, 25, 26, 27, 28, 29],