diff --git a/.vscode/settings.json b/.vscode/settings.json index e099f81..4393ffe 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -41,5 +41,6 @@ ], "interline-translate.knownPopularWordCount": 6000, "iconify.annotations": true, - "iconify.inplace": true + "iconify.inplace": true, + "vue3snippets.enable-compile-vue-file-on-did-save-code": false } diff --git a/README.md b/README.md index 459296c..bfd8250 100644 --- a/README.md +++ b/README.md @@ -59,6 +59,10 @@ We recommend using [VS Code](https://code.visualstudio.com/) with [Volar](https: - [vitesse-nuxt-bridge](https://github.com/antfu/vitesse-nuxt-bridge) - Vitesse for Nuxt 2 with Bridge - [vitesse-webext](https://github.com/antfu/vitesse-webext) - WebExtension Vite starter template +## rich text + +- [wangEditor](https://www.wangeditor.com/v5/for-frame.html#%E5%AE%89%E8%A3%85-1) - Opinionated Astro Starter Template + ## Try it now! ### Online diff --git a/app/api/common.ts b/app/api/common.ts index 1eb8954..adafe81 100644 --- a/app/api/common.ts +++ b/app/api/common.ts @@ -1,6 +1,6 @@ +import type { ApiResponse, PaginationParams, PaginationResponse } from '~/types/api' // api/common.ts import request from '~/utils/request' -import type { ApiResponse, PaginationParams, PaginationResponse } from '~/types/api' export const commonApi = { // 上传文件 @@ -9,13 +9,18 @@ export const commonApi = { formData.append('file', file) return request.post>('/upload', formData, { headers: { - 'Content-Type': 'multipart/form-data' - } + 'Content-Type': 'multipart/form-data', + }, }) }, // 获取配置信息 getConfig() { return request.get>>('/config') - } -} \ No newline at end of file + }, + + // 获取用户字典 + dictType(query: any) { + return request.get>>(`/system/dict/data/type/${query.type}`) + }, +} diff --git a/app/assets/img/alipay.png b/app/assets/img/alipay.png new file mode 100644 index 0000000..eb73f62 Binary files /dev/null and b/app/assets/img/alipay.png differ diff --git a/app/assets/img/heart.png b/app/assets/img/heart.png new file mode 100644 index 0000000..e1c3a21 Binary files /dev/null and b/app/assets/img/heart.png differ diff --git a/app/components.d.ts b/app/components.d.ts index f3bfd85..8d450bb 100644 --- a/app/components.d.ts +++ b/app/components.d.ts @@ -10,17 +10,33 @@ declare module 'vue' { NAvatar: typeof import('naive-ui')['NAvatar'] NBadge: typeof import('naive-ui')['NBadge'] NButton: typeof import('naive-ui')['NButton'] + NCarousel: typeof import('naive-ui')['NCarousel'] + NCascader: typeof import('naive-ui')['NCascader'] + NCheckbox: typeof import('naive-ui')['NCheckbox'] + NCheckboxGroup: typeof import('naive-ui')['NCheckboxGroup'] + NConfigProvider: typeof import('naive-ui')['NConfigProvider'] + NDatePicker: typeof import('naive-ui')['NDatePicker'] NDropdown: typeof import('naive-ui')['NDropdown'] + NEllipsis: typeof import('naive-ui')['NEllipsis'] + NEmpty: typeof import('naive-ui')['NEmpty'] + NFor: typeof import('naive-ui')['NFor'] NForm: typeof import('naive-ui')['NForm'] NFormItem: typeof import('naive-ui')['NFormItem'] - NFormTtem: typeof import('naive-ui')['NFormTtem'] NIcon: typeof import('naive-ui')['NIcon'] + NInfiniteScroll: typeof import('naive-ui')['NInfiniteScroll'] NInput: typeof import('naive-ui')['NInput'] - NInputgroup: typeof import('naive-ui')['NInputgroup'] NInputGroup: typeof import('naive-ui')['NInputGroup'] + NMessageProvider: typeof import('naive-ui')['NMessageProvider'] NModal: typeof import('naive-ui')['NModal'] NQrCode: typeof import('naive-ui')['NQrCode'] + NRadio: typeof import('naive-ui')['NRadio'] + NRadioButton: typeof import('naive-ui')['NRadioButton'] + NRadioGroup: typeof import('naive-ui')['NRadioGroup'] + NSelect: typeof import('naive-ui')['NSelect'] NSpace: typeof import('naive-ui')['NSpace'] + NTabPane: typeof import('naive-ui')['NTabPane'] + NTabs: typeof import('naive-ui')['NTabs'] + NTooltip: typeof import('naive-ui')['NTooltip'] RouterLink: typeof import('vue-router')['RouterLink'] RouterView: typeof import('vue-router')['RouterView'] } diff --git a/app/components/Authentication.vue b/app/components/Authentication.vue new file mode 100644 index 0000000..6cb095e --- /dev/null +++ b/app/components/Authentication.vue @@ -0,0 +1,163 @@ + + + + + diff --git a/app/components/BaseComment.vue b/app/components/BaseComment.vue new file mode 100644 index 0000000..7ac8ecb --- /dev/null +++ b/app/components/BaseComment.vue @@ -0,0 +1,599 @@ + + + + + diff --git a/app/components/EditUserInfo.vue b/app/components/EditUserInfo.vue new file mode 100644 index 0000000..4e14f35 --- /dev/null +++ b/app/components/EditUserInfo.vue @@ -0,0 +1,180 @@ + + + + + diff --git a/app/components/GlobalConfig.vue b/app/components/GlobalConfig.vue index 244355f..f58ec3e 100644 --- a/app/components/GlobalConfig.vue +++ b/app/components/GlobalConfig.vue @@ -1,18 +1,18 @@ - - \ No newline at end of file + + + diff --git a/app/components/Header.vue b/app/components/Header.vue new file mode 100644 index 0000000..36dee94 --- /dev/null +++ b/app/components/Header.vue @@ -0,0 +1,336 @@ + + + + + diff --git a/app/components/HeaderSearchInput.vue b/app/components/HeaderSearchInput.vue new file mode 100644 index 0000000..493b19a --- /dev/null +++ b/app/components/HeaderSearchInput.vue @@ -0,0 +1,50 @@ + + + + + + diff --git a/app/components/IntPayment.vue b/app/components/IntPayment.vue new file mode 100644 index 0000000..6203bb4 --- /dev/null +++ b/app/components/IntPayment.vue @@ -0,0 +1,238 @@ + + + + + diff --git a/app/components/LoginModal.vue b/app/components/LoginModal.vue index 6dd8e3b..d757015 100644 --- a/app/components/LoginModal.vue +++ b/app/components/LoginModal.vue @@ -1,100 +1,101 @@ --> -
- 测试按钮-3-3 - + + 测试按钮-3-3 + +
- diff --git a/app/pages/member-center/index.vue b/app/pages/member-center/index.vue index 62337ba..3b4e8dd 100644 --- a/app/pages/member-center/index.vue +++ b/app/pages/member-center/index.vue @@ -1,55 +1,497 @@ \ No newline at end of file + diff --git a/app/pages/message/index.vue b/app/pages/message/index.vue new file mode 100644 index 0000000..79eafde --- /dev/null +++ b/app/pages/message/index.vue @@ -0,0 +1,272 @@ + + + + diff --git a/app/pages/model-details/[id].vue b/app/pages/model-details/[id].vue new file mode 100644 index 0000000..10a5f2f --- /dev/null +++ b/app/pages/model-details/[id].vue @@ -0,0 +1,462 @@ + + + + + diff --git a/app/pages/model-square.vue b/app/pages/model-square.vue index 1146f9e..dd8d0ef 100644 --- a/app/pages/model-square.vue +++ b/app/pages/model-square.vue @@ -1,12 +1,246 @@ +import { commonApi } from "@/api/common"; +import { ArrowBack, ArrowForward } from '@vicons/ionicons5'; +import { ref } from "vue"; +definePageMeta({ + layout: "default", +}); +const params = ref({ + name: null, + order: null, + type: null +}) +// const hotNameList = ref([ +// '哪吒', +// '电商', +// '产品', +// '海报', +// '国潮', +// '写真', +// '推文', +// 'XL', +// ]) +const listRef = ref(null); +// function handleSearch() { +// onSearch() +// } +const modelCategoryList = ref([]); +async function getDictType() { + try { + const res = await commonApi.dictType({ type: "model_child_category" }); + if (res.code === 200) { + modelCategoryList.value = res.data; + } + } catch (error) { + console.log(error); + } +} +getDictType(); + +//执行搜索的时候 +function onSearch() { + if (listRef.value) { + listRef.value?.initPageNUm(); + } +} +// 切换类型 +function changeCategory(item:any){ + params.value.type = item.dictValue + onSearch() +} + +// function onHot(name:string){ +// params.value.name = name +// onSearch() +// } + \ No newline at end of file + + diff --git a/app/pages/personal-center/index.vue b/app/pages/personal-center/index.vue new file mode 100644 index 0000000..2eaccac --- /dev/null +++ b/app/pages/personal-center/index.vue @@ -0,0 +1,568 @@ + + + + + diff --git a/app/pages/picture-square.vue b/app/pages/picture-square.vue new file mode 100644 index 0000000..3a3194d --- /dev/null +++ b/app/pages/picture-square.vue @@ -0,0 +1,189 @@ + + + diff --git a/app/pages/publish-model/index.vue b/app/pages/publish-model/index.vue new file mode 100644 index 0000000..64beb33 --- /dev/null +++ b/app/pages/publish-model/index.vue @@ -0,0 +1,166 @@ + + + diff --git a/app/pages/publish-workflow/index.vue b/app/pages/publish-workflow/index.vue new file mode 100644 index 0000000..960975c --- /dev/null +++ b/app/pages/publish-workflow/index.vue @@ -0,0 +1,135 @@ + + + diff --git a/app/pages/publishDetails/[id].vue b/app/pages/publishDetails/[id].vue deleted file mode 100644 index 2cdcc64..0000000 --- a/app/pages/publishDetails/[id].vue +++ /dev/null @@ -1,48 +0,0 @@ - - - diff --git a/app/pages/work-square.vue b/app/pages/work-square.vue new file mode 100644 index 0000000..f90fd85 --- /dev/null +++ b/app/pages/work-square.vue @@ -0,0 +1,188 @@ + + + diff --git a/app/pages/workflow-details/[id].vue b/app/pages/workflow-details/[id].vue new file mode 100644 index 0000000..73df4cc --- /dev/null +++ b/app/pages/workflow-details/[id].vue @@ -0,0 +1,458 @@ + + + + + diff --git a/app/plugins/naive-ui.ts b/app/plugins/naive-ui.ts index f116856..ed3ae0e 100644 --- a/app/plugins/naive-ui.ts +++ b/app/plugins/naive-ui.ts @@ -1,20 +1,21 @@ -import { setup } from '@css-render/vue3-ssr' import { defineNuxtPlugin } from '#app' +import { setup } from '@css-render/vue3-ssr' export default defineNuxtPlugin((nuxtApp) => { - if (process.server) { + if (import.meta.server) { const { collect } = setup(nuxtApp.vueApp) const originalRenderMeta = nuxtApp.ssrContext?.renderMeta nuxtApp.ssrContext!.renderMeta = () => { if (!originalRenderMeta) { return { - headTags: collect() + headTags: collect(), } } const originalMeta = originalRenderMeta() if ('headTags' in originalMeta) { originalMeta.headTags += collect() - } else { + } + else { originalMeta.headTags = collect() } return originalMeta @@ -22,19 +23,18 @@ export default defineNuxtPlugin((nuxtApp) => { } const { collect } = setup(nuxtApp.vueApp) - useServerHead({ - style: () => { - const stylesString = collect() - const stylesArray = stylesString.split(/<\/style>/g).filter(style => style) - return stylesArray.map((styleString: string) => { - const match = styleString.match(/