完善用户订单
This commit is contained in:
parent
143bad5dee
commit
3b4599db4d
|
@ -39,7 +39,7 @@
|
|||
<view class="worker-list-group">
|
||||
<view class="list-group">
|
||||
<view class="list-item" v-for="(item, index) in previewWorkerList" :key="index">
|
||||
<image class="cover" :src="item.cover" mode="aspectFill" />
|
||||
<image class="cover" :src="item.avatar" mode="aspectFill" />
|
||||
<text class="price">¥ {{ item.price }}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -57,7 +57,7 @@
|
|||
"
|
||||
>
|
||||
<view class="worker-item-box">
|
||||
<worker-item :data="order.worker" />
|
||||
<worker-item :data="{ ...order.worker, price: order.price }" />
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
<template>
|
||||
<view class="component-worker-item">
|
||||
<view class="head">
|
||||
<image class="cover" :src="data.cover" mode="aspectFill" />
|
||||
<image class="cover" :src="data.avatar" mode="aspectFill" />
|
||||
<text v-if="showPrice" class="price">¥ {{ utils.formatNumber(data.price || 0, 2) }}</text>
|
||||
</view>
|
||||
<view class="desc">
|
||||
<view class="name">
|
||||
<text>{{ data.name }}</text>
|
||||
</view>
|
||||
<view class="type" :style="{ color: models.worker.getWorkerTypeTextColor(data.type) }">
|
||||
<text>{{ models.worker.getWorkerTypeText(data.type) }}</text>
|
||||
<view class="type" :style="{ color: typeTextColor }">
|
||||
<text>{{ typeText }}</text>
|
||||
</view>
|
||||
<view class="detail">
|
||||
<text class="section-text">服务{{ data.times || 0 }}次</text>
|
||||
|
@ -27,6 +27,8 @@ export default {
|
|||
return {
|
||||
utils: this.$utils,
|
||||
models: this.$models,
|
||||
typeText: "",
|
||||
typeTextColor: "",
|
||||
};
|
||||
},
|
||||
props: {
|
||||
|
@ -41,7 +43,11 @@ export default {
|
|||
},
|
||||
components: {},
|
||||
created() {},
|
||||
mounted() {},
|
||||
mounted() {
|
||||
// let [typeText, typeTextColor] = this.$models.worker.worketTypeText(this.data.type);
|
||||
// this.typeText = typeText;
|
||||
// this.typeTextColor = typeTextColor;
|
||||
},
|
||||
destroyed() {},
|
||||
methods: {},
|
||||
};
|
||||
|
|
|
@ -99,6 +99,7 @@ export default {
|
|||
if (response.code == 1) {
|
||||
let list = [];
|
||||
response.data.forEach((item) => {
|
||||
let worker = {};
|
||||
list.push({
|
||||
listType: options.listType,
|
||||
id: item.id,
|
||||
|
@ -108,6 +109,7 @@ export default {
|
|||
createTime: item.time,
|
||||
serviceTime: item.times,
|
||||
orderType: item.types,
|
||||
price: item.money,
|
||||
state: item.status,
|
||||
worker: item.shifu,
|
||||
workerList: [],
|
||||
|
|
|
@ -1,26 +1,8 @@
|
|||
export default {
|
||||
type: {
|
||||
NORMAL: 1,
|
||||
SETTLE: 2,
|
||||
},
|
||||
getWorkerTypeTextColor(type) {
|
||||
worketTypeText(type) {
|
||||
switch (type) {
|
||||
case this.type.NORMAL:
|
||||
return '#179C43';
|
||||
case this.type.SETTLE:
|
||||
return '#D9A019';
|
||||
default:
|
||||
return '#999999';
|
||||
case 0: return ['普通师傅', '#bfbfbf'];
|
||||
case 1: return ['入驻师傅', '#d9a019'];
|
||||
}
|
||||
},
|
||||
getWorkerTypeText(type) {
|
||||
switch (type) {
|
||||
case this.type.NORMAL:
|
||||
return '普通师傅';
|
||||
case this.type.SETTLE:
|
||||
return '入驻师傅';
|
||||
default:
|
||||
return '未知';
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue