diff --git a/.gitignore b/.gitignore index efc8bd53..39cb8a42 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,3 @@ -.vscode .idea *.iws *.iml diff --git a/admin/.env.development b/admin/.env.development index b52b36bc..ee70684f 100644 --- a/admin/.env.development +++ b/admin/.env.development @@ -1,4 +1,4 @@ NODE_ENV = 'development' -# Base API +# 请求域名 VITE_APP_BASE_URL='https://likeadmin-java.yixiangonline.com' \ No newline at end of file diff --git a/admin/.env.production b/admin/.env.production index 1e1ea2b3..e841ff9b 100644 --- a/admin/.env.production +++ b/admin/.env.production @@ -1,3 +1,4 @@ NODE_ENV = 'production' -# Base API + +# 请求域名 VITE_APP_BASE_URL='' \ No newline at end of file diff --git a/admin/.eslintrc.cjs b/admin/.eslintrc.cjs index 44a42f0b..fa81252d 100644 --- a/admin/.eslintrc.cjs +++ b/admin/.eslintrc.cjs @@ -34,7 +34,8 @@ module.exports = { 'no-prototype-builtins': 'off', 'prefer-spread': 'off', '@typescript-eslint/no-non-null-assertion': 'off', - '@typescript-eslint/no-non-null-asserted-optional-chain': 'off' + '@typescript-eslint/no-non-null-asserted-optional-chain': 'off', + 'vue/no-mutating-props': 'off' }, globals: { module: 'readonly' diff --git a/admin/.gitignore b/admin/.gitignore index e3f04797..61ed8a5c 100644 --- a/admin/.gitignore +++ b/admin/.gitignore @@ -30,7 +30,3 @@ components.d.ts *.sln *.sw? -# lock - -package-lock.json -yarn.lock diff --git a/admin/.vscode/extensions.json b/admin/.vscode/extensions.json new file mode 100644 index 00000000..91f12b27 --- /dev/null +++ b/admin/.vscode/extensions.json @@ -0,0 +1,3 @@ +{ + "recommendations": ["Vue.volar", "Vue.vscode-typescript-vue-plugin"] +} diff --git a/admin/.vscode/settings.json b/admin/.vscode/settings.json new file mode 100644 index 00000000..1b50e37a --- /dev/null +++ b/admin/.vscode/settings.json @@ -0,0 +1,11 @@ +{ + "editor.detectIndentation": false, + "editor.tabSize": 4, + "editor.formatOnSave": true, + "editor.codeActionsOnSave": { + "source.fixAll.eslint": true + }, + "css.validate": false, + "less.validate": false, + "scss.validate": false +} diff --git a/admin/src/api/article.ts b/admin/src/api/article.ts new file mode 100644 index 00000000..30a1a856 --- /dev/null +++ b/admin/src/api/article.ts @@ -0,0 +1,69 @@ +import request from '@/utils/request' + +// 文章分类列表 +export function articleCateLists(params?: any) { + return request.get({ url: '/article/cate/list', params }) +} +// 文章分类列表 +export function articleCateAll(params?: any) { + return request.get({ url: '/article/cate/all', params }) +} + +// 添加文章分类 +export function articleCateAdd(params: any) { + return request.post({ url: '/article/cate/add', params }) +} + +// 编辑文章分类 +export function articleCateEdit(params: any) { + return request.post({ url: '/article/cate/edit', params }) +} + +// 删除文章分类 +export function articleCateDelete(params: any) { + return request.post({ url: '/article/cate/del', params }) +} + +// 文章分类详情 +export function articleCateDetail(params: any) { + return request.get({ url: '/article/cate/detail', params }) +} + +// 文章分类状态 +export function articleCateStatus(params: any) { + return request.post({ url: '/article/cate/change', params }) +} + +// 文章列表 +export function articleLists(params?: any) { + return request.get({ url: '/article/list', params }) +} +// 文章列表 +export function articleAll(params?: any) { + return request.get({ url: '/article/all', params }) +} + +// 添加文章 +export function articleAdd(params: any) { + return request.post({ url: '/article/add', params }) +} + +// 编辑文章 +export function articleEdit(params: any) { + return request.post({ url: '/article/edit', params }) +} + +// 删除文章 +export function articleDelete(params: any) { + return request.post({ url: '/article/del', params }) +} + +// 文章详情 +export function articleDetail(params: any) { + return request.get({ url: '/article/detail', params }) +} + +// 文章分类状态 +export function articleStatus(params: any) { + return request.post({ url: '/article/change', params }) +} diff --git a/admin/src/api/channel/h5.ts b/admin/src/api/channel/h5.ts new file mode 100644 index 00000000..dfb5575a --- /dev/null +++ b/admin/src/api/channel/h5.ts @@ -0,0 +1,11 @@ +import request from '@/utils/request' + +// H5渠道配置保存 +export function setH5Config(params: any) { + return request.post({ url: '/channel/h5/save', params }) +} + +// H5渠道配置详情 +export function getH5Config() { + return request.get({ url: '/channel/h5/detail' }) +} diff --git a/admin/src/api/channel/weapp.ts b/admin/src/api/channel/weapp.ts new file mode 100644 index 00000000..59ce0a7b --- /dev/null +++ b/admin/src/api/channel/weapp.ts @@ -0,0 +1,11 @@ +import request from '@/utils/request' + +// 微信小程序配置保存 +export function setWeappConfig(params: any) { + return request.post({ url: '/channel/mp/save', params }) +} + +// 微信小程序配置详情 +export function getWeappConfig() { + return request.get({ url: '/channel/mp/detail' }) +} diff --git a/admin/src/api/channel/wx_dev.ts b/admin/src/api/channel/wx_dev.ts new file mode 100644 index 00000000..a39ca962 --- /dev/null +++ b/admin/src/api/channel/wx_dev.ts @@ -0,0 +1,11 @@ +import request from '@/utils/request' + +// 微信开发平台配置保存 +export function setWxDevConfig(params: any) { + return request.post({ url: '/channel/wx/save', params }) +} + +// 微信开发平台配置详情 +export function getWxDevConfig() { + return request.get({ url: '/channel/wx/detail' }) +} diff --git a/admin/src/api/channel/wx_oa.ts b/admin/src/api/channel/wx_oa.ts new file mode 100644 index 00000000..fd770cc7 --- /dev/null +++ b/admin/src/api/channel/wx_oa.ts @@ -0,0 +1,11 @@ +import request from '@/utils/request' + +// 微信公众号配置保存 +export function setOaConfig(params: any) { + return request.post({ url: '/channel/oa/save', params }) +} + +// 微信公众号配置详情 +export function getOaConfig() { + return request.get({ url: '/channel/oa/detail' }) +} diff --git a/admin/src/api/consumer.ts b/admin/src/api/consumer.ts new file mode 100644 index 00000000..10577297 --- /dev/null +++ b/admin/src/api/consumer.ts @@ -0,0 +1,16 @@ +import request from '@/utils/request' + +// 用户列表 +export function getUserList(params: any) { + return request.get({ url: '/user/list', params }) +} + +// 用户详情 +export function getUserDetail(params: any) { + return request.get({ url: '/user/detail', params }) +} + +// 用户编辑 +export function userEdit(params: any) { + return request.post({ url: '/user/edit', params }) +} diff --git a/admin/src/api/decoration.ts b/admin/src/api/decoration.ts new file mode 100644 index 00000000..1ecb0cfb --- /dev/null +++ b/admin/src/api/decoration.ts @@ -0,0 +1,21 @@ +import request from '@/utils/request' + +// 页面装修详情 +export function getDecoratePages(params: any) { + return request.get({ url: '/decorate/pages/detail', params }, { ignoreCancelToken: true }) +} + +// 页面装修保存 +export function setDecoratePages(params: any) { + return request.post({ url: '/decorate/pages/save', params }) +} + +// 底部导航详情 +export function getDecorateTabbar(params?: any) { + return request.get({ url: '/decorate/tabbar/detail', params }) +} + +// 底部导航保存 +export function setDecorateTabbar(params: any) { + return request.post({ url: '/decorate/tabbar/save', params }) +} diff --git a/admin/src/api/message.ts b/admin/src/api/message.ts new file mode 100644 index 00000000..8d7ec49e --- /dev/null +++ b/admin/src/api/message.ts @@ -0,0 +1,31 @@ +import request from '@/utils/request' + +// 通知设置列表 +export function noticeLists(params: any) { + return request.get({ url: '/setting/notice/list', params }) +} + +// 通知设置详情 +export function noticeDetail(params: any) { + return request.get({ url: '/setting/notice/detail', params }) +} + +// 通知设置保存 +export function setNoticeConfig(params: any) { + return request.post({ url: '/setting/notice/save', params }) +} + +// 短信设置列表 +export function smsLists() { + return request.get({ url: '/setting/sms/list' }) +} + +// 短信设置详情 +export function smsDetail(params: any) { + return request.get({ url: '/setting/sms/detail', params }) +} + +// 短信设置保存 +export function setSmsConfig(params: any) { + return request.post({ url: '/setting/sms/save', params }) +} diff --git a/admin/src/api/org/department.ts b/admin/src/api/org/department.ts index 6ea09ccb..b4899a0e 100644 --- a/admin/src/api/org/department.ts +++ b/admin/src/api/org/department.ts @@ -19,3 +19,8 @@ export function deptEdit(params: any) { export function deptDelete(params: any) { return request.post({ url: '/system/dept/del', params }) } + +// 部门详情 +export function deptDetail(params?: any) { + return request.get({ url: '/system/dept/detail', params }) +} diff --git a/admin/src/api/org/post.ts b/admin/src/api/org/post.ts index af4d714c..63a15fc1 100644 --- a/admin/src/api/org/post.ts +++ b/admin/src/api/org/post.ts @@ -23,3 +23,8 @@ export function postEdit(params: any) { export function postDelete(params: any) { return request.post({ url: '/system/post/del', params }) } + +// 岗位详情 +export function postDetail(params: any) { + return request.get({ url: '/system/post/detail', params }) +} diff --git a/admin/src/api/perms/menu.ts b/admin/src/api/perms/menu.ts index dc341a6f..577e143f 100644 --- a/admin/src/api/perms/menu.ts +++ b/admin/src/api/perms/menu.ts @@ -19,3 +19,8 @@ export function menuEdit(params: Record) { export function menuDelete(params: Record) { return request.post({ url: '/system/menu/del', params }) } + +// 菜单删除 +export function menuDetail(params: Record) { + return request.get({ url: '/system/menu/detail', params }) +} diff --git a/admin/src/api/setting/search.ts b/admin/src/api/setting/search.ts new file mode 100644 index 00000000..eba0c814 --- /dev/null +++ b/admin/src/api/setting/search.ts @@ -0,0 +1,29 @@ +import request from '@/utils/request' + +/** + * @return { Promise } + * @description 获取热门搜索数据 + */ +export function getSearch() { + return request.get({ url: '/setting/search/detail' }) +} + +export interface List { + name: string // 搜索关键字 + sort: number // 热门搜索排序 +} + +export interface Search { + isHotSearch: number // 是否开启搜索0/1 + list: List[] +} +/** + * @return { Promise } + * @param { Search } Search + * @description 设置热门搜索 + */ +export function setSearch(params: Search) { + return request.post({ url: '/setting/search/save', params }) +} + + diff --git a/admin/src/api/setting/user.ts b/admin/src/api/setting/user.ts new file mode 100644 index 00000000..4b14570e --- /dev/null +++ b/admin/src/api/setting/user.ts @@ -0,0 +1,45 @@ +import request from '@/utils/request' + +/** + * @return { Promise } + * @description 获取用户设置 + */ +export function getUserSetup() { + return request.get({ url: '/setting/user/detail' }) +} + +/** + * @return { Promise } + * @param { string } defaultAvatar 默认用户头像 + * @description 设置用户设置 + */ +export function setUserSetup(params: { defaultAvatar: string }) { + return request.post({ url: '/setting/user/save', params }) +} + +/** + * @return { Promise } + * @description 设置登录注册规则 + */ +export function getLogin() { + return request.get({ url: '/setting/login/detail' }) +} + + +export interface LoginSetup { + loginWay: number[] | any // 登录方式, 逗号隔开 + forceBindMobile: number // 强制绑定手机 0/1 + openAgreement: number // 是否开启协议 0/1 + openOtherAuth: number // 第三方登录 0/1 + autoLoginAuth: number[] | any // 第三方自动登录 逗号隔开 +} +/** + * @return { Promise } + * @param { LoginSetup } LoginSetup + * @description 设置登录注册规则 + */ +export function setLogin(params: LoginSetup) { + return request.post({ url: '/setting/login/save', params }) +} + + diff --git a/admin/src/components/color-picker/index.vue b/admin/src/components/color-picker/index.vue new file mode 100644 index 00000000..ed0bc3e2 --- /dev/null +++ b/admin/src/components/color-picker/index.vue @@ -0,0 +1,33 @@ + + diff --git a/admin/src/components/footer-btns/index.vue b/admin/src/components/footer-btns/index.vue index 1e70409f..eb5aea2c 100644 --- a/admin/src/components/footer-btns/index.vue +++ b/admin/src/components/footer-btns/index.vue @@ -1,21 +1,24 @@ - diff --git a/admin/src/components/link/picker.vue b/admin/src/components/link/picker.vue new file mode 100644 index 00000000..83fe6c06 --- /dev/null +++ b/admin/src/components/link/picker.vue @@ -0,0 +1,49 @@ + + + diff --git a/admin/src/components/link/shop-pages.vue b/admin/src/components/link/shop-pages.vue new file mode 100644 index 00000000..ad7eb1cf --- /dev/null +++ b/admin/src/components/link/shop-pages.vue @@ -0,0 +1,52 @@ + + + diff --git a/admin/src/components/material/picker.vue b/admin/src/components/material/picker.vue index 0f6f6162..adb1470c 100644 --- a/admin/src/components/material/picker.vue +++ b/admin/src/components/material/picker.vue @@ -22,7 +22,7 @@ > @@ -41,7 +41,8 @@ v-show="showUpload" :class="{ 'is-disabled': disabled, - 'is-one': limit == 1 + 'is-one': limit == 1, + [uploadClass]: true }" > @@ -81,6 +82,7 @@ import Popup from '@/components/popup/index.vue' import FileItem from './file.vue' import Material from './index.vue' import Preview from './preview.vue' +import useAppStore from '@/stores/modules/app' export default defineComponent({ components: { Popup, @@ -123,6 +125,15 @@ export default defineComponent({ hiddenUpload: { type: Boolean, default: false + }, + uploadClass: { + type: String, + default: '' + }, + //选择的url排出域名 + excludeDomain: { + type: Boolean, + default: false } }, @@ -137,6 +148,7 @@ export default defineComponent({ const isAdd = ref(true) const currentIndex = ref(-1) const { disabled, limit, modelValue } = toRefs(props) + const { getImageUrl } = useAppStore() const tipsText = computed(() => { switch (props.type) { case 'image': @@ -159,7 +171,9 @@ export default defineComponent({ return limit.value - fileList.value.length }) const handleConfirm = () => { - const selectUri = select.value.map((item) => item.uri) + const selectUri = select.value.map((item) => + props.excludeDomain ? item.path : item.uri + ) if (!isAdd.value) { fileList.value.splice(currentIndex.value, 1, selectUri.shift()) } else { @@ -229,7 +243,8 @@ export default defineComponent({ previewUrl, showPreview, handlePreview, - handleClose + handleClose, + getImageUrl } } }) @@ -269,8 +284,8 @@ export default defineComponent({ } } .material-upload { - .upload-btn { - @apply box-border rounded border-br border-dashed border flex flex-col justify-center items-center; + :deep(.upload-btn) { + @apply text-tx-secondary box-border rounded border-br border-dashed border flex flex-col justify-center items-center; } } } diff --git a/admin/src/components/popover-input/index.vue b/admin/src/components/popover-input/index.vue new file mode 100644 index 00000000..a95d5a26 --- /dev/null +++ b/admin/src/components/popover-input/index.vue @@ -0,0 +1,108 @@ + + + + + diff --git a/admin/src/components/upload/index.vue b/admin/src/components/upload/index.vue index 8a7a9e4e..53794493 100644 --- a/admin/src/components/upload/index.vue +++ b/admin/src/components/upload/index.vue @@ -22,7 +22,7 @@ :close-on-click-modal="false" width="500px" :modal="false" - :before-close="handleClose" + @close="handleClose" >
diff --git a/admin/src/views/organization/department/index.vue b/admin/src/views/organization/department/index.vue index 1eddc73d..9bf0ea28 100644 --- a/admin/src/views/organization/department/index.vue +++ b/admin/src/views/organization/department/index.vue @@ -128,10 +128,11 @@ const handleEdit = async (data: any) => { showEdit.value = true await nextTick() editRef.value?.open('edit') - editRef.value?.setFormData(data) + editRef.value?.getDetail(data) } const handleDelete = async (id: number) => { + await feedback.confirm('确定要删除?') await deptDelete({ id }) feedback.msgSuccess('删除成功') getLists() diff --git a/admin/src/views/organization/post/edit.vue b/admin/src/views/organization/post/edit.vue index 00b9c577..70d08e66 100644 --- a/admin/src/views/organization/post/edit.vue +++ b/admin/src/views/organization/post/edit.vue @@ -39,8 +39,9 @@ diff --git a/admin/src/views/organization/post/index.vue b/admin/src/views/organization/post/index.vue index 39592a61..afa742ce 100644 --- a/admin/src/views/organization/post/index.vue +++ b/admin/src/views/organization/post/index.vue @@ -73,6 +73,7 @@ diff --git a/admin/src/views/permission/menu/index.vue b/admin/src/views/permission/menu/index.vue index 5abbe675..a3e398d0 100644 --- a/admin/src/views/permission/menu/index.vue +++ b/admin/src/views/permission/menu/index.vue @@ -129,12 +129,13 @@ const handleEdit = async (data: any) => { showEdit.value = true await nextTick() editRef.value?.open('edit') - editRef.value?.setFormData(data) + editRef.value?.getDetail(data) } const handleDelete = async (id: number) => { await feedback.confirm('确定要删除?') await menuDelete({ id }) + feedback.msgSuccess('删除成功') getLists() } diff --git a/admin/src/views/setting/dict/type/index.vue b/admin/src/views/setting/dict/type/index.vue index eb1b4884..eea3caa1 100644 --- a/admin/src/views/setting/dict/type/index.vue +++ b/admin/src/views/setting/dict/type/index.vue @@ -76,7 +76,7 @@ link @click=" $router.push({ - path: '/setting/dict/data', + path: getRoutePath('setting:dict:data:list'), query: { type: row.dictType } @@ -109,6 +109,7 @@ + + \ No newline at end of file diff --git a/admin/src/views/setting/storage/edit.vue b/admin/src/views/setting/storage/edit.vue index c01c4bb8..c56cd27e 100644 --- a/admin/src/views/setting/storage/edit.vue +++ b/admin/src/views/setting/storage/edit.vue @@ -67,6 +67,7 @@ import { storageSetup } from '@/api/setting/storage' import type { FormInstance } from 'element-plus' import Popup from '@/components/popup/index.vue' import { storageDetail } from '@/api/setting/storage' +import feedback from '@/utils/feedback' enum StorageEnum { LOCAL = 'local', // 本地 QINIU = 'qiniu', // 七牛云 @@ -155,6 +156,7 @@ const getStorageInfo = computed(() => { const handleSubmit = async () => { await formRef.value?.validate() await storageSetup(formData) + feedback.msgSuccess('操作成功') popupRef.value?.close() emit('success') } diff --git a/admin/src/views/setting/user/login_register.vue b/admin/src/views/setting/user/login_register.vue new file mode 100644 index 00000000..d9d8f636 --- /dev/null +++ b/admin/src/views/setting/user/login_register.vue @@ -0,0 +1,166 @@ + + + + + + diff --git a/admin/src/views/setting/user/setup.vue b/admin/src/views/setting/user/setup.vue new file mode 100644 index 00000000..c79b2787 --- /dev/null +++ b/admin/src/views/setting/user/setup.vue @@ -0,0 +1,64 @@ + + + + + + diff --git a/admin/src/views/setting/website/filing.vue b/admin/src/views/setting/website/filing.vue index c4a32dde..ceadac77 100644 --- a/admin/src/views/setting/website/filing.vue +++ b/admin/src/views/setting/website/filing.vue @@ -2,7 +2,7 @@