diff --git a/.env.development b/.env.development index 6b00c1f..3e05c9a 100644 --- a/.env.development +++ b/.env.development @@ -1,8 +1,9 @@ ENV = 'development' # 接口地址 -# VUE_APP_BASE_API = 'http://192.168.2.128:8000' -VUE_APP_BASE_API = 'https://cashieradmin.sxczgkj.cn' +# VUE_APP_BASE_API = 'http://192.168.2.128:8000' // 刘一帆 +VUE_APP_BASE_API = 'http://192.168.2.98:8000' +# VUE_APP_BASE_API = 'https://cashieradmin.sxczgkj.cn' # VUE_APP_BASE_API = 'http://192.168.2.16:8000' VUE_APP_WS_API = 'ws://192.168.2.128:8000' diff --git a/.env.production b/.env.production index e02a523..03f00a2 100644 --- a/.env.production +++ b/.env.production @@ -3,5 +3,6 @@ ENV = 'production' # 如果使用 Nginx 代理后端接口,那么此处需要改为 '/',文件查看 Docker 部署篇,Nginx 配置 # 接口地址,注意协议,如果你没有配置 ssl,需要将 https 改为 http VUE_APP_BASE_API = 'https://cashieradmin.sxczgkj.cn' +# VUE_APP_BASE_API = 'http://192.168.2.98:8000' # 如果接口是 http 形式, wss 需要改为 ws VUE_APP_WS_API = 'wss://123.56.110.252 diff --git a/dist.zip b/dist.zip new file mode 100644 index 0000000..b2d45d3 Binary files /dev/null and b/dist.zip differ diff --git a/public/favicon.ico b/public/favicon.ico index 4b91aed..4619155 100644 Binary files a/public/favicon.ico and b/public/favicon.ico differ diff --git a/src/App.vue b/src/App.vue index 0f16cfa..9d9e72b 100644 --- a/src/App.vue +++ b/src/App.vue @@ -71,7 +71,6 @@ export default { &:hover { cursor: pointer; - border-color: $borderColor; } &.active { diff --git a/src/api/devices.js b/src/api/devices.js new file mode 100644 index 0000000..82d9b73 --- /dev/null +++ b/src/api/devices.js @@ -0,0 +1,32 @@ +import request from '@/utils/request' + +/** + * 增加打印机 + * @returns + */ +export function tbPrintMachine(data, method = 'post') { + return request({ + url: '/api/tbPrintMachine', + method: method, + data: { + shopId: localStorage.getItem('shopId'), + ...data + } + }) +} + +/** + * 打印机列表 + * @returns + */ +export function tbPrintMachineGet(params) { + return request({ + url: '/api/tbPrintMachine', + method: 'get', + params: { + shopId: localStorage.getItem('shopId'), + sort: '', + ...params + } + }) +} \ No newline at end of file diff --git a/src/api/home.js b/src/api/home.js new file mode 100644 index 0000000..0a5f44b --- /dev/null +++ b/src/api/home.js @@ -0,0 +1,91 @@ +import request from '@/utils/request' + +/** + * 汇总数据 + * @returns + */ +export function summaryGet() { + return request({ + url: '/api/summary', + method: 'get', + params: { + shopId: localStorage.getItem('shopId') + } + }) +} + +/** + * 今日数据 + * @returns + */ +export function summaryTodayGet() { + return request({ + url: '/api/summary/today', + method: 'get', + params: { + shopId: localStorage.getItem('shopId') + } + }) +} + +/** + * 今日数据 + * @returns + */ +export function summaryDateGet(day) { + return request({ + url: '/api/summary/date', + method: 'get', + params: { + shopId: localStorage.getItem('shopId'), + day: day + } + }) +} + +/** + * 销售额柱状图 + * @returns + */ +export function dateAmount(day) { + return request({ + url: '/api/summary/dateAmount', + method: 'get', + params: { + shopId: localStorage.getItem('shopId'), + day: day + } + }) +} + +/** + * 商品销售排行 + * @returns + */ +export function dateProduct(day, page) { + return request({ + url: '/api/summary/dateProduct', + method: 'get', + params: { + shopId: localStorage.getItem('shopId'), + day: day, + page: page + } + }) +} + +/** + * 支付类型占比 + * @returns + */ +export function datePayType(day) { + return request({ + url: '/api/summary/datePayType', + method: 'get', + params: { + shopId: localStorage.getItem('shopId'), + day: day + } + }) +} + diff --git a/src/assets/images/background_img.jpg b/src/assets/images/background_img.jpg new file mode 100644 index 0000000..5d5644d Binary files /dev/null and b/src/assets/images/background_img.jpg differ diff --git a/src/assets/images/logo.png b/src/assets/images/logo.png index 4b91aed..452fdc0 100644 Binary files a/src/assets/images/logo.png and b/src/assets/images/logo.png differ diff --git a/src/assets/styles/variables.scss b/src/assets/styles/variables.scss index 41de79c..cab7c4c 100644 --- a/src/assets/styles/variables.scss +++ b/src/assets/styles/variables.scss @@ -1,23 +1,23 @@ // base color -$blue:#324157; -$light-blue:#3A71A8; -$red:#C03639; -$pink: #E65D6E; -$green: #30B08F; -$tiffany: #4AB7BD; -$yellow:#FEC171; -$panGreen: #30B08F; +$blue: #324157; +$light-blue: #3a71a8; +$red: #c03639; +$pink: #e65d6e; +$green: #30b08f; +$tiffany: #4ab7bd; +$yellow: #fec171; +$panGreen: #30b08f; // sidebar -$menuText:#bfcbd9; -$menuActiveText:#409EFF; -$subMenuActiveText:#f4f4f5; // https://github.com/ElemeFE/element/issues/12951 +$menuText: #bfcbd9; +$menuActiveText: #409eff; +$subMenuActiveText: #f4f4f5; // https://github.com/ElemeFE/element/issues/12951 -$menuBg:#304156; -$menuHover:#263445; +$menuBg: #333; +$menuHover: #444; -$subMenuBg:#1f2d3d; -$subMenuHover:#001528; +$subMenuBg: #444; +$subMenuHover: #555; $sideBarWidth: 205px; diff --git a/src/components/classify/index.vue b/src/components/classify/index.vue new file mode 100644 index 0000000..742fb33 --- /dev/null +++ b/src/components/classify/index.vue @@ -0,0 +1,119 @@ + + + + + \ No newline at end of file diff --git a/src/layout/components/Navbar.vue b/src/layout/components/Navbar.vue index 32fbfe0..516cee2 100644 --- a/src/layout/components/Navbar.vue +++ b/src/layout/components/Navbar.vue @@ -2,39 +2,32 @@