细节优化
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user