diff --git a/.env.dev b/.env.dev new file mode 100644 index 0000000..9d8fd99 --- /dev/null +++ b/.env.dev @@ -0,0 +1,2 @@ +NODE_ENV = 'development' +VITE_NUXT_ENV = 'http://1.13.246.108:8080/' \ No newline at end of file diff --git a/.env.pro b/.env.pro new file mode 100644 index 0000000..be17dc1 --- /dev/null +++ b/.env.pro @@ -0,0 +1,2 @@ +NODE_ENV = 'production' +VITE_NUXT_ENV = 'http://1.13.246.108:8080/' \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..59aa89e --- /dev/null +++ b/Dockerfile @@ -0,0 +1,24 @@ +FROM node:20-slim --platform=linux/amd64 AS base +ENV TZ=Asia/Shanghai + +WORKDIR /app + +# Build +FROM base AS build + +COPY . . +RUN npm config set registry https://registry.npmmirror.com +RUN npm install -g pnpm +RUN pnpm install --registry=https://registry.npmmirror.com +RUN pnpm run build + +# Run +FROM base + +ENV PORT=3000 +ENV NODE_ENV=production + +COPY --from=build /app/.output /app/.output + +EXPOSE 3000 +CMD [ "node", ".output/server/index.mjs" ] \ No newline at end of file diff --git a/app/components.d.ts b/app/components.d.ts index 8d450bb..9619d73 100644 --- a/app/components.d.ts +++ b/app/components.d.ts @@ -8,18 +8,16 @@ export {} declare module 'vue' { export interface GlobalComponents { NAvatar: typeof import('naive-ui')['NAvatar'] - NBadge: typeof import('naive-ui')['NBadge'] NButton: typeof import('naive-ui')['NButton'] + NCard: typeof import('naive-ui')['NCard'] 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'] NIcon: typeof import('naive-ui')['NIcon'] @@ -30,7 +28,6 @@ declare module 'vue' { 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'] diff --git a/app/components/BaseComment.vue b/app/components/BaseComment.vue index 7ac8ecb..eb2bf5b 100644 --- a/app/components/BaseComment.vue +++ b/app/components/BaseComment.vue @@ -29,7 +29,7 @@ const commentParams = ref({ content: '', parentId: '', replyUserId: '', - userId: userStore.userInfo.userId, + userId: userStore?.userInfo?.userId, workFlowId: props.detailsInfo.id, }) function commentParamsInit() { @@ -44,9 +44,9 @@ const sortType = ref(1) // 获取列表 const urlList = ref({ - workflow: '/WorkFlowComment/comment?', - pictrue: '/imageComment/comment?', - model: '/ModelComment/comment?', + workflow: '/WorkFlowComment/getComment?', + pictrue: '/imageComment/getComment?', + model: '/ModelComment/getComment?', }) // 点赞 const likeList = ref({ @@ -253,10 +253,10 @@ function changeType(type: string) {