1
This commit is contained in:
@ -115,12 +115,12 @@ export const updateCartSelect = ({ is_select,cart_id }) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// 删除购物车
|
// 删除购物车
|
||||||
export const deleteCart = ({ cart_id }) => {
|
export const deleteCart = ({ id }) => {
|
||||||
return request({
|
return request({
|
||||||
url: DELETE_CART,
|
url: DELETE_CART,
|
||||||
method: "post",
|
method: "post",
|
||||||
data: {
|
data: {
|
||||||
cart_id,
|
id,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
@ -57,7 +57,7 @@ export const CANCEL_PET_ORDER = '/order/pet/cancel'
|
|||||||
export const DOUY_REVIEW = '/douyin/goods/order/appointment'
|
export const DOUY_REVIEW = '/douyin/goods/order/appointment'
|
||||||
|
|
||||||
// 取消商城接口
|
// 取消商城接口
|
||||||
export const CANCEL_MALL_ORDER = '/douyin/goods/order/cancel'
|
export const CANCEL_MALL_ORDER = '/douyin/goods/order/refund'
|
||||||
|
|
||||||
// 卡包列表接口
|
// 卡包列表接口
|
||||||
export const USER_HolderList = '/membership/instances'
|
export const USER_HolderList = '/membership/instances'
|
||||||
@ -227,7 +227,7 @@ export const UPDATE_CART_NUM = "/cart/update";
|
|||||||
// 选择购物车商品
|
// 选择购物车商品
|
||||||
export const UPDATE_CART_SELECT = "/cart/select/all";
|
export const UPDATE_CART_SELECT = "/cart/select/all";
|
||||||
// 删除购物车
|
// 删除购物车
|
||||||
export const DELETE_CART = "/product/cart/delete";
|
export const DELETE_CART = "/douyin/goods/order/refund";
|
||||||
|
|
||||||
// 创建订单
|
// 创建订单
|
||||||
export const CREATE_ORDER_NEW = "/product/order/create";
|
export const CREATE_ORDER_NEW = "/product/order/create";
|
||||||
|
|||||||
@ -68,7 +68,7 @@
|
|||||||
<!-- 待预约 -->
|
<!-- 待预约 -->
|
||||||
<template v-if="[SHOP_ORDER_UNSLIVER].includes(data.status)">
|
<template v-if="[SHOP_ORDER_UNSLIVER].includes(data.status)">
|
||||||
<view class="order-btns-right">
|
<view class="order-btns-right">
|
||||||
<view class="flex-center fs-24 app-fc-main status-btn" @click.stop="$emit('refund', data)">
|
<view class="flex-center fs-24 app-fc-main status-btn" @click.stop="remindRefund(data.order_id)">
|
||||||
申请退款
|
申请退款
|
||||||
</view>
|
</view>
|
||||||
<view class="flex-center fs-24 app-fc-white status-btn confirm"
|
<view class="flex-center fs-24 app-fc-white status-btn confirm"
|
||||||
@ -135,6 +135,11 @@
|
|||||||
<script>
|
<script>
|
||||||
import PopUpModal from "@/components/PopUpModal.vue";
|
import PopUpModal from "@/components/PopUpModal.vue";
|
||||||
import GoodInfo from "./GoodInfo.vue";
|
import GoodInfo from "./GoodInfo.vue";
|
||||||
|
import {
|
||||||
|
walletTransaction,
|
||||||
|
cancelPetOrderMall,
|
||||||
|
} from "../../../../api/login";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
SHOP_ORDER_STATUS,
|
SHOP_ORDER_STATUS,
|
||||||
SHOP_ORDER_UNPAY,
|
SHOP_ORDER_UNPAY,
|
||||||
@ -269,6 +274,30 @@
|
|||||||
this.stopCountDown();
|
this.stopCountDown();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
remindRefund(id) {
|
||||||
|
const data = {
|
||||||
|
id: Number(id),
|
||||||
|
};
|
||||||
|
cancelPetOrderMall(data).then((res) => {
|
||||||
|
const plugin = tt.requirePlugin("lifeServicePlugin");
|
||||||
|
plugin.applyRefund({
|
||||||
|
goodsList:res.data.goodsList,
|
||||||
|
outOrderNo:res.data.outOrderNo,
|
||||||
|
refundInfo:res.data.refundInfo,
|
||||||
|
success(res) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '退款成功',
|
||||||
|
icon: 'success'
|
||||||
|
})
|
||||||
|
const { outRefundNo } = res;
|
||||||
|
tt.showToast({ title: outRefundNo });
|
||||||
|
},
|
||||||
|
fail(res) {
|
||||||
|
console.log("fail", res);
|
||||||
|
},
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
// 退款回调(组件触发)
|
// 退款回调(组件触发)
|
||||||
handleRefund(event) {
|
handleRefund(event) {
|
||||||
const { status, result, outOrderNo } = event.detail
|
const { status, result, outOrderNo } = event.detail
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user