Files
huangjingfen/pro_v3.5.1_副本/view/uniapp/api/order.js

436 lines
7.9 KiB
JavaScript
Raw Normal View History

feat(fsgx): 完成全部24项开发任务 Phase1-7 Phase1 后端核心: - 新增 fsgx_v1.sql 迁移脚本(is_queue_goods/frozen_points/available_points/no_assess) - SystemConfigServices 返佣设置扩展(周期人数/分档比例/范围/时机) - StoreOrderCreateServices 周期循环佣金计算 - StoreOrderTakeServices 佣金发放后同步冻结积分 - StoreProductServices/StoreProduct 保存 is_queue_goods Phase2 后端接口: - GET /api/hjf/brokerage/progress 佣金周期进度 - GET /api/hjf/assets/overview 资产总览 - HjfPointsServices 每日 frozen_points 0.4‰ 释放定时任务 - PUT /adminapi/hjf/member/{uid}/no_assess 不考核接口 - GET /adminapi/hjf/points/release_log 积分日志接口 Phase3 前端清理: - hjfCustom.js 路由精简(仅保留 points/log) - hjfQueue.js/hjfMember.js API 清理/重定向至 CRMEB 原生接口 - pages.json 公排→推荐佣金/佣金记录/佣金规则 Phase4-5 前端改造: - queue/status.vue 推荐佣金进度页整体重写 - 商品详情/订单确认/支付结果页文案与逻辑改造 - 个人中心/资产页/引导页/规则页文案改造 - HjfQueueProgress/HjfRefundNotice/HjfAssetCard 组件改造 - 推广中心嵌入佣金进度摘要 - hjfMockData.js 全量更新(公排字段→佣金字段) Phase6 Admin 增强: - 用户列表新增 frozen_points/available_points 列及不考核操作按钮 - hjfPoints.js USE_MOCK=false 对接真实积分日志接口 Phase7 配置文档: - docs/fsgx-phase7-config-checklist.md 后台配置与全链路验收清单 Made-with: Cursor
2026-03-23 22:32:19 +08:00
// +----------------------------------------------------------------------
// | CRMEB [ CRMEB赋能开发者助力企业发展 ]
// +----------------------------------------------------------------------
// | Copyright (c) 2016~2021 https://www.crmeb.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed CRMEB并不是自由软件未经许可不能去掉CRMEB相关版权
// +----------------------------------------------------------------------
// | Author: CRMEB Team <admin@crmeb.com>
// +----------------------------------------------------------------------
import request from "@/utils/request.js";
/**
* 获取购物车列表
* @param numType boolean true 购物车数量,false=购物车产品数量
*/
export function getCartCounts(numType, storeId, is_channel) {
return request.get("cart/count", {
numType: numType === undefined ? 0 : numType,
store_id: storeId,
is_channel: is_channel || "",
});
}
/**
* 获取购物车列表
*
*/
export function getCartList(data) {
return request.get("cart/list", data);
}
/**
* 购物车计算
*
*/
export function cartCompute(data) {
return request.post("cart/compute", data);
}
/**
* 修改购物车
*
*/
export function getResetCart(data) {
return request.post("v2/reset_cart", data);
}
/**
* 修改购物车数量
* @param int cartId 购物车id
* @param int number 修改数量
*/
export function changeCartNum(cartId, number, type = 1) {
return request.post("cart/num", {
id: cartId,
number,
type,
});
}
/**
* 清除购物车
* @param object ids join(',') 切割成字符串
*/
export function cartDel(ids) {
if (typeof ids === "object") ids = ids.join(",");
return request.post("cart/del", {
ids: ids,
});
}
/**
* 订单列表
* @param object data
*/
export function getOrderList(data) {
return request.get("order/list", data);
}
/**
* 新订单列表 2.1版本
* @param object data
*/
export function getNewOrderList(data) {
return request.get("order/refund/list", data);
}
/**
* 订单产品信息
* @param string unique
*/
export function orderProduct(unique) {
return request.post("order/product", {
unique: unique,
});
}
/**
* 订单评价
* @param object data
*
*/
export function orderComment(data) {
return request.post("order/comment", data);
}
/**
* 订单支付
* @param object data
*/
export function orderPay(data) {
return request.post("order/pay", data);
}
/**
* 订单统计数据
*/
export function orderData(data) {
return request.get("order/data", data);
}
/**
* 订单取消
* @param string id
*
*/
export function orderCancel(id) {
return request.post("order/cancel", {
id: id,
});
}
/**
* 删除已完成订单
* @param string uni
*
*/
export function orderDel(uni) {
return request.post("order/del", {
uni: uni,
});
}
/**
* 删除已退款和拒绝退款的订单
* @param string uni
*
*/
export function refundOrderDel(uni) {
return request.get("order/refund/del/" + uni, {});
}
/**
* 订单详情
* @param string uni
*/
export function getOrderDetail(uni) {
return request.get("order/detail/" + uni);
}
/**
* 退款订单详情
* @param string uni
*/
export function getRefundOrderDetail(uni) {
return request.get("order/refund/detail/" + uni);
}
/**
* 放弃申请退款
* @param string uni
*/
export function cancelRefundOrder(uni) {
return request.post("order/refund/cancel/" + uni);
}
/**
* 再次下单
* @param string uni
*
*/
export function orderAgain(uni) {
return request.post("order/again", {
uni: uni,
});
}
//再次申请售后
export function orderRefundAgain(id) {
return request.post("order/refund/again/" + id);
}
/**
* 订单收货
* @param string uni
*
*/
export function orderTake(uni) {
return request.post("order/take", {
uni: uni,
});
}
/**
* 订单查询物流信息
* @returns {*}
*/
export function express(uni, type) {
return request.get("order/express/" + uni + (type ? "/" + type : ""));
}
/**
* 获取退款理由
*
*/
export function ordeRefundReason() {
return request.get("order/refund/reason");
}
/**
* 订单退款审核
* @param object data
*/
export function orderRefundVerify(data) {
return request.post("order/refund/verify", data);
}
/**
* 订单确认获取订单详细信息
* @param string cartId
*/
export function orderConfirm(
cartId,
news,
addressId,
shippingType,
store_id,
couponId,
luckRecordId,
isSendGift
) {
return request.post("order/confirm", {
cartId,
new: news,
addressId,
shipping_type: shippingType,
store_id,
couponId: couponId,
luckRecordId,
is_send_gift: isSendGift,
});
}
/**
* 获取当前金额能使用的优惠卷
* @param string price
*
*/
export function getCouponsOrderPrice(price, data) {
return request.get("coupons/order/" + price, data);
}
/**
* 订单创建
* @param string key
* @param object data
*
*/
export function orderCreate(key, data) {
return request.post("order/create/" + key, data);
}
/**
* 计算订单金额
* @param key
* @param data
* @returns {*}
*/
export function postOrderComputed(key, data) {
return request.post("order/computed/" + key, data);
}
/**
* 订单优惠券
* @param key
* @param data
* @returns {*}
*/
export function orderCoupon(orderId) {
return request.post("v2/order/product_coupon/" + orderId);
}
/**
* 计算会员线下付款金额
* @param {Object} data
*/
export function offlineCheckPrice(data) {
return request.post("order/offline/check/price", data);
}
/**
* 线下扫码付款
* @param {Object} data
*/
export function offlineCreate(data) {
return request.post("order/offline/create", data);
}
/**
* 支付方式开关
*/
export function orderOfflinePayType() {
return request.get("order/offline/pay/type");
}
/**
* 开票记录
*/
export function orderInvoiceList(data) {
return request.get("v2/order/invoice_list", data);
}
/**
* 开票订单详情
* @param {Object} id
*/
export function orderInvoiceDetail(orderId, id) {
return request.get(`v2/order/invoice_detail/${orderId}/${id}`);
}
/**
* 支付宝支付
* @param {Object} key
* @param {Object} quitUrl
*/
export function aliPay(key, quitUrl) {
return request.get(
"ali_pay",
{
key,
quitUrl,
},
{
noAuth: true,
}
);
}
/**
* 退货物流单号提交
* @param {Object} data
*/
export function refundExpress(data) {
return request.post("order/refund/express", data);
}
/**
* 分类购物车列表
*/
export function vcartList(data) {
return request.get("v2/cart_list", data);
}
/**
* 支付订单
*/
export function payCashier(storeId) {
return request.get(`order/pay_cashier?store_id=${storeId}`);
}
/**
* 退款商品列表
*/
export function refundGoodsList(orderId) {
return request.get(`order/refund/cart_info/${orderId}`);
}
/**
* 申请退款商品列表
*/
export function postRefundGoods(data) {
return request.post(`order/refund/cart_info`, data);
}
/**
* 退款商品提交
*/
export function returnGoodsSubmit(id, data) {
return request.post(`order/refund/apply/${id}`, data);
}
/**
* 确认订单详情是否显示快递配送
*/
export function checkShipping(data) {
return request.post(`order/check_shipping`, data);
}
/**
* 配送订单详情
*/
export function deliveryDetail(id) {
return request.get(`delivery_order/detail/${id}`);
}
/**
* 收银台订单信息
* @param object data
*/
export function getCashierOrder(orderId, type) {
return request.get(`order/cashier/${orderId}/${type}`);
}
/**
* 获取订单下单奖励
* @param object data
*/
export function getOrderPrizeApi(orderId) {
return request.post(`order/prize/${orderId}`);
}
/**
* 礼品订单详情
* @param string uni
*/
export function getSendGiftOrderDetail(id) {
return request.get("order/send_gift_detail/" + id);
}
/**
* 领取礼物
* @param orderId
* @param data
*/
export function orderReceiveGift(orderId, data) {
return request.post("order/receive_gift/" + orderId, data);
}