mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-ui.git
synced 2026-11-07 09:28:53 +08:00
feat(buyer): 增强商品详情与支付逻辑
- 引入 buyerLogin 工具,优化商品详情页的链接跳转逻辑,确保未登录用户能正确重定向到登录页面 - 更新商品 SKU 详情 API,支持未登录状态下的访问 - 修改支付 API,新增 skipMessage 参数以控制支付提示信息 - 改进商品列表与支付页面的用户体验,确保更流畅的操作流程 - 规范化商品类型与库存提示,提升用户体验
This commit is contained in:
@@ -33,12 +33,13 @@ export function goodsDetail (goodsId) {
|
||||
});
|
||||
}
|
||||
|
||||
// id获取商品Sku详情
|
||||
// id获取商品Sku详情(支持未登录浏览,登录后可选携带 token)
|
||||
export function goodsSkuDetail (params) {
|
||||
return request({
|
||||
url: `/buyer/goods/goods/sku/${params.goodsId}/${params.skuId}`,
|
||||
method: Method.GET,
|
||||
needToken: true,
|
||||
needToken: false,
|
||||
optionalToken: true,
|
||||
params
|
||||
});
|
||||
}
|
||||
|
||||
@@ -24,12 +24,13 @@ export function tradeDetail (params) {
|
||||
* @param payClient 调起方式 可用值:APP,NATIVE,JSAPI,H5
|
||||
* @param sn 订单编号
|
||||
*/
|
||||
export function pay (params) {
|
||||
export function pay (params, config = {}) {
|
||||
return request({
|
||||
url: `/buyer/payment/cashier/pay/${params.paymentMethod}/${params.paymentClient}`,
|
||||
needToken: true,
|
||||
method: Method.GET,
|
||||
params
|
||||
params,
|
||||
skipMessage: !!config.skipMessage,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -46,7 +46,8 @@ export function applyThird (params) {
|
||||
export function getDetailById (id) {
|
||||
return request({
|
||||
url: `/buyer/store/store/get/detail/${id}`,
|
||||
needToken: true,
|
||||
needToken: false,
|
||||
optionalToken: true,
|
||||
method: Method.GET
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user