Commit fbebc227 authored by Facius's avatar Facius

详情页面

parent 04a5c133
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<view v-for="(item, index) in list" :class="['button-view', item.type]"> <view v-for="(item, index) in list" :class="['button-view', item.type]">
<u-button :class="['list-button', item.type, {'one': list.length == 1}]" @click="handleClick(item)" <u-button :class="['list-button', item.type, {'one': list.length == 1}]" @click="handleClick(item)"
:hover-class="item.type == 'image' || item.disabled ? 'none' : ''" :hover-class="item.type == 'image' || item.disabled ? 'none' : ''"
:custom-style="buttonStyle[item.disabled ? 'disabled' : item.type]" type="primary" shape="circle"> :custom-style="{...buttonStyle[item.disabled ? 'disabled' : item.type], ...item.customStyle}" type="primary" shape="circle">
<view class="image-view" v-if="item.type == 'image'"> <view class="image-view" v-if="item.type == 'image'">
<image :src="baseImageUrl + item.image" class="image-content"></image> <image :src="baseImageUrl + item.image" class="image-content"></image>
</view> </view>
...@@ -15,7 +15,13 @@ ...@@ -15,7 +15,13 @@
<script> <script>
export default { export default {
props: { props: {
// label: 按钮文字,
// type: 'text'普通按钮;'image'图文按钮
// image: type='image'的时候,按钮图片
// show: 是否显示,
// disabled: 是否禁用,true禁用;false 可以点击
// customStyle: 自定义button样式
buttons: { buttons: {
type: Array, type: Array,
default () { default () {
...@@ -44,7 +50,10 @@ ...@@ -44,7 +50,10 @@
label: '接单', label: '接单',
type: 'text', type: 'text',
show: true, show: true,
disabled: true disabled: true,
customStyle: {
'background-color': '#2272FF'
}
} }
] ]
} }
...@@ -132,6 +141,7 @@ ...@@ -132,6 +141,7 @@
margin-left: 40rpx; margin-left: 40rpx;
&.one { &.one {
width: 600rpx; width: 600rpx;
margin-left: 0rpx;
} }
} }
.image-view { .image-view {
......
...@@ -164,7 +164,7 @@ ...@@ -164,7 +164,7 @@
padding-bottom: 6rpx; padding-bottom: 6rpx;
background-color: #FFFFFF; background-color: #FFFFFF;
margin-bottom: 20rpx; margin-bottom: 20rpx;
padding: 30rpx 30rpx 0 30rpx; // padding: 30rpx 30rpx 0 30rpx;
border-radius: 6px; border-radius: 6px;
.top-item { .top-item {
......
...@@ -2,15 +2,15 @@ ...@@ -2,15 +2,15 @@
<view class="order-wrap"> <view class="order-wrap">
<u-navbar :title="title" title-color="#FFFFFF" title-size="32" back-icon-color="#FFFFFF" :background="background" :border-bottom="false"></u-navbar> <u-navbar :title="title" title-color="#FFFFFF" title-size="32" back-icon-color="#FFFFFF" :background="background" :border-bottom="false"></u-navbar>
<view class="header" v-if="order.currentOverTime && showTimeOut"> <view class="header" v-if="order.currentOverTime && showTimeOut">
<!-- 抓紧时间提示 --> <!-- 倒计时 -->
<view class="tip-text">{{tipText}}</view> <view class="title">
<view class="bottom-tag-view"><text>{{timeout ? '超时' : '剩余'}}</text></view>
<u-count-down :timestamp="timestamp" font-size="28" show-days separator="zh" separator-size="32" height="40"
color="#2272FF" separator-color="#FFFFFF" @change="timeOutChange" ref="order-count-down" bg-color="#FFFFFF"></u-count-down>
</view>
<view class="header-content"> <view class="header-content">
<!-- 倒计时 --> <!-- 抓紧时间提示 -->
<view class="title"> <view class="tip-text">{{tipText}}</view>
<view :class="['bottom-tag-view', {'timeout': timeout}]"><text>{{timeout ? '超' : '剩'}}</text></view>
<u-count-down :timestamp="timestamp" font-size="44" show-days separator="zh" separator-size="44"
color="#FFFFFF" separator-color="#FFFFFF" @change="timeOutChange" ref="order-count-down" bg-color="transparent"></u-count-down>
</view>
<!-- 拒单 --> <!-- 拒单 -->
<view v-show="allowRejection" class="reject-button" @click="$u.throttle(rejectOrder, 500)">拒单</view> <view v-show="allowRejection" class="reject-button" @click="$u.throttle(rejectOrder, 500)">拒单</view>
</view> </view>
...@@ -251,7 +251,10 @@ ...@@ -251,7 +251,10 @@
image: '', image: '',
show: true, show: true,
disabled: this.centerBtnDisabled, disabled: this.centerBtnDisabled,
id: 0 id: 0,
customStyle: {
'background-color': this.title == '待抢单' ? '#FF930D' : '#2272FF'
}
}] }]
}, },
wenjianImage() { wenjianImage() {
...@@ -823,50 +826,38 @@ ...@@ -823,50 +826,38 @@
flex-direction: column; flex-direction: column;
.header { .header {
padding: 6rpx 30rpx 20rpx 30rpx; padding: 4rpx 32rpx 14rpx 32rpx;
.tip-text {
font-size: 26rpx;
color: #EFEFEF;
}
.header-content { .header-content {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
max-height: 100rpx; margin-top: 12rpx;
margin-top: 24rpx; .tip-text {
font-size: 26rpx;
color: #EFEFEF;
}
.reject-button {
text-align: center;
width: 106rpx;
height: 52rpx;
border-radius: 40rpx;
font-size: 24rpx;
font-weight: 400;
line-height: 52rpx;
color: #DEDEDE;
text-align: right;
}
} }
.title { .title {
display: flex; display: flex;
align-items: center; align-items: center;
.bottom-tag-view { .bottom-tag-view {
width: 52rpx; color: #FFFFFF;
height: 52rpx; font-size: 40rpx;
border-radius: 26rpx;
color: #FF930D;
font-size: 26rpx;
background-color: #FFFFFF;
margin-right: 16rpx; margin-right: 16rpx;
display: flex;
justify-content: center;
align-items: center;
&.timeout {
color: #FA5A49;
}
} }
} }
.reject-button {
text-align: center;
width: 106rpx;
height: 52rpx;
border-radius: 40rpx;
font-size: 24rpx;
font-weight: 400;
line-height: 52rpx;
color: #DEDEDE;
text-align: right;
}
} }
.content { .content {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment