Browse Source

订单详情

master
zheng_hb 2 months ago
parent
commit
c7394b779e
10 changed files with 254 additions and 31 deletions
  1. +19
    -16
      components/cart/CardList.vue
  2. +13
    -4
      pages.json
  3. +8
    -9
      pages/index/cart.vue
  4. +212
    -0
      pages_order/orderDetails.vue
  5. +1
    -1
      pages_order/orderEvaluation.vue
  6. BIN
      static/image/cart/U-status.png
  7. BIN
      static/image/cart/bgIcon.png
  8. BIN
      static/image/cart/redAddressIcon.png
  9. BIN
      static/image/cart/redTimeIcon.png
  10. +1
    -1
      uni.scss

+ 19
- 16
components/cart/CardList.vue View File

@ -1,6 +1,6 @@
<template> <template>
<view class="container">
<view class="cardList" v-for="(item, index) in cardListData" :key="index">
<view class="cardList">
<view class="container" v-for="(item, index) in cardListData" :key="index">
<view class="head"> <view class="head">
<text class="orderTime">下单时间{{item.orderTime}}</text> <text class="orderTime">下单时间{{item.orderTime}}</text>
<text class="orderStatus" :class="item.state === 'U' ? 'active' : ''">{{item.stateText}}</text> <text class="orderStatus" :class="item.state === 'U' ? 'active' : ''">{{item.stateText}}</text>
@ -19,7 +19,8 @@
</view> </view>
</view> </view>
<view class="button-sp-area" v-if="Array.isArray(item.btnObj) && item.btnObj.length > 0"> <view class="button-sp-area" v-if="Array.isArray(item.btnObj) && item.btnObj.length > 0">
<button :style="{background: val.bgColor, color: val.color}" v-for="(val, i) in item.btnObj" :key="i" class="mini-btn" size="mini">{{val.btnTitle}}</button>
<button @click="skip(val)" :style="{background: val.bgColor, color: val.color}" v-for="(val, i) in item.btnObj" :key="i" class="mini-btn" size="mini">{{val.btnTitle}}</button>
<button>4332432</button>
</view> </view>
</view> </view>
</view> </view>
@ -52,17 +53,19 @@ export default {
mounted() { mounted() {
}, },
methods: { methods: {
skip(val) {
uni.navigateTo({
url:'/pages_order/orderDetails'
})
}
} }
}; };
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
$gray: #999;
$red: #FF4546;
.container {
.cardList {
padding: 10rpx 32rpx 250rpx; padding: 10rpx 32rpx 250rpx;
.cardList {
.container {
margin-top: 31rpx; margin-top: 31rpx;
padding: 25rpx 0; padding: 25rpx 0;
border-radius: 20rpx; border-radius: 20rpx;
@ -74,7 +77,7 @@ export default {
border-bottom: 1px solid #2A2A2A; border-bottom: 1px solid #2A2A2A;
.orderTime { .orderTime {
font-size: 25rpx; font-size: 25rpx;
color: $gray;
color: $uni-text-color-grey;
} }
.orderStatus { .orderStatus {
font-size: 26rpx; font-size: 26rpx;
@ -103,7 +106,7 @@ export default {
justify-content: space-between; justify-content: space-between;
flex: 1; flex: 1;
margin-left: 26px; margin-left: 26px;
color: $gray;
color: $uni-text-color-grey;
font-size: 24rpx; font-size: 24rpx;
.detailed { .detailed {
.title { .title {
@ -118,7 +121,7 @@ export default {
&::before { &::before {
content: ''; content: '';
display: block; display: block;
background: url('@/static/image//cart/timeIcon.png') no-repeat;
background: url('@/static/image/cart/timeIcon.png') no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
width: 24rpx; width: 24rpx;
height: 24rpx; height: 24rpx;
@ -131,10 +134,10 @@ export default {
&::before { &::before {
content: ''; content: '';
display: block; display: block;
background: url('@/static/image//cart/addressIcon.png') no-repeat;
background: url('@/static/image/cart/addressIcon.png') no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
width: 24rpx;
height: 24rpx;
width: 22rpx;
height: 26rpx;
margin-right: 10rpx; margin-right: 10rpx;
} }
} }
@ -144,7 +147,7 @@ export default {
color: #fff; color: #fff;
text-align: right; text-align: right;
text { text {
color: $gray;
color: $uni-text-color-grey;
font-size: 25rpx; font-size: 25rpx;
padding-right: 10rpx; padding-right: 10rpx;
} }
@ -168,6 +171,6 @@ export default {
} }
} }
.active { .active {
color: $red!important;
color: $uni-color-primary!important;
} }
</style> </style>

+ 13
- 4
pages.json View File

@ -29,9 +29,8 @@
{ {
"path": "pages/index/cart", "path": "pages/index/cart",
"style": { "style": {
"navigationBarTitleText": "",
"navigationStyle": "custom" , "navigationStyle": "custom" ,
"navigationBarTextStyle": "white"
"navigationBarTextStyle": "white"
} }
}, },
{ {
@ -51,9 +50,19 @@
"root": "pages_order", "root": "pages_order",
"pages": [ "pages": [
{ {
"path": "pingjia",
"path": "orderEvaluation",
"style": {
"enablePullDownRefresh": true,
"navigationStyle": "custom" ,
"navigationBarTextStyle": "white"
}
},
{
"path": "orderDetails",
"style": { "style": {
"enablePullDownRefresh": true
"enablePullDownRefresh": true,
"navigationStyle": "custom" ,
"navigationBarTextStyle": "white"
} }
} }
] ]


+ 8
- 9
pages/index/cart.vue View File

@ -1,7 +1,7 @@
<template> <template>
<view class="page">
<view class="cart">
<view class="head-box"></view> <view class="head-box"></view>
<uv-navbar title="我的订单" bgColor="transparent" height="100rpx"></uv-navbar>
<uv-navbar title="我的订单" bgColor="transparent" leftIconSize="0px" height="100rpx"></uv-navbar>
<view class="content"> <view class="content">
<uv-tabs <uv-tabs
:scrollable="false" :scrollable="false"
@ -56,11 +56,13 @@
totalPrice: '298.00', totalPrice: '298.00',
btnObj: [ btnObj: [
{ {
id: '0',
btnTitle: '取消活动', btnTitle: '取消活动',
color: '#AFAFAF', color: '#AFAFAF',
bgColor: '#34312E' bgColor: '#34312E'
}, },
{
{
id: '1',
btnTitle: '活动签到', btnTitle: '活动签到',
color: '#FF4546', color: '#FF4546',
bgColor: '#492623' bgColor: '#492623'
@ -78,11 +80,13 @@
totalPrice: '298.00', totalPrice: '298.00',
btnObj: [ btnObj: [
{ {
id: '2',
btnTitle: '活动评价', btnTitle: '活动评价',
color: '#FF4546', color: '#FF4546',
bgColor: '#492623' bgColor: '#492623'
}, },
{ {
id: '3',
btnTitle: '开具发票', btnTitle: '开具发票',
color: '#FFB245', color: '#FFB245',
bgColor: '#49361D' bgColor: '#49361D'
@ -106,11 +110,6 @@
methods: { methods: {
tabs(val) { tabs(val) {
console.log(val); console.log(val);
},
toPingjia() {
uni.navigateTo({
url:'/pages_order/pingjia'
})
} }
} }
} }
@ -122,7 +121,7 @@
} }
</style> </style>
<style scoped lang="scss"> <style scoped lang="scss">
.page {
.cart {
.head-box { .head-box {
background: url('@/static/image/nav-bg.png') no-repeat; background: url('@/static/image/nav-bg.png') no-repeat;
background-size: 100% 100%; background-size: 100% 100%;


+ 212
- 0
pages_order/orderDetails.vue
File diff suppressed because it is too large
View File


pages_order/pingjia.vue → pages_order/orderEvaluation.vue View File

@ -1,6 +1,6 @@
<template> <template>
<view> <view>
第三代
</view> </view>
</template> </template>

BIN
static/image/cart/U-status.png View File

Before After
Width: 59  |  Height: 52  |  Size: 1.3 KiB

BIN
static/image/cart/bgIcon.png View File

Before After
Width: 1031  |  Height: 301  |  Size: 194 KiB

BIN
static/image/cart/redAddressIcon.png View File

Before After
Width: 35  |  Height: 40  |  Size: 1.5 KiB

BIN
static/image/cart/redTimeIcon.png View File

Before After
Width: 37  |  Height: 37  |  Size: 1.2 KiB

+ 1
- 1
uni.scss View File

@ -15,7 +15,7 @@
$uni-color: #A3D250; $uni-color: #A3D250;
/* 行为相关颜色 */ /* 行为相关颜色 */
$uni-color-primary: #007aff;
$uni-color-primary: #FF4546;
$uni-color-success: #4cd964; $uni-color-success: #4cd964;
$uni-color-warning: #f0ad4e; $uni-color-warning: #f0ad4e;
$uni-color-error: #dd524d; $uni-color-error: #dd524d;


Loading…
Cancel
Save