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({
|
||||
url: DELETE_CART,
|
||||
method: "post",
|
||||
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 CANCEL_MALL_ORDER = '/douyin/goods/order/cancel'
|
||||
export const CANCEL_MALL_ORDER = '/douyin/goods/order/refund'
|
||||
|
||||
// 卡包列表接口
|
||||
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 DELETE_CART = "/product/cart/delete";
|
||||
export const DELETE_CART = "/douyin/goods/order/refund";
|
||||
|
||||
// 创建订单
|
||||
export const CREATE_ORDER_NEW = "/product/order/create";
|
||||
|
||||
@ -68,7 +68,7 @@
|
||||
<!-- 待预约 -->
|
||||
<template v-if="[SHOP_ORDER_UNSLIVER].includes(data.status)">
|
||||
<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 class="flex-center fs-24 app-fc-white status-btn confirm"
|
||||
@ -135,6 +135,11 @@
|
||||
<script>
|
||||
import PopUpModal from "@/components/PopUpModal.vue";
|
||||
import GoodInfo from "./GoodInfo.vue";
|
||||
import {
|
||||
walletTransaction,
|
||||
cancelPetOrderMall,
|
||||
} from "../../../../api/login";
|
||||
|
||||
import {
|
||||
SHOP_ORDER_STATUS,
|
||||
SHOP_ORDER_UNPAY,
|
||||
@ -269,6 +274,30 @@
|
||||
this.stopCountDown();
|
||||
},
|
||||
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) {
|
||||
const { status, result, outOrderNo } = event.detail
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user