diff --git a/package.json b/package.json index 98a07d5..902a133 100644 --- a/package.json +++ b/package.json @@ -11,6 +11,7 @@ "dependencies": { "@element-plus/icons-vue": "^2.3.1", "axios": "^1.6.2", + "dayjs": "^1.11.10", "electron": "^29.0.1", "element-plus": "^2.4.3", "lodash": "^4.17.21", diff --git a/src/App.vue b/src/App.vue index e1e1605..c71b43f 100644 --- a/src/App.vue +++ b/src/App.vue @@ -79,6 +79,12 @@ router.beforeEach((to, from) => { --el-component-size-large: 50px !important; } + +@font-face { + font-family: 'num'; + src: url('@/assets/font/Ignotum-Regular.ttf'); +} + html { font-size: var(--el-font-size-base); color: #333; @@ -102,6 +108,10 @@ html { font-size: var(--el-font-size-base) !important; } +.el-popover__title { + font-size: var(--el-font-size-base) !important; +} + .el-dialog__header { background-color: #555; margin-right: 0 !important; diff --git a/src/api/product.js b/src/api/product.js index c827537..4dd50d8 100644 --- a/src/api/product.js +++ b/src/api/product.js @@ -37,4 +37,44 @@ export function queryProductSku(params) { url: "product/queryProductSku", params }); -} \ No newline at end of file +} + +/** + * 添加购物车 + * @param {*} params + * @returns + */ +export function createCart(data) { + return request({ + method: "post", + url: "/order/createCart", + data + }); +} + +/** + * 获取购物车商品 + * @param {*} params + * @returns + */ +export function queryCart(params) { + return request({ + method: "get", + url: "order/queryCart", + params + }); +} + +/** + * 获取取件码 + * @param {*} params + * @returns + */ +export function createCode(params) { + return request({ + method: "get", + url: "/order/createCode", + params + }); +} + diff --git a/src/api/table.js b/src/api/table.js new file mode 100644 index 0000000..414f43b --- /dev/null +++ b/src/api/table.js @@ -0,0 +1,27 @@ +import request from "@/utils/request.js" + +/** + * 查询台桌分类 + * @param {*} params + * @returns + */ +export function queryShopArea(params) { + return request({ + method: "get", + url: "shopInfo/queryShopArea", + params + }); +} + +/** + * 查询台桌信息 + * @param {*} params + * @returns + */ +export function queryShopTable(params) { + return request({ + method: "get", + url: "shopInfo/queryShopTable", + params + }); +} \ No newline at end of file diff --git a/src/assets/1.webp b/src/assets/1.webp deleted file mode 100644 index 8235c11..0000000 Binary files a/src/assets/1.webp and /dev/null differ diff --git a/src/assets/font/Ignotum-Regular.ttf b/src/assets/font/Ignotum-Regular.ttf new file mode 100644 index 0000000..c273ec0 Binary files /dev/null and b/src/assets/font/Ignotum-Regular.ttf differ diff --git a/src/components/leftMenu.vue b/src/components/leftMenu.vue index d154aee..69ebd08 100644 --- a/src/components/leftMenu.vue +++ b/src/components/leftMenu.vue @@ -99,7 +99,7 @@ const menus = ref([ } &.more { - margin-top: 30px; + margin-top: 50px; } .icon { diff --git a/src/components/remarkModal.vue b/src/components/remarkModal.vue index 53cb2ed..23b1484 100644 --- a/src/components/remarkModal.vue +++ b/src/components/remarkModal.vue @@ -1,9 +1,9 @@ \ No newline at end of file + +const emit = defineEmits(['success']) + +function show() { + dialogVisible.value = true +} + +function opne() { + number.value = '' +} + +// 输入 +function inputHandle(n) { + number.value += n +} + +// 删除 +function delHandle() { + if (!number.value) return + number.value = number.value.substring(0, number.value.length - 1) +} + +// 确认 +function confirmHandle() { + emit('success', number.value) + dialogVisible.value = false +} + +defineExpose({ + show +}) + + + \ No newline at end of file diff --git a/src/router/index.js b/src/router/index.js index 7172ed1..9d183a8 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -29,7 +29,7 @@ const routes = [ meta: { index: 1, }, - component: () => import("@/views/table.vue"), + component: () => import("@/views/table/index.vue"), }, { path: "/order", diff --git a/src/views/home/components/cartOperation.vue b/src/views/home/components/cartOperation.vue new file mode 100644 index 0000000..83b1e1f --- /dev/null +++ b/src/views/home/components/cartOperation.vue @@ -0,0 +1,115 @@ + + + + + \ No newline at end of file diff --git a/src/views/home/components/category.vue b/src/views/home/components/category.vue index 9fa727c..64957d7 100644 --- a/src/views/home/components/category.vue +++ b/src/views/home/components/category.vue @@ -6,7 +6,7 @@ import { queryCategory } from '@/api/product' import { ref, onMounted } from 'vue' import { useUser } from "@/store/user.js" -const store = useUser(); +const store = useUser() const categorys = ref([]) const categorysActive = ref(0) diff --git a/src/views/home/components/goods.vue b/src/views/home/components/goods.vue index 6aba72a..cffb64f 100644 --- a/src/views/home/components/goods.vue +++ b/src/views/home/components/goods.vue @@ -7,15 +7,27 @@ {{ item.name }} -
- - - -
+ + + +
-
@@ -39,7 +51,7 @@
- + \ No newline at end of file diff --git a/src/views/table/components/tableInfo.vue b/src/views/table/components/tableInfo.vue new file mode 100644 index 0000000..44b8a4d --- /dev/null +++ b/src/views/table/components/tableInfo.vue @@ -0,0 +1,141 @@ + + + + + + \ No newline at end of file diff --git a/src/views/table/index.vue b/src/views/table/index.vue new file mode 100644 index 0000000..361b017 --- /dev/null +++ b/src/views/table/index.vue @@ -0,0 +1,286 @@ + + + + + \ No newline at end of file diff --git a/vite.config.js b/vite.config.js index acab832..caf64e8 100644 --- a/vite.config.js +++ b/vite.config.js @@ -9,7 +9,8 @@ export default defineConfig({ server: { proxy: { '/api': { - target: 'https://cashierclient.sxczgkj.cn/cashier-client', + // target: 'https://cashierclient.sxczgkj.cn/cashier-client', // 测试 + target: 'http://192.168.2.87:10587/cashier-client', // 国成 changeOrigin: true, rewrite: (path) => path.replace(/^\/api/, '') }