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