update
This commit is contained in:
16
http/api/area.js
Normal file
16
http/api/area.js
Normal file
@@ -0,0 +1,16 @@
|
||||
import http from '@/http/yskApi/http.js'
|
||||
const request = http.request
|
||||
|
||||
/**
|
||||
* 获取区域列表
|
||||
* @returns
|
||||
*/
|
||||
export function getShopArea(data, urlType = 'account') {
|
||||
return request({
|
||||
url: `/account/admin/shopArea`,
|
||||
method: "GET",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
136
http/api/buyer.js
Normal file
136
http/api/buyer.js
Normal file
@@ -0,0 +1,136 @@
|
||||
import http from '@/http/yskApi/http.js'
|
||||
const request = http.request
|
||||
|
||||
/**
|
||||
* 获取挂账人分页
|
||||
* @returns
|
||||
*/
|
||||
export function getCreditBuyerPage(data, urlType = 'order') {
|
||||
return request({
|
||||
url: `/${urlType}/admin/order/credit/buyer/page`,
|
||||
method: "GET",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取挂账人详情
|
||||
* @returns
|
||||
*/
|
||||
export function getCreditBuyerDetail(id, urlType = 'order') {
|
||||
return request({
|
||||
url: `/${urlType}/admin/order/credit/buyer/${id}`,
|
||||
method: "GET",
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加挂账人
|
||||
* @returns
|
||||
*/
|
||||
export function addCreditBuyer(data, urlType = 'order') {
|
||||
return request({
|
||||
url: `/${urlType}/admin/order/credit/buyer`,
|
||||
method: "POST",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑挂账人
|
||||
* @returns
|
||||
*/
|
||||
export function editCreditBuyer(data, urlType = 'order') {
|
||||
return request({
|
||||
url: `/${urlType}/admin/order/credit/buyer`,
|
||||
method: "PUT",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除挂账人
|
||||
* @returns
|
||||
*/
|
||||
export function delCreditBuyer(id, urlType = 'order') {
|
||||
return request({
|
||||
url: `/${urlType}/admin/order/credit/buyer/${id}`,
|
||||
method: "DELETE",
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 还款
|
||||
* @returns
|
||||
*/
|
||||
export function creditBuyerRepayment(data, urlType = 'order') {
|
||||
return request({
|
||||
url: `/${urlType}/admin/order/credit/buyer/repayment`,
|
||||
method: "POST",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 付款
|
||||
* @returns
|
||||
*/
|
||||
export function creditBuyerOrderPay(data, urlType = 'order') {
|
||||
return request({
|
||||
url: `/${urlType}/admin/order/credit/buyerOrder/pay`,
|
||||
method: "POST",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 还款记录
|
||||
* @returns
|
||||
*/
|
||||
export function creditRePaymentRecord(data, urlType = 'order') {
|
||||
return request({
|
||||
url: `/${urlType}/admin/order/credit/paymentRecord/page`,
|
||||
method: "GET",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 明细分页
|
||||
* @returns
|
||||
*/
|
||||
export function creditBuyerOrderList(data, urlType = 'order') {
|
||||
return request({
|
||||
url: `/${urlType}/admin/order/credit/buyerOrder/page`,
|
||||
method: "GET",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 明细统计
|
||||
* @returns
|
||||
*/
|
||||
export function creditBuyerOrderSummary(data, urlType = 'order') {
|
||||
return request({
|
||||
url: `/${urlType}/admin/order/credit/buyerOrder/summary`,
|
||||
method: "GET",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
86
http/api/callTable.js
Normal file
86
http/api/callTable.js
Normal file
@@ -0,0 +1,86 @@
|
||||
import http from '@/http/yskApi/http.js'
|
||||
const request = http.request
|
||||
|
||||
/**
|
||||
* 获取叫号队列
|
||||
* @returns
|
||||
*/
|
||||
export function getCallTableQueue(data, urlType = 'account') {
|
||||
return request({
|
||||
url: `/${urlType}/admin/callTable/queue`,
|
||||
method: "GET",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取叫号记录列表
|
||||
* @returns
|
||||
*/
|
||||
export function getCallRecord(data, urlType = 'account') {
|
||||
return request({
|
||||
url: `/${urlType}/admin/callTable/callRecord`,
|
||||
method: "GET",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取叫号桌型
|
||||
* @returns
|
||||
*/
|
||||
export function getCallTable(data, urlType = 'account') {
|
||||
return request({
|
||||
url: `/${urlType}/admin/callTable`,
|
||||
method: "GET",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取叫号号码
|
||||
* @returns
|
||||
*/
|
||||
export function callTableTakeNumber(data, urlType = 'account') {
|
||||
return request({
|
||||
url: `/${urlType}/admin/callTable/takeNumber`,
|
||||
method: "POST",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 执行叫号
|
||||
* @returns
|
||||
*/
|
||||
export function callTableCall(data, urlType = 'account') {
|
||||
return request({
|
||||
url: `/${urlType}/admin/callTable/call`,
|
||||
method: "POST",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改叫号状态
|
||||
* @returns
|
||||
*/
|
||||
export function updateCallTableState(data, urlType = 'account') {
|
||||
return request({
|
||||
url: `/${urlType}/admin/callTable/updateState`,
|
||||
method: "PUT",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
55
http/api/cateGory.js
Normal file
55
http/api/cateGory.js
Normal file
@@ -0,0 +1,55 @@
|
||||
import http from '@/http/yskApi/http.js'
|
||||
const request = http.request
|
||||
|
||||
/**
|
||||
* 获取分类分页
|
||||
* @returns
|
||||
*/
|
||||
export function categoryPage(data, urlType = 'product') {
|
||||
return request({
|
||||
url: `/${urlType}/admin/prod/category/page`,
|
||||
method: "GET",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 分类添加
|
||||
* @returns
|
||||
*/
|
||||
export function addCategory(data, urlType = 'product') {
|
||||
return request({
|
||||
url: `/${urlType}/admin/prod/category`,
|
||||
method: "POST",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 分类修改
|
||||
* @returns
|
||||
*/
|
||||
export function putCategory(data, urlType = 'product') {
|
||||
return request({
|
||||
url: `/${urlType}/admin/prod/category`,
|
||||
method: "PUT",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 分类删除
|
||||
* @returns
|
||||
*/
|
||||
export function delCategory(id, urlType = 'product') {
|
||||
return request({
|
||||
url: `/${urlType}/admin/prod/category/${id}`,
|
||||
method: "DELETE",
|
||||
})
|
||||
}
|
||||
222
http/api/cons.js
Normal file
222
http/api/cons.js
Normal file
@@ -0,0 +1,222 @@
|
||||
import http from '@/http/yskApi/http.js'
|
||||
const request = http.request
|
||||
|
||||
/**
|
||||
* 获取耗材分页
|
||||
* @returns
|
||||
*/
|
||||
export function getConsPage(data, urlType = 'product') {
|
||||
return request({
|
||||
url: `/${urlType}/admin/product/cons/page`,
|
||||
method: "GET",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取耗材列表
|
||||
* @returns
|
||||
*/
|
||||
export function getConsList(data, urlType = 'product') {
|
||||
return request({
|
||||
url: `/${urlType}/admin/product/cons/list`,
|
||||
method: "GET",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 耗材添加
|
||||
* @returns
|
||||
*/
|
||||
export function addCons(data, urlType = 'product') {
|
||||
return request({
|
||||
url: `/${urlType}/admin/product/cons`,
|
||||
method: "POST",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 耗材修改
|
||||
* @returns
|
||||
*/
|
||||
export function editCons(data, urlType = 'product') {
|
||||
return request({
|
||||
url: `/${urlType}/admin/product/cons`,
|
||||
method: "PUT",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取耗材类别
|
||||
* @returns
|
||||
*/
|
||||
export function getConsGrpupPage(data, urlType = 'product') {
|
||||
return request({
|
||||
url: `/${urlType}/admin/product/consGroup/page`,
|
||||
method: "GET",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取耗材类别
|
||||
* @returns
|
||||
*/
|
||||
export function getConsGrpupList(data, urlType = 'product') {
|
||||
return request({
|
||||
url: `/${urlType}/admin/product/consGroup/list`,
|
||||
method: "GET",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增耗材类别
|
||||
* @returns
|
||||
*/
|
||||
export function addConsGrpup(data, urlType = 'product') {
|
||||
return request({
|
||||
url: `/${urlType}/admin/product/consGroup`,
|
||||
method: "POST",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改耗材类别
|
||||
* @returns
|
||||
*/
|
||||
export function editConsGrpup(data, urlType = 'product') {
|
||||
return request({
|
||||
url: `/${urlType}/admin/product/consGroup`,
|
||||
method: "PUT",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 启用耗材类别
|
||||
* @returns
|
||||
*/
|
||||
export function consGrpupEnable(id, urlType = 'product') {
|
||||
return request({
|
||||
url: `/${urlType}/admin/product/consGroup/enable/${id}`,
|
||||
method: "POST",
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 禁用耗材类别
|
||||
* @returns
|
||||
*/
|
||||
export function consGrpupDisable(id, urlType = 'product') {
|
||||
return request({
|
||||
url: `/${urlType}/admin/product/consGroup/disable/${id}`,
|
||||
method: "POST",
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 耗材入库
|
||||
* @returns
|
||||
*/
|
||||
export function consStockIn(data, urlType = 'product') {
|
||||
return request({
|
||||
url: `/${urlType}/admin/product/stock/in`,
|
||||
method: "POST",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 耗材出库
|
||||
* @returns
|
||||
*/
|
||||
export function stockOut(data, urlType = 'product') {
|
||||
return request({
|
||||
url: `/${urlType}/admin/product/stock/out`,
|
||||
method: "POST",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 库存盘点
|
||||
* @returns
|
||||
*/
|
||||
export function stockCheck(data, urlType = 'product') {
|
||||
return request({
|
||||
url: `/${urlType}/admin/product/stock/check`,
|
||||
method: "POST",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 耗材报损
|
||||
* @returns
|
||||
*/
|
||||
export function stockReportDamage(data, urlType = 'product') {
|
||||
return request({
|
||||
url: `/${urlType}/admin/product/stock/reportDamage`,
|
||||
method: "POST",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 耗材库存变动记录
|
||||
* @returns
|
||||
*/
|
||||
export function stockFlow(data, urlType = 'product') {
|
||||
return request({
|
||||
url: `/${urlType}/admin/product/stock/flow`,
|
||||
method: "GET",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 耗材统计
|
||||
* @returns
|
||||
*/
|
||||
export function consStatistics(data, urlType = 'product') {
|
||||
return request({
|
||||
url: `/${urlType}/admin/product/cons/statistics`,
|
||||
method: "GET",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
58
http/api/coupon.js
Normal file
58
http/api/coupon.js
Normal file
@@ -0,0 +1,58 @@
|
||||
import http from '@/http/yskApi/http.js'
|
||||
const request = http.request
|
||||
|
||||
/**
|
||||
* 店铺优惠券列表
|
||||
* @returns
|
||||
*/
|
||||
export function getCouponList(data, urlType = 'account') {
|
||||
return request({
|
||||
url: `/${urlType}/admin/coupon`,
|
||||
method: "GET",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成订单后使用
|
||||
* @returns
|
||||
*/
|
||||
export function getFindCoupon(data, urlType = 'account') {
|
||||
return request({
|
||||
url: `/${urlType}/admin/coupon/findCoupon`,
|
||||
method: "GET",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 店铺优惠券新增
|
||||
* @returns
|
||||
*/
|
||||
export function addCoupon(data, urlType = 'account') {
|
||||
return request({
|
||||
url: `/${urlType}/admin/coupon`,
|
||||
method: "POST",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 店铺优惠券修改
|
||||
* @returns
|
||||
*/
|
||||
export function updateCoupon(data, urlType = 'account') {
|
||||
return request({
|
||||
url: `/${urlType}/admin/coupon`,
|
||||
method: "PUT",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
30
http/api/freeDing.js
Normal file
30
http/api/freeDing.js
Normal file
@@ -0,0 +1,30 @@
|
||||
import http from '@/http/yskApi/http.js'
|
||||
const request = http.request
|
||||
|
||||
/**
|
||||
* 获取当前店铺霸王餐配置信息列表
|
||||
* @returns
|
||||
*/
|
||||
export function getFreeDing(data, urlType = 'account') {
|
||||
return request({
|
||||
url: `/${urlType}/admin/freeDing`,
|
||||
method: "GET",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改霸王餐配置信息
|
||||
* @returns
|
||||
*/
|
||||
export function updateFreeDing(data, urlType = 'account') {
|
||||
return request({
|
||||
url: `/${urlType}/admin/freeDing`,
|
||||
method: "PUT",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
66
http/api/handover.js
Normal file
66
http/api/handover.js
Normal file
@@ -0,0 +1,66 @@
|
||||
import http from '@/http/yskApi/http.js'
|
||||
const request = http.request
|
||||
|
||||
/**
|
||||
* 交班记录-分页
|
||||
* @returns
|
||||
*/
|
||||
export function getHandoverRecord(data, urlType = 'account') {
|
||||
return request({
|
||||
url: `/${urlType}/admin/handoverRecord/page`,
|
||||
method: "GET",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 交班记录-查看
|
||||
* @returns
|
||||
*/
|
||||
export function getHandoverRecordView(id, urlType = 'account') {
|
||||
return request({
|
||||
url: `/${urlType}/admin/handoverRecord/${id}`,
|
||||
method: "GET",
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 交班记录-导出
|
||||
* @returns
|
||||
*/
|
||||
export function getHandoverRecordExport(id, urlType = 'account') {
|
||||
return request({
|
||||
url: `/${urlType}/admin/handoverRecord/export/${id}`,
|
||||
method: "GET",
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 收银机-交班数据统计
|
||||
* @returns
|
||||
*/
|
||||
export function getHandoverRecordTotal(data, urlType = 'account') {
|
||||
return request({
|
||||
url: `/${urlType}/admin/handoverRecord/total`,
|
||||
method: "GET",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 收银机-交班/关班
|
||||
* @returns
|
||||
*/
|
||||
export function getHandoverRecordHandover(data, urlType = 'account') {
|
||||
return request({
|
||||
url: `/${urlType}/admin/handoverRecord/handover`,
|
||||
method: "POST",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
52
http/api/index.js
Normal file
52
http/api/index.js
Normal file
@@ -0,0 +1,52 @@
|
||||
import http from '@/http/yskApi/http.js'
|
||||
const request = http.request
|
||||
|
||||
/**
|
||||
* 文件上传
|
||||
* @returns
|
||||
*/
|
||||
export function uploadFile(file, data, urlType = 'account') {
|
||||
return http.upload(`/${urlType}/admin/common/upload`,data,file)
|
||||
}
|
||||
|
||||
/**
|
||||
* 订阅二维码
|
||||
* @returns
|
||||
*/
|
||||
export function getShopMsgPushCode(data, urlType = 'account') {
|
||||
return request({
|
||||
url: `/${urlType}/admin/shopMsgPush/code`,
|
||||
method: "GET",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取店铺权限列表
|
||||
* @returns
|
||||
*/
|
||||
export function getShopPermission(data, urlType = 'account') {
|
||||
return request({
|
||||
url: `/${urlType}/admin/shopPermission`,
|
||||
method: "GET",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据渠道获取版本信息
|
||||
* @returns
|
||||
*/
|
||||
export function getVersion(data, urlType = 'account') {
|
||||
return request({
|
||||
url: `/${urlType}/admin/version/${data.source}/${data.type}`,
|
||||
method: "GET",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
30
http/api/login.js
Normal file
30
http/api/login.js
Normal file
@@ -0,0 +1,30 @@
|
||||
import http from '@/http/yskApi/http.js'
|
||||
const request = http.request
|
||||
|
||||
/**
|
||||
* 获取验证码
|
||||
* @returns
|
||||
*/
|
||||
export function authCaptcha(data, urlType = 'account') {
|
||||
return request({
|
||||
url: `/${urlType}/admin/auth/captcha`,
|
||||
method: "GET",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 登录
|
||||
* @returns
|
||||
*/
|
||||
export function login(data, urlType = 'account') {
|
||||
return request({
|
||||
url: `/${urlType}/admin/auth/login`,
|
||||
method: "POST",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
116
http/api/order.js
Normal file
116
http/api/order.js
Normal file
@@ -0,0 +1,116 @@
|
||||
import http from '@/http/yskApi/http.js'
|
||||
const request = http.request
|
||||
|
||||
/**
|
||||
* 获取订单列表
|
||||
* @returns
|
||||
*/
|
||||
export function getOrderList(data, urlType = 'order') {
|
||||
return request({
|
||||
url: `/order/admin/order`,
|
||||
method: "GET",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 订单详情
|
||||
* @returns
|
||||
*/
|
||||
export function getOrderById(data, urlType = 'order') {
|
||||
return request({
|
||||
url: `/order/admin/order/getOrderById`,
|
||||
method: "GET",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 历史订单(多次下单使用)
|
||||
* @returns
|
||||
*/
|
||||
export function getHistoryOrder(data, urlType = '/order') {
|
||||
return request({
|
||||
url: `/order/admin/order/historyOrder`,
|
||||
method: "GET",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成订单
|
||||
* @returns
|
||||
*/
|
||||
export function createOrder(data, urlType = 'order') {
|
||||
return request({
|
||||
url: `/order/admin/order/createOrder`,
|
||||
method: "POST",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 订单退款 只传订单id
|
||||
* @returns
|
||||
*/
|
||||
export function refundOrder(data, urlType = 'order') {
|
||||
return request({
|
||||
url: `/order/admin/order/refundOrder`,
|
||||
method: "POST",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 订单打印
|
||||
* @returns
|
||||
*/
|
||||
export function printOrder(data, urlType = 'order') {
|
||||
return request({
|
||||
url: `/order/admin/order/print`,
|
||||
method: "POST",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 清空历史订单
|
||||
* @returns
|
||||
*/
|
||||
export function cancelOrder(data, urlType = 'order') {
|
||||
return request({
|
||||
url: `/order/admin/order/cancelOrder`,
|
||||
method: "POST",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 清空某一次历史订单
|
||||
* @returns
|
||||
*/
|
||||
export function rmPlaceOrder(data, urlType = 'order') {
|
||||
return request({
|
||||
url: `/${urlType}/admin/order/rmPlaceOrder`,
|
||||
method: "POST",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
100
http/api/pay.js
Normal file
100
http/api/pay.js
Normal file
@@ -0,0 +1,100 @@
|
||||
import http from '@/http/yskApi/http.js'
|
||||
const request = http.request
|
||||
|
||||
/**
|
||||
* 获取店铺订单支付URL
|
||||
* @returns
|
||||
*/
|
||||
export function getOrderPayUrl(data, urlType = 'order') {
|
||||
return request({
|
||||
url: `/${urlType}/pay/shopPayApi/orderPayUrl`,
|
||||
method: "GET",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 扫码支付
|
||||
* @returns
|
||||
*/
|
||||
export function scanPay(data, urlType = 'order') {
|
||||
return request({
|
||||
url: `/${urlType}/pay/scanPay`,
|
||||
method: "POST",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 现金支付
|
||||
* @returns
|
||||
*/
|
||||
export function cashPay(data, urlType = 'order') {
|
||||
return request({
|
||||
url: `/${urlType}/pay/cashPay`,
|
||||
method: "POST",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 扫码/储值支付
|
||||
* @returns
|
||||
*/
|
||||
export function microPay(data, urlType = 'order') {
|
||||
return request({
|
||||
url: `/${urlType}/pay/microPay`,
|
||||
method: "POST",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 挂账支付
|
||||
* @returns
|
||||
*/
|
||||
export function creditPay(data, urlType = 'order') {
|
||||
return request({
|
||||
url: `/${urlType}/pay/creditPay`,
|
||||
method: "POST",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 会员支付
|
||||
* @returns
|
||||
*/
|
||||
export function vipPay(data, urlType = 'order') {
|
||||
return request({
|
||||
url: `/${urlType}/pay/vipPay`,
|
||||
method: "POST",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询订单状态
|
||||
* @returns
|
||||
*/
|
||||
export function queryOrderStatus(data, urlType = 'order') {
|
||||
return request({
|
||||
url: `/${urlType}/pay/queryOrderStatus`,
|
||||
method: "GET",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
16
http/api/payType.js
Normal file
16
http/api/payType.js
Normal file
@@ -0,0 +1,16 @@
|
||||
import http from '@/http/yskApi/http.js'
|
||||
const request = http.request
|
||||
|
||||
/**
|
||||
* 获取支付方式列表
|
||||
* @returns
|
||||
*/
|
||||
export function getPayTypeList(data, urlType = 'account') {
|
||||
return request({
|
||||
url: `/${urlType}/admin/payType`,
|
||||
method: "GET",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
59
http/api/points.js
Normal file
59
http/api/points.js
Normal file
@@ -0,0 +1,59 @@
|
||||
import http from '@/http/yskApi/http.js'
|
||||
const request = http.request
|
||||
|
||||
/**
|
||||
* 获取订单可用积分及抵扣金额(支付页面使用)
|
||||
* @returns
|
||||
*/
|
||||
export function calcUsablePoints(data, urlType = 'account') {
|
||||
return request({
|
||||
url: `/${urlType}/admin/points/memberPoints/calcUsablePoints`,
|
||||
method: "GET",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据积分计算可抵扣金额
|
||||
* @returns
|
||||
*/
|
||||
export function calcDeductionAmount(data, urlType = 'account') {
|
||||
return request({
|
||||
url: `/${urlType}/admin/points/memberPoints/calcDeductionAmount`,
|
||||
method: "GET",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 支付完成扣减积分
|
||||
* @returns
|
||||
*/
|
||||
export function payedDeductPoints(data, urlType = 'account') {
|
||||
return request({
|
||||
url: `/${urlType}/admin/points/memberPoints/payedDeductPoints`,
|
||||
method: "POST",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 消费赠送积分
|
||||
* @returns
|
||||
*/
|
||||
export function consumeAwardPoints(data, urlType = 'account') {
|
||||
return request({
|
||||
url: `/${urlType}/admin/points/memberPoints/consumeAwardPoints`,
|
||||
method: "POST",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
72
http/api/printer.js
Normal file
72
http/api/printer.js
Normal file
@@ -0,0 +1,72 @@
|
||||
import http from '@/http/yskApi/http.js'
|
||||
const request = http.request
|
||||
|
||||
/**
|
||||
* 获取打印机列表
|
||||
* @returns
|
||||
*/
|
||||
export function getPrinter(data, urlType = 'account') {
|
||||
return request({
|
||||
url: `/${urlType}/admin/printer`,
|
||||
method: "GET",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取打印机详情
|
||||
* @returns
|
||||
*/
|
||||
export function getPrinterDetail(data, urlType = 'account') {
|
||||
return request({
|
||||
url: `/${urlType}/admin/printer/detail`,
|
||||
method: "GET",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加打印机
|
||||
* @returns
|
||||
*/
|
||||
export function addPrinter(data, urlType = 'account') {
|
||||
return request({
|
||||
url: `/${urlType}/admin/printer`,
|
||||
method: "POST",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改打印机
|
||||
* @returns
|
||||
*/
|
||||
export function updatePrinter(data, urlType = 'account') {
|
||||
return request({
|
||||
url: `/${urlType}/admin/printer`,
|
||||
method: "PUT",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除打印机
|
||||
* @returns
|
||||
*/
|
||||
export function delPrinter(data, urlType = 'account') {
|
||||
return request({
|
||||
url: `/${urlType}/admin/printer`,
|
||||
method: "DELETE",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
347
http/api/product.js
Normal file
347
http/api/product.js
Normal file
@@ -0,0 +1,347 @@
|
||||
import http from '@/http/yskApi/http.js'
|
||||
|
||||
const request = http.request
|
||||
// 商品----------------------------------------------------------------------------------------------------
|
||||
/**
|
||||
* 获取商品分页
|
||||
* @returns
|
||||
*/
|
||||
export function getProductPage(data, urlType = 'product' ,showLoading) {
|
||||
return request({
|
||||
url: `/product/admin/product/page`,
|
||||
method: "GET",
|
||||
data: {
|
||||
...data
|
||||
},
|
||||
showLoading
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取商品列表
|
||||
* @returns
|
||||
*/
|
||||
export function getProductList(data, urlType = 'product' ,showLoading) {
|
||||
return request({
|
||||
url: `/product/admin/product/list`,
|
||||
method: "GET",
|
||||
data: {
|
||||
...data
|
||||
},
|
||||
showLoading
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取商品详情
|
||||
* @returns
|
||||
*/
|
||||
export function getProductDetail (id, urlType = 'product') {
|
||||
return request({
|
||||
url: `/product/admin/product/${id}`,
|
||||
method: "GET",
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加商品
|
||||
* @returns
|
||||
*/
|
||||
export function addProduct(data, urlType = 'product') {
|
||||
return request({
|
||||
url: `/product/admin/product`,
|
||||
method: "POST",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除商品
|
||||
* @returns
|
||||
*/
|
||||
export function delProduct(id, urlType = 'product') {
|
||||
return request({
|
||||
url: `/product/admin/product/${id}`,
|
||||
method: "DELETE",
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 商品上下架
|
||||
* @returns
|
||||
*/
|
||||
export function productOnOff (data, urlType = 'product') {
|
||||
return request({
|
||||
url: `/product/admin/product/onOff`,
|
||||
method: "POST",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 商品售罄
|
||||
* @returns
|
||||
*/
|
||||
export function productMarkIsSoldOut (data, urlType = 'product') {
|
||||
return request({
|
||||
url: `/product/admin/product/markIsSoldOut`,
|
||||
method: "POST",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改商品
|
||||
* @returns
|
||||
*/
|
||||
export function updateProduct(data, urlType = 'product') {
|
||||
return request({
|
||||
url: `/product/admin/product`,
|
||||
method: "PUT",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 绑定耗材
|
||||
* @returns
|
||||
*/
|
||||
export function productBindCons(data, urlType = 'product') {
|
||||
return request({
|
||||
url: `/product/admin/product/bind`,
|
||||
method: "POST",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 商品报损
|
||||
* @returns
|
||||
*/
|
||||
export function productReportDamage(data, urlType = 'product') {
|
||||
return request({
|
||||
url: `/product/admin/product/reportDamage`,
|
||||
method: "POST",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 商品商品-修改库存
|
||||
* @returns
|
||||
*/
|
||||
export function productModifyStock(data, urlType = 'product') {
|
||||
return request({
|
||||
url: `/product/admin/product/modifyStock`,
|
||||
method: "POST",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 商品-库存变动记录
|
||||
* @returns
|
||||
*/
|
||||
export function productStockFlow(data, urlType = 'product') {
|
||||
return request({
|
||||
url: `/product/admin/product/stockFlow`,
|
||||
method: "GET",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 商品分类----------------------------------------------------------------------------------------------------
|
||||
/**
|
||||
* 获取商品分类列表
|
||||
* @returns
|
||||
*/
|
||||
export function getCategoryList(data, urlType = 'product') {
|
||||
return request({
|
||||
url: `/product/admin/prod/category/list`,
|
||||
method: "GET",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 商品单位----------------------------------------------------------------------------------------------------
|
||||
/**
|
||||
* 获取商品单位列表
|
||||
* @returns
|
||||
*/
|
||||
export function getProdUnitList(data, urlType = 'product') {
|
||||
return request({
|
||||
url: `/product/admin/prod/unit/list`,
|
||||
method: "GET",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 商品规格----------------------------------------------------------------------------------------------------
|
||||
/**
|
||||
* 获取商品规格列表
|
||||
* @returns
|
||||
*/
|
||||
export function getSpecList(data, urlType = 'product') {
|
||||
return request({
|
||||
url: `/product/admin/prod/spec/list`,
|
||||
method: "GET",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加商品规格
|
||||
* @returns
|
||||
*/
|
||||
export function addSpec(data, urlType = 'product') {
|
||||
return request({
|
||||
url: `/product/admin/prod/spec`,
|
||||
method: "POST",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改商品规格
|
||||
* @returns
|
||||
*/
|
||||
export function updateSpec(data, urlType = 'product') {
|
||||
return request({
|
||||
url: `/product/admin/prod/spec`,
|
||||
method: "PUT",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 快捷添加商品规格
|
||||
* @returns
|
||||
*/
|
||||
export function addSpecQuic(data, urlType = 'product') {
|
||||
return request({
|
||||
url: `/product/admin/prod/spec/quickAdd`,
|
||||
method: "POST",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除商品规格
|
||||
* @returns
|
||||
*/
|
||||
export function delSpec(id, urlType = 'product') {
|
||||
return request({
|
||||
url: `/product/admin/prod/spec/${id}`,
|
||||
method: "DELETE",
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
// 商品分组----------------------------------------------------------------------------------------------------
|
||||
/**
|
||||
* 获取商品分组列表
|
||||
* @returns
|
||||
*/
|
||||
export function getProdGroupPage(data, urlType = 'product') {
|
||||
return request({
|
||||
url: `/product/admin/prod/group/page`,
|
||||
method: "GET",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取商品分组详情
|
||||
* @returns
|
||||
*/
|
||||
export function getProdGroupDetail(id, urlType = 'product') {
|
||||
return request({
|
||||
url: `/product/admin/prod/group/${id}`,
|
||||
method: "GET",
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 商品分组添加
|
||||
* @returns
|
||||
*/
|
||||
export function addProdGroup(data, urlType = 'product') {
|
||||
return request({
|
||||
url: `/product/admin/prod/group`,
|
||||
method: "POST",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 商品分组修改
|
||||
* @returns
|
||||
*/
|
||||
export function updateProdGroup(data, urlType = 'product') {
|
||||
return request({
|
||||
url: `/product/admin/prod/group`,
|
||||
method: "PUT",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 商品分组简单修改
|
||||
* @returns
|
||||
*/
|
||||
export function editProdGroup(data, urlType = 'product') {
|
||||
return request({
|
||||
url: `/product/admin/prod/group/update`,
|
||||
method: "PUT",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 商品分组删除
|
||||
* @returns
|
||||
*/
|
||||
export function delProdGroup(id, urlType = 'product') {
|
||||
return request({
|
||||
url: `/product/admin/prod/group/${id}`,
|
||||
method: "DELETE",
|
||||
})
|
||||
}
|
||||
16
http/api/role.js
Normal file
16
http/api/role.js
Normal file
@@ -0,0 +1,16 @@
|
||||
import http from '@/http/yskApi/http.js'
|
||||
const request = http.request
|
||||
|
||||
/**
|
||||
* 获取角色列表
|
||||
* @returns
|
||||
*/
|
||||
export function getRoleList(data, urlType = 'account') {
|
||||
return request({
|
||||
url: `/${urlType}/admin/role/list`,
|
||||
method: "GET",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
58
http/api/shop.js
Normal file
58
http/api/shop.js
Normal file
@@ -0,0 +1,58 @@
|
||||
import http from '@/http/yskApi/http.js'
|
||||
const request = http.request
|
||||
|
||||
/**
|
||||
* 获取店铺详情
|
||||
* @returns
|
||||
*/
|
||||
export function getShopInfo(data, urlType = 'account') {
|
||||
return request({
|
||||
url: `/account/admin/shopInfo/detail`,
|
||||
method: "GET",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改店铺详情
|
||||
* @returns
|
||||
*/
|
||||
export function editShopInfo(data, urlType = 'account') {
|
||||
return request({
|
||||
url: `/account/admin/shopInfo`,
|
||||
method: "PUT",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取当前店铺拓展参数
|
||||
* @returns
|
||||
*/
|
||||
export function getShopExtend(data, urlType = 'account') {
|
||||
return request({
|
||||
url: `/${urlType}/admin/shopExtend`,
|
||||
method: "GET",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取当前店铺拓展参数
|
||||
* @returns
|
||||
*/
|
||||
export function editShopExtend(data, urlType = 'account') {
|
||||
return request({
|
||||
url: `/${urlType}/admin/shopExtend`,
|
||||
method: "PUT",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
30
http/api/shopPagePermission.js
Normal file
30
http/api/shopPagePermission.js
Normal file
@@ -0,0 +1,30 @@
|
||||
import http from '@/http/yskApi/http.js'
|
||||
const request = http.request
|
||||
|
||||
/**
|
||||
* 获取所有页面路径
|
||||
* @returns
|
||||
*/
|
||||
export function getshopPagePermission(data, urlType = 'account') {
|
||||
return request({
|
||||
url: `/${urlType}/admin/shopPagePermission`,
|
||||
method: "GET",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取员工拥有页面路径
|
||||
* @returns
|
||||
*/
|
||||
export function getshopPagePermissionDetail(data, urlType = 'account') {
|
||||
return request({
|
||||
url: `/${urlType}/admin/shopPagePermission/detail`,
|
||||
method: "GET",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
86
http/api/shopUser.js
Normal file
86
http/api/shopUser.js
Normal file
@@ -0,0 +1,86 @@
|
||||
import http from '@/http/yskApi/http.js'
|
||||
const request = http.request
|
||||
|
||||
/**
|
||||
* 获取店铺用户概述信息
|
||||
* @returns
|
||||
*/
|
||||
export function shopUserSummary(data, urlType = 'account') {
|
||||
return request({
|
||||
url: `/${urlType}/admin/shopUser/summary`,
|
||||
method: "GET",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取店铺用户列表
|
||||
* @returns
|
||||
*/
|
||||
export function shopUserList(data, urlType = 'account') {
|
||||
return request({
|
||||
url: `/${urlType}/admin/shopUser`,
|
||||
method: "GET",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取店铺用户详情
|
||||
* @returns
|
||||
*/
|
||||
export function shopUserDetail(data, urlType = 'account') {
|
||||
return request({
|
||||
url: `/${urlType}/admin/shopUser/detail`,
|
||||
method: "GET",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取店铺用户新增
|
||||
* @returns
|
||||
*/
|
||||
export function shopUserAdd(data, urlType = 'account') {
|
||||
return request({
|
||||
url: `/${urlType}/admin/shopUser`,
|
||||
method: "POST",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 店铺用户修改
|
||||
* @returns
|
||||
*/
|
||||
export function shopUserPut(data, urlType = 'account') {
|
||||
return request({
|
||||
url: `/${urlType}/admin/shopUser`,
|
||||
method: "PUT",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 店铺用户余额修改
|
||||
* @returns
|
||||
*/
|
||||
export function shopUserMoney(data, urlType = 'account') {
|
||||
return request({
|
||||
url: `/${urlType}/admin/shopUser/money`,
|
||||
method: "PUT",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
86
http/api/staff.js
Normal file
86
http/api/staff.js
Normal file
@@ -0,0 +1,86 @@
|
||||
import http from '@/http/yskApi/http.js'
|
||||
const request = http.request
|
||||
|
||||
/**
|
||||
* 员工列表
|
||||
* @returns
|
||||
*/
|
||||
export function shopStaffList(data, urlType = 'account') {
|
||||
return request({
|
||||
url: `/${urlType}/admin/shopStaff`,
|
||||
method: "GET",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取员工对应的权限idid
|
||||
* @returns
|
||||
*/
|
||||
export function getShopStaffPermission(data, urlType = 'account') {
|
||||
return request({
|
||||
url: `/${urlType}/admin/shopStaff/permission`,
|
||||
method: "GET",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 员工详情
|
||||
* @returns
|
||||
*/
|
||||
export function shopStaffDetail(data, urlType = 'account') {
|
||||
return request({
|
||||
url: `/${urlType}/admin/shopStaff/detail`,
|
||||
method: "GET",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 员工添加
|
||||
* @returns
|
||||
*/
|
||||
export function shopStaffAdd(data, urlType = 'account') {
|
||||
return request({
|
||||
url: `/${urlType}/admin/shopStaff`,
|
||||
method: "POST",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 员工修改
|
||||
* @returns
|
||||
*/
|
||||
export function shopStaffPut(data, urlType = 'account') {
|
||||
return request({
|
||||
url: `/${urlType}/admin/shopStaff`,
|
||||
method: "PUT",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 员工删除
|
||||
* @returns
|
||||
*/
|
||||
export function shopStaffDel(data, urlType = 'account') {
|
||||
return request({
|
||||
url: `/${urlType}/admin/shopStaff`,
|
||||
method: "DELETE",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
30
http/api/summary.js
Normal file
30
http/api/summary.js
Normal file
@@ -0,0 +1,30 @@
|
||||
import http from '@/http/yskApi/http.js'
|
||||
const request = http.request
|
||||
|
||||
/**
|
||||
* 营业板块
|
||||
* @returns
|
||||
*/
|
||||
export function getTrade(data, urlType = 'order') {
|
||||
return request({
|
||||
url: `/${urlType}/admin/data/summary/trade`,
|
||||
method: "GET",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 商品销售汇总
|
||||
* @returns
|
||||
*/
|
||||
export function productSaleDate(data, urlType = 'order') {
|
||||
return request({
|
||||
url: `/${urlType}/admin/data/summary/productSaleDate`,
|
||||
method: "GET",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
58
http/api/table.js
Normal file
58
http/api/table.js
Normal file
@@ -0,0 +1,58 @@
|
||||
import http from '@/http/yskApi/http.js'
|
||||
const request = http.request
|
||||
|
||||
/**
|
||||
* 获取台桌列表
|
||||
* @returns
|
||||
*/
|
||||
export function getShopTable(data, urlType = 'account') {
|
||||
return request({
|
||||
url: `/${urlType}/admin/shopTable`,
|
||||
method: "GET",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取台桌详情
|
||||
* @returns
|
||||
*/
|
||||
export function getShopTableDetail(data, urlType = 'account') {
|
||||
return request({
|
||||
url: `/account/admin/shopTable/detail`,
|
||||
method: "GET",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 台桌清台
|
||||
* @returns
|
||||
*/
|
||||
export function shopTableClear(data, urlType = 'account') {
|
||||
return request({
|
||||
url: `/${urlType}/admin/shopTable/clear`,
|
||||
method: "PUT",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 台桌绑定
|
||||
* @returns
|
||||
*/
|
||||
export function shopTableBind(data, urlType = 'account') {
|
||||
return request({
|
||||
url: `/${urlType}/admin/shopTable/bind`,
|
||||
method: "POST",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
56
http/api/vendor.js
Normal file
56
http/api/vendor.js
Normal file
@@ -0,0 +1,56 @@
|
||||
import http from '@/http/yskApi/http.js'
|
||||
const request = http.request
|
||||
|
||||
/**
|
||||
* 获取供应商列表
|
||||
* @returns
|
||||
*/
|
||||
export function getVendorPage(data, urlType = 'product') {
|
||||
return request({
|
||||
url: `/${urlType}/admin/product/vendor/page`,
|
||||
method: "GET",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加供应商
|
||||
* @returns
|
||||
*/
|
||||
export function addVendor(data, urlType = 'product') {
|
||||
return request({
|
||||
url: `/${urlType}/admin/product/vendor`,
|
||||
method: "POST",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑供应商
|
||||
* @returns
|
||||
*/
|
||||
export function editVendor(data, urlType = 'product') {
|
||||
return request({
|
||||
url: `/${urlType}/admin/product/vendor`,
|
||||
method: "PUT",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除供应商
|
||||
* @returns
|
||||
*/
|
||||
export function delVendor(id, urlType = 'product') {
|
||||
return request({
|
||||
url: `/${urlType}/admin/product/vendor/${id}`,
|
||||
method: "DELETE",
|
||||
})
|
||||
}
|
||||
|
||||
@@ -7,8 +7,9 @@ import go from '@/commons/utils/go.js';
|
||||
// const baseURL = 'http://192.168.2.41:9888/cashierService'
|
||||
let baseURL = 'https://wxcashiertest.sxczgkj.cn/cashierService'
|
||||
// #ifdef H5
|
||||
baseURL = '/ysk'
|
||||
// baseURL = '/ysk'
|
||||
// #endif
|
||||
baseURL = "http://192.168.1.31"
|
||||
// const baseURL = 'https://cashier.sxczgkj.cn/cashierService'
|
||||
export default function(api = '', data = {}, method = 'GET') {
|
||||
return new Promise((resolve, reject) => {
|
||||
|
||||
@@ -156,7 +156,6 @@ function upload(uri, data, file, showLoading = true, extParams = {}) {
|
||||
|
||||
// 放置token
|
||||
let headerObject = {}
|
||||
// headerObject[appConfig.tokenKey] = storageManage.token()
|
||||
headerObject["satoken"] = storageManage.token()
|
||||
|
||||
return commonsProcess(showLoading, () => {
|
||||
|
||||
155
http/websock.js
Normal file
155
http/websock.js
Normal file
@@ -0,0 +1,155 @@
|
||||
import {
|
||||
reactive,
|
||||
ref
|
||||
} from 'vue';
|
||||
// WebSocket 工具类,封装了 WebSocket 的连接、发送、接收、心跳、重连和关闭等操作
|
||||
class WebsocketUtil {
|
||||
|
||||
// 构造函数,初始化 WebSocket 连接
|
||||
constructor(url, time, params) {
|
||||
this.url = url; // WebSocket 服务器的 URL
|
||||
this.params = params; // WebSocket 服务器的 URL
|
||||
this.time = time; // 心跳发送的间隔时间(秒)
|
||||
this.socketTask = null; // WebSocket 任务对象
|
||||
this.isOpen = false; // WebSocket 连接是否打开
|
||||
this.reconnectTimeout = null; // 重连定时器
|
||||
this.heartbeatInterval = null; // 心跳定时器
|
||||
this.messageCallbacks = []; // 存储外部注册的消息回调函数的数组
|
||||
this.messageCallbacks = []; // 存储外部注册的消息回调函数的数组
|
||||
|
||||
// 初始化 WebSocket 连接
|
||||
this.initializeWebSocket();
|
||||
}
|
||||
|
||||
// 初始化 WebSocket 连接
|
||||
initializeWebSocket() {
|
||||
if (this.isOpen) {
|
||||
return
|
||||
}
|
||||
this.socketTask = uni.connectSocket({
|
||||
url: this.url,
|
||||
success: () => {
|
||||
console.log('WebSocket连接成功');
|
||||
return this.socketTask;
|
||||
},
|
||||
fail: (error) => {
|
||||
console.error('WebSocket连接失败', error);
|
||||
uni.$emit('is-socket-open', true)
|
||||
this.reconnect();
|
||||
}
|
||||
});
|
||||
|
||||
this.socketTask.onOpen((res) => {
|
||||
console.log('WebSocket连接正常!==', res);
|
||||
this.isOpen = true;
|
||||
// 连接成功后启动心跳和消息监听
|
||||
this.startHeartbeat();
|
||||
this.listenForMessages();
|
||||
uni.$emit('is-socket-open', true)
|
||||
|
||||
});
|
||||
this.socketTask.onError((res) => {
|
||||
console.log('WebSocket连接失败!==', res);
|
||||
uni.$emit('is-socket-open', false)
|
||||
this.reconnect();
|
||||
});
|
||||
// 注意:这里的 onClose 监听器应该放在 uni.connectSocket 调用之后
|
||||
this.socketTask.onClose((result) => {
|
||||
this.isOpen = false;
|
||||
// if( this.isOpen ){
|
||||
this.reconnect();
|
||||
// }
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
// 启动心跳检测
|
||||
startHeartbeat() {
|
||||
if (this.heartbeatInterval) {
|
||||
clearInterval(this.heartbeatInterval);
|
||||
}
|
||||
this.heartbeatInterval = setInterval(() => {
|
||||
if (this.isOpen) {
|
||||
this.send(JSON.stringify({"type": "ping_interval","set": "pad"}));
|
||||
}
|
||||
}, this.time);
|
||||
}
|
||||
|
||||
// 发送消息
|
||||
send(data, type) {
|
||||
if (this.socketTask && this.isOpen) {
|
||||
this.socketTask.send({
|
||||
data: data,
|
||||
success: (res) => {
|
||||
// console.log('消息发送成功', res);
|
||||
},
|
||||
fail: (error) => {
|
||||
console.error('消息发送失败', error);
|
||||
this.reconnect(); // 这里可能需要根据实际情况判断是否重连
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// 监听 WebSocket 消息
|
||||
listenForMessages() {
|
||||
if (this.socketTask) {
|
||||
this.socketTask.onMessage((res) => {
|
||||
const {
|
||||
data
|
||||
} = res;
|
||||
this.messageCallbacks.forEach(callback => callback(data
|
||||
.toString())); // 假设 data 是字符串或可转换为字符串
|
||||
});
|
||||
// this.send("WebSocket连接正常");
|
||||
} else {
|
||||
console.error('WebSocket 连接尚未建立,无法监听消息');
|
||||
}
|
||||
}
|
||||
|
||||
// 重连 WebSocket
|
||||
reconnect() {
|
||||
if (this.reconnectTimeout) {
|
||||
clearTimeout(this.reconnectTimeout);
|
||||
}
|
||||
this.reconnectTimeout = setTimeout(() => {
|
||||
this.initializeWebSocket();
|
||||
}, 3000);
|
||||
}
|
||||
|
||||
// 关闭 WebSocket 连接
|
||||
closeSocket() {
|
||||
if (this.socketTask) {
|
||||
uni.closeSocket({
|
||||
success: () => {
|
||||
console.log('WebSocket连接已关闭');
|
||||
this.isOpen = false;
|
||||
},
|
||||
fail: (error) => {
|
||||
console.error('关闭WebSocket连接失败', error);
|
||||
}
|
||||
});
|
||||
this.socketTask = null;
|
||||
}
|
||||
}
|
||||
|
||||
// 外部注册消息回调函数
|
||||
onMessage(callback) {
|
||||
this.messageCallbacks.push(callback);
|
||||
}
|
||||
|
||||
// 外部注销消息回调函数
|
||||
offMessage(callback) {
|
||||
this.messageCallbacks = []
|
||||
}
|
||||
|
||||
// 销毁 WebSocket 连接,清理资源
|
||||
destroy() {
|
||||
this.closeSocket();
|
||||
clearInterval(this.heartbeatInterval);
|
||||
clearTimeout(this.reconnectTimeout);
|
||||
this.messageCallbacks = [];
|
||||
}
|
||||
}
|
||||
|
||||
export default WebsocketUtil;
|
||||
@@ -17,37 +17,64 @@ function getUseType() {
|
||||
const type = uni.getStorageSync("useType")
|
||||
return type ? type : useType
|
||||
}
|
||||
// import {
|
||||
// webscoketUtill
|
||||
// } from '../websock.js'
|
||||
// let wxObj = null
|
||||
// wx初始化购物车
|
||||
// export function getWXCart(params) {
|
||||
// let wxUrl = 'ws://192.168.1.31:2348/?' + objectToString(params)
|
||||
// wxObj = new webscoketUtill(wxUrl,3000,9,(e)=>{
|
||||
// console.log('收到消息');
|
||||
// console.log(e);
|
||||
// })
|
||||
// return uni.getStorageSync('wxList')
|
||||
// }
|
||||
// 新增\删除\修改到购物车
|
||||
// export function addWXCart(params) {
|
||||
// wxObj.ws.send(params)
|
||||
// }
|
||||
|
||||
|
||||
function objectToString(obj) {
|
||||
let result = '';
|
||||
for (const key in obj) {
|
||||
if (obj.hasOwnProperty(key)) {
|
||||
result += `${key}=${obj[key]}&`;
|
||||
}
|
||||
}
|
||||
// 去掉最后一个多余的 &
|
||||
return result.slice(0, -1);
|
||||
}
|
||||
/**
|
||||
* 获取当前台桌订单信息
|
||||
* @returns
|
||||
*/
|
||||
export function getCart(params) {
|
||||
return request({
|
||||
url: `/api/place/cart`,
|
||||
method: "get",
|
||||
params:{
|
||||
shopId: uni.getStorageSync("shopId"),
|
||||
useType: getUseType(),
|
||||
...params
|
||||
}
|
||||
});
|
||||
return request({
|
||||
url: `/api/place/cart`,
|
||||
method: "get",
|
||||
params: {
|
||||
shopId: uni.getStorageSync("shopId"),
|
||||
useType: getUseType(),
|
||||
...params
|
||||
}
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 已上架商品列表
|
||||
* @returns
|
||||
*/
|
||||
export function getGoodsLists(params,showLoading=true) {
|
||||
return request({
|
||||
url: `/api/place/activate`,
|
||||
method: "get",
|
||||
params:{
|
||||
shopId: uni.getStorageSync("shopId"),
|
||||
...params
|
||||
},
|
||||
showLoading
|
||||
});
|
||||
export function getGoodsLists(params, showLoading = true) {
|
||||
return request({
|
||||
url: `/product/admin/product/list`,
|
||||
method: "get",
|
||||
params: {
|
||||
shopId: uni.getStorageSync("shopId"),
|
||||
...params
|
||||
},
|
||||
showLoading
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -55,15 +82,15 @@ export function getGoodsLists(params,showLoading=true) {
|
||||
* @returns
|
||||
*/
|
||||
export function addCart(data) {
|
||||
return request({
|
||||
url: `/api/place/addCart`,
|
||||
method: "post",
|
||||
data:{
|
||||
shopId: uni.getStorageSync("shopId"),
|
||||
useType: getUseType(),
|
||||
...data
|
||||
}
|
||||
});
|
||||
return request({
|
||||
url: `/api/place/addCart`,
|
||||
method: "post",
|
||||
data: {
|
||||
shopId: uni.getStorageSync("shopId"),
|
||||
useType: getUseType(),
|
||||
...data
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -71,15 +98,15 @@ export function addCart(data) {
|
||||
* @returns
|
||||
*/
|
||||
export function $clearCart(data) {
|
||||
return request({
|
||||
url: `/api/place/clearCart`,
|
||||
method: "delete",
|
||||
data:{
|
||||
shopId: uni.getStorageSync("shopId"),
|
||||
useType: getUseType(),
|
||||
...data
|
||||
}
|
||||
});
|
||||
return request({
|
||||
url: `/api/place/clearCart`,
|
||||
method: "delete",
|
||||
data: {
|
||||
shopId: uni.getStorageSync("shopId"),
|
||||
useType: getUseType(),
|
||||
...data
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -87,87 +114,87 @@ export function $clearCart(data) {
|
||||
* @returns
|
||||
*/
|
||||
export function $removeCart(data) {
|
||||
return request({
|
||||
url: `/api/place/removeCart`,
|
||||
method: "delete",
|
||||
data:{
|
||||
shopId: uni.getStorageSync("shopId"),
|
||||
useType: getUseType(),
|
||||
...data
|
||||
}
|
||||
});
|
||||
return request({
|
||||
url: `/api/place/removeCart`,
|
||||
method: "delete",
|
||||
data: {
|
||||
shopId: uni.getStorageSync("shopId"),
|
||||
useType: getUseType(),
|
||||
...data
|
||||
}
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 更新规格
|
||||
* @returns
|
||||
*/
|
||||
export function $updateCart(data) {
|
||||
return request({
|
||||
url: `/api/place/updateCart`,
|
||||
method: "put",
|
||||
data:{
|
||||
shopId: uni.getStorageSync("shopId"),
|
||||
...data
|
||||
}
|
||||
});
|
||||
return request({
|
||||
url: `/api/place/updateCart`,
|
||||
method: "put",
|
||||
data: {
|
||||
shopId: uni.getStorageSync("shopId"),
|
||||
...data
|
||||
}
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 批量打包
|
||||
* @returns
|
||||
*/
|
||||
export function $allPack(data) {
|
||||
return request({
|
||||
url: `/api/place/pack`,
|
||||
method: "put",
|
||||
data:{
|
||||
shopId: uni.getStorageSync("shopId"),
|
||||
...data
|
||||
}
|
||||
});
|
||||
return request({
|
||||
url: `/api/place/pack`,
|
||||
method: "put",
|
||||
data: {
|
||||
shopId: uni.getStorageSync("shopId"),
|
||||
...data
|
||||
}
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 获取取餐号
|
||||
* @returns
|
||||
*/
|
||||
export function $getMasterId(data) {
|
||||
return request({
|
||||
url: `/api/place/masterId`,
|
||||
method: "get",
|
||||
params:{
|
||||
shopId: uni.getStorageSync("shopId"),
|
||||
useType: getUseType(),
|
||||
...data
|
||||
}
|
||||
});
|
||||
return request({
|
||||
url: `/api/place/masterId`,
|
||||
method: "get",
|
||||
params: {
|
||||
shopId: uni.getStorageSync("shopId"),
|
||||
useType: getUseType(),
|
||||
...data
|
||||
}
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 支付方式获取
|
||||
* @returns
|
||||
*/
|
||||
export function $getPayType(data) {
|
||||
return request({
|
||||
url: `/api/place/payType`,
|
||||
method: "get",
|
||||
params:{
|
||||
shopId: uni.getStorageSync("shopId"),
|
||||
...data
|
||||
}
|
||||
});
|
||||
return request({
|
||||
url: `/account/admin/payType`,
|
||||
method: "get",
|
||||
params: {
|
||||
shopId: uni.getStorageSync("shopId"),
|
||||
...data
|
||||
}
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 创建订单
|
||||
* @returns
|
||||
*/
|
||||
export function $createOrder(data) {
|
||||
return request({
|
||||
url: `/api/place/order`,
|
||||
method: "post",
|
||||
data:{
|
||||
shopId: uni.getStorageSync("shopId"),
|
||||
useType: getUseType(),
|
||||
...data
|
||||
}
|
||||
});
|
||||
return request({
|
||||
url: `/api/place/order`,
|
||||
method: "post",
|
||||
data: {
|
||||
shopId: uni.getStorageSync("shopId"),
|
||||
useType: getUseType(),
|
||||
...data
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -176,15 +203,15 @@ export function $createOrder(data) {
|
||||
* @returns
|
||||
*/
|
||||
export function $cacheOrder(data) {
|
||||
return request({
|
||||
url: `/api/place/pending`,
|
||||
method: "post",
|
||||
data:{
|
||||
shopId: uni.getStorageSync("shopId"),
|
||||
useType: getUseType(),
|
||||
...data
|
||||
}
|
||||
});
|
||||
return request({
|
||||
url: `/api/place/pending`,
|
||||
method: "post",
|
||||
data: {
|
||||
shopId: uni.getStorageSync("shopId"),
|
||||
useType: getUseType(),
|
||||
...data
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -192,201 +219,201 @@ export function $cacheOrder(data) {
|
||||
* @returns
|
||||
*/
|
||||
export function $getCacheOrder(data) {
|
||||
return request({
|
||||
url: `/api/place/pending/cart`,
|
||||
method: "get",
|
||||
params:{
|
||||
shopId: uni.getStorageSync("shopId"),
|
||||
useType: getUseType(),
|
||||
...data
|
||||
}
|
||||
});
|
||||
return request({
|
||||
url: `/api/place/pending/cart`,
|
||||
method: "get",
|
||||
params: {
|
||||
shopId: uni.getStorageSync("shopId"),
|
||||
useType: getUseType(),
|
||||
...data
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 会员点单/取消会员点单
|
||||
export function $setUser(data) {
|
||||
return request({
|
||||
url: `/api/place/updateVip`,
|
||||
method: "put",
|
||||
data:{
|
||||
shopId: uni.getStorageSync("shopId"),
|
||||
...data
|
||||
}
|
||||
});
|
||||
return request({
|
||||
url: `/api/place/updateVip`,
|
||||
method: "put",
|
||||
data: {
|
||||
shopId: uni.getStorageSync("shopId"),
|
||||
...data
|
||||
}
|
||||
});
|
||||
}
|
||||
// 删除订单
|
||||
export function $delOrder(data) {
|
||||
return request({
|
||||
url: `/api/place/order`,
|
||||
method: "delete",
|
||||
data:{
|
||||
shopId: uni.getStorageSync("shopId"),
|
||||
...data
|
||||
}
|
||||
});
|
||||
return request({
|
||||
url: `/api/place/order`,
|
||||
method: "delete",
|
||||
data: {
|
||||
shopId: uni.getStorageSync("shopId"),
|
||||
...data
|
||||
}
|
||||
});
|
||||
}
|
||||
// 支付订单
|
||||
export function $payOrder(data) {
|
||||
return request({
|
||||
url: '/api/place/pay',
|
||||
method: "put",
|
||||
data:{
|
||||
shopId: uni.getStorageSync("shopId"),
|
||||
...data
|
||||
}
|
||||
});
|
||||
return request({
|
||||
url: '/api/place/pay',
|
||||
method: "put",
|
||||
data: {
|
||||
shopId: uni.getStorageSync("shopId"),
|
||||
...data
|
||||
}
|
||||
});
|
||||
}
|
||||
//退单
|
||||
|
||||
export function $returnCart(data) {
|
||||
return request({
|
||||
url: '/api/place/returnCart',
|
||||
method: "put",
|
||||
data:{
|
||||
shopId: uni.getStorageSync("shopId"),
|
||||
...data
|
||||
}
|
||||
});
|
||||
return request({
|
||||
url: '/api/place/returnCart',
|
||||
method: "put",
|
||||
data: {
|
||||
shopId: uni.getStorageSync("shopId"),
|
||||
...data
|
||||
}
|
||||
});
|
||||
}
|
||||
// 选择台桌
|
||||
export function $choseTable(data) {
|
||||
return request({
|
||||
url: '/api/place/choseTable',
|
||||
method: "put",
|
||||
data:{
|
||||
shopId: uni.getStorageSync("shopId"),
|
||||
...data
|
||||
}
|
||||
});
|
||||
return request({
|
||||
url: '/api/place/choseTable',
|
||||
method: "put",
|
||||
data: {
|
||||
shopId: uni.getStorageSync("shopId"),
|
||||
...data
|
||||
}
|
||||
});
|
||||
}
|
||||
// 用餐人数
|
||||
|
||||
export function $choseCount(data) {
|
||||
return request({
|
||||
url: '/api/place/choseCount',
|
||||
method: "put",
|
||||
data:{
|
||||
shopId: uni.getStorageSync("shopId"),
|
||||
useType: getUseType(),
|
||||
...data
|
||||
}
|
||||
});
|
||||
return request({
|
||||
url: '/api/place/choseCount',
|
||||
method: "put",
|
||||
data: {
|
||||
shopId: uni.getStorageSync("shopId"),
|
||||
useType: getUseType(),
|
||||
...data
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 批量生成台桌
|
||||
export function $fastCreateTable(data) {
|
||||
return request({
|
||||
url: '/api/tbShopTable/generate',
|
||||
method: "post",
|
||||
data:{
|
||||
shopId: uni.getStorageSync("shopId"),
|
||||
...data
|
||||
}
|
||||
});
|
||||
return request({
|
||||
url: '/api/tbShopTable/generate',
|
||||
method: "post",
|
||||
data: {
|
||||
shopId: uni.getStorageSync("shopId"),
|
||||
...data
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//打印当前台桌订单
|
||||
export function $printOrder(data) {
|
||||
return request({
|
||||
url: '/api/place/printOrder',
|
||||
method: "post",
|
||||
data:{
|
||||
shopId: uni.getStorageSync("shopId"),
|
||||
...data
|
||||
}
|
||||
});
|
||||
return request({
|
||||
url: '/api/place/printOrder',
|
||||
method: "post",
|
||||
data: {
|
||||
shopId: uni.getStorageSync("shopId"),
|
||||
...data
|
||||
}
|
||||
});
|
||||
}
|
||||
//打印当前台桌菜品
|
||||
|
||||
export function $printDishes(data) {
|
||||
return request({
|
||||
url: '/api/place/printDishes',
|
||||
method: "post",
|
||||
data:{
|
||||
shopId: uni.getStorageSync("shopId"),
|
||||
...data
|
||||
}
|
||||
});
|
||||
return request({
|
||||
url: '/api/place/printDishes',
|
||||
method: "post",
|
||||
data: {
|
||||
shopId: uni.getStorageSync("shopId"),
|
||||
...data
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 就餐模式切换
|
||||
export function $changeUseType(data) {
|
||||
return request({
|
||||
url: '/api/place/choseModel',
|
||||
method: "put",
|
||||
data:{
|
||||
shopId: uni.getStorageSync("shopId"),
|
||||
...data
|
||||
}
|
||||
});
|
||||
return request({
|
||||
url: '/api/place/choseModel',
|
||||
method: "put",
|
||||
data: {
|
||||
shopId: uni.getStorageSync("shopId"),
|
||||
...data
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 退款
|
||||
export function $returnOrder(data) {
|
||||
return request({
|
||||
url: '/api/place/returnOrder',
|
||||
method: "post",
|
||||
data:{
|
||||
shopId: uni.getStorageSync("shopId"),
|
||||
...data
|
||||
}
|
||||
});
|
||||
return request({
|
||||
url: '/api/place/returnOrder',
|
||||
method: "post",
|
||||
data: {
|
||||
shopId: uni.getStorageSync("shopId"),
|
||||
...data
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//获取订单可用优惠券
|
||||
export function $activateByOrderId(data) {
|
||||
return request({
|
||||
url: '/api/tbShopCoupon/activateByOrderId',
|
||||
method: "get",
|
||||
params:{
|
||||
shopId: uni.getStorageSync("shopId"),
|
||||
...data
|
||||
}
|
||||
});
|
||||
return request({
|
||||
url: '/api/tbShopCoupon/activateByOrderId',
|
||||
method: "get",
|
||||
params: {
|
||||
shopId: uni.getStorageSync("shopId"),
|
||||
...data
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//会员积分列表
|
||||
export function $returnMemberPointsList(data) {
|
||||
return request({
|
||||
url: '/api/points/member-points/page',
|
||||
method: "get",
|
||||
params:{
|
||||
shopId: uni.getStorageSync("shopId"),
|
||||
...data
|
||||
}
|
||||
});
|
||||
return request({
|
||||
url: '/api/points/member-points/page',
|
||||
method: "get",
|
||||
params: {
|
||||
shopId: uni.getStorageSync("shopId"),
|
||||
...data
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 会员积分账户信息
|
||||
export function $returnMemberPoints(memberId) {
|
||||
return request({
|
||||
url: '/api/points/member-points/'+memberId,
|
||||
method: "get",
|
||||
params:{
|
||||
shopId: uni.getStorageSync("shopId"),
|
||||
...data
|
||||
}
|
||||
});
|
||||
return request({
|
||||
url: '/api/points/member-points/' + memberId,
|
||||
method: "get",
|
||||
params: {
|
||||
shopId: uni.getStorageSync("shopId"),
|
||||
...data
|
||||
}
|
||||
});
|
||||
}
|
||||
//002-获取订单可用积分及抵扣金额(支付页面使用)
|
||||
export function $calcUsablePoints(data) {
|
||||
return request({
|
||||
url: '/api/points/member-points/calc-usable-points',
|
||||
method: "get",
|
||||
params:{
|
||||
shopId: uni.getStorageSync("shopId"),
|
||||
...data
|
||||
}
|
||||
});
|
||||
return request({
|
||||
url: '/api/points/member-points/calc-usable-points',
|
||||
method: "get",
|
||||
params: {
|
||||
shopId: uni.getStorageSync("shopId"),
|
||||
...data
|
||||
}
|
||||
});
|
||||
}
|
||||
// 003-根据积分计算可抵扣金额
|
||||
export function $calcDeDuctionPoints(data) {
|
||||
return request({
|
||||
url: '/api/points/member-points/calc-deduction-amount',
|
||||
method: "get",
|
||||
params:{
|
||||
shopId: uni.getStorageSync("shopId"),
|
||||
...data
|
||||
}
|
||||
});
|
||||
return request({
|
||||
url: '/api/points/member-points/calc-deduction-amount',
|
||||
method: "get",
|
||||
params: {
|
||||
shopId: uni.getStorageSync("shopId"),
|
||||
...data
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -33,13 +33,13 @@ export function tbPrintMachineGet(params) {
|
||||
}
|
||||
|
||||
// 打印机部分
|
||||
export function tbShopCategoryget(params) {
|
||||
return request({
|
||||
url: '/api/tbShopCategory',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
// export function tbShopCategoryget(params) {
|
||||
// return request({
|
||||
// url: '/api/tbShopCategory',
|
||||
// method: 'get',
|
||||
// params
|
||||
// })
|
||||
// }
|
||||
// 修改打印机状态
|
||||
export function shopConfigprinter(data) {
|
||||
return request({
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import http from './http.js'
|
||||
import $API from '@/http/classApi.js'
|
||||
import appConfig from '@/config/appConfig.js'
|
||||
const request = http.request
|
||||
import {
|
||||
Base64
|
||||
} from 'js-base64'
|
||||
@@ -16,9 +17,47 @@ function objectToUrlParams(obj) {
|
||||
}
|
||||
return params.join('&');
|
||||
}
|
||||
|
||||
export function getHistoryOrder(data, urlType = 'order') {
|
||||
return request({
|
||||
url: `/order/admin/order/historyOrder`,
|
||||
method: "GET",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
/**
|
||||
* 清空某一次历史订单
|
||||
* @returns
|
||||
*/
|
||||
export function rmPlaceOrder(data, urlType = 'order') {
|
||||
return request({
|
||||
url: `/${urlType}/admin/order/rmPlaceOrder`,
|
||||
method: "POST",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/* 商品列表 */
|
||||
export function $tbProduct(data) {
|
||||
return http.req('/api/tbProduct', {...data,shopId:uni.getStorageSync('shopId')}, 'GET')
|
||||
export function $tbProduct(params) {
|
||||
return request({
|
||||
url: `/product/admin/product/list`,
|
||||
method: "get",
|
||||
params: {
|
||||
...params
|
||||
}
|
||||
});
|
||||
}
|
||||
// 商品详情
|
||||
export function adminProduct(params) {
|
||||
return request({
|
||||
url: `/product/admin/product/`+params,
|
||||
method: "get",
|
||||
params: {}
|
||||
});
|
||||
}
|
||||
|
||||
/* 添加商品 */
|
||||
@@ -56,7 +95,11 @@ export function $goodsIsHot(data) {
|
||||
* 商品分类列表
|
||||
*/
|
||||
export function $tbShopCategory(data) {
|
||||
return http.req('/api/tbShopCategory', {...data,shopId:uni.getStorageSync('shopId')}, 'GET')
|
||||
return request({
|
||||
url: `/product/admin/prod/category/list`,
|
||||
method: "get",
|
||||
params:data
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 商品分类
|
||||
|
||||
@@ -15,28 +15,40 @@ import {
|
||||
} from '@/commons/utils/encryptUtil.js'
|
||||
import infoBox from "@/commons/utils/infoBox.js"
|
||||
import go from '@/commons/utils/go.js';
|
||||
import { reject } from 'lodash';
|
||||
import {
|
||||
reject
|
||||
} from 'lodash';
|
||||
// 测试服
|
||||
let baseUrl = 'https://admintestpapi.sxczgkj.cn'
|
||||
|
||||
// let baseUrl = 'http://192.168.1.31'
|
||||
// let baseUrl = 'https://admintestpapi.sxczgkj.cn'
|
||||
// const proxyApiwws = 'ws://192.168.1.31:2348' // 调试地址
|
||||
//预发布
|
||||
// let baseUrl = 'https://pre-cashieradmin.sxczgkj.cn'
|
||||
|
||||
//正式
|
||||
// let baseUrl = 'https://cashieradmin.sxczgkj.cn'
|
||||
// let baseUrl = 'https://cashier.sxczgkj.com'
|
||||
|
||||
// 本地测
|
||||
let baseUrl = "http://192.168.1.31"
|
||||
// #ifdef H5
|
||||
baseUrl = '/ysk'
|
||||
// #endif
|
||||
|
||||
// 王伟本地测
|
||||
// let baseUrl = '/ww'
|
||||
// let baseUrl = 'http://192.168.1.15:8000'
|
||||
// 巩
|
||||
// let baseUrl = 'http://192.168.1.9:8000'
|
||||
// 巩
|
||||
// let baseUrl = 'http://192.168.1.9:8000'
|
||||
// 多少 ms 以内, 不提示loading
|
||||
const loadingShowTime = 200
|
||||
|
||||
|
||||
function getHeader(){
|
||||
const headerObject={}
|
||||
headerObject["Authorization"] = storageManage.token()
|
||||
function getHeader() {
|
||||
const headerObject = {}
|
||||
headerObject["token"] = uni.getStorageSync('tokenInfo').tokenValue
|
||||
headerObject["shopId"] = uni.getStorageSync("shopId"),
|
||||
// shopId:shopInfo.value.id
|
||||
headerObject["Content-Type"] = 'application/json;charset=UTF-8'
|
||||
headerObject["platformType"] ="PAD"
|
||||
return headerObject
|
||||
}
|
||||
|
||||
@@ -85,37 +97,20 @@ function commonsProcess(showLoading, httpReqCallback) {
|
||||
return Promise.reject(bodyData) // 跳转到catch函数
|
||||
}
|
||||
if (statusCode == 401) {
|
||||
// storageManage.token(null, true)
|
||||
// 提示信息
|
||||
|
||||
isShowErrorToast = true
|
||||
// infoBox.showErrorToast('请登录').then(() => {
|
||||
// go.to("PAGES_LOGIN", {}, go.GO_TYPE_RELAUNCH)
|
||||
// })
|
||||
|
||||
return Promise.reject(bodyData) // 跳转到catch函数
|
||||
}
|
||||
// http响应码不正确
|
||||
if (statusCode != 200 && statusCode != 204 && statusCode != 201) {
|
||||
isShowErrorToast = true
|
||||
data.message=data.message=='Bad credentials'?'用户名或密码错误':data.message
|
||||
data.message = data.message == 'Bad credentials' ? '用户名或密码错误' : data.message
|
||||
infoBox.showToast(data.message || '服务器异常')
|
||||
return Promise.reject(bodyData) // 跳转到catch函数
|
||||
}
|
||||
|
||||
// // 业务响应异常
|
||||
// if (bodyData.hasOwnProperty('code') && bodyData.code != 200) {
|
||||
// isShowErrorToast = true
|
||||
// infoBox.showToast(bodyData.msg)
|
||||
// if (bodyData.code == 5005) { // 密码已过期, 直接跳转到更改密码页面
|
||||
// uni.reLaunch({
|
||||
// url: '/pageUser/setting/updatePwd'
|
||||
// })
|
||||
// }
|
||||
// // if(bodyData.code == 500){ // 密码已过期, 直接跳转到更改密码页面
|
||||
// // uni.redirectTo({url: '/pages/login/index'})
|
||||
// // }
|
||||
// return bodyData
|
||||
// // return Promise.reject(bodyData)
|
||||
// }
|
||||
|
||||
|
||||
// 加密数据
|
||||
if (!bodyData.data && bodyData.encryptData) {
|
||||
@@ -130,26 +125,20 @@ function commonsProcess(showLoading, httpReqCallback) {
|
||||
return Promise.resolve(bodyData)
|
||||
|
||||
}).catch(res => {
|
||||
if(res.status==401){
|
||||
if (res.status == 401) {
|
||||
storageManage.token(null, true)
|
||||
infoBox.showErrorToast(res.message||'请登录').then(() => {
|
||||
uni.redirectTo({url: '/pages/login/index'})
|
||||
infoBox.showErrorToast(res.message || '请登录').then(() => {
|
||||
uni.redirectTo({
|
||||
url: '/pages/login/index'
|
||||
})
|
||||
reject()
|
||||
})
|
||||
}
|
||||
// if(res.status==400){
|
||||
// storageManage.token(null, true)
|
||||
// infoBox.showErrorToast('').then(() => {
|
||||
// go.to("PAGES_LOGIN", {}, go.GO_TYPE_RELAUNCH)
|
||||
// })
|
||||
// }
|
||||
if(res.status==500){
|
||||
infoBox.showErrorToast(res.message||'服务器异常').then(() => {
|
||||
})
|
||||
|
||||
if (res.status == 500) {
|
||||
infoBox.showErrorToast(res.message || '服务器异常').then(() => {})
|
||||
}
|
||||
// if(res&&res.msg){
|
||||
// infoBox.showErrorToast(res.msg)
|
||||
// }
|
||||
|
||||
reqFinishFunc(); // 请求完毕的动作
|
||||
|
||||
// 如果没有提示错误, 那么此处提示 异常。
|
||||
@@ -168,7 +157,6 @@ function commonsProcess(showLoading, httpReqCallback) {
|
||||
|
||||
// 默认 显示loading(控制 xxs 内 不提示loading )
|
||||
function req(uri, data, method = "GET", showLoading = true, extParams = {}) {
|
||||
// headerObject[appConfig.tokenKey] = storageManage.token()
|
||||
return commonsProcess(showLoading, () => {
|
||||
return uni.request(
|
||||
Object.assign({
|
||||
@@ -193,14 +181,15 @@ function request(args) {
|
||||
extParams = {}
|
||||
} = args
|
||||
let headerObject = {}
|
||||
// headerObject[appConfig.tokenKey] = storageManage.token()
|
||||
return commonsProcess(showLoading, () => {
|
||||
// console.log('baseUrl+');
|
||||
// console.log(baseUrl + url);
|
||||
return uni.request(
|
||||
Object.assign({
|
||||
url: baseUrl + url,
|
||||
data: params||data,
|
||||
data: params || data,
|
||||
method: method,
|
||||
header: getHeader()
|
||||
header: getHeader()
|
||||
}, extParams)
|
||||
)
|
||||
})
|
||||
@@ -212,7 +201,6 @@ function request(args) {
|
||||
function upload(uri, data, file, showLoading = true, extParams = {}) {
|
||||
// 放置token
|
||||
let headerObject = {}
|
||||
// headerObject[appConfig.tokenKey] = storageManage.token()
|
||||
|
||||
return commonsProcess(showLoading, () => {
|
||||
return uni.uploadFile(
|
||||
@@ -220,14 +208,14 @@ function upload(uri, data, file, showLoading = true, extParams = {}) {
|
||||
url: baseUrl + uri,
|
||||
formData: data,
|
||||
name: "file",
|
||||
filePath: file.path||file.url,
|
||||
header: getHeader()
|
||||
filePath: file.path || file.url,
|
||||
header: getHeader()
|
||||
}, extParams)
|
||||
).then((httpData) => {
|
||||
// uni.upload 返回bodyData 的是 string类型。 需要解析。
|
||||
httpData.data = JSON.parse(httpData.data)
|
||||
return Promise.resolve(httpData)
|
||||
}).catch(err=>{
|
||||
}).catch(err => {
|
||||
uni.hideLoading()
|
||||
infoBox.showErrorToast(`上传失败`)
|
||||
})
|
||||
|
||||
@@ -3,7 +3,7 @@ const request=http.request
|
||||
|
||||
export function login(data) {
|
||||
return request({
|
||||
url: "/auth/login",
|
||||
url: "/account/admin/auth/login",
|
||||
method: "post",
|
||||
data
|
||||
});
|
||||
@@ -18,7 +18,7 @@ export function getInfo() {
|
||||
|
||||
export function getCodeImg(header) {
|
||||
return request({
|
||||
url: "/auth/code",
|
||||
url: "/account/admin/auth/captcha",
|
||||
method: "get"
|
||||
});
|
||||
}
|
||||
|
||||
@@ -8,8 +8,8 @@ const request = http.request
|
||||
*/
|
||||
export function tbOrderInfoData(data) {
|
||||
return request({
|
||||
url: "/api/tbOrderInfo/date",
|
||||
method: "post",
|
||||
url: "/order/admin/order",
|
||||
method: "get",
|
||||
data: {
|
||||
shopId: uni.getStorageSync('shopId'),
|
||||
...data
|
||||
@@ -33,7 +33,15 @@ export function tbOrderInfoDownload(data) {
|
||||
responseType: "blob"
|
||||
});
|
||||
}
|
||||
|
||||
export function createOrder(data, urlType = 'order') {
|
||||
return request({
|
||||
url: `/${urlType}/admin/order/createOrder`,
|
||||
method: "POST",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
/**
|
||||
* 通过Id查询订单
|
||||
* @param {*} id
|
||||
|
||||
@@ -13,15 +13,28 @@ export function $layout(params) {
|
||||
}
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 清空历史订单
|
||||
* @returns
|
||||
*/
|
||||
export function cancelOrder(data, urlType = 'order') {
|
||||
return request({
|
||||
url: `/${urlType}/admin/order/cancelOrder`,
|
||||
method: "POST",
|
||||
data: {
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// Pad点餐列表
|
||||
export function $layoutpage(params) {
|
||||
return request({
|
||||
url: '/api/pad/productCategory/page',
|
||||
url: '/account/admin/padProd',
|
||||
method: "get",
|
||||
params:{
|
||||
userId: uni.getStorageSync("shopUserId"),
|
||||
shopId: uni.getStorageSync("shopId"),
|
||||
// userId: uni.getStorageSync("shopUserId"),
|
||||
// shopId: uni.getStorageSync("shopId"),
|
||||
...params
|
||||
}
|
||||
});
|
||||
@@ -30,11 +43,11 @@ export function $layoutpage(params) {
|
||||
|
||||
export function $productCategory(id) {
|
||||
return request({
|
||||
url: '/api/pad/productCategory/'+id,
|
||||
url: '/account/admin/padProd/detail?id='+id,
|
||||
method: "get",
|
||||
params:{
|
||||
userId: uni.getStorageSync("shopUserId"),
|
||||
shopId: uni.getStorageSync("shopId"),
|
||||
// userId: uni.getStorageSync("shopUserId"),
|
||||
// shopId: uni.getStorageSync("shopId"),
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import http from './http.js'
|
||||
import http from '@/http/http.js'
|
||||
const request=http.request
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ const request=http.request
|
||||
*/
|
||||
export function getShopList(params) {
|
||||
return request({
|
||||
url: `/api/tbShopInfo`,
|
||||
url: `/account/admin/shopUser`,
|
||||
method: 'get',
|
||||
params: {
|
||||
|
||||
@@ -20,15 +20,15 @@ export function getShopList(params) {
|
||||
* 获取店铺数据
|
||||
* @returns
|
||||
*/
|
||||
export function getShopInfo(params) {
|
||||
return request({
|
||||
url: `/api/tbShopInfo/${params}`,
|
||||
method: 'get',
|
||||
params: {
|
||||
// export function getShopInfo(params) {
|
||||
// return request({
|
||||
// url: `/account/admin/shopUser/detail/${params}`,
|
||||
// method: 'get',
|
||||
// params: {
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
|
||||
/**
|
||||
* 更改店铺信息
|
||||
@@ -189,13 +189,13 @@ export function tbShopCurrencyGet(params) {
|
||||
* 商品分类列表
|
||||
* @returns
|
||||
*/
|
||||
export function tbShopCategoryGet(params) {
|
||||
return request({
|
||||
url: `/api/tbShopCategory`,
|
||||
method: "get",
|
||||
params
|
||||
});
|
||||
}
|
||||
// export function categorylist(params) {
|
||||
// return request({
|
||||
// url: `/admin/prod/category/list`,
|
||||
// method: "get",
|
||||
// params
|
||||
// });
|
||||
// }
|
||||
|
||||
/**
|
||||
* 新增、编辑分类/新增、编辑子分类
|
||||
|
||||
@@ -9,9 +9,9 @@ import {
|
||||
import infoBox from '@/commons/utils/infoBox.js'
|
||||
|
||||
/* 台桌区域 */
|
||||
export const $tableArea = new $API('/api/tbShopArea', http.req)
|
||||
export const $tableArea = new $API('/account/admin/shopArea', http.req)
|
||||
/* 台桌 */
|
||||
export const $table = new $API('/api/tbShopTable', http.req)
|
||||
export const $table = new $API('/account/admin/shopTable', http.req)
|
||||
/* 绑定 */
|
||||
// export const $bind=new $API('/api/tbShopTable/bind',http.req)
|
||||
export function $bind(data) {
|
||||
@@ -27,7 +27,7 @@ export function $bind(data) {
|
||||
//获取台桌详情状态
|
||||
export function $returnTableDetail(data) {
|
||||
return request({
|
||||
url: '/api/tbShopTable/state',
|
||||
url: '/account/admin/shopTable/detail',
|
||||
method: "get",
|
||||
params: {
|
||||
shopId: uni.getStorageSync('shopId'),
|
||||
|
||||
@@ -7,7 +7,7 @@ const request=http.request
|
||||
export function tbShopInfo(shopId) {
|
||||
const _shopId=uni.getStorageSync('shopId')
|
||||
return request({
|
||||
url: `/api/tbShopInfo/${shopId||_shopId}`,
|
||||
url: `/account/admin/shopUser/detail?id=${shopId||_shopId}`,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
@@ -22,4 +22,21 @@ export function tbShopInfoPut(data) {
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 获取店铺商品信息
|
||||
export function getShopInfo(data) {
|
||||
return request({
|
||||
url: `/account/admin/shopInfo/detail`,
|
||||
method: 'get',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 获取布局
|
||||
export function getLayout(data) {
|
||||
return request({
|
||||
url: `/account/admin/padProd/layout`,
|
||||
method: 'get',
|
||||
data
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user