Blame view
src/pages/myOrder/orderCard.vue
5.06 KB
46e5b6c99 add myOrder |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
<template> <view> <view class="card" v-if="current === order.orderType" > <view class="cardHeader"> <text class="orderId">订单号:{{order.orderId}}</text> <text class="orderType" v-if="order.orderType===1">待付款</text> <text class="orderType" v-if="order.orderType===2">待发货</text> <text class="orderType" v-if="order.orderType === 3">待收货</text> <text class="orderType" v-if="order.orderType === 4">退款售后</text> <text class="orderType" v-if="order.orderType === 5">已完成</text> </view> <view class="orderCardInfo"> <image :src="order.img" mode="aspectFill"></image> <view class="infoText"> <view class="orderName">{{order.name}}</view> <view class="orderDescrib">规格:玫瑰金 / 钛合金 / 防日光防紫外线</view> <view class="infoText-bottom"> <view class="markPrice">{{order.price}}</view> <view class="buy-num">X{{order.buyNum}}</view> </view> </view> </view> <view class="payPrice">实付:<text class="priceNum">{{order.price}}</text> </view> <view class="btns" v-if="order.orderType === 1"> <view class="btn-type1">申请退款</view> <view class="btn-type2">去支付</view> </view> <view class="btns" v-if="order.orderType === 0"> <view class="btn-type1">再次购买</view> </view> </view> <view class="card" v-if="current === 0" > <view class="cardHeader"> <text class="orderId">订单号:{{order.orderId}}</text> <text class="orderType" v-if="order.orderType===1">待付款</text> <text class="orderType" v-if="order.orderType===2">待发货</text> <text class="orderType" v-if="order.orderType === 3">待收货</text> <text class="orderType" v-if="order.orderType === 4">退款售后</text> </view> <view class="orderCardInfo"> <image :src="order.img" mode="aspectFill"></image> <view class="infoText"> <view class="orderName">{{order.name}}</view> <view class="orderDescrib">规格:玫瑰金 / 钛合金 / 防日光防紫外线</view> <view class="infoText-bottom"> <view class="markPrice">{{order.price}}</view> <view class="buy-num">X{{order.buyNum}}</view> </view> </view> </view> <view class="payPrice">实付:<text class="priceNum">{{order.price}}</text> </view> <view class="btns" v-if="order.orderType === 1"> <view class="btn-type1">申请退款</view> <view class="btn-type2">去支付</view> </view> <view class="btns" v-if="order.orderType === 0"> <view class="btn-type1">再次购买</view> </view> </view> |
72a08fa45 icon |
60 61 62 63 |
</view> </template> <script> |
46e5b6c99 add myOrder |
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 |
export default { props: { /** * 订单数据 */ order: { orderId: Number, img: String, name: String, originCost:String, price: String, orderType:Number, buyNum:Number }, /** * 当前选择 */ current:Number }, |
72a08fa45 icon |
84 85 |
data() { return { |
72a08fa45 icon |
86 87 88 89 90 91 |
}; } } </script> <style lang="scss"> |
987972474 订单页card组件提取 |
92 93 94 95 96 97 98 99 |
.card{ width: 670rpx; height: 478rpx; background: #FFFFFF; box-shadow: 0 0 10px 0 rgba(177,128,128,0.06); border-radius: 8px; border-radius: 8px; margin-top: 20rpx; |
46e5b6c99 add myOrder |
100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 |
padding: 40rpx; box-sizing: border-box; .cardHeader{ width: 100%; height: 40rpx; display: flex; justify-content: space-between; align-items: center; .orderId{ font-size: 12px; color: #999999; } .orderType{ font-size: 14px; color: #FF6B4A; } } .orderCardInfo{ width: 100%; height: 188rpx; display: flex; flex-direction: row; justify-content: space-between; align-items: center; margin-top: 40rpx; image{ height: 188rpx; width: 188rpx; margin-right: 24rpx; } .infoText{ display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; height: 188rpx; } .orderName{ font-size: 14px; color: #333333; } .orderDescrib{ font-size: 12px; color: #999999; } .infoText-bottom{ display: flex; flex-direction: row; justify-content: space-between; align-items: center; width: 100%; .markPrice{ font-size: 14px; color: #FF6B4A; } .buy-num{ font-size: 12px; color: #999999; } } } .payPrice{ text-align: right; margin: 20rpx 0; font-size: 14px; color: #333333; .priceNum{ font-size: 14px; color: #FF6B4A; } } .btns{ display: flex; justify-content: flex-end; align-items: center; .btn-type1{ height: 48rpx; width: 156rpx; border: 1px solid #FF6B4A; border-radius: 12px; border-radius: 12px; text-align: center; line-height: 48rpx; font-size: 12px; color: #FF6B4A; } .btn-type2{ height: 48rpx; width: 140rpx; background: #FF6B4A; border-radius: 12px; border-radius: 12px; text-align: center; line-height: 48rpx; font-size: 12px; color: #FFFFFF; margin-left: 20rpx; } } |
987972474 订单页card组件提取 |
199 |
} |
72a08fa45 icon |
200 |
</style> |