|
@@ -8,11 +8,11 @@
|
|
|
height="36px"
|
|
|
radius="10px"
|
|
|
></up-image>
|
|
|
- <text class="name">美味的水果餐厅</text>
|
|
|
+ <text class="name">{{ itemData.shopName }}</text>
|
|
|
<text class="status">已付款</text>
|
|
|
</view>
|
|
|
<up-line></up-line>
|
|
|
- <view class="content">
|
|
|
+ <view class="content" @click="onDetail">
|
|
|
<up-image
|
|
|
class="img"
|
|
|
src="https://www.xiaoyaotravel.com/api/admin/app/tourismProject/download?id=1843658873626431488&fieldName=tourismUrl&asImage=true&filename=b3cc4250ec214f9fa9c6828abd6ecf88.jpg"
|
|
@@ -20,10 +20,10 @@
|
|
|
height="70px"
|
|
|
radius="10px"
|
|
|
></up-image>
|
|
|
- <text class="name">黄焖鸡+米饭+鹌鹑蛋黄焖鸡+米饭+鹌鹑蛋</text>
|
|
|
+ <text class="name ellipsis-text">{{ name }}</text>
|
|
|
<view class="right">
|
|
|
- <text>¥1.50</text>
|
|
|
- <text>共18件</text>
|
|
|
+ <text>¥{{ itemData.payAmount }}</text>
|
|
|
+ <text>共{{ foodSum }}件</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="actions">
|
|
@@ -34,7 +34,29 @@
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
|
-<script setup></script>
|
|
|
+<script setup>
|
|
|
+const props = defineProps({
|
|
|
+ itemData: {
|
|
|
+ type: Object,
|
|
|
+ default: () => {},
|
|
|
+ },
|
|
|
+})
|
|
|
+
|
|
|
+const name = computed(() => {
|
|
|
+ const foodArray = props.itemData.itemList.map((item) => item.foodName)
|
|
|
+ return foodArray.join('+');
|
|
|
+})
|
|
|
+
|
|
|
+const foodSum = computed(() => {
|
|
|
+ return props.itemData.itemList.reduce((sum, item) => sum + item.number, 0)
|
|
|
+})
|
|
|
+
|
|
|
+const onDetail = () => {
|
|
|
+ uni.navigateTo({
|
|
|
+ url: `/pages/profile/order/order-detail/index?id=${props.itemData.id}`
|
|
|
+ });
|
|
|
+}
|
|
|
+</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
.cell {
|
|
@@ -97,5 +119,13 @@
|
|
|
display: flex;
|
|
|
justify-content: flex-end;
|
|
|
}
|
|
|
+
|
|
|
+ .ellipsis-text {
|
|
|
+ display: -webkit-box;
|
|
|
+ text-overflow: ellipsis;
|
|
|
+ -webkit-box-orient: vertical;
|
|
|
+ overflow: hidden;
|
|
|
+ -webkit-line-clamp: 3;
|
|
|
+ }
|
|
|
}
|
|
|
</style>
|