购物车历史订单增加,代码优化

This commit is contained in:
GaoHao
2025-04-02 09:20:26 +08:00
parent 5a655ba09e
commit 5e6646b574
31 changed files with 418 additions and 357 deletions

View File

@@ -35,7 +35,7 @@
</template>
<script setup>
import { getCurrentInstance, ref, reactive } from 'vue';
import { ref, reactive } from 'vue';
import { onShow } from '@dcloudio/uni-app';
import dayjs from 'dayjs' //时间格式库
@@ -85,7 +85,7 @@
value: 'custom'
}
]
const currentInstance = getCurrentInstance()
const datePicker = ref()
onShow((options) => {
let iToken = uni.getStorageSync('iToken').tokenValue
if (iToken) {
@@ -185,7 +185,7 @@
function changeTime(e) {
selected.value = e
if (e == 'custom') {
currentInstance.ctx.$refs.datePicker.toggle()
datePicker.value.toggle()
} else {
getlist()
}