浏览代码

fix:所有tabs采用Uview写法

jinchaoyu 1 年之前
父节点
当前提交
6d706c6ec1

+ 7 - 1
App.vue

@@ -436,7 +436,13 @@ page {
 	height: 100vh;
 }
 
-::v-deep .u-tabs__wrapper__nav__item {
+::v-deep .index_tabs  .u-tabs__wrapper__nav__item {
 	flex: 1 !important;
 }
+
+::v-deep .u-tabs__wrapper__nav{
+
+	/* align-content: center;
+	align-items: center; */
+}
 </style>

+ 28 - 24
pages/goods/leader_order_list/index.vue

@@ -1,32 +1,14 @@
 <template>
 	<view :style="colorStyle">
 		<view class="my-order">
-			<view class="nav acea-row row-around">
-				<view class="item" :class="orderStatus == 0 ? 'on' : ''" @click="statusClick(0)">
-					<view>{{ $t(`全部`) }}</view>
-					<!-- <view class="num">{{ orderData.evaluated_count || 0 }}</view> -->
-				</view>
-				<view class="item" :class="orderStatus == 1 ? 'on' : ''" @click="statusClick(1)">
-					<view>{{ $t(`待付款`) }}</view>
-					<!-- <view class="num">{{ orderData.unpaid_count || 0 }}</view> -->
-				</view>
-				<view class="item" :class="orderStatus == 2 ? 'on' : ''" @click="statusClick(2)">
-					<view>{{ $t(`待发货`) }}</view>
-					<!-- <view class="num">{{ orderData.unshipped_count || 0 }}</view> -->
-				</view>
-				<view class="item" :class="orderStatus == 3 ? 'on' : ''" @click="statusClick(3)">
-					<view>{{ $t(`待收货`) }}</view>
-					<!-- <view class="num ">{{ orderData.received_count || 0 }}</view> -->
-				</view>
-				<!-- <view class="item" :class="orderStatus == 3 ? 'on' : ''" @click="statusClick(3)">
-					<view>{{$t(`待评价`)}}</view>
-					<view class="num">{{ orderData.evaluated_count || 0 }}</view>
-				</view> -->
-				<view class="item" :class="orderStatus == 4 ? 'on' : ''" @click="statusClick(4)">
-					<view>{{ $t(`已完成`) }}</view>
-					<!-- <view class="num">{{ orderData.complete_count || 0 }}</view> -->
+			<view class="header-group" style="padding-left: 20rpx;" >
+				<view class="tabs">
+					<u-tabs  :is-scroll="true" :list="navigationList" @change="statusClick()" lineColor="#B22338"
+						:inactiveStyle="{ color: '#999999' }" :activeStyle="{ color: '#B22338', fontWeight: 'bold' }" 
+						keyName="title"></u-tabs>
 				</view>
 			</view>
+
 			<view class="list" @click="goOrderDetails()">
 				<view class="myclient_list">
 					<view class="myclient_list_name">
@@ -123,6 +105,28 @@ export default {
 	mixins: [colors],
 	data () {
 		return {
+			navigationList: [{
+				title: '全部',
+				id: 0
+			}
+			, 
+			{
+				title: '待收货',
+				id: 1
+			},
+			{
+				title: '待提货',
+				id: 2
+			},
+			{
+				title: '已完成',
+				id: 3
+			},
+			{
+				title: '售后',
+				id: 4
+			},
+		],
 			loading: false, //是否加载中
 			loadend: false, //是否加载完毕
 			loadTitle: this.$t(`加载更多`), //提示语

+ 23 - 16
pages/groupbuying/arrival_verification_list/index.vue

@@ -1,22 +1,11 @@
 <template>
 	<view :style="colorStyle">
 		<view class="my-order">
-			<view class="nav acea-row row-around">
-				<view class="item" :class="orderStatus == 0 ? 'on' : ''" @click="statusClick(0)">
-					<view>全部</view>
-					<!-- <view class="num">{{ orderData.evaluated_count || 0 }}</view> -->
-				</view>
-				<view class="item" :class="orderStatus == 1 ? 'on' : ''" @click="statusClick(1)">
-					<view>待发货</view>
-					<!-- <view class="num">{{ orderData.unpaid_count || 0 }}</view> -->
-				</view>
-				<view class="item" :class="orderStatus == 2 ? 'on' : ''" @click="statusClick(2)">
-					<view>已发货</view>
-					<!-- <view class="num">{{ orderData.unshipped_count || 0 }}</view> -->
-				</view>
-				<view class="item" :class="orderStatus == 3 ? 'on' : ''" @click="statusClick(3)">
-					<view>已完成</view>
-					<!-- <view class="num ">{{ orderData.received_count || 0 }}</view> -->
+			<view class="header-group">
+				<view class="tabs index_tabs">
+					<u-tabs  :is-scroll="true" :list="navigationList" @change="statusClick()" lineColor="#B22338"
+						:inactiveStyle="{ color: '#999999' }" :activeStyle="{ color: '#B22338', fontWeight: 'bold' }" 
+						keyName="title"></u-tabs>
 				</view>
 			</view>
 			<view class="list" @click="goOrderDetails()">
@@ -247,6 +236,24 @@ export default {
 	mixins: [colors],
 	data () {
 		return {
+			navigationList: [{
+				title: '全部',
+				id: 0
+			}
+			, 
+			{
+				title: '待发货',
+				id: 1
+			},
+			{
+				title: '已发货',
+				id: 2
+			},
+			{
+				title: '已完成',
+				id: 3
+			}
+		],
 			loading: false, //是否加载中
 			loadend: false, //是否加载完毕
 			loadTitle: this.$t(`加载更多`), //提示语

+ 28 - 24
pages/groupbuying/groupbuying_order_list/index.vue

@@ -1,32 +1,14 @@
 <template>
 	<view :style="colorStyle">
 		<view class="my-order">
-			<view class="nav acea-row row-around">
-				<view class="item" :class="orderStatus == 0 ? 'on' : ''" @click="statusClick(0)">
-					<view>{{ $t(`全部`) }}</view>
-					<!-- <view class="num">{{ orderData.evaluated_count || 0 }}</view> -->
-				</view>
-				<view class="item" :class="orderStatus == 1 ? 'on' : ''" @click="statusClick(1)">
-					<view>申请中</view>
-					<!-- <view class="num">{{ orderData.unpaid_count || 0 }}</view> -->
-				</view>
-				<view class="item" :class="orderStatus == 2 ? 'on' : ''" @click="statusClick(2)">
-					<view>发布中</view>
-					<!-- <view class="num">{{ orderData.unshipped_count || 0 }}</view> -->
-				</view>
-				<view class="item" :class="orderStatus == 3 ? 'on' : ''" @click="statusClick(3)">
-					<view>已拒绝</view>
-					<!-- <view class="num ">{{ orderData.received_count || 0 }}</view> -->
-				</view>
-				<!-- <view class="item" :class="orderStatus == 3 ? 'on' : ''" @click="statusClick(3)">
-					<view>{{$t(`待评价`)}}</view>
-					<view class="num">{{ orderData.evaluated_count || 0 }}</view>
-				</view> -->
-				<view class="item" :class="orderStatus == 4 ? 'on' : ''" @click="statusClick(4)">
-					<view>已结束</view>
-					<!-- <view class="num">{{ orderData.complete_count || 0 }}</view> -->
+			<view class="header-group">
+				<view class="tabs">
+					<u-tabs  :is-scroll="true" :list="navigationList" @change="statusClick()" lineColor="#B22338"
+						:inactiveStyle="{ color: '#999999' }" :activeStyle="{ color: '#B22338', fontWeight: 'bold' }" 
+						keyName="title"></u-tabs>
 				</view>
 			</view>
+
 			<view class="list" @click="goOrderDetails()">
 				<view class="myclient_list">
 					<view class="myclient_list_name">
@@ -221,6 +203,28 @@ export default {
 	mixins: [colors],
 	data () {
 		return {
+			navigationList: [{
+				title: '全部',
+				id: 0
+			}
+			, 
+			{
+				title: '申请中',
+				id: 1
+			},
+			{
+				title: '发布中',
+				id: 2
+			},
+			{
+				title: '已拒绝',
+				id: 3
+			},
+			{
+				title: '已结束',
+				id: 4
+			},
+		],
 			loading: false, //是否加载中
 			loadend: false, //是否加载完毕
 			loadTitle: this.$t(`加载更多`), //提示语

+ 1 - 1
pages/index/diy/index_mall.vue

@@ -39,7 +39,7 @@
 			</view>
 
 			<view class="header-group">
-				<view class="tabs">
+				<view class="tabs index_tabs">
 					<u-tabs class="defalt-utabs" :is-scroll="false" :list="navigationList" @click="clickNav" lineColor="#B22338"
 						:inactiveStyle="{ color: '#999999' }" :activeStyle="{ color: '#B22338', fontWeight: 'bold' }"
 						keyName="title"></u-tabs>

+ 28 - 24
pages/order/index.vue

@@ -11,30 +11,11 @@
 			<!-- #endif -->
 		</view>
 		<view class="my-order">
-			<view class="nav acea-row row-around">
-				<view class="item" :class="orderStatus == 0 ? 'on' : ''" @click="statusClick(0)">
-					<view>全部</view>
-					<!-- <view class="num">{{ orderData.evaluated_count || 0 }}</view> -->
-				</view>
-				<view class="item" :class="orderStatus == 1 ? 'on' : ''" @click="statusClick(1)">
-					<view>待付款</view>
-					<!-- <view class="num">{{ orderData.unpaid_count || 0 }}</view> -->
-				</view>
-				<view class="item" :class="orderStatus == 2 ? 'on' : ''" @click="statusClick(2)">
-					<view>待提货</view>
-					<!-- <view class="num">{{ orderData.unshipped_count || 0 }}</view> -->
-				</view>
-				<view class="item" :class="orderStatus == 3 ? 'on' : ''" @click="statusClick(3)">
-					<view>已完成</view>
-					<!-- <view class="num ">{{ orderData.received_count || 0 }}</view> -->
-				</view>
-				<!-- <view class="item" :class="orderStatus == 3 ? 'on' : ''" @click="statusClick(3)">
-					<view>{{$t(`待评价`)}}</view>
-					<view class="num">{{ orderData.evaluated_count || 0 }}</view>
-				</view> -->
-				<view class="item" :class="orderStatus == 4 ? 'on' : ''" @click="statusClick(4)">
-					<view>售后</view>
-					<!-- <view class="num">{{ orderData.complete_count || 0 }}</view> -->
+			<view class="header-group" style="padding-left: 20rpx;" >
+				<view class="tabs">
+					<u-tabs  :is-scroll="true" :list="navigationList" @change="statusClick()" lineColor="#B22338"
+						:inactiveStyle="{ color: '#999999' }" :activeStyle="{ color: '#B22338', fontWeight: 'bold' }" 
+						keyName="title"></u-tabs>
 				</view>
 			</view>
 			<view class="list" @click="goOrderDetails()">
@@ -271,6 +252,28 @@ export default {
 	mixins: [colors],
 	data () {
 		return {
+			navigationList: [{
+				title: '全部',
+				id: 0
+			}
+			, 
+			{
+				title: '待付款',
+				id: 1
+			},
+			{
+				title: '待提货',
+				id: 2
+			},
+			{
+				title: '已完成',
+				id: 3
+			},
+			{
+				title: '售后',
+				id: 4
+			},
+		],
 			pageHeight: app.globalData.windowHeight,
 			sysHeight: sysHeight,
 			loading: false, //是否加载中
@@ -560,6 +563,7 @@ export default {
 		 * 切换类型
 		 */
 		statusClick: function (status) {
+			console.log(status);
 			if (status == this.orderStatus) return;
 			this.orderStatus = status;
 			this.loadend = false;

+ 5 - 11
pages/user/index.vue

@@ -301,17 +301,16 @@
 					</view>
 
 
-					<view class="order-wrapper" :class="userInfo.svip_open ? '' : 'height'">
+					<view class="order-wrapper height" >
 						<view class="order-bd">
 							<block v-for="(item, index) in orderMenuOrigin" :key="index">
-								<navigator class="order-item" hover-class="none" @click="goRouter(item)">
+								<view class="order-item" hover-class="none" @click="goRouter(item)">
 									<view class="pic">
 										<!-- <image :src="item.img" mode=""></image> -->
 										<text class="iconfont" :class="item.img"></text>
-										<text class="order-status-num" v-if="item.num > 0">{{ item.num }}</text>
 									</view>
-									<view class="txt">{{ $t(item.title) }}</view>
-								</navigator>
+									<view class="txt">{{ item.title}}</view>
+								</view>
 							</block>
 						</view>
 					</view>
@@ -464,14 +463,9 @@ export default {
 			},
 			{
 				img: 'icon-daifahuo',
-				title: '待货',
+				title: '待货',
 				url: '/pages/order/index?status=2'
 			},
-			{
-				img: 'icon-daishouhuo',
-				title: '待收货',
-				url: '/pages/order/index?status=3'
-			},
 			{
 				img: 'icon-daipingjia',
 				title: '已完成',