| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247 | <template>	<view class="default_page" :style="{'min-height':h+'px', 'padding-top':mt+'px'}">		<cus-header title='我的订单'></cus-header>		<view class="tab adfac">			<view class="tab-pre" :class="{'active':tindex===index}" @click="changeTab(item,index)"				v-for="(item,index) in statusList" :key="index">{{item}}</view>		</view>		<view class="list">			<view class="list-pre" v-for="(item,index) in list" :key="index" @click.prevent="handleDetail(item)">				<view class="list-pre-top adfacjb">					<view class="list-pre-top-no">订单号:{{item.no}}</view>					<view class="list-pre-top-status" :class="statusColor[item.status]">{{statusCfg[item.status]}}</view>				</view>				<view class="list-pre-info adf">					<view class="list-pre-info-left adfac">						<image class="list-pre-info-left-img" :src="imgBase+'order_img.png'"></image>						<view class="list-pre-info-left-texts">							<view class="list-pre-info-left-texts-num">{{typeCfg[item.type]}}{{item.sum}}次,剩余{{item.next}}次可用</view>							<view class="list-pre-info-left-texts-date">有效期至 {{item.date}}</view>						</view>					</view>					<view class="list-pre-info-right">¥{{item.price.toFixed(2)}}</view>				</view>				<view class="list-pre-btns adf">					<view class="list-pre-btns-pre cancel" v-if="item.status==0" @click.stop="orderCancel">取消订单</view>					<view class="list-pre-btns-pre" @click.stop="buyAgain">再次购买</view>				</view>			</view>		</view>	</view></template><script>	export default {		data(){			return {				tindex:0,				statusList:['全部','已支付','待支付','已取消'],				statusCfg:{					0:'待支付',					1:'已支付',					2:'已取消'				},				statusColor:{					0:'dzf',					1:'yzf',					2:'yqx'				},				typeCfg:{					1:'基础版',					2:'专业版'				},				list:[					{						no:'20229485872902',						status:1,						type:1,						sum:1,						next:1,						price:99,						date:'2025-11-11'					},					{						no:'20229485872902',						status:0,						type:2,						sum:5,						next:4,						price:199,						date:'2025-11-11'					},					{						no:'20229485872902',						status:2,						type:2,						sum:10,						next:0,						price:799,						date:'2025-11-11'					}				]			}		},		methods:{			changeTab(item,index){				this.tindex = index;			},			handleDetail(item){				uni.navigateTo({					url:'/pagesMy/orderDetail?item='+encodeURIComponent(JSON.stringify(item))				})			},			orderCancel(){			},			buyAgain(){			},		}	}</script><style scoped lang="scss">	.default_page{		padding: 0 24rpx 40rpx;		box-sizing: border-box;		background: #F7F7F7;				.tab{			position: fixed;			left: 0;			right: 0;			height: 90rpx;			background: #FFFFFF;			&-pre{				width: 25%;				height: 90rpx;				font-family: PingFangSC, PingFang SC;				font-weight: 400;				font-size: 28rpx;				color: #667E90;				line-height: 90rpx;				text-align: center;				position: relative;				&.active{					font-weight: bold;					font-size: 32rpx;					color: #002846;					&::after{						content: '';						width: 48rpx;						height: 6rpx;						background: linear-gradient( 90deg, #33A7A7 0%, #64BBBB 100%);;						border-radius: 5rpx;						position: absolute;						left: 50%;						margin-left: -24rpx;						bottom: 4rpx;					}				}			}		}				.list{			padding-top: 110rpx;			&-pre{				background: #FFFFFF;				border-radius: 25rpx;				margin-top: 20rpx;				padding: 36rpx 24rpx 29rpx;				&:first-child{					margin-top: 0;				}								&-top{					&-no{						font-family: PingFangSC, PingFang SC;						font-weight: 400;						font-size: 26rpx;						color: #667E90;						line-height: 30rpx;					}					&-status{						padding: 6rpx 13rpx;						border-radius: 6rpx;						font-family: PingFangSC, PingFang SC;						font-weight: 400;						font-size: 24rpx;						line-height: 30rpx;						&.yzf{							color: #33A7A7;							background: rgba(51,167,167,0.08);						}						&.dzf{							color: #FD4F66;							background: rgba(244,101,122,0.1);						}						&.yqx{							color: #667E90;							background: #F0F2F8;						}					}				}								&-info{					margin-top: 16rpx;					border-top: 1rpx solid #EFEFEF;					padding-top: 32rpx;					justify-content: space-between;					&-left{						&-img{							width: 64rpx;							height: 64rpx;						}						&-texts{							margin-left: 20rpx;							&-num{								font-family: PingFang-SC, PingFang-SC;								font-weight: bold;								font-size: 30rpx;								color: #002846;								line-height: 30rpx;							}							&-date{								font-family: PingFangSC, PingFang SC;								font-weight: 400;								font-size: 26rpx;								color: #667E90;								line-height: 30rpx;								margin-top: 20rpx;							}						}					}					&-right{						font-family: PingFang-SC, PingFang-SC;						font-weight: bold;						font-size: 30rpx;						color: #1D2129;						line-height: 30rpx;						text-align: right;					}				}								&-btns{					justify-content: flex-end;					margin-top: 30rpx;					&-pre{						background: linear-gradient( 90deg, #33A7A7 0%, #64BBBB 100%);;						border-radius: 27rpx;						border: 1rpx solid #33A7A7;						font-family: PingFangSC, PingFang SC;						font-weight: 400;						font-size: 24rpx;						color: #FFFFFF;						line-height: 30rpx;						padding: 12rpx 26rpx;						letter-spacing: 2rpx;						margin-left: 30rpx;						&.cancel{							background: #FFFFFF;							border: 1rpx solid #E2E2E2;							color: #95A5B1;						}					}				}			}		}	}</style>
 |