import { http } from '@/utils/service.js' const prefix = 'visitsAdmin/cloudService/web/customer' export const customerLogin = (data) => http({ url: `${prefix}/loginByPhone`, method: 'post', data }) export const customerSendLoginSms = (data) => http({ url: `${prefix}/sendLoginSms`, method: 'post', data: { phone: data.phone } }) export const customerGetUserInfo = () => http({ url: `${prefix}/getUserInfo`, method: 'get' }) export const customerLogout = () => http({ url: `${prefix}/logout`, method: 'post' }) export const customerWxAuthorize = (data) => http({ url: 'visitsAdmin/cloudService/web/visitor/ywWxAuthorize', method: 'get', data: { ...data, userType: 1 } }) export const customerBanners = () => http({ url: `${prefix}/banners`, method: 'get' }) export const customerHome = () => http({ url: `${prefix}/home`, method: 'get' }) export const customerDevicePage = (data) => http({ url: `${prefix}/device/page`, method: 'post', data }) export const customerDeviceDetail = (data) => http({ url: `${prefix}/device/detail`, method: 'get', data }) export const customerRechargeRecordPage = (data) => http({ url: `${prefix}/rechargeRecord/page`, method: 'post', data }) export const customerContractPage = (data) => http({ url: `${prefix}/contract/page`, method: 'post', data }) export const customerContractDetail = (id, billType = 0) => http({ url: `${prefix}/contract/${id}`, method: 'get', data: { billType } }) export const customerBillPage = (data) => http({ url: `${prefix}/bill/page`, method: 'post', data }) export const customerBillDetail = (id) => http({ url: `${prefix}/bill/${id}`, method: 'get' }) export const customerPayCreate = (data) => http({ url: `${prefix}/pay/createOrder`, method: 'post', data }) export const customerPayQuery = (orderNo) => http({ url: `${prefix}/pay/query/${orderNo}`, method: 'get' })