细节优化

This commit is contained in:
kron
2025-07-30 10:25:58 +08:00
parent 1e4ce52a93
commit d7306db2dd
5 changed files with 40 additions and 7 deletions

View File

@@ -1,5 +1,6 @@
<script setup>
import { ref } from "vue";
import { ref, onMounted } from "vue";
import { onShow } from "@dcloudio/uni-app";
import Container from "@/components/Container.vue";
import ScrollList from "@/components/ScrollList.vue";
import { getOrderListAPI } from "@/apis";
@@ -27,6 +28,19 @@ const onLoading = async (page) => {
}
return result.length;
};
onMounted(() => {
uni.removeStorageSync("order");
});
onShow(() => {
const order = uni.getStorageSync("order");
list.value.forEach((item, index) => {
if (item.orderId === order.orderId) {
list.value[index] = order;
}
});
});
</script>
<template>