初始版本
This commit is contained in:
52
staff_uniapp/src/api/account.ts
Normal file
52
staff_uniapp/src/api/account.ts
Normal file
@@ -0,0 +1,52 @@
|
||||
import { client } from '@/utils/client'
|
||||
import request from '@/utils/request'
|
||||
// #ifdef H5
|
||||
import { getSignLink } from '@/hooks/wechat'
|
||||
// #endif
|
||||
|
||||
// 登录
|
||||
export function login(data: Record<string, any>) {
|
||||
return request.post({ url: '/login/account', data: { ...data, terminal: client } })
|
||||
}
|
||||
|
||||
//注册
|
||||
export function register(data: Record<string, any>) {
|
||||
return request.post({ url: '/login/register', data: { ...data, channel: client } })
|
||||
}
|
||||
|
||||
//向微信请求code的链接
|
||||
export function getWxCodeUrl(data: Record<string, any>) {
|
||||
return request.get({ url: '/login/codeUrl', data })
|
||||
}
|
||||
|
||||
export function OALogin(data: Record<string, any>) {
|
||||
return request.post({ url: '/login/oaLogin', data })
|
||||
}
|
||||
|
||||
export function mnpLogin(data: Record<string, any>) {
|
||||
return request.post({ url: '/login/mnpLogin', data })
|
||||
}
|
||||
|
||||
//微信sdk配置
|
||||
export const apiJsConfig = () =>
|
||||
request.get({ url: '/wechat/jsConfig', data: { url: getSignLink() } })
|
||||
|
||||
//更新微信小程序头像昵称
|
||||
export function updateUser(data: Record<string, any>, header: any) {
|
||||
return request.post({ url: '/login/updateUser', data, header })
|
||||
}
|
||||
|
||||
//小程序绑定微信
|
||||
export function mnpAuthBind(data: Record<string, any>) {
|
||||
return request.post({ url: '/login/mnpAuthBind', data })
|
||||
}
|
||||
|
||||
//公众号绑定微信
|
||||
export function oaAuthBind(data: Record<string, any>) {
|
||||
return request.post({ url: '/login/oaAuthBind', data })
|
||||
}
|
||||
|
||||
//佣金明细列表
|
||||
export function userMoneyList(data?: any) {
|
||||
return request.get({ url: '/finance/lists', data })
|
||||
}
|
||||
105
staff_uniapp/src/api/app.ts
Normal file
105
staff_uniapp/src/api/app.ts
Normal file
@@ -0,0 +1,105 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
//发送短信
|
||||
export function smsSend(data: any) {
|
||||
return request.post({ url: '/sms/sendCode', data: data })
|
||||
}
|
||||
|
||||
export function getConfig() {
|
||||
return request.get({ url: '/config/config' })
|
||||
}
|
||||
|
||||
export function getPolicy() {
|
||||
return request.get({ url: '/config/agreement' })
|
||||
}
|
||||
|
||||
export function uploadImage(file: any, token?: string) {
|
||||
return request.uploadFile({
|
||||
url: '/upload/image',
|
||||
filePath: file,
|
||||
name: 'file',
|
||||
header: {
|
||||
token
|
||||
},
|
||||
fileType: 'image'
|
||||
})
|
||||
}
|
||||
|
||||
export function wxJsConfig(data: any) {
|
||||
return request.get({ url: '/wechat/jsConfig', data })
|
||||
}
|
||||
|
||||
//获取城市列表
|
||||
export function getCityList(data?: any) {
|
||||
return request.get({ url: '/city/getCityLists', data })
|
||||
}
|
||||
|
||||
//获取其他列表
|
||||
export function getOtherList(data?: any) {
|
||||
return request.get({ url: '/coach/otherLists', data })
|
||||
}
|
||||
|
||||
//获取技能列表
|
||||
export function getSkillList(data?: any) {
|
||||
return request.get({ url: '/coach/skillLists', data })
|
||||
}
|
||||
|
||||
//获取服务项目列表
|
||||
export function getGoodsList(data?: any) {
|
||||
return request.get({ url: '/goods/lists', data })
|
||||
}
|
||||
|
||||
//获取服务项目详情
|
||||
export function getGoodsDetail(data?: any) {
|
||||
return request.get({ url: '/goods/detail', data })
|
||||
}
|
||||
|
||||
//申请技师
|
||||
export function apply(data?: any) {
|
||||
return request.post({ url: '/coach/apply', data })
|
||||
}
|
||||
|
||||
//获取订单列表
|
||||
export function getOrderList(data?: any) {
|
||||
return request.get({ url: '/order/lists', data })
|
||||
}
|
||||
|
||||
//提现配置列表
|
||||
export function withdrawConfigLists(data?: any) {
|
||||
return request.get({ url: '/withdraw/configLists', data })
|
||||
}
|
||||
|
||||
//提现配置
|
||||
export function withdrawConfig(data?: any) {
|
||||
return request.get({ url: '/withdraw/getWithDrawWay', data })
|
||||
}
|
||||
|
||||
//设置提现配置
|
||||
export function setWithdrawConfig(data?: any) {
|
||||
return request.post({ url: '/withdraw/setWithDrawWay', data })
|
||||
}
|
||||
|
||||
//财务明细列表
|
||||
export function apiFinanceLists(data?: any) {
|
||||
return request.get({ url: '/finance/lists', data })
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param { Object } params { location: xxx,xxx }
|
||||
* @return { Promise }
|
||||
* @description 地址逆解析
|
||||
*/
|
||||
export const getGeocoderCoordinate = (params: any) =>
|
||||
request.get({ url: '/city/geocoderCoordinate', data: params })
|
||||
|
||||
//获取附近地址
|
||||
export const getNearbyLocation = (params: any) =>
|
||||
request.get({ url: '/city/getNearbyLocation', data: params })
|
||||
|
||||
/**
|
||||
* @param { Object } params
|
||||
* @return { Promise }
|
||||
* @description 获取地级市列表 以首字母排序
|
||||
*/
|
||||
export const apiRegionCity = (params: any) => request.get({ url: '/city/city', data: params })
|
||||
31
staff_uniapp/src/api/business.ts
Normal file
31
staff_uniapp/src/api/business.ts
Normal file
@@ -0,0 +1,31 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
//商家列表
|
||||
export function ShopList(data?: any) {
|
||||
return request.get({ url: '/shop/lists', data })
|
||||
}
|
||||
|
||||
//申请结果
|
||||
export function applyDetail(data?: any) {
|
||||
return request.get({ url: '/shop/applyDetail', data })
|
||||
}
|
||||
|
||||
//申请
|
||||
export function apply(data?: any) {
|
||||
return request.post({ url: '/shop/applyJoin', data })
|
||||
}
|
||||
|
||||
//取消申请
|
||||
export function cancelApply(data?: any) {
|
||||
return request.post({ url: '/shop/cancel', data })
|
||||
}
|
||||
|
||||
//退出商家
|
||||
export function quitShop(data?: any) {
|
||||
return request.post({ url: '/shop/applyQuit', data })
|
||||
}
|
||||
|
||||
//商家详情
|
||||
export function ShopDetail(data?: any) {
|
||||
return request.get({ url: '/shop/detail', data })
|
||||
}
|
||||
18
staff_uniapp/src/api/cashOut.ts
Normal file
18
staff_uniapp/src/api/cashOut.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
//获取提现配置
|
||||
export function getCashOutConfig(data?: any) {
|
||||
return request.post({ url: '/withdraw/getWithDrawInfo', data })
|
||||
}
|
||||
|
||||
export function toCashOut(data?: any) {
|
||||
return request.post({ url: '/withdraw/apply', data })
|
||||
}
|
||||
|
||||
export function listData(data?: any) {
|
||||
return request.get({ url: '/withdraw/logLists', data })
|
||||
}
|
||||
|
||||
export function userWithdrawDetail(data?: any) {
|
||||
return request.get({ url: '/withdraw/detail', data })
|
||||
}
|
||||
11
staff_uniapp/src/api/coach.ts
Normal file
11
staff_uniapp/src/api/coach.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
//获取技师服务时间
|
||||
export function getWorkTime() {
|
||||
return request.get({ url: '/coach/getServerTime' })
|
||||
}
|
||||
|
||||
//设置技师服务时间
|
||||
export function setWorkTime(data: any) {
|
||||
return request.post({ url: '/coach/setServerTime', data })
|
||||
}
|
||||
17
staff_uniapp/src/api/goods.ts
Normal file
17
staff_uniapp/src/api/goods.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
/**
|
||||
* @param { Object } params
|
||||
* @return { Promise }
|
||||
* @description 获取商品评价列表
|
||||
*/
|
||||
export const apiEvaluateGoodsLists = (params: any) =>
|
||||
request.get({ url: '/goods_comment/lists', data: params })
|
||||
|
||||
/**
|
||||
* @param { Object } params
|
||||
* @return { Promise }
|
||||
* @description 获取商品评价分类列表
|
||||
*/
|
||||
export const apiEvaluateGoodsCategory = (params: any) =>
|
||||
request.get({ url: '/goods_comment/commentCategory', data: params })
|
||||
52
staff_uniapp/src/api/news.ts
Normal file
52
staff_uniapp/src/api/news.ts
Normal file
@@ -0,0 +1,52 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
/**
|
||||
* @description 获取文章分类
|
||||
* @return { Promise }
|
||||
*/
|
||||
export function getArticleCate() {
|
||||
return request.get({ url: '/article/cate' })
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 获取文章列表
|
||||
* @return { Promise }
|
||||
*/
|
||||
export function getArticleList(data: Record<string, any>) {
|
||||
return request.get({ url: '/article/lists', data: data })
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 获取文章详情
|
||||
* @param { number } id
|
||||
* @return { Promise }
|
||||
*/
|
||||
export function getArticleDetail(data: { id: number }) {
|
||||
return request.get({ url: '/article/detail', data: data })
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 加入收藏
|
||||
* @param { number } id
|
||||
* @return { Promise }
|
||||
*/
|
||||
export function addCollect(data: { id: number }) {
|
||||
return request.post({ url: '/article/addCollect', data: data }, { isAuth: true })
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 取消收藏
|
||||
* @param { number } id
|
||||
* @return { Promise }
|
||||
*/
|
||||
export function cancelCollect(data: { id: number }) {
|
||||
return request.post({ url: '/article/cancelCollect', data: data }, { isAuth: true })
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 获取收藏列表
|
||||
* @return { Promise }
|
||||
*/
|
||||
export function getCollect() {
|
||||
return request.get({ url: '/article/collect' })
|
||||
}
|
||||
32
staff_uniapp/src/api/order.ts
Normal file
32
staff_uniapp/src/api/order.ts
Normal file
@@ -0,0 +1,32 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
//获取订单详情
|
||||
export function getOrderDetail(data: Record<string, any>) {
|
||||
return request.get({ url: '/order/detail', data })
|
||||
}
|
||||
|
||||
//接单
|
||||
export function takeOrder(data: Record<string, any>) {
|
||||
return request.post({ url: '/order/take', data })
|
||||
}
|
||||
//出发
|
||||
export function depart(data: Record<string, any>) {
|
||||
return request.post({ url: '/order/depart', data })
|
||||
}
|
||||
//到达
|
||||
export function arrive(data: Record<string, any>) {
|
||||
return request.post({ url: '/order/arrive', data })
|
||||
}
|
||||
//服务开始
|
||||
export function startServer(data: Record<string, any>) {
|
||||
return request.post({ url: '/order/startServer', data })
|
||||
}
|
||||
//服务完成
|
||||
export function finishServer(data: Record<string, any>) {
|
||||
return request.post({ url: '/order/finishServer', data })
|
||||
}
|
||||
|
||||
// 收入列表
|
||||
export function getInComeLists(data: Record<string, any>) {
|
||||
return request.get({ url: '/order/incomeLists', data })
|
||||
}
|
||||
25
staff_uniapp/src/api/pay.ts
Normal file
25
staff_uniapp/src/api/pay.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
import request from '@/utils/request'
|
||||
import { client } from '@/utils/client'
|
||||
|
||||
//支付方式
|
||||
export function getPayWay(data?: any) {
|
||||
return request.get({ url: '/pay/payWay', data: { ...data, scene: client } }, { isAuth: true })
|
||||
}
|
||||
|
||||
// 预支付
|
||||
export function prepay(data: any) {
|
||||
return request.post({ url: '/pay/prepay', data }, { isAuth: true })
|
||||
}
|
||||
|
||||
// 预支付
|
||||
export function getPayResult(data: any) {
|
||||
return request.get({ url: '/pay/getPayResult', data }, { isAuth: true })
|
||||
}
|
||||
|
||||
//跳转支付
|
||||
export const apiJumpPayPrepay = (params: any,token:string) => request.post({ url: '/pay/prepay', data: params, header: {token:token}})
|
||||
|
||||
//跳转支付结果
|
||||
export function apiJumpPayResult(params: any,token:string) {
|
||||
return request.get({ url: '/pay/getPayResult', data: params, header: {token:token} })
|
||||
}
|
||||
28
staff_uniapp/src/api/shop.ts
Normal file
28
staff_uniapp/src/api/shop.ts
Normal file
@@ -0,0 +1,28 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
//首页数据
|
||||
export function getIndex() {
|
||||
return request.get({ url: '/index/index' })
|
||||
}
|
||||
|
||||
// 装修页面
|
||||
export function getDecorate(data: any) {
|
||||
return request.get({ url: '/decorate/page', data }, { ignoreCancel: true })
|
||||
}
|
||||
|
||||
// 底部导航
|
||||
export function getDecorateTabbar() {
|
||||
return request.get({ url: '/decorate/tabbar' }, { ignoreCancel: true })
|
||||
}
|
||||
|
||||
// 系统风格
|
||||
export function getDecorateStyle() {
|
||||
return request.get({ url: '/decorate/style' }, { ignoreCancel: true })
|
||||
}
|
||||
/**
|
||||
* @description 热门搜索
|
||||
* @return { Promise }
|
||||
*/
|
||||
export function getHotSearch() {
|
||||
return request.get({ url: '/search/hotLists' })
|
||||
}
|
||||
83
staff_uniapp/src/api/user.ts
Normal file
83
staff_uniapp/src/api/user.ts
Normal file
@@ -0,0 +1,83 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function getUserCenter(header?: any) {
|
||||
return request.get({ url: '/coach/center', header }, { ignoreCancel: true })
|
||||
}
|
||||
|
||||
// 实名信息
|
||||
export function getCoachInfo(header?: any) {
|
||||
return request.get({ url: '/coach/info', header })
|
||||
}
|
||||
|
||||
// 个人信息
|
||||
export function getUserInfo() {
|
||||
return request.get({ url: '/coach/personalData' }, { isAuth: true })
|
||||
}
|
||||
|
||||
// 个人编辑
|
||||
export function userEdit(data: any) {
|
||||
return request.post({ url: '/coach/setPersonalData', data }, { isAuth: true })
|
||||
}
|
||||
|
||||
// 绑定手机
|
||||
export function userBindMobile(data: any, header?: any) {
|
||||
return request.post({ url: '/coach/bindMobile', data, header }, { isAuth: true })
|
||||
}
|
||||
|
||||
// 微信电话
|
||||
export function userMnpMobile(data: any) {
|
||||
return request.post({ url: '/user/getMobileByMnp', data }, { isAuth: true })
|
||||
}
|
||||
|
||||
// 更改密码
|
||||
export function userChangePwd(data: any) {
|
||||
return request.post({ url: '/login/changePassword', data }, { isAuth: true })
|
||||
}
|
||||
|
||||
//忘记密码
|
||||
export function forgotPassword(data: Record<string, any>) {
|
||||
return request.post({ url: '/login/resetPassword', data })
|
||||
}
|
||||
|
||||
//余额明细
|
||||
export function accountLog(data: any) {
|
||||
return request.get({ url: '/account_log/lists', data })
|
||||
}
|
||||
|
||||
//修改技师状态
|
||||
export function editStatus(data?: any) {
|
||||
return request.get({ url: '/coach/updateWorkStatus', data })
|
||||
}
|
||||
|
||||
//修改定位
|
||||
export function editLocation(data?: any) {
|
||||
return request.get({ url: '/coach/updateLocation', data })
|
||||
}
|
||||
|
||||
//获取保证金套餐
|
||||
export function getDepositList(data?: any) {
|
||||
return request.get({ url: '/deposit/depositPackage', data })
|
||||
}
|
||||
|
||||
//获取技师详情
|
||||
export function getCoachDetail() {
|
||||
return request.get({ url: '/coach/detail' })
|
||||
}
|
||||
|
||||
//更新技师资料
|
||||
export function updateCoach(data?: any) {
|
||||
return request.post({ url: '/coach/updateInfo', data })
|
||||
}
|
||||
|
||||
//充值保证金
|
||||
export function apiRechargeDeposit(data: any) {
|
||||
return request.post({ url: '/deposit/sumbitOrder', data }, { isAuth: true })
|
||||
}
|
||||
|
||||
//获取技师完善资料详情
|
||||
export function getUpdateInfoDetail(data?: any) {
|
||||
return request.get({ url: '/coach/updateInfoDetail', data })
|
||||
}
|
||||
|
||||
export const getKefuConfig = (params?: any) =>
|
||||
request.post({ url: '/config/getKefuConfig', data: params })
|
||||
Reference in New Issue
Block a user