1.修复回到首页按钮报错的问题

2.清空一些没必要的脏数据
main
刘佳宇 1 year ago
parent 42aed0dd54
commit d1801b411c

@ -11,7 +11,7 @@
</template> </template>
<script setup> <script setup>
import { ref, onMounted, onBeforeUnmount } from "vue"; import { ref } from "vue";
const button = ref(null); const button = ref(null);
let startX, startY, posX, posY, mouseMoveTracker, mouseUpTracker; let startX, startY, posX, posY, mouseMoveTracker, mouseUpTracker;
@ -56,26 +56,6 @@ const dragButton = (event) => {
}; };
document.addEventListener("touchend", mouseUpTracker); document.addEventListener("touchend", mouseUpTracker);
}; };
onMounted(() => {
if (!button.value) {
var child = document.getElementById("draggable-button");
if (!document.body.contains(child)) {
document.body.appendChild(button.value);
}
}
});
onBeforeUnmount(() => {
if (button.value) {
var child = document.getElementById("draggable-button");
if (document.body.contains(child)) {
document.body.removeChild(child);
} else {
console.log("节点不是父节点的子节点");
}
}
});
</script> </script>
<style> <style>

@ -122,6 +122,7 @@ const buy = () => {
duo_xuan_yi: $store.getDuoXuanYi(), duo_xuan_yi: $store.getDuoXuanYi(),
}); });
$store.setYytjInfo({}); $store.setYytjInfo({});
uni.setStorageSync("yytjInfoS", {});
uni.navigateTo({ uni.navigateTo({
url: "/pages/main/tjyy/tjyy", url: "/pages/main/tjyy/tjyy",
}); });

Loading…
Cancel
Save