diff --git a/.env b/.env index 5e576c85..30d7ff29 100644 --- a/.env +++ b/.env @@ -21,5 +21,5 @@ VITE_APP_BAIDU_CODE = a1ff8825baa73c3a78eb96aa40325abc # 默认账户密码 VITE_APP_DEFAULT_LOGIN_TENANT = 资安信 -VITE_APP_DEFAULT_LOGIN_USERNAME = admin -VITE_APP_DEFAULT_LOGIN_PASSWORD = admin123 +# VITE_APP_DEFAULT_LOGIN_USERNAME = admin +# VITE_APP_DEFAULT_LOGIN_PASSWORD = admin123 diff --git a/src/api/mall/product/spu.ts b/src/api/mall/product/spu.ts index 8f58049f..628053e7 100644 --- a/src/api/mall/product/spu.ts +++ b/src/api/mall/product/spu.ts @@ -26,7 +26,7 @@ export interface Sku { salesCount?: number // 商品销量 cabinetChannel?: string // 货道或柜门编号 cabinetType?: string // 通道类型 - purchaseBizType?:string + purchaseBizType?: string } export interface GiveCouponTemplate { @@ -68,13 +68,15 @@ export interface Spu { // 获得 Spu 列表 export const getSpuPage = (params: PageParam) => { // /product/spu/page - return request.get({ url: '/product/spu/pageWithCreator',params:{ - ...params - }}) + return request.get({ + url: '/product/spu/pageWithCreator', params: { + ...params + } + }) } // 获得 Spu 列表 tabsCount -export const getTabsCount = (types?: number) => { +export const getTabsCount = (types: number = 0) => { return request.get({ url: `/product/spu/get-count?types=${types}` }) } diff --git a/src/api/product/devicelog/index.ts b/src/api/product/devicelog/index.ts new file mode 100644 index 00000000..3514673b --- /dev/null +++ b/src/api/product/devicelog/index.ts @@ -0,0 +1,43 @@ +import request from '@/config/axios' + +// 贩卖机测试日志 VO +export interface DeviceLogVO { + id: number // 日志主键 + deviceId: string // 设备IMEI + cabinetChannel: string // 当前使用的货道或柜门编号 + deviceStatus: number // 出货状态 + content: string // 内容 +} + +// 贩卖机测试日志 API +export const DeviceLogApi = { + // 查询贩卖机测试日志分页 + getDeviceLogPage: async (params: any) => { + return await request.get({ url: `/product/device-log/page`, params }) + }, + + // 查询贩卖机测试日志详情 + getDeviceLog: async (id: number) => { + return await request.get({ url: `/product/device-log/get?id=` + id }) + }, + + // 新增贩卖机测试日志 + createDeviceLog: async (data: DeviceLogVO) => { + return await request.post({ url: `/product/device-log/create`, data }) + }, + + // 修改贩卖机测试日志 + updateDeviceLog: async (data: DeviceLogVO) => { + return await request.put({ url: `/product/device-log/update`, data }) + }, + + // 删除贩卖机测试日志 + deleteDeviceLog: async (id: number) => { + return await request.delete({ url: `/product/device-log/delete?id=` + id }) + }, + + // 导出贩卖机测试日志 Excel + exportDeviceLog: async (params) => { + return await request.download({ url: `/product/device-log/export-excel`, params }) + } +} \ No newline at end of file diff --git a/src/router/index.ts b/src/router/index.ts index b818421c..0f52d782 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -1,11 +1,11 @@ import type { App } from 'vue' import type { RouteRecordRaw } from 'vue-router' -import { createRouter, createWebHistory } from 'vue-router' +import { createRouter, createWebHashHistory } from 'vue-router' import remainingRouter from './modules/remaining' // 创建路由实例 const router = createRouter({ - history: createWebHistory(import.meta.env.VITE_BASE_PATH), // createWebHashHistory URL带#,createWebHistory URL不带# + history: createWebHashHistory(import.meta.env.VITE_BASE_PATH), // createWebHashHistory URL带#,createWebHistory URL不带# strict: true, routes: remainingRouter as RouteRecordRaw[], scrollBehavior: () => ({ left: 0, top: 0 }) diff --git a/src/views/Login/SocialLogin.vue b/src/views/Login/SocialLogin.vue index e0caace8..2669c5f9 100644 --- a/src/views/Login/SocialLogin.vue +++ b/src/views/Login/SocialLogin.vue @@ -200,8 +200,8 @@ const loginData = reactive({ tenantEnable: import.meta.env.VITE_APP_TENANT_ENABLE !== 'false', loginForm: { tenantName: '芋道源码', - username: 'admin', - password: 'admin123', + username: '', + password: '', captchaVerification: '', rememberMe: false } diff --git a/src/views/mall/device/index.vue b/src/views/mall/device/index.vue index af0ef1ab..175278ab 100644 --- a/src/views/mall/device/index.vue +++ b/src/views/mall/device/index.vue @@ -44,7 +44,7 @@ - + @@ -102,6 +102,7 @@ const getList = async () => { loading.value = true try { const data = await DeviceApi.getDevicePage(queryParams) + console.log("售货机",data) list.value = data.list total.value = data.total } finally { @@ -159,4 +160,4 @@ const handleExport = async () => { onMounted(() => { getList() }) - \ No newline at end of file + diff --git a/src/views/mall/product/channel/ChannelForm.vue b/src/views/mall/product/channel/ChannelForm.vue index 8aadcebd..890597e2 100644 --- a/src/views/mall/product/channel/ChannelForm.vue +++ b/src/views/mall/product/channel/ChannelForm.vue @@ -13,10 +13,10 @@ - - + + - + diff --git a/src/views/mall/product/channel/index.vue b/src/views/mall/product/channel/index.vue index 67895956..ff4b5788 100644 --- a/src/views/mall/product/channel/index.vue +++ b/src/views/mall/product/channel/index.vue @@ -26,16 +26,16 @@ class="!w-240px" /> - + - + - + - + - + + + + diff --git a/src/views/mall/product/device/index.vue b/src/views/mall/product/device/inde.vue similarity index 96% rename from src/views/mall/product/device/index.vue rename to src/views/mall/product/device/inde.vue index d40b05eb..9924573c 100644 --- a/src/views/mall/product/device/index.vue +++ b/src/views/mall/product/device/inde.vue @@ -1,226 +1,227 @@ - - - + + + diff --git a/src/views/mall/product/devicelog/DeviceLogForm.vue b/src/views/mall/product/devicelog/DeviceLogForm.vue new file mode 100644 index 00000000..eb5ae8e4 --- /dev/null +++ b/src/views/mall/product/devicelog/DeviceLogForm.vue @@ -0,0 +1,111 @@ + + diff --git a/src/views/mall/product/devicelog/index.vue b/src/views/mall/product/devicelog/index.vue new file mode 100644 index 00000000..37a48da9 --- /dev/null +++ b/src/views/mall/product/devicelog/index.vue @@ -0,0 +1,213 @@ + + + diff --git a/src/views/mall/statistics/devicelog/DeviceLogForm.vue b/src/views/mall/statistics/devicelog/DeviceLogForm.vue index 4204af62..74fa460e 100644 --- a/src/views/mall/statistics/devicelog/DeviceLogForm.vue +++ b/src/views/mall/statistics/devicelog/DeviceLogForm.vue @@ -13,8 +13,8 @@ - - + + diff --git a/src/views/mall/statistics/devicelog/index.vue b/src/views/mall/statistics/devicelog/index.vue index 028ed6c7..9f9f6bb0 100644 --- a/src/views/mall/statistics/devicelog/index.vue +++ b/src/views/mall/statistics/devicelog/index.vue @@ -26,10 +26,10 @@ class="!w-240px" /> - + - +