| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269 |
- <template>
- <view class="content">
- <view class="tab-menu">
- <view :class="orderState==0?'tab-item active':'tab-item'" @click="orderStatus(0)">全部</view>
- <view :class="orderState==1?'tab-item active':'tab-item'" @click="orderStatus(1)">待使用</view>
- <view :class="orderState==2?'tab-item active':'tab-item'" @click="orderStatus(2)">已完成</view>
- <view :class="orderState==3?'tab-item active':'tab-item'" @click="orderStatus(3)">已退款</view>
- <view :class="orderState==6?'tab-item active':'tab-item'" @click="orderStatus(6)">已关闭</view>
- </view>
- <scroll-view class="order-body" scroll-y scroll-with-animation>
- <view class="order-list">
- <view class="order-item" v-for="(item,indx) in 10" :key="indx">
- <view class="item-header">
- <view class="item-store">
- <image src="/static/image/store.svg"></image>
- <text>桃奢妍奥莱城</text>
- </view>
- <view class="item-status success">已完成</view>
- </view>
- <view class="item-goods">
- <view class="image">
- <image src="https://washmy.oss-cn-guangzhou.aliyuncs.com/storage/20260727/2e9fd491e2def96b0dd0677f43d7a31913cf959e.png"></image>
- </view>
- <view class="info">
- <view class="title">
- <view class="name">赫莲娜/HR黑绷带50ml小露珠200ml两件套 线下兑换券</view>
- <view class="num">x1</view>
- </view>
- <view class="tags">
- 默认
- <view class="price">¥199.90</view>
- </view>
- </view>
- </view>
- <view class="item-time">
- <view class="time-list">订单编号:XM20260811082315</view>
- <view class="time-list">下单时间:2026-08-11 08:23</view>
- </view>
- <view class="item-footer">
- <view class="footer-left">实付 <text>¥199.90</text></view>
- <view class="footer-group-btn">
- <view :class="indx%2==0?'button border':'button warn'">继续支付</view>
- <view class="button fail">申请退款</view>
- </view>
- </view>
- </view>
- </view>
- </scroll-view>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- orderState:0
- }
- },
- methods: {
- orderStatus(state) {
- this.orderState = state
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .content{
- position: fixed;
- z-index: 1;
- top: 0;
- left: 0;
- bottom: 0;
- right: 0;
- background-color: #ededed;
- display: flex;
- flex-direction: column;
- }
- .tab-menu{
- height: 80rpx;
- line-height: 80rpx;
- background-color: #fff;
- display: flex;
- align-items: center;
- font-size: 28rpx;
- color: #666;
- justify-content: space-around;
- .tab-item{
- position: relative;
- color: $main-text-color;
- &.active{
- color: $main-color;
- font-weight: 700;
- &::after{
- position: absolute;
- content: "";
- width: 30%;
- left: 35%;
- height: 4rpx;
- bottom: 0;
- background-color: $main-color;
- }
- }
- }
- }
- .order-body{
- height: 0;
- flex: 1;
- .order-list{
- .order-item{
- width: 95%;
- margin: 0 auto;
- background-color: #fff;
- padding: 20rpx;
- margin-top: 20rpx;
- border-radius: 10rpx;
- .item-footer{
- display: flex;
- align-items: center;
- justify-content: space-between;
- color: $main-text-color;
- font-size: 28rpx;
- .footer-left{
- text {
- font-size: 30rpx;
- font-weight: bold;
- color: $main-color;
- }
- }
- .footer-group-btn{
- display: flex;
- align-items: center;
- gap: 20rpx;
- .button{
- font-size: 24rpx;
- padding: 10rpx 20rpx;
- border-radius: 40rpx;
- display: flex;
- align-items: center;
- &.border{
- background-color: #fff;
- border: 2rpx solid #fed7aa;
- color: #f26428;
- }
- &.success{
- background-color: #d1fae5;
- color: #059669;
- }
- &.fail{
- background-color: #f1f5f9;
- color: #64748b;
- }
- &.danger{
- background-color: #fef3c7;
- color: #b45309;
- }
- &.warn{
- background-color: #fef3c7;
- color: #b45309;
- }
- }
- }
- }
- .item-time{
- background-color: #fff8f1;
- border-radius: 10rpx;
- margin: 20rpx 0;
- padding: 20rpx;
- .time-list{
- line-height: 48rpx;
- font-size: 24rpx;
- color: #64748b;
- }
- }
- .item-goods{
- display: flex;
- align-items: center;
- gap: 20rpx;
- background-color: #fff;
- margin-top: 20rpx;
- border-radius: 20rpx;
- .stock{
- text-align: right;
- }
- .image {
- height: 180rpx;
- overflow: hidden;display: flex;align-items: center;min-width: 180rpx;
- position: relative;
- image {
- width: 180rpx;
- border-radius: 10upx;
- height: 100%;
- }
- }
- .info{
- flex: 1 1 0%;
- overflow: hidden;
- .title{
- display: flex;
- align-items: center;
- justify-content: space-between;
- .name {
- overflow: hidden;
- text-overflow: ellipsis;
- font-size: 32rpx;
- display: -webkit-box;
- -webkit-line-clamp: 2;
- -webkit-box-orient: vertical;
- color: #333;
- font-weight: 900;
- }
- }
- .tags {
- color: #94a3b8;
- font-size: 24rpx;
- margin: 10rpx 0;
- display: flex;
- align-items: center;
- justify-content: space-between;
- .price {
- font-size: 28rpx;
- color: $main-text-color;
- font-weight: 600;
- }
- }
- }
- }
- .item-header{
- display: flex;
- align-items: center;
- justify-content: space-between;
- border-bottom: 2rpx solid #fff7ed;
- padding-bottom: 10rpx;
- .item-status{
- font-size: 24rpx;
- padding: 10rpx 20rpx;
- border-radius: 30rpx;
- &.success{
- background-color: #d1fae5;
- color: #059669;
- }
- &.fail{
- background-color: #f1f5f9;
- color: #64748b;
- }
- &.danger{
- background-color: #fef3c7;
- color: #b45309;
- }
- &.warn{
- background-color: #fef3c7;
- color: #b45309;
- }
- }
- .item-store{
- display: flex;
- align-items: center;
- gap: 15rpx;
- image {
- width: 40rpx;
- height: 40rpx;
- }
- }
- }
- }
- }
- }
- </style>
|