diff --git a/.gitignore b/.gitignore index 0ecbad37..dbf1a690 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,113 @@ -node_modules -.DS_Store +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +lerna-debug.log* + +# Diagnostic reports (https://nodejs.org/api/report.html) +report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json + +# Runtime data +pids +*.pid +*.seed +*.pid.lock + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage +*.lcov + +# nyc test coverage +.nyc_output + +# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# Bower dependency directory (https://bower.io/) +bower_components + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (https://nodejs.org/api/addons.html) +build/Release + +# Dependency directories +node_modules/ +jspm_packages/ + +# TypeScript v1 declaration files +typings/ + +# TypeScript cache +*.tsbuildinfo + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Microbundle cache +.rpt2_cache/ +.rts2_cache_cjs/ +.rts2_cache_es/ +.rts2_cache_umd/ + +# Optional REPL history +.node_repl_history + +# Output of 'npm pack' +*.tgz + +# Yarn Integrity file +.yarn-integrity + +# dotenv environment variables file +.env +.env.local +.env.test +.env.production + +# parcel-bundler cache (https://parceljs.org/) +.cache + +# Next.js build output +.next + +# Nuxt.js build / generate output +.nuxt dist -dist-ssr -*.local -yarn-error.log \ No newline at end of file + +# Gatsby files +.cache/ +# Comment in the public line in if your project uses Gatsby and *not* Next.js +# https://nextjs.org/blog/next-9-1#public-directory-support +# public + +# vuepress build output +.vuepress/dist + +# Serverless directories +.serverless/ + +# FuseBox cache +.fusebox/ + +# DynamoDB Local files +.dynamodb/ + +# TernJS port file +.tern-port + +.idea +.DS_Store +package-lock.json + +launch.json +temp \ No newline at end of file diff --git a/README.md b/README.md index a584d4c6..e76c868b 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Data +# Data Frontend ## Setup domain diff --git a/nginx.conf b/nginx.conf index aeb05ea1..e07a5d58 100644 --- a/nginx.conf +++ b/nginx.conf @@ -2,16 +2,6 @@ server { listen 80; server_name localhost; - location /api/v1/me { - proxy_pass https://auth.test.zhishuyun.com/api/v1/me; - proxy_http_version 1.1; - } - - location /api/v1/token { - proxy_pass https://auth.test.zhishuyun.com/api/v1/token; - proxy_http_version 1.1; - } - location /api/ { proxy_pass http://data-backend:8000/api/; proxy_http_version 1.1; diff --git a/package.json b/package.json index 11d871d3..b6dd8342 100644 --- a/package.json +++ b/package.json @@ -2,11 +2,11 @@ "name": "zhishuyun-data", "version": "0.1.0", "scripts": { - "start": "cross-env NODE_ENV=$npm_config_env vite --host", + "start": "cross-env VITE_APP_ENV=$npm_config_env NODE_ENV=$npm_config_env vite --host", "start:local": "npm run start --env=local", "start:test": "npm run start --env=test", "start:production": "npm run start --env=production", - "build": "cross-env NODE_ENV=$npm_config_env vue-tsc --noEmit --skipLibCheck && vite build", + "build": "cross-env VITE_APP_ENV=$npm_config_env NODE_ENV=$npm_config_env vue-tsc --noEmit --skipLibCheck && vite build", "build:local": "npm run build --env=local", "build:test": "npm run build --env=test", "build:production": "npm run build --env=production", diff --git a/src/App.vue b/src/App.vue index 564dc4f2..445070ac 100644 --- a/src/App.vue +++ b/src/App.vue @@ -17,9 +17,6 @@ export default defineComponent({ return { locale: zhCn }; - }, - mounted() { - this.$store.dispatch('getMe'); } }); diff --git a/src/components/api/Code.vue b/src/components/api/Code.vue index 3d320a91..085a6823 100644 --- a/src/components/api/Code.vue +++ b/src/components/api/Code.vue @@ -36,8 +36,6 @@ import javaTemplate from '@/assets/templates/java.tpl'; import CodeSnippet from '../common/CodeSnippet.vue'; import queryString from 'query-string'; -console.log('pythonTemplate', pythonTemplate); - interface IOption { name: ILang; icon: string; diff --git a/src/components/api/Form.vue b/src/components/api/Form.vue index ade089a3..51814101 100644 --- a/src/components/api/Form.vue +++ b/src/components/api/Form.vue @@ -84,7 +84,7 @@ import { defineComponent } from 'vue'; import { ISchema } from '@/operators/api/models'; import { IService } from '@/operators/service/models'; -import { applicationOperator, IApplication, IApplicationListResponse } from '@/operators'; +import { IApplication } from '@/operators'; import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome'; interface IData { @@ -140,7 +140,6 @@ export default defineComponent({ }, methods: { onChange(key: string, val: string) { - console.log('key', key, val); this.value[key] = val; }, onRefreshApplications() { diff --git a/src/components/api/Result.vue b/src/components/api/Result.vue index 61e7570d..1f33938e 100644 --- a/src/components/api/Result.vue +++ b/src/components/api/Result.vue @@ -71,14 +71,11 @@ export default defineComponent({ required: true } }, - // emits: ['change'], data(): IData { return { value: {} }; - }, - watch: {}, - methods: {} + } }); diff --git a/src/components/api/Try.vue b/src/components/api/Try.vue index 1593320c..670ffef1 100644 --- a/src/components/api/Try.vue +++ b/src/components/api/Try.vue @@ -54,7 +54,6 @@ export default defineComponent({ params: { ...this.form.queries }, data: { ...this.form.body } }; - console.debug('config of testing', config); axios(config) .then((response) => { this.loading = false; diff --git a/src/components/api/Usage.vue b/src/components/api/Usage.vue index d29719ae..4f76e0ec 100644 --- a/src/components/api/Usage.vue +++ b/src/components/api/Usage.vue @@ -59,7 +59,6 @@ import ApiResult from './Result.vue'; import urlJoin from 'url-join'; import { applicationOperator } from '@/operators/application/operator'; import { IApplication, IApplicationListResponse } from '@/operators/application/models'; -import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome'; export interface IData { formValue: IForm; diff --git a/src/components/application/PreviewCard.vue b/src/components/application/PreviewCard.vue deleted file mode 100644 index a3fdf683..00000000 --- a/src/components/application/PreviewCard.vue +++ /dev/null @@ -1,182 +0,0 @@ - - - - - diff --git a/src/components/common/SuccessInfo.vue b/src/components/common/SuccessInfo.vue index a1b06df1..bbc8ca3f 100644 --- a/src/components/common/SuccessInfo.vue +++ b/src/components/common/SuccessInfo.vue @@ -18,6 +18,7 @@ export default defineComponent({ default: '' } }, + emits: ['update:show'], watch: { show(val, oldVal) { if (val) { diff --git a/src/components/common/TopHeader.vue b/src/components/common/TopHeader.vue index db2e856d..b390ff4c 100644 --- a/src/components/common/TopHeader.vue +++ b/src/components/common/TopHeader.vue @@ -17,12 +17,14 @@ $t('common.button.login') }} -
+
+
+ {{ $t('common.button.console') }} +