diff --git a/src/apis/Permission.js b/src/apis/Permission.js index 50c5b22..d5d83c3 100644 --- a/src/apis/Permission.js +++ b/src/apis/Permission.js @@ -10,4 +10,16 @@ export function getMenuNavApi() { url: `/menu/nav`, method: 'get', }) +} + +/** + * @description:用户角色 + * @param + * @return: + */ +export function getUser() { + return request({ + url: `/user/getUser`, + method: 'get', + }) } \ No newline at end of file diff --git a/src/apis/apiManage.js b/src/apis/apiManage.js new file mode 100644 index 0000000..e6b89fd --- /dev/null +++ b/src/apis/apiManage.js @@ -0,0 +1,101 @@ +import request from "@/utils/request.js"; + +/** + * @description 获取合作商列表 + * @param {*} (pageNum,pageSize) + * @returns data + */ +export function businessListApi(pageNum, pageSize, type) { + return request({ + url: `/serviceInfo/page?pageNum=${pageNum}&pageSize=${pageSize}&type=${type}`, + method: 'get' + }) +} + +/** + * @description 新增合作商 + * @param {*} data + * @returns data + */ +export function addBusinessApi(data) { + return request({ + url: `/serviceInfo/save`, + method: 'post', + data + }) +} + +/** + * @description 获取api接入管理列表 + * @param {*} (pageNum,pageSize) + * @returns data + */ +export function apiManageListApi(pageNum, pageSize) { + return request({ + url: `/serviceInfo/page?type=1pageNum=${pageNum}&pageSize=${pageSize}`, + method: 'get' + }) +} + +/** + * @description 设置登录账号 + * @param {*} data + * @returns data + */ +export function saveMallUserInfo(data) { + return request({ + url: `/serviceInfo/saveMallUserInfo`, + method: 'post', + data + }) +} + +/** + * @description 设置时长 + * @param {*} data + * @returns data + */ +export function setRemainingTimes(data) { + return request({ + url: `/serviceInfo/setRemainingTimes`, + method: 'post', + data + }) +} + +/** + * @description 所有模版 + * @param {*} (pageNum,pageSize) + * @returns data + */ +export function modelAllList(pageNum, pageSize) { + return request({ + url: `/personMould/alList?pageNum=${pageNum}&pageSize=${pageSize}`, + method: 'get' + }) +} + +/** + * @description 已关联模版 + * @param {*} + * @returns data + */ +export function personMouldIdList() { + return request({ + url: `/serviceInfo/personMouldIdList`, + method: 'get' + }) +} + +/** + * @description 保存关联模版 + * @param {*} + * @returns data + */ +export function associatedMould(data) { + return request({ + url: `/serviceInfo/associatedMould`, + method: 'post', + data + }) +} \ No newline at end of file diff --git a/src/apis/editPass.js b/src/apis/editPass.js new file mode 100644 index 0000000..01d5293 --- /dev/null +++ b/src/apis/editPass.js @@ -0,0 +1,14 @@ +import request from "@/utils/request.js"; + +/** + * @description 修改密码 + * @params userName, pwd + * @returns data + */ +export function updatepwd(data) { + return request({ + url: `/user/updatepwd`, + method: 'post', + data + }) +} diff --git a/src/layout/index.vue b/src/layout/index.vue index 39f5967..5024499 100644 --- a/src/layout/index.vue +++ b/src/layout/index.vue @@ -11,8 +11,27 @@
+ + + + API接入方管理 + + + + 私有化客户管理 + + + + 修改密码 + + -
{{ childrens.name }}
-
+ --> -
+
@@ -93,6 +99,23 @@ + + + 我的 + + + + + + + @@ -127,7 +150,7 @@ import { useAppStore } from "@/store/modules/app"; // import { useSettingsStore } from "@/store/modules/settings"; import { useRoute, useRouter } from "vue-router"; import { useI18n } from "vue-i18n"; -import { getMenuNavApi } from "@/apis/Permission.js"; +import { getMenuNavApi, getUser } from "@/apis/Permission.js"; import { userInfoModules } from "@/store/modules/userInfo"; const userInfoPinia = userInfoModules(); @@ -190,6 +213,7 @@ function handleOutsideClick() { onMounted(() => { getMenuNavFunc(); + isAdminFn() }); //#region 联系我们弹窗 const showTalkUsDialog = ref(false); @@ -214,12 +238,26 @@ async function getMenuNavFunc() { const showChildrenRouter = ref(""); //#endregion ------------------------------------ + +// 修改密码 +const showEditPasswordDialog = ref(false); +const updateShowEditPassDialog = () => { + showEditPasswordDialog.value = false +} + +const isAdmin = ref(''); +function isAdminFn() { + getUser().then(res => { + isAdmin.value = res.data.isAdmin // isAdmin=1,为管理人员(邃芒后台) , isAdmin=0,为API接入方登录后台 + }) +} + diff --git a/src/main.ts b/src/main.ts index cf0103d..64b06be 100644 --- a/src/main.ts +++ b/src/main.ts @@ -17,7 +17,7 @@ import "element-plus/theme-chalk/dark/css-vars.css"; import "@/styles/index.scss"; import "uno.css"; import "@/styles/my.scss"; // 引入自己定义的样式 -import 'amfe-flexible'; +// import 'amfe-flexible'; import ElementPlus from "element-plus"; // 引入组件 import myLoading from "@/components/myLoading.vue"; diff --git a/src/router/index.ts b/src/router/index.ts index 3693ba4..3975cfe 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -5,6 +5,10 @@ export const Layout = () => import("@/layout/index.vue"); // 静态路由 export const constantRoutes: RouteRecordRaw[] = [ + { + path: "/", + redirect: "/login", + }, // 登录 { path: "/login", @@ -147,6 +151,60 @@ export const constantRoutes: RouteRecordRaw[] = [ }, ], }, + { + path: "/", + component: Layout, + redirect: "/editPass", + children: [ + { + path: "editPass", + component: () => import("@/views/editPass/index.vue"), + name: "editPass", + meta: { + title: "editPass", + icon: "homepage", + affix: true, + name: "ruleListMangage.title", + }, + }, + ], + }, + { + path: "/", + component: Layout, + redirect: "/apiManage", + children: [ + { + path: "apiManage", + component: () => import("@/views/apiManage/index.vue"), + name: "apiManage", + meta: { + title: "apiManage", + icon: "homepage", + affix: true, + name: "ruleListMangage.title", + }, + }, + ], + }, + { + path: "/", + component: Layout, + redirect: "/privatization", + children: [ + { + path: "privatization", + component: () => import("@/views/privatization/index.vue"), + name: "privatization", + meta: { + title: "privatization", + icon: "homepage", + affix: true, + name: "ruleListMangage.title", + }, + }, + ], + } ]; /** diff --git a/src/types/auto-imports.d.ts b/src/types/auto-imports.d.ts index 53bb615..e5c7bdb 100644 --- a/src/types/auto-imports.d.ts +++ b/src/types/auto-imports.d.ts @@ -4,6 +4,7 @@ declare global { const EffectScope: typeof import('vue')['EffectScope'] const ElForm: typeof import('element-plus/es')['ElForm'] const ElMessage: typeof import('element-plus/es')['ElMessage'] + const ElMessageBox: typeof import('element-plus/es')['ElMessageBox'] const asyncComputed: typeof import('@vueuse/core')['asyncComputed'] const autoResetRef: typeof import('@vueuse/core')['autoResetRef'] const computed: typeof import('vue')['computed'] @@ -272,6 +273,7 @@ declare module 'vue' { readonly EffectScope: UnwrapRef readonly ElForm: UnwrapRef readonly ElMessage: UnwrapRef + readonly ElMessageBox: UnwrapRef readonly asyncComputed: UnwrapRef readonly autoResetRef: UnwrapRef readonly computed: UnwrapRef diff --git a/src/types/components.d.ts b/src/types/components.d.ts index 48d8ecc..8858534 100644 --- a/src/types/components.d.ts +++ b/src/types/components.d.ts @@ -14,7 +14,6 @@ declare module '@vue/runtime-core' { EditPosition: typeof import('./../components/EditPosition.vue')['default'] 'EditPosition copy': typeof import('./../components/EditPosition copy.vue')['default'] ElButton: typeof import('element-plus/es')['ElButton'] - ElCard: typeof import('element-plus/es')['ElCard'] ElDialog: typeof import('element-plus/es')['ElDialog'] ElDropdown: typeof import('element-plus/es')['ElDropdown'] ElDropdownItem: typeof import('element-plus/es')['ElDropdownItem'] @@ -23,33 +22,24 @@ declare module '@vue/runtime-core' { ElFormItem: typeof import('element-plus/es')['ElFormItem'] ElIcon: typeof import('element-plus/es')['ElIcon'] ElInput: typeof import('element-plus/es')['ElInput'] - ElInputNumber: typeof import('element-plus/es')['ElInputNumber'] + ElMenu: typeof import('element-plus/es')['ElMenu'] + ElMenuItem: typeof import('element-plus/es')['ElMenuItem'] + ElMenuItemGroup: typeof import('element-plus/es')['ElMenuItemGroup'] ElOption: typeof import('element-plus/es')['ElOption'] ElPagination: typeof import('element-plus/es')['ElPagination'] - ElRadio: typeof import('element-plus/es')['ElRadio'] - ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup'] ElSelect: typeof import('element-plus/es')['ElSelect'] - ElSwitch: typeof import('element-plus/es')['ElSwitch'] + ElSubMenu: typeof import('element-plus/es')['ElSubMenu'] ElTable: typeof import('element-plus/es')['ElTable'] ElTableColumn: typeof import('element-plus/es')['ElTableColumn'] - ElTag: typeof import('element-plus/es')['ElTag'] ElTooltip: typeof import('element-plus/es')['ElTooltip'] - ElUpload: typeof import('element-plus/es')['ElUpload'] GithubCorner: typeof import('./../components/GithubCorner/index.vue')['default'] Hamburger: typeof import('./../components/Hamburger/index.vue')['default'] IconSelect: typeof import('./../components/IconSelect/index.vue')['default'] - IEpCloseBold: typeof import('~icons/ep/close-bold')['default'] - IEpCollection: typeof import('~icons/ep/collection')['default'] - IEpDelete: typeof import('~icons/ep/delete')['default'] - IEpDocumentAdd: typeof import('~icons/ep/document-add')['default'] - IEpDownload: typeof import('~icons/ep/download')['default'] + IEpDocument: typeof import('~icons/ep/document')['default'] IEpEdit: typeof import('~icons/ep/edit')['default'] - IEpLoading: typeof import('~icons/ep/loading')['default'] - IEpLock: typeof import('~icons/ep/lock')['default'] + IEpIconMenu: typeof import('~icons/ep/icon-menu')['default'] + IEpLink: typeof import('~icons/ep/link')['default'] IEpPlus: typeof import('~icons/ep/plus')['default'] - IEpRefresh: typeof import('~icons/ep/refresh')['default'] - IEpSearch: typeof import('~icons/ep/search')['default'] - IEpVideoPlay: typeof import('~icons/ep/video-play')['default'] LangSelect: typeof import('./../components/LangSelect/index.vue')['default'] MultiUpload: typeof import('./../components/Upload/MultiUpload.vue')['default'] MyLoading: typeof import('./../components/myLoading.vue')['default'] @@ -63,8 +53,4 @@ declare module '@vue/runtime-core' { TalkUs: typeof import('./../components/talkUs.vue')['default'] WangEditor: typeof import('./../components/WangEditor/index.vue')['default'] } - export interface ComponentCustomProperties { - vInfiniteScroll: typeof import('element-plus/es')['ElInfiniteScroll'] - vLoading: typeof import('element-plus/es')['ElLoadingDirective'] - } } diff --git a/src/views/apiManage/businessCheck.vue b/src/views/apiManage/businessCheck.vue new file mode 100644 index 0000000..f4479b2 --- /dev/null +++ b/src/views/apiManage/businessCheck.vue @@ -0,0 +1,301 @@ + + + + + + diff --git a/src/views/apiManage/index copy.vue b/src/views/apiManage/index copy.vue new file mode 100644 index 0000000..72d8476 --- /dev/null +++ b/src/views/apiManage/index copy.vue @@ -0,0 +1,411 @@ + + + + + + diff --git a/src/views/apiManage/index.vue b/src/views/apiManage/index.vue new file mode 100644 index 0000000..f75bb86 --- /dev/null +++ b/src/views/apiManage/index.vue @@ -0,0 +1,493 @@ + + + + + + diff --git a/src/views/apiManage/model.vue b/src/views/apiManage/model.vue new file mode 100644 index 0000000..4b21ebc --- /dev/null +++ b/src/views/apiManage/model.vue @@ -0,0 +1,130 @@ + + + diff --git a/src/views/editPass/index.vue b/src/views/editPass/index.vue new file mode 100644 index 0000000..f21599e --- /dev/null +++ b/src/views/editPass/index.vue @@ -0,0 +1,111 @@ + + + + + + diff --git a/src/views/privatization/index.vue b/src/views/privatization/index.vue new file mode 100644 index 0000000..efe02af --- /dev/null +++ b/src/views/privatization/index.vue @@ -0,0 +1,354 @@ + + + + + + diff --git a/vite.config.ts b/vite.config.ts index db5fba2..60f63e5 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -35,15 +35,15 @@ export default defineConfig(({ mode }: ConfigEnv): UserConfig => { `, }, }, - postcss: { - plugins: [ - postCssPxToRem({ - rootValue: 192, // 1rem 的大小 - propList: ['*'], // 需要转换的属性,*(全部转换) - unitPrecision: 6 // 转换精度,保留的小数位数 - }) - ] - } + // postcss: { + // plugins: [ + // postCssPxToRem({ + // rootValue: 192, // 1rem 的大小 + // propList: ['*'], // 需要转换的属性,*(全部转换) + // unitPrecision: 6 // 转换精度,保留的小数位数 + // }) + // ] + // } }, server: { host: "0.0.0.0",