fix(api文件): 修复onsole写法错误

This commit is contained in:
hzj 2025-09-15 19:05:09 +08:00
parent 28329ebfd2
commit 1ff643db54
2 changed files with 31 additions and 31 deletions

View File

@ -1,25 +1,25 @@
import { get, post } from "../utils/http.js"; import { get, post } from '../utils/http.js'
export const getAdminCenterList = async (params) => { export const getAdminCenterList = async (params) => {
try { try {
const response = await get( const response = await get(
`/sys/manager/props?propsType=${params.propsType}&currencyType=${params.currencyType}` `/sys/manager/props?propsType=${params.propsType}&currencyType=${params.currencyType}`
); )
return response; return response
} catch (error) { } catch (error) {
console.error("Failed to fetch admin center list:", error); console.error('Failed to fetch admin center list:', error)
console.error("error:" + error.response.errorMsg); console.error('error:' + error.response.errorMsg)
throw error; throw error
} }
}; }
export const giveProps = async (data) => { export const giveProps = async (data) => {
try { try {
const response = await post("/sys/manager/send", data); const response = await post('/sys/manager/send', data)
return response; return response
} catch (error) { } catch (error) {
console.error("Failed to fetch give props:", error); console.error('Failed to fetch give props:', error)
onsole.error("error:" + error.response.errorMsg); console.error('error:' + error.response.errorMsg)
throw error; throw error
} }
}; }

View File

@ -1,38 +1,38 @@
import { get, post } from "../utils/http.js"; import { get, post } from '../utils/http.js'
// 获取支付应用信息 // 获取支付应用信息
export const getPayAplication = async (applicationId) => { export const getPayAplication = async (applicationId) => {
try { try {
const response = await get(`/order/web/pay/application/${applicationId}`); const response = await get(`/order/web/pay/application/${applicationId}`)
return response; return response
} catch (error) { } catch (error) {
console.error("Failed to fetch get pay application:", error); console.error('Failed to fetch get pay application:', error)
onsole.error("error:" + error.response.errorMsg); console.error('error:' + error.response.errorMsg)
throw error; throw error
} }
}; }
// 获取商品列表 // 获取商品列表
export const getAppCommodityCard = async (params) => { export const getAppCommodityCard = async (params) => {
try { try {
const response = await get( const response = await get(
`/order/web/pay/commodity?applicationId=${params.applicationId}&payCountryId=${params.payCountryId}&regionId=${params.regionId}&type=${params.type}` `/order/web/pay/commodity?applicationId=${params.applicationId}&payCountryId=${params.payCountryId}&regionId=${params.regionId}&type=${params.type}`
); )
return response; return response
} catch (error) { } catch (error) {
console.error("Failed to fetch get app commodity card:", error); console.error('Failed to fetch get app commodity card:', error)
onsole.error("error:" + error.response.errorMsg); console.error('error:' + error.response.errorMsg)
throw error; throw error
} }
}; }
// 下单充值 // 下单充值
export const payPlaceAnOrderRecharge = async (data) => { export const payPlaceAnOrderRecharge = async (data) => {
try { try {
const response = await post("/order/web/pay/recharge", data); const response = await post('/order/web/pay/recharge', data)
return response; return response
} catch (error) { } catch (error) {
console.error("Failed to fetch get pay application:", error); console.error('Failed to fetch get pay application:', error)
throw error; throw error
} }
}; }