|
|
@@ -54,13 +54,6 @@
|
|
|
|
|
|
<style-bottom-view>
|
|
|
<view class="foot flex-align-center" v-if="!isInvoice">
|
|
|
- <!-- <view
|
|
|
- class="flex-center height-72 br-72"
|
|
|
- style="width: 176rpx"
|
|
|
- @click="openInvoiceHistory"
|
|
|
- >
|
|
|
- <view class="fs-28 color-333 mr-12">发票历史</view>
|
|
|
- </view> -->
|
|
|
<view
|
|
|
class="flex-center ml-auto mr-40 height-72 br-72"
|
|
|
style="width: 176rpx; border: 1rpx solid rgba(0, 0, 0, 0.2)"
|
|
|
@@ -106,7 +99,11 @@ import {
|
|
|
onShow,
|
|
|
} from "@dcloudio/uni-app";
|
|
|
import { fetchOrders } from "../../api/user";
|
|
|
-import { applyInvoice, fetchInvoiceList } from "../../api/index";
|
|
|
+import {
|
|
|
+ applyInvoice,
|
|
|
+ cancelApplyInvoice,
|
|
|
+ fetchInvoiceList,
|
|
|
+} from "../../api/index";
|
|
|
import { useInfiniteScroll } from "../../utils/infinite-scroll";
|
|
|
import { ref } from "vue";
|
|
|
import { to } from "@/utils/navigate";
|
|
|
@@ -228,9 +225,15 @@ onLoad(() => {
|
|
|
});
|
|
|
onShow(() => {
|
|
|
if (isInvoiceing.value) {
|
|
|
- isInvoiceing.value = false;
|
|
|
- isInvoice.value = false;
|
|
|
- infiniteScroller.refresh();
|
|
|
+ uni.showLoading({
|
|
|
+ title: "加载中",
|
|
|
+ });
|
|
|
+ cancelApplyInvoice().then(() => {
|
|
|
+ uni.hideLoading();
|
|
|
+ isInvoiceing.value = false;
|
|
|
+ isInvoice.value = false;
|
|
|
+ infiniteScroller.refresh();
|
|
|
+ });
|
|
|
}
|
|
|
});
|
|
|
onPullDownRefresh(() => {
|