diff --git a/.hbuilderx/launch.json b/.hbuilderx/launch.json
index 179fe2d..07d9281 100644
--- a/.hbuilderx/launch.json
+++ b/.hbuilderx/launch.json
@@ -16,7 +16,7 @@
"type" : "uniCloud"
},
{
- "playground" : "custom",
+ "playground" : "standard",
"type" : "uni-app:app-android"
}
]
diff --git a/App.vue b/App.vue
index b13a8f6..df35230 100644
--- a/App.vue
+++ b/App.vue
@@ -3,14 +3,20 @@
App.vue本身不是页面,这里不能编写视图元素,也就是没有
-->
diff --git a/config/appConfig.js b/config/appConfig.js
index 8e2a36a..f749a67 100644
--- a/config/appConfig.js
+++ b/config/appConfig.js
@@ -4,12 +4,12 @@ const appConfig = {
appName: '银收客',
// token取值key
- tokenKey: 'iToken',
- // tokenKey: 'satoken',
+ tokenKey: 'tokenInfo',
// 环境变量相关
env: {},
-
+ wss: "ws://192.168.1.31:2348", //
+ // wss: "wss://sockets.sxczgkj.com/wss", //
// 环境变量常量
ENV_ENUM: {
DEVELOPMENT: 'development', // 本地调试地址
diff --git a/http/api/area.js b/http/api/area.js
new file mode 100644
index 0000000..d90c14f
--- /dev/null
+++ b/http/api/area.js
@@ -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
+ }
+ })
+}
diff --git a/http/api/buyer.js b/http/api/buyer.js
new file mode 100644
index 0000000..5db0924
--- /dev/null
+++ b/http/api/buyer.js
@@ -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
+ }
+ })
+}
\ No newline at end of file
diff --git a/http/api/callTable.js b/http/api/callTable.js
new file mode 100644
index 0000000..a86abf8
--- /dev/null
+++ b/http/api/callTable.js
@@ -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
+ }
+ })
+}
diff --git a/http/api/cateGory.js b/http/api/cateGory.js
new file mode 100644
index 0000000..f93d37f
--- /dev/null
+++ b/http/api/cateGory.js
@@ -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",
+ })
+}
\ No newline at end of file
diff --git a/http/api/cons.js b/http/api/cons.js
new file mode 100644
index 0000000..ea6554a
--- /dev/null
+++ b/http/api/cons.js
@@ -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
+ }
+ })
+}
\ No newline at end of file
diff --git a/http/api/coupon.js b/http/api/coupon.js
new file mode 100644
index 0000000..05e211a
--- /dev/null
+++ b/http/api/coupon.js
@@ -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
+ }
+ })
+}
diff --git a/http/api/freeDing.js b/http/api/freeDing.js
new file mode 100644
index 0000000..851a9cf
--- /dev/null
+++ b/http/api/freeDing.js
@@ -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
+ }
+ })
+}
diff --git a/http/api/handover.js b/http/api/handover.js
new file mode 100644
index 0000000..dbc4d92
--- /dev/null
+++ b/http/api/handover.js
@@ -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
+ }
+ })
+}
\ No newline at end of file
diff --git a/http/api/index.js b/http/api/index.js
new file mode 100644
index 0000000..32a669d
--- /dev/null
+++ b/http/api/index.js
@@ -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
+ }
+ })
+}
diff --git a/http/api/login.js b/http/api/login.js
new file mode 100644
index 0000000..307dcd4
--- /dev/null
+++ b/http/api/login.js
@@ -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
+ }
+ })
+}
diff --git a/http/api/order.js b/http/api/order.js
new file mode 100644
index 0000000..95aa21d
--- /dev/null
+++ b/http/api/order.js
@@ -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
+ }
+ })
+}
+
+
diff --git a/http/api/pay.js b/http/api/pay.js
new file mode 100644
index 0000000..abd5be6
--- /dev/null
+++ b/http/api/pay.js
@@ -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
+ }
+ })
+}
diff --git a/http/api/payType.js b/http/api/payType.js
new file mode 100644
index 0000000..73e1ce8
--- /dev/null
+++ b/http/api/payType.js
@@ -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
+ }
+ })
+}
diff --git a/http/api/points.js b/http/api/points.js
new file mode 100644
index 0000000..5b61e39
--- /dev/null
+++ b/http/api/points.js
@@ -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
+ }
+ })
+}
diff --git a/http/api/printer.js b/http/api/printer.js
new file mode 100644
index 0000000..b232253
--- /dev/null
+++ b/http/api/printer.js
@@ -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
+ }
+ })
+}
diff --git a/http/api/product.js b/http/api/product.js
new file mode 100644
index 0000000..50ddbae
--- /dev/null
+++ b/http/api/product.js
@@ -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",
+ })
+}
\ No newline at end of file
diff --git a/http/api/role.js b/http/api/role.js
new file mode 100644
index 0000000..9ea2dc5
--- /dev/null
+++ b/http/api/role.js
@@ -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
+ }
+ })
+}
diff --git a/http/api/shop.js b/http/api/shop.js
new file mode 100644
index 0000000..e9506db
--- /dev/null
+++ b/http/api/shop.js
@@ -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
+ }
+ })
+}
diff --git a/http/api/shopPagePermission.js b/http/api/shopPagePermission.js
new file mode 100644
index 0000000..64a8ec8
--- /dev/null
+++ b/http/api/shopPagePermission.js
@@ -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
+ }
+ })
+}
diff --git a/http/api/shopUser.js b/http/api/shopUser.js
new file mode 100644
index 0000000..f843f25
--- /dev/null
+++ b/http/api/shopUser.js
@@ -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
+ }
+ })
+}
diff --git a/http/api/staff.js b/http/api/staff.js
new file mode 100644
index 0000000..fc356d3
--- /dev/null
+++ b/http/api/staff.js
@@ -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
+ }
+ })
+}
diff --git a/http/api/summary.js b/http/api/summary.js
new file mode 100644
index 0000000..dcbd8c2
--- /dev/null
+++ b/http/api/summary.js
@@ -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
+ }
+ })
+}
diff --git a/http/api/table.js b/http/api/table.js
new file mode 100644
index 0000000..84f6c5c
--- /dev/null
+++ b/http/api/table.js
@@ -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
+ }
+ })
+}
diff --git a/http/api/vendor.js b/http/api/vendor.js
new file mode 100644
index 0000000..c227a74
--- /dev/null
+++ b/http/api/vendor.js
@@ -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",
+ })
+}
+
diff --git a/http/businessHttp.js b/http/businessHttp.js
index 2938964..32232ca 100644
--- a/http/businessHttp.js
+++ b/http/businessHttp.js
@@ -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) => {
diff --git a/http/newApi/http.js b/http/newApi/http.js
index da81844..863aab5 100644
--- a/http/newApi/http.js
+++ b/http/newApi/http.js
@@ -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, () => {
diff --git a/http/websock.js b/http/websock.js
new file mode 100644
index 0000000..4d605d3
--- /dev/null
+++ b/http/websock.js
@@ -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;
\ No newline at end of file
diff --git a/http/yskApi/Instead.js b/http/yskApi/Instead.js
index d964201..ccd1ba1 100644
--- a/http/yskApi/Instead.js
+++ b/http/yskApi/Instead.js
@@ -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
+ }
+ });
}
\ No newline at end of file
diff --git a/http/yskApi/devices.js b/http/yskApi/devices.js
index 82b1c57..9995b3f 100644
--- a/http/yskApi/devices.js
+++ b/http/yskApi/devices.js
@@ -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({
diff --git a/http/yskApi/goods.js b/http/yskApi/goods.js
index 18e1587..9cdda34 100644
--- a/http/yskApi/goods.js
+++ b/http/yskApi/goods.js
@@ -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
+ });
}
/**
* 商品分类
diff --git a/http/yskApi/http.js b/http/yskApi/http.js
index 67aef22..ec107cb 100644
--- a/http/yskApi/http.js
+++ b/http/yskApi/http.js
@@ -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(`上传失败`)
})
diff --git a/http/yskApi/login.js b/http/yskApi/login.js
index 0791b7a..4ed510d 100644
--- a/http/yskApi/login.js
+++ b/http/yskApi/login.js
@@ -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"
});
}
diff --git a/http/yskApi/order.js b/http/yskApi/order.js
index 764344e..4f1cd22 100644
--- a/http/yskApi/order.js
+++ b/http/yskApi/order.js
@@ -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
diff --git a/http/yskApi/pad.js b/http/yskApi/pad.js
index cea7721..2adab96 100644
--- a/http/yskApi/pad.js
+++ b/http/yskApi/pad.js
@@ -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"),
}
});
}
diff --git a/http/yskApi/shop.js b/http/yskApi/shop.js
index 9422701..581113e 100644
--- a/http/yskApi/shop.js
+++ b/http/yskApi/shop.js
@@ -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
+// });
+// }
/**
* 新增、编辑分类/新增、编辑子分类
diff --git a/http/yskApi/table.js b/http/yskApi/table.js
index 796f756..2e03939 100644
--- a/http/yskApi/table.js
+++ b/http/yskApi/table.js
@@ -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'),
diff --git a/http/yskApi/user.js b/http/yskApi/user.js
index 1b46450..f34f5a9 100644
--- a/http/yskApi/user.js
+++ b/http/yskApi/user.js
@@ -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
+ })
}
\ No newline at end of file
diff --git a/main.js b/main.js
index fdfb8eb..580b161 100644
--- a/main.js
+++ b/main.js
@@ -4,7 +4,9 @@ import envConfig from '@/env/config.js'
import appConfig from '@/config/appConfig.js'
import storageManage from '@/commons/utils/storageManage.js'
import uviewPlus,{setConfig} from 'uview-plus'
+import dict from '@/commons/utils/dict.js'
// 下面的在特殊场景下才需要配置,通常不用配置即可直接使用uvire-plus框架。
+import {utils} from '@/commons/utils/index.js'
// 调用setConfig方法,方法内部会进行对象属性深度合并,可以放心嵌套配置
// 需要在app.use(uview-plus)之后执行
setConfig({
@@ -26,6 +28,13 @@ setConfig({
// 设置node环境
envConfig.changeEnv(storageManage.env())
+// import VConsole from 'vconsole';
+
+// 初始化vConsole
+// const vConsole = new VConsole({
+ // defaultPlugins: ['console']
+// });
+
// #ifndef VUE3
import App from './App'
@@ -49,6 +58,10 @@ export function createApp() {
app.use(uviewPlus)
app.config.globalProperties.$appName = appConfig.appName
uni.$appName = appConfig.appName
+ app.config.globalProperties.$utils = utils
+ uni.$utils = utils
+ app.config.globalProperties.$dict = dict
+ uni.$dict = dict
return {
app
}
diff --git a/manifest.json b/manifest.json
index 49f8f4a..ece3a89 100644
--- a/manifest.json
+++ b/manifest.json
@@ -1,239 +1,242 @@
{
- "name" : "银收客点餐宝",
- "appid" : "__UNI__66E7BD0",
- "description" : "",
- "versionName" : "1.0.0",
- "versionCode" : 100,
- "transformPx" : false,
- "app-plus" : {
- "orientation" : "landscape",
- /* 5+App特有相关 */
- "usingComponents" : true,
- "nvueCompiler" : "uni-app",
- "nvueStyleCompiler" : "uni-app",
- "splashscreen" : {
- "alwaysShowBeforeRender" : true,
- "waiting" : true,
- "autoclose" : true,
- "delay" : 0
- },
- "modules" : {
- "Canvas" : "nvue canvas", //使用Canvas模块
- "Geolocation" : {},
- "Maps" : {},
- "Barcode" : {},
- "Camera" : {}
- },
- "screenOrientation" : [
- "portrait-primary",
- "portrait-secondary",
- "landscape-primary",
- "landscape-secondary"
- ],
- /* 模块配置 */
- "distribute" : {
- /* 应用发布信息 */
- "android" : {
- "orientation" : "landscape",
- /* android打包配置 */
- "permissions" : [
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- ""
- ],
- "abiFilters" : [ "armeabi-v7a" ],
- "permissionExternalStorage" : {
- "request" : "none",
- "prompt" : "应用保存运行状态等信息,需要获取读写手机存储(系统提示为访问设备上的照片、媒体内容和文件)权限,请允许。"
- },
- "permissionPhoneState" : {
- "request" : "none",
- "prompt" : "为保证您正常、安全地使用,需要获取设备识别码(部分手机提示为获取手机号码)使用权限,请允许。"
- },
- "autoSdkPermissions" : true,
- "targetSdkVersion" : 26,
- "minSdkVersion" : 21
- },
- "ios" : {
- "dSYMs" : false
- },
- /* ios打包配置 */
- "sdkConfigs" : {
- "geolocation" : {
- "amap" : {
- "__platform__" : [ "ios", "android" ],
- "appkey_ios" : "0b9be2631525ee5e218ac26d333f215c",
- "appkey_android" : "9d1e62050f8558a082f7aa3ad5bb3c68"
- }
- },
- "maps" : {
- "amap" : {
- "appkey_ios" : "0b9be2631525ee5e218ac26d333f215c",
- "appkey_android" : "9d1e62050f8558a082f7aa3ad5bb3c68"
- }
- },
- "ad" : {},
- "push" : {}
- },
- "icons" : {
- "android" : {
- "hdpi" : "unpackage/res/icons/72x72.png",
- "xhdpi" : "unpackage/res/icons/96x96.png",
- "xxhdpi" : "unpackage/res/icons/144x144.png",
- "xxxhdpi" : "unpackage/res/icons/192x192.png"
- },
- "ios" : {
- "appstore" : "unpackage/res/icons/1024x1024.png",
- "ipad" : {
- "app" : "unpackage/res/icons/76x76.png",
- "app@2x" : "unpackage/res/icons/152x152.png",
- "notification" : "unpackage/res/icons/20x20.png",
- "notification@2x" : "unpackage/res/icons/40x40.png",
- "proapp@2x" : "unpackage/res/icons/167x167.png",
- "settings" : "unpackage/res/icons/29x29.png",
- "settings@2x" : "unpackage/res/icons/58x58.png",
- "spotlight" : "unpackage/res/icons/40x40.png",
- "spotlight@2x" : "unpackage/res/icons/80x80.png"
- },
- "iphone" : {
- "app@2x" : "unpackage/res/icons/120x120.png",
- "app@3x" : "unpackage/res/icons/180x180.png",
- "notification@2x" : "unpackage/res/icons/40x40.png",
- "notification@3x" : "unpackage/res/icons/60x60.png",
- "settings@2x" : "unpackage/res/icons/58x58.png",
- "settings@3x" : "unpackage/res/icons/87x87.png",
- "spotlight@2x" : "unpackage/res/icons/80x80.png",
- "spotlight@3x" : "unpackage/res/icons/120x120.png"
- }
- }
- },
- "splashscreen" : {
- "alwaysShowBeforeRender" : true,
- "autoclose" : true,
- "delay" : 0,
- "orientation" : "landscape",
- "androidStyle" : "default",
- "android" : {
- "hdpi" : "C:/Users/Administrator/Desktop/bg.png",
- "xhdpi" : "C:/Users/Administrator/Desktop/bg.png",
- "xxhdpi" : "C:/Users/Administrator/Desktop/bg.png"
- },
- "useOriginalMsgbox" : true,
- "iosStyle" : "storyboard",
- "ios" : {
- "storyboard" : "C:/Users/Administrator/Downloads/CustomStoryboard.zip"
- }
- }
- }
- },
- /* SDK配置 */
- "quickapp" : {},
- /* 快应用特有相关 */
- "mp-weixin" : {
- "appid" : "wxcbff1cfb27c1066c",
- "setting" : {
- "urlCheck" : false,
- "minified" : true,
- "postcss" : true,
- "es6" : true
- },
- "optimization" : {
- "subPackages" : true
- },
- "usingComponents" : true,
- "libVersion" : "latest"
- },
- "vueVersion" : "3",
- "h5" : {
- "unipush" : {
- "enable" : true
- },
- "devServer" : {
- "disableHostCheck" : true,
- "proxy" : {
- "/shopApi" : {
- // 需要被代理的后台地址
- "target" : "https://wxcashiertest.sxczgkj.cn/cashierService",
- "changeOrigin" : true,
- "secure" : false,
- "pathRewrite" : {
- "^/shopApi" : ""
- }
- },
- "/mch" : {
- // 需要被代理的后台地址
- "target" : "https://b.rscygroup.com",
- "changeOrigin" : true,
- "secure" : false,
- "pathRewrite" : {
- "^/mch" : ""
- }
- },
- "/server1" : {
- // 需要被代理的后台地址
- "target" : "http://101.37.12.135:8080",
- "changeOrigin" : true,
- "secure" : false,
- "pathRewrite" : {
- "^/server1" : ""
- }
- },
- "/server3" : {
- // 需要被代理的后台地址
- "target" : "http://101.37.12.135:8080",
- "changeOrigin" : true,
- "secure" : false,
- "pathRewrite" : {
- "^/server3" : ""
- }
- },
- "/ysk" : {
- // 需要被代理的后台地址
- "target" : "https://admintestpapi.sxczgkj.cn",
- "changeOrigin" : true,
- "secure" : false,
- "pathRewrite" : {
- "/ysk" : ""
- }
- },
- "/ww" : {
- // 需要被代理的后台地址
- "target" : "http://192.168.1.15:8000",
- "changeOrigin" : true,
- "secure" : false,
- "pathRewrite" : {
- "/ww" : ""
- }
- }
- }
- },
- "sdkConfigs" : {
- "maps" : {
- "amap" : {
- "key" : "6033c97e67bf2e9ceac306e1a3fa35f8",
- "securityJsCode" : "0547b69252ef0ed14e11f5c4ac152f07",
- "serviceHost" : ""
- }
- }
- }
- },
- "mp-alipay" : {
- "appid" : "2021004128648214"
- }
-}
+ "name": "银收客点餐宝",
+ "appid": "__UNI__66E7BD0",
+ "description": "",
+ "versionName": "1.0.0",
+ "versionCode": 100,
+ "transformPx": false,
+ "app-plus": {
+ "orientation": "landscape",
+ /* 5+App特有相关 */
+ "usingComponents": true,
+ "nvueCompiler": "uni-app",
+ "nvueStyleCompiler": "uni-app",
+ "splashscreen": {
+ "alwaysShowBeforeRender": true,
+ "waiting": true,
+ "autoclose": true,
+ "delay": 0
+ },
+ "modules": {
+ "Canvas": "nvue canvas", //使用Canvas模块
+ "Geolocation": {},
+ "Maps": {},
+ "Barcode": {},
+ "Camera": {}
+ },
+ "screenOrientation": [
+ "portrait-primary",
+ "portrait-secondary",
+ "landscape-primary",
+ "landscape-secondary"
+ ],
+ /* 模块配置 */
+ "distribute": {
+ /* 应用发布信息 */
+ "android": {
+ "orientation": "landscape",
+ /* android打包配置 */
+ "permissions": [
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ ""
+ ],
+ "abiFilters": ["armeabi-v7a"],
+ "permissionExternalStorage": {
+ "request": "none",
+ "prompt": "应用保存运行状态等信息,需要获取读写手机存储(系统提示为访问设备上的照片、媒体内容和文件)权限,请允许。"
+ },
+ "permissionPhoneState": {
+ "request": "none",
+ "prompt": "为保证您正常、安全地使用,需要获取设备识别码(部分手机提示为获取手机号码)使用权限,请允许。"
+ },
+ "autoSdkPermissions": true,
+ "targetSdkVersion": 26,
+ "minSdkVersion": 21
+ },
+ "ios": {
+ "dSYMs": false
+ },
+ /* ios打包配置 */
+ "sdkConfigs": {
+ "geolocation": {
+ "amap": {
+ "__platform__": ["ios", "android"],
+ "appkey_ios": "0b9be2631525ee5e218ac26d333f215c",
+ "appkey_android": "9d1e62050f8558a082f7aa3ad5bb3c68"
+ }
+ },
+ "maps": {
+ "amap": {
+ "appkey_ios": "0b9be2631525ee5e218ac26d333f215c",
+ "appkey_android": "9d1e62050f8558a082f7aa3ad5bb3c68"
+ }
+ },
+ "ad": {},
+ "push": {}
+ },
+ "icons": {
+ "android": {
+ "hdpi": "unpackage/res/icons/72x72.png",
+ "xhdpi": "unpackage/res/icons/96x96.png",
+ "xxhdpi": "unpackage/res/icons/144x144.png",
+ "xxxhdpi": "unpackage/res/icons/192x192.png"
+ },
+ "ios": {
+ "appstore": "unpackage/res/icons/1024x1024.png",
+ "ipad": {
+ "app": "unpackage/res/icons/76x76.png",
+ "app@2x": "unpackage/res/icons/152x152.png",
+ "notification": "unpackage/res/icons/20x20.png",
+ "notification@2x": "unpackage/res/icons/40x40.png",
+ "proapp@2x": "unpackage/res/icons/167x167.png",
+ "settings": "unpackage/res/icons/29x29.png",
+ "settings@2x": "unpackage/res/icons/58x58.png",
+ "spotlight": "unpackage/res/icons/40x40.png",
+ "spotlight@2x": "unpackage/res/icons/80x80.png"
+ },
+ "iphone": {
+ "app@2x": "unpackage/res/icons/120x120.png",
+ "app@3x": "unpackage/res/icons/180x180.png",
+ "notification@2x": "unpackage/res/icons/40x40.png",
+ "notification@3x": "unpackage/res/icons/60x60.png",
+ "settings@2x": "unpackage/res/icons/58x58.png",
+ "settings@3x": "unpackage/res/icons/87x87.png",
+ "spotlight@2x": "unpackage/res/icons/80x80.png",
+ "spotlight@3x": "unpackage/res/icons/120x120.png"
+ }
+ }
+ },
+ "splashscreen": {
+ "alwaysShowBeforeRender": true,
+ "autoclose": true,
+ "delay": 0,
+ "orientation": "landscape",
+ "androidStyle": "default",
+ "android": {
+ "hdpi": "C:/Users/Administrator/Desktop/bg.png",
+ "xhdpi": "C:/Users/Administrator/Desktop/bg.png",
+ "xxhdpi": "C:/Users/Administrator/Desktop/bg.png"
+ },
+ "useOriginalMsgbox": true,
+ "iosStyle": "storyboard",
+ "ios": {
+ "storyboard": "C:/Users/Administrator/Downloads/CustomStoryboard.zip"
+ }
+ }
+ }
+ },
+ /* SDK配置 */
+ "quickapp": {},
+ /* 快应用特有相关 */
+ "mp-weixin": {
+ "appid": "wxd88fffa983758a30",
+ "setting": {
+ "urlCheck": false,
+ "minified": true,
+ "postcss": true,
+ "es6": true
+ },
+ "optimization": {
+ "subPackages": true
+ },
+ "usingComponents": true,
+ "libVersion": "latest"
+ },
+ "vueVersion": "3",
+ "h5": {
+ "unipush": {
+ "enable": true
+ },
+ "devServer": {
+ "disableHostCheck": true,
+ "proxy": {
+ "/shopApi": {
+ // 需要被代理的后台地址
+ "target": "https://wxcashiertest.sxczgkj.cn/cashierService",
+ "changeOrigin": true,
+ "secure": false,
+ "pathRewrite": {
+ "^/shopApi": ""
+ }
+ },
+ "/mch": {
+ // 需要被代理的后台地址
+ "target": "https://b.rscygroup.com",
+ "changeOrigin": true,
+ "secure": false,
+ "pathRewrite": {
+ "^/mch": ""
+ }
+ },
+ "/server1": {
+ // 需要被代理的后台地址
+ "target": "http://101.37.12.135:8080",
+ "changeOrigin": true,
+ "secure": false,
+ "pathRewrite": {
+ "^/server1": ""
+ }
+ },
+ "/server3": {
+ // 需要被代理的后台地址
+ "target": "http://101.37.12.135:8080",
+ "changeOrigin": true,
+ "secure": false,
+ "pathRewrite": {
+ "^/server3": ""
+ }
+ },
+ "/ysk": {
+ // 需要被代理的后台地址
+ "target": "http://192.168.1.31",
+ "changeOrigin": true,
+ "secure": false,
+ "pathRewrite": {
+ "^/ysk": ""
+ }
+ // "onProxyRes": function(proxyRes, req, res) {
+ // // proxyRes.headers['Content-Type'] = 'application/json';
+ // },
+ },
+ "/ww": {
+ // 需要被代理的后台地址
+ "target": "http://192.168.1.15:8000",
+ "changeOrigin": true,
+ "secure": false,
+ "pathRewrite": {
+ "/ww": ""
+ }
+ }
+ }
+ },
+ "sdkConfigs": {
+ "maps": {
+ "amap": {
+ "key": "6033c97e67bf2e9ceac306e1a3fa35f8",
+ "securityJsCode": "0547b69252ef0ed14e11f5c4ac152f07",
+ "serviceHost": ""
+ }
+ }
+ }
+ },
+ "mp-alipay": {
+ "appid": "2021004128648214"
+ }
+}
\ No newline at end of file
diff --git a/package-lock.json b/package-lock.json
index 0e18f38..c5a8d2c 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,628 +1,1841 @@
{
+ "name": "cashier-ipad",
+ "lockfileVersion": 3,
"requires": true,
- "lockfileVersion": 1,
- "dependencies": {
- "@nodelib/fs.scandir": {
+ "packages": {
+ "": {
+ "dependencies": {
+ "clipboard": "^2.0.11",
+ "dayjs": "^1.11.13",
+ "gm-crypto": "^0.1.8",
+ "immutable": "^4.3.7",
+ "js-base64": "^3.7.2",
+ "jsencrypt": "^3.3.2",
+ "lodash": "^4.17.21",
+ "uview-plus": "^3.3.32"
+ },
+ "devDependencies": {
+ "copy-webpack-plugin": "^12.0.2",
+ "sass": "^1.78.0",
+ "sass-loader": "^10.5.2"
+ }
+ },
+ "node_modules/@babel/runtime": {
+ "version": "7.27.0",
+ "resolved": "https://registry.npmmirror.com/@babel/runtime/-/runtime-7.27.0.tgz",
+ "integrity": "sha512-VtPOkrdPHZsKc/clNqyi9WUA8TINkZ4cGk63UUE3u4pmB2k+ZMQRDuIOagv8UVd6j7k0T3+RRIb7beKTebNbcw==",
+ "license": "MIT",
+ "dependencies": {
+ "regenerator-runtime": "^0.14.0"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@jridgewell/gen-mapping": {
+ "version": "0.3.8",
+ "resolved": "https://registry.npmmirror.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.8.tgz",
+ "integrity": "sha512-imAbBGkb+ebQyxKgzv5Hu2nmROxoDOXHh80evxdoXNOrvAnVx7zimzc1Oo5h9RlfV4vPXaE2iM5pOFbvOCClWA==",
+ "dev": true,
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "@jridgewell/set-array": "^1.2.1",
+ "@jridgewell/sourcemap-codec": "^1.4.10",
+ "@jridgewell/trace-mapping": "^0.3.24"
+ },
+ "engines": {
+ "node": ">=6.0.0"
+ }
+ },
+ "node_modules/@jridgewell/resolve-uri": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmmirror.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz",
+ "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==",
+ "dev": true,
+ "license": "MIT",
+ "peer": true,
+ "engines": {
+ "node": ">=6.0.0"
+ }
+ },
+ "node_modules/@jridgewell/set-array": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmmirror.com/@jridgewell/set-array/-/set-array-1.2.1.tgz",
+ "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==",
+ "dev": true,
+ "license": "MIT",
+ "peer": true,
+ "engines": {
+ "node": ">=6.0.0"
+ }
+ },
+ "node_modules/@jridgewell/source-map": {
+ "version": "0.3.6",
+ "resolved": "https://registry.npmmirror.com/@jridgewell/source-map/-/source-map-0.3.6.tgz",
+ "integrity": "sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ==",
+ "dev": true,
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "@jridgewell/gen-mapping": "^0.3.5",
+ "@jridgewell/trace-mapping": "^0.3.25"
+ }
+ },
+ "node_modules/@jridgewell/sourcemap-codec": {
+ "version": "1.5.0",
+ "resolved": "https://registry.npmmirror.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz",
+ "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==",
+ "dev": true,
+ "license": "MIT",
+ "peer": true
+ },
+ "node_modules/@jridgewell/trace-mapping": {
+ "version": "0.3.25",
+ "resolved": "https://registry.npmmirror.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz",
+ "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==",
+ "dev": true,
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "@jridgewell/resolve-uri": "^3.1.0",
+ "@jridgewell/sourcemap-codec": "^1.4.14"
+ }
+ },
+ "node_modules/@nodelib/fs.scandir": {
"version": "2.1.5",
"resolved": "https://registry.npmmirror.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz",
"integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==",
"dev": true,
- "requires": {
+ "dependencies": {
"@nodelib/fs.stat": "2.0.5",
"run-parallel": "^1.1.9"
+ },
+ "engines": {
+ "node": ">= 8"
}
},
- "@nodelib/fs.stat": {
+ "node_modules/@nodelib/fs.stat": {
"version": "2.0.5",
"resolved": "https://registry.npmmirror.com/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz",
"integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==",
- "dev": true
+ "dev": true,
+ "engines": {
+ "node": ">= 8"
+ }
},
- "@nodelib/fs.walk": {
+ "node_modules/@nodelib/fs.walk": {
"version": "1.2.8",
"resolved": "https://registry.npmmirror.com/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz",
"integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==",
"dev": true,
- "requires": {
+ "dependencies": {
"@nodelib/fs.scandir": "2.1.5",
"fastq": "^1.6.0"
+ },
+ "engines": {
+ "node": ">= 8"
}
},
- "@sindresorhus/merge-streams": {
+ "node_modules/@sindresorhus/merge-streams": {
"version": "2.3.0",
"resolved": "https://registry.npmmirror.com/@sindresorhus/merge-streams/-/merge-streams-2.3.0.tgz",
"integrity": "sha512-LtoMMhxAlorcGhmFYI+LhPgbPZCkgP6ra1YL604EeF6U98pLlQ3iWIGMdWSC+vWmPBWBNgmDBAhnAobLROJmwg==",
- "dev": true
+ "dev": true,
+ "engines": {
+ "node": ">=18"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
},
- "@types/json-schema": {
+ "node_modules/@types/eslint": {
+ "version": "9.6.1",
+ "resolved": "https://registry.npmmirror.com/@types/eslint/-/eslint-9.6.1.tgz",
+ "integrity": "sha512-FXx2pKgId/WyYo2jXw63kk7/+TY7u7AziEJxJAnSFzHlqTAS3Ync6SvgYAN/k4/PQpnnVuzoMuVnByKK2qp0ag==",
+ "dev": true,
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "@types/estree": "*",
+ "@types/json-schema": "*"
+ }
+ },
+ "node_modules/@types/eslint-scope": {
+ "version": "3.7.7",
+ "resolved": "https://registry.npmmirror.com/@types/eslint-scope/-/eslint-scope-3.7.7.tgz",
+ "integrity": "sha512-MzMFlSLBqNF2gcHWO0G1vP/YQyfvrxZ0bF+u7mzUdZ1/xK4A4sru+nraZz5i3iEIk1l1uyicaDVTB4QbbEkAYg==",
+ "dev": true,
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "@types/eslint": "*",
+ "@types/estree": "*"
+ }
+ },
+ "node_modules/@types/estree": {
+ "version": "1.0.7",
+ "resolved": "https://registry.npmmirror.com/@types/estree/-/estree-1.0.7.tgz",
+ "integrity": "sha512-w28IoSUCJpidD/TGviZwwMJckNESJZXFu7NBZ5YJ4mEUnNraUn9Pm8HSZm/jDF1pDWYKspWE7oVphigUPRakIQ==",
+ "dev": true,
+ "license": "MIT",
+ "peer": true
+ },
+ "node_modules/@types/json-schema": {
"version": "7.0.15",
"resolved": "https://registry.npmmirror.com/@types/json-schema/-/json-schema-7.0.15.tgz",
"integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==",
"dev": true
},
- "ajv": {
+ "node_modules/@types/node": {
+ "version": "22.14.0",
+ "resolved": "https://registry.npmmirror.com/@types/node/-/node-22.14.0.tgz",
+ "integrity": "sha512-Kmpl+z84ILoG+3T/zQFyAJsU6EPTmOCj8/2+83fSN6djd6I4o7uOuGIH6vq3PrjY5BGitSbFuMN18j3iknubbA==",
+ "dev": true,
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "undici-types": "~6.21.0"
+ }
+ },
+ "node_modules/@webassemblyjs/ast": {
+ "version": "1.14.1",
+ "resolved": "https://registry.npmmirror.com/@webassemblyjs/ast/-/ast-1.14.1.tgz",
+ "integrity": "sha512-nuBEDgQfm1ccRp/8bCQrx1frohyufl4JlbMMZ4P1wpeOfDhF6FQkxZJ1b/e+PLwr6X1Nhw6OLme5usuBWYBvuQ==",
+ "dev": true,
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "@webassemblyjs/helper-numbers": "1.13.2",
+ "@webassemblyjs/helper-wasm-bytecode": "1.13.2"
+ }
+ },
+ "node_modules/@webassemblyjs/floating-point-hex-parser": {
+ "version": "1.13.2",
+ "resolved": "https://registry.npmmirror.com/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.13.2.tgz",
+ "integrity": "sha512-6oXyTOzbKxGH4steLbLNOu71Oj+C8Lg34n6CqRvqfS2O71BxY6ByfMDRhBytzknj9yGUPVJ1qIKhRlAwO1AovA==",
+ "dev": true,
+ "license": "MIT",
+ "peer": true
+ },
+ "node_modules/@webassemblyjs/helper-api-error": {
+ "version": "1.13.2",
+ "resolved": "https://registry.npmmirror.com/@webassemblyjs/helper-api-error/-/helper-api-error-1.13.2.tgz",
+ "integrity": "sha512-U56GMYxy4ZQCbDZd6JuvvNV/WFildOjsaWD3Tzzvmw/mas3cXzRJPMjP83JqEsgSbyrmaGjBfDtV7KDXV9UzFQ==",
+ "dev": true,
+ "license": "MIT",
+ "peer": true
+ },
+ "node_modules/@webassemblyjs/helper-buffer": {
+ "version": "1.14.1",
+ "resolved": "https://registry.npmmirror.com/@webassemblyjs/helper-buffer/-/helper-buffer-1.14.1.tgz",
+ "integrity": "sha512-jyH7wtcHiKssDtFPRB+iQdxlDf96m0E39yb0k5uJVhFGleZFoNw1c4aeIcVUPPbXUVJ94wwnMOAqUHyzoEPVMA==",
+ "dev": true,
+ "license": "MIT",
+ "peer": true
+ },
+ "node_modules/@webassemblyjs/helper-numbers": {
+ "version": "1.13.2",
+ "resolved": "https://registry.npmmirror.com/@webassemblyjs/helper-numbers/-/helper-numbers-1.13.2.tgz",
+ "integrity": "sha512-FE8aCmS5Q6eQYcV3gI35O4J789wlQA+7JrqTTpJqn5emA4U2hvwJmvFRC0HODS+3Ye6WioDklgd6scJ3+PLnEA==",
+ "dev": true,
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "@webassemblyjs/floating-point-hex-parser": "1.13.2",
+ "@webassemblyjs/helper-api-error": "1.13.2",
+ "@xtuc/long": "4.2.2"
+ }
+ },
+ "node_modules/@webassemblyjs/helper-wasm-bytecode": {
+ "version": "1.13.2",
+ "resolved": "https://registry.npmmirror.com/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.13.2.tgz",
+ "integrity": "sha512-3QbLKy93F0EAIXLh0ogEVR6rOubA9AoZ+WRYhNbFyuB70j3dRdwH9g+qXhLAO0kiYGlg3TxDV+I4rQTr/YNXkA==",
+ "dev": true,
+ "license": "MIT",
+ "peer": true
+ },
+ "node_modules/@webassemblyjs/helper-wasm-section": {
+ "version": "1.14.1",
+ "resolved": "https://registry.npmmirror.com/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.14.1.tgz",
+ "integrity": "sha512-ds5mXEqTJ6oxRoqjhWDU83OgzAYjwsCV8Lo/N+oRsNDmx/ZDpqalmrtgOMkHwxsG0iI//3BwWAErYRHtgn0dZw==",
+ "dev": true,
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "@webassemblyjs/ast": "1.14.1",
+ "@webassemblyjs/helper-buffer": "1.14.1",
+ "@webassemblyjs/helper-wasm-bytecode": "1.13.2",
+ "@webassemblyjs/wasm-gen": "1.14.1"
+ }
+ },
+ "node_modules/@webassemblyjs/ieee754": {
+ "version": "1.13.2",
+ "resolved": "https://registry.npmmirror.com/@webassemblyjs/ieee754/-/ieee754-1.13.2.tgz",
+ "integrity": "sha512-4LtOzh58S/5lX4ITKxnAK2USuNEvpdVV9AlgGQb8rJDHaLeHciwG4zlGr0j/SNWlr7x3vO1lDEsuePvtcDNCkw==",
+ "dev": true,
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "@xtuc/ieee754": "^1.2.0"
+ }
+ },
+ "node_modules/@webassemblyjs/leb128": {
+ "version": "1.13.2",
+ "resolved": "https://registry.npmmirror.com/@webassemblyjs/leb128/-/leb128-1.13.2.tgz",
+ "integrity": "sha512-Lde1oNoIdzVzdkNEAWZ1dZ5orIbff80YPdHx20mrHwHrVNNTjNr8E3xz9BdpcGqRQbAEa+fkrCb+fRFTl/6sQw==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "peer": true,
+ "dependencies": {
+ "@xtuc/long": "4.2.2"
+ }
+ },
+ "node_modules/@webassemblyjs/utf8": {
+ "version": "1.13.2",
+ "resolved": "https://registry.npmmirror.com/@webassemblyjs/utf8/-/utf8-1.13.2.tgz",
+ "integrity": "sha512-3NQWGjKTASY1xV5m7Hr0iPeXD9+RDobLll3T9d2AO+g3my8xy5peVyjSag4I50mR1bBSN/Ct12lo+R9tJk0NZQ==",
+ "dev": true,
+ "license": "MIT",
+ "peer": true
+ },
+ "node_modules/@webassemblyjs/wasm-edit": {
+ "version": "1.14.1",
+ "resolved": "https://registry.npmmirror.com/@webassemblyjs/wasm-edit/-/wasm-edit-1.14.1.tgz",
+ "integrity": "sha512-RNJUIQH/J8iA/1NzlE4N7KtyZNHi3w7at7hDjvRNm5rcUXa00z1vRz3glZoULfJ5mpvYhLybmVcwcjGrC1pRrQ==",
+ "dev": true,
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "@webassemblyjs/ast": "1.14.1",
+ "@webassemblyjs/helper-buffer": "1.14.1",
+ "@webassemblyjs/helper-wasm-bytecode": "1.13.2",
+ "@webassemblyjs/helper-wasm-section": "1.14.1",
+ "@webassemblyjs/wasm-gen": "1.14.1",
+ "@webassemblyjs/wasm-opt": "1.14.1",
+ "@webassemblyjs/wasm-parser": "1.14.1",
+ "@webassemblyjs/wast-printer": "1.14.1"
+ }
+ },
+ "node_modules/@webassemblyjs/wasm-gen": {
+ "version": "1.14.1",
+ "resolved": "https://registry.npmmirror.com/@webassemblyjs/wasm-gen/-/wasm-gen-1.14.1.tgz",
+ "integrity": "sha512-AmomSIjP8ZbfGQhumkNvgC33AY7qtMCXnN6bL2u2Js4gVCg8fp735aEiMSBbDR7UQIj90n4wKAFUSEd0QN2Ukg==",
+ "dev": true,
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "@webassemblyjs/ast": "1.14.1",
+ "@webassemblyjs/helper-wasm-bytecode": "1.13.2",
+ "@webassemblyjs/ieee754": "1.13.2",
+ "@webassemblyjs/leb128": "1.13.2",
+ "@webassemblyjs/utf8": "1.13.2"
+ }
+ },
+ "node_modules/@webassemblyjs/wasm-opt": {
+ "version": "1.14.1",
+ "resolved": "https://registry.npmmirror.com/@webassemblyjs/wasm-opt/-/wasm-opt-1.14.1.tgz",
+ "integrity": "sha512-PTcKLUNvBqnY2U6E5bdOQcSM+oVP/PmrDY9NzowJjislEjwP/C4an2303MCVS2Mg9d3AJpIGdUFIQQWbPds0Sw==",
+ "dev": true,
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "@webassemblyjs/ast": "1.14.1",
+ "@webassemblyjs/helper-buffer": "1.14.1",
+ "@webassemblyjs/wasm-gen": "1.14.1",
+ "@webassemblyjs/wasm-parser": "1.14.1"
+ }
+ },
+ "node_modules/@webassemblyjs/wasm-parser": {
+ "version": "1.14.1",
+ "resolved": "https://registry.npmmirror.com/@webassemblyjs/wasm-parser/-/wasm-parser-1.14.1.tgz",
+ "integrity": "sha512-JLBl+KZ0R5qB7mCnud/yyX08jWFw5MsoalJ1pQ4EdFlgj9VdXKGuENGsiCIjegI1W7p91rUlcB/LB5yRJKNTcQ==",
+ "dev": true,
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "@webassemblyjs/ast": "1.14.1",
+ "@webassemblyjs/helper-api-error": "1.13.2",
+ "@webassemblyjs/helper-wasm-bytecode": "1.13.2",
+ "@webassemblyjs/ieee754": "1.13.2",
+ "@webassemblyjs/leb128": "1.13.2",
+ "@webassemblyjs/utf8": "1.13.2"
+ }
+ },
+ "node_modules/@webassemblyjs/wast-printer": {
+ "version": "1.14.1",
+ "resolved": "https://registry.npmmirror.com/@webassemblyjs/wast-printer/-/wast-printer-1.14.1.tgz",
+ "integrity": "sha512-kPSSXE6De1XOR820C90RIo2ogvZG+c3KiHzqUoO/F34Y2shGzesfqv7o57xrxovZJH/MetF5UjroJ/R/3isoiw==",
+ "dev": true,
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "@webassemblyjs/ast": "1.14.1",
+ "@xtuc/long": "4.2.2"
+ }
+ },
+ "node_modules/@xtuc/ieee754": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmmirror.com/@xtuc/ieee754/-/ieee754-1.2.0.tgz",
+ "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==",
+ "dev": true,
+ "license": "BSD-3-Clause",
+ "peer": true
+ },
+ "node_modules/@xtuc/long": {
+ "version": "4.2.2",
+ "resolved": "https://registry.npmmirror.com/@xtuc/long/-/long-4.2.2.tgz",
+ "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "peer": true
+ },
+ "node_modules/acorn": {
+ "version": "8.14.1",
+ "resolved": "https://registry.npmmirror.com/acorn/-/acorn-8.14.1.tgz",
+ "integrity": "sha512-OvQ/2pUDKmgfCg++xsTX1wGxfTaszcHVcTctW4UJB4hibJx2HXxxO5UmVgyjMa+ZDsiaf5wWLXYpRWMmBI0QHg==",
+ "dev": true,
+ "license": "MIT",
+ "peer": true,
+ "bin": {
+ "acorn": "bin/acorn"
+ },
+ "engines": {
+ "node": ">=0.4.0"
+ }
+ },
+ "node_modules/ajv": {
"version": "8.16.0",
"resolved": "https://registry.npmmirror.com/ajv/-/ajv-8.16.0.tgz",
"integrity": "sha512-F0twR8U1ZU67JIEtekUcLkXkoO5mMMmgGD8sK/xUFzJ805jxHQl92hImFAqqXMyMYjSPOyUPAwHYhB72g5sTXw==",
"dev": true,
- "requires": {
+ "dependencies": {
"fast-deep-equal": "^3.1.3",
"json-schema-traverse": "^1.0.0",
"require-from-string": "^2.0.2",
"uri-js": "^4.4.1"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/epoberezkin"
}
},
- "ajv-formats": {
+ "node_modules/ajv-formats": {
"version": "2.1.1",
"resolved": "https://registry.npmmirror.com/ajv-formats/-/ajv-formats-2.1.1.tgz",
"integrity": "sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==",
"dev": true,
- "requires": {
+ "dependencies": {
"ajv": "^8.0.0"
+ },
+ "peerDependencies": {
+ "ajv": "^8.0.0"
+ },
+ "peerDependenciesMeta": {
+ "ajv": {
+ "optional": true
+ }
}
},
- "ajv-keywords": {
+ "node_modules/ajv-keywords": {
"version": "5.1.0",
"resolved": "https://registry.npmmirror.com/ajv-keywords/-/ajv-keywords-5.1.0.tgz",
"integrity": "sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw==",
"dev": true,
- "requires": {
+ "dependencies": {
"fast-deep-equal": "^3.1.3"
+ },
+ "peerDependencies": {
+ "ajv": "^8.8.2"
}
},
- "anymatch": {
+ "node_modules/anymatch": {
"version": "3.1.3",
"resolved": "https://registry.npmmirror.com/anymatch/-/anymatch-3.1.3.tgz",
"integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==",
"dev": true,
- "requires": {
+ "dependencies": {
"normalize-path": "^3.0.0",
"picomatch": "^2.0.4"
+ },
+ "engines": {
+ "node": ">= 8"
}
},
- "base64-js": {
+ "node_modules/base64-js": {
"version": "1.5.1",
"resolved": "https://registry.npmmirror.com/base64-js/-/base64-js-1.5.1.tgz",
- "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA=="
+ "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==",
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/feross"
+ },
+ {
+ "type": "patreon",
+ "url": "https://www.patreon.com/feross"
+ },
+ {
+ "type": "consulting",
+ "url": "https://feross.org/support"
+ }
+ ]
},
- "big.js": {
+ "node_modules/big.js": {
"version": "5.2.2",
"resolved": "https://registry.npmmirror.com/big.js/-/big.js-5.2.2.tgz",
"integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==",
- "dev": true
+ "dev": true,
+ "engines": {
+ "node": "*"
+ }
},
- "binary-extensions": {
+ "node_modules/binary-extensions": {
"version": "2.3.0",
"resolved": "https://registry.npmmirror.com/binary-extensions/-/binary-extensions-2.3.0.tgz",
"integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==",
- "dev": true
+ "dev": true,
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
},
- "braces": {
+ "node_modules/braces": {
"version": "3.0.3",
"resolved": "https://registry.npmmirror.com/braces/-/braces-3.0.3.tgz",
"integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==",
"dev": true,
- "requires": {
+ "dependencies": {
"fill-range": "^7.1.1"
+ },
+ "engines": {
+ "node": ">=8"
}
},
- "buffer": {
+ "node_modules/browserslist": {
+ "version": "4.24.4",
+ "resolved": "https://registry.npmmirror.com/browserslist/-/browserslist-4.24.4.tgz",
+ "integrity": "sha512-KDi1Ny1gSePi1vm0q4oxSF8b4DR44GF4BbmS2YdhPLOEqd8pDviZOGH/GsmRwoWJ2+5Lr085X7naowMwKHDG1A==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/browserslist"
+ },
+ {
+ "type": "tidelift",
+ "url": "https://tidelift.com/funding/github/npm/browserslist"
+ },
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/ai"
+ }
+ ],
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "caniuse-lite": "^1.0.30001688",
+ "electron-to-chromium": "^1.5.73",
+ "node-releases": "^2.0.19",
+ "update-browserslist-db": "^1.1.1"
+ },
+ "bin": {
+ "browserslist": "cli.js"
+ },
+ "engines": {
+ "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7"
+ }
+ },
+ "node_modules/buffer": {
"version": "5.7.1",
"resolved": "https://registry.npmmirror.com/buffer/-/buffer-5.7.1.tgz",
"integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==",
- "requires": {
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/feross"
+ },
+ {
+ "type": "patreon",
+ "url": "https://www.patreon.com/feross"
+ },
+ {
+ "type": "consulting",
+ "url": "https://feross.org/support"
+ }
+ ],
+ "dependencies": {
"base64-js": "^1.3.1",
"ieee754": "^1.1.13"
}
},
- "chokidar": {
+ "node_modules/buffer-from": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmmirror.com/buffer-from/-/buffer-from-1.1.2.tgz",
+ "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==",
+ "dev": true,
+ "license": "MIT",
+ "peer": true
+ },
+ "node_modules/caniuse-lite": {
+ "version": "1.0.30001712",
+ "resolved": "https://registry.npmmirror.com/caniuse-lite/-/caniuse-lite-1.0.30001712.tgz",
+ "integrity": "sha512-MBqPpGYYdQ7/hfKiet9SCI+nmN5/hp4ZzveOJubl5DTAMa5oggjAuoi0Z4onBpKPFI2ePGnQuQIzF3VxDjDJig==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/browserslist"
+ },
+ {
+ "type": "tidelift",
+ "url": "https://tidelift.com/funding/github/npm/caniuse-lite"
+ },
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/ai"
+ }
+ ],
+ "license": "CC-BY-4.0",
+ "peer": true
+ },
+ "node_modules/chokidar": {
"version": "3.6.0",
"resolved": "https://registry.npmmirror.com/chokidar/-/chokidar-3.6.0.tgz",
"integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==",
"dev": true,
- "requires": {
+ "dependencies": {
"anymatch": "~3.1.2",
"braces": "~3.0.2",
- "fsevents": "~2.3.2",
"glob-parent": "~5.1.2",
"is-binary-path": "~2.1.0",
"is-glob": "~4.0.1",
"normalize-path": "~3.0.0",
"readdirp": "~3.6.0"
},
- "dependencies": {
- "glob-parent": {
- "version": "5.1.2",
- "resolved": "https://registry.npmmirror.com/glob-parent/-/glob-parent-5.1.2.tgz",
- "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
- "dev": true,
- "requires": {
- "is-glob": "^4.0.1"
- }
- }
+ "engines": {
+ "node": ">= 8.10.0"
+ },
+ "funding": {
+ "url": "https://paulmillr.com/funding/"
+ },
+ "optionalDependencies": {
+ "fsevents": "~2.3.2"
}
},
- "clipboard": {
+ "node_modules/chokidar/node_modules/glob-parent": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmmirror.com/glob-parent/-/glob-parent-5.1.2.tgz",
+ "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
+ "dev": true,
+ "dependencies": {
+ "is-glob": "^4.0.1"
+ },
+ "engines": {
+ "node": ">= 6"
+ }
+ },
+ "node_modules/chrome-trace-event": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmmirror.com/chrome-trace-event/-/chrome-trace-event-1.0.4.tgz",
+ "integrity": "sha512-rNjApaLzuwaOTjCiT8lSDdGN1APCiqkChLMJxJPWLunPAt5fy8xgU9/jNOchV84wfIxrA0lRQB7oCT8jrn/wrQ==",
+ "dev": true,
+ "license": "MIT",
+ "peer": true,
+ "engines": {
+ "node": ">=6.0"
+ }
+ },
+ "node_modules/clipboard": {
"version": "2.0.11",
"resolved": "https://registry.npmmirror.com/clipboard/-/clipboard-2.0.11.tgz",
"integrity": "sha512-C+0bbOqkezLIsmWSvlsXS0Q0bmkugu7jcfMIACB+RDEntIzQIkdr148we28AfSloQLRdZlYL/QYyrq05j/3Faw==",
- "requires": {
+ "dependencies": {
"good-listener": "^1.2.2",
"select": "^1.1.2",
"tiny-emitter": "^2.0.0"
}
},
- "copy-webpack-plugin": {
+ "node_modules/commander": {
+ "version": "2.20.3",
+ "resolved": "https://registry.npmmirror.com/commander/-/commander-2.20.3.tgz",
+ "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==",
+ "dev": true,
+ "license": "MIT",
+ "peer": true
+ },
+ "node_modules/copy-text-to-clipboard": {
+ "version": "3.2.0",
+ "resolved": "https://registry.npmmirror.com/copy-text-to-clipboard/-/copy-text-to-clipboard-3.2.0.tgz",
+ "integrity": "sha512-RnJFp1XR/LOBDckxTib5Qjr/PMfkatD0MUCQgdpqS8MdKiNUzBjAQBEN6oUy+jW7LI93BBG3DtMB2KOOKpGs2Q==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/copy-webpack-plugin": {
"version": "12.0.2",
"resolved": "https://registry.npmmirror.com/copy-webpack-plugin/-/copy-webpack-plugin-12.0.2.tgz",
"integrity": "sha512-SNwdBeHyII+rWvee/bTnAYyO8vfVdcSTud4EIb6jcZ8inLeWucJE0DnxXQBjlQ5zlteuuvooGQy3LIyGxhvlOA==",
"dev": true,
- "requires": {
+ "dependencies": {
"fast-glob": "^3.3.2",
"glob-parent": "^6.0.1",
"globby": "^14.0.0",
"normalize-path": "^3.0.0",
"schema-utils": "^4.2.0",
"serialize-javascript": "^6.0.2"
+ },
+ "engines": {
+ "node": ">= 18.12.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/webpack"
+ },
+ "peerDependencies": {
+ "webpack": "^5.1.0"
}
},
- "dayjs": {
+ "node_modules/core-js": {
+ "version": "3.41.0",
+ "resolved": "https://registry.npmmirror.com/core-js/-/core-js-3.41.0.tgz",
+ "integrity": "sha512-SJ4/EHwS36QMJd6h/Rg+GyR4A5xE0FSI3eZ+iBVpfqf1x0eTSg1smWLHrA+2jQThZSh97fmSgFSU8B61nxosxA==",
+ "hasInstallScript": true,
+ "license": "MIT",
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/core-js"
+ }
+ },
+ "node_modules/dayjs": {
"version": "1.11.13",
"resolved": "https://registry.npmmirror.com/dayjs/-/dayjs-1.11.13.tgz",
"integrity": "sha512-oaMBel6gjolK862uaPQOVTA7q3TZhuSvuMQAAglQDOWYO9A91IrAOUJEyKVlqJlHE0vq5p5UXxzdPfMH/x6xNg=="
},
- "delegate": {
+ "node_modules/delegate": {
"version": "3.2.0",
"resolved": "https://registry.npmmirror.com/delegate/-/delegate-3.2.0.tgz",
"integrity": "sha512-IofjkYBZaZivn0V8nnsMJGBr4jVLxHDheKSW88PyxS5QC4Vo9ZbZVvhzlSxY87fVq3STR6r+4cGepyHkcWOQSw=="
},
- "emojis-list": {
+ "node_modules/electron-to-chromium": {
+ "version": "1.5.134",
+ "resolved": "https://registry.npmmirror.com/electron-to-chromium/-/electron-to-chromium-1.5.134.tgz",
+ "integrity": "sha512-zSwzrLg3jNP3bwsLqWHmS5z2nIOQ5ngMnfMZOWWtXnqqQkPVyOipxK98w+1beLw1TB+EImPNcG8wVP/cLVs2Og==",
+ "dev": true,
+ "license": "ISC",
+ "peer": true
+ },
+ "node_modules/emojis-list": {
"version": "3.0.0",
"resolved": "https://registry.npmmirror.com/emojis-list/-/emojis-list-3.0.0.tgz",
"integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==",
- "dev": true
+ "dev": true,
+ "engines": {
+ "node": ">= 4"
+ }
},
- "fast-deep-equal": {
+ "node_modules/enhanced-resolve": {
+ "version": "5.18.1",
+ "resolved": "https://registry.npmmirror.com/enhanced-resolve/-/enhanced-resolve-5.18.1.tgz",
+ "integrity": "sha512-ZSW3ma5GkcQBIpwZTSRAI8N71Uuwgs93IezB7mf7R60tC8ZbJideoDNKjHn2O9KIlx6rkGTTEk1xUCK2E1Y2Yg==",
+ "dev": true,
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "graceful-fs": "^4.2.4",
+ "tapable": "^2.2.0"
+ },
+ "engines": {
+ "node": ">=10.13.0"
+ }
+ },
+ "node_modules/es-module-lexer": {
+ "version": "1.6.0",
+ "resolved": "https://registry.npmmirror.com/es-module-lexer/-/es-module-lexer-1.6.0.tgz",
+ "integrity": "sha512-qqnD1yMU6tk/jnaMosogGySTZP8YtUgAffA9nMN+E/rjxcfRQ6IEk7IiozUjgxKoFHBGjTLnrHB/YC45r/59EQ==",
+ "dev": true,
+ "license": "MIT",
+ "peer": true
+ },
+ "node_modules/escalade": {
+ "version": "3.2.0",
+ "resolved": "https://registry.npmmirror.com/escalade/-/escalade-3.2.0.tgz",
+ "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==",
+ "dev": true,
+ "license": "MIT",
+ "peer": true,
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/eslint-scope": {
+ "version": "5.1.1",
+ "resolved": "https://registry.npmmirror.com/eslint-scope/-/eslint-scope-5.1.1.tgz",
+ "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==",
+ "dev": true,
+ "license": "BSD-2-Clause",
+ "peer": true,
+ "dependencies": {
+ "esrecurse": "^4.3.0",
+ "estraverse": "^4.1.1"
+ },
+ "engines": {
+ "node": ">=8.0.0"
+ }
+ },
+ "node_modules/esrecurse": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmmirror.com/esrecurse/-/esrecurse-4.3.0.tgz",
+ "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==",
+ "dev": true,
+ "license": "BSD-2-Clause",
+ "peer": true,
+ "dependencies": {
+ "estraverse": "^5.2.0"
+ },
+ "engines": {
+ "node": ">=4.0"
+ }
+ },
+ "node_modules/esrecurse/node_modules/estraverse": {
+ "version": "5.3.0",
+ "resolved": "https://registry.npmmirror.com/estraverse/-/estraverse-5.3.0.tgz",
+ "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==",
+ "dev": true,
+ "license": "BSD-2-Clause",
+ "peer": true,
+ "engines": {
+ "node": ">=4.0"
+ }
+ },
+ "node_modules/estraverse": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmmirror.com/estraverse/-/estraverse-4.3.0.tgz",
+ "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==",
+ "dev": true,
+ "license": "BSD-2-Clause",
+ "peer": true,
+ "engines": {
+ "node": ">=4.0"
+ }
+ },
+ "node_modules/events": {
+ "version": "3.3.0",
+ "resolved": "https://registry.npmmirror.com/events/-/events-3.3.0.tgz",
+ "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==",
+ "dev": true,
+ "license": "MIT",
+ "peer": true,
+ "engines": {
+ "node": ">=0.8.x"
+ }
+ },
+ "node_modules/fast-deep-equal": {
"version": "3.1.3",
"resolved": "https://registry.npmmirror.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
"integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==",
"dev": true
},
- "fast-glob": {
+ "node_modules/fast-glob": {
"version": "3.3.2",
"resolved": "https://registry.npmmirror.com/fast-glob/-/fast-glob-3.3.2.tgz",
"integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==",
"dev": true,
- "requires": {
+ "dependencies": {
"@nodelib/fs.stat": "^2.0.2",
"@nodelib/fs.walk": "^1.2.3",
"glob-parent": "^5.1.2",
"merge2": "^1.3.0",
"micromatch": "^4.0.4"
},
- "dependencies": {
- "glob-parent": {
- "version": "5.1.2",
- "resolved": "https://registry.npmmirror.com/glob-parent/-/glob-parent-5.1.2.tgz",
- "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
- "dev": true,
- "requires": {
- "is-glob": "^4.0.1"
- }
- }
+ "engines": {
+ "node": ">=8.6.0"
}
},
- "fast-json-stable-stringify": {
+ "node_modules/fast-glob/node_modules/glob-parent": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmmirror.com/glob-parent/-/glob-parent-5.1.2.tgz",
+ "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
+ "dev": true,
+ "dependencies": {
+ "is-glob": "^4.0.1"
+ },
+ "engines": {
+ "node": ">= 6"
+ }
+ },
+ "node_modules/fast-json-stable-stringify": {
"version": "2.1.0",
"resolved": "https://registry.npmmirror.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz",
"integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==",
"dev": true
},
- "fastq": {
+ "node_modules/fastq": {
"version": "1.17.1",
"resolved": "https://registry.npmmirror.com/fastq/-/fastq-1.17.1.tgz",
"integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==",
"dev": true,
- "requires": {
+ "dependencies": {
"reusify": "^1.0.4"
}
},
- "fill-range": {
+ "node_modules/fill-range": {
"version": "7.1.1",
"resolved": "https://registry.npmmirror.com/fill-range/-/fill-range-7.1.1.tgz",
"integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==",
"dev": true,
- "requires": {
+ "dependencies": {
"to-regex-range": "^5.0.1"
+ },
+ "engines": {
+ "node": ">=8"
}
},
- "fsevents": {
+ "node_modules/fsevents": {
"version": "2.3.3",
"resolved": "https://registry.npmmirror.com/fsevents/-/fsevents-2.3.3.tgz",
"integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==",
"dev": true,
- "optional": true
+ "hasInstallScript": true,
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": "^8.16.0 || ^10.6.0 || >=11.0.0"
+ }
},
- "glob-parent": {
+ "node_modules/glob-parent": {
"version": "6.0.2",
"resolved": "https://registry.npmmirror.com/glob-parent/-/glob-parent-6.0.2.tgz",
"integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==",
"dev": true,
- "requires": {
+ "dependencies": {
"is-glob": "^4.0.3"
+ },
+ "engines": {
+ "node": ">=10.13.0"
}
},
- "globby": {
+ "node_modules/glob-to-regexp": {
+ "version": "0.4.1",
+ "resolved": "https://registry.npmmirror.com/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz",
+ "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==",
+ "dev": true,
+ "license": "BSD-2-Clause",
+ "peer": true
+ },
+ "node_modules/globby": {
"version": "14.0.2",
"resolved": "https://registry.npmmirror.com/globby/-/globby-14.0.2.tgz",
"integrity": "sha512-s3Fq41ZVh7vbbe2PN3nrW7yC7U7MFVc5c98/iTl9c2GawNMKx/J648KQRW6WKkuU8GIbbh2IXfIRQjOZnXcTnw==",
"dev": true,
- "requires": {
+ "dependencies": {
"@sindresorhus/merge-streams": "^2.1.0",
"fast-glob": "^3.3.2",
"ignore": "^5.2.4",
"path-type": "^5.0.0",
"slash": "^5.1.0",
"unicorn-magic": "^0.1.0"
+ },
+ "engines": {
+ "node": ">=18"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
}
},
- "gm-crypto": {
+ "node_modules/gm-crypto": {
"version": "0.1.8",
"resolved": "https://registry.npmmirror.com/gm-crypto/-/gm-crypto-0.1.8.tgz",
"integrity": "sha512-gbTkobkbj3F70HJDQNhN9JNTvcR3O1YQJ0xGc8jTc4bZ1KuikmkjuFm5kZhyUbWxK/PwWDpPuTNyGwRYOopBLw==",
- "requires": {
+ "dependencies": {
"buffer": "^5.7.0",
"jsbn": "^1.1.0",
"to-arraybuffer": "^1.0.1"
}
},
- "good-listener": {
+ "node_modules/good-listener": {
"version": "1.2.2",
"resolved": "https://registry.npmmirror.com/good-listener/-/good-listener-1.2.2.tgz",
"integrity": "sha512-goW1b+d9q/HIwbVYZzZ6SsTr4IgE+WA44A0GmPIQstuOrgsFcT7VEJ48nmr9GaRtNu0XTKacFLGnBPAM6Afouw==",
- "requires": {
+ "dependencies": {
"delegate": "^3.1.2"
}
},
- "ieee754": {
+ "node_modules/graceful-fs": {
+ "version": "4.2.11",
+ "resolved": "https://registry.npmmirror.com/graceful-fs/-/graceful-fs-4.2.11.tgz",
+ "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==",
+ "dev": true,
+ "license": "ISC",
+ "peer": true
+ },
+ "node_modules/has-flag": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmmirror.com/has-flag/-/has-flag-4.0.0.tgz",
+ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
+ "dev": true,
+ "license": "MIT",
+ "peer": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/ieee754": {
"version": "1.2.1",
"resolved": "https://registry.npmmirror.com/ieee754/-/ieee754-1.2.1.tgz",
- "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA=="
+ "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==",
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/feross"
+ },
+ {
+ "type": "patreon",
+ "url": "https://www.patreon.com/feross"
+ },
+ {
+ "type": "consulting",
+ "url": "https://feross.org/support"
+ }
+ ]
},
- "ignore": {
+ "node_modules/ignore": {
"version": "5.3.1",
"resolved": "https://registry.npmmirror.com/ignore/-/ignore-5.3.1.tgz",
"integrity": "sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==",
- "dev": true
+ "dev": true,
+ "engines": {
+ "node": ">= 4"
+ }
},
- "immutable": {
+ "node_modules/immutable": {
"version": "4.3.7",
"resolved": "https://registry.npmmirror.com/immutable/-/immutable-4.3.7.tgz",
- "integrity": "sha512-1hqclzwYwjRDFLjcFxOM5AYkkG0rpFPpr1RLPMEuGczoS7YA8gLhy8SWXYRAA/XwfEHpfo3cw5JGioS32fnMRw==",
- "dev": true
+ "integrity": "sha512-1hqclzwYwjRDFLjcFxOM5AYkkG0rpFPpr1RLPMEuGczoS7YA8gLhy8SWXYRAA/XwfEHpfo3cw5JGioS32fnMRw=="
},
- "is-binary-path": {
+ "node_modules/is-binary-path": {
"version": "2.1.0",
"resolved": "https://registry.npmmirror.com/is-binary-path/-/is-binary-path-2.1.0.tgz",
"integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==",
"dev": true,
- "requires": {
+ "dependencies": {
"binary-extensions": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=8"
}
},
- "is-extglob": {
+ "node_modules/is-extglob": {
"version": "2.1.1",
"resolved": "https://registry.npmmirror.com/is-extglob/-/is-extglob-2.1.1.tgz",
"integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==",
- "dev": true
+ "dev": true,
+ "engines": {
+ "node": ">=0.10.0"
+ }
},
- "is-glob": {
+ "node_modules/is-glob": {
"version": "4.0.3",
"resolved": "https://registry.npmmirror.com/is-glob/-/is-glob-4.0.3.tgz",
"integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==",
"dev": true,
- "requires": {
+ "dependencies": {
"is-extglob": "^2.1.1"
+ },
+ "engines": {
+ "node": ">=0.10.0"
}
},
- "is-number": {
+ "node_modules/is-number": {
"version": "7.0.0",
"resolved": "https://registry.npmmirror.com/is-number/-/is-number-7.0.0.tgz",
"integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
- "dev": true
+ "dev": true,
+ "engines": {
+ "node": ">=0.12.0"
+ }
},
- "js-base64": {
+ "node_modules/jest-worker": {
+ "version": "27.5.1",
+ "resolved": "https://registry.npmmirror.com/jest-worker/-/jest-worker-27.5.1.tgz",
+ "integrity": "sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==",
+ "dev": true,
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "@types/node": "*",
+ "merge-stream": "^2.0.0",
+ "supports-color": "^8.0.0"
+ },
+ "engines": {
+ "node": ">= 10.13.0"
+ }
+ },
+ "node_modules/js-base64": {
"version": "3.7.2",
"resolved": "https://registry.npmmirror.com/js-base64/-/js-base64-3.7.2.tgz",
"integrity": "sha512-NnRs6dsyqUXejqk/yv2aiXlAvOs56sLkX6nUdeaNezI5LFFLlsZjOThmwnrcwh5ZZRwZlCMnVAY3CvhIhoVEKQ=="
},
- "jsbn": {
+ "node_modules/jsbn": {
"version": "1.1.0",
"resolved": "https://registry.npmmirror.com/jsbn/-/jsbn-1.1.0.tgz",
"integrity": "sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A=="
},
- "jsencrypt": {
+ "node_modules/jsencrypt": {
"version": "3.3.2",
"resolved": "https://registry.npmmirror.com/jsencrypt/-/jsencrypt-3.3.2.tgz",
"integrity": "sha512-arQR1R1ESGdAxY7ZheWr12wCaF2yF47v5qpB76TtV64H1pyGudk9Hvw8Y9tb/FiTIaaTRUyaSnm5T/Y53Ghm/A=="
},
- "json-schema-traverse": {
+ "node_modules/json-parse-even-better-errors": {
+ "version": "2.3.1",
+ "resolved": "https://registry.npmmirror.com/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz",
+ "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==",
+ "dev": true,
+ "license": "MIT",
+ "peer": true
+ },
+ "node_modules/json-schema-traverse": {
"version": "1.0.0",
"resolved": "https://registry.npmmirror.com/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz",
"integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==",
"dev": true
},
- "json5": {
+ "node_modules/json5": {
"version": "2.2.3",
"resolved": "https://registry.npmmirror.com/json5/-/json5-2.2.3.tgz",
"integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==",
- "dev": true
+ "dev": true,
+ "bin": {
+ "json5": "lib/cli.js"
+ },
+ "engines": {
+ "node": ">=6"
+ }
},
- "klona": {
+ "node_modules/klona": {
"version": "2.0.6",
"resolved": "https://registry.npmmirror.com/klona/-/klona-2.0.6.tgz",
"integrity": "sha512-dhG34DXATL5hSxJbIexCft8FChFXtmskoZYnoPWjXQuebWYCNkVeV3KkGegCK9CP1oswI/vQibS2GY7Em/sJJA==",
- "dev": true
+ "dev": true,
+ "engines": {
+ "node": ">= 8"
+ }
},
- "loader-utils": {
+ "node_modules/loader-runner": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmmirror.com/loader-runner/-/loader-runner-4.3.0.tgz",
+ "integrity": "sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg==",
+ "dev": true,
+ "license": "MIT",
+ "peer": true,
+ "engines": {
+ "node": ">=6.11.5"
+ }
+ },
+ "node_modules/loader-utils": {
"version": "2.0.4",
"resolved": "https://registry.npmmirror.com/loader-utils/-/loader-utils-2.0.4.tgz",
"integrity": "sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==",
"dev": true,
- "requires": {
+ "dependencies": {
"big.js": "^5.2.2",
"emojis-list": "^3.0.0",
"json5": "^2.1.2"
+ },
+ "engines": {
+ "node": ">=8.9.0"
}
},
- "lodash": {
+ "node_modules/lodash": {
"version": "4.17.21",
"resolved": "https://registry.npmmirror.com/lodash/-/lodash-4.17.21.tgz",
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg=="
},
- "merge2": {
+ "node_modules/merge-stream": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmmirror.com/merge-stream/-/merge-stream-2.0.0.tgz",
+ "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==",
+ "dev": true,
+ "license": "MIT",
+ "peer": true
+ },
+ "node_modules/merge2": {
"version": "1.4.1",
"resolved": "https://registry.npmmirror.com/merge2/-/merge2-1.4.1.tgz",
"integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==",
- "dev": true
+ "dev": true,
+ "engines": {
+ "node": ">= 8"
+ }
},
- "micromatch": {
+ "node_modules/micromatch": {
"version": "4.0.7",
"resolved": "https://registry.npmmirror.com/micromatch/-/micromatch-4.0.7.tgz",
"integrity": "sha512-LPP/3KorzCwBxfeUuZmaR6bG2kdeHSbe0P2tY3FLRU4vYrjYz5hI4QZwV0njUx3jeuKe67YukQ1LSPZBKDqO/Q==",
"dev": true,
- "requires": {
+ "dependencies": {
"braces": "^3.0.3",
"picomatch": "^2.3.1"
+ },
+ "engines": {
+ "node": ">=8.6"
}
},
- "neo-async": {
+ "node_modules/mime-db": {
+ "version": "1.52.0",
+ "resolved": "https://registry.npmmirror.com/mime-db/-/mime-db-1.52.0.tgz",
+ "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==",
+ "dev": true,
+ "license": "MIT",
+ "peer": true,
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/mime-types": {
+ "version": "2.1.35",
+ "resolved": "https://registry.npmmirror.com/mime-types/-/mime-types-2.1.35.tgz",
+ "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
+ "dev": true,
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "mime-db": "1.52.0"
+ },
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/mutation-observer": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmmirror.com/mutation-observer/-/mutation-observer-1.0.3.tgz",
+ "integrity": "sha512-M/O/4rF2h776hV7qGMZUH3utZLO/jK7p8rnNgGkjKUw8zCGjRQPxB8z6+5l8+VjRUQ3dNYu4vjqXYLr+U8ZVNA=="
+ },
+ "node_modules/neo-async": {
"version": "2.6.2",
"resolved": "https://registry.npmmirror.com/neo-async/-/neo-async-2.6.2.tgz",
"integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==",
"dev": true
},
- "normalize-path": {
+ "node_modules/node-releases": {
+ "version": "2.0.19",
+ "resolved": "https://registry.npmmirror.com/node-releases/-/node-releases-2.0.19.tgz",
+ "integrity": "sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw==",
+ "dev": true,
+ "license": "MIT",
+ "peer": true
+ },
+ "node_modules/normalize-path": {
"version": "3.0.0",
"resolved": "https://registry.npmmirror.com/normalize-path/-/normalize-path-3.0.0.tgz",
"integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==",
- "dev": true
+ "dev": true,
+ "engines": {
+ "node": ">=0.10.0"
+ }
},
- "path-type": {
+ "node_modules/path-type": {
"version": "5.0.0",
"resolved": "https://registry.npmmirror.com/path-type/-/path-type-5.0.0.tgz",
"integrity": "sha512-5HviZNaZcfqP95rwpv+1HDgUamezbqdSYTyzjTvwtJSnIH+3vnbmWsItli8OFEndS984VT55M3jduxZbX351gg==",
- "dev": true
+ "dev": true,
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
},
- "picomatch": {
+ "node_modules/picocolors": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmmirror.com/picocolors/-/picocolors-1.1.1.tgz",
+ "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==",
+ "dev": true,
+ "license": "ISC",
+ "peer": true
+ },
+ "node_modules/picomatch": {
"version": "2.3.1",
"resolved": "https://registry.npmmirror.com/picomatch/-/picomatch-2.3.1.tgz",
"integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
- "dev": true
+ "dev": true,
+ "engines": {
+ "node": ">=8.6"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/jonschlinkert"
+ }
},
- "punycode": {
+ "node_modules/punycode": {
"version": "2.3.1",
"resolved": "https://registry.npmmirror.com/punycode/-/punycode-2.3.1.tgz",
"integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==",
- "dev": true
+ "dev": true,
+ "engines": {
+ "node": ">=6"
+ }
},
- "queue-microtask": {
+ "node_modules/queue-microtask": {
"version": "1.2.3",
"resolved": "https://registry.npmmirror.com/queue-microtask/-/queue-microtask-1.2.3.tgz",
"integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==",
- "dev": true
+ "dev": true,
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/feross"
+ },
+ {
+ "type": "patreon",
+ "url": "https://www.patreon.com/feross"
+ },
+ {
+ "type": "consulting",
+ "url": "https://feross.org/support"
+ }
+ ]
},
- "randombytes": {
+ "node_modules/randombytes": {
"version": "2.1.0",
"resolved": "https://registry.npmmirror.com/randombytes/-/randombytes-2.1.0.tgz",
"integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==",
"dev": true,
- "requires": {
+ "dependencies": {
"safe-buffer": "^5.1.0"
}
},
- "readdirp": {
+ "node_modules/readdirp": {
"version": "3.6.0",
"resolved": "https://registry.npmmirror.com/readdirp/-/readdirp-3.6.0.tgz",
"integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==",
"dev": true,
- "requires": {
+ "dependencies": {
"picomatch": "^2.2.1"
+ },
+ "engines": {
+ "node": ">=8.10.0"
}
},
- "require-from-string": {
+ "node_modules/regenerator-runtime": {
+ "version": "0.14.1",
+ "resolved": "https://registry.npmmirror.com/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz",
+ "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==",
+ "license": "MIT"
+ },
+ "node_modules/require-from-string": {
"version": "2.0.2",
"resolved": "https://registry.npmmirror.com/require-from-string/-/require-from-string-2.0.2.tgz",
"integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==",
- "dev": true
+ "dev": true,
+ "engines": {
+ "node": ">=0.10.0"
+ }
},
- "reusify": {
+ "node_modules/reusify": {
"version": "1.0.4",
"resolved": "https://registry.npmmirror.com/reusify/-/reusify-1.0.4.tgz",
"integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==",
- "dev": true
+ "dev": true,
+ "engines": {
+ "iojs": ">=1.0.0",
+ "node": ">=0.10.0"
+ }
},
- "run-parallel": {
+ "node_modules/run-parallel": {
"version": "1.2.0",
"resolved": "https://registry.npmmirror.com/run-parallel/-/run-parallel-1.2.0.tgz",
"integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==",
"dev": true,
- "requires": {
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/feross"
+ },
+ {
+ "type": "patreon",
+ "url": "https://www.patreon.com/feross"
+ },
+ {
+ "type": "consulting",
+ "url": "https://feross.org/support"
+ }
+ ],
+ "dependencies": {
"queue-microtask": "^1.2.2"
}
},
- "safe-buffer": {
+ "node_modules/safe-buffer": {
"version": "5.2.1",
"resolved": "https://registry.npmmirror.com/safe-buffer/-/safe-buffer-5.2.1.tgz",
"integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
- "dev": true
+ "dev": true,
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/feross"
+ },
+ {
+ "type": "patreon",
+ "url": "https://www.patreon.com/feross"
+ },
+ {
+ "type": "consulting",
+ "url": "https://feross.org/support"
+ }
+ ]
},
- "sass": {
+ "node_modules/sass": {
"version": "1.78.0",
"resolved": "https://registry.npmmirror.com/sass/-/sass-1.78.0.tgz",
"integrity": "sha512-AaIqGSrjo5lA2Yg7RvFZrlXDBCp3nV4XP73GrLGvdRWWwk+8H3l0SDvq/5bA4eF+0RFPLuWUk3E+P1U/YqnpsQ==",
"dev": true,
- "requires": {
+ "dependencies": {
"chokidar": ">=3.0.0 <4.0.0",
"immutable": "^4.0.0",
"source-map-js": ">=0.6.2 <2.0.0"
+ },
+ "bin": {
+ "sass": "sass.js"
+ },
+ "engines": {
+ "node": ">=14.0.0"
}
},
- "sass-loader": {
+ "node_modules/sass-loader": {
"version": "10.5.2",
"resolved": "https://registry.npmmirror.com/sass-loader/-/sass-loader-10.5.2.tgz",
"integrity": "sha512-vMUoSNOUKJILHpcNCCyD23X34gve1TS7Rjd9uXHeKqhvBG39x6XbswFDtpbTElj6XdMFezoWhkh5vtKudf2cgQ==",
"dev": true,
- "requires": {
+ "dependencies": {
"klona": "^2.0.4",
"loader-utils": "^2.0.0",
"neo-async": "^2.6.2",
"schema-utils": "^3.0.0",
"semver": "^7.3.2"
},
- "dependencies": {
- "ajv": {
- "version": "6.12.6",
- "resolved": "https://registry.npmmirror.com/ajv/-/ajv-6.12.6.tgz",
- "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==",
- "dev": true,
- "requires": {
- "fast-deep-equal": "^3.1.1",
- "fast-json-stable-stringify": "^2.0.0",
- "json-schema-traverse": "^0.4.1",
- "uri-js": "^4.2.2"
- }
+ "engines": {
+ "node": ">= 10.13.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/webpack"
+ },
+ "peerDependencies": {
+ "fibers": ">= 3.1.0",
+ "node-sass": "^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0 || ^9.0.0",
+ "sass": "^1.3.0",
+ "webpack": "^4.36.0 || ^5.0.0"
+ },
+ "peerDependenciesMeta": {
+ "fibers": {
+ "optional": true
},
- "ajv-keywords": {
- "version": "3.5.2",
- "resolved": "https://registry.npmmirror.com/ajv-keywords/-/ajv-keywords-3.5.2.tgz",
- "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==",
- "dev": true
+ "node-sass": {
+ "optional": true
},
- "json-schema-traverse": {
- "version": "0.4.1",
- "resolved": "https://registry.npmmirror.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
- "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==",
- "dev": true
- },
- "schema-utils": {
- "version": "3.3.0",
- "resolved": "https://registry.npmmirror.com/schema-utils/-/schema-utils-3.3.0.tgz",
- "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==",
- "dev": true,
- "requires": {
- "@types/json-schema": "^7.0.8",
- "ajv": "^6.12.5",
- "ajv-keywords": "^3.5.2"
- }
+ "sass": {
+ "optional": true
}
}
},
- "schema-utils": {
- "version": "4.2.0",
- "resolved": "https://registry.npmmirror.com/schema-utils/-/schema-utils-4.2.0.tgz",
- "integrity": "sha512-L0jRsrPpjdckP3oPug3/VxNKt2trR8TcabrM6FOAAlvC/9Phcmm+cuAgTlxBqdBR1WJx7Naj9WHw+aOmheSVbw==",
+ "node_modules/sass-loader/node_modules/ajv": {
+ "version": "6.12.6",
+ "resolved": "https://registry.npmmirror.com/ajv/-/ajv-6.12.6.tgz",
+ "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==",
"dev": true,
- "requires": {
+ "dependencies": {
+ "fast-deep-equal": "^3.1.1",
+ "fast-json-stable-stringify": "^2.0.0",
+ "json-schema-traverse": "^0.4.1",
+ "uri-js": "^4.2.2"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/epoberezkin"
+ }
+ },
+ "node_modules/sass-loader/node_modules/ajv-keywords": {
+ "version": "3.5.2",
+ "resolved": "https://registry.npmmirror.com/ajv-keywords/-/ajv-keywords-3.5.2.tgz",
+ "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==",
+ "dev": true,
+ "peerDependencies": {
+ "ajv": "^6.9.1"
+ }
+ },
+ "node_modules/sass-loader/node_modules/json-schema-traverse": {
+ "version": "0.4.1",
+ "resolved": "https://registry.npmmirror.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
+ "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==",
+ "dev": true
+ },
+ "node_modules/sass-loader/node_modules/schema-utils": {
+ "version": "3.3.0",
+ "resolved": "https://registry.npmmirror.com/schema-utils/-/schema-utils-3.3.0.tgz",
+ "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==",
+ "dev": true,
+ "dependencies": {
+ "@types/json-schema": "^7.0.8",
+ "ajv": "^6.12.5",
+ "ajv-keywords": "^3.5.2"
+ },
+ "engines": {
+ "node": ">= 10.13.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/webpack"
+ }
+ },
+ "node_modules/schema-utils": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmmirror.com/schema-utils/-/schema-utils-4.3.0.tgz",
+ "integrity": "sha512-Gf9qqc58SpCA/xdziiHz35F4GNIWYWZrEshUc/G/r5BnLph6xpKuLeoJoQuj5WfBIx/eQLf+hmVPYHaxJu7V2g==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
"@types/json-schema": "^7.0.9",
"ajv": "^8.9.0",
"ajv-formats": "^2.1.1",
"ajv-keywords": "^5.1.0"
+ },
+ "engines": {
+ "node": ">= 10.13.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/webpack"
}
},
- "select": {
+ "node_modules/select": {
"version": "1.1.2",
"resolved": "https://registry.npmmirror.com/select/-/select-1.1.2.tgz",
"integrity": "sha512-OwpTSOfy6xSs1+pwcNrv0RBMOzI39Lp3qQKUTPVVPRjCdNa5JH/oPRiqsesIskK8TVgmRiHwO4KXlV2Li9dANA=="
},
- "semver": {
+ "node_modules/semver": {
"version": "7.6.3",
"resolved": "https://registry.npmmirror.com/semver/-/semver-7.6.3.tgz",
"integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==",
- "dev": true
+ "dev": true,
+ "bin": {
+ "semver": "bin/semver.js"
+ },
+ "engines": {
+ "node": ">=10"
+ }
},
- "serialize-javascript": {
+ "node_modules/serialize-javascript": {
"version": "6.0.2",
"resolved": "https://registry.npmmirror.com/serialize-javascript/-/serialize-javascript-6.0.2.tgz",
"integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==",
"dev": true,
- "requires": {
+ "dependencies": {
"randombytes": "^2.1.0"
}
},
- "slash": {
+ "node_modules/slash": {
"version": "5.1.0",
"resolved": "https://registry.npmmirror.com/slash/-/slash-5.1.0.tgz",
"integrity": "sha512-ZA6oR3T/pEyuqwMgAKT0/hAv8oAXckzbkmR0UkUosQ+Mc4RxGoJkRmwHgHufaenlyAgE1Mxgpdcrf75y6XcnDg==",
- "dev": true
+ "dev": true,
+ "engines": {
+ "node": ">=14.16"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
},
- "source-map-js": {
+ "node_modules/source-map": {
+ "version": "0.6.1",
+ "resolved": "https://registry.npmmirror.com/source-map/-/source-map-0.6.1.tgz",
+ "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
+ "dev": true,
+ "license": "BSD-3-Clause",
+ "peer": true,
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/source-map-js": {
"version": "1.2.1",
"resolved": "https://registry.npmmirror.com/source-map-js/-/source-map-js-1.2.1.tgz",
"integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==",
- "dev": true
+ "dev": true,
+ "engines": {
+ "node": ">=0.10.0"
+ }
},
- "tiny-emitter": {
+ "node_modules/source-map-support": {
+ "version": "0.5.21",
+ "resolved": "https://registry.npmmirror.com/source-map-support/-/source-map-support-0.5.21.tgz",
+ "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==",
+ "dev": true,
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "buffer-from": "^1.0.0",
+ "source-map": "^0.6.0"
+ }
+ },
+ "node_modules/supports-color": {
+ "version": "8.1.1",
+ "resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-8.1.1.tgz",
+ "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==",
+ "dev": true,
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "has-flag": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/supports-color?sponsor=1"
+ }
+ },
+ "node_modules/tapable": {
+ "version": "2.2.1",
+ "resolved": "https://registry.npmmirror.com/tapable/-/tapable-2.2.1.tgz",
+ "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==",
+ "dev": true,
+ "license": "MIT",
+ "peer": true,
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/terser": {
+ "version": "5.39.0",
+ "resolved": "https://registry.npmmirror.com/terser/-/terser-5.39.0.tgz",
+ "integrity": "sha512-LBAhFyLho16harJoWMg/nZsQYgTrg5jXOn2nCYjRUcZZEdE3qa2zb8QEDRUGVZBW4rlazf2fxkg8tztybTaqWw==",
+ "dev": true,
+ "license": "BSD-2-Clause",
+ "peer": true,
+ "dependencies": {
+ "@jridgewell/source-map": "^0.3.3",
+ "acorn": "^8.8.2",
+ "commander": "^2.20.0",
+ "source-map-support": "~0.5.20"
+ },
+ "bin": {
+ "terser": "bin/terser"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/terser-webpack-plugin": {
+ "version": "5.3.14",
+ "resolved": "https://registry.npmmirror.com/terser-webpack-plugin/-/terser-webpack-plugin-5.3.14.tgz",
+ "integrity": "sha512-vkZjpUjb6OMS7dhV+tILUW6BhpDR7P2L/aQSAv+Uwk+m8KATX9EccViHTJR2qDtACKPIYndLGCyl3FMo+r2LMw==",
+ "dev": true,
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "@jridgewell/trace-mapping": "^0.3.25",
+ "jest-worker": "^27.4.5",
+ "schema-utils": "^4.3.0",
+ "serialize-javascript": "^6.0.2",
+ "terser": "^5.31.1"
+ },
+ "engines": {
+ "node": ">= 10.13.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/webpack"
+ },
+ "peerDependencies": {
+ "webpack": "^5.1.0"
+ },
+ "peerDependenciesMeta": {
+ "@swc/core": {
+ "optional": true
+ },
+ "esbuild": {
+ "optional": true
+ },
+ "uglify-js": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/tiny-emitter": {
"version": "2.1.0",
"resolved": "https://registry.npmmirror.com/tiny-emitter/-/tiny-emitter-2.1.0.tgz",
"integrity": "sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q=="
},
- "to-arraybuffer": {
+ "node_modules/to-arraybuffer": {
"version": "1.0.1",
"resolved": "https://registry.npmmirror.com/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz",
"integrity": "sha512-okFlQcoGTi4LQBG/PgSYblw9VOyptsz2KJZqc6qtgGdes8VktzUQkj4BI2blit072iS8VODNcMA+tvnS9dnuMA=="
},
- "to-regex-range": {
+ "node_modules/to-regex-range": {
"version": "5.0.1",
"resolved": "https://registry.npmmirror.com/to-regex-range/-/to-regex-range-5.0.1.tgz",
"integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
"dev": true,
- "requires": {
+ "dependencies": {
"is-number": "^7.0.0"
+ },
+ "engines": {
+ "node": ">=8.0"
}
},
- "unicorn-magic": {
+ "node_modules/undici-types": {
+ "version": "6.21.0",
+ "resolved": "https://registry.npmmirror.com/undici-types/-/undici-types-6.21.0.tgz",
+ "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==",
+ "dev": true,
+ "license": "MIT",
+ "peer": true
+ },
+ "node_modules/unicorn-magic": {
"version": "0.1.0",
"resolved": "https://registry.npmmirror.com/unicorn-magic/-/unicorn-magic-0.1.0.tgz",
"integrity": "sha512-lRfVq8fE8gz6QMBuDM6a+LO3IAzTi05H6gCVaUpir2E1Rwpo4ZUog45KpNXKC/Mn3Yb9UDuHumeFTo9iV/D9FQ==",
- "dev": true
+ "dev": true,
+ "engines": {
+ "node": ">=18"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
},
- "uri-js": {
+ "node_modules/update-browserslist-db": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmmirror.com/update-browserslist-db/-/update-browserslist-db-1.1.3.tgz",
+ "integrity": "sha512-UxhIZQ+QInVdunkDAaiazvvT/+fXL5Osr0JZlJulepYu6Jd7qJtDZjlur0emRlT71EN3ScPoE7gvsuIKKNavKw==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/browserslist"
+ },
+ {
+ "type": "tidelift",
+ "url": "https://tidelift.com/funding/github/npm/browserslist"
+ },
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/ai"
+ }
+ ],
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "escalade": "^3.2.0",
+ "picocolors": "^1.1.1"
+ },
+ "bin": {
+ "update-browserslist-db": "cli.js"
+ },
+ "peerDependencies": {
+ "browserslist": ">= 4.21.0"
+ }
+ },
+ "node_modules/uri-js": {
"version": "4.4.1",
"resolved": "https://registry.npmmirror.com/uri-js/-/uri-js-4.4.1.tgz",
"integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==",
"dev": true,
- "requires": {
+ "dependencies": {
"punycode": "^2.1.0"
}
},
- "uview-plus": {
+ "node_modules/uview-plus": {
"version": "3.3.32",
"resolved": "https://registry.npmmirror.com/uview-plus/-/uview-plus-3.3.32.tgz",
"integrity": "sha512-rl/Bw9uH7sNY8GAzKVv3Wel27wvUx08UuADEPxQB5U2LrkdHD2r6Cvk6BTbQbLKDTpFR7rrbVTQiK/DNKFIe4Q==",
- "requires": {
+ "dependencies": {
"clipboard": "^2.0.11",
"dayjs": "^1.11.3"
+ },
+ "engines": {
+ "HBuilderX": "^3.1.0"
+ }
+ },
+ "node_modules/watchpack": {
+ "version": "2.4.2",
+ "resolved": "https://registry.npmmirror.com/watchpack/-/watchpack-2.4.2.tgz",
+ "integrity": "sha512-TnbFSbcOCcDgjZ4piURLCbJ3nJhznVh9kw6F6iokjiFPl8ONxe9A6nMDVXDiNbrSfLILs6vB07F7wLBrwPYzJw==",
+ "dev": true,
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "glob-to-regexp": "^0.4.1",
+ "graceful-fs": "^4.1.2"
+ },
+ "engines": {
+ "node": ">=10.13.0"
+ }
+ },
+ "node_modules/webpack": {
+ "version": "5.99.5",
+ "resolved": "https://registry.npmmirror.com/webpack/-/webpack-5.99.5.tgz",
+ "integrity": "sha512-q+vHBa6H9qwBLUlHL4Y7L0L1/LlyBKZtS9FHNCQmtayxjI5RKC9yD8gpvLeqGv5lCQp1Re04yi0MF40pf30Pvg==",
+ "dev": true,
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "@types/eslint-scope": "^3.7.7",
+ "@types/estree": "^1.0.6",
+ "@webassemblyjs/ast": "^1.14.1",
+ "@webassemblyjs/wasm-edit": "^1.14.1",
+ "@webassemblyjs/wasm-parser": "^1.14.1",
+ "acorn": "^8.14.0",
+ "browserslist": "^4.24.0",
+ "chrome-trace-event": "^1.0.2",
+ "enhanced-resolve": "^5.17.1",
+ "es-module-lexer": "^1.2.1",
+ "eslint-scope": "5.1.1",
+ "events": "^3.2.0",
+ "glob-to-regexp": "^0.4.1",
+ "graceful-fs": "^4.2.11",
+ "json-parse-even-better-errors": "^2.3.1",
+ "loader-runner": "^4.2.0",
+ "mime-types": "^2.1.27",
+ "neo-async": "^2.6.2",
+ "schema-utils": "^4.3.0",
+ "tapable": "^2.1.1",
+ "terser-webpack-plugin": "^5.3.11",
+ "watchpack": "^2.4.1",
+ "webpack-sources": "^3.2.3"
+ },
+ "bin": {
+ "webpack": "bin/webpack.js"
+ },
+ "engines": {
+ "node": ">=10.13.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/webpack"
+ },
+ "peerDependenciesMeta": {
+ "webpack-cli": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/webpack-sources": {
+ "version": "3.2.3",
+ "resolved": "https://registry.npmmirror.com/webpack-sources/-/webpack-sources-3.2.3.tgz",
+ "integrity": "sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==",
+ "dev": true,
+ "license": "MIT",
+ "peer": true,
+ "engines": {
+ "node": ">=10.13.0"
}
}
}
diff --git a/pages.json b/pages.json
index 04103d3..82227d4 100644
--- a/pages.json
+++ b/pages.json
@@ -142,5 +142,15 @@
"text": "我的"
}
]
+ },
+ "condition" : { //模式配置,仅开发期间生效
+ "current": 0, //当前激活的模式(list 的索引项)
+ "list": [
+ {
+ "name": "", //模式名称
+ "path": "", //启动页面,必选
+ "query": "" //启动参数,在页面的onLoad函数里面得到
+ }
+ ]
}
}
\ No newline at end of file
diff --git a/pages/login/index.vue b/pages/login/index.vue
index 0060345..df44fb9 100644
--- a/pages/login/index.vue
+++ b/pages/login/index.vue
@@ -185,11 +185,11 @@
const accountType = reactive({
list: [{
label: '商户',
- value: 'merchant'
+ value: '0'
},
{
label: '员工',
- value: 'staff'
+ value: '1'
},
],
sel: 0
@@ -246,8 +246,8 @@
})
// #ifdef H5
- vdata.formData.username = '17792050546'
- vdata.formData.pwd = 'sy666888'
+ vdata.formData.username = 'xpc'
+ vdata.formData.pwd = '123'
// #endif
// #ifdef MP-WEIXIN
// vdata.formData.username = '15699991111'
@@ -268,8 +268,8 @@
const getCode = () => {
getCodeImg().then(res => {
- vdata.formData.img = res.img
- vdata.formData.uuid = res.uuid
+ vdata.formData.img = res.data.code
+ vdata.formData.uuid = res.data.uuid
})
}
@@ -310,7 +310,8 @@
// loginPromise = $loginByPwd(vdata.formData.username, vdata.formData.pwd, vdata.formData.safetyCode)
loginPromise = login({
username: vdata.formData.username,
- password: encrypt(vdata.formData.pwd),
+ password: vdata.formData.pwd,
+ // password: encrypt(vdata.formData.pwd),
rememberMe: false,
code: vdata.formData.code,
uuid: vdata.formData.uuid,
@@ -330,7 +331,7 @@
// 请求后的操作
loginPromise.then(res => {
// 登录成功
- loginFinishFunc(res)
+ loginFinishFunc(res.data)
// 保存商户号
uni.setStorageSync('MerchantId', {
merchantName: vdata.formData.merchantName,
@@ -368,14 +369,15 @@
// 封装登录成功后的操作
async function loginFinishFunc(loginBizData) {
// 保存 token
- storageManage.setLogin(loginBizData)
- storageManage.token(loginBizData.token)
- storageManage.shopId(loginBizData.shopId)
- storageManage.shopUserId(loginBizData.user.user.id)
- storageManage.userInfo(loginBizData)
-
+ uni.setStorageSync('shopInfo',loginBizData.shopInfo)
+ uni.setStorageSync('tokenInfo',loginBizData.tokenInfo)
+ uni.setStorageSync('shopId',loginBizData.shopInfo.id)
+ uni.setStorageSync('loginType',loginBizData.loginType)
// 跳转到首页
go.to("PAGES_CREATE_ORDER")
+ // uni.navigateTo({
+ // url:'pagesCreateOrder/index/index'
+ // })
}
// 点击发送验证码的函数
diff --git a/pagesCreateOrder/choose-table/choose-table.vue b/pagesCreateOrder/choose-table/choose-table.vue
index fbee499..3ac5b71 100644
--- a/pagesCreateOrder/choose-table/choose-table.vue
+++ b/pagesCreateOrder/choose-table/choose-table.vue
@@ -26,33 +26,37 @@
-
-
-
+
+
+
- {{item.name}}
-
- {{''}}
+
+
+ {{item.name}}
+
+ {{''}}
+
+
+ {{returnStutasText(item.status)}}
+
+
-
- {{returnStutasText(item.status)}}
+
+
+
+
-
-
-
-
-
-
+
-
+
@@ -108,7 +112,7 @@
let searchValue = ref('')
function search() {
- query.page=1
+ query.page = 1
getTable()
}
@@ -142,14 +146,14 @@
function areaChange(e) {
area.defaultCateIndex = e.detail.value
area.sel = area.list[e.detail.value]
- query.page=1
+ query.page = 1
getTable()
}
const query = {
page: 1,
size: 10,
areaId: 0,
- totalElements:0
+ totalElements: 0
}
// 页数改变事件
function pageChange(page) {
@@ -166,28 +170,32 @@
async function getTable() {
// let state=status.list[status.active].key
// state=state?(state=='all'?'':state):''
- const areaId=area.list[area.defaultCateIndex].id||''
+ const areaId = area.list[area.defaultCateIndex].id || ''
let {
- content,total
- } = await $table.get({...query,areaId,name:searchValue.value,state:'idle'})
- query.totalElements=total||0;
+ data
+ } = await $table.get({
+ ...query,
+ areaId,
+ name: searchValue.value,
+ state: 'idle'
+ })
+ query.totalElements = data.totalRow || 0;
tables.hasAjax = true;
- console.log(content);
- tables.list = content
- tables.selIndex = content.findIndex(v => v.tableId == option.tableId)
- tables.originList = content
+ tables.list = data.records
+ tables.selIndex = data.records.findIndex(v => v.tableCode == option.tableCode)
+ tables.originList = data.records
}
async function getArea() {
const {
- content
+ data
} = await $tableArea.get({
page: 0,
size: 300
})
- content.unshift({
+ data.records.unshift({
name: '全部'
})
- area.list = content.map(v => {
+ area.list = data.records.map(v => {
return {
...v,
}
diff --git a/pagesCreateOrder/confirm-order/components/discount.vue b/pagesCreateOrder/confirm-order/components/discount.vue
index 478f954..3bff793 100644
--- a/pagesCreateOrder/confirm-order/components/discount.vue
+++ b/pagesCreateOrder/confirm-order/components/discount.vue
@@ -1,9 +1,6 @@
-
-
-
@@ -33,8 +30,7 @@
-
+ placeholder-class="placeholder-class" placeholder="请输入最终优惠金额" />
元
@@ -46,19 +42,22 @@
-
- 打折原因
- *
-
+
+ 当前单品价格:{{price}}
+
+
+ 打折原因
+ *
+
-
-
+
@@ -67,7 +66,10 @@
确认
- 取消
+
+
+
+
@@ -75,18 +77,13 @@
+
+
\ No newline at end of file
diff --git a/pagesCreateOrder/confirm-order/components/remark.vue b/pagesCreateOrder/confirm-order/components/remark.vue
index 3fbe349..381ae03 100644
--- a/pagesCreateOrder/confirm-order/components/remark.vue
+++ b/pagesCreateOrder/confirm-order/components/remark.vue
@@ -99,8 +99,7 @@
const emits = defineEmits(['confirm'])
function confirm() {
- const {remark
- } = form
+ const { remark } = form
emits('confirm', {
remark
})
diff --git a/pagesCreateOrder/confirm-order/confirm-order.vue b/pagesCreateOrder/confirm-order/confirm-order.vue
index c7d7939..789028e 100644
--- a/pagesCreateOrder/confirm-order/confirm-order.vue
+++ b/pagesCreateOrder/confirm-order/confirm-order.vue
@@ -1,31 +1,28 @@
-
+
桌位号
- {{table.name||''}}
+ {{pageData.table.name||''}}
选择用户
- 选择用户
-
-
-
+ 选择用户
+
+
+
-
- {{user.nickName}}
+ {{pageData.user.nickName}}
余额:{{user.amount}}
+ class="color-main">{{pageData.user.amount}}
积分:{{user.accountPoints}}
+ class="color-main">{{pageData.user.accountPoints}}
@@ -34,70 +31,48 @@
就餐类型
-
-
+
+
-
-
-
+
-
+
- {{user.nickName}}
- {{user.isVip?'会员':'' }}
+ {{pageData.user.nickName}}
+ {{pageData.user.isVip?'会员':'' }}
余额
- {{user.amount}}
+ {{pageData.user.amount}}
积分
- {{user.accountPoints}}
+ {{pageData.user.accountPoints}}
订单数量
- {{user.orderNumber||0}}
+ {{pageData.user.orderNumber||0}}
-
+
@@ -112,13 +87,21 @@
+
+
订单备注
-
+
@@ -127,7 +110,7 @@
共
- {{goodsNumber}}
+ {{goods.list.length}}
份菜品
@@ -136,51 +119,71 @@
:key="index">
-
+
+
+ 临时菜
+
-
+
-
+
-
+
+
+
+
{{item.name}}
- {{item.specSnap||' '}}
+ {{item.specInfo||' '}}
-
- ¥{{formatPrice(item.salePrice*item.number) }}
+
+ ¥{{toFixed(item.lowPrice*item.number,item) }}
¥0
-
+
¥{{formatPrice(item.salePrice*item.number) }}
+ class="line-th color-999">¥{{toFixed(item.lowPrice*item.number,item) }}
- ¥{{formatPrice(item.memberPrice*item.number) }}
+ ¥{{toFixed(item.discount_sale_amount*item.number,item) }}
+
+
+
+ ¥{{toFixed(item.lowPrice*item.number,item) }}
+
+ ¥{{toFixed(item.lowMemberPrice*item.number,item) }}
¥
- {{formatPrice(item.salePrice*item.number) }}
+ {{toFixed(item.lowPrice*item.number,item) }}
@@ -189,29 +192,34 @@
×{{item.number}}
-
+
- {{item.note}}
+ {{item.remark}}
-
+
+
+
+ @tap="toggleItem(item,'is_gift')">{{item.is_gift?'取消赠送':'赠送'}}
+ @tap="showModel('packNumber',index,item)">{{item.pack_number>0?'取消打包':'打包'}}
-
+ @tap="toggleItem(item,'is_wait_call')">{{item.is_wait_call?'取消等叫':'等叫'}}
+
+
+
+
@@ -226,7 +234,7 @@
桌位费
- ¥{{$seatFee.totalAmount||'0.00'}}
+ ¥{{$seatFee.totalAmount.toFixed(2)||'0.00'}}
@@ -242,19 +250,16 @@
-
优惠金额
- ¥{{formatPrice(youhui) }}
+ ¥{{toFixed(youhui) }}
-
+
实收金额
- ¥{{formatPrice(allPrice) }}
+ ¥{{allPrice }}
@@ -263,26 +268,23 @@
-
+
-
+
- {{($shop.registerType=='munchies'||eatTypes.active=='takeout')?'结算': '下单'}}
+ {{(pageData.shopInfo.registerType=='before'||pageData.eatTypes.active=='take-out')?'结算': '下单'}}
-
-
+
-
+
+
@@ -292,68 +294,65 @@
import {
onLoad,
onReady,
- onShow
+ onShow,
+ onHide
} from '@dcloudio/uni-app'
import {
ref,
- onBeforeUnmount,
+ inject,
+ onUnmounted,
+ nextTick,
reactive,
computed,
watch
} from 'vue';
+
+ import modelDiscount from './components/discount'
+ import giveFood from './components/give-food'
+ import packNumber from './components/pack-number'
+ import oneRemark from './components/remark'
+ // import editDiscount from '@/pagesCreateOrder/components/edit-discount.vue'
+
import {
getSafeBottomHeight
} from '@/commons/utils/safe-bottom.js'
- import modelDiscount from './components/discount'
- import giveFood from './components/give-food'
- import oneRemark from './components/remark'
- import editDiscount from '@/pagesCreateOrder/components/edit-discount.vue'
import go from '@/commons/utils/go.js';
import {
- returnBoolean
- } from '@/commons/utils/format.js';
- import color from '@/commons/color.js';
- import * as Api from '@/http/yskApi/Instead.js'
- import $storageManage from '@/commons/utils/storageManage.js'
- import {
- tbShopInfo
- } from '@/http/yskApi/user.js'
+ hasPermission
+ } from '@/commons/utils/hasPermission.js'
import {
getNowCart
} from '@/pagesCreateOrder/util.js'
import {
- hasPermission
- } from '@/commons/utils/hasPermission.js'
+ number
+ } from 'uview-plus/libs/function/test';
+
+ import {
+ getShopTableDetail
+ } from '@/http/api/table.js'
+ import {
+ getShopInfo
+ } from '@/http/api/shop.js'
+ import {
+ getProductList
+ } from '@/http/api/product.js'
+ import {
+ createOrder,
+ getHistoryOrder
+ } from '@/http/api/order.js'
+
const models = new Map();
const modelData = reactive({
data: {},
selIndex: -1
})
- //备注
- let note = ref('')
-
- function setModel(el) {
- if (el && el.$attrs['name']) {
- models.set(el.$attrs['name'], el);
- }
- }
-
- function showModel(key, index) {
- modelData.data = goods.list[index]
- modelData.selIndex = index
- const model = models.get(key)
- model && model.open({
- remark: modelData.data.note || ''
- })
- }
-
- function formatPrice(n) {
- return Number(n).toFixed(2)
- }
-
-
-
- //用餐人数
+ const option = reactive({
+ id: '',
+ tableId: "",
+ })
+ /**
+ * 用餐人数
+ */
const userNumbers = reactive({
list: new Array(100).fill(1).map((v, index) => {
// return index === 0 ? '无' : index + '人'
@@ -361,400 +360,677 @@
}),
defaultCateIndex: 0,
})
+ const f = reactive({})
+
+ let $goods = []
+ const goods = reactive({
+ list: [],
+ sel: 0
+ })
+ const pageData = reactive({
+ shopInfo: {},
+ table: {},
+ user: {},
+ eatTypes: {
+ list: [{
+ name: "堂食",
+ value: "dine-in",
+ },
+ {
+ name: "外带",
+ value: "take-out",
+ }
+ // ,
+ // {
+ // name: "外卖",
+ // value: "take-away",
+ // }
+ ],
+ active: 'dine-in',
+ isShow: false,
+ },
+ form: {
+ note: ""
+ },
+ orderInfo: {}
+ })
+ const websocketUtil = inject('websocketUtil'); // 注入 WebSocket 工具类实例
+ onLoad((opt) => {
+ Object.assign(option, opt)
+ console.log("opt====", opt);
+ if (opt.tableId || opt.tableCode) {
+ pageData.table.id = opt.tableId
+ pageData.table.tableCode = opt.tableCode
+ }
+ pageData.shopInfo = uni.getStorageSync('shopInfo')
+ console.log(uni.getStorageSync('shopInfo'),'提示1');
+ getTbShopInfo()
+
+ })
+ let bottomHeight = ref(100)
+ onReady(() => {
+ getSafeBottomHeight('safe-bottom').then(res => {
+ bottomHeight.value = res
+ })
+ })
watch(() => userNumbers.defaultCateIndex, (newval) => {
updateChoseCount()
})
- //更新就餐人数
- async function updateChoseCount() {
- console.log($shop.value);
- const maxCapacity = table.value.tableId ? (table.value.maxCapacity || 0) : 100
- if (table.value.tableId && userNumbers.defaultCateIndex * 1 + 1 > maxCapacity) {
- uni.showToast({
- title: '当前台桌最大人数为: ' + maxCapacity
+ watch(() => pageData.eatTypes.active, (newval) => {
+ pageData.eatTypes.isShow = true
+ changeUseType()
+ })
+ onShow(() => {
+ init()
+ watchChooseuser()
+ watchChooseTable()
+ })
+ onHide(() => {
+ console.log("onHide")
+ websocketUtil.offMessage()
+ })
+ onUnmounted(() => {
+ console.log("onUnmounted")
+ websocketUtil.offMessage()
+ });
+
+ /**
+ * 获取订单详情
+ * @param {Object} tableCode
+ */
+ async function getHistoryOrderDetail(tableCode) {
+ let res = await getHistoryOrder({
+ tableCode: tableCode
+ });
+ pageData.orderInfo = res.data;
+ }
+
+ //餐位费
+ const $seatFee = reactive({
+ totalNumber: 0,
+ totalAmount: 0,
+ })
+
+ /**
+ * 打包费
+ */
+ const $packFee = computed(() => {
+ let packAmount = 0;
+ return goods.list.reduce((prve, cur) => {
+ return prve + (cur.packFee || 0) * parseFloat(cur.pack_number).toFixed(2)
+ }, 0).toFixed(2)
+ })
+
+ /**
+ * 菜品数量
+ */
+ const goodsNumber = computed(() => {
+ const result = goods.list.reduce((prve, cur) => {
+ return prve + cur.number
+ }, 0)
+ return result
+ })
+
+ /**
+ * 判断是否是会员
+ */
+ const isVip = computed(() => {
+ return pageData.shopInfo.isMemberPrice && pageData.user && pageData.user.id && pageData.user.isVip
+ })
+
+ const discount_sale_amount = computed(() => {
+ return goods.list.filter((v) => v.discount_sale_amount && v.discount_sale_amount > 0)
+ .reduce((a, b) => {
+ const lowMemberPrice = b.lowMemberPrice ? b.lowMemberPrice : b.lowPrice
+ const tPrice = (isVip.value ? lowMemberPrice : b.lowPrice)
+ return a + b.number * (tPrice - b.discount_sale_amount);
+ }, 0);
+ })
+
+ const goodsPrice = computed(() => {
+ const goodsTotalPrice = goods.list.reduce((prve, cur) => {
+ const lowMemberPrice = cur.lowMemberPrice ? cur.lowMemberPrice : cur.lowPrice
+ const tPrice = Math.floor(((isVip.value ? lowMemberPrice : cur.lowPrice) * cur.number) * 100) /
+ 100
+ return prve + (cur.is_gift ? 0 : tPrice)
+ }, 0)
+ const tpackFee = $packFee.value > 0 ? $packFee.value * 1 : 0
+
+ return ((goodsTotalPrice - discount_sale_amount.value + tpackFee) || 0).toFixed(2)
+ })
+
+ /**
+ * 实收金额
+ */
+ const allPrice = computed(() => {
+ const n = goodsPrice.value * 1 + $seatFee.totalAmount
+ return n.toFixed(2)
+ })
+
+ /**
+ * 计算优惠金额
+ */
+ const youhui = computed(() => {
+ let goodsTotalPrice = 0
+ if (pageData.user && pageData.user.id && pageData.user.isVip) {
+ goodsTotalPrice = goods.list.reduce((prve, cur) => {
+ const tPrice = cur.lowPrice * cur.number
+ const tpackFee = (cur.pack_number * 1) > 0 ? cur.packFee * (cur.pack_number * 1) : 0
+ return prve + tPrice + tpackFee
+ }, 0)
+ return (goodsTotalPrice + $seatFee.totalAmount) - allPrice.value
+ } else {
+ return (discount_sale_amount.value)
+ }
+ return (goodsTotalPrice + discount_sale_amount.value * 1).toFixed(2)
+ })
+
+ function toFixed(price, item) {
+ if (item) {
+ if (item.productType == 'weight' || item.type == 'weight') {
+ return (Math.floor(price * 100) / 100).toFixed(2)
+ } else {
+ return parseFloat(price).toFixed(2)
+ }
+ } else {
+ return parseFloat(price).toFixed(2)
+ }
+ }
+
+ async function init() {
+ nextTick(() => {
+ onMessage()
+ })
+ // 获取商品列表
+ let res = await getProductList({}, 'product', false)
+ $goods = res.data
+ // console.log("商品列表===",$goods)
+ getTableInfo(pageData.table)
+
+ }
+
+ /**
+ * socket消息监听
+ */
+ function onMessage() {
+ websocketUtil.offMessage()
+ websocketUtil.onMessage(res => {
+ let msg = JSON.parse(res);
+ let cartItem;
+ if (msg.msg_id) {
+ websocketUtil.send(JSON.stringify({
+ type: 'receipt',
+ msg_id: msg.msg_id,
+ }))
+ }
+ if (msg.status == 0) {
+ infoBox.showToast('添加失败')
+ return false;
+ }
+
+ switch (msg.operate_type) {
+ case 'pad_init':
+ goods.list = []
+ console.log(msg.data)
+ msg.data.map(item => {
+ cartItem = getNowCart(item, $goods, pageData.user)
+ console.log(cartItem)
+ if (cartItem.isGrounding || cartItem.is_temporary == 1) {
+ cartControls(cartItem, 'add')
+ } else {
+ delCart(cartItem.id)
+ }
+
+ })
+ if (pageData.eatTypes.isShow) {
+ if (pageData.eatTypes.active == 'take-out') {
+ cartItem.pack_number = cartItem.number
+ } else {
+ cartItem.pack_number = 0
+ }
+ let par = {
+ type: 'onboc',
+ account: uni.getStorageSync("iToken").loginId,
+ shop_id: uni.getStorageSync("shopInfo").id,
+ operate_type: 'batch',
+ table_code: pageData.table.tableCode,
+ is_pack: pageData.eatTypes.active == 'take-out' ? 1 : 0,
+ }
+ updateCart(par)
+ }
+ // 是否更新就餐人数
+ if (!$seatFee.totalNumber) {
+ updateChoseCount()
+ }
+
+ pageData.eatTypes.isShow = false
+ break;
+ case 'pad_add':
+ case 'add':
+ cartItem = getNowCart(msg.data, $goods, pageData.user)
+ cartControls(cartItem, 'add')
+ break;
+ case 'pad_edit':
+ case 'edit':
+ getCart()
+ break;
+ case 'pad_del':
+ case 'del':
+ cartItem = getNowCart(msg.data, $goods, pageData.user)
+ cartControls(cartItem, 'del')
+ break;
+ case 'pad_cleanup':
+ case 'cleanup':
+ goods.list = []
+ $seatFee.totalNumber = 0
+ $seatFee.totalAmount = 0
+ userNumbers.defaultCateIndex = 0
+ init()
+ break;
+ case 'product_update':
+ init()
+ break;
+ }
+
+ });
+
+ }
+
+
+
+ /**
+ * 删除购物车菜品
+ */
+ function delCart(cartItem) {
+ let params = {
+ type: 'pad',
+ account: uni.getStorageSync("shopId"),
+ shop_id: uni.getStorageSync("shopId"),
+ is_gift: 0,
+ id: cartItem.id,
+ operate_type: 'del',
+
+
+ }
+ websocketUtil.send(JSON.stringify(params))
+ }
+
+ /**
+ * socket通知购物车商品数量修改处理
+ */
+ function cartControls(cartItem, type) {
+ if (!pageData.table.tableCode) {
+ pageData.table.tableCode = cartItem.table_code
+ }
+ let cartIndex = 0;
+ goods.list.map((item, index) => {
+ if (item.id == cartItem.id) {
+ cartIndex = index;
+ }
+ })
+
+ if (type == 'del') {
+ goods.list.splice(cartIndex, 1)
+ return;
+ }
+ if (type == 'add') {
+ goods.list.push(cartItem)
+ }
+ if (type == 'edit') {
+ goods.list[cartIndex].number = cartItem.number
+ }
+ }
+
+
+ /**
+ * 获取购物车数据
+ */
+ function getCart() {
+ // 初始化购物车
+ websocketUtil.send(JSON.stringify({
+ type: 'pad',
+ account: uni.getStorageSync("shopInfo").id,
+ shop_id: uni.getStorageSync("shopInfo").id,
+ operate_type: 'init',
+ table_code: pageData.table.tableCode,
+ }))
+
+ }
+
+ /**
+ * 获取店铺信息
+ */
+ async function getTbShopInfo() {
+ const res = await getShopInfo({
+ id: uni.getStorageSync('shopId')
+ })
+ pageData.shopInfo = res.data
+ uni.setStorageSync('shopInfo', res.data)
+ }
+
+ /**
+ * 获取桌台信息
+ */
+ async function getTableInfo(opt) {
+ const {
+ data: res
+ } = await getShopTableDetail({
+ id: opt.id,
+ tableCode: opt.tableCode
+ })
+ Object.assign(pageData.table, res)
+ if (!pageData.shopInfo.isTableFee && pageData.table && pageData.table.id) {
+ userNumbers.list = new Array(res.maxCapacity ? res.maxCapacity * 1 : 100).fill(1).map((v, index) => {
+ return (index + 1) + '人'
})
+ }
+ // 获取购物车数据
+ getCart()
+ // 获取购物车数据
+ getHistoryOrderDetail(opt.tableCode)
+ }
+
+ /**
+ * 更新选择用户
+ */
+ function watchChooseuser() {
+ uni.$off('choose-user')
+ uni.$on('choose-user', (data) => {
+ pageData.user = data
+ })
+ }
+
+ /**
+ * 就餐类型切换监听
+ */
+ async function changeUseType() {
+ if (!goods.list.length) {
+ return
+ }
+ getCart()
+ }
+
+ /**
+ * 购物车数据修改
+ * @param {Object} par
+ */
+ function updateCart(par) {
+ websocketUtil.send(JSON.stringify({
+ type: 'pad',
+ account: uni.getStorageSync("shopInfo").id,
+ shop_id: uni.getStorageSync("shopInfo").id,
+ operate_type: 'edit',
+ table_code: pageData.table.tableCode,
+ ...par
+ }))
+ getCart()
+ }
+
+ /**
+ * 菜品赠送/等叫/打印修改
+ * @param {Object} item
+ */
+ function toggleItem(item, key) {
+ let par = {
+ id: item.id,
+ product_id: item.product_id,
+ sku_id: item.sku_id
+ }
+ par[key] = item[key] == 0 ? 1 : 0
+ updateCart(par)
+ }
+
+
+ /**
+ * 单品打折
+ * @param {Object} form
+ */
+ async function discountconfirm(form) {
+ if (form.discountMoney != '.') {
+ let str = ''
+ if (form.notes) {
+ form.notes.forEach(ele => {
+ if (ele.checked) {
+ str = str + ele.name + ','
+ }
+ })
+ }
+ let lowMemberPrice = modelData.data.lowMemberPrice ? modelData.data.lowMemberPrice : modelData.data
+ .lowPrice
+ let tPrice = (isVip.value ? lowMemberPrice : modelData.data.lowPrice)
+ let discount_sale_amount = modelData.data.is_gift ? 0 : form.discountMoney
+ let par = {
+ id: modelData.data.id,
+ product_id: modelData.data.product_id,
+ sku_id: modelData.data.sku_id,
+ discount_sale_amount: discount_sale_amount,
+ discount_sale_note: str + form.note,
+ }
+ updateCart(par)
+ }
+ }
+
+ /**
+ * 打包
+ */
+ function goodsOnePackNumberConfirm(e) {
+ let par = {
+ id: modelData.data.id,
+ product_id: modelData.data.product_id,
+ sku_id: modelData.data.sku_id,
+ pack_number: e
+ }
+ updateCart(par)
+ }
+
+ /**
+ * 单品备注确认
+ * @param {Object} e
+ */
+ async function goodsOneRemarkConfirm(e) {
+ let par = {
+ id: modelData.data.id,
+ product_id: modelData.data.product_id,
+ sku_id: modelData.data.sku_id,
+ remark: e.remark
+ }
+ updateCart(par)
+ }
+
+ /**
+ * 设置弹窗信息
+ * @param {Object} el
+ */
+ function setModel(el) {
+ if (el && el.$attrs['name']) {
+ models.set(el.$attrs['name'], el);
+ }
+ }
+
+ /**
+ * 打开弹窗
+ * @param {Object} key
+ * @param {Object} index
+ */
+ function showModel(key, index, item) {
+ modelData.data = goods.list[index]
+ modelData.selIndex = index
+ const model = models.get(key)
+ console.log("弹窗数据===", modelData.data)
+ if (key == 'packNumber') {
+ if (modelData.data.type == 'weight' && item.pack_number <= 0) {
+ let par = {
+ id: modelData.data.id,
+ product_id: modelData.data.product_id,
+ sku_id: modelData.data.sku_id,
+ pack_number: 1
+ }
+ updateCart(par)
+ return false;
+ }
+ if (item.pack_number > 0) {
+ let par = {
+ id: modelData.data.id,
+ product_id: modelData.data.product_id,
+ sku_id: modelData.data.sku_id,
+ pack_number: 0
+ }
+ updateCart(par)
+ return false;
+ }
+ model && model.open({
+ number: item.number
+ })
+
+ } else {
+ model && model.open({
+ packNumber: modelData.data.remark || ''
+ })
+ }
+ }
+
+ function formatPrice(n) {
+ return (Math.floor(n * 100) / 100).toFixed(2)
+ }
+
+ function rotatingTables() {
+ uni.navigateTo({
+ url: '/pagesCreateOrder/confirm-order/rotatingTables?item=' + JSON.stringify(goods.list),
+ })
+ }
+
+ /**
+ * 更新就餐人数
+ */
+ async function updateChoseCount() {
+ const maxCapacity = pageData.table && pageData.table.id ? (pageData.table.maxCapacity || 0) : 100
+ if (pageData.table && pageData.table.id && userNumbers.defaultCateIndex * 1 + 1 > maxCapacity) {
+ // uni.$utils.showToast('当前台桌最大人数为: ' + maxCapacity)
userNumbers.defaultCateIndex = maxCapacity - 1
return
}
- if (!$shop.value.isTableFee && table.value.tableId) {
+ console.log(pageData.shopInfo)
+ console.log(!pageData.shopInfo.isTableFee)
+ if (!pageData.shopInfo.isTableFee && pageData.table && pageData.table.id && goods.list.length > 0) {
//不免餐位费
- const res = await Api.$choseCount({
- masterId: option.masterId,
- tableId: table.value.tableId || '',
- num: userNumbers.defaultCateIndex * 1 + 1,
- })
- Object.assign($seatFee, res)
- userNumbers.defaultCateIndex = res.totalNumber - 1
+ console.log("不免餐位费")
+ let seatFee = {
+ totalNumber: userNumbers.defaultCateIndex * 1 + 1,
+ totalAmount: (userNumbers.defaultCateIndex * 1 + 1) * pageData.shopInfo.tableFee,
+ }
+ Object.assign($seatFee, seatFee)
+ userNumbers.defaultCateIndex = $seatFee.totalNumber - 1
}
}
+ /**
+ * 选择就餐人数
+ * @param {Object} e
+ */
function userNumberChange(e) {
- console.log(e);
userNumbers.defaultCateIndex = e.detail.value
}
- const form = reactive({})
- //切换商品状态
- async function toggleGoodsItemKey(item, index, key) {
- const {
- productId,
- skuId,
- id,
- number,
- isPack,
- isGift
- } = item
- const par = {
- cartId: id,
- isPack,
- isGift,
- masterId: option.masterId,
- tableId: table.value.tableId || '',
- productId,
- num: number,
- skuId
- }
- par[key] = !item[key]
- const res = await Api.$updateCart(par)
- goods.list[index][key] = returnBoolean(res[key])
- if (key == 'isPack') {
- getCart()
- }
- }
- //等叫
- function toggleWait(item) {
- item.isWait = !item.isWait
- }
-
-
-
- const eatTypes = reactive({
- list: [{
- name: "堂食",
- value: "dine-in",
- },
- {
- name: "自取",
- value: "takeout",
- }
- ],
- active: 'dine-in'
- })
-
- const $packFee = computed(() => {
- return goods.list.reduce((prve, cur) => {
- return prve + cur.packFee
- }, 0).toFixed(2)
- })
-
function chooseUser() {
go.to('PAGES_CHOOSE_USER')
}
function chooseTable() {
go.to('PAGES_CHOOSE_TABLE', {
- ...table.value
+ ...pageData.table
})
}
- const option = reactive({
- masterId: '',
- tableId: ""
- })
- // 监听选择用户事件
- let user = ref(null)
- //更新选择用户
- function setUser(par) {
- console.log(option);
- const submitPar = {
- masterId: option.masterId,
- tableId: table.value.tableId || "",
- vipUserId: user.value.id ? user.value.id : '',
- type: user.value.id ? 0 : 1 //0 设置 1 取消
- }
- Object.assign(submitPar, par)
- return Api.$setUser(submitPar)
- }
-
- function watchChooseuser() {
- uni.$off('choose-user')
- uni.$on('choose-user', (data) => {
- console.log(data);
- user.value = data
- setUser()
- })
- }
- let table = ref(null)
- //监听桌台改变
- watch(() => table.value, (newval, oldval) => {
- if (newval && oldval) {
- // Api.$choseTable({
- // orderId: 4462,
- // oldTableId: oldval.tableId,
- // newTableId: newval.tableId,
- // })
- }
- })
function watchChooseTable() {
uni.$off('choose-table')
uni.$on('choose-table', (data) => {
- table.value = data
- console.log(table.value);
+ pageData.table = data
+ console.log("台桌信息", pageData.table);
})
}
-
- const goods = reactive({
- list: [],
- sel: 0
- })
- const goodsNumber = computed(() => {
- const result = goods.list.reduce((prve, cur) => {
- return prve + cur.number
- }, 0)
- return result
- })
- //餐位费
- const $seatFee = reactive({
- totalNumber: 0,
- totalAmount: 0,
- })
- const isVip=computed(()=>{
- return $shop.value.isMemberPrice&& user.value&&user.value.id&&user.value.isVip
- })
- const goodsPrice = computed(() => {
- const goodsTotalPrice = goods.list.reduce((prve, cur) => {
- const memberPrice=cur.memberPrice?cur.memberPrice:cur.salePrice
- const tPrice = (isVip.value? memberPrice:cur.salePrice) * cur.number
- const tpackFee = cur.isPack ? cur.packFee * 1 : 0
- return prve + (cur.isGift ? 0 : tPrice) + tpackFee
- }, 0)
- return (goodsTotalPrice || 0).toFixed(2)
- })
- const allPrice = computed(() => {
- console.log(goodsPrice.value);
- const n = goodsPrice.value * 1 + $seatFee.totalAmount
- return n.toFixed(2)
- // const goodsTotalPrice = goods.list.reduce((prve, cur) => {
- // return prve + cur.salePrice * cur.number * (cur.isGift ? 0 : 1)
- // }, 0)
- // return (goodsTotalPrice + ($seatFee.totalAmount || 0)).toFixed(2)
- })
- const youhui=computed(()=>{
- if(user.value&&user.value.id&&user.value.isVip){
- const goodsTotalPrice = goods.list.reduce((prve, cur) => {
- const tPrice = cur.salePrice * cur.number
- const tpackFee = cur.isPack ? cur.packFee * 1 : 0
- return prve + tPrice + tpackFee
- }, 0)
- return goodsTotalPrice-allPrice.value
- }else{
- return 0
- }
- return goodsTotalPrice
- })
-
- function setGoodsItem(key, val) {
- item[key] = val
- }
-
function changeGoodsSel(index) {
goods.sel = index
}
- //获取购物车数据
- async function getCart(par = {
- page: 0,
- size: 300,
- masterId: option.masterId,
- tableId: table.value.tableId || ''
- }) {
- const {
- records,
- seatFee
- } = await Api.getCart(par)
- let useType=''
- if (seatFee && seatFee.useType) {
- useType=seatFee.useType
- $storageManage.useType(useType)
- }else{
- useType=records[0].info[0].useType
- $storageManage.useType(useType)
- }
- console.log(useType);
- eatTypes.active =useType == 'takeout' ? useType : useType.replace(
- /-after|-before/g, '');
- goods.list = getNowCart(records)
- if (seatFee && seatFee.totalNumber) {
- userNumbers.defaultCateIndex = seatFee.totalNumber - 1 || 0
- Object.assign($seatFee, seatFee)
- } else {
- $seatFee.totalAmount = 0
- }
- console.log(userNumbers.defaultCateIndex);
- }
- let $shop = ref({
- registerType: ''
- })
- // 获取账号信息
- async function getTbShopInfo() {
- const res = await tbShopInfo()
- $shop.value = res
- console.log(res);
- return res
- }
- // 创建订单
- async function createOrder(par = {
- masterId: option.masterId,
- vipUserId: user.value ? user.value.id : '',
- note: note.value,
- postPay: true,
- orderId: '',
- tableId: table.value.tableId || ''
- }) {
- if (!$shop.value.isTableFee) {
- //不免餐位费
- await Api.$choseCount({
- masterId: option.masterId,
- tableId: table.value.tableId || "",
- num: userNumbers.defaultCateIndex + 1,
- })
- }
- if ($shop.value.registerType == 'munchies' || eatTypes.active == 'takeout') {
+ /**
+ * 创建订单
+ */
+ async function createAnOrder() {
+ if (pageData.shopInfo.registerType == 'before' || pageData.eatTypes.active == 'take-out') {
const canJiesuan = await hasPermission('允许收款')
if (!canJiesuan) {
return
}
}
- // updateChoseCount()
- const res = await Api.$createOrder(par)
+
+ let vipPrice = isVip.value ? 1 : 0
+ let placeNum = pageData.orderInfo ? pageData.orderInfo.placeNum + 1 : 1;
+ let originAmount = goodsPrice.value * 1 + youhui.value * 1
+ let par = {
+ shopId: pageData.shopInfo.id, //店铺Id
+ userId: pageData.user.userId, //用户Id
+ tableCode: pageData.table.tableCode, //台桌编码
+ dineMode: pageData.eatTypes.active, //用餐模式 堂食 dine-in 外带 take-out 外卖 take-away
+ remark: pageData.form.note, //备注
+ seatNum: 0, //用餐人数
+ packFee: $packFee.value, //打包费
+ originAmount: originAmount, //订单原金额(包含打包费+餐位费) 不含折扣价格
+ placeNum: placeNum, //当前订单下单次数
+ waitCall: 0, //是否等叫 0 否 1 等叫
+ vipPrice: vipPrice, //是否使用会员价
+ }
+ if (!pageData.shopInfo.isTableFee && pageData.table && pageData.table.id) {
+ par.seatNum = userNumbers.defaultCateIndex * 1 + 1
+ }
+ if (pageData.orderInfo) {
+ par.orderId = pageData.orderInfo.id
+ }
+ // console.log(par,22222222);
+ const res = await createOrder(par)
+ if(res.code==500){
+ uni.showToast({
+ title: res.msg,
+ icon: 'none'
+ })
+ return
+ }
uni.$emit('update:createOrderIndex')
- console.log($shop.value);
- console.log(res);
- if ($shop.value.registerType == 'munchies' || eatTypes.active == 'takeout') {
+ websocketUtil.send(JSON.stringify({
+ type: 'pad',
+ account: uni.getStorageSync("shopInfo").id,
+ shop_id: uni.getStorageSync("shopInfo").id,
+ operate_type: 'cleanup',
+ table_code: pageData.table.tableCode,
+ }))
+ uni.removeStorageSync("table_code")
+ if (pageData.shopInfo.registerType == 'before' || pageData.eatTypes.active == 'take-out') {
//先付
return go.to('PAGES_ORDER_PAY', {
- orderId: res.id,
+ orderId: res.data.id,
isNowPay: true
}, 'redirect')
} else {
//后付
- console.log(option.isCreateOrderToDetail);
if (option.isCreateOrderToDetail != '0') {
- console.log('PAGES_ORDER_DETAIL');
go.to('PAGES_ORDER_DETAIL', {
- id: res.id
+ id: res.data.id
}, 'redirect')
} else {
- console.log('back');
uni.navigateBack({
delta: 2
})
}
-
- // return go.to('PAGES_ORDER_DETAIL', {
- // id: res.id
- // })
}
uni.showToast({
title: '提交成功',
icon: 'none'
})
- // setTimeout(() => {
- // uni.$emit('orderDetail:update')
- // uni.navigateBack({
- // delta: 2
- // })
- // }, 500)
+
}
-
- //单品备注确认
- async function goodsOneRemarkConfirm(e) {
- const cart = goods.list[modelData.selIndex]
- await Api.$updateCart({
- cartId: cart.id,
- productId: cart.productId,
- skuId: cart.skuId,
- tableId: option.tableId || "",
- note: e.remark,
- num: cart.number // 0会删除此商品
- })
- cart.note = e.remark
- }
-
- async function init() {
- await getTbShopInfo()
- await getCart()
- console.log($seatFee);
- if (!$seatFee.totalNumber) {
- updateChoseCount()
- }
- }
-
- onLoad((opt) => {
- Object.assign(option, opt)
- console.log(opt);
- if (opt) {
- table.value = {
- ...option,
- tableId: opt.tableId || '',
- name: opt.name
- }
- userNumbers.list = new Array(opt.maxCapacity ? opt.maxCapacity * 1 : 100).fill(1).map((v, index) => {
- return (index + 1) + '人'
- })
- // console.log(userNumbers.list);
- }
- init()
-
- // updateChoseCount()
- })
- let bottomHeight = ref(100)
- onReady(() => {
- getSafeBottomHeight('safe-bottom').then(res => {
- console.log(res);
- bottomHeight.value = res
- })
- })
-
- async function changeUseType() {
- const {
- registerType
- } = $shop.value
- //munchies 先付 restaurant 后付
- const isPayAfter = registerType == "munchies" ? false : true;
- let useType = "takeout";
- if (eatTypes.active == "takeout") {
- uni.setStorageSync("useType", "takeout");
- } else {
- //堂食
- useType = `dine-in-${isPayAfter? "after" : "before"}`;
- uni.setStorageSync("useType", useType);
- }
- const tableId = useType == 'takeout' ? undefined : table.value.tableId;
- if (!goods.list.length) {
- return
- }
- const res = await Api.$changeUseType({
- useType,
- tableId: tableId || '',
- cartIds: goods.list.map((v) => v.id),
- })
- getCart()
- return res
- }
- watch(() => eatTypes.active, (newval) => {
- changeUseType()
- })
- onBeforeUnmount(() => {
-
- })
- onShow(() => {
- watchChooseuser()
- watchChooseTable()
- })
\ No newline at end of file
diff --git a/pagesCreateOrder/index/components/weigh.vue b/pagesCreateOrder/index/components/weigh.vue
new file mode 100644
index 0000000..722f6b1
--- /dev/null
+++ b/pagesCreateOrder/index/components/weigh.vue
@@ -0,0 +1,279 @@
+
+
+
+
+
+
+ 标题
+
+
+
+
+
+
+ 单价
+ ¥{{form.goods.lowPrice}}/{{form.goods.unitName}}
+
+
+ 重量
+
+ {{ currentInput }}
+ {{ form.goods.unitName }}
+
+
+
+
+
+
+
+
+ ¥ {{ (Math.floor((form.goods.lowPrice * currentInput)*100)/100).toFixed(2) }}
+
+ 确认
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pagesCreateOrder/index/index.vue b/pagesCreateOrder/index/index.vue
index f8c389a..72ab4c1 100644
--- a/pagesCreateOrder/index/index.vue
+++ b/pagesCreateOrder/index/index.vue
@@ -1,25 +1,30 @@
-
+
-
+
- {{item.name}}
+ {{item.name}}
+
+
{{data.table.name}}
-
+
+ :size="24">
@@ -40,7 +45,7 @@
-
+
@@ -52,59 +57,32 @@
搜索
+
+
+
+
-
+
+
- 登录
+ {{data.userInfo.shopName}}
+
+
+
+
+
+
+ 退出登录
-
-
+
@@ -113,15 +91,16 @@
+
- -->
+
-
+ @tapweigh="tapweigh($event,goodsIndex)" :data="goodsItem">
@@ -131,12 +110,9 @@
-
-
-
-
-
+ @tapweigh="tapweigh($event,goodsIndex)" :data="goodsItem">
@@ -165,24 +140,22 @@
-
+
-
+
-
-
-
-
+
+
+
+ :orderInfo="data.orderInfo" :historyOrder="data.historyOrder" @clear="cleaCart">
@@ -192,6 +165,8 @@
+
+
+
+
{
+ const goods = layoutData.list[foodsindex].productList[index]
+ // const goods = data.tabbar[index].foods[foodsindex]
+ refweighitem.value.open(foodsindex, index, goods)
+ }
+
+ // wx拿到的数据
+ const cars = reactive([])
+ const layout = reactive({
+ listMap: {
+ default: {
+ size: 4
+ },
+ bigOne: {
+ size: 1
+ }
+ },
+ sel: 'default'
+ })
+ let option = {
+ type: ''
+ }
+ const data = reactive({
+ // loading: true,
+ noLogin: false,
+ scrollTop: 0, //tab标题的滚动条位置
+ oldScrollTop: 0,
+ current: 0, // 预设当前项的值
+ menuHeight: 0, // 左边菜单的高度
+ menuItemHeight: 0, // 左边菜单item的高度
+ itemId: '', // 栏目右边scroll-view用于滚动的id
+ tabbar: [],
+ allGoods: [],
+ selCategotyGoods: [],
+ menuItemPos: [],
+ arr: [],
+ scrollRightTop: 0, // 右边栏目scroll-view的滚动条高度
+ timer: null, // 定时器
+ topZhanwei: 136 + 24,
+ // 选择用户
+ vipUser: {
+ id: "",
+ },
+ //餐桌号
+ masterId: "",
+ socketData: {
+ type: 'pad',
+ account: uni.getStorageSync("shopId"),
+ shop_id: uni.getStorageSync("shopId"),
+ is_gift: 0
+ },
+ table: {
+ tableId: ""
+ },
+ historyOrder: [],
+ userInfo: ""
+ })
+ // 获取账号信息
+ let $shop = ref({})
+ const layoutArr = {
+ "1": 'single',
+ "2": 'double',
+ "3": 'L1-R2',
+ "4": '4-gird',
+ "6": '6-grid',
+ }
+ const tabsEle = reactive({
+ scrollWidth: 0,
+ tabsItems: [],
+ scrollLeft: 0
+ })
const popup = reactive({
search: false,
goodsDetail: false,
data: {}
})
+ onHide(() => {
+ uni.$off('is-socket-open')
+ websocketUtil.offMessage()
+ })
+ onUnmounted(() => {
+ uni.$off('is-socket-open')
+ websocketUtil.offMessage()
+ });
function showDetail(goods) {
- console.log(goods);
changePop('goodsDetail', true, goods)
}
+ /**
+ * socket消息监听
+ */
+ function onMessage() {
+ websocketUtil.offMessage()
+ websocketUtil.onMessage(async res => {
+ let msg = JSON.parse(res);
+ let cartItem;
+ let cartArr = [];
+ if (msg.msg_id) {
+ websocketUtil.send(JSON.stringify({
+ type: 'receipt',
+ msg_id: msg.msg_id,
+ }))
+ }
+
+ if (msg.status == 0) {
+ infoBox.showToast(msg.msg || '添加失败')
+ data.isGoodsAdd = true;
+ // 如果是商品库存不足起售数量
+ if (msg.type == 'no_suit_num') {
+ console.log(editItem.value,'editItem.value222222222');
+ // cartItem = getNowCart(msg.data, cartArr)
+ cartControls([], 'del')
+ }
+ return;
+ }
+ if (msg.data) {
+ cartArr = data.tabbar.reduce((prve, cur) => {
+ prve = [...prve, ...cur.foods]
+ return prve
+ }, [])
+ }
+ switch (msg.operate_type) {
+ case 'pad_init':
+ cars.length = 0
+ if (!data.table.tableCode) {
+ data.table.tableCode = msg.table_code
+ uni.setStorageSync("msg_id", msg.msg_id)
+ // uni.setStorageSync("table_code", msg.table_code)
+ }
+ msg.data.map(item => {
+ cartItem = getNowCart(item, cartArr)
+ if (cartItem.isGrounding || cartItem.is_temporary == 1) {
+ cartControls(cartItem, 'add')
+ } else {
+ delCart(cartItem.id)
+ }
+ })
+ getHistoryOrderDetail()
+ uni.hideLoading()
+ break;
+ case 'pad_add':
+ case 'add':
+ cartItem = getNowCart(msg.data, cartArr)
+ cartControls(cartItem, 'add')
+ // infoBox.showToast('操作成功')
+ break;
+ case 'pad_edit':
+ case 'edit':
+ cartItem = getNowCart(msg.data, cartArr)
+ cartControls(cartItem, 'edit')
+ // infoBox.showToast('操作成功')
+ break;
+ case 'pad_del':
+ case 'del':
+ cartItem = getNowCart(msg.data, cartArr)
+ cartControls(cartItem, 'del')
+ break;
+ case 'pad_cleanup':
+ case 'cleanup':
+ cars.length = 0
+ for (let i in data.tabbar) {
+ for (let k in data.tabbar[i].foods) {
+ data.tabbar[i].foods[k].chooseNumber = 0
+ }
+ }
+ getHistoryOrderDetail()
+ break;
+ case 'init':
+ case 'rottable':
+ if (data.table.tableCode == msg.table_code) {
+ initCart()
+ } else {
+ data.table.tableCode = msg.table_code
+ let resData = await $returnTableDetail({
+ tableCode: msg.table_code
+ })
+ data.table = resData
+ initCart()
+ }
+ break;
+ case 'product_update':
+ init()
+ break;
+ case 'clearOrder':
+ getHistoryOrderDetail()
+ break;
+ }
+
+ });
+ }
+ /**
+ * 删除购物车菜品
+ */
+ function delCart(id) {
+ let params = {
+ ...data.socketData,
+ id: id,
+ operate_type: 'del',
+ table_code: data.table.tableCode,
+ }
+ console.log('购物车删除菜品参数===', params)
+ websocketUtil.send(JSON.stringify(params))
+ }
+
+ /**
+ * 获取订单详情
+ */
+ async function getHistoryOrderDetail() {
+ data.historyOrder = [];
+ let res = await getHistoryOrder({
+ tableCode: data.table.tableCode
+ });
+ data.orderInfo = res.data;
+ if (res.data) {
+ data.historyOrder = Object.entries(data.orderInfo.detailMap).map(([key, value]) => ({
+ info: value,
+ placeNum: key
+ }))
+ }
+ }
+
+
+ /**
+ * 初始化购物车
+ */
+ function initCart() {
+ let params = {
+ ...data.socketData,
+ operate_type: 'init',
+ table_code: data.table.tableCode || '',
+ }
+ // console.log("购物车初始化参数===", params)
+ websocketUtil.send(JSON.stringify(params))
+ }
+
+ /**
+ * 监听socket是否连接正常
+ */
+ function watchSocketOpen() {
+ uni.$off('is-socket-open')
+ uni.$on('is-socket-open', (res) => {
+ console.log(res, 'wx断开后,执行的方法');
+ lvhong.value = res
+ if (res) {
+ data.isGoodsAdd = true;
+ initCart()
+ } else {
+ uni.showLoading({
+ title: '购物车加载中',
+ mask: true
+ });
+ data.isGoodsAdd = false;
+ }
+ })
+ }
+
+ /**
+ * socket通知购物车商品数量修改处理
+ */
+ function cartControls(cartItem, type) {
+ if (!data.table.tableCode) {
+ data.table.tableCode = cartItem.table_code
+ }
+ data.isGoodsAdd = true;
+ let cartIndex = 0;
+ let product_id = cartItem.product_id
+ // console.log(cars, 'cars值,看id是否与cartItem匹配')
+ cars.map((item, index) => {
+ if (item.id == cartItem.id) {
+ cartIndex = index;
+ product_id = item.product_id
+ // sku_id = item.sku_id
+ }
+ })
+ let $goods;
+ console.log('del', layoutData.list);
+ console.log(cartItem, 'cartItemid');
+ console.log(product_id, 'product_id');
+ layoutData.list.forEach(ele => {
+ ele.productList.forEach(res => {
+ if (res.id == product_id) {
+ $goods = res
+ }
+ })
+ })
+
+ if (type == 'del') {
+ console.log('del', $goods);
+ cars.splice(cartIndex, 1)
+ if ($goods) $goods.chooseNumber = 0;
+ return;
+ }
+ if (type == 'add') {
+ cars.push(cartItem)
+ if ($goods) $goods.chooseNumber = cartItem.number
+ }
+ if (type == 'edit') {
+ editItem.value = $goods
+ cars[cartIndex].number = cartItem.number
+ if ($goods) {
+ $goods.chooseNumber = cartItem.number
+ }
+ }
+ }
function changePop(key, show = true, data) {
popup[key] = show
- console.log(data);
popup.data = data
if (!show) {
data[key] = ''
@@ -341,6 +640,14 @@
modal.login = true
}
+ function loginShowOut() {
+ uni.clearStorage()
+ // go.to('PAGES_LOGIN')
+ uni.redirectTo({
+ url: '/pages/login/index'
+ })
+ }
+
function loginSuccess() {
data.noLogin = false
modal.login = false
@@ -351,69 +658,6 @@
// modal.login = true
go.to('PAGES_LOGIN')
}
- let instance = ref();
- instance.value = getCurrentInstance()
- //临时菜
- const lingshi = reactive({
- show: false
- })
- //附加费
- const extraFee = reactive({
- show: false
- })
-
-
- const cars = reactive([])
- const layout = reactive({
- listMap: {
- default: {
- size: 4
- },
- bigOne: {
- size: 1
- }
- },
- sel: 'default'
- })
- const data = reactive({
- loading: true,
- noLogin: true,
- scrollTop: 0, //tab标题的滚动条位置
- oldScrollTop: 0,
- current: 0, // 预设当前项的值
- menuHeight: 0, // 左边菜单的高度
- menuItemHeight: 0, // 左边菜单item的高度
- itemId: '', // 栏目右边scroll-view用于滚动的id
- tabbar: [],
- allGoods: [],
- selCategotyGoods: [],
- menuItemPos: [],
- arr: [],
- scrollRightTop: 0, // 右边栏目scroll-view的滚动条高度
- timer: null, // 定时器
- topZhanwei: 136 + 24,
- // 选择用户
- vipUser: {
- id: "",
- },
- //餐桌号
- masterId: "",
- table: {
- tableId: ""
- },
-
- })
-
- // 获取账号信息
- let $shop = ref({})
- async function getTbShopInfo() {
- const res = await tbShopInfo()
- $shop.value = res
- const useType = data.table.status == 'using' ? data.table.useType : $returnUseType(res)
- uni.setStorageSync('useType', useType)
- console.log(res);
- return res
- }
function scanCode() {
@@ -429,7 +673,7 @@
}
- function setTabBar(category, goods, cars) {
+ function setTabBar(category, goods, carsC) {
const goodsCategoryMap = goods.reduce((prve, cur) => {
if (!prve.hasOwnProperty(cur.categoryId)) {
prve[cur.categoryId] = []
@@ -437,7 +681,7 @@
prve[cur.categoryId].push(cur)
return prve
}, {})
- const chooseGoodsNumberMap = cars.reduce((prve, cur) => {
+ const chooseGoodsNumberMap = carsC.reduce((prve, cur) => {
if (!prve.hasOwnProperty(cur.productId)) {
prve[cur.productId] = 0
}
@@ -477,12 +721,13 @@
prve.push(cur.foods)
return prve
}, [])
+ // storageManage.cacheGoods(data.tabbar)
}
//request类
//获取分类
function getCategory(par = {
- page: 0,
+ page: 1,
size: 300
}) {
return $tbShopCategory(par)
@@ -494,20 +739,31 @@
}) {
return Api.getGoodsLists(par)
}
- //获取购物车数据
- async function getCart(par = {
- page: 0,
- size: 300,
- masterId: data.masterId,
- tableId: data.table.tableId
- }) {
- const res = await Api.getCart(par)
- const cartArr = getNowCart(res.records)
- cars.length = cartArr.length
- for (let i in cartArr) {
- cars[i] = cartArr[i]
+
+
+ function objectToString(obj) {
+ let result = '';
+ for (const key in obj) {
+ if (obj.hasOwnProperty(key)) {
+ result += `${key}=${obj[key]}&`;
+ }
}
- return res
+ // 去掉最后一个多余的 &
+ return result.slice(0, -1);
+ }
+
+
+ //获取购物车数据
+ async function getCart() {
+ let par = {
+ type: 'pad',
+ account: uni.getStorageSync("shopInfo").id,
+ operate_type: 'init',
+ table_code: uni.getStorageSync("wxInit").table_code || '',
+ shop_id: uni.getStorageSync("shopInfo").id,
+ }
+ websocketUtil.send(JSON.stringify(par))
+
}
//获取取餐码
async function getMasterId() {
@@ -518,30 +774,7 @@
return res
}
- //清空购物车
- function clearCart() {
- return Api.$clearCart({
- masterId: data.masterId,
- tableId: data.table.tableId
- })
- }
- //加入购物车
- function addCart(par) {
- // if (!data.table.tableId) {
- // return infoBox.showToast('请先选择桌台!')
- // }
- const submitPar = {
- masterId: data.masterId,
- tableId: data.table.tableId,
- isPack: false,
- num: 1,
- productId: '',
- skuId: '',
- vipUserId: data.vipUser.id
- }
- Object.assign(submitPar, par)
- return Api.addCart(submitPar)
- }
+
//更新购物车
function updateCartGoods(par) {
const submitPar = {
@@ -579,10 +812,48 @@
return Api.$setUser(submitPar)
}
-
+ /**
+ * 清除购物车
+ */
+ async function cleaCart(e) {
+ if (e == 'cart') {
+ let params = {
+ ...data.socketData,
+ operate_type: 'cleanup',
+ table_code: data.table.tableCode,
+ }
+ console.log('购物车清空菜品参数===', params)
+ websocketUtil.send(JSON.stringify(params))
+ } else if (e == 'allHistoryOrder') {
+ await cancelOrder({
+ orderId: data.orderInfo.id,
+ shopId: uni.getStorageSync("shopId")
+ })
+ let params = {
+ ...data.socketData,
+ operate_type: 'cleanup',
+ table_code: data.table.tableCode,
+ }
+ websocketUtil.send(JSON.stringify(params))
+ initCart()
+ } else {
+ // await rmPlaceOrder({
+ // orderId: data.orderInfo.id||'',
+ // placeNum: e||'',
+ // shopId: uni.getStorageSync("shopId")
+ // })
+ let params = {
+ ...data.socketData,
+ operate_type: 'cleanup',
+ table_code: data.table.tableCode,
+ }
+ websocketUtil.send(JSON.stringify(params))
+ initCart()
+ }
+ onClearCart()
+ }
//点击清空购物车
async function onClearCart() {
- await clearCart()
cars.length = 0
for (let i in layoutData.list) {
for (let k in layoutData.list[i].productList) {
@@ -591,26 +862,10 @@
}
}
- //获取桌台信息
- async function getTableInfo() {
- if (data.table.tableId) {
- const res = await $table.get({
- qrcode: data.table.tableId
- })
- console.log(res);
- if (res && res.content[0]) {
- data.table = {
- ...res.content[0],
- ...data.table
- }
- }
- }
- }
let $originGoods = []
let $category = []
const layoutData = reactive({
category: {
- // list: uni.getStorageSync('category')||[] ,
list: [],
sel: 0,
selData: {
@@ -620,7 +875,6 @@
},
current: 0,
nowData: {},
- // list: uni.getStorageSync('layoutDataList')||[] ,
list: [],
prvePage: {
padLayoutCode: '',
@@ -666,9 +920,13 @@
try {
const res2 = await $productCategory(pageData.id)
layoutData.list[layoutData.current + i * fuhao] = {
- ...res2,
- productList: res2.productList.map(v => {
- const findGoodsInCar = cars.find(cars => cars.productId == v.id)
+ ...res2.data,
+ padLayoutCode: res2.data.padLayoutCode ? res2.data.padLayoutCode : (res2.data
+ .productList.length <= 4 ? layoutArr[res2.data.productList.length] : '6-grid'),
+ productList: res2.data.productList.map(v => {
+ const findGoodsInCar = cars.find(cars => {
+ return cars.productId == v.id
+ })
if (findGoodsInCar) {
return {
...v,
@@ -690,7 +948,6 @@
}
}
}
- // uni.setStorageSync('layoutDataList',layoutData.list)
}
async function getLayoutGoodsInit(max = 6, isGetPrve = false) {
await getGoodsData(max, isGetPrve)
@@ -705,7 +962,8 @@
async function animationfinish(e) {
if (isScrollChangeCategorySel) {
layoutData.current = e.detail.current
- const categoryId = layoutData.list[layoutData.current].productCategoryId
+ const categoryId = layoutData.list[layoutData.current].productCategoryId ? layoutData.list[layoutData
+ .current].productCategoryId : layoutData.list[layoutData.current].productList[0].categoryId
const index = layoutData.category.list.findIndex(v => v.id == categoryId)
isScrollChangeCategorySel = true
layoutData.category.sel = index
@@ -714,81 +972,97 @@
isScrollChangeCategorySel = false
isTapChangeCategorySel = false
}
+ /**
+ * 添加套餐
+ * @param {Object} d
+ * @param {Object} item
+ */
+ async function taocanConfirm(d, item) {
+ editCart({
+ number: item.skuList[0].suitNum,
+ product_id: item.id,
+ product_type: item.type,
+ sku_id: item.skuList[0].id,
+ pro_group_info: JSON.stringify(d),
+ is_temporary: 0, //是否是临时菜
+ }, 'add')
+ data.isGoodsAdd = false;
+ }
// 获取标题区域宽度,和每个子元素节点的宽度以及元素距离左边栏的距离
async function init() {
- try {
- if (layoutData.list.length) {
- data.loading = false
- data.noLogin = false
- }
- if (option.type == 'add') {
- data.masterId = option.masterId
- } else {
- await getMasterId()
- }
- const shopInfo = await tbShopInfo()
- $shop.value = shopInfo
- data.noLogin = false
- xiadanClick()
- const useType = data.table.status == 'using' ? data.table.useType : $returnUseType(shopInfo)
- uni.setStorageSync('useType', useType)
- await getTableInfo()
- const categoryRes = await getCategory()
- // const category = categoryRes.content.reduce((prve, cur) => {
- // prve.push({
- // ...cur,
- // childrenList: null
- // });
- // return [...prve, ...cur.childrenList];
- // }, []);
- const category = categoryRes.content
- let arr = []
- for (let i = 0; i < category.length; i++) {
- const res = await $layoutpage({
- page: 1,
- size: 999,
- productCategoryId: category[i].id,
- padLayoutId: ''
- })
- res.content = res.content.map(v => {
- return {
- ...v,
- hasAjax: false
- }
- })
- const content = res.content.length > 0 ? res.content : [{
- productCategoryId: category[i].id,
- padLayoutCode: "single",
- productList: []
- }];
- category[i].startIndex = arr.length
- arr.push(...content)
- category[i].endIndex = arr.length + content.length - 2
- }
- // uni.setStorageSync('category',category)
- layoutData.category.list = category
- layoutData.list = arr
- data.loading = false
- nextTick(() => {
- categoryEleInit()
- })
- getLayoutGoodsInit(2)
- getCart()
-
- } catch (e) {
- console.log('------err-------');
- console.log(e);
- data.noLogin = true
- // modal.login = true
- //TODO handle the exception
+ if (option.type == 'add') {
+ setTabBar($category, $originGoods, [])
}
+ // shopInfo.value = uni.getStorageSync('shopInfo').data
+ let shopInfo = await getShopInfo({
+ id: uni.getStorageSync('shopInfo').id
+ })
+ uni.setStorageSync("shopInfo", shopInfo)
+ // 获取布局
+ // const getLayoutData = await getLayout({})
+ // 获取分类数据-获取商品分类
+ const categoryRes = await getCategory()
+ $category = categoryRes.data
+
+ let arr = []
+ for (let i = 0; i < $category.length; i++) {
+ const res = await $layoutpage({
+ page: 1,
+ size: 999,
+ productCategoryId: $category[i].id,
+ padLayoutId: ''
+ })
+ // res.data.records = res.data.records.map(v => {
+ // return {
+ // ...v,
+ // hasAjax: false
+ // }
+ // })
+ const content = res.data.records.length > 0 ? res.data.records : [{
+ productCategoryId: $category[i].id,
+ padLayoutCode: "single",
+ productList: []
+ }];
+ // const content = res.data.records.length > 0 ? res.data.records : [{
+ // productCategoryId: $category[i].id,
+ // padLayoutCode: "single",
+ // productList: []
+ // }];
+ $category[i].startIndex = arr.length
+ for (let i of content) {
+ arr.push(i)
+ }
+
+ $category[i].endIndex = arr.length + content.length - 2
+ }
+ layoutData.category.list = $category
+ layoutData.list = arr
+ nextTick(() => {
+ categoryEleInit()
+ })
+ getLayoutGoodsInit()
+ // 获取商品数据
+ const {
+ data: goodsRes
+ } = await getGoods()
+ const goods = goodsRes.filter((v) => {
+ let isShow = true;
+ if (v.type != "sku") {
+ isShow = v.skuList.length >= 1;
+ }
+ return isShow;
+ });
+ $originGoods = goods;
+ if (option.type == 'add') {
+ cars.length = 0
+ initCart()
+ setTabBar($category, goods, [])
+ return
+ }
+ setTabBar($category, goods, cars)
+ initCart()
}
- const tabsEle = reactive({
- scrollWidth: 0,
- tabsItems: [],
- scrollLeft: 0
- })
function categoryEleInit() {
getElRect('content-scroll', instance.value, {
@@ -808,9 +1082,6 @@
}
}
// 监听选择用户事件
-
-
-
const surcharge = ref(null)
function surchargeConfirm(e) {
@@ -839,13 +1110,7 @@
function formatSearchGoods(arr) {
const len = arr.length;
- const layoutArr = {
- "1": 'single',
- "2": 'double',
- "3": 'L1-R2',
- "4": '4-gird',
- "6": '6-grid',
- }
+
const result = chunkArray(arr, 6)
console.log(result);
return result.map(v => {
@@ -870,7 +1135,6 @@
})
}
}
- console.log(goods);
if (newval == "") {
arr = formatSearchGoods(goods);
} else {
@@ -884,7 +1148,6 @@
}
function search(e) {
- console.log(e);
searchValue.value = e
console.log(searchResult.value);
if (searchValue.value === '') {
@@ -904,6 +1167,10 @@
}
function chooseTable() {
+ // changeCategorySel(1)
+ // setTimeout(() => {
+ // changeCategorySel(0)
+ // }, 500)
go.to('PAGES_CHOOSE_TABLE', {
...data.table
})
@@ -931,6 +1198,7 @@
data.table = {
tableId: ""
}
+ uni.removeStorageSync('table_code')
}
function setModalShow(key = 'show', show = true, data) {
@@ -938,32 +1206,78 @@
modal[key] = show
modal.data = data
}
-
+ // 选择桌台完成
function watchChooseTable() {
uni.$off('choose-table')
uni.$on('choose-table', async (item) => {
- if (data.table.tableId || cars.length <= 0) {
- data.table = item
- return;
- }
- if (item.status != "idle") {
- return infoBox.showToast('该台桌已在使用中')
- }
- const res = await $returnTableDetail({
- tableId: item.tableId,
- });
- if (res.cartCount > 0) {
- setModalShow('clear', true, item)
- } else {
- await $choseTable({
- masterId: data.masterId,
- tableId: item.tableId,
- isClear: false
- });
- data.table = item
- }
+ onChooseTable(item)
+ // if (data.table.tableId || cars.length <= 0) {
+ // data.table = item
+ // return;
+ // }
+ // if (item.status != "idle") {
+ // return infoBox.showToast('该台桌已在使用中')
+ // }
+ // const res = await $returnTableDetail({
+ // tableId: item.tableId,
+ // });
+ // if (res.cartCount > 0) {
+ // setModalShow('clear', true, item)
+ // } else {
+ // await $choseTable({
+ // masterId: data.masterId,
+ // tableId: item.tableId,
+ // isClear: false
+ // });
+ // data.table = item
+ // }
})
}
+ /**
+ * 选择桌台完成
+ */
+ async function onChooseTable(item) {
+ if (!item) {
+ infoBox.showToast('桌台不存在或不是该店铺的桌台')
+ return
+ }
+ console.log('---table:detail-----', item);
+ console.log('---table_code-----', data.table.tableCode);
+ console.log('---new_table_code-----', item.tableCode);
+ let params = {
+ ...data.socketData,
+ operate_type: 'rottable',
+ table_code: data.table.tableCode,
+ // new_table_code: item.tableCode,
+ }
+ data.table = item
+ // uni.setStorageSync('tableCode', item.tableCode)
+ // websocketUtil.send(JSON.stringify(params))
+ initCart()
+ // return
+ // if (cars.length <= 0) {
+ // data.table = {
+ // ...item
+ // }
+ // if (cars.length > 0) {
+ // websocketUtil.send(JSON.stringify(params))
+ // } else {
+ // initCart()
+ // }
+ // return;
+ // }
+
+ // if (item.status == "unbind") {
+ // return infoBox.showToast('该台桌未绑定,清先去桌台管理里绑定码牌')
+ // }
+ // if (item.status != "idle") {
+ // return infoBox.showToast('该台桌已在使用中')
+ // }
+ // data.table = item
+ // if (cars.length > 0) {
+ // websocketUtil.send(JSON.stringify(params))
+ // }
+ }
function toLinshi() {
go.to('PAGES_ADD_TEMP_CUISINE')
@@ -982,28 +1296,38 @@
// 返回当前选中商品skuList
function returnSelGoodsSkuList(skuList, specSnap) {
- const specSnapArr = specSnap ? specSnap.split(",") : [];
- const result = skuList.map((v, index) => {
- const values = v.value.split(",");
- return {
- ...v,
- valueArr: values,
- sel: specSnap ? specSnapArr[index] : "",
- values: values.map((name) => {
- return {
- name,
- disabled: false
- };
- }),
- };
- });
+ // const specSnapArr = specSnap ? specSnap.split(",") : [];
+ let result = []
+ for (let v in skuList) {
+ let obj = {
+ name: v,
+ sel: skuList[v][0],
+ value: skuList[v].join(','),
+ valueArr: skuList[v],
+ values: valuesfilter(skuList[v])
+ }
+ result.push(obj)
+ }
+
return result
}
+ // 添加baluearr
+ function valuesfilter(d) {
+ let arr = []
+ d.forEach(ele => {
+ let obj = {
+ name: ele,
+ disabled: false
+ }
+ arr.push(obj)
+ })
+ return arr
+ }
//返回当前选中商品skuMap
function returnSelGoodsSkuMap(specList) {
const skuMap = {}
for (let i in specList) {
- skuMap[specList[i].specSnap] = specList[i];
+ skuMap[specList[i].specInfo] = specList[i];
}
return skuMap
}
@@ -1019,13 +1343,13 @@
const canBudyGoods = specList
.filter((v) => util.isCanBuy(v))
.sort((a, b) => {
- const aNumber = a.specSnap.split(",").reduce((prve, cur) => {
- return prve + skuMapNumber[cur];
- }, 0);
- const bNumber = b.specSnap.split(",").reduce((prve, cur) => {
- return prve + skuMapNumber[cur];
- }, 0);
- return aNumber - bNumber;
+ // const aNumber = a.specSnap.split(",").reduce((prve, cur) => {
+ // return prve + skuMapNumber[cur];
+ // }, 0);
+ // const bNumber = b.specSnap.split(",").reduce((prve, cur) => {
+ // return prve + skuMapNumber[cur];
+ // }, 0);
+ // return aNumber - bNumber;
});
return canBudyGoods[0];
}
@@ -1036,17 +1360,15 @@
guigeModelData.chooseGoods.skus = skuList
guigeModelData.chooseGoods.skuMap = skuMap
const skuGoods = findGoods(skuList, skuMap, specList);
- console.log(skuList, skuMap);
- console.log(skuGoods);
if (skuGoods) {
// this.skuGoods.data = skuGoods;
// this.skuGoods.number = skuGoods.suit || 1;
- skuGoods.specSnap.split(",").map((v, index) => {
- guigeModelData.chooseGoods.skus[index].sel = v;
- });
+ // skuGoods.specSnap.split(",").map((v, index) => {
+ // guigeModelData.chooseGoods.skus[index].sel = v;
+ // });
}
console.log(guigeModelData.chooseGoods.skus);
- setTagDisabled();
+ // setTagDisabled();
}
//更新选中规格
@@ -1124,122 +1446,138 @@
let selGoods = ref({})
+ const taocanModelRef = ref()
function chooseGuige(foodsindex, index) {
const $goods = layoutData.list[foodsindex].productList[index]
- console.log($goods);
selGoods.value = $goods
- guigeModelData.title = $goods.name
- const specList = $goods.specList;
- const tagSnap = JSON.parse($goods.skuResult.tagSnap)
- const skuMap = returnSelGoodsSkuMap(specList)
- const skuList = returnSelGoodsSkuList(tagSnap)
- setSkugoodsDefaultInit($goods, skuList, skuMap, specList)
- chooseGuigeModel.value.open()
+ if ($goods.groupType == 1) {
+ data.goodsData = $goods
+ taocanModelRef.value.open()
+ } else {
+ guigeModelData.title = $goods.name
+ const tagSnap = JSON.parse($goods.selectSpecInfo)
+ const skuMap = returnSelGoodsSkuMap($goods.skuList)
+ // 多规格,和套餐规格区分.groupType=1 套餐多规格
+ const selectSpecInfo = returnSelGoodsSkuList(tagSnap)
+ setSkugoodsDefaultInit($goods, selectSpecInfo, skuMap, $goods.skuList)
+ chooseGuigeModel.value.open()
+ }
+
}
- async function guigeConfirm(sku, num) {
- const goods = guigeModelData.chooseGoods.item
- const skuId = sku.id
- const productId = goods.id
- const res = findGoodsInCar(goods, skuId)
+ async function guigeConfirm(sku, suitNum) {
+ if (!data.isGoodsAdd) {
+ return;
+ }
+ let goods = guigeModelData.chooseGoods.item
+ let sku_id = sku.id
+ let product_id = goods.id
+ let product_type = goods.type
+ let res = findGoodsInCar(goods, sku_id)
if (res) {
//更新
- const {
+ let {
index
} = res
- const carGoods = cars[index]
- const cartId = carGoods.id
- const newNumber = carGoods.number * 1 + num
- const {
- number
- } = await updateCartGoods({
- num: newNumber,
- cartId,
- productId,
- skuId
- })
- carGoods.number = number
+ let carGoods = cars[index]
+ let cartId = carGoods.id
+ let newNumber = carGoods.number * 1 + suitNum
+ let suitNum = goods.skuList[0].suitNum || 1
+ editCart({
+ suitNum,
+ id: cartId,
+ number: newNumber,
+ product_id: product_id,
+ sku_id: sku_id,
+ is_temporary: carGoods.is_temporary, //是否是临时菜
+ }, 'edit')
+ data.isGoodsAdd = false;
} else {
//添加
- const cartGoods = await addCart({
- num,
- productId,
- skuId
- })
- infoBox.showToast('添加成功')
- cars.push({
- ...cartGoods,
- specSnap: sku.specSnap
- })
+ editCart({
+ number: suitNum,
+ product_id: product_id,
+ product_type: product_type,
+ sku_id: sku_id,
+ is_temporary: 0, //是否是临时菜
+ }, 'add')
+ data.isGoodsAdd = false;
}
}
-
+ /**
+ * 购物车添加菜品
+ */
+ function editCart(par, operate_type) {
+ if (!data.isGoodsAdd) {
+ return;
+ }
+ let params = {
+ ...data.socketData,
+ operate_type: operate_type,
+ table_code: data.table.tableCode,
+ product_id: '',
+ is_print: 1,
+ sku_id: '', //
+ number: 1, //数量
+ }
+ Object.assign(params, par)
+ console.log('购物车添加菜品参数===', params)
+ websocketUtil.send(JSON.stringify(params))
+ data.isGoodsAdd = false;
+ }
const $cacheGoods = {}
//购物车商品数量改变
async function carsNumberChange(e) {
- const {
- num,
- index,
- goods
- } = e
- const {
- productId,
- categoryId,
- skuId
- } = goods
- const cartId = goods.id
- const findCategory = layoutData.category.list.find(v => v.id == categoryId)
- console.log(findCategory);
- console.log(layoutData.list);
- let findGoods = []
- for (let j = findCategory.startIndex; j < findCategory.endIndex; j++) {
- const goodsArr = layoutData.list[j].productList || []
- console.log(goodsArr);
- for (let k = 0; k < goodsArr.length; k++) {
- const $goods = goodsArr[k]
- console.log($goods);
- if ($goods.id == productId) {
- findGoods.push($goods)
- }
- }
+ if (!data.isGoodsAdd) {
+ return;
}
- if (findGoods.length <= 0) {
- //有缓存读缓存无缓存请求接口
- if ($cacheGoods[productId]) {
- findGoods[0] = $cacheGoods[productId]
- } else {
- const goodsres = await $getProductDetail(productId)
- findGoods[0] = {
- ...goodsres,
- specList: goodsres.skuList
- }
- $cacheGoods[productId] = findGoods[0]
- }
+ let $sku;
+ let $goods;
+ let params = {
+ number: e.num,
+ id: e.goods.id,
+ product_id: e.goods.product_id,
+ sku_id: e.goods.sku_id,
+ is_temporary: e.goods.is_temporary
}
- const $sku = findGoods[0].specList.find(v => v.id == skuId)
- if (num === 0 || num < $sku.suit) {
- //移除
- await removeCartGoods({
- cartId
+ if (e.goods.is_temporary != 1) {
+ data.tabbar.map(tabbarItem => {
+ if (tabbarItem.foods.find(v => v.id == e.goods.product_id)) {
+ $goods = !e.goods.product_id ? undefined : tabbarItem.foods.find(v => v.id == e.goods
+ .product_id)
+ }
})
- cars.splice(index, 1)
- for (let n in findGoods) {
- findGoods[n].chooseNumber = 0;
+ if ($goods.type != 'package') {
+ //临时菜没有skuList
+ $sku = !e.goods.product_id ? {
+ suitNum: 1
+ } : $goods.skuList.find(v => v.productId == e.goods.product_id)
+ } else {
+ $sku = !e.goods.product_id ? {
+ suitNum: 1
+ } : $goods.skuList.find(v => v.productId == e.goods.product_id)
}
- return
- }
- await updateCartGoods({
- num,
- cartId,
- productId,
- skuId
- })
- cars[index].number = num
- for (let n in findGoods) {
- findGoods[n].chooseNumber = num;
+ if (e.num === 0 || e.num < $sku.suitNum) {
+ //移除
+ delCart(e.goods.id)
+ return
+ }
+ } else {
+ if (e.num === 0) {
+ //移除
+ console.log(e.goods, '溢出购物车')
+ delCart(e.goods.id)
+ return
+ }
+ params.product_name = e.goods.name
+ params.sku_name = e.goods.sku_name
}
+ let suitNum = $goods.skuList[0].suitNum || 1
+ params.suitNum = suitNum
+ editCart(params, 'edit')
+ data.isGoodsAdd = false;
}
// 找到该规格商品在购物车中是否存在并返回index值以及对应的数据
@@ -1266,60 +1604,88 @@
searchResult.value[index].chooseNumber = chooseNumber
}
}
- async function goodsUpdate(foodsindex, index, isAdd, searchGoodsIndex) {
- console.log(foodsindex, index, isAdd, searchGoodsIndex);
- const $goods = layoutData.list[foodsindex].productList[index]
- console.log($goods);
- console.log($goods.typeEnum);
- if ($goods.typeEnum != 'sku') {
- //单规格
- const goodsInCarIndex = cars.findIndex((carsGoods) => {
- return carsGoods.skuId == $goods.specList[0].id && carsGoods.productId == $goods.id;
- });
- const productId = $goods.id
- const skuId = $goods.specList[0].id
- const suit = $goods.specList[0].suit || 1
- if (goodsInCarIndex !== -1) {
- //更新
- const carGoods = cars[goodsInCarIndex]
- const cartId = carGoods.id
- const step = isAdd ? 1 : -1
- const num = carGoods.number * 1 + step
- if (num === 0 || num < suit) {
- //移除
- cars.splice(goodsInCarIndex, 1)
- $goods.chooseNumber = 0
- setSearchGoods(searchGoodsIndex, 0)
- return await removeCartGoods({
- cartId
- })
- }
- const {
- number
- } = await updateCartGoods({
- num,
- cartId,
- productId,
- skuId
- })
- carGoods.number = number
- $goods.chooseNumber = number
- setSearchGoods(searchGoodsIndex, number)
- } else {
- //增加
- const num = suit
- const cartGoods = await addCart({
- num,
- productId,
- skuId
- })
- infoBox.showToast('添加成功')
- $goods.chooseNumber = num
- cars.push(cartGoods)
- }
- return
+ async function goodsUpdate(foodsindex, index, isAdd, searchGoodsIndex, showCurrentInput) {
+ console.log(foodsindex, index, isAdd, searchGoodsIndex, '11111');
+ if (!data.isGoodsAdd) {
+ return;
}
+ const $goods = layoutData.list[foodsindex].productList[index]
+ if ($goods.type != 'sku') {
+ const step = isAdd ? 1 : -1
+ //增加
+ let isShop = cars.find(ele => ele.product_id == $goods.id)
+ if (isShop) {
+ let {
+ sku_id,
+ product_id,
+ id,
+ number,
+ discount_sale_amount
+ } = isShop
+ // 数量加减
+ let num = number + step
+ if (num == 0) {
+ let params = {
+ ...data.socketData,
+ id: id,
+ table_code: uni.getStorageSync("wxInit").table_code || '',
+ operate_type: 'del'
+ }
+ websocketUtil.send(JSON.stringify(params))
+ $goods.chooseNumber = num
+ } else {
+ let suitNum = $goods.skuList[0].suitNum || 1
+ if (showCurrentInput) {
+ //单规格
+ let goodsInCarIndex = cars.findIndex((carsGoods) => {
+ return carsGoods.product_id == $goods.skuList[0].productId
+ });
+ let cartItem = cars[goodsInCarIndex]
+ num = (cartItem.number * 1) + Number(showCurrentInput)
+ }
+ websocketUtil.send(JSON.stringify({
+ ...data.socketData,
+ discount_sale_amount,
+ suitNum: suitNum,
+ number: num,
+ id,
+ product_id,
+ sku_id: id,
+ table_code: uni.getStorageSync('wxInit').table_code,
+ sku_name: "", // 临时菜规格
+ operate_type: 'edit',
+ pack_number: 0, //数量
+ is_temporary: 0, //是否是临时菜
+ }))
+ // $goods.chooseNumber = 1
+ $goods.chooseNumber = num
+ }
+ } else {
+ // 起售数量
+ let suitNum = $goods.skuList[0].suitNum || 1
+ console.log(suitNum, '起售数量');
+ // showCurrentInput有值是称重
+ let weightNum = suitNum
+ if (showCurrentInput) {
+ weightNum = Number(showCurrentInput)
+ }
+ let params = {
+ ...data.socketData,
+ table_code: data.table.tableCode,
+ operate_type: 'add',
+ product_id: $goods.id,
+ sku_id: $goods.skuList[0].id,
+ sku_name: "", // 临时菜规格
+ number: weightNum,
+ discount_sale_amount: $goods.lowPrice,
+ pack_number: 0, //数量
+ is_temporary: 0, //是否是临时菜
+ }
+ websocketUtil.send(JSON.stringify(params))
+ // $goods.chooseNumber = 1
+ }
+ }
}
let isTabClickOver = true
@@ -1331,7 +1697,6 @@
function watchChooseuser() {
uni.$off('choose-user')
uni.$on('choose-user', (user) => {
- console.log(user);
data.vipUser = user ? user : {
id: ''
}
@@ -1339,7 +1704,7 @@
})
}
watch(() => data.table.tableId, (newval, oldval) => {
- onSelTable()
+ // onSelTable()
})
watch(() => layoutData.category.sel, (newval, oldval) => {
setTabsCurrentPosition()
@@ -1359,7 +1724,7 @@
data.masterId = masterId
const cartRes = await getCart()
cars.length = 0
- const cartArr = getNowCart(cartRes.records)
+ const cartArr = getNowCart(cartRes.data)
for (let i in cartArr) {
cars.push(cartArr[i])
}
@@ -1375,42 +1740,57 @@
// tableId: ""
// }
cars.length = 0
- console.log('update:createOrderIndex');
init()
})
- uni.$on('get:table', () => {
- console.log('get:table');
- if (data.table.tableId) {
- $table.get({
- qrcode: data.table.tableId
- }).then(res => {
- if (res.content[0] && res.content[0].status != 'idle') {
- data.table = {
- tableId: ''
- }
- }
- })
- }
+ // 添加临时菜到购物车
+ uni.$on('add:cashCai', async (data) => {
+ $originGoods.push(data)
+ data.isGoodsAdd = false;
})
+
}
onShow(() => {
- // watchChooseuser()
- watchChooseTable()
- watchUpdate()
+ let shopif = uni.getStorageSync('shopInfo')
+ if (shopif) {
+ if (shopif.code) {
+ data.userInfo = shopif.data
+ } else {
+ data.userInfo = shopif
+ }
+ }
+ // 判断是否token过期,是否有名字
+ if (!data.userInfo.shopName) {
+ loginShowOut()
+ }
+ nextTick(() => {
+ uni.showLoading({
+ title: '购物车加载中',
+ mask: true
+ });
+ layoutData.current = 0
+ watchChooseTable()
+ watchUpdate()
+ watchSocketOpen()
+ data.isGoodsAdd = true;
+ init()
+ onMessage()
+
+ })
})
let isCreateOrderToDetail = ref(false)
- let option = {
- type: ''
- }
+ // let option = {
+ // type: ''
+ // }
let sysInfo = ref({
windowWidth: 0,
windowHeight: 0
})
onLoad((opt) => {
+
sysInfo.value = uni.getSystemInfoSync()
uni.hideTabBar()
- option = opt
+ // option = opt
Object.assign(data.table, opt)
if (opt.useType) {
uni.setStorageSync('useType', opt.useType)
@@ -1418,13 +1798,8 @@
if (JSON.stringify(opt) == '{}') {
isCreateOrderToDetail.value = true
}
- // if (!opt.tableId) {
- // infoBox.showErrorToast('暂不支持不选择桌台下载,请从桌台点餐')
- // return setTimeout(() => {
- // go.back()
- // }, 1500)
- // }
- init()
+
+ xiadanClick()
})
@@ -1737,4 +2112,19 @@
width: 120rpx;
height: 120rpx;
}
+
+ .lvstyle,
+ .hongstyle {
+ width: 10px;
+ height: 10px;
+ border-radius: 50%;
+ }
+
+ .lvstyle {
+ background-color: green;
+ }
+
+ .hongstyle {
+ background-color: red;
+ }
\ No newline at end of file
diff --git a/pagesCreateOrder/util.js b/pagesCreateOrder/util.js
index d584538..204d86f 100644
--- a/pagesCreateOrder/util.js
+++ b/pagesCreateOrder/util.js
@@ -2,35 +2,77 @@ import {
returnBoolean
} from '@/commons/utils/format.js';
// 返回购物车未下单的数据
-export function getNowCart(records) {
- const nowCart = records.find(v => v.placeNum == 0)
- const Cart = nowCart ? nowCart.info : []
- const goodsMap = {}
+export function getNowCart(carItem,goodsList,user) {
+ // console.log("carItem===",carItem)
+ // console.log("goodsList===",goodsList)
+ // const nowCart = records.find(v => v.placeNum == 0)
const arr = []
- for (let i in Cart) {
- const item=Cart[i]
- const key = item.productId + '_' + item.skuId
- if (goodsMap.hasOwnProperty(key)) {
- const index = goodsMap[key]
- arr[index].number = arr[index].number * 1 + item.number
- arr[index].totalNumber = arr[index].totalNumber * 1 + item.totalNumber
- arr[index].totalAmount = arr[index].totalAmount * 1 + item.totalAmount
- arr[index].packFee = arr[index].packFee * 1 + item.packFee
- } else {
- arr.push({
- ...item,
- isPack: returnBoolean(item.isPack),
- isGift: returnBoolean(item.isGift)
- })
- goodsMap[key] = arr.length - 1;
- }
+ if( carItem.is_temporary != 1 ){
+ carItem.isGrounding = false;
+ goodsList.map(goodsItem => {
+ if(carItem.product_id == goodsItem.id){
+ goodsItem.skuList.map(item=>{
+ if(carItem.product_id == item.productId){
+ carItem.lowPrice = item.salePrice
+ carItem.lowMemberPrice = item.memberPrice
+ carItem.specInfo = item.specInfo
+
+ if( uni.getStorageSync('shopInfo').isMemberPrice && user && user.id && user.isVip ){
+ carItem.salePrice = item.memberPrice
+ } else {
+ carItem.salePrice = item.salePrice
+ }
+
+ }
+ })
+ carItem.name = goodsItem.name
+ carItem.coverImg = goodsItem.coverImg
+ carItem.packFee = goodsItem.packFee
+ carItem.type = goodsItem.type
+ carItem.isGrounding = true;
+ }
+ carItem.number = parseFloat(carItem.number)
+ })
+ } else {
+ // 临时菜
+ console.log(carItem,'salePrice1111111111')
+ carItem.number = parseFloat(carItem.number)
+ carItem.name = carItem.product_name
+ carItem.lowPrice = carItem.discount_sale_amount
+ carItem.discount_sale_amount = 0
}
- // const result = Cart.map(item => {
- // return {
- // ...item,
- // isPack: returnBoolean(item.isPack),
- // isGift: returnBoolean(item.isGift)
- // }
- // })
- return arr
-}
\ No newline at end of file
+
+ return carItem
+}
+// export function getNowCart(records) {
+// const nowCart = records.find(v => v.placeNum == 0)
+// const Cart = nowCart ? nowCart.info : []
+// const goodsMap = {}
+// const arr = []
+// for (let i in Cart) {
+// const item=Cart[i]
+// const key = item.productId + '_' + item.skuId
+// if (goodsMap.hasOwnProperty(key)) {
+// const index = goodsMap[key]
+// arr[index].number = arr[index].number * 1 + item.number
+// arr[index].totalNumber = arr[index].totalNumber * 1 + item.totalNumber
+// arr[index].totalAmount = arr[index].totalAmount * 1 + item.totalAmount
+// arr[index].packFee = arr[index].packFee * 1 + item.packFee
+// } else {
+// arr.push({
+// ...item,
+// isPack: returnBoolean(item.isPack),
+// isGift: returnBoolean(item.isGift)
+// })
+// goodsMap[key] = arr.length - 1;
+// }
+// }
+// // const result = Cart.map(item => {
+// // return {
+// // ...item,
+// // isPack: returnBoolean(item.isPack),
+// // isGift: returnBoolean(item.isGift)
+// // }
+// // })
+// return arr
+// }
\ No newline at end of file
diff --git a/pagesOrder/detail/components/extra.vue b/pagesOrder/detail/components/extra.vue
index fd67051..418e18a 100644
--- a/pagesOrder/detail/components/extra.vue
+++ b/pagesOrder/detail/components/extra.vue
@@ -29,14 +29,7 @@
-
+
@@ -112,7 +105,7 @@
}
function extraCanTuiKuan(orderInfo, data) {
- return orderInfo.status == 'closed' && data.status != 'refund' && data.priceAmount * 1 > 0
+ return orderInfo.status == 'done' && data.status != 'refund' && data.priceAmount * 1 > 0
}
const packeNumbber = computed(() => {
if (!props.orderInfo.detailList) {
diff --git a/pagesOrder/detail/components/list.vue b/pagesOrder/detail/components/list.vue
index 1e18940..7be65fd 100644
--- a/pagesOrder/detail/components/list.vue
+++ b/pagesOrder/detail/components/list.vue
@@ -4,19 +4,29 @@
桌号:
{{orderInfo.tableName||""}}
+
共
{{goodsNumber}}
份菜品
- 第{{ order.placeNum }}次下单
-
+ 第{{ order.placeNum }}次下单
-
+
+
+
+ 临时菜
+
@@ -24,70 +34,77 @@
- {{item.status=='refunding'?'退款中':'已退'}}
+ {{item.status=='part_refund'?'部分已退':'全部已退'}}
{{item.name||item.productName}}
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
- 退款金额:
- {{item.returnAmount}}
+
+
+ 退款金额:
+ {{item.refundNum*item.unitPrice}}
+
+
+ 退菜数量:
+ {{item.returnNum}}
+
+
- {{item.productSkuName||''}}
+ {{item.skuName||''}}
-
- 备注:{{item.note}}
+
+ 备注:{{item.remark}}
-
- ¥0.00
- ¥{{returnTotalMoney(item)}}
-
+
+ ¥{{mathFloorPrice( parseFloat(mathFloorPrice(item.num*item.unitPrice,item)) - (parseFloat(mathFloorPrice(item.returnNum*item.unitPrice,item)) + parseFloat(mathFloorPrice(item.refundNum*item.unitPrice,item))))}}
+ ¥{{returnTotalMoney(item)}}
-
- ¥0.00
- ¥{{returnTotalMoney(item)}}
-
+
+ ¥{{mathFloorPrice((item.num-item.couponNum)*item.unitPrice,item)}}
+ ¥{{returnTotalMoney(item)}}
+
+
+ ¥{{mathFloorPrice(item.num*item.discountSaleAmount,item)}}
+ ¥{{returnTotalMoney(item)}}
+
+
+ ¥{{mathFloorPrice((item.memberPrice?item.num*item.memberPrice:item.num*item.price),item)}}
+ ¥{{returnTotalMoney(item)}}
- ¥{{returnCanTuiMoney(item)}}
+ ¥{{returnTotalMoney(item)}}
- ¥{{returnTotalMoney(item)}}
+ ¥{{returnCanTuiMoney(item)}}
¥{{returnTotalMoney(item)}}
-
+
X{{item.number||item.num}}
@@ -95,28 +112,29 @@
-
-
+
退菜
-
-
- {{item.userCouponId?'退券':'退款' }}
-
-
-
-
+
+
+
+ 桌位费
+ {{seatFeePrice||'0.00'}}
+
+
+
+
+ 打包费
+ {{allPpackFee||'0.00'}}
+
+
@@ -132,25 +150,26 @@
-
+
- 已优惠¥{{youhuiAllPrice}}
+ 已优惠¥{{discountsPrice}}
-
+
+
-
+
-
+
退款金额
- {{(orderInfo.refundAmount).toFixed(2)}}
+ {{mathFloorPrice(orderInfo.refundAmount)}}
@@ -166,38 +185,32 @@
+
+
+ 全部退款
+
+
+
总计¥
- {{orderInfo.amount }}
+ {{allPrice}}
总计¥
- {{orderInfo.amount}}
+ {{mathFloorPrice(orderInfo.payAmount)}}
-
+
-
-
-
- 重新打印
+
+
+ 重新打印
@@ -211,8 +224,15 @@
{{vipDiscountPrice}}
+
+ 单品打折
+
+ ¥
+ {{ discountSaleAmount }}
+
+
- 打折
+ 服务改价优惠
¥
{{to2(discountAmount) }}
@@ -225,21 +245,13 @@
{{to2(orderInfo.fullCouponDiscountAmount) }}
-
+
商品券抵扣
¥
- {{productCouponDiscountAmount }}
+ {{to2(orderInfo.productCouponDiscountAmount) }}
-
积分抵扣
@@ -255,37 +267,15 @@
\ No newline at end of file
+
\ No newline at end of file
diff --git a/pagesOrder/index/index.vue b/pagesOrder/index/index.vue
index 379d18c..f895ebd 100644
--- a/pagesOrder/index/index.vue
+++ b/pagesOrder/index/index.vue
@@ -3,12 +3,14 @@
-
+
-
+
-
+
@@ -18,20 +20,32 @@