fix(order): 修复订单退款功能并调整开发环境配置
- 将开发环境API地址切换回本地服务 - 移除订单详情页面中的退款接口导入 - 将退款操作改为更新订单状态方式实现 - 注释掉用户页面底部版本号显示
This commit is contained in:
@@ -2,8 +2,8 @@
|
|||||||
export const ENV_CONFIG = {
|
export const ENV_CONFIG = {
|
||||||
// 开发环境
|
// 开发环境
|
||||||
development: {
|
development: {
|
||||||
// API_BASE_URL: 'http://127.0.0.1:9200/api',
|
API_BASE_URL: 'http://127.0.0.1:9200/api',
|
||||||
API_BASE_URL: 'https://glt-api.websoft.top/api',
|
// API_BASE_URL: 'https://glt-api.websoft.top/api',
|
||||||
APP_NAME: '开发环境',
|
APP_NAME: '开发环境',
|
||||||
DEBUG: 'true',
|
DEBUG: 'true',
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ const UserFooter = () => {
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div className={'text-center py-4 w-full text-gray-300'} onClick={onLoginByPhone}>
|
<div className={'text-center py-4 w-full text-gray-300'} onClick={onLoginByPhone}>
|
||||||
<div className={'text-xs text-gray-400 py-1'}>当前版本:{Version}</div>
|
{/*<div className={'text-xs text-gray-400 py-1'}>当前版本:{Version}</div>*/}
|
||||||
{/*<div className={'text-xs text-gray-400 py-1'}>Copyright © { new Date().getFullYear() } {Copyright}</div>*/}
|
{/*<div className={'text-xs text-gray-400 py-1'}>Copyright © { new Date().getFullYear() } {Copyright}</div>*/}
|
||||||
<div className={'text-xs text-gray-400 py-1'}>{Copyright}</div>
|
<div className={'text-xs text-gray-400 py-1'}>{Copyright}</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import {Cell, CellGroup, Image, Space, Button, Dialog} from '@nutui/nutui-react-
|
|||||||
import Taro from '@tarojs/taro'
|
import Taro from '@tarojs/taro'
|
||||||
import {View} from '@tarojs/components'
|
import {View} from '@tarojs/components'
|
||||||
import {ShopOrder} from "@/api/shop/shopOrder/model";
|
import {ShopOrder} from "@/api/shop/shopOrder/model";
|
||||||
import {getShopOrder, updateShopOrder, refundShopOrder} from "@/api/shop/shopOrder";
|
import {getShopOrder, updateShopOrder} from "@/api/shop/shopOrder";
|
||||||
import {listShopOrderGoods} from "@/api/shop/shopOrderGoods";
|
import {listShopOrderGoods} from "@/api/shop/shopOrderGoods";
|
||||||
import {ShopOrderGoods} from "@/api/shop/shopOrderGoods/model";
|
import {ShopOrderGoods} from "@/api/shop/shopOrderGoods/model";
|
||||||
import dayjs from "dayjs";
|
import dayjs from "dayjs";
|
||||||
@@ -69,7 +69,7 @@ const OrderDetail = () => {
|
|||||||
Taro.showLoading({ title: '提交中...' })
|
Taro.showLoading({ title: '提交中...' })
|
||||||
|
|
||||||
// 退款相关操作使用退款接口:PUT /api/shop/shop-order/refund
|
// 退款相关操作使用退款接口:PUT /api/shop/shop-order/refund
|
||||||
await refundShopOrder({
|
await updateShopOrder({
|
||||||
orderId: order.orderId,
|
orderId: order.orderId,
|
||||||
refundMoney: order.payPrice || order.totalPrice,
|
refundMoney: order.payPrice || order.totalPrice,
|
||||||
orderStatus: 7
|
orderStatus: 7
|
||||||
|
|||||||
Reference in New Issue
Block a user