index.ts 1.5 KB

123456789101112131415161718192021222324252627282930313233343536
  1. import { request, handle } from '@kasite/uni-app-base';
  2. import { REQUEST_CONFIG } from '@/config';
  3. export const queryCardBalance_V3 = async (queryData: any) => {
  4. let resp = handle.promistHandleNew(await request.doPost(`${REQUEST_CONFIG.BASE_URL}wsgw/accountMember/api/QueryCardBalance_V3/callApiJSON.do`, queryData));
  5. return handle.catchPromiseNew(resp, () => resp);
  6. };
  7. export const addOrderLocal = async (queryData: any) => {
  8. let resp = handle.promistHandleNew(await request.doPost(`${REQUEST_CONFIG.BASE_URL}wsgw/order/orderApi/AddOrderLocal/callApiJSON.do`, queryData));
  9. return handle.catchPromiseNew(resp, () => resp);
  10. };
  11. export const getConfigKey = async (orderId: any, serviceId: any) => {
  12. const url = `${REQUEST_CONFIG.BASE_URL}wsgw/smallpro/${orderId}/${serviceId}/getConfigKey.do`;
  13. let resp = handle.promistHandleNew(await request.doPost(url, {}));
  14. return handle.catchPromiseNew(resp, () => resp);
  15. };
  16. export const getUnitePay = async (queryData: any) => {
  17. let resp = handle.promistHandleNew(await request.doPost(`${REQUEST_CONFIG.BASE_URL}wsgw/pay/payApi/GetUnitePay/callApiJSON.do`, queryData));
  18. return handle.catchPromiseNew(resp, () => resp);
  19. };
  20. export const payCallBack = async (queryData: any) => {
  21. let resp = handle.promistHandleNew(await request.doPost(`${REQUEST_CONFIG.BASE_URL}wsgw/pay/payApi/PayCallBack/callApiJSON.do`, queryData));
  22. return handle.catchPromiseNew(resp, () => resp);
  23. };
  24. export default {
  25. queryCardBalance_V3,
  26. addOrderLocal,
  27. getConfigKey,
  28. getUnitePay,
  29. payCallBack,
  30. };