第一次提交

This commit is contained in:
gxwebsoft
2023-08-04 13:14:48 +08:00
commit 1b923e5cff
1030 changed files with 128016 additions and 0 deletions

24
api/apps-bc-agent.js Normal file
View File

@@ -0,0 +1,24 @@
import http from './index.js';
// 分页查询余额明细
export const pageAgentUser = (params) => http.get('/open/bc-agent/page', {params})
// 分页查询余额明细
export const listAgentUser = (params) => http.get('/open/bc-agent', {params})
// 查询余额明细
export const getAgentUser = (AgentUserId) => http.get('/open/bc-agent/' + AgentUserId)
// 添加余额明细
export const addAgentUser = (data) => http.post('/open/bc-agent', data)
// 删除余额明细
export const removeAgentUser = (id) => http.get('/open/user-balance-log/remove/' + id)
export default {
pageAgentUser,
listAgentUser,
getAgentUser,
addAgentUser,
removeAgentUser
}

24
api/apps-bc-plan.js Normal file
View File

@@ -0,0 +1,24 @@
import http from './index.js';
// 分页查询发布菜品
export const pageBCPlan = (params) => http.get('/apps/bc-plan/page', {params})
// 查询全部发布菜品
export const listBCPlan = (params) => http.get('/apps/bc-plan', {params})
// 查询单天发布菜品
export const getBCPlan = (orderId) => http.get('/apps/bc-plan/' + orderId)
// 发布菜品
export const addBCPlan = (data) => http.post('/apps/bc-plan', data)
// 删除发布菜品
export const removeBCPlan = (id) => http.get('/apps/bc-plan/remove/' + id)
export default {
pageBCPlan,
listBCPlan,
getBCPlan,
addBCPlan,
removeBCPlan
}

31
api/apps-bc-temporary.js Normal file
View File

@@ -0,0 +1,31 @@
import http from './index.js';
// 分页查询临时报餐
export const pageTemporary = (params) => http.get('/apps/bc-temporary/page', {params})
// 分页查询临时报餐
export const pageTemporaryUser = (params) => http.get('/open/bc-temporary/page', {params})
// 分页查询临时报餐
export const listTemporaryUser = (params) => http.get('/open/bc-temporary', {params})
// 查询临时报餐
export const getTemporaryUser = (TemporaryUserId) => http.get('/open/bc-temporary/' + TemporaryUserId)
// 修改
export const updateTemporary = (data) => http.put('/apps/bc-temporary', data)
export const removeTemporary = (id) => http.delete('/apps/bc-temporary/' + id)
// 申请临时报餐
export const applyTemporary = (data) => http.post('/apps/bc-temporary/apply', data)
export default {
updateTemporary,
pageTemporary,
pageTemporaryUser,
listTemporaryUser,
getTemporaryUser,
applyTemporary,
removeTemporary
}

29
api/article-comment.js Normal file
View File

@@ -0,0 +1,29 @@
import http from './index.js';
// 分页查询文章评论
export const pageArticleComment = (params) => http.get('/cms/article-comment/page', {params})
// 查询文章评论
export const getArticleComment = (ArticleCommentId) => http.get('/cms/article-comment/' + ArticleCommentId)
// 查询全部评论
export const listArticleComment = (params) => http.get('/cms/article-comment', {params})
// 添加文章评论
export const addArticleComment = (data) => http.post('/cms/article-comment', data)
// 删除文章评论
export const removeArticleComment = (id) => http.delete('/cms/article-comment/' + id)
// 未读评论数
export const getArticleCommentUnreadCount = () => http.get('/cms/article-comment/unread')
export default {
pageArticleComment,
listArticleComment,
getArticleComment,
addArticleComment,
removeArticleComment,
getArticleCommentUnreadCount
}

24
api/article-like.js Normal file
View File

@@ -0,0 +1,24 @@
import http from './index.js';
// 分页查询文章点赞
export const pageArticleLike = (params) => http.get('/cms/article-like/page', {params})
// 查询文章点赞
export const getArticleLike = (ArticleLikeId) => http.get('/cms/article-like/' + ArticleLikeId)
// 查询全部文字
export const listArticleLike = (params) => http.get('/cms/article-like', {params})
// 添加文章点赞
export const addArticleLike = (data) => http.post('/cms/article-like', data)
// 删除文章点赞
export const removeArticleLike = (id) => http.delete('/cms/article-like/' + id)
export default {
pageArticleLike,
listArticleLike,
getArticleLike,
addArticleLike,
removeArticleLike
}

25
api/article.js Normal file
View File

@@ -0,0 +1,25 @@
import http from './index.js';
// 分页查询文章
export const pageArticle = (params) => http.get('/cms/article/page', {params})
// 查询文章
export const getArticle = (articleId) => http.get('/cms/article/' + articleId)
// 查询全部文字
export const listArticle = (params) => http.get('/cms/article', {params})
// 添加文章
export const addArticle = (data) => http.post('/cms/article', data)
// 删除文章
export const removeArticle = (id) => http.delete('/cms/article/' + id)
export default {
pageArticle,
listArticle,
getArticle,
addArticle,
removeArticle
}

24
api/balance-log.js Normal file
View File

@@ -0,0 +1,24 @@
import http from './index.js';
// 分页查询余额明细
export const pageBalanceLog = (params) => http.get('/shop/user-balance-log/page', {params})
// 分页查询余额明细
export const listBalanceLog = (params) => http.get('/shop/user-balance-log', {params})
// 查询余额明细
export const getBalanceLog = (balanceLogId) => http.get('/shop/user-balance-log/' + balanceLogId)
// 添加余额明细
export const addBalanceLog = (data) => http.post('/shop/user-balance-log', data)
// 删除余额明细
export const removeBalanceLog = (id) => http.get('/open/user-balance-log/remove/' + id)
export default {
pageBalanceLog,
listBalanceLog,
getBalanceLog,
addBalanceLog,
removeBalanceLog
}

23
api/cart.js Normal file
View File

@@ -0,0 +1,23 @@
import http from './index.js';
// 查询购物车商品
export const showCart = (data) => http.post('/apps/bc-cart/showCart',data)
// 添加购物车
export const addCart = (data) => http.post('/apps/bc-cart/addCart', data)
export const addCartPro = (data) => http.post('/apps/bc-cart/addCart',data)
// 清空购物车
export const clearCart = () => http.get('/apps/bc-cart/clearCart')
// 生成订单
export const createOrder = (data) => http.post('/apps/bc-cart/createOrder', data)
// 清空购物车
export const removeCart = () => http.get('/apps/bc-cart/removeCart')
export default {
showCart,
addCart,
addCartPro,
createOrder,
removeCart
}

21
api/categoty.js Normal file
View File

@@ -0,0 +1,21 @@
import http from './index.js';
// 分页查询商品分类
export const pageCategory = (params) => http.get('/open/category/page', {params})
// 分页查询全部商品分类
export const listCategory = (params) => http.get('/open/category', {params})
// 查询商品分类
export const getCategory = (categoryId) => http.get('/open/category/' + categoryId)
// 添加商品分类
export const addCategory = (data) => http.post('/open/category', data)
export default {
pageCategory,
listCategory,
getCategory,
addCategory
}

19
api/chat.js Normal file
View File

@@ -0,0 +1,19 @@
import http from './index.js';
export const getConversationList = () => http.get('/love/chat-conversation/app')
export const sendMessage = (data) => http.post('/love/chat-message/app/send', data)
export const getFriemdMessages = (friendId) => http.get('/love/chat-message/app/list/' + friendId)
export const postMarkRead = (data) => http.post('/love/chat-conversation/app/read', data)
export const removeConversation = (id) => http.delete('/love/chat-conversation/' + id)
export default {
getConversationList,
sendMessage,
getFriemdMessages,
postMarkRead,
removeConversation
}

10
api/chatgpt.js Normal file
View File

@@ -0,0 +1,10 @@
import http from './index.js';
// 提交问题
export const chat = (data) => http.post('https://chatgpt.websoft.top/api/open/chat/chat', data)
// export const chat = (data) => http.post('/open/chat/chat', data)
export default {
chat
}

16
api/demo.js Normal file
View File

@@ -0,0 +1,16 @@
import http from './index.js';
// 添加购物车
export const ServerTime = () => http.post('http://127.0.0.1:9090/hxz/v1/ServerTime')
export const QRCodeTransaction = (data) => http.post('http://127.0.0.1:9090/hxz/v1/QRCodeTransaction',data)
export const QRCodeTransaction2 = (data) => http.post('https://server.gxwebsoft.com/hxz/v1/QRCodeTransaction',data)
export const TransactionInquiry = (data) => http.post('http://127.0.0.1:9090/hxz/v1/TransactionInquiry',data)
export default {
ServerTime,
QRCodeTransaction,
QRCodeTransaction2,
TransactionInquiry
}

12
api/dict.js Normal file
View File

@@ -0,0 +1,12 @@
import http from './index.js';
// 读取字典数据
export const getDictionaryOptions = (params) => http.get('/system/dict-data', {params})
export const listDictionary = (params) => http.get('/system/dict/tree', {params})
export default {
getDictionaryOptions,
listDictionary
}

20
api/equipment-goods.js Normal file
View File

@@ -0,0 +1,20 @@
import http from './index.js';
// 分页查询设备列表
export const pageEquipmentGoods = (params) => http.get('/apps/equipment-goods/page', {params})
// 查询设备
export const getEquipmentGoods = (goodsId) => http.get('/apps/equipment-goods/' + goodsId)
// 绑定设备
export const bindEquipment = (data) => http.post('/open/equipment/bind', data)
// 绑定设备
export const changeEquipment = (data) => http.post('/open/equipment/change', data)
export default {
pageEquipmentGoods,
getEquipmentGoods,
bindEquipment,
changeEquipment
}

20
api/equipment.js Normal file
View File

@@ -0,0 +1,20 @@
import http from './index.js';
// 分页查询设备列表
export const pageEquipment = (params) => http.get('/apps/equipment/page', {params})
// 查询设备
export const getEquipment = (equipmentId) => http.get('/apps/equipment/' + equipmentId)
// 绑定设备
export const bindEquipment = (data) => http.post('/open/equipment/bind', data)
// 绑定设备
export const changeEquipment = (data) => http.post('/open/equipment/change', data)
export default {
pageEquipment,
getEquipment,
bindEquipment,
changeEquipment
}

28
api/goods.js Normal file
View File

@@ -0,0 +1,28 @@
import http from './index.js';
// 分页查询商品
export const pageGoods = (params) => http.get('/open/goods/page', {params})
// 分页查询全部商品
export const listGoods = (params) => http.get('/open/goods', {params})
// 查询商品
export const getGoods = (GoodsId) => http.get('/open/Goods/' + GoodsId)
// 添加商品
export const addGoods = (data) => http.post('/shop/Goods', data)
// 查询菜品列表
export const getFoodList = (params) => http.get('/apps/bc-food/getFoodList', {params})
// 查询一周菜谱
export const getWeekFood = (params) => http.get('/apps/bc-food/getWeekFood', {params})
export default {
pageGoods,
listGoods,
getGoods,
addGoods,
getFoodList,
getWeekFood
}

28
api/house-info.js Normal file
View File

@@ -0,0 +1,28 @@
import http from './index.js';
// 分页查询房源信息
export const pageHouseInfo = (params) => http.get('/house/info/page', {params})
// 查询全部房源信息
export const listHouseInfo = (params) => http.get('/house/info', {params})
// 查询房源信息(当期登录用户)
export const getHouseInfo = (userId) => http.get('/house/info/' + userId)
// 查询会员资料
export const getUserDetail = (userId) => http.get('/house/info/detail/' + userId)
// 新增房源信息
export const addHouseInfo = (data) => http.post('/house/info', data)
// 删除房源信息
export const removeHouseInfo = (id) => http.get('/house/info/remove/' + id)
export default {
pageHouseInfo,
listHouseInfo,
getHouseInfo,
getUserDetail,
removeHouseInfo,
addHouseInfo
}

24
api/house-reservation.js Normal file
View File

@@ -0,0 +1,24 @@
import http from './index.js';
// 分页查询房源信息
export const pageHouseReservation = (params) => http.get('/house/reservation/page', {params})
// 查询全部房源信息
export const listHouseReservation = (params) => http.get('/house/reservation', {params})
// 查询房源信息(当期登录用户)
export const getHouseReservation = (userId) => http.get('/house/reservation/' + userId)
// 新增房源信息
export const addHouseReservation = (data) => http.post('/house/reservation', data)
// 删除房源信息
export const removeHouseReservation = (id) => http.get('/house/reservation/remove/' + id)
export default {
pageHouseReservation,
listHouseReservation,
getHouseReservation,
removeHouseReservation,
addHouseReservation
}

85
api/index.js Normal file
View File

@@ -0,0 +1,85 @@
import Request from 'luch-request'
import storage from '@/utils/storage'
import {
apiUrl,
tenantId,
appId,
appSecret
} from '@/config.js';
import {
getSign
} from '@/utils/util.js'
import {
ACCESS_TOKEN
} from '@/store/mutation-types'
const http = new Request();
/**
* @description 修改全局默认配置
* @param {Function}
*/
http.setConfig((config) => {
/* config 为默认全局配置*/
config.baseURL = apiUrl; /* 根域名 */
return config
})
// 拦截器(请求之前拦截)
http.interceptors.request.use((config) => { // 可使用async await 做异步操作
const token = storage.get(ACCESS_TOKEN)
config.header = {
...config.header,
tenantId
}
if(token){
config.header.Authorization = token
config.header.appId = appId
}
if (config.data) {
config.data.tenantId = tenantId
}
if (!token) {
// 如果token不存在需要加签
config.params.tenantId = tenantId
config.params.sign = getSign(config.params,appSecret);
}else {
}
/**
/* 演示
if (!token) { // 如果token不存在return Promise.reject(config) 会取消本次请求
return Promise.reject(config)
}
**/
return config
}, config => { // 可使用async await 做异步操作
return Promise.reject(config)
})
// 拦截器(请求之后拦截)
http.interceptors.response.use((response) => {
/* 对响应成功做点什么 可使用async await 做异步操作*/
// if (response.data.code !== 200) { // 服务端返回的状态码不等于200则reject()
// return Promise.reject(response) // return Promise.reject 可使promise状态进入catch
// if (response.config.custom.verification) { // 演示自定义参数的作用
// return response.data
// }
// token过期
if (response.data.code == 401) {
}
if (response.data.code == 1) {
return Promise.reject(response.data)
}
return response.data
}, (response) => {
/* 对响应错误做点什么 statusCode !== 200*/
console.log(response)
return Promise.reject(response)
})
export default http

74
api/login.js Normal file
View File

@@ -0,0 +1,74 @@
import http from './index.js';
import {
apiUrl,
fileUrl,
accessKey,
userId
} from '@/config.js';
import {
ACCESS_TOKEN,
USER_ID,
USER_INFO
} from '@/store/mutation-types'
import store from '@/store'
import storage from '@/utils/storage'
// 免密登录
export const getToken = () => http.get(apiUrl + '/token/' + userId + '/' + accessKey + '/').then(result => {
console.log("免密登录: ", result);
const {
access_token,
user
} = result.data
// 过期时间30天
const expiryTime = 30 * 86400
// 保存tokne和userId到缓存
storage.set(USER_ID, user.userId, expiryTime)
storage.set(USER_INFO, user, expiryTime)
storage.set(ACCESS_TOKEN, access_token, expiryTime)
store.dispatch('setToken', access_token)
store.dispatch('setUserId', user.userId)
})
// 获取图形验证码
export const getCaptcha = (params) => http.get('/captcha', {
params
})
// 发送短信验证码
export const sendSmsCaptcha = (params) => http.post('/open/sendSmsCaptcha', {
params
})
// 获取微信openId
export const getWxOpenId = (data) => http.post('/wx-login/getWxOpenId', data)
// 支付宝授权码换取userId
export const getAuthCode = (data) => http.post('/open/login-alipay/getAuthCode', data)
// 微信手机号码登录
export const loginMpWxMobile = (data) => http.post('/wx-login/loginByMpWxPhone', data)
// 获取支付宝手机号码
export const getPhoneNumber = (data, config) => http.post('/shop/payment/getPhoneNumber', data, config)
// 支付宝登录
export const alipayLogin = (data) => http.post('/login-alipay/login', data)
// 支付宝用户注册
export const register = (data) => http.post('/login-alipay/register', data)
// 游客登录
export const login = (data) => http.post('/login', data)
export default {
getToken,
getWxOpenId,
getCaptcha,
sendSmsCaptcha,
getAuthCode,
getPhoneNumber,
alipayLogin,
login
}

24
api/love-certificate.js Normal file
View File

@@ -0,0 +1,24 @@
import http from './index.js';
// 分页查询会员证件
export const pageCertificate = (params) => http.get('/love/certificate/page', {params})
// 查询全部会员证件
export const listCertificate = (params) => http.get('/love/certificate', {params})
// 上传会员证件
export const addCertificate = (data) => http.post('/love/certificate', data)
// 修改会员证件
export const updateCertificate = (data) => http.put('/love/certificate', data)
// 删除会员证件
export const removeCertificate = (id) => http.delete('/love/certificate/' + id)
export default {
pageCertificate,
listCertificate,
addCertificate,
updateCertificate,
removeCertificate
}

24
api/love-profit.js Normal file
View File

@@ -0,0 +1,24 @@
import http from './index.js';
// 分页查询收益明细
export const pageProfit = (params) => http.get('/love/profit/page', {params})
// 分页查询收益明细
export const listProfit = (params) => http.get('/love/profit', {params})
// 查询收益明细
export const getProfit = (balanceLogId) => http.get('/love/profit/' + balanceLogId)
// 添加收益明细
export const addProfit = (data) => http.post('/love/profit', data)
// 删除收益明细
export const removeProfit = (id) => http.get('/love/profit/remove/' + id)
export default {
pageProfit,
listProfit,
getProfit,
addProfit,
removeProfit
}

View File

@@ -0,0 +1,24 @@
import http from './index.js';
// 分页查询会员权益
export const pageUserPlanEquity = (params) => http.get('/love/user-plan-equity/page', {params})
// 查询全部会员权益
export const listUserPlanEquity = (params) => http.get('/love/user-plan-equity', {params})
// 修改会员权益
export const addUserPlanEquity = (data) => http.post('/love/user-plan-equity', data)
// 删除会员权益
export const removeUserPlanEquity = (id) => http.delete('/love/user-plan-equity/' + id)
// 创建会员订单记录
export const getPlanByPriceId = (priceId) => http.get('/love/user-plan-equity/getPlanByPriceId/' + priceId)
export default {
pageUserPlanEquity,
listUserPlanEquity,
addUserPlanEquity,
removeUserPlanEquity,
getPlanByPriceId
}

24
api/love-user-plan-log.js Normal file
View File

@@ -0,0 +1,24 @@
import http from './index.js';
// 分页查询购买记录
export const pageUserPlanLog = (params) => http.get('/love/user-plan-log/page', {params})
// 查询全部购买记录
export const listUserPlanLog = (params) => http.get('/love/user-plan-log', {params})
// 修改购买记录
export const addUserPlanLog = (data) => http.post('/love/user-plan-log', data)
// 删除购买记录
export const removeUserPlanLog = (id) => http.delete('/love/user-plan-log/' + id)
// 创建会员订单记录
export const getPlanByPriceId = (priceId) => http.get('/love/user-plan-log/getPlanByPriceId/' + priceId)
export default {
pageUserPlanLog,
listUserPlanLog,
addUserPlanLog,
removeUserPlanLog,
getPlanByPriceId
}

24
api/love-user-plan.js Normal file
View File

@@ -0,0 +1,24 @@
import http from './index.js';
// 分页查询会员套餐
export const pageUserPlan = (params) => http.get('/love/user-plan/page', {params})
// 查询全部会员套餐
export const listUserPlan = (params) => http.get('/love/user-plan', {params})
// 查询会员套餐信息
export const getUserPlan = (id) => http.get('/love/user-plan/' + id)
// 修改会员套餐
export const addUserPlan = (data) => http.post('/love/user-plan', data)
// 删除会员套餐
export const removeUserPlan = (id) => http.delete('/love/user-plan/' + id)
export default {
pageUserPlan,
listUserPlan,
getUserPlan,
addUserPlan,
removeUserPlan
}

28
api/love-user-profile.js Normal file
View File

@@ -0,0 +1,28 @@
import http from './index.js';
// 分页查询用户资料
export const pageUserProfile = (params) => http.get('/love/user-profile/page', {params})
// 查询全部用户资料
export const listUserProfile = (params) => http.get('/love/user-profile', {params})
// 查询用户资料(当期登录用户)
export const getUserProfile = (userId) => http.get('/love/user-profile/' + userId)
// 查询会员资料
export const getUserDetail = (userId) => http.get('/love/user-profile/detail/' + userId)
// 新增用户资料
export const updateUserProfile = (data) => http.put('/love/user-profile', data)
// 删除用户资料
export const removeUserProfile = (id) => http.get('/love/user-profile/remove/' + id)
export default {
pageUserProfile,
listUserProfile,
getUserProfile,
getUserDetail,
updateUserProfile,
removeUserProfile
}

24
api/merchant-withdraw.js Normal file
View File

@@ -0,0 +1,24 @@
import http from './index.js';
// 分页查询提现明细
export const pageMerchantWithdraw = (params) => http.get('/shop/merchant-withdraw/page', {params})
// 查询全部提现明细
export const listMerchantWithdraw = (params) => http.get('/shop/merchant-withdraw', {params})
// 获取提现明细
export const getMerchantWithdraw = (id) => http.get('/shop/merchant-withdraw/page', {id})
// 添加提现明细
export const addMerchantWithdraw = (data) => http.post('/shop/merchant-withdraw', data)
// 修改提现明细
export const updateMerchantWithdraw = (data) => http.put('/shop/merchant-withdraw/', data)
export default {
pageMerchantWithdraw,
listMerchantWithdraw,
getMerchantWithdraw,
addMerchantWithdraw,
updateMerchantWithdraw
}

28
api/merchant.js Normal file
View File

@@ -0,0 +1,28 @@
import http from './index.js';
// 分页查询商户列表
export const pageMerchant = (params) => http.get('/shop/merchant/page', {params})
// 查询全部商户
export const listMerchant = (params) => http.get('/shop/merchant', {params})
// 获取商户详情
export const getMerchant = (merchantId) => http.get('/shop/merchant/page', {merchantId})
// 添加商户
export const addMerchant = (data) => http.post('/shop/merchant', data)
// 修改商户
export const updateMerchant = (data) => http.put('/shop/merchant/', data)
// 提现申请
export const addWithdraw = (data) => http.post('/shop/merchant/addWithdraw', data)
export default {
pageMerchant,
listMerchant,
getMerchant,
addMerchant,
updateMerchant,
addWithdraw
}

28
api/order-goods.js Normal file
View File

@@ -0,0 +1,28 @@
import http from './index.js';
// 分页查询订单
export const pageOrder = (params) => http.get('/shop/order-goods/page', {params})
// 分页查询订单
export const listOrder = (params) => http.get('/shop/order-goods', {params})
// 查询订单
export const getOrder = (orderId) => http.get('/shop/order-goods/' + orderId)
// 添加订单
export const addOrder = (data) => http.post('/shop/order-goods', data)
// 删除订单
export const removeOrder = (id) => http.get('/open/order-goods/remove/' + id)
// 单个取消菜品
export const cancelfood = (data) => http.post('/open/order-goods/cancel',data)
export default {
pageOrder,
listOrder,
getOrder,
addOrder,
removeOrder,
cancelfood
}

66
api/order.js Normal file
View File

@@ -0,0 +1,66 @@
import http from './index.js';
// 分页查询订单
export const pageOrder = (params) => http.get('/shop/order/page', {params})
// 查询订单列表
export const listOrder = (params) => http.get('/shop/order', {params})
// 查询订单列表
export const listByIds = (data) => http.post('/shop/order/listByIds', data)
// 查询订单
export const getOrder = (orderId) => http.get('/shop/order/' + orderId)
// 添加订单
export const addOrder = (data) => http.post('/shop/order', data)
// 添加订单
export const receiptOrder = (data) => http.post('/open/equipment/receipt', data)
// 删除订单
export const removeOrder = (id) => http.get('/open/order/remove/' + id)
export const setPayStatus = (data) => http.post('/shop/order/setPayStatus', data)
// 查询订单
export const getMyOrder = (params) => http.get('/open/order/getMyOrder', { params })
// 查询核销订单
export const getReceiptOrder = (params) => http.get('/open/order/getReceiptOrder', { params })
// 订单核销
export const updateOrder = (data) => http.post('/shop/order', data)
// 生成二维码
export const generateQrCode = (params) => http.get('/shop/order/generateQrCode', { params })
// 核销二维码码
export const verificationQrCode = (data) => http.put('/open/order/verification',data)
// 取消报餐
export const cancelOrder = (data) => http.post('/open/order/cancel', data)
// 查询代取餐人员的报餐信息
export const getOthersOrder = (params) => http.get('/apps/bc-food/getOthersFood', {params})
// 查询临时报餐订单
export const getTemporaryOrder = (params) => http.get('/apps/bc-food/getTemporaryOrder',{params})
export default {
pageOrder,
listOrder,
listByIds,
getOrder,
addOrder,
receiptOrder,
removeOrder,
setPayStatus,
getMyOrder,
verificationQrCode,
cancelOrder,
updateOrder,
getOthersOrder,
getReceiptOrder,
getTemporaryOrder
}

35
api/payment.js Normal file
View File

@@ -0,0 +1,35 @@
import http from './index.js';
// 分页查询支付方式
export const pagePayment = (params) => http.get('/shop/payment/page', {params})
// 查询支付方式
export const getPayment = (paymentId) => http.get('/shop/payment/' + paymentId)
// 余额支付
export const balance = (orderId) => http.get('/shop/payment/balance/' + orderId)
// 余额支付批量
export const balanceBatch = (data) => http.post('/shop/payment/balanceBatch', data)
// 支付宝支付
export const alipay = (orderId) => http.get('/shop/payment/mp-alipay/' + orderId)
export const alipayReLet = (data) => http.post('/shop/payment/mp-alipay-relet/', data)
export const test = (data) => http.post('/shop/payment/mp-alipay/test', data)
export const payQuery = (orderId) => http.get('/shop/payment/mp-alipay/query/' + orderId)
export const payQueryByRelet = (orderId) => http.get('/shop/payment/mp-alipay/query-relet/' + orderId)
export default {
pagePayment,
getPayment,
alipay,
alipayReLet,
payQuery,
payQueryByRelet,
balance,
test
}

17
api/redis-util.js Normal file
View File

@@ -0,0 +1,17 @@
import http from './index.js';
/**
* 缓存工具包
* @author 科技小王子
* @since 2023-06-23 11:34:03
*/
// 获取配置信息
export const getConfig = () => http.get('/system/cache/config')
// 添加关注
export const addFocus = (data) => http.post('/shop/user-follow', data)
export default {
getConfig,
addFocus
}

8
api/setting.js Normal file
View File

@@ -0,0 +1,8 @@
import http from './index.js';
// 获取商户详情
export const getSetting = (settingKey) => http.get('/open/system/setting/' + settingKey)
export default {
getSetting
}

16
api/statistics.js Normal file
View File

@@ -0,0 +1,16 @@
import http from './index.js';
// 菜品预定统计
export const getBaocanUsers = (params) => http.get('/apps/bc-statistics/baoCanUsers', {params})
export const baoCanFoodCount = (params) => http.get('/apps/bc-statistics/baoCanFoodCount',{params})
export const baoCanUserCount = (params) => http.get('/apps/bc-statistics/baoCanUserCount',{params})
export const baoCanUserCount2 = (params) => http.get('/shop/order-goods',{params})
export default {
getBaocanUsers,
baoCanFoodCount,
baoCanUserCount,
baoCanUserCount2
}

16
api/test.js Normal file
View File

@@ -0,0 +1,16 @@
import http from './index.js';
// 分页查询订单
export const pageTest = (params) => http.get('/shop/order/page', {params})
// 查询订单
export const getTest = (orderId) => http.get('/shop/order/' + orderId)
// 添加订单
export const testIndex = (params) => http.get('/shop/test', params)
export default {
pageTest,
getTest,
testIndex
}

56
api/upload.js Normal file
View File

@@ -0,0 +1,56 @@
import http from './index.js';
import {
fileUrl
} from '@/config.js';
import storage from '@/utils/storage'
import dayjs from "dayjs"
import appConfig from '@/config.js'
// 文件服务器
// export const uploadFile = (file) => http.upload(fileUrl + '/api/file/upload', file)
// 阿里云OSS
export const uploadFile = (file) => http.upload('/oss/upload', file)
// export const uploadFile = async ({filePath}) => {
// // 获取临时凭证
// let sts = storage.get('sts');
// if(!sts){
// const stsRes = await http.get('/oss/getPostForm')
// sts = stsRes.data
// storage.set('sts', sts, 60)
// }
// const {polocyBase64,signature} = sts;
// var suffix = filePath.substring(filePath.lastIndexOf(".")); //.txt
// const fileName = dayjs().format('YYYYMMDD') + '/'+ uni.$u.guid() + suffix;
// return new Promise((reso, rej) => {
// uni.uploadFile({
// url: appConfig.fileUrl, // 开发者服务器的URL。
// filePath: filePath,
// name: 'file', // 必须填file。
// formData: {
// key: fileName,
// 'policy': polocyBase64,
// 'OSSAccessKeyId': 'LTAI5t8UTh8CTXEi2dYxobhj',
// 'success_action_status': '200', //让服务端返回200,不然默认会返回204
// 'signature': signature,
// // 'x-oss-security-token': this.stsToken,
// },
// success: (res) => {
// const webUrl = appConfig.fileUrl + '/' + fileName;
// reso({data: {url: webUrl,thumb: webUrl}})
// },
// fail: err => {
// rej(err)
// }
// });
// })
// }
export const getTempOssToken = () => http.get('/oss/getTempToken')
export default {
uploadFile,
getTempOssToken
}

20
api/user-comment.js Normal file
View File

@@ -0,0 +1,20 @@
import http from './index.js';
// 分页查询评论
export const pageComment = (params) => http.get('/shop/user-comment/page', {params})
// 查询全部评论
export const listComment = (params) => http.get('/shop/user-comment', {params})
// 修改评论
export const addComment = (data) => http.post('/shop/user-comment', data)
// 删除评论
export const removeComment = (id) => http.delete('/shop/user-comment/' + id)
export default {
pageComment,
listComment,
addComment,
removeComment
}

20
api/user-feedback.js Normal file
View File

@@ -0,0 +1,20 @@
import http from './index.js';
// 分页查询意见反馈
export const pageFeedback = (params) => http.get('/shop/user-feedback/page', {params})
// 查询全部意见反馈
export const listFeedback = (params) => http.get('/shop/user-feedback', {params})
// 修改意见反馈
export const addFeedback = (data) => http.post('/shop/user-feedback', data)
// 删除意见反馈
export const removeFeedback = (id) => http.delete('/shop/user-feedback/' + id)
export default {
pageFeedback,
listFeedback,
addFeedback,
removeFeedback
}

20
api/user-follow.js Normal file
View File

@@ -0,0 +1,20 @@
import http from './index.js';
// 分页查询关注记录
export const pageFollow = (params) => http.get('/shop/user-follow/page', {params})
// 查询全部关注记录
export const listFollow = (params) => http.get('/shop/user-follow', {params})
// 修改关注记录
export const addFollow = (data) => http.post('/shop/user-follow', data)
// 删除关注记录
export const removeFollow = (id) => http.delete('/shop/user-follow/' + id)
export default {
pageFollow,
listFollow,
addFollow,
removeFollow
}

20
api/user-grade.js Normal file
View File

@@ -0,0 +1,20 @@
import http from './index.js';
// 分页查询会员等级
export const pageUsereGrade = (params) => http.get('/shop/user-grade/page', {params})
// 查询全部会员等级
export const listUsereGrade = (params) => http.get('/shop/user-grade', {params})
// 修改会员等级
export const addUsereGrade = (data) => http.post('/shop/user-grade', data)
// 删除会员等级
export const removeUsereGrade = (id) => http.delete('/shop/user-grade/' + id)
export default {
pageUsereGrade,
listUsereGrade,
addUsereGrade,
removeUsereGrade
}

24
api/user-like.js Normal file
View File

@@ -0,0 +1,24 @@
import http from './index.js';
// 分页查询点赞
export const pageLike = (params) => http.get('/shop/user-like/page', {params})
// 查询全部点赞
export const listLike = (params) => http.get('/shop/user-like', {params})
// 添加点赞
export const addLike = (data) => http.post('/shop/user-like', data)
// 修改点赞
export const updateLike = (data) => http.put('/shop/user-like', data)
// 删除点赞
export const removeLike = (id) => http.delete('/shop/user-like/' + id)
export default {
pageLike,
listLike,
addLike,
removeLike,
updateLike
}

24
api/user-look.js Normal file
View File

@@ -0,0 +1,24 @@
import http from './index.js';
// 分页查询访客记录
export const pageLook = (params) => http.get('/shop/user-look/page', {params})
// 查询全部访客记录
export const listLook = (params) => http.get('/shop/user-look', {params})
// 添加访客记录
export const addLook = (data) => http.post('/shop/user-look', data)
// 修改访客记录
export const updateLook = (data) => http.put('/shop/user-look', data)
// 删除访客记录
export const removeLook = (id) => http.delete('/shop/user-look/' + id)
export default {
pageLook,
listLook,
addLook,
removeLook,
updateLook
}

20
api/user-referee.js Normal file
View File

@@ -0,0 +1,20 @@
import http from './index.js';
// 分页查询推荐关系
export const pageUserReferee = (params) => http.get('/shop/user-referee/page', {params})
// 查询全部推荐关系
export const listUserReferee = (params) => http.get('/shop/user-referee', {params})
// 修改推荐关系
export const addUserReferee = (data) => http.post('/shop/user-referee', data)
// 删除推荐关系
export const removeUserReferee = (id) => http.delete('/shop/user-referee/' + id)
export default {
pageUserReferee,
listUserReferee,
addUserReferee,
removeUserReferee
}

20
api/user.js Normal file
View File

@@ -0,0 +1,20 @@
import http from './index.js';
// 获取用户资料
export const getUser = (params) => http.get('/auth/user', {params})
// 修改用户资料
export const updateUser = (data) => http.put('/system/user', data)
export const getMyQrCode = (data) => http.post('/open/user/myQrCode',data)
// 获取用户资料
export const getAgentUser = (id) => http.get('/open/user/agentUser/' + id)
export const updatePassword = (data) => http.put('/auth/password',data)
export default {
getUser,
updateUser,
getMyQrCode,
getAgentUser,
updatePassword
}

8
api/ww-login.js Normal file
View File

@@ -0,0 +1,8 @@
import http from './index.js';
// 企业微信登录
export const wwLogin = (data) => http.post('/open/wx-work/accessToken', data)
export default {
wwLogin
}

12
api/wx-login.js Executable file
View File

@@ -0,0 +1,12 @@
import http from './index.js';
import { fileUrl } from '@/config.js';
// 获取微信openId
export const getWxQrCode = () => http.get('/wx-login/getQRCode')
export const getWxQrCodeFile = () => http.get('/file-preview/getQRCode')
export default {
getWxQrCode,
getWxQrCodeFile
}

8
api/wxofficial.js Executable file
View File

@@ -0,0 +1,8 @@
import http from './index.js';
// 查询订单列表
export const oauthUserInfo = (data) => http.post('/wxofficial/oauthUserInfo', data)
export default {
oauthUserInfo
}