orderCenter.vue 3.1 KB
<template>
	<view class="mainBox">
		<!-- tabber栏 -->
		<view class="tabberBox flexJ">
			<view class="flexC" v-for="(item,index) in List1" :class="curIdx == index?'whole':'tobePaid'"
				@click="clickone(index)">
				{{item.name}}
			</view>
		</view>
		<!-- 商品盒子 -->
		<view class="commodityBox" v-for="item in 4" @click="toGoodsDetailHandler">
			<!-- 订单号 -->
			<view class="dingdanhao flexJ">
				<view class="">订单号:32423432432423</view>
				<img src="/static/Rectangle 2374@2x.png" alt="" style="width: 168rpx; height: 80rpx;">
				<view class="text">
					待支付</view>
			</view>
			<view class="line"></view>
			<view class="shangping flexJ">
				<!-- 左边商品图 -->
				<view class="leftoneBox ">
					<img src="/static/ic-tabbar-home-s@2x.png" alt="">
				</view>
				<!-- 右边简介 -->
				<view class="rightoneBox">
					<view class="">乐事薯片美国经典原味135g</view>
					<view class="one">规格规格规格规格规格规格</view>
					<view class="flexJ">
						<view class="flexC">¥288.8</view>
						<view class="two">x3</view>
					</view>
				</view>
			</view>
			<view class="flexJ">
				<view class=""></view>
				<view class="lijizhifu flexC">立即支付</view>
			</view>
		</view>
		<view class="" style="height:100rpx;">
			
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				curIdx: 0,
				List1: [{
						status: true,
						name: '全部'
					},
					{
						status: false,
						name: '待支付'
					},
					{
						status: false,
						name: '待自提'
					},
					{
						status: false,
						name: '已完成'
					},
				],
			}
		},
		methods: {
			clickone(index) {
				this.curIdx = index
			},
			toGoodsDetailHandler(){
				uni.navigateTo({
					url:'/pages/car/goodsState'
				})
			}
		},
	}
</script>

<style lang="scss">
	page {
		background-color: #f6f6f6;
	}

	.mainBox {
		width: 686rpx;
		margin: 0 auto;
	}

	.tabberBox {
		margin-top: 20rpx;
		width: 686rpx;
		height: 64rpx;
		border-radius: 200rpx;
		opacity: 1;
		background: rgba(47, 159, 97, 1);
	}

	.whole {
		color: rgba(47, 159, 97, 1);
		width: 168rpx;
		height: 56rpx;
		border-radius: 200rpx;
		background: rgba(255, 255, 255, 1);
	}

	.tobePaid {
		color: #fff;
		width: 168rpx;
		height: 56rpx;
		border-radius: 200rpx;
	}

	.commodityBox {
		margin-top: 24rpx;
		padding: 0 32rpx 32rpx 32rpx;
		box-sizing: border-box;
		background-color: #fff;
		
	}

	.leftoneBox {
		img {
			width: 155rpx;
			height: 155rpx;
		}
	}

	.rightoneBox {
		margin-left: 16rpx;
	}

	.one {
		padding: 25rpx 0 20rpx 0;
		color: rgba(0, 0, 0, 0.26);
		font-size: 24rpx;
		font-weight: 400;
	}

	.two {
		color: rgba(0, 0, 0, 0.26);
		font-size: 24rpx;
		font-weight: 400;
	}

	.line {
		width: 622rpx;
		height: 1rpx;
		background: rgba(235, 237, 240, 1);
	}
	.dingdanhao {
		position: relative;
		padding: 24rpx 0;
		.text {
			position: absolute;
			right: 0;
		}
	}
	.shangping {
		padding: 24rpx 0 12rpx 0;
	}
	.lijizhifu {
		color: #fff;
		width: 168rpx;
		height: 64rpx;
		border-radius: 8rpx;
		opacity: 1;
		border: 1rpx solid #fff;
		background: rgba(52,177,107,1);
	}
</style>