diff --git a/.env.development b/.env.development index 2e992b3..a5953b5 100644 --- a/.env.development +++ b/.env.development @@ -2,6 +2,6 @@ VITE_SOCKET_URL=wss://server.gxwebsoft.com VITE_SERVER_URL=https://server.gxwebsoft.com/api VITE_API_URL=https://modules.gxwebsoft.com/api -#VITE_API_URL=http://127.0.0.1:9090/api +#VITE_API_URL=http://127.0.0.1:9001/api #VITE_SOCKET_URL=ws://localhost:9191 #VITE_API_URL=http://103.233.255.195:9300/api diff --git a/.idea/UniappTool.xml b/.idea/UniappTool.xml new file mode 100644 index 0000000..f7328e8 --- /dev/null +++ b/.idea/UniappTool.xml @@ -0,0 +1,10 @@ + + + + + \ No newline at end of file diff --git a/src/api/cms/ad/index.ts b/src/api/cms/ad/index.ts index 356d5fd..9b4f659 100644 --- a/src/api/cms/ad/index.ts +++ b/src/api/cms/ad/index.ts @@ -1,6 +1,6 @@ import request from '@/utils/request'; import type { ApiResult, PageResult } from '@/api'; -import type { Ad, AdParam } from './model'; +import type {Ad, AdParam} from './model'; import { MODULES_API_URL } from '@/config/setting'; /** @@ -119,6 +119,19 @@ export async function getAd(id: number) { return Promise.reject(new Error(res.data.message)); } +/** + * 根据id查询广告位 + */ +export async function getSide() { + const res = await request.get>( + MODULES_API_URL + '/cms/ad/side' + ); + if (res.data.code === 0 && res.data.data) { + return res.data.data; + } + return Promise.reject(new Error(res.data.message)); +} + /** * 检查IP是否存在 */ diff --git a/src/api/cms/ad/model/index.ts b/src/api/cms/ad/model/index.ts index 370f259..98928be 100644 --- a/src/api/cms/ad/model/index.ts +++ b/src/api/cms/ad/model/index.ts @@ -18,6 +18,17 @@ export interface Ad { status?: number; createTime?: string; updateTime?: string; + data?: AdItem []; +} + +/** + * 图片列表 + */ +export interface AdItem { + uid?: number; + url?: string; + path?: string; + status?: string; } /** diff --git a/src/api/cms/design/index.ts b/src/api/cms/design/index.ts index d9bfdb4..d820ed7 100644 --- a/src/api/cms/design/index.ts +++ b/src/api/cms/design/index.ts @@ -2,6 +2,7 @@ import request from '@/utils/request'; import type { ApiResult, PageResult } from '@/api'; import type { Design, DesignParam } from './model'; import { MODULES_API_URL } from '@/config/setting'; +import {Navigation} from "@/api/cms/navigation/model"; /** * 分页查询页面设计 @@ -138,3 +139,14 @@ export async function checkExistence( } return Promise.reject(new Error(res.data.message)); } + +export async function getNavigationByPath(params?: DesignParam) { + const res = await request.get>(MODULES_API_URL + '/cms/navigation/getNavigationByPath', { + params + }); + if (res.data.code === 0 && res.data.data) { + return res.data.data; + } + return Promise.reject(new Error(res.data.message)); +} + diff --git a/src/api/cms/navigation/model/index.ts b/src/api/cms/navigation/model/index.ts index cf8c89a..14b621c 100644 --- a/src/api/cms/navigation/model/index.ts +++ b/src/api/cms/navigation/model/index.ts @@ -1,3 +1,5 @@ +import {Design} from "@/api/cms/design/model"; + /** * 菜单 */ @@ -36,6 +38,7 @@ export interface Navigation { createTime?: string; // 子菜单 children?: Navigation[]; + design?: Design; // 权限树回显选中状态, 0未选中, 1选中 checked?: boolean; // diff --git a/src/api/cms/website/model/index.ts b/src/api/cms/website/model/index.ts index b48526f..eb44703 100644 --- a/src/api/cms/website/model/index.ts +++ b/src/api/cms/website/model/index.ts @@ -2,8 +2,19 @@ import {WebsiteField} from "@/api/cms/website/field/model"; import {Navigation} from "@/api/cms/navigation/model"; import {ArrangeCategory} from "@/api/cms/category/model"; import {Link} from "@/api/link/model"; +import {Ad} from "@/api/cms/ad/model"; // import {MenuMeta} from "ele-admin-pro/es/ele-pro-layout/types"; // import {MenuItem} from "ele-admin-pro"; +/** + * 小程序信息封装 + */ +export interface SiteInfo { + website?: Website; + config?: any; + slide?: Ad; + menus?: Navigation[]; + serverTime?: any; +} /** * 菜单 diff --git a/src/components/Banner/index.vue b/src/components/Banner/index.vue index 247e3a2..0a7df0a 100644 --- a/src/components/Banner/index.vue +++ b/src/components/Banner/index.vue @@ -21,12 +21,11 @@ -