2025-10-17 17:34:36 +08:00

78 lines
1.2 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/**
* 建行生活 API 接口
*
* @author Billy
* @date 2025-01-17
*/
import request from '@/sheep/request';
const ccbApi = {
/**
* URL跳转登录
* 建行App会携带加密参数跳转到此地址
*/
login: (params) => {
return request({
url: '/ccblife/login',
method: 'GET',
params: params,
custom: {
showLoading: true,
auth: false
}
});
},
/**
* 自动登录JSBridge方式
* H5在建行App内打开时通过JSBridge获取用户信息后调用
*/
autoLogin: (data) => {
return request({
url: '/ccblife/autoLogin',
method: 'POST',
data: data,
custom: {
showLoading: true,
auth: false
}
});
},
/**
* 生成支付串
* 用于调起建行收银台
*/
createPayment: (orderId) => {
return request({
url: '/ccbpayment/createPayment',
method: 'POST',
data: {
order_id: orderId
},
custom: {
showLoading: true,
auth: true
}
});
},
/**
* 支付回调
* 支付完成后通知后端
*/
paymentCallback: (data) => {
return request({
url: '/ccbpayment/callback',
method: 'POST',
data: data,
custom: {
showLoading: false,
auth: true
}
});
}
};
export default ccbApi;