Forráskód Böngészése

seperate to base and develop

mike 6 éve
szülő
commit
9f97b16a00
100 módosított fájl, 0 hozzáadás és 18078 törlés
  1. 0 23
      README.md
  2. 0 93
      config/env.js
  3. 0 14
      config/jest/cssTransform.js
  4. 0 30
      config/jest/fileTransform.js
  5. 0 89
      config/paths.js
  6. 0 424
      config/webpack.config.dev.js
  7. 0 539
      config/webpack.config.prod.js
  8. 0 105
      config/webpackDevServer.config.js
  9. 0 34
      doc/struct.md
  10. 0 151
      package.json
  11. 0 30
      public/index.html
  12. BIN
      public/ioo.ico
  13. 0 15
      public/manifest.json
  14. 0 189
      scripts/build.js
  15. 0 117
      scripts/start.js
  16. 0 53
      scripts/test.js
  17. 0 2450
      src/all_graphql.txt
  18. 0 238
      src/app/App.jsx
  19. 0 302
      src/app/basicVersion/BasicVersion.jsx
  20. 0 290
      src/app/basicVersion/caseShow/CaseShow.jsx
  21. 0 205
      src/app/basicVersion/caseShow/CaseShowBackup.js
  22. 0 997
      src/app/basicVersion/caseShow/UserCustom.js
  23. 0 407
      src/app/basicVersion/caseShow/backup.js
  24. 0 168
      src/app/basicVersion/caseShow/index.css
  25. 0 57
      src/app/basicVersion/communication/Communication.jsx
  26. 0 9
      src/app/basicVersion/communication/index.css
  27. 0 0
      src/app/basicVersion/index.css
  28. 0 154
      src/app/basicVersion/myDeploy/AliyunDeploy.js
  29. 0 154
      src/app/basicVersion/myDeploy/AmazonDeploy.js
  30. 0 90
      src/app/basicVersion/myDeploy/MyDeploy.jsx
  31. 0 213
      src/app/basicVersion/myDeploy/TencentDeploy.js
  32. 0 692
      src/app/developVersion/DevelopVersion.jsx
  33. 0 52
      src/app/developVersion/common/Graphiql.jsx
  34. 0 64
      src/app/developVersion/common/deploy/Deploy.jsx
  35. 0 22
      src/app/developVersion/common/deploy/ali/AliConfig.jsx
  36. 0 22
      src/app/developVersion/common/deploy/amazon/AmazonConfig.js
  37. 0 22
      src/app/developVersion/common/deploy/huawei/HuaweiConfig.jsx
  38. 0 69
      src/app/developVersion/common/deploy/index.css
  39. 0 490
      src/app/developVersion/common/deploy/tencent/TencentConfig.js
  40. 0 70
      src/app/developVersion/common/deploy/tencent/apiGroupCard/APIGroupCardFetch.js
  41. 0 396
      src/app/developVersion/common/deploy/tencent/apiGroupCard/APIGroupCardRender.js
  42. 0 85
      src/app/developVersion/common/deploy/tencent/apiPathCard/APIPathCardFetch.js
  43. 0 287
      src/app/developVersion/common/deploy/tencent/apiPathCard/APIPathCardRender.js
  44. 0 75
      src/app/developVersion/common/deploy/tencent/deployCard/DeployCardFetch.js
  45. 0 412
      src/app/developVersion/common/deploy/tencent/deployCard/DeployCardRender.js
  46. 0 53
      src/app/developVersion/common/deploy/tencent/notificationCard/NotificationCardFetch.js
  47. 0 242
      src/app/developVersion/common/deploy/tencent/notificationCard/NotificationCardRender.js
  48. 0 22
      src/app/developVersion/common/manage/AliyunResult.js
  49. 0 22
      src/app/developVersion/common/manage/AmazonResult.js
  50. 0 63
      src/app/developVersion/common/manage/Manage.jsx
  51. 0 403
      src/app/developVersion/common/manage/TencentResult.js
  52. 0 115
      src/app/developVersion/graphqlService/TrialCase.jsx
  53. 0 109
      src/app/developVersion/graphqlService/UserCreate.jsx
  54. 0 24
      src/app/developVersion/graphqlService/component/application/Application.js
  55. 0 19
      src/app/developVersion/graphqlService/component/caseMetabase/CaseMetabase.jsx
  56. 0 3
      src/app/developVersion/graphqlService/component/caseMetabase/index.css
  57. 0 178
      src/app/developVersion/graphqlService/component/generateJs/GenerateJs.jsx
  58. 0 3
      src/app/developVersion/graphqlService/component/generateJs/index.css
  59. 0 89
      src/app/developVersion/graphqlService/component/graphql/Graphql.jsx
  60. 0 1767
      src/app/developVersion/graphqlService/component/graphql/index.css
  61. 0 164
      src/app/developVersion/graphqlService/component/schema/Create.js
  62. 0 801
      src/app/developVersion/graphqlService/component/schema/Schema.jsx
  63. 0 471
      src/app/developVersion/graphqlService/component/schema/Table.js
  64. 0 144
      src/app/developVersion/graphqlService/component/schema/index.css
  65. 0 54
      src/app/developVersion/graphqlService/dataAnalysis/DataAnalysis.jsx
  66. 0 15
      src/app/developVersion/graphqlService/dataAnalysis/metabase/Metabase.jsx
  67. 0 58
      src/app/developVersion/graphqlService/dataStorage/DataStorage.jsx
  68. 0 14
      src/app/developVersion/graphqlService/dataStorage/databaseSetting/DatabaseSetting.jsx
  69. 0 83
      src/app/developVersion/index.css
  70. 0 63
      src/app/developVersion/quantService/QuantService.jsx
  71. 0 17
      src/app/developVersion/quantService/quantConfig/QuantConfig.jsx
  72. 0 16
      src/app/developVersion/quantService/quantManage/QuantManage.jsx
  73. 0 72
      src/app/developVersion/wechatService/WxTrialCase.js
  74. 0 94
      src/app/developVersion/wechatService/WxUserCreate.js
  75. 0 370
      src/app/developVersion/wechatService/wxConfig/WxConfig.jsx
  76. 0 5
      src/app/developVersion/wechatService/wxConfig/index.css
  77. 0 178
      src/app/developVersion/wechatService/wxCreate/WxCreate.js
  78. 0 3
      src/app/developVersion/wechatService/wxCreate/index.css
  79. 0 114
      src/app/index.css
  80. 0 1
      src/app/user/User.js
  81. 0 0
      src/app/user/index.css
  82. 0 162
      src/case/BillApp/src/App.js
  83. 0 57
      src/case/BillApp/src/api/graphql/account.js
  84. 0 65
      src/case/BillApp/src/api/graphql/assets.js
  85. 0 70
      src/case/BillApp/src/api/graphql/bills.js
  86. 0 50
      src/case/BillApp/src/api/graphql/class.js
  87. 0 51
      src/case/BillApp/src/api/graphql/tag.js
  88. 0 13
      src/case/BillApp/src/api/graphql_request.js
  89. 0 507
      src/case/BillApp/src/api/js.txt
  90. 0 9
      src/case/BillApp/src/api/url_config.js
  91. 0 86
      src/case/BillApp/src/components/Account/Account.jsx
  92. 0 100
      src/case/BillApp/src/components/App/App.css
  93. 0 133
      src/case/BillApp/src/components/App/TabBarBottom.jsx
  94. 0 66
      src/case/BillApp/src/components/Assets/Assets.jsx
  95. 0 165
      src/case/BillApp/src/components/Bill/Bill.jsx
  96. 0 21
      src/case/BillApp/src/components/Bill/TabBar.jsx
  97. 0 41
      src/case/BillApp/src/components/BillDetail/BillDetail.css
  98. 0 116
      src/case/BillApp/src/components/BillDetail/BillDetail.jsx
  99. 0 88
      src/case/BillApp/src/components/Create_assets/Create_assets.jsx
  100. 0 31
      src/case/BillApp/src/components/HomePage/HomePage.css

+ 0 - 23
README.md

@@ -1,23 +0,0 @@
-# online (workbench)
-### PORT
-* font-end -> 3999
-* backend -> 8999
-* graphql -> 3000
-
-### URI
-* graphql-local: http://localhost:3000/ql
-* graphiql-local: http://localhost:3000/graphql
-* fc-tencent: http://service-28dm054z-1254337200.ap-shanghai.apigateway.myqcloud.com/release/graphql
-* graphiql-tencent: http://123.206.193.98:3000/ql
-
-### TODO
-* a lot, cannot list
-
-### Server
-1. Read 'readme' at 123.206.193.98/home/ioobot/.
-2. Use 'pm2' and 'screen'
-
-### DEV
-1. git clone
-2. sudo cnpm install (cnpm is better)
-3. npm run start / yarn start

+ 0 - 93
config/env.js

@@ -1,93 +0,0 @@
-'use strict';
-
-const fs = require('fs');
-const path = require('path');
-const paths = require('./paths');
-
-// Make sure that including paths.js after env.js will read .env variables.
-delete require.cache[require.resolve('./paths')];
-
-const NODE_ENV = process.env.NODE_ENV;
-if (!NODE_ENV) {
-  throw new Error(
-    'The NODE_ENV environment variable is required but was not specified.'
-  );
-}
-
-// https://github.com/bkeepers/dotenv#what-other-env-files-can-i-use
-var dotenvFiles = [
-  `${paths.dotenv}.${NODE_ENV}.local`,
-  `${paths.dotenv}.${NODE_ENV}`,
-  // Don't include `.env.local` for `test` environment
-  // since normally you expect tests to produce the same
-  // results for everyone
-  NODE_ENV !== 'test' && `${paths.dotenv}.local`,
-  paths.dotenv,
-].filter(Boolean);
-
-// Load environment variables from .env* files. Suppress warnings using silent
-// if this file is missing. dotenv will never modify any environment variables
-// that have already been set.  Variable expansion is supported in .env files.
-// https://github.com/motdotla/dotenv
-// https://github.com/motdotla/dotenv-expand
-dotenvFiles.forEach(dotenvFile => {
-  if (fs.existsSync(dotenvFile)) {
-    require('dotenv-expand')(
-      require('dotenv').config({
-        path: dotenvFile,
-      })
-    );
-  }
-});
-
-// We support resolving modules according to `NODE_PATH`.
-// This lets you use absolute paths in imports inside large monorepos:
-// https://github.com/facebook/create-react-app/issues/253.
-// It works similar to `NODE_PATH` in Node itself:
-// https://nodejs.org/api/modules.html#modules_loading_from_the_global_folders
-// Note that unlike in Node, only *relative* paths from `NODE_PATH` are honored.
-// Otherwise, we risk importing Node.js core modules into an app instead of Webpack shims.
-// https://github.com/facebook/create-react-app/issues/1023#issuecomment-265344421
-// We also resolve them to make sure all tools using them work consistently.
-const appDirectory = fs.realpathSync(process.cwd());
-process.env.NODE_PATH = (process.env.NODE_PATH || '')
-  .split(path.delimiter)
-  .filter(folder => folder && !path.isAbsolute(folder))
-  .map(folder => path.resolve(appDirectory, folder))
-  .join(path.delimiter);
-
-// Grab NODE_ENV and REACT_APP_* environment variables and prepare them to be
-// injected into the application via DefinePlugin in Webpack configuration.
-const REACT_APP = /^REACT_APP_/i;
-
-function getClientEnvironment(publicUrl) {
-  const raw = Object.keys(process.env)
-    .filter(key => REACT_APP.test(key))
-    .reduce(
-      (env, key) => {
-        env[key] = process.env[key];
-        return env;
-      },
-      {
-        // Useful for determining whether we’re running in production mode.
-        // Most importantly, it switches React into the correct mode.
-        NODE_ENV: process.env.NODE_ENV || 'development',
-        // Useful for resolving the correct path to static assets in `public`.
-        // For example, <img src={process.env.PUBLIC_URL + '/img/logo.png'} />.
-        // This should only be used as an escape hatch. Normally you would put
-        // images into the `src` and `import` them in code to get their paths.
-        PUBLIC_URL: publicUrl,
-      }
-    );
-  // Stringify all values so we can feed into Webpack DefinePlugin
-  const stringified = {
-    'process.env': Object.keys(raw).reduce((env, key) => {
-      env[key] = JSON.stringify(raw[key]);
-      return env;
-    }, {}),
-  };
-
-  return { raw, stringified };
-}
-
-module.exports = getClientEnvironment;

+ 0 - 14
config/jest/cssTransform.js

@@ -1,14 +0,0 @@
-'use strict';
-
-// This is a custom Jest transformer turning style imports into empty objects.
-// http://facebook.github.io/jest/docs/en/webpack.html
-
-module.exports = {
-  process() {
-    return 'module.exports = {};';
-  },
-  getCacheKey() {
-    // The output is always the same.
-    return 'cssTransform';
-  },
-};

+ 0 - 30
config/jest/fileTransform.js

@@ -1,30 +0,0 @@
-'use strict';
-
-const path = require('path');
-
-// This is a custom Jest transformer turning file imports into filenames.
-// http://facebook.github.io/jest/docs/en/webpack.html
-
-module.exports = {
-  process(src, filename) {
-    const assetFilename = JSON.stringify(path.basename(filename));
-
-    if (filename.match(/\.svg$/)) {
-      return `module.exports = {
-        __esModule: true,
-        default: ${assetFilename},
-        ReactComponent: (props) => ({
-          $$typeof: Symbol.for('react.element'),
-          type: 'svg',
-          ref: null,
-          key: null,
-          props: Object.assign({}, props, {
-            children: ${assetFilename}
-          })
-        }),
-      };`;
-    }
-
-    return `module.exports = ${assetFilename};`;
-  },
-};

+ 0 - 89
config/paths.js

@@ -1,89 +0,0 @@
-'use strict';
-
-const path = require('path');
-const fs = require('fs');
-const url = require('url');
-
-// Make sure any symlinks in the project folder are resolved:
-// https://github.com/facebook/create-react-app/issues/637
-const appDirectory = fs.realpathSync(process.cwd());
-const resolveApp = relativePath => path.resolve(appDirectory, relativePath);
-
-const envPublicUrl = process.env.PUBLIC_URL;
-
-function ensureSlash(inputPath, needsSlash) {
-  const hasSlash = inputPath.endsWith('/');
-  if (hasSlash && !needsSlash) {
-    return inputPath.substr(0, inputPath.length - 1);
-  } else if (!hasSlash && needsSlash) {
-    return `${inputPath}/`;
-  } else {
-    return inputPath;
-  }
-}
-
-const getPublicUrl = appPackageJson =>
-  envPublicUrl || require(appPackageJson).homepage;
-
-// We use `PUBLIC_URL` environment variable or "homepage" field to infer
-// "public path" at which the app is served.
-// Webpack needs to know it to put the right <script> hrefs into HTML even in
-// single-page apps that may serve index.html for nested URLs like /todos/42.
-// We can't use a relative path in HTML because we don't want to load something
-// like /todos/42/static/js/bundle.7289d.js. We have to know the root.
-function getServedPath(appPackageJson) {
-  const publicUrl = getPublicUrl(appPackageJson);
-  const servedUrl =
-    envPublicUrl || (publicUrl ? url.parse(publicUrl).pathname : '/');
-  return ensureSlash(servedUrl, true);
-}
-
-const moduleFileExtensions = [
-  'web.mjs',
-  'mjs',
-  'web.js',
-  'js',
-  'web.ts',
-  'ts',
-  'web.tsx',
-  'tsx',
-  'json',
-  'web.jsx',
-  'jsx',
-];
-
-// Resolve file paths in the same order as webpack
-const resolveModule = (resolveFn, filePath) => {
-  const extension = moduleFileExtensions.find(extension =>
-    fs.existsSync(resolveFn(`${filePath}.${extension}`))
-  );
-
-  if (extension) {
-    return resolveFn(`${filePath}.${extension}`);
-  }
-
-  return resolveFn(`${filePath}.js`);
-};
-
-// config after eject: we're in ./config/
-module.exports = {
-  dotenv: resolveApp('.env'),
-  appPath: resolveApp('.'),
-  appBuild: resolveApp('build'),
-  appPublic: resolveApp('public'),
-  appHtml: resolveApp('public/index.html'),
-  appIndexJs: resolveModule(resolveApp, 'src/index'),
-  appPackageJson: resolveApp('package.json'),
-  appSrc: resolveApp('src'),
-  appTsConfig: resolveApp('tsconfig.json'),
-  yarnLockFile: resolveApp('yarn.lock'),
-  testsSetup: resolveModule(resolveApp, 'src/setupTests'),
-  proxySetup: resolveApp('src/setupProxy.js'),
-  appNodeModules: resolveApp('node_modules'),
-  publicUrl: getPublicUrl(resolveApp('package.json')),
-  servedPath: getServedPath(resolveApp('package.json')),
-};
-
-
-
-module.exports.moduleFileExtensions = moduleFileExtensions;

+ 0 - 424
config/webpack.config.dev.js

@@ -1,424 +0,0 @@
-'use strict';
-
-const fs = require('fs');
-const path = require('path');
-const resolve = require('resolve');
-const webpack = require('webpack');
-const PnpWebpackPlugin = require('pnp-webpack-plugin');
-const HtmlWebpackPlugin = require('html-webpack-plugin');
-const CaseSensitivePathsPlugin = require('case-sensitive-paths-webpack-plugin');
-const InterpolateHtmlPlugin = require('react-dev-utils/InterpolateHtmlPlugin');
-const WatchMissingNodeModulesPlugin = require('react-dev-utils/WatchMissingNodeModulesPlugin');
-const ModuleScopePlugin = require('react-dev-utils/ModuleScopePlugin');
-const getCSSModuleLocalIdent = require('react-dev-utils/getCSSModuleLocalIdent');
-const getClientEnvironment = require('./env');
-const paths = require('./paths');
-const ManifestPlugin = require('webpack-manifest-plugin');
-const ModuleNotFoundPlugin = require('react-dev-utils/ModuleNotFoundPlugin');
-const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin-alt');
-const typescriptFormatter = require('react-dev-utils/typescriptFormatter');
-
-
-// Webpack uses `publicPath` to determine where the app is being served from.
-// In development, we always serve from the root. This makes config easier.
-const publicPath = '/';
-// `publicUrl` is just like `publicPath`, but we will provide it to our app
-// as %PUBLIC_URL% in `index.html` and `process.env.PUBLIC_URL` in JavaScript.
-// Omit trailing slash as %PUBLIC_PATH%/xyz looks better than %PUBLIC_PATH%xyz.
-const publicUrl = '';
-// Get environment variables to inject into our app.
-const env = getClientEnvironment(publicUrl);
-
-// Check if TypeScript is setup
-const useTypeScript = fs.existsSync(paths.appTsConfig);
-
-// style files regexes
-const cssRegex = /\.css$/;
-const cssModuleRegex = /\.module\.css$/;
-const sassRegex = /\.(scss|sass)$/;
-const sassModuleRegex = /\.module\.(scss|sass)$/;
-
-// common function to get style loaders
-const getStyleLoaders = (cssOptions, preProcessor) => {
-    const loaders = [
-        require.resolve('style-loader'),
-        {
-            loader: require.resolve('css-loader'),
-            options: cssOptions,
-        },
-        {
-            // Options for PostCSS as we reference these options twice
-            // Adds vendor prefixing based on your specified browser support in
-            // package.json
-            loader: require.resolve('postcss-loader'),
-            options: {
-                // Necessary for external CSS imports to work
-                // https://github.com/facebook/create-react-app/issues/2677
-                ident: 'postcss',
-                plugins: () => [
-                    require('postcss-flexbugs-fixes'),
-                    require('postcss-preset-env')({
-                        autoprefixer: {
-                            flexbox: 'no-2009',
-                        },
-                        stage: 3,
-                    }),
-                ],
-            },
-        },
-    ];
-    if (preProcessor) {
-        loaders.push(require.resolve(preProcessor));
-    }
-    return loaders;
-};
-
-// This is the development configuration.
-// It is focused on developer experience and fast rebuilds.
-// The production configuration is different and lives in a separate file.
-module.exports = {
-    mode: 'development',
-    // You may want 'eval' instead if you prefer to see the compiled output in DevTools.
-    // See the discussion in https://github.com/facebook/create-react-app/issues/343
-    devtool: 'cheap-module-source-map',
-    // These are the "entry points" to our application.
-    // This means they will be the "root" imports that are included in JS bundle.
-    entry: [
-        // Include an alternative client for WebpackDevServer. A client's job is to
-        // connect to WebpackDevServer by a socket and get notified about changes.
-        // When you save a file, the client will either apply hot updates (in case
-        // of CSS changes), or refresh the page (in case of JS changes). When you
-        // make a syntax error, this client will display a syntax error overlay.
-        // Note: instead of the default WebpackDevServer client, we use a custom one
-        // to bring better experience for Create React App users. You can replace
-        // the line below with these two lines if you prefer the stock client:
-        // require.resolve('webpack-dev-server/client') + '?/',
-        // require.resolve('webpack/hot/dev-server'),
-        require.resolve('react-dev-utils/webpackHotDevClient'),
-        // Finally, this is your app's code:
-        paths.appIndexJs,
-        // We include the app code last so that if there is a runtime error during
-        // initialization, it doesn't blow up the WebpackDevServer client, and
-        // changing JS code would still trigger a refresh.
-    ],
-    output: {
-        // Add /* filename */ comments to generated require()s in the output.
-        pathinfo: true,
-        // This does not produce a real file. It's just the virtual path that is
-        // served by WebpackDevServer in development. This is the JS bundle
-        // containing code from all our entry points, and the Webpack runtime.
-        filename: 'static/js/bundle.js',
-        // There are also additional JS chunk files if you use code splitting.
-        chunkFilename: 'static/js/[name].chunk.js',
-        // This is the URL that app is served from. We use "/" in development.
-        publicPath: publicPath,
-        // Point sourcemap entries to original disk location (format as URL on Windows)
-        devtoolModuleFilenameTemplate: info =>
-            path.resolve(info.absoluteResourcePath).replace(/\\/g, '/'),
-    },
-    optimization: {
-        // Automatically split vendor and commons
-        // https://twitter.com/wSokra/status/969633336732905474
-        // https://medium.com/webpack/webpack-4-code-splitting-chunk-graph-and-the-splitchunks-optimization-be739a861366
-        splitChunks: {
-            chunks: 'all',
-            name: false,
-        },
-        // Keep the runtime chunk seperated to enable long term caching
-        // https://twitter.com/wSokra/status/969679223278505985
-        runtimeChunk: true,
-    },
-    resolve: {
-        // This allows you to set a fallback for where Webpack should look for modules.
-        // We placed these paths second because we want `node_modules` to "win"
-        // if there are any conflicts. This matches Node resolution mechanism.
-        // https://github.com/facebook/create-react-app/issues/253
-        modules: ['node_modules'].concat(
-            // It is guaranteed to exist because we tweak it in `env.js`
-            process.env.NODE_PATH.split(path.delimiter).filter(Boolean)
-        ),
-        // These are the reasonable defaults supported by the Node ecosystem.
-        // We also include JSX as a common component filename extension to support
-        // some tools, although we do not recommend using it, see:
-        // https://github.com/facebook/create-react-app/issues/290
-        // `web` extension prefixes have been added for better support
-        // for React Native Web.
-        extensions: paths.moduleFileExtensions
-            .map(ext => `.${ext}`)
-            .filter(ext => useTypeScript || !ext.includes('ts')),
-        alias: {
-            // Support React Native Web
-            // https://www.smashingmagazine.com/2016/08/a-glimpse-into-the-future-with-react-native-for-web/
-            'react-native': 'react-native-web',
-        },
-        plugins: [
-            // Adds support for installing with Plug'n'Play, leading to faster installs and adding
-            // guards against forgotten dependencies and such.
-            PnpWebpackPlugin,
-            // Prevents users from importing files from outside of src/ (or node_modules/).
-            // This often causes confusion because we only process files within src/ with babel.
-            // To fix this, we prevent you from importing files out of src/ -- if you'd like to,
-            // please link the files into your node_modules/ and let module-resolution kick in.
-            // Make sure your source files are compiled, as they will not be processed in any way.
-            new ModuleScopePlugin(paths.appSrc, [paths.appPackageJson]),
-        ],
-    },
-    resolveLoader: {
-        plugins: [
-            // Also related to Plug'n'Play, but this time it tells Webpack to load its loaders
-            // from the current package.
-            PnpWebpackPlugin.moduleLoader(module),
-        ],
-    },
-    module: {
-        strictExportPresence: true,
-        rules: [
-            // Disable require.ensure as it's not a standard language feature.
-            {parser: {requireEnsure: false}},
-
-            // First, run the linter.
-            // It's important to do this before Babel processes the JS.
-            {
-                test: /\.(js|mjs|jsx)$/,
-                enforce: 'pre',
-                use: [
-                    {
-                        options: {
-                            formatter: require.resolve('react-dev-utils/eslintFormatter'),
-                            eslintPath: require.resolve('eslint'),
-
-                        },
-                        loader: require.resolve('eslint-loader'),
-                    },
-                ],
-                include: paths.appSrc,
-            },
-            {
-                // "oneOf" will traverse all following loaders until one will
-                // match the requirements. When no loader matches it will fall
-                // back to the "file" loader at the end of the loader list.
-                oneOf: [
-                    // "url" loader works like "file" loader except that it embeds assets
-                    // smaller than specified limit in bytes as data URLs to avoid requests.
-                    // A missing `test` is equivalent to a match.
-                    {
-                        test: [/\.bmp$/, /\.gif$/, /\.jpe?g$/, /\.png$/],
-                        loader: require.resolve('url-loader'),
-                        options: {
-                            limit: 10000,
-                            name: 'static/media/[name].[hash:8].[ext]',
-                        },
-                    },
-                    // Process application JS with Babel.
-                    // The preset includes JSX, Flow, and some ESnext features.
-                    {
-                        test: /\.(js|mjs|jsx|ts|tsx)$/,
-                        include: paths.appSrc,
-                        loader: require.resolve('babel-loader'),
-                        options: {
-                            customize: require.resolve(
-                                'babel-preset-react-app/webpack-overrides'
-                            ),
-
-                            plugins: [
-                                [
-                                    require.resolve('babel-plugin-named-asset-import'),
-                                    {
-                                        loaderMap: {
-                                            svg: {
-                                                ReactComponent: '@svgr/webpack?-prettier,-svgo![path]',
-                                            },
-                                        },
-                                    },
-                                ],
-                                ["import", {libraryName: "antd", libraryDirectory: "es", style: "css"},  "ant"],
-                                ["import", { libraryName: "antd-mobile", libraryDirectory: "lib", style: "css"}, "antd-mobile"]
-                            ],
-                            // This is a feature of `babel-loader` for webpack (not Babel itself).
-                            // It enables caching results in ./node_modules/.cache/babel-loader/
-                            // directory for faster rebuilds.
-                            cacheDirectory: true,
-                            // Don't waste time on Gzipping the cache
-                            cacheCompression: false,
-                        },
-                    },
-                    // Process any JS outside of the app with Babel.
-                    // Unlike the application JS, we only compile the standard ES features.
-                    {
-                        test: /\.(js|mjs)$/,
-                        exclude: /@babel(?:\/|\\{1,2})runtime/,
-                        loader: require.resolve('babel-loader'),
-                        options: {
-                            babelrc: false,
-                            configFile: false,
-                            compact: false,
-                            presets: [
-                                [
-                                    require.resolve('babel-preset-react-app/dependencies'),
-                                    {helpers: true},
-                                ],
-                            ],
-                            cacheDirectory: true,
-                            // Don't waste time on Gzipping the cache
-                            cacheCompression: false,
-
-                            // If an error happens in a package, it's possible to be
-                            // because it was compiled. Thus, we don't want the browser
-                            // debugger to show the original code. Instead, the code
-                            // being evaluated would be much more helpful.
-                            sourceMaps: false,
-                        },
-                    },
-                    // "postcss" loader applies autoprefixer to our CSS.
-                    // "css" loader resolves paths in CSS and adds assets as dependencies.
-                    // "style" loader turns CSS into JS modules that inject <style> tags.
-                    // In production, we use a plugin to extract that CSS to a file, but
-                    // in development "style" loader enables hot editing of CSS.
-                    // By default we support CSS Modules with the extension .module.css
-                    {
-                        test: cssRegex,
-                        exclude: cssModuleRegex,
-                        use: getStyleLoaders({
-                            importLoaders: 1,
-                        }),
-                    },
-                    // Adds support for CSS Modules (https://github.com/css-modules/css-modules)
-                    // using the extension .module.css
-                    {
-                        test: cssModuleRegex,
-                        use: getStyleLoaders({
-                            importLoaders: 1,
-                            modules: true,
-                            getLocalIdent: getCSSModuleLocalIdent,
-                        }),
-                    },
-                    // Opt-in support for SASS (using .scss or .sass extensions).
-                    // Chains the sass-loader with the css-loader and the style-loader
-                    // to immediately apply all styles to the DOM.
-                    // By default we support SASS Modules with the
-                    // extensions .module.scss or .module.sass
-                    {
-                        test: sassRegex,
-                        exclude: sassModuleRegex,
-                        use: getStyleLoaders({importLoaders: 2}, 'sass-loader'),
-                    },
-                    // Adds support for CSS Modules, but using SASS
-                    // using the extension .module.scss or .module.sass
-                    {
-                        test: sassModuleRegex,
-                        use: getStyleLoaders(
-                            {
-                                importLoaders: 2,
-                                modules: true,
-                                getLocalIdent: getCSSModuleLocalIdent,
-                            },
-                            'sass-loader'
-                        ),
-                    },
-                    // "file" loader makes sure those assets get served by WebpackDevServer.
-                    // When you `import` an asset, you get its (virtual) filename.
-                    // In production, they would get copied to the `build` folder.
-                    // This loader doesn't use a "test" so it will catch all modules
-                    // that fall through the other loaders.
-                    {
-                        // Exclude `js` files to keep "css" loader working as it injects
-                        // its runtime that would otherwise be processed through "file" loader.
-                        // Also exclude `html` and `json` extensions so they get processed
-                        // by webpacks internal loaders.
-                        exclude: [/\.(js|mjs|jsx|ts|tsx)$/, /\.html$/, /\.json$/],
-                        loader: require.resolve('file-loader'),
-                        options: {
-                            name: 'static/media/[name].[hash:8].[ext]',
-                        },
-                    },
-                ],
-            },
-            // ** STOP ** Are you adding a new loader?
-            // Make sure to add the new loader(s) before the "file" loader.
-        ],
-    },
-    plugins: [
-        // Generates an `index.html` file with the <script> injected.
-        new HtmlWebpackPlugin({
-            inject: true,
-            template: paths.appHtml,
-        }),
-        // Makes some environment variables available in index.html.
-        // The public URL is available as %PUBLIC_URL% in index.html, e.g.:
-        // <link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico">
-        // In development, this will be an empty string.
-        new InterpolateHtmlPlugin(HtmlWebpackPlugin, env.raw),
-        // This gives some necessary context to module not found errors, such as
-        // the requesting resource.
-        new ModuleNotFoundPlugin(paths.appPath),
-        // Makes some environment variables available to the JS code, for example:
-        // if (process.env.NODE_ENV === 'development') { ... }. See `./env.js`.
-        new webpack.DefinePlugin(env.stringified),
-        // This is necessary to emit hot updates (currently CSS only):
-        new webpack.HotModuleReplacementPlugin(),
-        // Watcher doesn't work well if you mistype casing in a path so we use
-        // a plugin that prints an error when you attempt to do this.
-        // See https://github.com/facebook/create-react-app/issues/240
-        new CaseSensitivePathsPlugin(),
-        // If you require a missing module and then `npm install` it, you still have
-        // to restart the development server for Webpack to discover it. This plugin
-        // makes the discovery automatic so you don't have to restart.
-        // See https://github.com/facebook/create-react-app/issues/186
-        new WatchMissingNodeModulesPlugin(paths.appNodeModules),
-        // Moment.js is an extremely popular library that bundles large locale files
-        // by default due to how Webpack interprets its code. This is a practical
-        // solution that requires the user to opt into importing specific locales.
-        // https://github.com/jmblog/how-to-optimize-momentjs-with-webpack
-        // You can remove this if you don't use Moment.js:
-        new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/),
-        // Generate a manifest file which contains a mapping of all asset filenames
-        // to their corresponding output file so that tools can pick it up without
-        // having to parse `index.html`.
-        new ManifestPlugin({
-            fileName: 'asset-manifest.json',
-            publicPath: publicPath,
-        }),
-        // TypeScript type checking
-        useTypeScript &&
-        new ForkTsCheckerWebpackPlugin({
-            typescript: resolve.sync('typescript', {
-                basedir: paths.appNodeModules,
-            }),
-            async: false,
-            checkSyntacticErrors: true,
-            tsconfig: paths.appTsConfig,
-            compilerOptions: {
-                module: 'esnext',
-                moduleResolution: 'node',
-                resolveJsonModule: true,
-                isolatedModules: true,
-                noEmit: true,
-                jsx: 'preserve',
-            },
-            reportFiles: [
-                '**',
-                '!**/*.json',
-                '!**/__tests__/**',
-                '!**/?(*.)(spec|test).*',
-                '!src/setupProxy.js',
-                '!src/setupTests.*',
-            ],
-            watch: paths.appSrc,
-            silent: true,
-            formatter: typescriptFormatter,
-        }),
-    ].filter(Boolean),
-
-    // Some libraries import Node modules but don't use them in the browser.
-    // Tell Webpack to provide empty mocks for them so importing them works.
-    node: {
-        dgram: 'empty',
-        fs: 'empty',
-        net: 'empty',
-        tls: 'empty',
-        child_process: 'empty',
-    },
-    // Turn off performance processing because we utilize
-    // our own hints via the FileSizeReporter
-    performance: false,
-};

+ 0 - 539
config/webpack.config.prod.js

@@ -1,539 +0,0 @@
-'use strict';
-
-const fs = require('fs');
-const path = require('path');
-const webpack = require('webpack');
-const resolve = require('resolve');
-const PnpWebpackPlugin = require('pnp-webpack-plugin');
-const HtmlWebpackPlugin = require('html-webpack-plugin');
-const InlineChunkHtmlPlugin = require('react-dev-utils/InlineChunkHtmlPlugin');
-const TerserPlugin = require('terser-webpack-plugin');
-const MiniCssExtractPlugin = require('mini-css-extract-plugin');
-const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin');
-const safePostCssParser = require('postcss-safe-parser');
-const ManifestPlugin = require('webpack-manifest-plugin');
-const InterpolateHtmlPlugin = require('react-dev-utils/InterpolateHtmlPlugin');
-const WorkboxWebpackPlugin = require('workbox-webpack-plugin');
-const ModuleScopePlugin = require('react-dev-utils/ModuleScopePlugin');
-const getCSSModuleLocalIdent = require('react-dev-utils/getCSSModuleLocalIdent');
-const paths = require('./paths');
-const getClientEnvironment = require('./env');
-const ModuleNotFoundPlugin = require('react-dev-utils/ModuleNotFoundPlugin');
-const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin-alt');
-const typescriptFormatter = require('react-dev-utils/typescriptFormatter');
-
-
-// Webpack uses `publicPath` to determine where the app is being served from.
-// It requires a trailing slash, or the file assets will get an incorrect path.
-const publicPath = paths.servedPath;
-// Some apps do not use client-side routing with pushState.
-// For these, "homepage" can be set to "." to enable relative asset paths.
-const shouldUseRelativeAssetPaths = publicPath === './';
-// Source maps are resource heavy and can cause out of memory issue for large source files.
-const shouldUseSourceMap = process.env.GENERATE_SOURCEMAP !== 'false';
-// Some apps do not need the benefits of saving a web request, so not inlining the chunk
-// makes for a smoother build process.
-const shouldInlineRuntimeChunk = process.env.INLINE_RUNTIME_CHUNK !== 'false';
-// `publicUrl` is just like `publicPath`, but we will provide it to our app
-// as %PUBLIC_URL% in `index.html` and `process.env.PUBLIC_URL` in JavaScript.
-// Omit trailing slash as %PUBLIC_URL%/xyz looks better than %PUBLIC_URL%xyz.
-const publicUrl = publicPath.slice(0, -1);
-// Get environment variables to inject into our app.
-const env = getClientEnvironment(publicUrl);
-
-// Assert this just to be safe.
-// Development builds of React are slow and not intended for production.
-if (env.stringified['process.env'].NODE_ENV !== '"production"') {
-  throw new Error('Production builds must have NODE_ENV=production.');
-}
-
-// Check if TypeScript is setup
-const useTypeScript = fs.existsSync(paths.appTsConfig);
-
-// style files regexes
-const cssRegex = /\.css$/;
-const cssModuleRegex = /\.module\.css$/;
-const sassRegex = /\.(scss|sass)$/;
-const sassModuleRegex = /\.module\.(scss|sass)$/;
-
-// common function to get style loaders
-const getStyleLoaders = (cssOptions, preProcessor) => {
-  const loaders = [
-    {
-      loader: MiniCssExtractPlugin.loader,
-      options: Object.assign(
-        {},
-        shouldUseRelativeAssetPaths ? { publicPath: '../../' } : undefined
-      ),
-    },
-    {
-      loader: require.resolve('css-loader'),
-      options: cssOptions,
-    },
-    {
-      // Options for PostCSS as we reference these options twice
-      // Adds vendor prefixing based on your specified browser support in
-      // package.json
-      loader: require.resolve('postcss-loader'),
-      options: {
-        // Necessary for external CSS imports to work
-        // https://github.com/facebook/create-react-app/issues/2677
-        ident: 'postcss',
-        plugins: () => [
-          require('postcss-flexbugs-fixes'),
-          require('postcss-preset-env')({
-            autoprefixer: {
-              flexbox: 'no-2009',
-            },
-            stage: 3,
-          }),
-        ],
-        sourceMap: shouldUseSourceMap,
-      },
-    },
-  ];
-  if (preProcessor) {
-    loaders.push({
-      loader: require.resolve(preProcessor),
-      options: {
-        sourceMap: shouldUseSourceMap,
-      },
-    });
-  }
-  return loaders;
-};
-
-// This is the production configuration.
-// It compiles slowly and is focused on producing a fast and minimal bundle.
-// The development configuration is different and lives in a separate file.
-module.exports = {
-  mode: 'production',
-  // Don't attempt to continue if there are any errors.
-  bail: true,
-  // We generate sourcemaps in production. This is slow but gives good results.
-  // You can exclude the *.map files from the build during deployment.
-  devtool: shouldUseSourceMap ? 'source-map' : false,
-  // In production, we only want to load the app code.
-  entry: [paths.appIndexJs],
-  output: {
-    // The build folder.
-    path: paths.appBuild,
-    // Generated JS file names (with nested folders).
-    // There will be one main bundle, and one file per asynchronous chunk.
-    // We don't currently advertise code splitting but Webpack supports it.
-    filename: 'static/js/[name].[chunkhash:8].js',
-    chunkFilename: 'static/js/[name].[chunkhash:8].chunk.js',
-    // We inferred the "public path" (such as / or /my-project) from homepage.
-    publicPath: publicPath,
-    // Point sourcemap entries to original disk location (format as URL on Windows)
-    devtoolModuleFilenameTemplate: info =>
-      path
-        .relative(paths.appSrc, info.absoluteResourcePath)
-        .replace(/\\/g, '/'),
-  },
-  optimization: {
-    minimizer: [
-      new TerserPlugin({
-        terserOptions: {
-          parse: {
-            // we want terser to parse ecma 8 code. However, we don't want it
-            // to apply any minfication steps that turns valid ecma 5 code
-            // into invalid ecma 5 code. This is why the 'compress' and 'output'
-            // sections only apply transformations that are ecma 5 safe
-            // https://github.com/facebook/create-react-app/pull/4234
-            ecma: 8,
-          },
-          compress: {
-            ecma: 5,
-            warnings: false,
-            // Disabled because of an issue with Uglify breaking seemingly valid code:
-            // https://github.com/facebook/create-react-app/issues/2376
-            // Pending further investigation:
-            // https://github.com/mishoo/UglifyJS2/issues/2011
-            comparisons: false,
-            // Disabled because of an issue with Terser breaking valid code:
-            // https://github.com/facebook/create-react-app/issues/5250
-            // Pending futher investigation:
-            // https://github.com/terser-js/terser/issues/120
-            inline: 2,
-          },
-          mangle: {
-            safari10: true,
-          },
-          output: {
-            ecma: 5,
-            comments: false,
-            // Turned on because emoji and regex is not minified properly using default
-            // https://github.com/facebook/create-react-app/issues/2488
-            ascii_only: true,
-          },
-        },
-        // Use multi-process parallel running to improve the build speed
-        // Default number of concurrent runs: os.cpus().length - 1
-        parallel: true,
-        // Enable file caching
-        cache: true,
-        sourceMap: shouldUseSourceMap,
-      }),
-      new OptimizeCSSAssetsPlugin({
-        cssProcessorOptions: {
-          parser: safePostCssParser,
-          map: shouldUseSourceMap
-            ? {
-                // `inline: false` forces the sourcemap to be output into a
-                // separate file
-                inline: false,
-                // `annotation: true` appends the sourceMappingURL to the end of
-                // the css file, helping the browser find the sourcemap
-                annotation: true,
-              }
-            : false,
-        },
-      }),
-    ],
-    // Automatically split vendor and commons
-    // https://twitter.com/wSokra/status/969633336732905474
-    // https://medium.com/webpack/webpack-4-code-splitting-chunk-graph-and-the-splitchunks-optimization-be739a861366
-    splitChunks: {
-      chunks: 'all',
-      name: false,
-    },
-    // Keep the runtime chunk seperated to enable long term caching
-    // https://twitter.com/wSokra/status/969679223278505985
-    runtimeChunk: true,
-  },
-  resolve: {
-    // This allows you to set a fallback for where Webpack should look for modules.
-    // We placed these paths second because we want `node_modules` to "win"
-    // if there are any conflicts. This matches Node resolution mechanism.
-    // https://github.com/facebook/create-react-app/issues/253
-    modules: ['node_modules'].concat(
-      // It is guaranteed to exist because we tweak it in `env.js`
-      process.env.NODE_PATH.split(path.delimiter).filter(Boolean)
-    ),
-    // These are the reasonable defaults supported by the Node ecosystem.
-    // We also include JSX as a common component filename extension to support
-    // some tools, although we do not recommend using it, see:
-    // https://github.com/facebook/create-react-app/issues/290
-    // `web` extension prefixes have been added for better support
-    // for React Native Web.
-    extensions: paths.moduleFileExtensions
-      .map(ext => `.${ext}`)
-      .filter(ext => useTypeScript || !ext.includes('ts')),
-    alias: {
-      // Support React Native Web
-      // https://www.smashingmagazine.com/2016/08/a-glimpse-into-the-future-with-react-native-for-web/
-      'react-native': 'react-native-web',
-    },
-    plugins: [
-      // Adds support for installing with Plug'n'Play, leading to faster installs and adding
-      // guards against forgotten dependencies and such.
-      PnpWebpackPlugin,
-      // Prevents users from importing files from outside of src/ (or node_modules/).
-      // This often causes confusion because we only process files within src/ with babel.
-      // To fix this, we prevent you from importing files out of src/ -- if you'd like to,
-      // please link the files into your node_modules/ and let module-resolution kick in.
-      // Make sure your source files are compiled, as they will not be processed in any way.
-      new ModuleScopePlugin(paths.appSrc, [paths.appPackageJson]),
-    ],
-  },
-  resolveLoader: {
-    plugins: [
-      // Also related to Plug'n'Play, but this time it tells Webpack to load its loaders
-      // from the current package.
-      PnpWebpackPlugin.moduleLoader(module),
-    ],
-  },
-  module: {
-    strictExportPresence: true,
-    rules: [
-      // Disable require.ensure as it's not a standard language feature.
-      { parser: { requireEnsure: false } },
-
-      // First, run the linter.
-      // It's important to do this before Babel processes the JS.
-      {
-        test: /\.(js|mjs|jsx)$/,
-        enforce: 'pre',
-        use: [
-          {
-            options: {
-              formatter: require.resolve('react-dev-utils/eslintFormatter'),
-              eslintPath: require.resolve('eslint'),
-              
-            },
-            loader: require.resolve('eslint-loader'),
-          },
-        ],
-        include: paths.appSrc,
-      },
-      {
-        // "oneOf" will traverse all following loaders until one will
-        // match the requirements. When no loader matches it will fall
-        // back to the "file" loader at the end of the loader list.
-        oneOf: [
-          // "url" loader works just like "file" loader but it also embeds
-          // assets smaller than specified size as data URLs to avoid requests.
-          {
-            test: [/\.bmp$/, /\.gif$/, /\.jpe?g$/, /\.png$/],
-            loader: require.resolve('url-loader'),
-            options: {
-              limit: 10000,
-              name: 'static/media/[name].[hash:8].[ext]',
-            },
-          },
-          // Process application JS with Babel.
-          // The preset includes JSX, Flow, TypeScript and some ESnext features.
-          {
-            test: /\.(js|mjs|jsx|ts|tsx)$/,
-            include: paths.appSrc,
-
-            loader: require.resolve('babel-loader'),
-            options: {
-              customize: require.resolve(
-                'babel-preset-react-app/webpack-overrides'
-              ),
-              
-              plugins: [
-                [
-                  require.resolve('babel-plugin-named-asset-import'),
-                  {
-                    loaderMap: {
-                      svg: {
-                        ReactComponent: '@svgr/webpack?-prettier,-svgo![path]',
-                      },
-                    },
-                  },
-                ],
-              ],
-              cacheDirectory: true,
-              // Save disk space when time isn't as important
-              cacheCompression: true,
-              compact: true,
-            },
-          },
-          // Process any JS outside of the app with Babel.
-          // Unlike the application JS, we only compile the standard ES features.
-          {
-            test: /\.(js|mjs)$/,
-            exclude: /@babel(?:\/|\\{1,2})runtime/,
-            loader: require.resolve('babel-loader'),
-            options: {
-              babelrc: false,
-              configFile: false,
-              compact: false,
-              presets: [
-                [
-                  require.resolve('babel-preset-react-app/dependencies'),
-                  { helpers: true },
-                ],
-              ],
-              cacheDirectory: true,
-              // Save disk space when time isn't as important
-              cacheCompression: true,
-              
-              // If an error happens in a package, it's possible to be
-              // because it was compiled. Thus, we don't want the browser
-              // debugger to show the original code. Instead, the code
-              // being evaluated would be much more helpful.
-              sourceMaps: false,
-            },
-          },
-          // "postcss" loader applies autoprefixer to our CSS.
-          // "css" loader resolves paths in CSS and adds assets as dependencies.
-          // `MiniCSSExtractPlugin` extracts styles into CSS
-          // files. If you use code splitting, async bundles will have their own separate CSS chunk file.
-          // By default we support CSS Modules with the extension .module.css
-          {
-            test: cssRegex,
-            exclude: cssModuleRegex,
-            loader: getStyleLoaders({
-              importLoaders: 1,
-              sourceMap: shouldUseSourceMap,
-            }),
-            // Don't consider CSS imports dead code even if the
-            // containing package claims to have no side effects.
-            // Remove this when webpack adds a warning or an error for this.
-            // See https://github.com/webpack/webpack/issues/6571
-            sideEffects: true,
-          },
-          // Adds support for CSS Modules (https://github.com/css-modules/css-modules)
-          // using the extension .module.css
-          {
-            test: cssModuleRegex,
-            loader: getStyleLoaders({
-              importLoaders: 1,
-              sourceMap: shouldUseSourceMap,
-              modules: true,
-              getLocalIdent: getCSSModuleLocalIdent,
-            }),
-          },
-          // Opt-in support for SASS. The logic here is somewhat similar
-          // as in the CSS routine, except that "sass-loader" runs first
-          // to compile SASS files into CSS.
-          // By default we support SASS Modules with the
-          // extensions .module.scss or .module.sass
-          {
-            test: sassRegex,
-            exclude: sassModuleRegex,
-            loader: getStyleLoaders(
-              {
-                importLoaders: 2,
-                sourceMap: shouldUseSourceMap,
-              },
-              'sass-loader'
-            ),
-            // Don't consider CSS imports dead code even if the
-            // containing package claims to have no side effects.
-            // Remove this when webpack adds a warning or an error for this.
-            // See https://github.com/webpack/webpack/issues/6571
-            sideEffects: true,
-          },
-          // Adds support for CSS Modules, but using SASS
-          // using the extension .module.scss or .module.sass
-          {
-            test: sassModuleRegex,
-            loader: getStyleLoaders(
-              {
-                importLoaders: 2,
-                sourceMap: shouldUseSourceMap,
-                modules: true,
-                getLocalIdent: getCSSModuleLocalIdent,
-              },
-              'sass-loader'
-            ),
-          },
-          // "file" loader makes sure assets end up in the `build` folder.
-          // When you `import` an asset, you get its filename.
-          // This loader doesn't use a "test" so it will catch all modules
-          // that fall through the other loaders.
-          {
-            loader: require.resolve('file-loader'),
-            // Exclude `js` files to keep "css" loader working as it injects
-            // it's runtime that would otherwise be processed through "file" loader.
-            // Also exclude `html` and `json` extensions so they get processed
-            // by webpacks internal loaders.
-            exclude: [/\.(js|mjs|jsx|ts|tsx)$/, /\.html$/, /\.json$/],
-            options: {
-              name: 'static/media/[name].[hash:8].[ext]',
-            },
-          },
-          // ** STOP ** Are you adding a new loader?
-          // Make sure to add the new loader(s) before the "file" loader.
-        ],
-      },
-    ],
-  },
-  plugins: [
-    // Generates an `index.html` file with the <script> injected.
-    new HtmlWebpackPlugin({
-      inject: true,
-      template: paths.appHtml,
-      minify: {
-        removeComments: true,
-        collapseWhitespace: true,
-        removeRedundantAttributes: true,
-        useShortDoctype: true,
-        removeEmptyAttributes: true,
-        removeStyleLinkTypeAttributes: true,
-        keepClosingSlash: true,
-        minifyJS: true,
-        minifyCSS: true,
-        minifyURLs: true,
-      },
-    }),
-    // Inlines the webpack runtime script. This script is too small to warrant
-    // a network request.
-    shouldInlineRuntimeChunk &&
-      new InlineChunkHtmlPlugin(HtmlWebpackPlugin, [/runtime~.+[.]js/]),
-    // Makes some environment variables available in index.html.
-    // The public URL is available as %PUBLIC_URL% in index.html, e.g.:
-    // <link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico">
-    // In production, it will be an empty string unless you specify "homepage"
-    // in `package.json`, in which case it will be the pathname of that URL.
-    new InterpolateHtmlPlugin(HtmlWebpackPlugin, env.raw),
-    // This gives some necessary context to module not found errors, such as
-    // the requesting resource.
-    new ModuleNotFoundPlugin(paths.appPath),
-    // Makes some environment variables available to the JS code, for example:
-    // if (process.env.NODE_ENV === 'production') { ... }. See `./env.js`.
-    // It is absolutely essential that NODE_ENV was set to production here.
-    // Otherwise React will be compiled in the very slow development mode.
-    new webpack.DefinePlugin(env.stringified),
-    new MiniCssExtractPlugin({
-      // Options similar to the same options in webpackOptions.output
-      // both options are optional
-      filename: 'static/css/[name].[contenthash:8].css',
-      chunkFilename: 'static/css/[name].[contenthash:8].chunk.css',
-    }),
-    // Generate a manifest file which contains a mapping of all asset filenames
-    // to their corresponding output file so that tools can pick it up without
-    // having to parse `index.html`.
-    new ManifestPlugin({
-      fileName: 'asset-manifest.json',
-      publicPath: publicPath,
-    }),
-    // Moment.js is an extremely popular library that bundles large locale files
-    // by default due to how Webpack interprets its code. This is a practical
-    // solution that requires the user to opt into importing specific locales.
-    // https://github.com/jmblog/how-to-optimize-momentjs-with-webpack
-    // You can remove this if you don't use Moment.js:
-    new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/),
-    // Generate a service worker script that will precache, and keep up to date,
-    // the HTML & assets that are part of the Webpack build.
-    new WorkboxWebpackPlugin.GenerateSW({
-      clientsClaim: true,
-      exclude: [/\.map$/, /asset-manifest\.json$/],
-      importWorkboxFrom: 'cdn',
-      navigateFallback: publicUrl + '/index.html',
-      navigateFallbackBlacklist: [
-        // Exclude URLs starting with /_, as they're likely an API call
-        new RegExp('^/_'),
-        // Exclude URLs containing a dot, as they're likely a resource in
-        // public/ and not a SPA route
-        new RegExp('/[^/]+\\.[^/]+$'),
-      ],
-    }),
-    // TypeScript type checking
-    fs.existsSync(paths.appTsConfig) &&
-      new ForkTsCheckerWebpackPlugin({
-        typescript: resolve.sync('typescript', {
-          basedir: paths.appNodeModules,
-        }),
-        async: false,
-        checkSyntacticErrors: true,
-        tsconfig: paths.appTsConfig,
-        compilerOptions: {
-          module: 'esnext',
-          moduleResolution: 'node',
-          resolveJsonModule: true,
-          isolatedModules: true,
-          noEmit: true,
-          jsx: 'preserve',
-        },
-        reportFiles: [
-          '**',
-          '!**/*.json',
-          '!**/__tests__/**',
-          '!**/?(*.)(spec|test).*',
-          '!src/setupProxy.js',
-          '!src/setupTests.*',
-        ],
-        watch: paths.appSrc,
-        silent: true,
-        formatter: typescriptFormatter,
-      }),
-  ].filter(Boolean),
-  // Some libraries import Node modules but don't use them in the browser.
-  // Tell Webpack to provide empty mocks for them so importing them works.
-  node: {
-    dgram: 'empty',
-    fs: 'empty',
-    net: 'empty',
-    tls: 'empty',
-    child_process: 'empty',
-  },
-  // Turn off performance processing because we utilize
-  // our own hints via the FileSizeReporter
-  performance: false,
-};

+ 0 - 105
config/webpackDevServer.config.js

@@ -1,105 +0,0 @@
-'use strict';
-
-const errorOverlayMiddleware = require('react-dev-utils/errorOverlayMiddleware');
-const evalSourceMapMiddleware = require('react-dev-utils/evalSourceMapMiddleware');
-const noopServiceWorkerMiddleware = require('react-dev-utils/noopServiceWorkerMiddleware');
-const ignoredFiles = require('react-dev-utils/ignoredFiles');
-const config = require('./webpack.config.dev');
-const paths = require('./paths');
-const fs = require('fs');
-
-const protocol = process.env.HTTPS === 'true' ? 'https' : 'http';
-const host = process.env.HOST || '0.0.0.0';
-
-module.exports = function(proxy, allowedHost) {
-  return {
-    // WebpackDevServer 2.4.3 introduced a security fix that prevents remote
-    // websites from potentially accessing local content through DNS rebinding:
-    // https://github.com/webpack/webpack-dev-server/issues/887
-    // https://medium.com/webpack/webpack-dev-server-middleware-security-issues-1489d950874a
-    // However, it made several existing use cases such as development in cloud
-    // environment or subdomains in development significantly more complicated:
-    // https://github.com/facebook/create-react-app/issues/2271
-    // https://github.com/facebook/create-react-app/issues/2233
-    // While we're investigating better solutions, for now we will take a
-    // compromise. Since our WDS configuration only serves files in the `public`
-    // folder we won't consider accessing them a vulnerability. However, if you
-    // use the `proxy` feature, it gets more dangerous because it can expose
-    // remote code execution vulnerabilities in backends like Django and Rails.
-    // So we will disable the host check normally, but enable it if you have
-    // specified the `proxy` setting. Finally, we let you override it if you
-    // really know what you're doing with a special environment variable.
-    disableHostCheck:
-      !proxy || process.env.DANGEROUSLY_DISABLE_HOST_CHECK === 'true',
-    // Enable gzip compression of generated files.
-    compress: true,
-    // Silence WebpackDevServer's own logs since they're generally not useful.
-    // It will still show compile warnings and errors with this setting.
-    clientLogLevel: 'none',
-    // By default WebpackDevServer serves physical files from current directory
-    // in addition to all the virtual build products that it serves from memory.
-    // This is confusing because those files won’t automatically be available in
-    // production build folder unless we copy them. However, copying the whole
-    // project directory is dangerous because we may expose sensitive files.
-    // Instead, we establish a convention that only files in `public` directory
-    // get served. Our build script will copy `public` into the `build` folder.
-    // In `index.html`, you can get URL of `public` folder with %PUBLIC_URL%:
-    // <link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico">
-    // In JavaScript code, you can access it with `process.env.PUBLIC_URL`.
-    // Note that we only recommend to use `public` folder as an escape hatch
-    // for files like `favicon.ico`, `manifest.json`, and libraries that are
-    // for some reason broken when imported through Webpack. If you just want to
-    // use an image, put it in `src` and `import` it from JavaScript instead.
-    contentBase: paths.appPublic,
-    // By default files from `contentBase` will not trigger a page reload.
-    watchContentBase: true,
-    // Enable hot reloading server. It will provide /sockjs-node/ endpoint
-    // for the WebpackDevServer client so it can learn when the files were
-    // updated. The WebpackDevServer client is included as an entry point
-    // in the Webpack development configuration. Note that only changes
-    // to CSS are currently hot reloaded. JS changes will refresh the browser.
-    hot: true,
-    // It is important to tell WebpackDevServer to use the same "root" path
-    // as we specified in the config. In development, we always serve from /.
-    publicPath: config.output.publicPath,
-    // WebpackDevServer is noisy by default so we emit custom message instead
-    // by listening to the compiler events with `compiler.hooks[...].tap` calls above.
-    quiet: true,
-    // Reportedly, this avoids CPU overload on some systems.
-    // https://github.com/facebook/create-react-app/issues/293
-    // src/node_modules is not ignored to support absolute imports
-    // https://github.com/facebook/create-react-app/issues/1065
-    watchOptions: {
-      ignored: ignoredFiles(paths.appSrc),
-    },
-    // Enable HTTPS if the HTTPS environment variable is set to 'true'
-    https: protocol === 'https',
-    host,
-    overlay: false,
-    historyApiFallback: {
-      // Paths with dots should still use the history fallback.
-      // See https://github.com/facebook/create-react-app/issues/387.
-      disableDotRule: true,
-    },
-    public: allowedHost,
-    proxy,
-    before(app, server) {
-      if (fs.existsSync(paths.proxySetup)) {
-        // This registers user provided middleware for proxy reasons
-        require(paths.proxySetup)(app);
-      }
-
-      // This lets us fetch source contents from webpack for the error overlay
-      app.use(evalSourceMapMiddleware(server));
-      // This lets us open files from the runtime error overlay.
-      app.use(errorOverlayMiddleware());
-
-      // This service worker file is effectively a 'no-op' that will reset any
-      // previous service worker registered for the same host:port combination.
-      // We do this in development to avoid hitting the production cache if
-      // it used the same host and port.
-      // https://github.com/facebook/create-react-app/issues/2272#issuecomment-302832432
-      app.use(noopServiceWorkerMiddleware());
-    },
-  };
-};

+ 0 - 34
doc/struct.md

@@ -1,34 +0,0 @@
-## Route (== structure)
-see index.js
-<Route exact path="/" component={App}/>
- <PrivateRoute path="/developer" ownProps={ownProps} component={DevelopVersion}/>
- <PrivateRoute path="/common" ownProps={ownProps} component={BasicVersion}/>
- <Route path="/login" component={Login}/>
- <Route path="/ticket" component={Ticket}/>
- 
- common : 案例 -> case or template
- developer : 开发设计
- communication : 联系  (-> contact)
- deploy : 部署 (config)
- order  :订单
- 
- ## 修改 v1
- 1. home : 链接从button改为图片
- 2. 各页面可以相互跳转
- 3. 开发和部署分离
- 4. 支持openid和userid已经存在的情况下,进行注册,以及免注册登录
- 5. 增加订单页面
- 6. 案例 独立出来,作为模板,跟github相连
- 
-## modify v2
-1. 首页是宣传和案例
-2. 一键部署(配置)
-3. 已有(订单和部署)
-4. 联系我们
-
-分离普通版和开发版,用不同的server (不同的port)
-
- 
- 
-  
- 

+ 0 - 151
package.json

@@ -1,151 +0,0 @@
-{
-  "name": "online",
-  "version": "0.1.0",
-  "private": true,
-  "dependencies": {
-    "@babel/core": "7.1.0",
-    "@svgr/webpack": "2.4.1",
-    "antd": "^3.10.3",
-    "antd-mobile": "^2.2.6",
-    "antd-mobile-demo-data": "^0.2.0",
-    "antd-mobile-full-demo-data": "^0.2.1",
-    "apollo-boost": "^0.1.19",
-    "axios": "^0.18.0",
-    "babel-core": "7.0.0-bridge.0",
-    "babel-eslint": "9.0.0",
-    "babel-jest": "23.6.0",
-    "babel-loader": "8.0.4",
-    "babel-plugin-named-asset-import": "^0.2.2",
-    "babel-preset-react-app": "^6.0.0",
-    "bfj": "6.1.1",
-    "case-sensitive-paths-webpack-plugin": "2.1.2",
-    "chalk": "2.4.1",
-    "classnames": "^2.2.6",
-    "copy-to-clipboard": "^3.0.8",
-    "css-loader": "1.0.0",
-    "dotenv": "6.0.0",
-    "dotenv-expand": "4.2.0",
-    "draft-js": "^0.10.5",
-    "eslint": "5.6.0",
-    "eslint-config-react-app": "^3.0.5",
-    "eslint-loader": "2.1.1",
-    "eslint-plugin-flowtype": "2.50.1",
-    "eslint-plugin-import": "2.14.0",
-    "eslint-plugin-jsx-a11y": "6.1.2",
-    "eslint-plugin-react": "7.11.1",
-    "file-loader": "2.0.0",
-    "file-saver": "^2.0.0",
-    "fork-ts-checker-webpack-plugin-alt": "0.4.14",
-    "fs-extra": "7.0.0",
-    "graphiql": "^0.12.0",
-    "graphql": "^14.0.2",
-    "graphql-request": "^1.8.2",
-    "graphql-tag": "^2.10.0",
-    "html-webpack-plugin": "4.0.0-alpha.2",
-    "identity-obj-proxy": "3.0.0",
-    "intro.js": "^2.9.3",
-    "isomorphic-fetch": "^2.2.1",
-    "jest": "23.6.0",
-    "jest-pnp-resolver": "1.0.1",
-    "jest-resolve": "23.6.0",
-    "js-beautify": "^1.8.8",
-    "mini-css-extract-plugin": "0.4.3",
-    "optimize-css-assets-webpack-plugin": "5.0.1",
-    "pnp-webpack-plugin": "1.1.0",
-    "postcss-flexbugs-fixes": "4.1.0",
-    "postcss-loader": "3.0.0",
-    "postcss-preset-env": "6.0.6",
-    "postcss-safe-parser": "4.0.1",
-    "qrcode.react": "^0.9.2",
-    "react": "^16.6.0",
-    "react-apollo": "^2.2.4",
-    "react-app-polyfill": "^0.1.3",
-    "react-dev-utils": "^6.1.0",
-    "react-dom": "^16.6.0",
-    "react-draft-wysiwyg": "^1.12.13",
-    "react-intl": "^2.7.2",
-    "react-router": "^4.3.1",
-    "react-router-dom": "^4.3.1",
-    "react-sticky": "^6.0.3",
-    "redux": "^4.0.1",
-    "resolve": "1.8.1",
-    "sass-loader": "7.1.0",
-    "slate": "^0.44.9",
-    "slate-react": "^0.21.15",
-    "style-loader": "0.23.0",
-    "terser-webpack-plugin": "1.1.0",
-    "url-loader": "1.1.1",
-    "webpack": "4.19.1",
-    "webpack-dev-server": "3.1.9",
-    "webpack-manifest-plugin": "2.0.4",
-    "workbox-webpack-plugin": "3.6.3"
-  },
-  "devDependencies": {
-    "babel-plugin-import": "^1.11.0"
-  },
-  "scripts": {
-    "start": "node scripts/start.js",
-    "build": "node scripts/build.js",
-    "test": "node scripts/test.js"
-  },
-  "eslintConfig": {
-    "extends": "react-app",
-    "rules": {
-      "no-undef": 1,
-      "no-restricted-globals": 0,
-      "no-unused-vars": 0
-    }
-  },
-  "browserslist": [
-    ">0.2%",
-    "not dead",
-    "not ie <= 11",
-    "not op_mini all"
-  ],
-  "jest": {
-    "collectCoverageFrom": [
-      "src/**/*.{js,jsx,ts,tsx}",
-      "!src/**/*.d.ts"
-    ],
-    "resolver": "jest-pnp-resolver",
-    "setupFiles": [
-      "react-app-polyfill/jsdom"
-    ],
-    "testMatch": [
-      "<rootDir>/src/**/__tests__/**/*.{js,jsx,ts,tsx}",
-      "<rootDir>/src/**/?(*.)(spec|test).{js,jsx,ts,tsx}"
-    ],
-    "testEnvironment": "jsdom",
-    "testURL": "http://localhost",
-    "transform": {
-      "^.+\\.(js|jsx|ts|tsx)$": "<rootDir>/node_modules/babel-jest",
-      "^.+\\.css$": "<rootDir>/config/jest/cssTransform.js",
-      "^(?!.*\\.(js|jsx|ts|tsx|css|json)$)": "<rootDir>/config/jest/fileTransform.js"
-    },
-    "transformIgnorePatterns": [
-      "[/\\\\]node_modules[/\\\\].+\\.(js|jsx|ts|tsx)$",
-      "^.+\\.module\\.(css|sass|scss)$"
-    ],
-    "moduleNameMapper": {
-      "^react-native$": "react-native-web",
-      "^.+\\.module\\.(css|sass|scss)$": "identity-obj-proxy"
-    },
-    "moduleFileExtensions": [
-      "web.js",
-      "js",
-      "web.ts",
-      "ts",
-      "web.tsx",
-      "tsx",
-      "json",
-      "web.jsx",
-      "jsx",
-      "node"
-    ]
-  },
-  "babel": {
-    "presets": [
-      "react-app"
-    ]
-  }
-}

+ 0 - 30
public/index.html

@@ -1,30 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-  <head>
-    <meta charset="utf-8">
-    <link rel="shortcut icon" href="%PUBLIC_URL%/ioo.ico">
-    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no" />
-    <meta name="theme-color" content="#000000">
-    <link rel="manifest" href="%PUBLIC_URL%/manifest.json">
-    <script src="https://as.alipayobjects.com/g/component/fastclick/1.0.6/fastclick.js"></script>
-    <script>
-      if ('addEventListener' in document) {
-        document.addEventListener('DOMContentLoaded', function() {
-          FastClick.attach(document.body);
-        }, false);
-      }
-      if(!window.Promise) {
-        document.writeln('<script src="https://as.alipayobjects.com/g/component/es6-promise/3.2.2/es6-promise.min.js"'+'>'+'<'+'/'+'script>');
-      }
-    </script>
-    <title>Ioobot workbench</title>
-  </head>
-  <body>
-
-    <noscript>
-      You need to enable JavaScript to run this app.
-    </noscript>
-    <div id="root" style="height: 100%"></div>
-
-  </body>
-</html>

BIN
public/ioo.ico


+ 0 - 15
public/manifest.json

@@ -1,15 +0,0 @@
-{
-  "short_name": "React App",
-  "name": "Create React App Sample",
-  "icons": [
-    {
-      "src": "favicon.ico",
-      "sizes": "64x64 32x32 24x24 16x16",
-      "type": "image/x-icon"
-    }
-  ],
-  "start_url": ".",
-  "display": "standalone",
-  "theme_color": "#000000",
-  "background_color": "#ffffff"
-}

+ 0 - 189
scripts/build.js

@@ -1,189 +0,0 @@
-'use strict';
-
-// Do this as the first thing so that any code reading it knows the right env.
-process.env.BABEL_ENV = 'production';
-process.env.NODE_ENV = 'production';
-
-// Makes the script crash on unhandled rejections instead of silently
-// ignoring them. In the future, promise rejections that are not handled will
-// terminate the Node.js process with a non-zero exit code.
-process.on('unhandledRejection', err => {
-  throw err;
-});
-
-// Ensure environment variables are read.
-require('../config/env');
-
-
-const path = require('path');
-const chalk = require('chalk');
-const fs = require('fs-extra');
-const webpack = require('webpack');
-const bfj = require('bfj');
-const config = require('../config/webpack.config.prod');
-const paths = require('../config/paths');
-const checkRequiredFiles = require('react-dev-utils/checkRequiredFiles');
-const formatWebpackMessages = require('react-dev-utils/formatWebpackMessages');
-const printHostingInstructions = require('react-dev-utils/printHostingInstructions');
-const FileSizeReporter = require('react-dev-utils/FileSizeReporter');
-const printBuildError = require('react-dev-utils/printBuildError');
-
-const measureFileSizesBeforeBuild =
-  FileSizeReporter.measureFileSizesBeforeBuild;
-const printFileSizesAfterBuild = FileSizeReporter.printFileSizesAfterBuild;
-const useYarn = fs.existsSync(paths.yarnLockFile);
-
-// These sizes are pretty large. We'll warn for bundles exceeding them.
-const WARN_AFTER_BUNDLE_GZIP_SIZE = 512 * 1024;
-const WARN_AFTER_CHUNK_GZIP_SIZE = 1024 * 1024;
-
-const isInteractive = process.stdout.isTTY;
-
-// Warn and crash if required files are missing
-if (!checkRequiredFiles([paths.appHtml, paths.appIndexJs])) {
-  process.exit(1);
-}
-
-// Process CLI arguments
-const argv = process.argv.slice(2);
-const writeStatsJson = argv.indexOf('--stats') !== -1;
-
-// We require that you explicitly set browsers and do not fall back to
-// browserslist defaults.
-const { checkBrowsers } = require('react-dev-utils/browsersHelper');
-checkBrowsers(paths.appPath, isInteractive)
-  .then(() => {
-    // First, read the current file sizes in build directory.
-    // This lets us display how much they changed later.
-    return measureFileSizesBeforeBuild(paths.appBuild);
-  })
-  .then(previousFileSizes => {
-    // Remove all content but keep the directory so that
-    // if you're in it, you don't end up in Trash
-    fs.emptyDirSync(paths.appBuild);
-    // Merge with the public folder
-    copyPublicFolder();
-    // Start the webpack build
-    return build(previousFileSizes);
-  })
-  .then(
-    ({ stats, previousFileSizes, warnings }) => {
-      if (warnings.length) {
-        console.log(chalk.yellow('Compiled with warnings.\n'));
-        console.log(warnings.join('\n\n'));
-        console.log(
-          '\nSearch for the ' +
-            chalk.underline(chalk.yellow('keywords')) +
-            ' to learn more about each warning.'
-        );
-        console.log(
-          'To ignore, add ' +
-            chalk.cyan('// eslint-disable-next-line') +
-            ' to the line before.\n'
-        );
-      } else {
-        console.log(chalk.green('Compiled successfully.\n'));
-      }
-
-      console.log('File sizes after gzip:\n');
-      printFileSizesAfterBuild(
-        stats,
-        previousFileSizes,
-        paths.appBuild,
-        WARN_AFTER_BUNDLE_GZIP_SIZE,
-        WARN_AFTER_CHUNK_GZIP_SIZE
-      );
-      console.log();
-
-      const appPackage = require(paths.appPackageJson);
-      const publicUrl = paths.publicUrl;
-      const publicPath = config.output.publicPath;
-      const buildFolder = path.relative(process.cwd(), paths.appBuild);
-      printHostingInstructions(
-        appPackage,
-        publicUrl,
-        publicPath,
-        buildFolder,
-        useYarn
-      );
-    },
-    err => {
-      console.log(chalk.red('Failed to compile.\n'));
-      printBuildError(err);
-      process.exit(1);
-    }
-  )
-  .catch(err => {
-    if (err && err.message) {
-      console.log(err.message);
-    }
-    process.exit(1);
-  });
-
-// Create the production build and print the deployment instructions.
-function build(previousFileSizes) {
-  console.log('Creating an optimized production build...');
-
-  let compiler = webpack(config);
-  return new Promise((resolve, reject) => {
-    compiler.run((err, stats) => {
-      let messages;
-      if (err) {
-        if (!err.message) {
-          return reject(err);
-        }
-        messages = formatWebpackMessages({
-          errors: [err.message],
-          warnings: [],
-        });
-      } else {
-        messages = formatWebpackMessages(
-          stats.toJson({ all: false, warnings: true, errors: true })
-        );
-      }
-      if (messages.errors.length) {
-        // Only keep the first error. Others are often indicative
-        // of the same problem, but confuse the reader with noise.
-        if (messages.errors.length > 1) {
-          messages.errors.length = 1;
-        }
-        return reject(new Error(messages.errors.join('\n\n')));
-      }
-      if (
-        process.env.CI &&
-        (typeof process.env.CI !== 'string' ||
-          process.env.CI.toLowerCase() !== 'false') &&
-        messages.warnings.length
-      ) {
-        console.log(
-          chalk.yellow(
-            '\nTreating warnings as errors because process.env.CI = true.\n' +
-              'Most CI servers set it automatically.\n'
-          )
-        );
-        return reject(new Error(messages.warnings.join('\n\n')));
-      }
-
-      const resolveArgs = {
-        stats,
-        previousFileSizes,
-        warnings: messages.warnings,
-      };
-      if (writeStatsJson) {
-        return bfj
-          .write(paths.appBuild + '/bundle-stats.json', stats.toJson())
-          .then(() => resolve(resolveArgs))
-          .catch(error => reject(new Error(error)));
-      }
-
-      return resolve(resolveArgs);
-    });
-  });
-}
-
-function copyPublicFolder() {
-  fs.copySync(paths.appPublic, paths.appBuild, {
-    dereference: true,
-    filter: file => file !== paths.appHtml,
-  });
-}

+ 0 - 117
scripts/start.js

@@ -1,117 +0,0 @@
-'use strict';
-
-// Do this as the first thing so that any code reading it knows the right env.
-process.env.BABEL_ENV = 'development';
-process.env.NODE_ENV = 'development';
-
-// Makes the script crash on unhandled rejections instead of silently
-// ignoring them. In the future, promise rejections that are not handled will
-// terminate the Node.js process with a non-zero exit code.
-process.on('unhandledRejection', err => {
-  throw err;
-});
-
-// Ensure environment variables are read.
-require('../config/env');
-
-
-const fs = require('fs');
-const chalk = require('chalk');
-const webpack = require('webpack');
-const WebpackDevServer = require('webpack-dev-server');
-const clearConsole = require('react-dev-utils/clearConsole');
-const checkRequiredFiles = require('react-dev-utils/checkRequiredFiles');
-const {
-  choosePort,
-  createCompiler,
-  prepareProxy,
-  prepareUrls,
-} = require('react-dev-utils/WebpackDevServerUtils');
-const openBrowser = require('react-dev-utils/openBrowser');
-const paths = require('../config/paths');
-const config = require('../config/webpack.config.dev');
-const createDevServerConfig = require('../config/webpackDevServer.config');
-
-const useYarn = fs.existsSync(paths.yarnLockFile);
-const isInteractive = process.stdout.isTTY;
-
-// Warn and crash if required files are missing
-if (!checkRequiredFiles([paths.appHtml, paths.appIndexJs])) {
-  process.exit(1);
-}
-
-// Tools like Cloud9 rely on this.
-// const DEFAULT_PORT = parseInt(process.env.PORT, 10) || 3000;
-const DEFAULT_PORT = 3999;
-const HOST = process.env.HOST || '0.0.0.0';
-
-if (process.env.HOST) {
-  console.log(
-    chalk.cyan(
-      `Attempting to bind to HOST environment variable: ${chalk.yellow(
-        chalk.bold(process.env.HOST)
-      )}`
-    )
-  );
-  console.log(
-    `If this was unintentional, check that you haven't mistakenly set it in your shell.`
-  );
-  console.log(
-    `Learn more here: ${chalk.yellow('http://bit.ly/CRA-advanced-config')}`
-  );
-  console.log();
-}
-
-// We require that you explictly set browsers and do not fall back to
-// browserslist defaults.
-const { checkBrowsers } = require('react-dev-utils/browsersHelper');
-checkBrowsers(paths.appPath, isInteractive)
-  .then(() => {
-    // We attempt to use the default port but if it is busy, we offer the user to
-    // run on a different port. `choosePort()` Promise resolves to the next free port.
-    return choosePort(HOST, DEFAULT_PORT);
-  })
-  .then(port => {
-    if (port == null) {
-      // We have not found a port.
-      return;
-    }
-    const protocol = process.env.HTTPS === 'true' ? 'https' : 'http';
-    const appName = require(paths.appPackageJson).name;
-    const urls = prepareUrls(protocol, HOST, port);
-    // Create a webpack compiler that is configured with custom messages.
-    const compiler = createCompiler(webpack, config, appName, urls, useYarn);
-    // Load proxy config
-    const proxySetting = require(paths.appPackageJson).proxy;
-    const proxyConfig = prepareProxy(proxySetting, paths.appPublic);
-    // Serve webpack assets generated by the compiler over a web server.
-    const serverConfig = createDevServerConfig(
-      proxyConfig,
-      urls.lanUrlForConfig
-    );
-    const devServer = new WebpackDevServer(compiler, serverConfig);
-    // Launch WebpackDevServer.
-    devServer.listen(port, HOST, err => {
-      if (err) {
-        return console.log(err);
-      }
-      if (isInteractive) {
-        clearConsole();
-      }
-      console.log(chalk.cyan('Starting the development server...\n'));
-      openBrowser(urls.localUrlForBrowser);
-    });
-
-    ['SIGINT', 'SIGTERM'].forEach(function(sig) {
-      process.on(sig, function() {
-        devServer.close();
-        process.exit();
-      });
-    });
-  })
-  .catch(err => {
-    if (err && err.message) {
-      console.log(err.message);
-    }
-    process.exit(1);
-  });

+ 0 - 53
scripts/test.js

@@ -1,53 +0,0 @@
-'use strict';
-
-// Do this as the first thing so that any code reading it knows the right env.
-process.env.BABEL_ENV = 'test';
-process.env.NODE_ENV = 'test';
-process.env.PUBLIC_URL = '';
-
-// Makes the script crash on unhandled rejections instead of silently
-// ignoring them. In the future, promise rejections that are not handled will
-// terminate the Node.js process with a non-zero exit code.
-process.on('unhandledRejection', err => {
-  throw err;
-});
-
-// Ensure environment variables are read.
-require('../config/env');
-
-
-const jest = require('jest');
-const execSync = require('child_process').execSync;
-let argv = process.argv.slice(2);
-
-function isInGitRepository() {
-  try {
-    execSync('git rev-parse --is-inside-work-tree', { stdio: 'ignore' });
-    return true;
-  } catch (e) {
-    return false;
-  }
-}
-
-function isInMercurialRepository() {
-  try {
-    execSync('hg --cwd . root', { stdio: 'ignore' });
-    return true;
-  } catch (e) {
-    return false;
-  }
-}
-
-// Watch unless on CI, in coverage mode, or explicitly running all tests
-if (
-  !process.env.CI &&
-  argv.indexOf('--coverage') === -1 &&
-  argv.indexOf('--watchAll') === -1
-) {
-  // https://github.com/facebook/create-react-app/issues/5210
-  const hasSourceControl = isInGitRepository() || isInMercurialRepository();
-  argv.push(hasSourceControl ? '--watch' : '--watchAll');
-}
-
-
-jest.run(argv);

+ 0 - 2450
src/all_graphql.txt

@@ -1,2450 +0,0 @@
-query userbyid($id: ID) {
-  userbyid: user_by_id(id: $id) {
-    email
-    updatedAt
-    password
-    telephone
-    nickname
-    username
-    createdAt
-    openid
-    language
-    id
-    avatar
-  }
-}
-
-query ticketbyid($id: ID) {
-  ticketbyid: ticket_by_id(id: $id) {
-    updatedAt
-    repliedBy
-    content
-    repliedAt
-    createdAt
-    type
-    title
-    status
-    id
-    user_id {
-      email
-      updatedAt
-      password
-      telephone
-      nickname
-      username
-      createdAt
-      openid
-      language
-      id
-      avatar
-    }
-    screenshot
-  }
-}
-
-query notificationbyprops($user_id: ID, $type: String, $webhook: String, $name: String) {
-  notificationbyprops: notification_by_props(user_id: $user_id type: $type webhook: $webhook name: $name) {
-    id
-    user_id {
-      email
-      updatedAt
-      password
-      telephone
-      nickname
-      username
-      createdAt
-      openid
-      language
-      id
-      avatar
-    }
-    type
-    webhook
-    name
-  }
-}
-
-query deploybyprops($description: String, $updatedAt: String, $cosBucketName: String, $memorySize: Int, $fc_id: ID, $createdAt: String, $subnetId: String, $cosObjectName: String, $region: String, $vpcId: String, $cosBucketRegion: String, $cloud_id: ID, $user_id: ID, $serviceName: String, $timeout: Int, $handler: String, $functionName: String) {
-  deploybyprops: deploy_by_props(description: $description updatedAt: $updatedAt cosBucketName: $cosBucketName memorySize: $memorySize fc_id: $fc_id createdAt: $createdAt subnetId: $subnetId cosObjectName: $cosObjectName region: $region vpcId: $vpcId cosBucketRegion: $cosBucketRegion cloud_id: $cloud_id user_id: $user_id serviceName: $serviceName timeout: $timeout handler: $handler functionName: $functionName) {
-    description
-    updatedAt
-    cosBucketName
-    memorySize
-    fc_id {
-      id
-
-
-      fcType
-
-
-      createdAt
-      updatedAt
-    }
-    createdAt
-    subnetId
-    cosObjectName
-    region
-    vpcId
-    cosBucketRegion
-    id
-    cloud_id {
-      id
-
-      cloudName
-      secretId
-      secretKey
-      appId
-      createdAt
-      updatedAt
-    }
-    user_id {
-      email
-      updatedAt
-      password
-      telephone
-      nickname
-      username
-      createdAt
-      openid
-      language
-      id
-      avatar
-    }
-    serviceName
-    timeout
-    handler
-    functionName
-  }
-}
-
-query deploybyid($id: ID) {
-  deploybyid: deploy_by_id(id: $id) {
-    description
-    updatedAt
-    cosBucketName
-    memorySize
-    fc_id {
-      id
-
-
-      fcType
-
-
-      createdAt
-      updatedAt
-    }
-    createdAt
-    subnetId
-    cosObjectName
-    region
-    vpcId
-    cosBucketRegion
-    id
-    cloud_id {
-      id
-
-      cloudName
-      secretId
-      secretKey
-      appId
-      createdAt
-      updatedAt
-    }
-    user_id {
-      email
-      updatedAt
-      password
-      telephone
-      nickname
-      username
-      createdAt
-      openid
-      language
-      id
-      avatar
-    }
-    serviceName
-    timeout
-    handler
-    functionName
-  }
-}
-
-query databasebyid($id: ID) {
-  databasebyid: database_by_id(id: $id) {
-    id
-    user_id {
-      email
-      updatedAt
-      password
-      telephone
-      nickname
-      username
-      createdAt
-      openid
-      language
-      id
-      avatar
-    }
-    dbName
-    dbUsername
-    dbPassword
-    dbHost
-    dbPort
-    createdAt
-    updatedAt
-  }
-}
-
-query notificationbyid($id: ID) {
-  notificationbyid: notification_by_id(id: $id) {
-    id
-    user_id {
-      email
-      updatedAt
-      password
-      telephone
-      nickname
-      username
-      createdAt
-      openid
-      language
-      id
-      avatar
-    }
-    type
-    webhook
-    name
-  }
-}
-
-query apiGWGroupbyid($id: ID) {
-  apiGWGroupbyid: apiGWGroup_by_id(id: $id) {
-    environmentName
-    userStatus
-    defaultDomain
-    updatedAt
-    userDomain
-    groupName
-    createdAt
-    frontType
-    region
-    serviceId
-    status
-    id
-    cloud_id {
-      id
-
-      cloudName
-      secretId
-      secretKey
-      appId
-      createdAt
-      updatedAt
-    }
-    user_id {
-      email
-      updatedAt
-      password
-      telephone
-      nickname
-      username
-      createdAt
-      openid
-      language
-      id
-      avatar
-    }
-  }
-}
-
-query fcbyprops($user_id: ID, $cloud_id: ID, $fcType: String, $schema_id: ID, $wxConfig_id: ID, $createdAt: String, $updatedAt: String) {
-  fcbyprops: fc_by_props(user_id: $user_id cloud_id: $cloud_id fcType: $fcType schema_id: $schema_id wxConfig_id: $wxConfig_id createdAt: $createdAt updatedAt: $updatedAt) {
-    id
-    user_id {
-      email
-      updatedAt
-      password
-      telephone
-      nickname
-      username
-      createdAt
-      openid
-      language
-      id
-      avatar
-    }
-    cloud_id {
-      id
-
-      cloudName
-      secretId
-      secretKey
-      appId
-      createdAt
-      updatedAt
-    }
-    fcType
-    schema_id {
-      updatedAt
-      schemaState
-      authWrite
-      authReadObjects
-      createdAt
-      authRead
-      schemaName
-      reference
-      id
-      schemaData
-      authReadWrite
-
-      authWriteObjects
-    }
-    wxConfig_id {
-      updatedAt
-      mch_id
-      appName
-      notify_url
-      appSecret
-      createdAt
-      appID
-      token
-      spbill_create_ip
-      enter_url
-      id
-      pay_api_key
-
-      body
-      welcome_words
-      attach
-    }
-    createdAt
-    updatedAt
-  }
-}
-
-query apiGWGroupbyprops($environmentName: String, $userStatus: String, $defaultDomain: String, $updatedAt: String, $userDomain: String, $groupName: String, $createdAt: String, $frontType: String, $region: String, $serviceId: String, $status: String, $cloud_id: ID, $user_id: ID) {
-  apiGWGroupbyprops: apiGWGroup_by_props(environmentName: $environmentName userStatus: $userStatus defaultDomain: $defaultDomain updatedAt: $updatedAt userDomain: $userDomain groupName: $groupName createdAt: $createdAt frontType: $frontType region: $region serviceId: $serviceId status: $status cloud_id: $cloud_id user_id: $user_id) {
-    environmentName
-    userStatus
-    defaultDomain
-    updatedAt
-    userDomain
-    groupName
-    createdAt
-    frontType
-    region
-    serviceId
-    status
-    id
-    cloud_id {
-      id
-
-      cloudName
-      secretId
-      secretKey
-      appId
-      createdAt
-      updatedAt
-    }
-    user_id {
-      email
-      updatedAt
-      password
-      telephone
-      nickname
-      username
-      createdAt
-      openid
-      language
-      id
-      avatar
-    }
-  }
-}
-
-query apiGWPathbyprops($apiGWName: String, $updatedAt: String, $apiGWGroup_id: ID, $createdAt: String, $deploy_id: ID, $serviceType: String, $apiGWPath: String, $user_id: ID, $timeout: Int, $apiGWDesc: String, $requestMethod: String, $apiId: String) {
-  apiGWPathbyprops: apiGWPath_by_props(apiGWName: $apiGWName updatedAt: $updatedAt apiGWGroup_id: $apiGWGroup_id createdAt: $createdAt deploy_id: $deploy_id serviceType: $serviceType apiGWPath: $apiGWPath user_id: $user_id timeout: $timeout apiGWDesc: $apiGWDesc requestMethod: $requestMethod apiId: $apiId) {
-    apiGWName
-    updatedAt
-    apiGWGroup_id {
-      environmentName
-      userStatus
-      defaultDomain
-      updatedAt
-      userDomain
-      groupName
-      createdAt
-      frontType
-      region
-      serviceId
-      status
-      id
-
-    }
-    createdAt
-    deploy_id {
-      description
-      updatedAt
-      cosBucketName
-      memorySize
-
-      createdAt
-      subnetId
-      cosObjectName
-      region
-      vpcId
-      cosBucketRegion
-      id
-
-
-      serviceName
-      timeout
-      handler
-      functionName
-    }
-    serviceType
-    id
-    apiGWPath
-    user_id {
-      email
-      updatedAt
-      password
-      telephone
-      nickname
-      username
-      createdAt
-      openid
-      language
-      id
-      avatar
-    }
-    timeout
-    apiGWDesc
-    requestMethod
-    apiId
-  }
-}
-
-query schemabyprops($updatedAt: String, $schemaState: String, $authWrite: String, $createdAt: String, $authRead: String, $schemaName: String, $reference: String, $schemaData: String, $authReadWrite: String, $user_id: ID) {
-  schemabyprops: schema_by_props(updatedAt: $updatedAt schemaState: $schemaState authWrite: $authWrite createdAt: $createdAt authRead: $authRead schemaName: $schemaName reference: $reference schemaData: $schemaData authReadWrite: $authReadWrite user_id: $user_id) {
-    updatedAt
-    schemaState
-    authWrite
-    authReadObjects
-    createdAt
-    authRead
-    schemaName
-    reference
-    id
-    schemaData
-    authReadWrite
-    user_id {
-      email
-      updatedAt
-      password
-      telephone
-      nickname
-      username
-      createdAt
-      openid
-      language
-      id
-      avatar
-    }
-    authWriteObjects
-  }
-}
-
-query schemabyid($id: ID) {
-  schemabyid: schema_by_id(id: $id) {
-    updatedAt
-    schemaState
-    authWrite
-    authReadObjects
-    createdAt
-    authRead
-    schemaName
-    reference
-    id
-    schemaData
-    authReadWrite
-    user_id {
-      email
-      updatedAt
-      password
-      telephone
-      nickname
-      username
-      createdAt
-      openid
-      language
-      id
-      avatar
-    }
-    authWriteObjects
-  }
-}
-
-query wxConfigbyid($id: ID) {
-  wxConfigbyid: wxConfig_by_id(id: $id) {
-    updatedAt
-    mch_id
-    appName
-    notify_url
-    appSecret
-    createdAt
-    appID
-    token
-    spbill_create_ip
-    enter_url
-    id
-    pay_api_key
-    user_id {
-      email
-      updatedAt
-      password
-      telephone
-      nickname
-      username
-      createdAt
-      openid
-      language
-      id
-      avatar
-    }
-    body
-    welcome_words
-    attach
-  }
-}
-
-query projectbyid($id: ID) {
-  projectbyid: project_by_id(id: $id) {
-    updatedAt
-    database_id {
-      id
-
-      dbName
-      dbUsername
-      dbPassword
-      dbHost
-      dbPort
-      createdAt
-      updatedAt
-    }
-    apiGWGroup_id {
-      environmentName
-      userStatus
-      defaultDomain
-      updatedAt
-      userDomain
-      groupName
-      createdAt
-      frontType
-      region
-      serviceId
-      status
-      id
-
-    }
-    case_id {
-      description
-      updatedAt
-      like
-      createdAt
-      type
-      title
-      codeAddress
-      deployedNum
-      id
-      detailDescription
-      detailAttention
-
-
-      detailImages
-      img
-    }
-    createdAt
-    projectStatus
-    projectName
-    deploy_id {
-      description
-      updatedAt
-      cosBucketName
-      memorySize
-
-      createdAt
-      subnetId
-      cosObjectName
-      region
-      vpcId
-      cosBucketRegion
-      id
-
-
-      serviceName
-      timeout
-      handler
-      functionName
-    }
-    notification_id {
-      id
-
-      type
-      webhook
-      name
-    }
-    id
-    projectType
-    cloud_id {
-      id
-
-      cloudName
-      secretId
-      secretKey
-      appId
-      createdAt
-      updatedAt
-    }
-    user_id {
-      email
-      updatedAt
-      password
-      telephone
-      nickname
-      username
-      createdAt
-      openid
-      language
-      id
-      avatar
-    }
-    wxConfig_id {
-      updatedAt
-      mch_id
-      appName
-      notify_url
-      appSecret
-      createdAt
-      appID
-      token
-      spbill_create_ip
-      enter_url
-      id
-      pay_api_key
-
-      body
-      welcome_words
-      attach
-    }
-    schema_id {
-      updatedAt
-      schemaState
-      authWrite
-      authReadObjects
-      createdAt
-      authRead
-      schemaName
-      reference
-      id
-      schemaData
-      authReadWrite
-
-      authWriteObjects
-    }
-  }
-}
-
-query casebyid($id: ID) {
-  casebyid: case_by_id(id: $id) {
-    description
-    updatedAt
-    like
-    createdAt
-    type
-    title
-    codeAddress
-    deployedNum
-    id
-    detailDescription
-    detailAttention
-    user_id {
-      email
-      updatedAt
-      password
-      telephone
-      nickname
-      username
-      createdAt
-      openid
-      language
-      id
-      avatar
-    }
-    schema_id {
-      updatedAt
-      schemaState
-      authWrite
-      authReadObjects
-      createdAt
-      authRead
-      schemaName
-      reference
-      id
-      schemaData
-      authReadWrite
-
-      authWriteObjects
-    }
-    detailImages
-    img
-  }
-}
-
-query cloudbyid($id: ID) {
-  cloudbyid: cloud_by_id(id: $id) {
-    id
-    user_id {
-      email
-      updatedAt
-      password
-      telephone
-      nickname
-      username
-      createdAt
-      openid
-      language
-      id
-      avatar
-    }
-    cloudName
-    secretId
-    secretKey
-    appId
-    createdAt
-    updatedAt
-  }
-}
-
-query projectbyprops($updatedAt: String, $database_id: ID, $apiGWGroup_id: ID, $case_id: ID, $createdAt: String, $projectStatus: String, $projectName: String, $deploy_id: ID, $notification_id: ID, $projectType: String, $cloud_id: ID, $user_id: ID, $wxConfig_id: ID, $schema_id: ID) {
-  projectbyprops: project_by_props(updatedAt: $updatedAt database_id: $database_id apiGWGroup_id: $apiGWGroup_id case_id: $case_id createdAt: $createdAt projectStatus: $projectStatus projectName: $projectName deploy_id: $deploy_id notification_id: $notification_id projectType: $projectType cloud_id: $cloud_id user_id: $user_id wxConfig_id: $wxConfig_id schema_id: $schema_id) {
-    updatedAt
-    database_id {
-      id
-
-      dbName
-      dbUsername
-      dbPassword
-      dbHost
-      dbPort
-      createdAt
-      updatedAt
-    }
-    apiGWGroup_id {
-      environmentName
-      userStatus
-      defaultDomain
-      updatedAt
-      userDomain
-      groupName
-      createdAt
-      frontType
-      region
-      serviceId
-      status
-      id
-
-    }
-    case_id {
-      description
-      updatedAt
-      like
-      createdAt
-      type
-      title
-      codeAddress
-      deployedNum
-      id
-      detailDescription
-      detailAttention
-
-
-      detailImages
-      img
-    }
-    createdAt
-    projectStatus
-    projectName
-    deploy_id {
-      description
-      updatedAt
-      cosBucketName
-      memorySize
-
-      createdAt
-      subnetId
-      cosObjectName
-      region
-      vpcId
-      cosBucketRegion
-      id
-
-
-      serviceName
-      timeout
-      handler
-      functionName
-    }
-    notification_id {
-      id
-
-      type
-      webhook
-      name
-    }
-    id
-    projectType
-    cloud_id {
-      id
-
-      cloudName
-      secretId
-      secretKey
-      appId
-      createdAt
-      updatedAt
-    }
-    user_id {
-      email
-      updatedAt
-      password
-      telephone
-      nickname
-      username
-      createdAt
-      openid
-      language
-      id
-      avatar
-    }
-    wxConfig_id {
-      updatedAt
-      mch_id
-      appName
-      notify_url
-      appSecret
-      createdAt
-      appID
-      token
-      spbill_create_ip
-      enter_url
-      id
-      pay_api_key
-
-      body
-      welcome_words
-      attach
-    }
-    schema_id {
-      updatedAt
-      schemaState
-      authWrite
-      authReadObjects
-      createdAt
-      authRead
-      schemaName
-      reference
-      id
-      schemaData
-      authReadWrite
-
-      authWriteObjects
-    }
-  }
-}
-
-query wxConfigbyprops($updatedAt: String, $mch_id: String, $appName: String, $notify_url: String, $appSecret: String, $createdAt: String, $appID: String, $token: String, $spbill_create_ip: String, $enter_url: String, $pay_api_key: String, $user_id: ID, $body: String, $welcome_words: String, $attach: String) {
-  wxConfigbyprops: wxConfig_by_props(updatedAt: $updatedAt mch_id: $mch_id appName: $appName notify_url: $notify_url appSecret: $appSecret createdAt: $createdAt appID: $appID token: $token spbill_create_ip: $spbill_create_ip enter_url: $enter_url pay_api_key: $pay_api_key user_id: $user_id body: $body welcome_words: $welcome_words attach: $attach) {
-    updatedAt
-    mch_id
-    appName
-    notify_url
-    appSecret
-    createdAt
-    appID
-    token
-    spbill_create_ip
-    enter_url
-    id
-    pay_api_key
-    user_id {
-      email
-      updatedAt
-      password
-      telephone
-      nickname
-      username
-      createdAt
-      openid
-      language
-      id
-      avatar
-    }
-    body
-    welcome_words
-    attach
-  }
-}
-
-query apiGWPathbyid($id: ID) {
-  apiGWPathbyid: apiGWPath_by_id(id: $id) {
-    apiGWName
-    updatedAt
-    apiGWGroup_id {
-      environmentName
-      userStatus
-      defaultDomain
-      updatedAt
-      userDomain
-      groupName
-      createdAt
-      frontType
-      region
-      serviceId
-      status
-      id
-
-    }
-    createdAt
-    deploy_id {
-      description
-      updatedAt
-      cosBucketName
-      memorySize
-
-      createdAt
-      subnetId
-      cosObjectName
-      region
-      vpcId
-      cosBucketRegion
-      id
-
-
-      serviceName
-      timeout
-      handler
-      functionName
-    }
-    serviceType
-    id
-    apiGWPath
-    user_id {
-      email
-      updatedAt
-      password
-      telephone
-      nickname
-      username
-      createdAt
-      openid
-      language
-      id
-      avatar
-    }
-    timeout
-    apiGWDesc
-    requestMethod
-    apiId
-  }
-}
-
-query orderbyid($id: ID) {
-  orderbyid: order_by_id(id: $id) {
-    id
-    user_id {
-      email
-      updatedAt
-      password
-      telephone
-      nickname
-      username
-      createdAt
-      openid
-      language
-      id
-      avatar
-    }
-    createdAt
-    updatedAt
-  }
-}
-
-query cloudbyprops($user_id: ID, $cloudName: String, $secretId: String, $secretKey: String, $appId: String, $createdAt: String, $updatedAt: String) {
-  cloudbyprops: cloud_by_props(user_id: $user_id cloudName: $cloudName secretId: $secretId secretKey: $secretKey appId: $appId createdAt: $createdAt updatedAt: $updatedAt) {
-    id
-    user_id {
-      email
-      updatedAt
-      password
-      telephone
-      nickname
-      username
-      createdAt
-      openid
-      language
-      id
-      avatar
-    }
-    cloudName
-    secretId
-    secretKey
-    appId
-    createdAt
-    updatedAt
-  }
-}
-
-query casebyprops($description: String, $updatedAt: String, $like: Int, $createdAt: String, $type: String, $title: String, $codeAddress: String, $deployedNum: Int, $detailDescription: String, $detailAttention: String, $user_id: ID, $schema_id: ID, $img: String) {
-  casebyprops: case_by_props(description: $description updatedAt: $updatedAt like: $like createdAt: $createdAt type: $type title: $title codeAddress: $codeAddress deployedNum: $deployedNum detailDescription: $detailDescription detailAttention: $detailAttention user_id: $user_id schema_id: $schema_id img: $img) {
-    description
-    updatedAt
-    like
-    createdAt
-    type
-    title
-    codeAddress
-    deployedNum
-    id
-    detailDescription
-    detailAttention
-    user_id {
-      email
-      updatedAt
-      password
-      telephone
-      nickname
-      username
-      createdAt
-      openid
-      language
-      id
-      avatar
-    }
-    schema_id {
-      updatedAt
-      schemaState
-      authWrite
-      authReadObjects
-      createdAt
-      authRead
-      schemaName
-      reference
-      id
-      schemaData
-      authReadWrite
-
-      authWriteObjects
-    }
-    detailImages
-    img
-  }
-}
-
-query ticketbyprops($updatedAt: String, $repliedBy: ID, $content: String, $repliedAt: String, $createdAt: String, $type: String, $title: String, $status: String, $user_id: ID) {
-  ticketbyprops: ticket_by_props(updatedAt: $updatedAt repliedBy: $repliedBy content: $content repliedAt: $repliedAt createdAt: $createdAt type: $type title: $title status: $status user_id: $user_id) {
-    updatedAt
-    repliedBy
-    content
-    repliedAt
-    createdAt
-    type
-    title
-    status
-    id
-    user_id {
-      email
-      updatedAt
-      password
-      telephone
-      nickname
-      username
-      createdAt
-      openid
-      language
-      id
-      avatar
-    }
-    screenshot
-  }
-}
-
-query userbyprops($email: String, $updatedAt: String, $password: String, $telephone: String, $nickname: String, $username: String, $createdAt: String, $openid: String, $language: String, $avatar: String) {
-  userbyprops: user_by_props(email: $email updatedAt: $updatedAt password: $password telephone: $telephone nickname: $nickname username: $username createdAt: $createdAt openid: $openid language: $language avatar: $avatar) {
-    email
-    updatedAt
-    password
-    telephone
-    nickname
-    username
-    createdAt
-    openid
-    language
-    id
-    avatar
-  }
-}
-
-query orderbyprops($user_id: ID, $createdAt: String, $updatedAt: String) {
-  orderbyprops: order_by_props(user_id: $user_id createdAt: $createdAt updatedAt: $updatedAt) {
-    id
-    user_id {
-      email
-      updatedAt
-      password
-      telephone
-      nickname
-      username
-      createdAt
-      openid
-      language
-      id
-      avatar
-    }
-    createdAt
-    updatedAt
-  }
-}
-
-query fcbyid($id: ID) {
-  fcbyid: fc_by_id(id: $id) {
-    id
-    user_id {
-      email
-      updatedAt
-      password
-      telephone
-      nickname
-      username
-      createdAt
-      openid
-      language
-      id
-      avatar
-    }
-    cloud_id {
-      id
-
-      cloudName
-      secretId
-      secretKey
-      appId
-      createdAt
-      updatedAt
-    }
-    fcType
-    schema_id {
-      updatedAt
-      schemaState
-      authWrite
-      authReadObjects
-      createdAt
-      authRead
-      schemaName
-      reference
-      id
-      schemaData
-      authReadWrite
-
-      authWriteObjects
-    }
-    wxConfig_id {
-      updatedAt
-      mch_id
-      appName
-      notify_url
-      appSecret
-      createdAt
-      appID
-      token
-      spbill_create_ip
-      enter_url
-      id
-      pay_api_key
-
-      body
-      welcome_words
-      attach
-    }
-    createdAt
-    updatedAt
-  }
-}
-
-query databasebyprops($user_id: ID, $dbName: String, $dbUsername: String, $dbPassword: String, $dbHost: String, $dbPort: String, $createdAt: String, $updatedAt: String) {
-  databasebyprops: database_by_props(user_id: $user_id dbName: $dbName dbUsername: $dbUsername dbPassword: $dbPassword dbHost: $dbHost dbPort: $dbPort createdAt: $createdAt updatedAt: $updatedAt) {
-    id
-    user_id {
-      email
-      updatedAt
-      password
-      telephone
-      nickname
-      username
-      createdAt
-      openid
-      language
-      id
-      avatar
-    }
-    dbName
-    dbUsername
-    dbPassword
-    dbHost
-    dbPort
-    createdAt
-    updatedAt
-  }
-}
-
-mutation createuser($email: String, $updatedAt: String, $password: String, $telephone: String, $nickname: String, $username: String, $createdAt: String, $openid: String, $language: String, $id: ID!, $avatar: String) {
-  createuser: create_user(email: $email updatedAt: $updatedAt password: $password telephone: $telephone nickname: $nickname username: $username createdAt: $createdAt openid: $openid language: $language id: $id avatar: $avatar) {
-    email
-    updatedAt
-    password
-    telephone
-    nickname
-    username
-    createdAt
-    openid
-    language
-    id
-    avatar
-  }
-}
-
-mutation createcloud($id: ID!, $user_id: ID, $cloudName: String, $secretId: String, $secretKey: String, $appId: String, $createdAt: String, $updatedAt: String) {
-  createcloud: create_cloud(id: $id user_id: $user_id cloudName: $cloudName secretId: $secretId secretKey: $secretKey appId: $appId createdAt: $createdAt updatedAt: $updatedAt) {
-    id
-    user_id {
-      email
-      updatedAt
-      password
-      telephone
-      nickname
-      username
-      createdAt
-      openid
-      language
-      id
-      avatar
-    }
-    cloudName
-    secretId
-    secretKey
-    appId
-    createdAt
-    updatedAt
-  }
-}
-
-mutation updateschema($updatedAt: String, $schemaState: String, $authWrite: String, $authReadObjects: String, $createdAt: String, $authRead: String, $schemaName: String, $reference: String, $id: ID, $schemaData: String, $authReadWrite: String, $user_id: ID, $authWriteObjects: String) {
-  updateschema: update_schema(updatedAt: $updatedAt schemaState: $schemaState authWrite: $authWrite authReadObjects: $authReadObjects createdAt: $createdAt authRead: $authRead schemaName: $schemaName reference: $reference id: $id schemaData: $schemaData authReadWrite: $authReadWrite user_id: $user_id authWriteObjects: $authWriteObjects) {
-    updatedAt
-    schemaState
-    authWrite
-    authReadObjects
-    createdAt
-    authRead
-    schemaName
-    reference
-    id
-    schemaData
-    authReadWrite
-    user_id {
-      email
-      updatedAt
-      password
-      telephone
-      nickname
-      username
-      createdAt
-      openid
-      language
-      id
-      avatar
-    }
-    authWriteObjects
-  }
-}
-
-mutation createapiGWPath($apiGWName: String, $updatedAt: String, $apiGWGroup_id: ID, $createdAt: String, $deploy_id: ID, $serviceType: String, $id: ID!, $apiGWPath: String, $user_id: ID, $timeout: Int, $apiGWDesc: String, $requestMethod: String, $apiId: String) {
-  createapiGWPath: create_apiGWPath(apiGWName: $apiGWName updatedAt: $updatedAt apiGWGroup_id: $apiGWGroup_id createdAt: $createdAt deploy_id: $deploy_id serviceType: $serviceType id: $id apiGWPath: $apiGWPath user_id: $user_id timeout: $timeout apiGWDesc: $apiGWDesc requestMethod: $requestMethod apiId: $apiId) {
-    apiGWName
-    updatedAt
-    apiGWGroup_id {
-      environmentName
-      userStatus
-      defaultDomain
-      updatedAt
-      userDomain
-      groupName
-      createdAt
-      frontType
-      region
-      serviceId
-      status
-      id
-    }
-    createdAt
-    deploy_id {
-      description
-      updatedAt
-      cosBucketName
-      memorySize
-      createdAt
-      subnetId
-      cosObjectName
-      region
-      vpcId
-      cosBucketRegion
-      id
-      serviceName
-      timeout
-      handler
-      functionName
-    }
-    serviceType
-    id
-    apiGWPath
-    user_id {
-      email
-      updatedAt
-      password
-      telephone
-      nickname
-      username
-      createdAt
-      openid
-      language
-      id
-      avatar
-    }
-    timeout
-    apiGWDesc
-    requestMethod
-    apiId
-  }
-}
-
-mutation createproject($updatedAt: String, $database_id: ID, $apiGWGroup_id: ID, $case_id: ID, $createdAt: String, $projectStatus: String, $projectName: String, $deploy_id: ID, $notification_id: ID, $id: ID!, $projectType: String, $cloud_id: ID, $user_id: ID, $wxConfig_id: ID, $schema_id: ID) {
-  createproject: create_project(updatedAt: $updatedAt database_id: $database_id apiGWGroup_id: $apiGWGroup_id case_id: $case_id createdAt: $createdAt projectStatus: $projectStatus projectName: $projectName deploy_id: $deploy_id notification_id: $notification_id id: $id projectType: $projectType cloud_id: $cloud_id user_id: $user_id wxConfig_id: $wxConfig_id schema_id: $schema_id) {
-    updatedAt
-    database_id {
-      id
-      dbName
-      dbUsername
-      dbPassword
-      dbHost
-      dbPort
-      createdAt
-      updatedAt
-    }
-    apiGWGroup_id {
-      environmentName
-      userStatus
-      defaultDomain
-      updatedAt
-      userDomain
-      groupName
-      createdAt
-      frontType
-      region
-      serviceId
-      status
-      id
-    }
-    case_id {
-      description
-      updatedAt
-      like
-      createdAt
-      type
-      title
-      codeAddress
-      deployedNum
-      id
-      detailDescription
-      detailAttention
-      detailImages
-      img
-    }
-    createdAt
-    projectStatus
-    projectName
-    deploy_id {
-      description
-      updatedAt
-      cosBucketName
-      memorySize
-      createdAt
-      subnetId
-      cosObjectName
-      region
-      vpcId
-      cosBucketRegion
-      id
-      serviceName
-      timeout
-      handler
-      functionName
-    }
-    notification_id {
-      id
-      type
-      webhook
-      name
-    }
-    id
-    projectType
-    cloud_id {
-      id
-      cloudName
-      secretId
-      secretKey
-      appId
-      createdAt
-      updatedAt
-    }
-    user_id {
-      email
-      updatedAt
-      password
-      telephone
-      nickname
-      username
-      createdAt
-      openid
-      language
-      id
-      avatar
-    }
-    wxConfig_id {
-      updatedAt
-      mch_id
-      appName
-      notify_url
-      appSecret
-      createdAt
-      appID
-      token
-      spbill_create_ip
-      enter_url
-      id
-      pay_api_key
-      body
-      welcome_words
-      attach
-    }
-    schema_id {
-      updatedAt
-      schemaState
-      authWrite
-      authReadObjects
-      createdAt
-      authRead
-      schemaName
-      reference
-      id
-      schemaData
-      authReadWrite
-      authWriteObjects
-    }
-  }
-}
-
-mutation updatewxConfig($updatedAt: String, $mch_id: String, $appName: String, $notify_url: String, $appSecret: String, $createdAt: String, $appID: String, $token: String, $spbill_create_ip: String, $enter_url: String, $id: ID, $pay_api_key: String, $user_id: ID, $body: String, $welcome_words: String, $attach: String) {
-  updatewxConfig: update_wxConfig(updatedAt: $updatedAt mch_id: $mch_id appName: $appName notify_url: $notify_url appSecret: $appSecret createdAt: $createdAt appID: $appID token: $token spbill_create_ip: $spbill_create_ip enter_url: $enter_url id: $id pay_api_key: $pay_api_key user_id: $user_id body: $body welcome_words: $welcome_words attach: $attach) {
-    updatedAt
-    mch_id
-    appName
-    notify_url
-    appSecret
-    createdAt
-    appID
-    token
-    spbill_create_ip
-    enter_url
-    id
-    pay_api_key
-    user_id {
-      email
-      updatedAt
-      password
-      telephone
-      nickname
-      username
-      createdAt
-      openid
-      language
-      id
-      avatar
-    }
-    body
-    welcome_words
-    attach
-  }
-}
-
-mutation deleteproject($updatedAt: String, $database_id: ID, $apiGWGroup_id: ID, $case_id: ID, $createdAt: String, $projectStatus: String, $projectName: String, $deploy_id: ID, $notification_id: ID, $id: ID, $projectType: String, $cloud_id: ID, $user_id: ID, $wxConfig_id: ID, $schema_id: ID) {
-  deleteproject: delete_project(updatedAt: $updatedAt database_id: $database_id apiGWGroup_id: $apiGWGroup_id case_id: $case_id createdAt: $createdAt projectStatus: $projectStatus projectName: $projectName deploy_id: $deploy_id notification_id: $notification_id id: $id projectType: $projectType cloud_id: $cloud_id user_id: $user_id wxConfig_id: $wxConfig_id schema_id: $schema_id)
-}
-
-mutation deleteapiGWGroup($environmentName: String, $userStatus: String, $defaultDomain: String, $updatedAt: String, $userDomain: String, $groupName: String, $createdAt: String, $frontType: String, $region: String, $serviceId: String, $status: String, $id: ID, $cloud_id: ID, $user_id: ID) {
-  deleteapiGWGroup: delete_apiGWGroup(environmentName: $environmentName userStatus: $userStatus defaultDomain: $defaultDomain updatedAt: $updatedAt userDomain: $userDomain groupName: $groupName createdAt: $createdAt frontType: $frontType region: $region serviceId: $serviceId status: $status id: $id cloud_id: $cloud_id user_id: $user_id)
-}
-
-mutation deletefc($id: ID, $user_id: ID, $cloud_id: ID, $fcType: String, $schema_id: ID, $wxConfig_id: ID, $createdAt: String, $updatedAt: String) {
-  deletefc: delete_fc(id: $id user_id: $user_id cloud_id: $cloud_id fcType: $fcType schema_id: $schema_id wxConfig_id: $wxConfig_id createdAt: $createdAt updatedAt: $updatedAt)
-}
-
-mutation updateuser($email: String, $updatedAt: String, $password: String, $telephone: String, $nickname: String, $username: String, $createdAt: String, $openid: String, $language: String, $id: ID, $avatar: String) {
-  updateuser: update_user(email: $email updatedAt: $updatedAt password: $password telephone: $telephone nickname: $nickname username: $username createdAt: $createdAt openid: $openid language: $language id: $id avatar: $avatar) {
-    email
-    updatedAt
-    password
-    telephone
-    nickname
-    username
-    createdAt
-    openid
-    language
-    id
-    avatar
-  }
-}
-
-mutation updateproject($updatedAt: String, $database_id: ID, $apiGWGroup_id: ID, $case_id: ID, $createdAt: String, $projectStatus: String, $projectName: String, $deploy_id: ID, $notification_id: ID, $id: ID, $projectType: String, $cloud_id: ID, $user_id: ID, $wxConfig_id: ID, $schema_id: ID) {
-  updateproject: update_project(updatedAt: $updatedAt database_id: $database_id apiGWGroup_id: $apiGWGroup_id case_id: $case_id createdAt: $createdAt projectStatus: $projectStatus projectName: $projectName deploy_id: $deploy_id notification_id: $notification_id id: $id projectType: $projectType cloud_id: $cloud_id user_id: $user_id wxConfig_id: $wxConfig_id schema_id: $schema_id) {
-    updatedAt
-    database_id {
-      id
-      dbName
-      dbUsername
-      dbPassword
-      dbHost
-      dbPort
-      createdAt
-      updatedAt
-    }
-    apiGWGroup_id {
-      environmentName
-      userStatus
-      defaultDomain
-      updatedAt
-      userDomain
-      groupName
-      createdAt
-      frontType
-      region
-      serviceId
-      status
-      id
-
-    }
-    case_id {
-      description
-      updatedAt
-      like
-      createdAt
-      type
-      title
-      codeAddress
-      deployedNum
-      id
-      detailDescription
-      detailAttention
-      detailImages
-      img
-    }
-    createdAt
-    projectStatus
-    projectName
-    deploy_id {
-      description
-      updatedAt
-      cosBucketName
-      memorySize
-      createdAt
-      subnetId
-      cosObjectName
-      region
-      vpcId
-      cosBucketRegion
-      id
-      serviceName
-      timeout
-      handler
-      functionName
-    }
-    notification_id {
-      id
-      type
-      webhook
-      name
-    }
-    id
-    projectType
-    cloud_id {
-      id
-      cloudName
-      secretId
-      secretKey
-      appId
-      createdAt
-      updatedAt
-    }
-    user_id {
-      email
-      updatedAt
-      password
-      telephone
-      nickname
-      username
-      createdAt
-      openid
-      language
-      id
-      avatar
-    }
-    wxConfig_id {
-      updatedAt
-      mch_id
-      appName
-      notify_url
-      appSecret
-      createdAt
-      appID
-      token
-      spbill_create_ip
-      enter_url
-      id
-      pay_api_key
-      body
-      welcome_words
-      attach
-    }
-    schema_id {
-      updatedAt
-      schemaState
-      authWrite
-      authReadObjects
-      createdAt
-      authRead
-      schemaName
-      reference
-      id
-      schemaData
-      authReadWrite
-      authWriteObjects
-    }
-  }
-}
-
-mutation updatefc($id: ID, $user_id: ID, $cloud_id: ID, $fcType: String, $schema_id: ID, $wxConfig_id: ID, $createdAt: String, $updatedAt: String) {
-  updatefc: update_fc(id: $id user_id: $user_id cloud_id: $cloud_id fcType: $fcType schema_id: $schema_id wxConfig_id: $wxConfig_id createdAt: $createdAt updatedAt: $updatedAt) {
-    id
-    user_id {
-      email
-      updatedAt
-      password
-      telephone
-      nickname
-      username
-      createdAt
-      openid
-      language
-      id
-      avatar
-    }
-    cloud_id {
-      id
-
-      cloudName
-      secretId
-      secretKey
-      appId
-      createdAt
-      updatedAt
-    }
-    fcType
-    schema_id {
-      updatedAt
-      schemaState
-      authWrite
-      authReadObjects
-      createdAt
-      authRead
-      schemaName
-      reference
-      id
-      schemaData
-      authReadWrite
-
-      authWriteObjects
-    }
-    wxConfig_id {
-      updatedAt
-      mch_id
-      appName
-      notify_url
-      appSecret
-      createdAt
-      appID
-      token
-      spbill_create_ip
-      enter_url
-      id
-      pay_api_key
-
-      body
-      welcome_words
-      attach
-    }
-    createdAt
-    updatedAt
-  }
-}
-
-mutation createschema($updatedAt: String, $schemaState: String, $authWrite: String, $authReadObjects: String, $createdAt: String, $authRead: String, $schemaName: String, $reference: String, $id: ID!, $schemaData: String, $authReadWrite: String, $user_id: ID, $authWriteObjects: String) {
-  createschema: create_schema(updatedAt: $updatedAt schemaState: $schemaState authWrite: $authWrite authReadObjects: $authReadObjects createdAt: $createdAt authRead: $authRead schemaName: $schemaName reference: $reference id: $id schemaData: $schemaData authReadWrite: $authReadWrite user_id: $user_id authWriteObjects: $authWriteObjects) {
-    updatedAt
-    schemaState
-    authWrite
-    authReadObjects
-    createdAt
-    authRead
-    schemaName
-    reference
-    id
-    schemaData
-    authReadWrite
-    user_id {
-      email
-      updatedAt
-      password
-      telephone
-      nickname
-      username
-      createdAt
-      openid
-      language
-      id
-      avatar
-    }
-    authWriteObjects
-  }
-}
-
-mutation createcase($description: String, $updatedAt: String, $like: Int, $createdAt: String, $type: String, $title: String, $codeAddress: String, $deployedNum: Int, $id: ID!, $detailDescription: String, $detailAttention: String, $user_id: ID, $schema_id: ID, $detailImages: String, $img: String) {
-  createcase: create_case(description: $description updatedAt: $updatedAt like: $like createdAt: $createdAt type: $type title: $title codeAddress: $codeAddress deployedNum: $deployedNum id: $id detailDescription: $detailDescription detailAttention: $detailAttention user_id: $user_id schema_id: $schema_id detailImages: $detailImages img: $img) {
-    description
-    updatedAt
-    like
-    createdAt
-    type
-    title
-    codeAddress
-    deployedNum
-    id
-    detailDescription
-    detailAttention
-    user_id {
-      email
-      updatedAt
-      password
-      telephone
-      nickname
-      username
-      createdAt
-      openid
-      language
-      id
-      avatar
-    }
-    schema_id {
-      updatedAt
-      schemaState
-      authWrite
-      authReadObjects
-      createdAt
-      authRead
-      schemaName
-      reference
-      id
-      schemaData
-      authReadWrite
-
-      authWriteObjects
-    }
-    detailImages
-    img
-  }
-}
-
-mutation updatecase($description: String, $updatedAt: String, $like: Int, $createdAt: String, $type: String, $title: String, $codeAddress: String, $deployedNum: Int, $id: ID, $detailDescription: String, $detailAttention: String, $user_id: ID, $schema_id: ID, $detailImages: String, $img: String) {
-  updatecase: update_case(description: $description updatedAt: $updatedAt like: $like createdAt: $createdAt type: $type title: $title codeAddress: $codeAddress deployedNum: $deployedNum id: $id detailDescription: $detailDescription detailAttention: $detailAttention user_id: $user_id schema_id: $schema_id detailImages: $detailImages img: $img) {
-    description
-    updatedAt
-    like
-    createdAt
-    type
-    title
-    codeAddress
-    deployedNum
-    id
-    detailDescription
-    detailAttention
-    user_id {
-      email
-      updatedAt
-      password
-      telephone
-      nickname
-      username
-      createdAt
-      openid
-      language
-      id
-      avatar
-    }
-    schema_id {
-      updatedAt
-      schemaState
-      authWrite
-      authReadObjects
-      createdAt
-      authRead
-      schemaName
-      reference
-      id
-      schemaData
-      authReadWrite
-
-      authWriteObjects
-    }
-    detailImages
-    img
-  }
-}
-
-mutation deleteapiGWPath($apiGWName: String, $updatedAt: String, $apiGWGroup_id: ID, $createdAt: String, $deploy_id: ID, $serviceType: String, $id: ID, $apiGWPath: String, $user_id: ID, $timeout: Int, $apiGWDesc: String, $requestMethod: String, $apiId: String) {
-  deleteapiGWPath: delete_apiGWPath(apiGWName: $apiGWName updatedAt: $updatedAt apiGWGroup_id: $apiGWGroup_id createdAt: $createdAt deploy_id: $deploy_id serviceType: $serviceType id: $id apiGWPath: $apiGWPath user_id: $user_id timeout: $timeout apiGWDesc: $apiGWDesc requestMethod: $requestMethod apiId: $apiId)
-}
-
-mutation updatedatabase($id: ID, $user_id: ID, $dbName: String, $dbUsername: String, $dbPassword: String, $dbHost: String, $dbPort: String, $createdAt: String, $updatedAt: String) {
-  updatedatabase: update_database(id: $id user_id: $user_id dbName: $dbName dbUsername: $dbUsername dbPassword: $dbPassword dbHost: $dbHost dbPort: $dbPort createdAt: $createdAt updatedAt: $updatedAt) {
-    id
-    user_id {
-      email
-      updatedAt
-      password
-      telephone
-      nickname
-      username
-      createdAt
-      openid
-      language
-      id
-      avatar
-    }
-    dbName
-    dbUsername
-    dbPassword
-    dbHost
-    dbPort
-    createdAt
-    updatedAt
-  }
-}
-
-mutation createapiGWGroup($environmentName: String, $userStatus: String, $defaultDomain: String, $updatedAt: String, $userDomain: String, $groupName: String, $createdAt: String, $frontType: String, $region: String, $serviceId: String, $status: String, $id: ID!, $cloud_id: ID, $user_id: ID) {
-  createapiGWGroup: create_apiGWGroup(environmentName: $environmentName userStatus: $userStatus defaultDomain: $defaultDomain updatedAt: $updatedAt userDomain: $userDomain groupName: $groupName createdAt: $createdAt frontType: $frontType region: $region serviceId: $serviceId status: $status id: $id cloud_id: $cloud_id user_id: $user_id) {
-    environmentName
-    userStatus
-    defaultDomain
-    updatedAt
-    userDomain
-    groupName
-    createdAt
-    frontType
-    region
-    serviceId
-    status
-    id
-    cloud_id {
-      id
-
-      cloudName
-      secretId
-      secretKey
-      appId
-      createdAt
-      updatedAt
-    }
-    user_id {
-      email
-      updatedAt
-      password
-      telephone
-      nickname
-      username
-      createdAt
-      openid
-      language
-      id
-      avatar
-    }
-  }
-}
-
-mutation deletedatabase($id: ID, $user_id: ID, $dbName: String, $dbUsername: String, $dbPassword: String, $dbHost: String, $dbPort: String, $createdAt: String, $updatedAt: String) {
-  deletedatabase: delete_database(id: $id user_id: $user_id dbName: $dbName dbUsername: $dbUsername dbPassword: $dbPassword dbHost: $dbHost dbPort: $dbPort createdAt: $createdAt updatedAt: $updatedAt)
-}
-
-mutation deletecase($description: String, $updatedAt: String, $like: Int, $createdAt: String, $type: String, $title: String, $codeAddress: String, $deployedNum: Int, $id: ID, $detailDescription: String, $detailAttention: String, $user_id: ID, $schema_id: ID, $img: String) {
-  deletecase: delete_case(description: $description updatedAt: $updatedAt like: $like createdAt: $createdAt type: $type title: $title codeAddress: $codeAddress deployedNum: $deployedNum id: $id detailDescription: $detailDescription detailAttention: $detailAttention user_id: $user_id schema_id: $schema_id img: $img)
-}
-
-mutation deletedeploy($description: String, $updatedAt: String, $cosBucketName: String, $memorySize: Int, $fc_id: ID, $createdAt: String, $subnetId: String, $cosObjectName: String, $region: String, $vpcId: String, $cosBucketRegion: String, $id: ID, $cloud_id: ID, $user_id: ID, $serviceName: String, $timeout: Int, $handler: String, $functionName: String) {
-  deletedeploy: delete_deploy(description: $description updatedAt: $updatedAt cosBucketName: $cosBucketName memorySize: $memorySize fc_id: $fc_id createdAt: $createdAt subnetId: $subnetId cosObjectName: $cosObjectName region: $region vpcId: $vpcId cosBucketRegion: $cosBucketRegion id: $id cloud_id: $cloud_id user_id: $user_id serviceName: $serviceName timeout: $timeout handler: $handler functionName: $functionName)
-}
-
-mutation createdatabase($id: ID!, $user_id: ID, $dbName: String, $dbUsername: String, $dbPassword: String, $dbHost: String, $dbPort: String, $createdAt: String, $updatedAt: String) {
-  createdatabase: create_database(id: $id user_id: $user_id dbName: $dbName dbUsername: $dbUsername dbPassword: $dbPassword dbHost: $dbHost dbPort: $dbPort createdAt: $createdAt updatedAt: $updatedAt) {
-    id
-    user_id {
-      email
-      updatedAt
-      password
-      telephone
-      nickname
-      username
-      createdAt
-      openid
-      language
-      id
-      avatar
-    }
-    dbName
-    dbUsername
-    dbPassword
-    dbHost
-    dbPort
-    createdAt
-    updatedAt
-  }
-}
-
-mutation deleteorder($id: ID, $user_id: ID, $createdAt: String, $updatedAt: String) {
-  deleteorder: delete_order(id: $id user_id: $user_id createdAt: $createdAt updatedAt: $updatedAt)
-}
-
-mutation deletenotification($id: ID, $user_id: ID, $type: String, $webhook: String, $name: String) {
-  deletenotification: delete_notification(id: $id user_id: $user_id type: $type webhook: $webhook name: $name)
-}
-
-mutation deleteschema($updatedAt: String, $schemaState: String, $authWrite: String, $createdAt: String, $authRead: String, $schemaName: String, $reference: String, $id: ID, $schemaData: String, $authReadWrite: String, $user_id: ID) {
-  deleteschema: delete_schema(updatedAt: $updatedAt schemaState: $schemaState authWrite: $authWrite createdAt: $createdAt authRead: $authRead schemaName: $schemaName reference: $reference id: $id schemaData: $schemaData authReadWrite: $authReadWrite user_id: $user_id)
-}
-
-mutation deleteuser($email: String, $updatedAt: String, $password: String, $telephone: String, $nickname: String, $username: String, $createdAt: String, $openid: String, $language: String, $id: ID, $avatar: String) {
-  deleteuser: delete_user(email: $email updatedAt: $updatedAt password: $password telephone: $telephone nickname: $nickname username: $username createdAt: $createdAt openid: $openid language: $language id: $id avatar: $avatar)
-}
-
-mutation createorder($id: ID!, $user_id: ID, $createdAt: String, $updatedAt: String) {
-  createorder: create_order(id: $id user_id: $user_id createdAt: $createdAt updatedAt: $updatedAt) {
-    id
-    user_id {
-      email
-      updatedAt
-      password
-      telephone
-      nickname
-      username
-      createdAt
-      openid
-      language
-      id
-      avatar
-    }
-    createdAt
-    updatedAt
-  }
-}
-
-mutation updateapiGWPath($apiGWName: String, $updatedAt: String, $apiGWGroup_id: ID, $createdAt: String, $deploy_id: ID, $serviceType: String, $id: ID, $apiGWPath: String, $user_id: ID, $timeout: Int, $apiGWDesc: String, $requestMethod: String, $apiId: String) {
-  updateapiGWPath: update_apiGWPath(apiGWName: $apiGWName updatedAt: $updatedAt apiGWGroup_id: $apiGWGroup_id createdAt: $createdAt deploy_id: $deploy_id serviceType: $serviceType id: $id apiGWPath: $apiGWPath user_id: $user_id timeout: $timeout apiGWDesc: $apiGWDesc requestMethod: $requestMethod apiId: $apiId) {
-    apiGWName
-    updatedAt
-    apiGWGroup_id {
-      environmentName
-      userStatus
-      defaultDomain
-      updatedAt
-      userDomain
-      groupName
-      createdAt
-      frontType
-      region
-      serviceId
-      status
-      id
-
-    }
-    createdAt
-    deploy_id {
-      description
-      updatedAt
-      cosBucketName
-      memorySize
-
-      createdAt
-      subnetId
-      cosObjectName
-      region
-      vpcId
-      cosBucketRegion
-      id
-
-
-      serviceName
-      timeout
-      handler
-      functionName
-    }
-    serviceType
-    id
-    apiGWPath
-    user_id {
-      email
-      updatedAt
-      password
-      telephone
-      nickname
-      username
-      createdAt
-      openid
-      language
-      id
-      avatar
-    }
-    timeout
-    apiGWDesc
-    requestMethod
-    apiId
-  }
-}
-
-mutation createdeploy($description: String, $updatedAt: String, $cosBucketName: String, $memorySize: Int, $fc_id: ID, $createdAt: String, $subnetId: String, $cosObjectName: String, $region: String, $vpcId: String, $cosBucketRegion: String, $id: ID!, $cloud_id: ID, $user_id: ID, $serviceName: String, $timeout: Int, $handler: String, $functionName: String) {
-  createdeploy: create_deploy(description: $description updatedAt: $updatedAt cosBucketName: $cosBucketName memorySize: $memorySize fc_id: $fc_id createdAt: $createdAt subnetId: $subnetId cosObjectName: $cosObjectName region: $region vpcId: $vpcId cosBucketRegion: $cosBucketRegion id: $id cloud_id: $cloud_id user_id: $user_id serviceName: $serviceName timeout: $timeout handler: $handler functionName: $functionName) {
-    description
-    updatedAt
-    cosBucketName
-    memorySize
-    fc_id {
-      id
-
-
-      fcType
-
-
-      createdAt
-      updatedAt
-    }
-    createdAt
-    subnetId
-    cosObjectName
-    region
-    vpcId
-    cosBucketRegion
-    id
-    cloud_id {
-      id
-
-      cloudName
-      secretId
-      secretKey
-      appId
-      createdAt
-      updatedAt
-    }
-    user_id {
-      email
-      updatedAt
-      password
-      telephone
-      nickname
-      username
-      createdAt
-      openid
-      language
-      id
-      avatar
-    }
-    serviceName
-    timeout
-    handler
-    functionName
-  }
-}
-
-mutation createfc($id: ID!, $user_id: ID, $cloud_id: ID, $fcType: String, $schema_id: ID, $wxConfig_id: ID, $createdAt: String, $updatedAt: String) {
-  createfc: create_fc(id: $id user_id: $user_id cloud_id: $cloud_id fcType: $fcType schema_id: $schema_id wxConfig_id: $wxConfig_id createdAt: $createdAt updatedAt: $updatedAt) {
-    id
-    user_id {
-      email
-      updatedAt
-      password
-      telephone
-      nickname
-      username
-      createdAt
-      openid
-      language
-      id
-      avatar
-    }
-    cloud_id {
-      id
-
-      cloudName
-      secretId
-      secretKey
-      appId
-      createdAt
-      updatedAt
-    }
-    fcType
-    schema_id {
-      updatedAt
-      schemaState
-      authWrite
-      authReadObjects
-      createdAt
-      authRead
-      schemaName
-      reference
-      id
-      schemaData
-      authReadWrite
-
-      authWriteObjects
-    }
-    wxConfig_id {
-      updatedAt
-      mch_id
-      appName
-      notify_url
-      appSecret
-      createdAt
-      appID
-      token
-      spbill_create_ip
-      enter_url
-      id
-      pay_api_key
-
-      body
-      welcome_words
-      attach
-    }
-    createdAt
-    updatedAt
-  }
-}
-
-mutation updatecloud($id: ID, $user_id: ID, $cloudName: String, $secretId: String, $secretKey: String, $appId: String, $createdAt: String, $updatedAt: String) {
-  updatecloud: update_cloud(id: $id user_id: $user_id cloudName: $cloudName secretId: $secretId secretKey: $secretKey appId: $appId createdAt: $createdAt updatedAt: $updatedAt) {
-    id
-    user_id {
-      email
-      updatedAt
-      password
-      telephone
-      nickname
-      username
-      createdAt
-      openid
-      language
-      id
-      avatar
-    }
-    cloudName
-    secretId
-    secretKey
-    appId
-    createdAt
-    updatedAt
-  }
-}
-
-mutation createnotification($id: ID!, $user_id: ID, $type: String, $webhook: String, $name: String) {
-  createnotification: create_notification(id: $id user_id: $user_id type: $type webhook: $webhook name: $name) {
-    id
-    user_id {
-      email
-      updatedAt
-      password
-      telephone
-      nickname
-      username
-      createdAt
-      openid
-      language
-      id
-      avatar
-    }
-    type
-    webhook
-    name
-  }
-}
-
-mutation deleteticket($updatedAt: String, $repliedBy: ID, $content: String, $repliedAt: String, $createdAt: String, $type: String, $title: String, $status: String, $id: ID, $user_id: ID) {
-  deleteticket: delete_ticket(updatedAt: $updatedAt repliedBy: $repliedBy content: $content repliedAt: $repliedAt createdAt: $createdAt type: $type title: $title status: $status id: $id user_id: $user_id)
-}
-
-mutation updatenotification($id: ID, $user_id: ID, $type: String, $webhook: String, $name: String) {
-  updatenotification: update_notification(id: $id user_id: $user_id type: $type webhook: $webhook name: $name) {
-    id
-    user_id {
-      email
-      updatedAt
-      password
-      telephone
-      nickname
-      username
-      createdAt
-      openid
-      language
-      id
-      avatar
-    }
-    type
-    webhook
-    name
-  }
-}
-
-mutation updateorder($id: ID, $user_id: ID, $createdAt: String, $updatedAt: String) {
-  updateorder: update_order(id: $id user_id: $user_id createdAt: $createdAt updatedAt: $updatedAt) {
-    id
-    user_id {
-      email
-      updatedAt
-      password
-      telephone
-      nickname
-      username
-      createdAt
-      openid
-      language
-      id
-      avatar
-    }
-    createdAt
-    updatedAt
-  }
-}
-
-mutation deletecloud($id: ID, $user_id: ID, $cloudName: String, $secretId: String, $secretKey: String, $appId: String, $createdAt: String, $updatedAt: String) {
-  deletecloud: delete_cloud(id: $id user_id: $user_id cloudName: $cloudName secretId: $secretId secretKey: $secretKey appId: $appId createdAt: $createdAt updatedAt: $updatedAt)
-}
-
-mutation deletewxConfig($updatedAt: String, $mch_id: String, $appName: String, $notify_url: String, $appSecret: String, $createdAt: String, $appID: String, $token: String, $spbill_create_ip: String, $enter_url: String, $id: ID, $pay_api_key: String, $user_id: ID, $body: String, $welcome_words: String, $attach: String) {
-  deletewxConfig: delete_wxConfig(updatedAt: $updatedAt mch_id: $mch_id appName: $appName notify_url: $notify_url appSecret: $appSecret createdAt: $createdAt appID: $appID token: $token spbill_create_ip: $spbill_create_ip enter_url: $enter_url id: $id pay_api_key: $pay_api_key user_id: $user_id body: $body welcome_words: $welcome_words attach: $attach)
-}
-
-mutation updatedeploy($description: String, $updatedAt: String, $cosBucketName: String, $memorySize: Int, $fc_id: ID, $createdAt: String, $subnetId: String, $cosObjectName: String, $region: String, $vpcId: String, $cosBucketRegion: String, $id: ID, $cloud_id: ID, $user_id: ID, $serviceName: String, $timeout: Int, $handler: String, $functionName: String) {
-  updatedeploy: update_deploy(description: $description updatedAt: $updatedAt cosBucketName: $cosBucketName memorySize: $memorySize fc_id: $fc_id createdAt: $createdAt subnetId: $subnetId cosObjectName: $cosObjectName region: $region vpcId: $vpcId cosBucketRegion: $cosBucketRegion id: $id cloud_id: $cloud_id user_id: $user_id serviceName: $serviceName timeout: $timeout handler: $handler functionName: $functionName) {
-    description
-    updatedAt
-    cosBucketName
-    memorySize
-    fc_id {
-      id
-
-
-      fcType
-
-
-      createdAt
-      updatedAt
-    }
-    createdAt
-    subnetId
-    cosObjectName
-    region
-    vpcId
-    cosBucketRegion
-    id
-    cloud_id {
-      id
-
-      cloudName
-      secretId
-      secretKey
-      appId
-      createdAt
-      updatedAt
-    }
-    user_id {
-      email
-      updatedAt
-      password
-      telephone
-      nickname
-      username
-      createdAt
-      openid
-      language
-      id
-      avatar
-    }
-    serviceName
-    timeout
-    handler
-    functionName
-  }
-}
-
-mutation updateapiGWGroup($environmentName: String, $userStatus: String, $defaultDomain: String, $updatedAt: String, $userDomain: String, $groupName: String, $createdAt: String, $frontType: String, $region: String, $serviceId: String, $status: String, $id: ID, $cloud_id: ID, $user_id: ID) {
-  updateapiGWGroup: update_apiGWGroup(environmentName: $environmentName userStatus: $userStatus defaultDomain: $defaultDomain updatedAt: $updatedAt userDomain: $userDomain groupName: $groupName createdAt: $createdAt frontType: $frontType region: $region serviceId: $serviceId status: $status id: $id cloud_id: $cloud_id user_id: $user_id) {
-    environmentName
-    userStatus
-    defaultDomain
-    updatedAt
-    userDomain
-    groupName
-    createdAt
-    frontType
-    region
-    serviceId
-    status
-    id
-    cloud_id {
-      id
-
-      cloudName
-      secretId
-      secretKey
-      appId
-      createdAt
-      updatedAt
-    }
-    user_id {
-      email
-      updatedAt
-      password
-      telephone
-      nickname
-      username
-      createdAt
-      openid
-      language
-      id
-      avatar
-    }
-  }
-}
-
-mutation updateticket($updatedAt: String, $repliedBy: ID, $content: String, $repliedAt: String, $createdAt: String, $type: String, $title: String, $status: String, $id: ID, $user_id: ID, $screenshot: String) {
-  updateticket: update_ticket(updatedAt: $updatedAt repliedBy: $repliedBy content: $content repliedAt: $repliedAt createdAt: $createdAt type: $type title: $title status: $status id: $id user_id: $user_id screenshot: $screenshot) {
-    updatedAt
-    repliedBy
-    content
-    repliedAt
-    createdAt
-    type
-    title
-    status
-    id
-    user_id {
-      email
-      updatedAt
-      password
-      telephone
-      nickname
-      username
-      createdAt
-      openid
-      language
-      id
-      avatar
-    }
-    screenshot
-  }
-}
-
-mutation createticket($updatedAt: String, $repliedBy: ID, $content: String, $repliedAt: String, $createdAt: String, $type: String, $title: String, $status: String, $id: ID!, $user_id: ID, $screenshot: String) {
-  createticket: create_ticket(updatedAt: $updatedAt repliedBy: $repliedBy content: $content repliedAt: $repliedAt createdAt: $createdAt type: $type title: $title status: $status id: $id user_id: $user_id screenshot: $screenshot) {
-    updatedAt
-    repliedBy
-    content
-    repliedAt
-    createdAt
-    type
-    title
-    status
-    id
-    user_id {
-      email
-      updatedAt
-      password
-      telephone
-      nickname
-      username
-      createdAt
-      openid
-      language
-      id
-      avatar
-    }
-    screenshot
-  }
-}
-
-mutation createwxConfig($updatedAt: String, $mch_id: String, $appName: String, $notify_url: String, $appSecret: String, $createdAt: String, $appID: String, $token: String, $spbill_create_ip: String, $enter_url: String, $id: ID!, $pay_api_key: String, $user_id: ID, $body: String, $welcome_words: String, $attach: String) {
-  createwxConfig: create_wxConfig(updatedAt: $updatedAt mch_id: $mch_id appName: $appName notify_url: $notify_url appSecret: $appSecret createdAt: $createdAt appID: $appID token: $token spbill_create_ip: $spbill_create_ip enter_url: $enter_url id: $id pay_api_key: $pay_api_key user_id: $user_id body: $body welcome_words: $welcome_words attach: $attach) {
-    updatedAt
-    mch_id
-    appName
-    notify_url
-    appSecret
-    createdAt
-    appID
-    token
-    spbill_create_ip
-    enter_url
-    id
-    pay_api_key
-    user_id {
-      email
-      updatedAt
-      password
-      telephone
-      nickname
-      username
-      createdAt
-      openid
-      language
-      id
-      avatar
-    }
-    body
-    welcome_words
-    attach
-  }
-}

+ 0 - 238
src/app/App.jsx

@@ -1,238 +0,0 @@
-import React, {Component} from 'react';
-import {FormattedMessage} from 'react-intl';
-import {Layout, Button, Spin, Col, Row, Tabs} from 'antd';
-
-import {withRouter} from "react-router-dom";
-
-import './developVersion/index.css';
-import {request} from 'graphql-request'
-import {graphqlUrl} from "../config";
-import {SHOW_ALL_CASE} from "../gql";
-import './index.css';
-
-const {Header, Footer, Content} = Layout;
-const TabPane = Tabs.TabPane;
-
-class App extends Component {
-    constructor(props) {
-        super(props);
-        this.state = {
-            examplesFirst: [],
-            examplesSecond: [],
-            examplesThird: []
-        }
-    }
-
-    componentWillMount() {
-        this._isMounted = true;
-
-        request(graphqlUrl, SHOW_ALL_CASE, {}).then(data => {
-                let cases = data.case_by_props;
-                let examplesFirst = cases.filter(cases => cases.title.includes('预约'));
-                let examplesSecond = cases.filter(cases => cases.title.includes('服装'));
-                let examplesThird = cases.filter(cases => cases.title.includes('小小杂志'));
-                if (this._isMounted) {
-                    this.setState({
-                        examplesFirst,
-                        examplesSecond,
-                        examplesThird
-                    })
-                }
-            }
-        )
-    }
-
-    componentWillUnmount() {
-        this._isMounted = false;
-    }
-
-
-    render() {
-        let {examplesFirst, examplesSecond, examplesThird} = this.state;
-        const tabStyle = {
-            paddingBottom: '50px',
-            height: '550px',
-            display: 'inline-block',
-        };
-
-        return (
-            <div>
-                <Layout className="layout-home" style={{minWidth: 1600}}>
-                    <Header>
-                        <div className="logo-wrapper">
-                            <div className='logo'/>
-                        </div>
-                    </Header>
-                    <Content>
-                        <div className='intro-wrapper'>
-                            <Row>
-                                <Col span={8} offset={12}>
-                                    <div className="intro" style={{padding: '80px 60px 40px 60px'}}>
-                                        <h2>无年费&nbsp;&nbsp;&nbsp;&nbsp;数据完全私有</h2>
-                                        <h3>即刻拥有自己的微信公众号、小程序</h3>
-                                    </div>
-                                    <div className="home-btn-group">
-                                        <Button type="primary" size='large'
-                                                className='home-btn'
-                                                style={{marginRight: '10px'}}
-                                                onClick={() => {
-                                                    this.props.history.push({
-                                                        pathname: `/common`
-                                                    })
-                                                }}>立即使用
-                                        </Button>
-                                        <Button type="primary" size='large'
-                                                className='home-btn'
-                                                style={{margin: '0 10px'}}
-                                                onClick={() => {
-                                                    this.props.history.push({
-                                                        pathname: `/common/communication`
-                                                    })
-                                                }}>立即定制
-                                        </Button>
-                                        <Button size='large'
-                                                className='home-btn'
-                                                style={{marginLeft: '10px'}}
-                                                onClick={() => {
-                                                    this.props.history.push({
-                                                        pathname: `/developer`
-                                                    })
-                                                }}>开发设计
-                                        </Button>
-                                    </div>
-                                    <div className="intro-below" style={{padding: '0 60px'}}>
-                                        <h4>或致电:177 1810 6480</h4>
-                                    </div>
-                                </Col>
-                            </Row>
-                        </div>
-
-
-                        <div className={'cases-show-wrapper'}>
-                            <div className={'cases-show-title'}>行业模板案例</div>
-                            <div className={'case-show-tabs'}>
-                                <Tabs tabPosition='left' size='large' tabBarStyle={tabStyle} tabBarGutter={100}>
-                                    <TabPane tab="预约" key="1">
-                                        <div style={{marginLeft: 100}}>
-                                            {
-                                                examplesFirst.length === 0 ?
-                                                    <Spin/> :
-                                                    <CasesShow
-                                                        examples={examplesFirst}
-                                                    />
-                                            }
-                                        </div>
-                                    </TabPane>
-                                    <TabPane tab="电商" key="2">
-                                        <div style={{marginLeft: 100}}>
-                                            {
-                                                examplesSecond.length === 0 ?
-                                                    <Spin/> :
-                                                    <CasesShow
-                                                        examples={examplesSecond}
-                                                    />
-                                            }
-                                        </div>
-                                    </TabPane>
-                                    <TabPane tab="杂志" key="3">
-                                        <div style={{marginLeft: 100}}>
-                                            {
-                                                examplesThird.length === 0 ?
-                                                    <Spin/> :
-                                                    <CasesShow
-                                                        examples={examplesThird}
-                                                    />
-                                            }
-                                        </div>
-                                    </TabPane>
-                                </Tabs>
-                            </div>
-                        </div>
-
-
-                    </Content>
-                    <Footer style={{textAlign: 'center'}}>
-                        版权所有 © 2019 栋天科技
-                        {/*All right ©2019 Created by Ioobot*/}
-                    </Footer>
-                </Layout>
-            </div>
-        )
-    }
-}
-
-export default withRouter(App);
-
-
-class CasesShow extends Component {
-    constructor(props) {
-        super(props);
-        console.log(props);
-        this.state = {
-            showCaseID: props.examples[0].id,
-            index: 0
-        }
-    }
-
-    render() {
-        let {examples} = this.props;
-        let {showCaseID, index} = this.state;
-        let thisCase = examples[index];
-        return (
-            <Row>
-                <Col span={16}>
-                    <Row>
-                        <div>
-                            <div className={'case-detail-title'}>{thisCase.title}</div>
-                            <div
-                                className={'case-detail-description'}>{thisCase.detailDescription ? thisCase.detailDescription : '暂无简介'}</div>
-                            <div className='cover-div'>
-                                <img
-                                    className='cover-img'
-                                    src={thisCase.img}
-                                    alt={thisCase.title + '' + thisCase.description}
-                                />
-                                <div style={{marginTop: 5}}>—— 打开微信扫码体验 ——</div>
-                            </div>
-                        </div>
-                    </Row>
-                    <Row>
-                        {
-                            examples.map((item, index) => (
-                                <div
-                                    className={showCaseID === item.id ? 'logo-cover-div logo-cover-div-on' : 'logo-cover-div'}
-                                    onMouseEnter={() => {
-                                        this.setState({
-                                            showCaseID: item.id,
-                                            index
-                                        })
-                                    }}
-                                    key={index}
-                                >
-                                    <img
-                                        className='logo-cover-img'
-                                        src={item.img}
-                                        alt={item.title + '' + item.description}
-                                    />
-                                    <div>{item.description}</div>
-                                </div>
-                            ))
-                        }
-                    </Row>
-                </Col>
-                <Col span={8}>
-                    <div className={'detail-images'}>
-                        <img
-                            key={thisCase.detailImages[0]}
-                            src={thisCase.detailImages[0]}
-                            alt=""
-                            height="500"/>
-                    </div>
-                </Col>
-            </Row>
-        )
-    }
-}
-
-
-

+ 0 - 302
src/app/basicVersion/BasicVersion.jsx

@@ -1,302 +0,0 @@
-import React, {Component} from 'react';
-import {FormattedMessage} from 'react-intl';
-import {Route, Link, Switch, Redirect} from "react-router-dom";
-import {Layout, Menu, Button, Spin, Icon, LocaleProvider, Dropdown, Avatar, Badge} from 'antd';
-
-import '../developVersion/index.css';
-import CaseShow from "./caseShow/CaseShow";
-import MyDeploy from "./myDeploy/MyDeploy";
-import Communication from "./communication/Communication";
-import {logoutUrl} from "../../config";
-import {getCookie, setCookie} from "../../cookie";
-import {GET_USER} from "../../gql";
-
-import {Query} from "react-apollo";
-import gql from "graphql-tag";
-import axios from 'axios';
-import moment from 'moment';
-import 'moment/locale/zh-cn';
-import zhCN from 'antd/lib/locale-provider/zh_CN';
-axios.defaults.withCredentials = true;
-const {Header, Content} = Layout;
-
-class BasicVersion extends Component {
-    constructor(props) {
-        super(props);
-        this.state = {
-            menuLevel1: "example",
-            language: props.language,
-            locale: props.language === "中文" ? zhCN : undefined,
-            languageButton: props.language === "中文" ? "English" : "中文",
-            userID: '',
-            avatar: ''
-        };
-        // console.log('BasicVersion props',props);
-        if(props.location) {
-            let tabMenu = props.location.pathname.split('/')[2] || 'example';
-            // console.log('tabMenu',tabMenu);
-            switch(tabMenu) {
-                case 'deploy':
-                    this.state.menuLevel1 = 'my-deploy';
-                    break;
-                case 'communication':
-                    this.state.menuLevel1 = 'communication';
-                    break;
-                default:
-                    this.state.menuLevel1 = 'example';
-                    break;
-            }
-        }
-    }
-
-    componentWillReceiveProps(props){
-        if(props.location) {
-            let tabMenu = props.location.pathname.split('/')[2] || 'example';
-            // console.log('tabMenu1',tabMenu);
-            switch(tabMenu) {
-                case 'deploy':
-                    this.setState({menuLevel1: 'my-deploy'});
-                    break;
-                case 'communication':
-                    this.setState({menuLevel1: 'communication'});
-                    break;
-                default:
-                    this.setState({menuLevel1: 'example'});
-                    break;
-            }
-        }
-    }
-
-    switchMenuLevel = (menuName, value) => {
-        this.setState({
-            [menuName]: value,
-        });
-    };
-
-    switchMenuTab = (menuName, e) => {
-        this.setState({
-            [menuName]: e.key,
-        });
-    };
-
-    componentWillMount() {
-        let userID = getCookie('user_id');
-        if (userID === undefined || '') {
-            axios.get(this.state.getIdUrl)
-                .then((res) => {
-                    if (res.data !== '') {
-                        setCookie("user_id", res.data);
-                        this.setState({
-                            userID: res.data
-                        })
-                    }
-                })
-                .catch(function (err) {
-                    console.log(err);
-                });
-        } else {
-            this.setState({
-                userID
-            })
-        }
-    }
-
-    changeLocale = (e) => {
-        e.stopPropagation();
-        let {language} = this.state;
-        // console.log('app language',language);
-        let changeLanguage = language === "中文" ? "English" : "中文";
-        let local = language === "中文" ? undefined : zhCN;
-        let languageButton = language === "中文" ? "中文" : "English";
-
-        sessionStorage.setItem("language", changeLanguage);
-        this.props.changeLanguage(changeLanguage);
-        this.setState({
-            language: changeLanguage,
-            locale: local,
-            languageButton: languageButton
-        });
-        if (!local) {
-            moment.locale('en');
-        } else {
-            moment.locale('zh-cn');
-        }
-    };
-
-    changeTabBar = (menu) => {
-        this.setState({
-            menuLevel1: menu
-        })
-    };
-
-    render() {
-        let ownProps = {
-            changeTabBar: this.changeTabBar
-        };
-
-        let ownPropsUser = {
-            changeLocale: this.changeLocale,
-            languageButton: this.state.languageButton
-        };
-
-        const PrivateRoute = ({component: Component, ownProps, ...rest}) => (
-            <Route {...rest} render={(props) => {
-                return <Component {...ownProps} {...props}/>
-            }}/>
-        );
-
-        return (
-            <Layout style={{minHeight: '100vh'}}>
-                <Header className="header" style={{position: 'fixed', zIndex: 1, width: '100%'}}>
-                    <Link to="/">
-                        <div className="logo-wrapper">
-                            <div className='logo'/>
-                        </div>
-                    </Link>
-                    <Menu
-                        theme="dark"
-                        mode="horizontal"
-                        style={{lineHeight: '64px'}}
-                        selectedKeys={[this.state.menuLevel1]}
-                        onClick={(e) => this.switchMenuTab('menuLevel1', e)}
-                    >
-                        <Menu.Item key="example">
-                            <Link to="/common/example"><FormattedMessage id="Example"/></Link>
-                        </Menu.Item>
-                        {
-                            !!this.state.userID?
-                                <Menu.Item key="my-deploy">
-                                    <Link to="/common/deploy"><FormattedMessage id="My deploy"/></Link>
-                                </Menu.Item>
-                                :
-                                ''
-                        }
-
-                        <Menu.Item key="communication">
-                            <Link to="/common/communication"><FormattedMessage id="Communication"/></Link>
-                        </Menu.Item>
-                    </Menu>
-
-                    {
-                        this.state.userID === '' ?
-                            <Link to="/login">
-                                <Button className='login-button' type='primary'
-                                        onClick={() => this.switchMenuLevel('menuLevel1', 'user')}>
-                                    <FormattedMessage id="Login"/></Button>
-                            </Link>
-                            :
-                            <User
-                                userID={this.state.userID}
-                                languageButton={this.state.languageButton}
-                                changeLocale={this.changeLocale}
-                                history={this.props.history}
-                            />
-                    }
-
-                </Header>
-
-                <Layout style={{marginTop: '64px', zIndex: '0'}}>
-                    <Switch>
-                        <Route path="/common" exact component={CaseShow}/>
-                        <Route path="/common/example" exact component={CaseShow}/>
-                        <Route path="/common/deploy" component={MyDeploy}/>
-                        <Route path="/common/communication" component={Communication}/>
-                    </Switch>
-                </Layout>
-
-            </Layout>
-        )
-    }
-}
-
-export default BasicVersion;
-
-
-class User extends Component {
-    constructor(props) {
-        super(props);
-        this.state = {
-            show: false
-        }
-    }
-
-    logout = () => {
-        axios.get(logoutUrl)
-            .then((res) => {
-                console.log('logout success',res);
-                setCookie("user_id", '');
-            })
-            .catch((err) => {
-            });
-    };
-
-    render() {
-        return (
-            <Query query={gql(GET_USER)} variables={{id: this.props.userID}}>
-                {
-                    ({loading, error, data}) => {
-                        if (loading) {
-                            return <Spin className='login-nickname'/>
-                        }
-                        if (error) {
-                            return 'error!';
-                        }
-                        let user = data.user_by_id;
-                        if (user !== null) {
-                            const menu = (
-                                <Menu className={'user-detail'}>
-                                    <Menu.Item className={'user-info'}>
-                                        <p className={'user-info-nickname'}>{user.nickname}</p>
-                                        <p className={'user-info-email'}>{user.email}</p>
-                                    </Menu.Item>
-                                    <Menu.Item>
-                                        <a href='https://www.ioobot.com' onClick={(e) => {
-                                            e.preventDefault();
-                                            this.props.changeLocale(e)
-                                        }}>{this.props.languageButton}</a>
-                                    </Menu.Item>
-                                    <Menu.Item>
-                                        <Link to="/login">
-                                            <div>
-                                                <FormattedMessage id="Account center"/>
-                                            </div>
-                                        </Link>
-                                    </Menu.Item>
-                                    <Menu.Item>
-                                        <Link to="/common/communication">
-                                            <div>
-                                                <FormattedMessage id="Submit Support Ticket"/>
-                                            </div>
-                                        </Link>
-                                    </Menu.Item>
-                                    <Menu.Item className={'login-out'}>
-                                        <a href='https://www.ioobot.com' onClick={(e) => {
-                                            e.preventDefault();
-                                            this.logout();
-                                            this.props.history.push({
-                                                pathname: '/'
-                                            })
-                                        }}><FormattedMessage id="exit"/></a>
-                                    </Menu.Item>
-                                </Menu>
-                            );
-                            return (
-                                <div className='login-nickname' onClick={()=>{}}>
-                                    <Dropdown overlay={menu} placement="bottomRight" trigger={['click']}>
-                                        <div>
-                                            <span style={{ marginRight: 5 }}>
-                                                <Badge dot><Avatar shape="user" icon="user" /></Badge>
-                                            </span>
-                                            {/*<Icon type="down" />*/}
-                                        </div>
-                                    </Dropdown>
-                                </div>
-                            )
-                        }
-                        return null;
-                    }
-                }
-            </Query>
-        )
-    }
-}

+ 0 - 290
src/app/basicVersion/caseShow/CaseShow.jsx

@@ -1,290 +0,0 @@
-import React, {Component} from 'react';
-import {Layout, Card, Button, Avatar, Spin, Icon, Row, Col, notification, Tag} from 'antd';
-import lo from '../../../images/lo.png'
-import './index.css'
-import {graphqlUrl} from "../../../config";
-import {SHOW_ALL_CASE, SHOW_CASE, SEARCH_SCHEMA} from "../../../gql";
-import {FormattedMessage} from 'react-intl';
-import {request} from 'graphql-request'
-import UserCustom from "./UserCustom";
-import {Query} from "react-apollo";
-import gql from "graphql-tag";
-import {getCookie} from "../../../cookie";
-
-const {Content} = Layout;
-const {Meta} = Card;
-
-// caseshow 与 usercustom 展示于一个三目运算符
-// 因此刷新 usercustom 将不存在,并且他没有路径
-
-class CaseShow extends Component {
-    constructor(props) {
-        super(props);
-        this.state = {
-            examplesIoobot: [],
-            examplesOthers: [],
-            showCustom: false,
-            chosenSchemaID: ''
-        }
-    }
-
-    componentWillMount() {
-        this._isMounted = true;
-        // 查询是否登录
-        let userID = getCookie('user_id');
-        if (userID !== undefined && userID !== '') {
-            this.setState({
-                userID
-            });
-        }
-
-        request(graphqlUrl, SHOW_ALL_CASE, {}).then(data => {
-                let cases = data.case_by_props;
-                // console.log(cases);
-                let examplesIoobot = cases.filter(case1 => case1.user_id.id === 'ioobot');
-                let IooList = this.examplesFilter(examplesIoobot);
-
-                let examplesOthers = cases.filter(case2 => case2.user_id.id !== 'ioobot');
-                let UserList = this.examplesFilter(examplesOthers);
-
-                if (this._isMounted) {
-                    this.setState({
-                        examplesIoobot: IooList,
-                        examplesOthers: UserList
-                    })
-                }
-            }
-        )
-    }
-
-    examplesFilter(example) {
-        // console.log('examples',example);
-        let hash = {}, i = 0, list = [];
-
-        example.forEach(function (item) {
-            let {title} = item;
-            hash[title] ? list[hash[title] - 1].content.push(item) : hash[title] = ++i && list.push({
-                title,
-                content: [item],
-            });
-        });
-
-        // console.log('list',list);
-        return list;
-    }
-
-    componentWillUnmount() {
-        this._isMounted = false;
-    }
-
-    schemaIDChangeBucket = async (schemaID) => {
-        let bucketname = await request(graphqlUrl, SEARCH_SCHEMA, {id: schemaID})
-        console.log(bucketname.schema_by_id.schemaName, 'is schemaName,is equal to bucketName')
-        return bucketname.schema_by_id.schemaName;
-    };
-
-    backToMe = () => {
-        this.setState({
-            showCustom: false
-        })
-    };
-
-    showCustom = (item) => {
-        this.setState({
-            showCustom: true,
-            chosenSchemaID: item
-        })
-    };
-
-    render() {
-        let {userID, showCustom, chosenSchemaID} = this.state;
-
-        return (
-            <div id="example-show">
-                <Layout style={{padding: '24px 48px', minHeight: '300px'}}>
-                    {
-                        !showCustom ?
-                            <div>
-                                <div className={'card card-head'}>
-                                    <Card.Grid className={'card-head-item orange-change'}>
-                                        <p>我们永久无年费 &nbsp;&nbsp;&nbsp;&nbsp; 告别高成本</p>
-                                        <p>省钱、更省心</p>
-                                    </Card.Grid>
-                                    <Card.Grid className={'card-head-item pink-change'}>
-                                        <p>数据完全私有 &nbsp;&nbsp;&nbsp;&nbsp; 安全更可靠</p>
-                                        <p>数据分析图表为您提供更细致的服务</p>
-                                    </Card.Grid>
-                                    <Card.Grid className={'card-head-item blue-change'}>
-                                        <p>模板不满意 &nbsp;&nbsp;&nbsp;&nbsp; 快来定制化吧!</p>
-                                        <p>上手有困难,联系我们即可</p>
-                                        <Button
-                                            onClick={() => {
-                                                this.props.history.push({
-                                                    pathname: `/common/communication`
-                                                })
-                                            }}>立即定制</Button>
-                                    </Card.Grid>
-                                </div>
-                                <div className={'schema-name'}>
-                                    <FormattedMessage id='ioobot case'/>
-                                </div>
-                                <div>
-                                    {
-                                        this.state.examplesIoobot.length === 0 ?
-                                            <Spin/>
-                                            :
-                                            this.state.examplesIoobot.map((item, index) => {
-                                                let exampleList = item.content;
-                                                let gzh = exampleList.filter(case1 => case1.description === '微信公众号');
-                                                let xcx = exampleList.filter(case1 => case1.description === '微信小程序');
-                                                let value = exampleList[0];
-                                                return (
-                                                    <Row key={index} className='card card-case' type="flex"
-                                                         justify="space-around" align="middle">
-                                                        <Col span={6} style={{padding: '20px'}}>
-                                                            <div className="wrap">
-                                                                <div className="case-name">{value.title}</div>
-                                                                <div className="wrapper">
-                                                                    <div>
-                                                                        <div>
-                                                                            <div>模板简介:</div>
-                                                                            <div>{value.detailDescription ? value.detailDescription : '暂无简介'}</div>
-                                                                        </div>
-                                                                        <br/>
-                                                                        <div>
-                                                                            {value.detailAttention ?
-                                                                                <div>适用行业: &nbsp;&nbsp;
-                                                                                    <Tag
-                                                                                        color="blue">{value.detailAttention}</Tag>
-                                                                                </div>
-                                                                                :
-                                                                                ''
-                                                                            }
-                                                                        </div>
-                                                                        <br/>
-                                                                        <div className="left-end">
-                                                                            <div>
-                                                                                <Icon type="mail"/>&nbsp;&nbsp;
-                                                                                {
-                                                                                    value.user_id.email ? value.user_id.email : '该作者未留下联系方式'
-                                                                                }
-                                                                            </div>
-                                                                            <div>
-                                                                                <Icon type="github"/>&nbsp;&nbsp;
-                                                                                {
-                                                                                    value.codeAddress ?
-                                                                                        <a href={value.codeAddress}>查看源码
-                                                                                            可自行修改使用</a>
-                                                                                        :
-                                                                                        '该作者未留下代码仓库地址'
-                                                                                }
-                                                                            </div>
-                                                                        </div>
-                                                                    </div>
-                                                                </div>
-                                                            </div>
-                                                        </Col>
-                                                        <Col span={9} style={{padding: '20px'}}>
-                                                            {gzh.length ?
-                                                                <CaseShowDetail caseContent={gzh}
-                                                                                showCustom={this.showCustom}/>
-                                                                :
-                                                                <div>敬请期待</div>
-                                                            }
-
-                                                        </Col>
-                                                        <Col span={9} style={{padding: '20px'}}>
-                                                            {xcx.length ?
-                                                                <CaseShowDetail caseContent={xcx}
-                                                                                showCustom={this.showCustom}/>
-                                                                :
-                                                                <div>敬请期待</div>
-                                                            }
-                                                        </Col>
-                                                    </Row>
-                                                )
-                                            })
-                                    }
-                                </div>
-                            </div>
-                            :
-                            <UserCustom
-                                userID={userID}
-                                bucketName={this.schemaIDChangeBucket(chosenSchemaID)}
-                                history={this.props.history}
-                                backToMe={this.backToMe}
-                            />
-                    }
-                </Layout>
-            </div>
-        )
-    }
-}
-
-export default CaseShow;
-
-class CaseShowDetail extends Component {
-    constructor(props) {
-        super(props);
-        this.state = {}
-    }
-
-    render() {
-        let caseDetail = this.props.caseContent[0];
-        // console.log('caseDetail',caseDetail);
-
-        return (
-            <div key={caseDetail.id}>
-                <Query query={gql(SHOW_CASE)} variables={{id: caseDetail.id}}>
-                    {
-                        ({loading, error, data}) => {
-                            if (loading) {
-                                return <Spin/>
-                            }
-                            if (error) {
-                                return 'error!';
-                            }
-                            let thisCase = data.case_by_id;
-
-                            return (
-                                <div>
-                                    <div className={'case-show-head'}>{caseDetail.description}</div>
-                                    <div className={'wrapper'}>
-                                        <div>
-                                            <img
-                                                key={thisCase.detailImages[0]}
-                                                src={thisCase.detailImages[0]}
-                                                alt=""
-                                                height="500"
-                                            />
-                                        </div>
-                                        <div className={'right'}>
-                                            <div className="cl-center">
-                                                <div className='cover-div'>
-                                                    <img
-                                                        className='cover-img'
-                                                        src={caseDetail.img}
-                                                        alt={caseDetail.title + '' + caseDetail.description}/>
-                                                </div>
-                                            </div>
-                                            <div className="cl-center">
-                                                微信扫一扫立即体验
-                                            </div>
-                                            <div className="cl-center">
-                                                <Button type="primary"
-                                                        style={{borderRadius: 30}}
-                                                        onClick={() => {
-                                                            this.props.showCustom(caseDetail.schema_id.id);
-                                                        }}><FormattedMessage id='Publish immediately'/></Button>
-                                            </div>
-                                        </div>
-                                    </div>
-                                </div>
-                            )
-                        }
-                    }
-                </Query>
-            </div>
-        )
-    }
-}

+ 0 - 205
src/app/basicVersion/caseShow/CaseShowBackup.js

@@ -1,205 +0,0 @@
-import React, {Component} from 'react';
-import {Layout, Butt, Spin, Row, Col, Tabs} from 'antd';
-import './index.css'
-import {graphqlUrl} from "../../../config";
-import {SHOW_ALL_CASE} from "../../../gql";
-import {FormattedMessage} from 'react-intl';
-import {request} from 'graphql-request'
-import UserCustom from "./UserCustom";
-import {getCookie} from "../../../cookie";
-
-// 这是一个备份的代码,可以删除
-// 复制于上个版本的 wworkbench 部署流程
-
-const TabPane = Tabs.TabPane;
-const {Content} = Layout;
-
-class CaseShow extends Component {
-    constructor(props) {
-        super(props);
-        this.state = {
-            examplesFirst: [],
-            examplesSecond: [],
-            showCustom: false,
-            chosenSchemaID: '',
-            activeKey: '1',
-            showCaseID: 'order-react-CaseID'
-        }
-    }
-
-    componentWillMount() {
-        this._isMounted = true;
-        // 查询是否登录
-        let userID = getCookie('user_id');
-        if (userID !== undefined && userID !== '') {
-            this.setState({
-                userID
-            });
-        }
-
-        request(graphqlUrl, SHOW_ALL_CASE, {}).then(data => {
-                let cases = data.case_by_props;
-                let examplesFirst = cases.filter(case1 => case1.title.includes('预约'));
-                let examplesSecond = cases.filter(case2 => case2.title.includes('服装店'));
-                if (this._isMounted) {
-                    this.setState({
-                        examplesFirst,
-                        examplesSecond,
-                    })
-                }
-            }
-        )
-    }
-
-    componentWillUnmount() {
-        this._isMounted = false;
-    }
-
-    schemaIDChangeBucket = (schemaID) => {
-        if (this.props.location && this.props.location.state) {
-            switch (schemaID) {
-                case 'order_schemaID':
-                    return 'appointment';
-                case 'ecommerce_schemaID':
-                    return 'e-commerce';
-                case 'bills_schemaID':
-                    return 'bills';
-                default:
-                    break;
-            }
-        }
-    };
-
-    backToMe = () => {
-        this.setState({
-            showCustom: false
-        })
-    };
-
-    render() {
-        let {userID, showCustom, chosenSchemaID, examplesFirst, examplesSecond} = this.state;
-        const tabStyle = {
-            paddingBottom: '50px',
-            height: '550px',
-            display: 'inline-block',
-        };
-        return (
-            <div id="example-show">
-                <Layout style={{padding: '24px', minHeight: '300px'}}>
-                    <Content className="content">
-                        {
-                            !showCustom ?
-                                <div>
-                                    <Tabs tabPosition='left' size='large' tabBarStyle={tabStyle} tabBarGutter={100}>
-                                        <TabPane tab="预约" key="1">
-                                            <div style={{marginLeft: 100}}>
-                                                {
-                                                    examplesFirst.length === 0 ?
-                                                        <Spin/> :
-                                                        <BaiduShow
-                                                            examples={examplesFirst}
-                                                        />
-                                                }
-                                            </div>
-                                        </TabPane>
-                                        <TabPane tab="电商" key="2">
-                                            <div style={{marginLeft: 100}}>
-                                                {
-                                                    examplesSecond.length === 0 ?
-                                                        <Spin/> :
-                                                        <BaiduShow
-                                                            examples={examplesSecond}
-                                                        />
-                                                }
-                                            </div>
-                                        </TabPane>
-                                    </Tabs>
-                                </div>
-                                :
-                                <UserCustom
-                                    userID={userID}
-                                    bucketName={this.schemaIDChangeBucket(chosenSchemaID)}
-                                    history={this.props.history}
-                                    backToMe={this.backToMe}
-                                />
-                        }
-                    </Content>
-                </Layout>
-            </div>
-        )
-    }
-}
-
-export default CaseShow;
-
-
-class BaiduShow extends Component {
-    constructor(props) {
-        super(props);
-        console.log(props);
-        this.state = {
-            showCaseID: props.examples[0].id,
-            index: 0
-        }
-    }
-
-    render() {
-        let {examples} = this.props;
-        let {showCaseID, index} = this.state;
-        let thisCase = examples[index];
-        return (
-            <Row>
-                <Col span={12}>
-                    <Row>
-                        <div>
-                            <div className={'case-detail-title'}>{thisCase.title}</div>
-                            <div
-                                className={'case-detail-description'}>{thisCase.detailDescription ? thisCase.detailDescription : '暂无简介'}</div>
-                            <div className='cover-div'>
-                                <img
-                                    className='cover-img'
-                                    src={thisCase.img}
-                                    alt={thisCase.title + '' + thisCase.description}
-                                />
-                                <div style={{marginTop: 5}}>—— 打开微信扫码体验 ——</div>
-                            </div>
-
-                        </div>
-                    </Row>
-                    <Row>
-                        {
-                            examples.map((item, index) => (
-                                <div
-                                    className={showCaseID === item.id ? 'logo-cover-div logo-cover-div-on' : 'logo-cover-div'}
-                                    onMouseEnter={() => {
-                                        this.setState({
-                                            showCaseID: item.id,
-                                            index
-                                        })
-                                    }}
-                                    key={index}
-                                >
-                                    <img
-                                        className='logo-cover-img'
-                                        src={item.img}
-                                        alt={item.title + '' + item.description}
-                                    />
-                                    <div>{item.description}</div>
-                                </div>
-                            ))
-                        }
-                    </Row>
-                </Col>
-                <Col span={6}>
-                    <div className={'detail-images'}>
-                        <img
-                            key={thisCase.detailImages[0]}
-                            src={thisCase.detailImages[0]}
-                            alt=""
-                            height="500"/>
-                    </div>
-                </Col>
-            </Row>
-        )
-    }
-}

+ 0 - 997
src/app/basicVersion/caseShow/UserCustom.js

@@ -1,997 +0,0 @@
-import React, {Component} from 'react';
-import {Link} from 'react-router-dom';
-import {deployAll, graphqlUrl, storeFile, deployFC} from "../../../config";
-import {ADD_APIGROUP, ADD_APIGWPATH, ADD_DEPLOY, ADD_PROJECT, SHOW_CLOUD} from "../../../gql";
-import {CloudConfig} from "../../../login/CloudConfig";
-import {Layout, Button, message, Modal, Icon, Steps, Row, Col, Radio, Input} from 'antd';
-import {FormattedMessage} from 'react-intl';
-import {request} from 'graphql-request'
-import {idGen, convert_} from "../../../func";
-import axios from 'axios';
-import './index.css';
-
-const {Content} = Layout;
-const Step = Steps.Step;
-const RadioGroup = Radio.Group;
-axios.defaults.withCredentials = true;
-
-class UserCustom extends Component {
-    constructor(props) {
-        super(props);
-        this.state = {
-            userID: props.userID,
-            cloudName: 'tencent',
-            disableDeployButton: false,
-            deployFailed: false,
-            cloudID: '',
-            secretID: '',
-            secretKey: '',
-            appId: '',
-            bucketName: ''
-        };
-
-        console.log(this.state, 'userCustom state')
-    }
-
-    getCloudDetail = (cloudID, secretID, secretKey, appId) => {
-        this.setState({
-            cloudID,
-            secretID,
-            secretKey,
-            appId
-        })
-    };
-
-    componentWillMount() {
-        this._isMounted = true;
-        let {bucketName} = this.props
-        bucketName.then(res => {
-            console.log(res, 'bucketname')
-            this.setState({
-                bucketName: res
-            })
-        })
-    }
-
-    componentWillUnmount() {
-        this._isMounted = false;
-    }
-
-    componentWillReceiveProps(next) {
-        if(next.bucketName !== this.props.bucketName) {
-            let {bucketName} = this.props
-            bucketName.then(res => {
-                console.log(res, 'bucketname')
-                this.setState({
-                    bucketName: res
-                })
-            })
-        }
-    }
-
-    render() {
-        let {userID, cloudID, deployFailed, appId, secretID, secretKey, bucketName} = this.state;
-        let {history} = this.props
-        return (
-            <Content className="content">
-                <div>
-                    <div className="column-menu" onClick={() => {
-                        this.props.backToMe()
-                    }}>
-                        <Icon type="left" style={{color: '#3187FA'}}/>
-                        <FormattedMessage id="back to case show"/>
-                    </div>
-
-                    <Row>
-                        <Col span={9} offset={8}>
-                            <div className='step-kind'>
-                                发布上线
-                            </div>
-                            <Steps direction="vertical" current={6}>
-                                <Step title=<Step1/> />
-                                <Step title=<Step2 getCloudDetail={this.getCloudDetail} userID={userID}/> />
-                                <Step title=
-                                          <Step3
-                                      getPrimaryConfigDetail={this.getPrimaryConfigDetail}
-                                      userID={userID}
-                                      bucketName={bucketName}
-                                      secretID={secretID}
-                                      secretKey={secretKey}
-                                      appId={appId}
-                                      cloudID={cloudID}
-                                      history={history}
-                                />
-                                />
-                                <Step title=<Step4/> />
-                                <Step title=<Step5 bucketName={bucketName} userID={userID}/> />
-                                <Step title=<Step6 bucketName={bucketName} userID={userID}/> />
-
-                            </Steps>
-                        </Col>
-                    </Row>
-                </div>
-            </Content>
-        )
-    }
-}
-
-export default UserCustom;
-
-const Step1 = (props) => (
-    <div className='step-block'>
-        第一步:注册腾讯云账户
-        <Button style={{marginLeft: 20}}>使用帮助</Button>
-    </div>
-);
-
-class Step2 extends Component {
-    constructor(props) {
-        super(props);
-        this.state = {
-            check: 0
-        }
-    }
-
-    render() {
-        let {userID, getCloudDetail} = this.props;
-        let {check} = this.state;
-        // recheck 的作用在于当取消或者保存后重新检测 cloud, 然后通过getCloudDetail传值到父组件
-        return (
-            <div className='step-block'>
-                第二步:填写腾讯云秘钥,一键部署
-                <Button style={{marginLeft: 20}}>使用帮助</Button>
-                <div>
-                    <CloudQueryAndConfig
-                        userID={userID}
-                        getCloudDetail={getCloudDetail}
-                        cloudName='tencent'
-                        check={check}
-                        reCheck={() => {
-                            this.setState({check: check + 1})
-                        }}
-                    />
-                </div>
-            </div>
-        )
-    }
-}
-
-class CloudQueryAndConfig extends Component {
-    constructor(props) {
-        super(props);
-        this.state = {
-            cloudName: props.cloudName,
-            userID: props.userID,
-            cloudID: '',
-            secretID: '',
-            secretKey: '',
-            appId: '',
-            visible: false,
-            confirmLoading: false,
-        }
-    }
-
-    searchCloud = () => {
-        this._isMounted = true;
-        let {userID, cloudName} = this.state;
-        // 如果登录,查询该用户是否设置 cloud
-        request(graphqlUrl, SHOW_CLOUD, {user_id: userID}).then(data => {
-                let clouds = data.cloud_by_props.filter(cloud => cloud.cloudName === cloudName);
-                // 如果限制一个云服务商一个 cloud,那么就是clouds[0]
-                if (clouds.length === 1) {
-                    let cloud = clouds[0];
-                    let {id, secretId, secretKey, appId} = cloud;
-                    if (this._isMounted) {
-                        this.setState({
-                            cloudID: id,
-                            secretID: secretId,
-                            secretKey,
-                            appId,
-                        });
-                    }
-                    this.props.getCloudDetail(id, secretId, secretKey, appId);
-                } else if (clouds.length > 1) {
-                    console.log('数据库有多个同一云服务商的 key');
-                } else {
-                    if (this._isMounted) {
-                        console.log('数据库没有云服务商的 key');
-                    }
-                }
-            }
-        )
-    };
-
-    showModal = () => {
-        if (this.state.userID) {
-            this.setState({
-                visible: true,
-            });
-        } else {
-            message.warning('请先登录');
-        }
-    };
-
-    handleCancel = () => {
-        this.setState({
-            visible: false,
-        });
-        this.props.reCheck();
-    };
-
-    componentWillMount() {
-        this.searchCloud();
-        this._isMounted = true;
-    }
-
-    componentWillUnmount() {
-        this._isMounted = false;
-    }
-
-    componentWillReceiveProps(next) {
-        console.log(111)
-        if (this.props.check !== next.check) {
-            this.setState({
-                cloudName: next.cloudName,
-                userID: next.userID,
-            }, this.searchCloud);
-        }
-    }
-
-
-    render() {
-        let {visible, confirmLoading, cloudName} = this.state;
-        // cloudconfig 组件引用外层组件公用,修改时应注意
-        return (
-            <div>
-                <Button type='primary' onClick={this.showModal}>填写秘钥</Button>
-
-                <Modal
-                    title="云服务商秘钥设置"
-                    visible={visible}
-                    confirmLoading={confirmLoading}
-                    footer={null}
-                    onCancel={this.handleCancel}
-                >
-                    <CloudConfig cloudName={cloudName} handleCancel={this.handleCancel}/>
-                </Modal>
-            </div>
-        )
-    }
-}
-
-const Step3 = (props) => (
-    <div className='step-block'>
-        开始部署
-        <div>
-            <NameAndDB
-                userID={props.userID}
-                bucketName={props.bucketName}
-                secretID={props.secretID}
-                secretKey={props.secretKey}
-                appId={props.appId}
-                cloudID={props.cloudID}
-                history={props.history}
-            />
-        </div>
-    </div>
-);
-
-class NameAndDB extends Component {
-    constructor(props) {
-        super(props);
-        this.state = {
-            userID: props.userID,
-            visible: false,
-            confirmLoading: false,
-            customName: props.bucketName,
-            dbKind: 'fc-db',
-            host: '',
-            db: '',
-            username: '',
-            password: '',
-            disableDeployButton: false,
-            deployFailed: false
-        }
-    }
-
-    componentWillReceiveProps(next) {
-        if(next.bucketName !== this.props.bucketName) {
-            this.setState({
-                customName: next.bucketName
-            })
-        }
-    }
-
-
-    showModal = () => {
-        if (this.state.userID) {
-            this.setState({
-                visible: true,
-            });
-        } else {
-            message.warning('请先登录');
-        }
-    };
-
-    handleCancel = () => {
-        this.setState({
-            visible: false,
-        });
-    };
-
-    componentWillMount() {
-        this._isMounted = true;
-    }
-
-    componentWillUnmount() {
-        this._isMounted = false;
-    }
-
-    // 首先存储 .edn 文件到 ioobot 的 cos,然后调用下面的 deploy 函数
-    storeEdnAndDeploy = (secretID, secretKey, appId, bucketName, dbKind, userID, admin, username, password, db, host, customName, cloudID) => {
-        // store *.edn to cos
-        secretID = secretID ? secretID : 'AKIDkYBvY0LOJ2bzCDmnMjz4xgFertmVJlVE'
-        secretKey = secretKey ? secretKey : 'zwjKk29TdcYP8g2FG5kCSWmz3wcH92lN'
-        cloudID = cloudID ? cloudID : 'tencent_CloudID'
-        appId = appId ? appId : '1254337200'
-        // mongodb 和 fc-db 区分配置
-        let deployConf = dbKind === 'mongodb' ?
-            ` {:secretId "${secretID}"\n` +
-            ` :secretKey "${secretKey}"\n` +
-            ` :appId "${appId}"\n` +
-            ' :region "ap-beijing" \n' +
-            ' }\n'
-            :
-            ` {:secretId "${secretID}"\n` +
-            ` :secretKey "${secretKey}"\n` +
-            ` :appId "${appId}"\n` +
-            ' :region "ap-beijing"\n' +
-            ' :bucket "fc-db"\n' +
-            ' :trustStore "/etc/ssl/certs/java/cacerts"\n' +
-            ` :fc-db-store "save/${bucketName}.dat"\n` +
-            ' :fc-db-dir "fc-db"\n' +
-            ' :local-tmp-dir "/tmp"\n' +
-            ' :local-db-file "fcdb.dat"\n' +
-            ' :update-tx? true \n' +
-            ' :force-down? true\n' +
-            ' }';
-
-        let a = axios.post(storeFile, {
-            'file-name': `${bucketName}/${dbKind}/${userID}/deploy-conf.edn`,
-            bucket: 'case',
-            cont: deployConf
-        });
-
-        let cont = '{:uri {\n' +
-            `:auth {:admin-db   "${admin}"\n` +
-            ` :u    "${username}"\n` +
-            ` :p   "${password}"\n` +
-            ` :host "${host}"}}\n` +
-            ` :db-name "${db}"}`;
-
-        // fc-db 不用存此文件,故直接返回 status: 200
-        let b = dbKind === 'mongodb' ?
-            axios.post(storeFile, {
-                'file-name': `${bucketName}/${dbKind}/${userID}/mongo-config.edn`,
-                bucket: 'case',
-                cont
-            })
-            :
-            Promise.resolve({status: 200});
-
-        Promise.all([a, b]).then(value => {
-            if (value.every(res => res.status === 200)) {
-                console.log('store file success , start deploying');
-                this.deploy(userID, dbKind, bucketName, customName, cloudID);
-            }
-        });
-    }
-
-    deploy = (userID, dbKind, bucketName, customName, cloudID) => {
-        this._isMounted = true;
-        let _this = this;
-
-        if (bucketName === '') {
-            console.log('state, 没有传值');
-        } else {
-            console.log('开始调用');
-            this.setState({
-                disableDeployButton: true
-            });
-
-            let now = new Date().getTime(),
-                functionName = convert_(userID + '_' + customName),
-                serviceName = functionName,
-                resources = [`${bucketName}/schema.edn`, `${bucketName}/resolve-map.edn`, `${bucketName}/${dbKind}/${userID}/deploy-conf.edn`, `${bucketName}/html/index.html`, `${bucketName}/wx-config.edn`];
-
-            if (dbKind === 'mongodb') {
-                resources.push(`${bucketName}/${dbKind}/${userID}/mongo-config.edn`)
-            }
-
-            console.log('now', now, 'functionName', functionName, 'serviceName', serviceName, 'resources', resources);
-            axios.post(deployAll,
-                {
-                    'fc-name': functionName,
-                    'bucket': dbKind === 'mongodb' ? 'native-fc' : 'fcdb-deploy',
-                    'object-file': 'fc-only.zip',
-                    'res-bucket': 'case',
-                    'resources': resources,
-                    'service-name': serviceName,
-                    'path': "/*"
-                })
-                .then(function (response) {
-                    // 以下操作为写入数据库
-                    console.log('response', response);
-                    if (response['data']['apigw-result'] && response['data']['fc-result']) {
-                        // 处理数据
-                        let result = response['data']['apigw-result'];
-                        let apiData = result['api-info'];
-                        let serviceData = result['service-info'];
-
-                        // 存数据
-                        let pathID = idGen('path'),
-                            groupID = idGen('group'),
-                            deployID = idGen('deploy'),
-                            projectID = idGen('project');
-
-                        let {apiId, path, method} = apiData;
-                        let {serviceName, serviceId, subDomain} = serviceData;
-
-                        let pathVarObj = {
-                            id: idGen('path'),
-                            user_id: userID,
-                            apiGWGroup_id: pathID,
-                            deploy_id: deployID,
-                            apiGWName: functionName,
-                            requestMethod: method,
-                            apiGWPath: path,
-                            apiId: apiId,
-                            apiGWDesc: '',
-                            serviceType: 'SCF',
-                            timeout: 300,
-                            createdAt: now,
-                            updatedAt: ''
-                        };
-
-                        let projectVarObj = {
-                            id: projectID,
-                            projectType: 'case',
-                            cloud_id: cloudID,
-                            user_id: userID,
-                            projectName: functionName,
-                            database_id: '',
-                            apiGWGroup_id: '',
-                            deploy_id: '',
-                            case_id: '',
-                            wxConfig_id: '',
-                            schema_id: '',
-                            createdAt: now,
-                            updatedAt: '',
-                            projectStatus: 'deployed'
-                        };
-
-                        let groupVarObj = {
-                            id: groupID,
-                            cloud_id: cloudID,
-                            user_id: userID,
-                            userStatus: '',
-                            userDomain: '',
-                            groupName: serviceName,
-                            frontType: '',
-                            region: '',
-                            environmentName: '',
-                            defaultDomain: subDomain,
-                            status: '',
-                            serviceId: serviceId,
-                            createdAt: now,
-                            updatedAt: ''
-                        };
-
-                        let deployVarObj = {
-                            id: deployID,
-                            cloud_id: cloudID,
-                            functionName,
-                            cosObjectName: '',
-                            region: '',
-                            cosBucketRegion: '',
-                            description: '',
-                            cosBucketName: '',
-                            vpcId: '',
-                            subnetId: '',
-                            memorySize: 512,
-                            timeout: 300,
-                            handler: '',
-                            serviceName: "",
-                            fc_id: '',
-                            createdAt: now,
-                            updatedAt: ''
-                        };
-
-                        let add_apigwpath = request(graphqlUrl, ADD_APIGWPATH, pathVarObj),
-                            add_project = request(graphqlUrl, ADD_PROJECT, projectVarObj),
-                            add_apigroup = request(graphqlUrl, ADD_APIGROUP, groupVarObj),
-                            add_deploy = request(graphqlUrl, ADD_DEPLOY, deployVarObj);
-
-                        Promise.all([add_apigwpath, add_project, add_apigroup, add_deploy])
-                            .then(value => {
-                                console.log(value);
-
-                                // 展示数据
-                                if (_this._isMounted) {
-                                    _this.setState({
-                                        disableDeployButton: false
-                                    });
-                                }
-
-                                _this.props.history.push({
-                                    pathname: `/common/deploy`,
-                                    state: {
-                                        // 处理传回数据,直接拼接
-                                        url: `http://${subDomain}/test/`
-                                    }
-                                });
-                            })
-                            .catch(err => {
-                                console.log(err);
-                            });
-                    } else {
-                        console.log('deployAll 失败');
-                        _this.setState({
-                            deployFailed: true,
-                            disableDeployButton: false
-                        })
-                    }
-
-                })
-                .catch(function (error) {
-                    console.log('axios error', error);
-                });
-        }
-    };
-
-    render() {
-        let {
-            visible,
-            confirmLoading,
-            userID,
-            dbKind,
-            host,
-            db,
-            username,
-            password,
-            customName,
-            disableDeployButton,
-            deployFailed
-        } = this.state;
-        let {secretID, secretKey, appId, bucketName, cloudID} = this.props
-        return (
-            <div>
-                <Button type='primary' onClick={this.showModal}>开始部署</Button>
-
-                <Modal
-                    title="名称和数据库配置"
-                    visible={visible}
-                    confirmLoading={confirmLoading}
-                    footer={null}
-                    onCancel={this.handleCancel}
-                >
-                    <div>
-                        <div>
-                            <div className={'schema-name'}><FormattedMessage id='Name'/></div>
-                            <div>
-                                <span className='item-title-cloud'><FormattedMessage id='name'/>:</span>
-                                <Input style={{width: 250}} value={this.state.customName}
-                                       onChange={(e) => {
-                                           this.setState({customName: e.target.value})
-                                       }}/>
-                            </div>
-                        </div>
-
-                        <div style={{marginTop: 20}}>
-                            <div className={'schema-name'}><FormattedMessage id='DB Choose'/></div>
-                            <RadioGroup onChange={(e) => {
-                                this.setState({dbKind: e.target.value})
-                            }} value={this.state.dbKind}>
-                                <Radio value='fc-db'>fc-db</Radio>
-                                <Radio value='mongodb'>mongodb</Radio>
-                            </RadioGroup>
-                        </div>
-
-                        {
-                            this.state.dbKind === 'mongodb' ?
-                                <div>
-                                    <div>
-                                        <span className='item-title-cloud'>地址</span>
-                                        <Input style={{width: 250}} value={this.state.host}
-                                               onChange={(e) => {
-                                                   this.setState({host: e.target.value})
-                                               }}
-                                        />
-                                    </div>
-
-                                    <div>
-                                        <span className='item-title-cloud'>数据库名称</span>
-                                        <Input style={{width: 250}} value={this.state.db}
-                                               onChange={(e) => {
-                                                   this.setState({db: e.target.value})
-                                               }}
-                                        />
-                                    </div>
-
-                                    <div>
-                                        <span className='item-title-cloud'>用户名</span>
-                                        <Input style={{width: 250}} value={this.state.username}
-                                               onChange={(e) => {
-                                                   this.setState({username: e.target.value})
-                                               }}
-                                        />
-                                    </div>
-
-                                    <div>
-                                        <span className='item-title-cloud'>密码</span>
-                                        <Input type='password' style={{width: 250}} value={this.state.password}
-                                               onChange={(e) => {
-                                                   this.setState({password: e.target.value})
-                                               }}
-                                        />
-                                    </div>
-                                </div>
-                                :
-                                ''
-                        }
-
-                        {
-                            disableDeployButton ?
-                                '正在部署...'
-                                :
-                                <Button type='primary' onClick={() => {
-                                    this.setState({
-                                        deployFailed: false
-                                    })
-                                    this.storeEdnAndDeploy(secretID, secretKey, appId, bucketName, dbKind, userID, db, username, password, db, host, customName, cloudID)
-                                }}>开始部署</Button>
-
-                        }
-
-                        {
-                            deployFailed?
-                                '部署失败,请稍后重试':''
-                        }
-
-                    </div>
-                </Modal>
-            </div>
-        )
-    }
-}
-
-const Step4 = (props) => (
-    <div className='step-block'>
-        第三步:注册微信公众号/小程序
-        <Button style={{marginLeft: 20}}>使用帮助</Button>
-    </div>
-);
-
-class Step5 extends Component {
-    constructor(props) {
-        super(props)
-        this.state = {
-            visible: false
-        }
-    }
-
-    handleCancel = () => {
-        this.setState({
-            visible: false
-        })
-    }
-
-    render() {
-        let {visible} = this.state
-        let {userID, bucketName} = this.props
-        return (
-            <div className='step-block'>
-                第四步:微信公众号/小程序 后台填写配置
-                <Button style={{marginLeft: 20}}>使用帮助</Button>
-                <div>
-                    <Button type='primary' onClick={() => {
-                        this.setState({visible: true})
-                    }}>填写配置</Button>
-                    <Modal
-                        title="公众号/小程序配置"
-                        visible={visible}
-                        footer={null}
-                        onCancel={this.handleCancel}
-                    >
-                        <Wechat
-                            userID={userID}
-                            bucketName={bucketName}
-                        />
-                    </Modal>
-                </div>
-            </div>
-        )
-    }
-}
-
-// 该组件作用在于 store wx.edn to cos
-class Wechat extends Component {
-    constructor(props) {
-        super(props)
-        this.state = {
-            appID: '',
-            appSecret: '',
-            token: '',
-            url: '',
-            key: '',
-            appid: '',
-            mch: '',
-            nonce: '',
-            body: '',
-            spbill: '',
-            notify: '',
-            attach: '',
-            dbKind: 'fc-db',
-            saving: false,
-            savingCompleted: false
-        }
-    }
-
-    inputChange = (kind) => {
-        return (e) => {
-            this.setState({
-                [kind]: e.target.value
-            })
-        }
-    };
-
-    storeEdn = () => {
-        // store *.edn to cos
-        let {appID, appSecret, token, url, key, appid, mch, nonce, body, spbill, notify, attach, dbKind} = this.state
-        let {userID, bucketName} = this.props
-        let deployConf = `{
-            :wx-server {
-                 :appID "${appID}"                   
-                 :appsecret "${appSecret}"
-                 :enter-url "${url}"
-                 :token "${token}"
-            }
-            :wx-pay {
-                :PAY-API-KEY "${key}"
-                :appid "${appid}"  
-                :attach "${attach}"
-                :mch_id "${mch}"    
-                :nonce_str "${nonce}"
-                :body "${body}"
-                :spbill_create_ip "${spbill}"
-                :notify_url "${notify}"
-            }
-        }`
-
-        axios.post(storeFile, {
-            'file-name': `${bucketName}/${dbKind}/${userID}/wx-config.edn`,
-            bucket: 'case',
-            cont: deployConf
-        }).then(value => {
-            if (value.status === 200) {
-                console.log('store wx file success');
-                this.setState({
-                    saving: false,
-                    savingCompleted: true
-                })
-            }
-        });
-    }
-
-    render() {
-        let {appID, appSecret, token, url, key, appid, mch, nonce, body, spbill, notify, attach, dbKind, saving, savingCompleted} = this.state
-        return (
-            <div>
-                <div style={{marginTop: 15}}>
-                    <div style={{marginBottom: 15}}>
-                        <div>
-                            <span className='cloud-name'><FormattedMessage id='DB Choose'/></span>
-                            <RadioGroup onChange={(e) => {
-                                this.setState({dbKind: e.target.value})
-                            }} value={dbKind}>
-                                <Radio value='fc-db'>fc-db</Radio>
-                                <Radio value='mongodb'>mongodb</Radio>
-                            </RadioGroup>
-                            <span className='cloud-name'>微信开发者配置</span>
-                            <div style={{marginBottom: 20}}>
-                                <span className='item-title-cloud'>appID:</span>
-                                <Input style={{width: 250}} value={appID} onChange={this.inputChange('appID')}/>
-                            </div>
-                            <div style={{marginBottom: 20}}>
-                                <span className='item-title-cloud'>appSecret:</span>
-                                <Input type='password' style={{width: 250}} value={appSecret}
-                                       onChange={this.inputChange('appSecret')}/>
-                            </div>
-                            <div style={{marginBottom: 20}}>
-                                <span className='item-title-cloud'>token:</span>
-                                <Input type='password' style={{width: 250}} value={token}
-                                       onChange={this.inputChange('token')}/>
-                            </div>
-                            <div style={{marginBottom: 20}}>
-                                <span className='item-title-cloud'>回调域名:</span>
-                                <Input style={{width: 250}} value={url} onChange={this.inputChange('url')}/>
-                            </div>
-                            <span className='cloud-name'>微信支付配置</span>
-                            <div style={{marginBottom: 20}}>
-                                <span className='item-title-cloud'>key:</span>
-                                <Input style={{width: 250}} value={key} onChange={this.inputChange('key')}/>
-                            </div>
-                            <div style={{marginBottom: 20}}>
-                                <span className='item-title-cloud'>appid:</span>
-                                <Input style={{width: 250}} value={appid} onChange={this.inputChange('appid')}/>
-                            </div>
-                            <div style={{marginBottom: 20}}>
-                                <span className='item-title-cloud'>attach:</span>
-                                <Input style={{width: 250}} value={attach} onChange={this.inputChange('attach')}/>
-                            </div>
-                            <div style={{marginBottom: 20}}>
-                                <span className='item-title-cloud'>商户 id:</span>
-                                <Input style={{width: 250}} value={mch} onChange={this.inputChange('mch')}/>
-                            </div>
-                            <div style={{marginBottom: 20}}>
-                                <span className='item-title-cloud'>nonce:</span>
-                                <Input style={{width: 250}} value={nonce} onChange={this.inputChange('nonce')}/>
-                            </div>
-                            <div style={{marginBottom: 20}}>
-                                <span className='item-title-cloud'>body:</span>
-                                <Input style={{width: 250}} value={body} onChange={this.inputChange('body')}/>
-                            </div>
-                            <div style={{marginBottom: 20}}>
-                                <span className='item-title-cloud'>机器IP:</span>
-                                <Input style={{width: 250}} value={spbill} onChange={this.inputChange('spbill')}/>
-                            </div>
-                            <div style={{marginBottom: 20}}>
-                                <span className='item-title-cloud'>通知域名:</span>
-                                <Input style={{width: 250}} value={notify} onChange={this.inputChange('notify')}/>
-                            </div>
-
-                        </div>
-                        {
-                            saving ?
-                                '保存中,请稍后。。。' :
-                                <Button type='primary' onClick={() => {
-                                    this.storeEdn()
-                                    this.setState({
-                                        saving: true
-                                    })
-                                }}>
-                                    <FormattedMessage id="save"/>
-                                </Button>
-                        }
-                        {
-                            savingCompleted ?
-                                <Icon type="check-circle" theme="twoTone" twoToneColor="#52c41a"/> : ''
-                        }
-                    </div>
-                </div>
-            </div>
-        )
-    }
-}
-
-class Step6 extends Component {
-    constructor(props) {
-        super(props)
-        this.state = {
-            visible: false
-        }
-    }
-
-    handleCancel = () => {
-        this.setState({
-            visible: false
-        })
-    }
-
-    render() {
-        let {visible} = this.state
-        let {userID, bucketName} = this.props
-        return (
-            <div className='step-block'>
-                开始使用
-                <div>
-                    <Button type='primary' onClick={() => {
-                        this.setState({visible: true})
-                    }}>使用</Button>
-                    <Modal
-                        title="公众号/小程序二次部署"
-                        visible={visible}
-                        footer={null}
-                        onCancel={this.handleCancel}
-                    >
-                        <WechatDeploy
-                            userID={userID}
-                            bucketName={bucketName}
-                        />
-                    </Modal>
-                </div>
-            </div>
-        )
-    }
-}
-
-// 该组件作用在于 重新部署 fc
-// 因为需要同名覆盖,所以要求输入同名的函数名
-// 目前不直接在 step before存入共同父组件再传递回来,是因为
-// 考虑到用户刷新,数据将消失
-// 如果需要上述操作,可以考虑限制用户每种案例部署一个,通过查询数据库来实现自动填写
-// 目前的限制一个,在于限制了用户实际部署的,但在前端没有限制个数
-class WechatDeploy extends Component {
-    constructor(props) {
-        super(props)
-        this.state = {
-            dbKind: 'fc-db',
-            customName: props.bucketName,
-            deployButton: true,
-            deploySuccess: false
-        }
-    }
-
-    render() {
-        let {customName, dbKind, deployButton, deploySuccess} = this.state
-        let {bucketName, userID} = this.props;
-        return (
-            <div>
-                <div>
-                    <div className={'schema-name'}><FormattedMessage id='Name'/></div>
-                    <div>
-                        <span className='item-title-cloud'><FormattedMessage id='name'/>:</span>
-                        <Input style={{width: 250}} value={customName}
-                               onChange={(e) => {
-                                   this.setState({customName: e.target.value})
-                               }}/>
-                    </div>
-                </div>
-
-                <div style={{marginTop: 20}}>
-                    <div className={'schema-name'}><FormattedMessage id='DB Choose'/></div>
-                    <RadioGroup onChange={(e) => {
-                        this.setState({dbKind: e.target.value})
-                    }} value={dbKind}>
-                        <Radio value='fc-db'>fc-db</Radio>
-                        <Radio value='mongodb'>mongodb</Radio>
-                    </RadioGroup>
-                </div>
-
-                {
-                    deployButton?
-                        <Button type='primary' onClick={() => {
-                            this.setState({
-                                deployButton: false
-                            })
-                            let functionName = convert_(customName),
-                                resources = [`${bucketName}/schema.edn`, `${bucketName}/resolve-map.edn`, `${bucketName}/${dbKind}/${userID}/deploy-conf.edn`, `${bucketName}/html/index.html`, `${bucketName}/wx-config.edn`];
-
-                            if (dbKind === 'mongodb') {
-                                resources.push(`${bucketName}/${dbKind}/${userID}/mongo-config.edn`)
-                            }
-                            axios.post(deployFC, {
-                                'fc-name': userID + '_' + functionName,
-                                'bucket': dbKind === 'mongodb' ? 'native-fc' : 'fcdb-deploy',
-                                'object-file': 'fc-only.zip',
-                                'res-bucket': 'case',
-                                'resources': resources
-                            }).then(res => {
-                                console.log(res)
-                                this.setState({
-                                    deployButton: true,
-                                    deploySuccess: true
-                                })
-                            })
-                        }}>使用</Button>
-                        :
-                        '正在部署中...'
-                }
-                {
-                    deploySuccess?
-                       '部署成功' : ''
-                }
-            </div>
-        )
-    }
-}

+ 0 - 407
src/app/basicVersion/caseShow/backup.js

@@ -1,407 +0,0 @@
-import React, {Component} from 'react';
-import {Layout, Button, notification, Spin, Row, Col, Icon, message, Input, Radio, Modal} from 'antd';
-import {getCookie} from "../../../cookie";
-import {graphqlUrl, storeFile} from "../../../config";
-import {SEARCH_APIGROUP, SHOW_CLOUD} from "../../../gql";
-import {request} from 'graphql-request'
-import axios from 'axios';
-import {deployAll} from "../../../config";
-import {ADD_APIGWPATH, ADD_APIGROUP, ADD_DEPLOY, ADD_PROJECT} from "../../../gql";
-import {idGen} from "../../../func";
-import {FormattedMessage} from 'react-intl';
-import copy from 'copy-to-clipboard';
-import {CloudConfig} from '../../../login/CloudConfig';
-
-const {Content} = Layout;
-const RadioGroup = Radio.Group;
-axios.defaults.withCredentials = true;
-
-class DeployCloudChoose extends Component {
-    constructor() {
-        super();
-        this.state = {
-            userID: '',
-            check: new Date().getTime(),
-
-            disableDeployButton: false,
-            domain: '',
-
-            cloudName: 'tencent',
-            cloudID: '',
-            secretID: '',
-            secretKey: '',
-            appId: '',
-
-            customName: '',
-            bucketName: '',
-            dbKind: 'fc-db', // mongodb fc-db
-        }
-    }
-
-    componentWillMount() {
-        this._isMounted = true;
-
-        // 查询是否登录
-        let userID = getCookie('user_id');
-        if (userID !== undefined && userID !== '') {
-            this.setState({
-                userID
-            });
-        }
-
-        // 查询跳转来的案例,转成 apigroup id
-        let groupID = '';
-        if (this.props.location && this.props.location.state) {
-            switch (this.props.location.state.schemaID) {
-                case 'order_schemaID':
-                    this.setState({
-                        bucketName: 'appointment'
-                    });
-                    groupID = 'order';
-                    break;
-                case 'ecommerce_schemaID':
-                    this.setState({
-                        bucketName: 'e-commerce'
-                    });
-                    groupID = 'ecommerce';
-                    break;
-                case 'bills_schemaID':
-                    this.setState({
-                        bucketName: 'bills'
-                    });
-                    groupID = 'bills';
-                    break;
-                default:
-                    break;
-            }
-        }
-
-        // 查询该案例的 domain
-        request(graphqlUrl, SEARCH_APIGROUP, {id: groupID}).then(res => {
-            let caseDeploy = res.apiGWGroupbyid;
-            let domain = caseDeploy.defaultDomain;
-            if (this._isMounted) {
-                this.setState({
-                    domain
-                })
-            }
-        })
-
-    }
-
-    componentWillUnmount() {
-        this._isMounted = false;
-    }
-
-    deploy = () => {
-        this._isMounted = true;
-        let _this = this;
-        let {userID, dbKind, bucketName, customName} = this.state;
-
-        if (bucketName === '') {
-            console.log('state, 没有传值');
-        } else {
-
-            // 开始调用
-            console.log('开始调用');
-            this.setState({
-                disableDeployButton: true
-            });
-
-            let now = new Date().getTime(),
-                functionName = this.state.userID + '_' + customName,
-                serviceName = this.state.userID + '_' + customName,
-                resources = [`${bucketName}/schema.edn`, `${bucketName}/resolve-map.edn`, `${bucketName}/${dbKind}/${userID}/deploy-conf.edn`];
-
-            if (dbKind === 'mongodb') {
-                resources.push(`${bucketName}/${dbKind}/${userID}/mongo-config.edn`)
-            }
-
-
-            console.log('now', now, 'functionName', functionName, 'serviceName', serviceName, 'resources', resources);
-            axios.post(deployAll,
-                {
-                    'fc-name': functionName,
-                    'bucket': dbKind === 'mongodb' ? 'native-fc' : 'fcdb-deploy',
-                    'object-file': 'fc-only.zip',
-                    'res-bucket': 'case',
-                    'resources': resources,
-                    'service-name': serviceName,
-                    'path': "/*"
-                })
-                .then(function (response) {
-                    console.log('response', response);
-                    if (response['data']['apigw-result'] && response['data']['fc-result']) {
-                        // 处理数据
-                        let result = response['data']['apigw-result'];
-                        let apiData = result['api-info'];
-                        let serviceData = result['service-info'];
-
-                        // 存数据
-                        let pathID = idGen('path'),
-                            groupID = idGen('group'),
-                            deployID = idGen('deploy'),
-                            projectID = idGen('project');
-
-                        let {apiId, path, method} = apiData;
-                        let {serviceName, serviceId, subDomain} = serviceData;
-
-                        let {userID, cloudID} = _this.state;
-
-                        let pathVarObj = {
-                            id: idGen('path'),
-                            user_id: userID,
-                            apiGWGroup_id: pathID,
-                            deploy_id: deployID,
-                            apiGWName: functionName,
-                            requestMethod: method,
-                            apiGWPath: path,
-                            apiId: apiId,
-                            apiGWDesc: '',
-                            serviceType: 'SCF',
-                            timeout: 300,
-                            createdAt: now,
-                            updatedAt: ''
-                        };
-
-                        let projectVarObj = {
-                            id: projectID,
-                            projectType: 'case',
-                            cloud_id: cloudID,
-                            user_id: userID,
-                            projectName: functionName,
-                            database_id: '',
-                            apiGWGroup_id: '',
-                            deploy_id: '',
-                            case_id: '',
-                            wxConfig_id: '',
-                            schema_id: '',
-                            createdAt: now,
-                            updatedAt: '',
-                            projectStatus: 'deployed'
-                        };
-
-                        let groupVarObj = {
-                            id: groupID,
-                            cloud_id: cloudID,
-                            user_id: userID,
-                            userStatus: '',
-                            userDomain: '',
-                            groupName: serviceName,
-                            frontType: '',
-                            region: '',
-                            environmentName: '',
-                            defaultDomain: subDomain,
-                            status: '',
-                            serviceId: serviceId,
-                            createdAt: now,
-                            updatedAt: ''
-                        };
-
-                        let deployVarObj = {
-                            id: deployID,
-                            cloud_id: cloudID,
-                            functionName,
-                            cosObjectName: '',
-                            region: '',
-                            cosBucketRegion: '',
-                            description: '',
-                            cosBucketName: '',
-                            vpcId: '',
-                            subnetId: '',
-                            memorySize: 512,
-                            timeout: 300,
-                            handler: '',
-                            serviceName: "",
-                            fc_id: '',
-                            createdAt: now,
-                            updatedAt: ''
-                        };
-
-                        let add_apigwpath = request(graphqlUrl, ADD_APIGWPATH, pathVarObj),
-                            add_project = request(graphqlUrl, ADD_PROJECT, projectVarObj),
-                            add_apigroup = request(graphqlUrl, ADD_APIGROUP, groupVarObj),
-                            add_deploy = request(graphqlUrl, ADD_DEPLOY, deployVarObj);
-
-                        Promise.all([add_apigwpath, add_project, add_apigroup, add_deploy])
-                            .then(value => {
-                                console.log(value);
-
-                                // 展示数据
-                                if (_this._isMounted) {
-                                    _this.setState({
-                                        disableDeployButton: false
-                                    });
-                                }
-
-                                _this.props.changeTabBar('my-deploy');
-                                _this.props.history.push({
-                                    pathname: `/common/deploy`,
-                                    state: {
-                                        // 处理传回数据,直接拼接
-                                        url: `http://${subDomain}/test/graphql`
-                                    }
-                                });
-                            })
-                            .catch(err => {
-                                console.log(err);
-                            });
-                    } else {
-                        console.log('deployAll 失败');
-                    }
-
-                })
-                .catch(function (error) {
-                    console.log('axios error', error);
-                });
-        }
-    };
-
-
-    render() {
-        let {userID, disableDeployButton, appId, secretID, secretKey, bucketName, dbKind, domain, showCustom, cloudName, check} = this.state;
-        return (
-            <div className={'deploy-choose-cloud'}>
-                <Layout style={{padding: '24px', minHeight: '300px'}}>
-                    <Content style={{padding: '20px 50px', background: '#fff'}}>
-
-
-
-                        <div style={{marginTop: 20}}>
-                            {
-                                !showCustom ?
-                                    <div className={'choose-cloud-button-group'}>
-                                        <Button className={'choose-cloud-button'} type='primary' onClick={() => {
-                                            if (userID === '') {
-                                                notification['warning']({
-                                                    message: '需要登录',
-                                                    description: '后续使用,需要先登录',
-                                                });
-
-                                                this.props.history.push({
-                                                    pathname: `/login`
-                                                })
-                                            } else {
-                                                this.setState({
-                                                    showCustom: true
-                                                })
-                                            }
-                                        }}>自定义参数设置</Button>
-                                    </div>
-                                    :
-                                    <div>
-                                        <hr/>
-                                        <div>
-                                            <div className={'schema-name'}><FormattedMessage id='Name'/></div>
-                                            <div>
-                                                <span className='item-title-cloud'><FormattedMessage id='name'/>:</span>
-                                                <Input style={{width: 250}} value={this.state.customName}
-                                                       onChange={(e) => {
-                                                           this.setState({customName: e.target.value})
-                                                       }}/>
-                                            </div>
-                                        </div>
-                                        <div style={{marginTop: 20}}>
-                                            <div className={'schema-name'}><FormattedMessage id='Cloud Setting'/></div>
-                                            <RadioGroup onChange={(e) => {
-                                                this.setState({cloudName: e.target.value})
-                                            }} value={this.state.cloudName}>
-                                                <Radio value={'tencent'}><FormattedMessage id='tencent cloud'/></Radio>
-                                                <Radio value={'aliyun'}><FormattedMessage id='aliyun'/></Radio>
-                                                <Radio value={'amazon'}><FormattedMessage id='amazon cloud'/></Radio>
-                                            </RadioGroup>
-
-                                        </div>
-                                        <div style={{marginTop: 20}}>
-                                            <div className={'schema-name'}><FormattedMessage id='DB Choose'/></div>
-                                            <RadioGroup onChange={(e) => {
-                                                this.setState({dbKind: e.target.value})
-                                            }} value={this.state.dbKind}>
-                                                <Radio value='fc-db'>fc-db</Radio>
-                                                <Radio value='mongodb'>mongodb</Radio>
-                                            </RadioGroup>
-                                        </div>
-                                        {
-                                            disableDeployButton ?
-                                                <Spin/>
-                                                :
-                                                <Button style={{marginTop: 20}} type='primary' onClick={() => {
-                                                    if (appId && secretID && secretKey) {
-                                                        this.setState({
-                                                            disableDeployButton: true
-                                                        });
-
-                                                        // store *.edn to cos
-                                                        let deployConf = dbKind === 'mongodb' ?
-                                                            ` {:secretId "${secretID}"\n` +
-                                                            ` :secretKey "${secretKey}"\n` +
-                                                            ` :appId "${appId}"\n` +
-                                                            ' :region "ap-beijing" \n' +
-                                                            ' }\n'
-                                                            :
-                                                            ` {:secretId "${secretID}"\n` +
-                                                            ` :secretKey "${secretKey}"\n` +
-                                                            ` :appId "${appId}"\n` +
-                                                            ' :region "ap-beijing"\n' +
-                                                            ' :bucket "fc-db"\n' +
-                                                            ' :trustStore "/etc/ssl/certs/java/cacerts"\n' +
-                                                            ` :fc-db-store "save/${bucketName}.dat"\n` +
-                                                            ' :fc-db-dir "fc-db"\n' +
-                                                            ' :graphql-url "http://orderfcdb.ioobot.cn/graphql"\n' +
-                                                            ' :local-tmp-dir "/tmp"\n' +
-                                                            ' :local-db-file "fcdb.dat"\n' +
-                                                            ' :update-tx? true \n' +
-                                                            ' :force-down? true\n' +
-                                                            ' }';
-
-                                                        let a = axios.post(storeFile, {
-                                                            'file-name': `${bucketName}/${dbKind}/${userID}/deploy-conf.edn`,
-                                                            bucket: 'case',
-                                                            cont: deployConf
-                                                        });
-
-                                                        let cont = '{:uri {\n' +
-                                                            ':auth {:admin-db   "order"\n' +
-                                                            ' :u    "ly"\n' +
-                                                            ' :p   "autorunC1705"\n' +
-                                                            ' :host "119.27.174.13"}}\n' +
-                                                            ' :db-name "order"}';
-
-                                                        let b = dbKind === 'mongodb' ?
-                                                            axios.post(storeFile, {
-                                                                'file-name': `${bucketName}/${dbKind}/${userID}/mongo-config.edn`,
-                                                                bucket: 'case',
-                                                                cont
-                                                            })
-                                                            :
-                                                            Promise.resolve({status: 200});
-
-                                                        Promise.all([a, b]).then(value => {
-                                                            if (value.every(res => res.status === 200)) {
-                                                                console.log('store file success , start deploying');
-                                                                this.deploy();
-                                                            }
-                                                        });
-                                                    } else {
-                                                        notification['warning']({
-                                                            message: '需要填写配置',
-                                                            description: '后续使用,需要先填写配置',
-                                                        });
-
-                                                        this.props.history.push({
-                                                            pathname: `/login/cloud`
-                                                        })
-                                                    }
-                                                }}>部署</Button>
-                                        }
-                                    </div>
-                            }
-                        </div>
-                    </Content>
-                </Layout>
-            </div>
-        )
-    }
-}
-
-export default DeployCloudChoose

+ 0 - 168
src/app/basicVersion/caseShow/index.css

@@ -1,168 +0,0 @@
-#example-show .content{
-    padding: 20px 50px;
-    background: rgb(255, 255, 255);
-}
-
-.caseAllShow {
-    display: flex;
-    flex-wrap: wrap;
-    justify-content: space-around;
-}
-
-.deploy-choose-cloud {
-    position: relative;
-}
-
-.choose-cloud {
-    margin-top: 20px;
-}
-
-.choose-cloud-title {
-    color: rgba(49, 135, 250, 1);
-    font-weight: 400;
-    font-size: 16px;
-    width: 150px;
-    display: inline-block;
-}
-
-.choose-cloud-content {
-    padding-left: 50px;
-    font-weight: 400;
-    font-size: 16px;
-}
-
-.user-custom-right-side {
-    position: fixed;
-}
-
-.choose-cloud-button {
-    margin-left: 20px;
-}
-
-.detail-images {
-    display: flex;
-    flex-wrap: wrap;
-    justify-content: flex-start;
-    margin-top: 20px;
-}
-
-.detail-images img{
-    padding: 20px 40px 20px 0;
-}
-
-.column-menu span{
-    font-size: 18px;
-    padding-left: 10px;
-}
-
-.card {
-    background: white;
-    min-height: 150px;
-    box-shadow: 3px 8px 16px 3px rgba(0,0,0,0.2);
-}
-
-.card-head {
-    border-radius: 4px;
-    display: flex;
-    justify-content: space-around;
-}
-
-.card-head-item {
-    margin: 20px 30px;
-    border-radius: 5px;
-    padding: 12px;
-    box-shadow: none;
-}
-
-.card-head-item p {
-    color: white;
-    font-weight: bold;
-    padding: 5px;
-}
-
-.card-head-item .ant-btn{
-    color: #608fff;
-    border-radius: 30px;
-    float: right;
-}
-
-.orange-change{
-    background-image: linear-gradient(to top, #ff884e 0%, #f9d8b8 100%);
-}
-
-.pink-change{
-    background-image: linear-gradient(to top, #f95755 0%, #fbaeab 100%);
-}
-
-.blue-change{
-    background-image: linear-gradient(to top, #5d8eff 0%, #b6d9ff 100%);
-}
-
-.card-case {
-    margin-bottom: 50px;
-}
-
-.case-name {
-    color: #101010;
-    font-weight: bold;
-    font-size: 20px;
-    line-height: 50px;
-}
-
-.case-show-head {
-    text-align: center;
-    font-size: 16px;
-    color: black;
-    padding-top: 20px;
-}
-
-.wrap {
-    height: 100%;
-    min-height: 540px;
-    flex-flow: column;
-    display:flex;
-}
-
-.wrapper {
-    flex: 1;
-    display:flex;
-}
-
-.left, .middle, .right {
-    flex: 1;
-    display:flex;
-    flex-flow: column;
-    padding: 5px 0;
-}
-.cl {
-    flex: 1;
-    margin: 5px;
-}
-
-.left-end {
-    position: absolute;
-    left: 0;
-    bottom: 0;
-}
-
-.cl-center {
-    flex: 1;
-    margin: 5px;
-    text-align: center;
-}
-
-.center {
-    text-align: center;
-}
-
-.step-kind {
-    text-align: center;
-    margin: 60px 0;
-    font-size: 30px;
-}
-
-.step-block {
-    height: 120px;
-    font-size: 20px;
-}
-

+ 0 - 57
src/app/basicVersion/communication/Communication.jsx

@@ -1,57 +0,0 @@
-import React, {Component} from 'react';
-
-import {Layout,Card} from 'antd';
-import qq from '../../../images/workbench-qq.png';
-import dd from '../../../images/workbench-dd.jpg';
-import './index.css';
-
-const {Content} = Layout;
-const { Meta } = Card;
-
-class Communication extends Component{
-    constructor(){
-        super();
-        this.state={
-
-        }
-    }
-
-    render(){
-        return(
-            <div>
-                <Layout style={{ padding: '24px',minHeight:'300px' }}>
-                    <Content style={{ padding: '20px', background: '#fff' }}>
-                        <div className="show">
-                            <span>
-                                 <Card
-                                     hoverable
-                                     style={{ width: 240 }}
-                                     cover={<img alt="钉钉用户群" src={dd} />}
-                                 >
-                                <Meta
-                                    title="钉钉用户群"
-                                    description="通过钉钉联系我们,扫码入群讨论交流"
-                                />
-                            </Card>
-                            </span>
-                            <span>
-                                <Card
-                                    hoverable
-                                    style={{ width: 240 }}
-                                    cover={<img alt="QQ用户群" src={qq} />}
-                                >
-                                <Meta
-                                    title="QQ用户群"
-                                    description="通过QQ群联系我们,扫码入群讨论交流"
-                                />
-                            </Card>
-                            </span>
-                        </div>
-                    </Content>
-                </Layout>
-            </div>
-        )
-    }
-}
-
-export default Communication;

+ 0 - 9
src/app/basicVersion/communication/index.css

@@ -1,9 +0,0 @@
-.show {
-    display: flex;
-    flex-wrap: wrap;
-    justify-content: flex-start;
-}
-
-.show span{
-    padding: 20px;
-}

+ 0 - 0
src/app/basicVersion/index.css


+ 0 - 154
src/app/basicVersion/myDeploy/AliyunDeploy.js

@@ -1,154 +0,0 @@
-import React, {Component} from 'react';
-import {FormattedMessage} from 'react-intl';
-import {Alert, Icon, Spin, Row, Col, message, Button} from 'antd';
-import {
-    SHOW_APIGROUP
-} from "../../../gql";
-import {request} from 'graphql-request'
-import copy from 'copy-to-clipboard';
-import axios from 'axios';
-import {graphqlUrl} from "../../../config";
-
-axios.defaults.withCredentials = true;
-
-class TencentDeploy extends Component {
-    constructor(props) {
-        super(props);
-        this.state = {
-            userID: props.userID,
-            url: props.url,
-            show: false,
-            deployed: []
-        }
-    }
-
-    componentWillMount() {
-        this._isMounted = true;
-        let {userID} = this.state;
-        if (userID !== 'demo') {
-            request(graphqlUrl, SHOW_APIGROUP, {userID}).then(res => {
-                let allDeployed = res.apiGWGroupbyprops;
-                let deployed = allDeployed.filter(deployed =>
-                    deployed.cloud_id.cloudName === 'aliyun'
-                );
-                if(this._isMounted) {
-                    this.setState({
-                        deployed,
-                        show: true
-                    })
-                }
-            })
-        }
-    }
-
-    componentWillUnmount() {
-        this._isMounted = false;
-    }
-
-    render() {
-        let {userID, url, deployed, show} = this.state;
-        return (
-            <div>
-                {
-                    userID === 'demo' && !!url ?
-                        <Alert
-                            message="WARNING"
-                            description="it will be deleted soon, please login to deploy in your owm account"
-                            type="warning"
-                        />
-                        : ''
-                }
-
-                {
-                    !!url ?
-                        <div>
-                            <div className={'schema-name'}><FormattedMessage id='new'/></div>
-                            <div className={'schema-table-list-title'}>
-                                <Row>
-                                    <Col span={15}><span className={'schema-table-title'}><FormattedMessage
-                                        id='defaultDomain'/></span></Col>
-                                </Row>
-                            </div>
-                            <div className={'schema-table-list-content'}>
-                                <Row>
-                                    <Col span={15}>
-                                        <span className={'schema-table-content'}>{`http://${url}/test/graphql`} </span>
-                                        <Icon type="copy" theme="twoTone" onClick={() => {
-                                            copy(url);
-                                            message.success('复制成功.');
-                                        }}/>
-                                    </Col>
-                                </Row>
-                            </div>
-                        </div>
-                        :
-                        ''
-                }
-                {
-                    userID === 'demo' ?
-                        <div style={{marginTop: 50}}>
-                            <FormattedMessage id='go to deploy,then see more'/>
-                        </div>
-
-                        :
-                        <div>
-                            <div className={'schema-name'}><FormattedMessage id='service manage'/></div>
-                            <div className={'schema-table-list-title'}>
-                                <Row>
-                                    <Col span={5}><span className={'schema-table-title'}><FormattedMessage
-                                        id='groupName'/></span></Col>
-                                    <Col span={15}><span className={'schema-table-title'}><FormattedMessage
-                                        id='defaultDomain'/></span></Col>
-                                    <Col span={4}><span className={'schema-table-title'}><FormattedMessage
-                                        id='operation'/></span></Col>
-                                </Row>
-                            </div>
-                            {
-                                show ?
-                                    <div className={'schema-table-list-content'}>
-                                        {
-                                            deployed.map(deploy => (
-                                                <Row key={deploy.id}>
-                                                    <Col span={5}>
-                                                        <span
-                                                            className={'schema-table-content'}>{deploy.serviceId}</span>
-                                                    </Col>
-                                                    <Col span={15}>
-                                                        <span
-                                                            className={'schema-table-content'}>{`http://${deploy.defaultDomain}/test/`} </span>
-                                                        <Icon type="copy" theme="twoTone" onClick={() => {
-                                                            copy(url);
-                                                            message.success('复制成功.');
-                                                        }}/>
-                                                    </Col>
-                                                    <Col span={4}>
-                                                        <Button type={'danger'} size={'small'}
-                                                                style={{marginTop: 10}}><FormattedMessage id='delete'/></Button>
-                                                    </Col>
-                                                </Row>
-                                            ))
-                                        }
-                                        {
-                                            deployed.length === 0 ?
-                                                <Row>
-                                                    <Col span={15} offset={5}>
-                                                        <span className={'schema-table-content'}><FormattedMessage
-                                                            id='nothing'/> </span>
-                                                    </Col>
-                                                </Row> :
-                                                ''
-                                        }
-                                    </div>
-                                    :
-                                    <Spin/>
-                            }
-
-                        </div>
-
-                }
-            </div>
-        )
-    }
-}
-
-export default TencentDeploy;

+ 0 - 154
src/app/basicVersion/myDeploy/AmazonDeploy.js

@@ -1,154 +0,0 @@
-import React, {Component} from 'react';
-import {FormattedMessage} from 'react-intl';
-import {Alert, Icon, Spin, Row, Col, message, Button} from 'antd';
-import {
-    SHOW_APIGROUP
-} from "../../../gql";
-import {request} from 'graphql-request'
-import copy from 'copy-to-clipboard';
-import axios from 'axios';
-import {graphqlUrl} from "../../../config";
-
-axios.defaults.withCredentials = true;
-
-class TencentDeploy extends Component {
-    constructor(props) {
-        super(props);
-        this.state = {
-            userID: props.userID,
-            url: props.url,
-            show: false,
-            deployed: []
-        }
-    }
-
-    componentWillMount() {
-        this._isMounted = true;
-        let {userID} = this.state;
-        if (userID !== 'demo') {
-            request(graphqlUrl, SHOW_APIGROUP, {userID}).then(res => {
-                let allDeployed = res.apiGWGroupbyprops;
-                let deployed = allDeployed.filter(deployed =>
-                    deployed.cloud_id.cloudName === 'amazon'
-                );
-                if(this._isMounted) {
-                    this.setState({
-                        deployed,
-                        show: true
-                    })
-                }
-            })
-        }
-    }
-
-    componentWillUnmount() {
-        this._isMounted = false;
-    }
-
-    render() {
-        let {userID, url, deployed, show} = this.state;
-        return (
-            <div>
-                {
-                    userID === 'demo' && !!url ?
-                        <Alert
-                            message="WARNING"
-                            description="it will be deleted soon, please login to deploy in your owm account"
-                            type="warning"
-                        />
-                        : ''
-                }
-
-                {
-                    !!url ?
-                        <div>
-                            <div className={'schema-name'}><FormattedMessage id='new'/></div>
-                            <div className={'schema-table-list-title'}>
-                                <Row>
-                                    <Col span={15}><span className={'schema-table-title'}><FormattedMessage
-                                        id='defaultDomain'/></span></Col>
-                                </Row>
-                            </div>
-                            <div className={'schema-table-list-content'}>
-                                <Row>
-                                    <Col span={15}>
-                                        <span className={'schema-table-content'}>{`http://${url}/test/graphql`} </span>
-                                        <Icon type="copy" theme="twoTone" onClick={() => {
-                                            copy(url);
-                                            message.success('复制成功.');
-                                        }}/>
-                                    </Col>
-                                </Row>
-                            </div>
-                        </div>
-                        :
-                        ''
-                }
-                {
-                    userID === 'demo' ?
-                        <div style={{marginTop: 50}}>
-                            <FormattedMessage id='go to deploy,then see more'/>
-                        </div>
-
-                        :
-                        <div>
-                            <div className={'schema-name'}><FormattedMessage id='service manage'/></div>
-                            <div className={'schema-table-list-title'}>
-                                <Row>
-                                    <Col span={5}><span className={'schema-table-title'}><FormattedMessage
-                                        id='groupName'/></span></Col>
-                                    <Col span={15}><span className={'schema-table-title'}><FormattedMessage
-                                        id='defaultDomain'/></span></Col>
-                                    <Col span={4}><span className={'schema-table-title'}><FormattedMessage
-                                        id='operation'/></span></Col>
-                                </Row>
-                            </div>
-                            {
-                                show ?
-                                    <div className={'schema-table-list-content'}>
-                                        {
-                                            deployed.map(deploy => (
-                                                <Row key={deploy.id}>
-                                                    <Col span={5}>
-                                                        <span
-                                                            className={'schema-table-content'}>{deploy.serviceId}</span>
-                                                    </Col>
-                                                    <Col span={15}>
-                                                        <span
-                                                            className={'schema-table-content'}>{`http://${deploy.defaultDomain}/test/`} </span>
-                                                        <Icon type="copy" theme="twoTone" onClick={() => {
-                                                            copy(url);
-                                                            message.success('复制成功.');
-                                                        }}/>
-                                                    </Col>
-                                                    <Col span={4}>
-                                                        <Button type={'danger'} size={'small'}
-                                                                style={{marginTop: 10}}><FormattedMessage id='delete'/></Button>
-                                                    </Col>
-                                                </Row>
-                                            ))
-                                        }
-                                        {
-                                            deployed.length === 0 ?
-                                                <Row>
-                                                    <Col span={15} offset={5}>
-                                                        <span className={'schema-table-content'}><FormattedMessage
-                                                            id='nothing'/> </span>
-                                                    </Col>
-                                                </Row> :
-                                                ''
-                                        }
-                                    </div>
-                                    :
-                                    <Spin/>
-                            }
-
-                        </div>
-
-                }
-            </div>
-        )
-    }
-}
-
-export default TencentDeploy;

+ 0 - 90
src/app/basicVersion/myDeploy/MyDeploy.jsx

@@ -1,90 +0,0 @@
-import React, {Component} from 'react';
-import {FormattedMessage} from 'react-intl';
-import {Card, Layout} from 'antd';
-
-import TencentDeploy from './TencentDeploy';
-import AliyunDeploy from './AliyunDeploy';
-import AmazonDeploy from './AmazonDeploy';
-import {getCookie} from "../../../cookie";
-
-const {Content} = Layout;
-
-
-const tabListNoTitle =
-    [{
-        key: 'tencent',
-        tab: <FormattedMessage id='Tencent'/>,
-    }, {
-        key: 'aliyun',
-        tab: <FormattedMessage id='Aliyun'/>,
-    }, {
-        key: 'amazon',
-        tab: <FormattedMessage id='AWS'/>,
-    }];
-
-
-class MyDeploy extends Component {
-    constructor(props) {
-        super(props);
-        this.state = {
-            cloud: 'tencent',
-            userID: '',
-            url: ''
-        };
-    }
-
-    componentWillMount() {
-        let userID = getCookie('user_id') || this.state.userID;
-        if (userID !== undefined && userID !== '') {
-            this.setState({
-                userID
-            });
-        }
-
-        if(this.props.location && this.props.location.state) {
-            this.setState({
-                url: this.props.location.state.url
-            })
-        }
-    }
-
-    render() {
-        let {url, userID} = this.state;
-        const contentListNoTitle = {
-            tencent: <TencentDeploy userID={userID} url={url}/>,
-            aliyun: <AliyunDeploy userID={userID} url={url}/>,
-            amazon: <AmazonDeploy userID={userID} url={url}/>,
-        };
-
-        return (
-            <div>
-                <Layout style={{ padding: '24px' }}>
-                    <Content style={{ background: '#fff' }}>
-                        {
-                            // 登录用户与非登录用户区别对待
-                            this.state.userID === ''?
-                                <TencentDeploy userID={userID} url={url}/>
-                                :
-                                <Card
-                                    style={{width: '100%'}}
-                                    tabList={tabListNoTitle}
-                                    activeTabKey={this.state.cloud}
-                                    onTabChange={(cloud) => {
-                                        this.setState({
-                                            cloud
-                                        })
-                                    }}
-                                >
-                                    {contentListNoTitle[this.state.cloud]}
-                                </Card>
-                        }
-
-                    </Content>
-                </Layout>
-            </div>
-
-        )
-    }
-}
-
-export default MyDeploy;

+ 0 - 213
src/app/basicVersion/myDeploy/TencentDeploy.js

@@ -1,213 +0,0 @@
-import React, {Component} from 'react';
-import {FormattedMessage} from 'react-intl';
-import {Alert, Icon, Spin, Row, Col, message, Button} from 'antd';
-import {
-    SHOW_APIGROUP, UPDATE_APIGROUP
-} from "../../../gql";
-import copy from 'copy-to-clipboard';
-import axios from 'axios';
-import QRCode from 'qrcode.react';
-import {Query, Mutation} from "react-apollo";
-import gql from "graphql-tag";
-
-axios.defaults.withCredentials = true;
-
-class TencentDeploy extends Component {
-    constructor(props) {
-        super(props);
-        this.state = {
-            userID: props.userID,
-            url: props.url
-        }
-    }
-
-    render() {
-        let {userID, url} = this.state;
-        return (
-            <Query query={gql(SHOW_APIGROUP)} variables={{user_id: userID, status: ''}}>
-                {
-                    ({loading, error, data}) => {
-                        if (loading) {
-                            return <Spin className='login-nickname'/>
-                        }
-                        if (error) {
-                            return 'error!';
-                        }
-                        let allDeployed = data.apiGWGroupbyprops;
-                        let deployed = allDeployed.filter(deployed =>
-                            deployed.cloud_id === null || deployed.cloud_id.cloudName === 'tencent'
-                        );
-                        return (
-                            <TencentDeployRender
-                                deployed={deployed}
-                                url={url}
-                                userID={userID}
-                            />
-                        )
-                    }
-                }
-            </Query>
-        )
-    }
-}
-
-class TencentDeployRender extends Component {
-    constructor(props) {
-        super(props);
-        this.state = {
-            userID: props.userID,
-            url: props.url
-        }
-    }
-
-    render() {
-        let {userID, url} = this.state;
-        let {deployed} = this.props;
-        let regexp = new RegExp(userID + '_');
-        return (
-            <div>
-                {
-                    userID === '' && !!url ?
-                        <Alert
-                            message="WARNING"
-                            description="it will be deleted soon, please login to deploy in your owm account"
-                            type="warning"
-                        />
-                        : ''
-                }
-
-                {
-                    !!url ?
-                        <div>
-                            <div className={'schema-name'}><FormattedMessage id='new'/></div>
-                            <div className={'schema-table-list-title'}>
-                                <Row>
-                                    <Col span={15}><span className={'schema-table-title'}><FormattedMessage id='defaultDomain'/></span></Col>
-                                </Row>
-                            </div>
-                            <div className={'schema-table-list-content'}>
-                                <Row>
-                                    <Col span={15}>
-                                        <span className={'schema-table-content'}>{url} </span>
-                                        <Icon type="copy" theme="twoTone" onClick={() => {
-                                            copy(url);
-                                            message.success('复制成功.');
-                                        }}/>
-                                    </Col>
-                                </Row>
-                            </div>
-                        </div>
-                        :
-                        ''
-                }
-
-                {
-                    userID === '' ?
-                        <div style={{marginTop: 50}}>
-                            <FormattedMessage id='go to deploy,then see more'/>
-                        </div>
-
-                        :
-                        <div>
-                            <div className={'schema-name'}><FormattedMessage id='service manage'/></div>
-                            <div className={'schema-table-list-title'}>
-                                <Row>
-                                    <Col span={4}><span className={'schema-table-title'}><FormattedMessage
-                                        id='groupName'/></span></Col>
-                                    <Col span={10}><span className={'schema-table-title'}><FormattedMessage
-                                        id='defaultDomain'/></span></Col>
-                                    <Col span={6}><span className={'schema-table-title'}><FormattedMessage
-                                        id='qrcode'/></span></Col>
-                                    <Col span={4}><span className={'schema-table-title'}><FormattedMessage
-                                        id='operation'/></span></Col>
-                                </Row>
-                            </div>
-
-                            <div className={'schema-table-list-content'}>
-                                {
-                                    deployed.map(deploy => (
-                                        <Row key={deploy.id}>
-                                            <Col span={4}>
-                                                <span
-                                                    className={'schema-table-content'}>{deploy.groupName.replace(regexp, '')}</span>
-                                            </Col>
-                                            <Col span={10}>
-                                                <span
-                                                    className={'schema-table-content'}>{`http://${deploy.defaultDomain}/test/`} </span>
-                                                <Icon type="copy" theme="twoTone" onClick={() => {
-                                                    copy(`http://${deploy.defaultDomain}/test/`);
-                                                    message.success('复制成功.');
-                                                }}/>
-                                            </Col>
-                                            <Col span={6}>
-                                                <QRCode
-                                                    value={deploy.userDomain ? `http://${deploy.userDomain}` : `http://${deploy.defaultDomain}/test/`}
-                                                    size={128}
-                                                    includeMargin={true}
-                                                />
-                                            </Col>
-                                            <Col span={4}>
-                                                <DeleteButton
-                                                    groupID={deploy.id}
-                                                    userID={userID}
-                                                />
-                                            </Col>
-                                        </Row>
-                                    ))
-                                }
-                                {
-                                    deployed.length === 0 ?
-                                        <Row>
-                                            <Col span={15} offset={5}>
-                                                <span className={'schema-table-content'}><FormattedMessage id='nothing'/> </span>
-                                            </Col>
-                                        </Row> :
-                                        ''
-                                }
-                            </div>
-
-
-                        </div>
-
-                }
-            </div>
-        )
-    }
-}
-
-export default TencentDeploy;
-
-class DeleteButton extends Component {
-    constructor(props) {
-        super(props);
-        this.state = {}
-    }
-
-    render() {
-        let {groupID, userID} = this.props;
-        return (
-            <Mutation
-                mutation={gql(UPDATE_APIGROUP)}
-                refetchQueries={[{query: gql(SHOW_APIGROUP), variables: {user_id: userID, status: ''}}]}
-            >
-                {(update_apiGWGroup, {loading, error}) => {
-                    if (loading)
-                        return <Spin style={{marginLeft: 30, marginTop: 10}}/>;
-                    if (error)
-                        return 'error';
-                    let varObj = {
-                        id: groupID,
-                        status: 'deleted',
-                        updatedAt: new Date().getTime()
-                    };
-                    console.log(varObj);
-                    return (
-                        <Button type={'danger'} size={'small'} style={{marginTop: 10}} onClick={() => {
-                            update_apiGWGroup({variables: varObj})
-                        }}><FormattedMessage id='delete'/></Button>
-                    )
-                }}
-            </Mutation>
-        )
-    }
-}

+ 0 - 692
src/app/developVersion/DevelopVersion.jsx

@@ -1,692 +0,0 @@
-import React, {Component} from 'react';
-import {Layout, Menu, Button, Spin, Icon, LocaleProvider, Dropdown, Avatar, Badge} from 'antd';
-import {BrowserRouter as Router, Route, Link, Switch, Redirect} from "react-router-dom";
-import {Query} from "react-apollo";
-import gql from "graphql-tag";
-
-import moment from 'moment';
-import 'moment/locale/zh-cn';
-import {FormattedMessage} from 'react-intl';
-import zhCN from 'antd/lib/locale-provider/zh_CN';
-
-import QuantService from "./quantService/QuantService";
-import TrialCase from "./graphqlService/TrialCase";
-import UserCreate from "./graphqlService/UserCreate";
-import WxTrialCase from "./wechatService/WxTrialCase";
-import WxUserCreate from "./wechatService/WxUserCreate";
-import Login from "../../login/Login";
-import Ticket from '../../ticket/Ticket';
-import './graphqlService/component/graphql/index.css';
-import './index.css'
-import Create from "./graphqlService/component/schema/Create";
-import WxCreate from "./wechatService/wxCreate/WxCreate";
-
-import {CASE_AND_PROJECT, GET_USER} from "../../gql";
-import axios from 'axios';
-import {getCookie, setCookie} from "../../cookie";
-import {logoutUrl} from "../../config";
-import Graphiql from "./common/Graphiql";
-
-axios.defaults.withCredentials = true;
-
-const {SubMenu} = Menu;
-const {Header, Sider} = Layout;
-moment.locale('en');
-
-class DevelopVersion extends Component {
-    constructor(props) {
-        super(props);
-        this.state = {
-            menuLevel1: "graphql-service",
-            sideBar: "ecommerce",
-            collapsed: false,
-            inlineCollapsed: false,
-            language: props.language,
-            locale: props.language === "中文" ? zhCN : undefined,
-            languageButton: props.language === "中文" ? "English" : "中文",
-            visible: false,
-            wxVisible: false,
-            userID: '',
-            avatar: ''
-        };
-    }
-
-    componentWillMount() {
-        let urlList = window.location.pathname.split("/");
-        let urlListLength = urlList.length;
-        if (urlListLength > 2) {
-            this.setState({menuLevel1: urlList[1]});
-            if (urlList[3] !== 'index') {
-                this.setState({sideBar: urlList[3]});
-            }
-        }
-
-        let userID = getCookie('user_id');
-        if (userID === undefined || '') {
-            axios.get(this.state.getIdUrl)
-                .then((res) => {
-                    if (res.data !== '') {
-                        setCookie("user_id", res.data);
-                        this.setState({
-                            userID: res.data
-                        })
-                    }
-                })
-                .catch(function (err) {
-                    console.log(err);
-                });
-        } else {
-            this.setState({
-                userID
-            })
-        }
-    }
-
-    onCollapse = (collapsed) => {
-        this.setState({collapsed});
-    };
-
-    switchMenu = (menuName, e) => {
-        this.setState({
-            [menuName]: e.key,
-        });
-    };
-
-    switchMenuTab = (menuName, e) => {
-        this.setState({
-            [menuName]: e.key,
-        });
-        if (e.key === "graphql-service") {
-            this.setState({sideBar: "ecommerce"});
-        }
-    };
-
-    switchSidebar = (value) => {
-        this.setState({
-            sideBar: value,
-        });
-    };
-
-    switchMenuLevel = (menuName, value) => {
-        this.setState({
-            [menuName]: value,
-        });
-    };
-
-    showModal = () => {
-        this.setState({
-            visible: true,
-        });
-    };
-
-    wxShowModal = () => {
-        this.setState({
-            wxVisible: true,
-        });
-    };
-
-    hideModal = () => {
-        this.setState({
-            visible: false,
-        });
-    };
-
-    wxHideModal = () => {
-        this.setState({
-            wxVisible: false,
-        });
-    };
-
-    changeLocale = (e) => {
-        e.stopPropagation();
-        let {language} = this.state;
-        // console.log('app language',language);
-        let changeLanguage = language === "中文" ? "English" : "中文";
-        let local = language === "中文" ? undefined : zhCN;
-        console.log(language);
-        let languageButton = language === "中文" ? "中文" : "English";
-
-        sessionStorage.setItem("language", changeLanguage);
-        this.props.changeLanguage(changeLanguage);
-        this.setState({
-            language: changeLanguage,
-            locale: local,
-            languageButton: languageButton
-        });
-        if (!local) {
-            moment.locale('en');
-        } else {
-            moment.locale('zh-cn');
-        }
-    };
-
-    render() {
-        const {locale, languageButton, visible, wxVisible} = this.state;
-
-        return (
-            <Layout style={{minHeight: '100vh'}}>
-                <Header className="header" style={{position: 'fixed', zIndex: 1, width: '100%'}}>
-                    <Link to="../"
-                          onClick={() => this.setState({menuLevel1: "graphql-service", sideBar: "ecommerce"})}>
-                        <div className="logo-wrapper">
-                            <div className='logo'/>
-                        </div>
-                    </Link>
-                    <Menu
-                        theme="dark"
-                        mode="horizontal"
-                        selectedKeys={[this.state.menuLevel1]}
-                        style={{lineHeight: '64px'}}
-                        onClick={(e) => this.switchMenuTab('menuLevel1', e)}
-                    >
-                        <Menu.Item key="graphql-service">
-                            <Link to="/developer/graphql-service/trial-case/index"><FormattedMessage
-                                id="Graphql Service"/></Link>
-                        </Menu.Item>
-                        <Menu.Item key="wechat-service">
-                            <Link to="/developer/wechat-service/trial-case/index"><FormattedMessage
-                                id="Wechat Service"/></Link>
-                        </Menu.Item>
-                        <Menu.Item key="quant-service">
-                            <Link to="/developer/quant-service/trial-case/index"><FormattedMessage id="Quantization Service"/></Link>
-                        </Menu.Item>
-                    </Menu>
-
-                    {
-                        this.state.userID === '' ?
-                            <Link to="/login">
-                                <Button className='login-button' type='primary'
-                                        onClick={() => this.switchMenuLevel('menuLevel1', 'user')}>
-                                    <FormattedMessage id="Login"/></Button>
-                            </Link>
-                            :
-                            <User
-                                userID={this.state.userID}
-                                languageButton={this.state.languageButton}
-                                changeLocale={this.changeLocale}
-                                switchMenuLevel={this.switchMenuLevel}
-                                history={this.props.history}
-                            />
-                    }
-
-                </Header>
-
-
-                {(() => {
-                    switch (this.state.menuLevel1) {
-                        case 'graphql-service':
-                            return (
-                                <Sider
-                                    width={200}
-                                    style={{background: '#fff', marginTop: '64px', zIndex: '0'}}
-                                    collapsible
-                                    collapsed={this.state.collapsed}
-                                    onCollapse={this.onCollapse}
-                                >
-                                    <GraphqlSidebar inlineCollapsed={this.state.inlineCollapsed}
-                                                    sideBar={this.state.sideBar} switchMenu={this.switchMenu}
-                                                    showModal={this.showModal}/>
-
-                                </Sider>
-                            );
-                        case 'wechat-service':
-                            return (
-                                <Sider
-                                    width={200}
-                                    style={{background: '#fff', marginTop: '64px', zIndex: '0'}}
-                                    collapsible
-                                    collapsed={this.state.collapsed}
-                                    onCollapse={this.onCollapse}
-                                >
-                                    <WxConfigSiderbar inlineCollapsed={this.state.inlineCollapsed}
-                                                      sideBar={this.state.sideBar} switchMenu={this.switchMenu}
-                                                      wxShowModal={this.wxShowModal}/>
-                                </Sider>
-                            );
-                        case 'quant-service':
-                            return (
-                                <Sider
-                                    width={200}
-                                    style={{background: '#fff', marginTop: '64px', zIndex: '0'}}
-                                    collapsible
-                                    collapsed={this.state.collapsed}
-                                    onCollapse={this.onCollapse}
-                                >
-                                    <Menu
-                                        theme="dark"
-                                        mode="inline"
-                                        inlineCollapsed={this.state.inlineCollapsed}
-                                        defaultSelectedKeys={['quant-service']}
-                                        defaultOpenKeys={['trial-case']}
-                                        // openKeys={['cloud-function']}
-                                        onClick={(e) => this.switchMenu('sideBar', e)}
-                                        selectedKeys={['quant-service']}
-                                        style={{
-                                            borderRight: 0,
-                                            overflow: 'auto',
-                                            height: '100vh',
-                                            left: '0',
-                                            width: '200px',
-                                            position: 'fixed'
-                                        }}
-                                    >
-                                        <SubMenu key="trial-case"
-                                                 title={<span><Icon type="appstore" theme="twoTone"/>
-                                                         <span><FormattedMessage id="Case Show"/></span></span>}>
-                                            <Menu.Item key="quant-service">
-                                                <Link to="/developer/quant-service/trial-case/quant case">quant case</Link>
-                                            </Menu.Item>
-                                        </SubMenu>
-
-                                        <Menu.Item key="instructions">
-                                            <a href="https://ioobot-document.netlify.com/" title="instructions"
-                                               target="instructions">
-                                                <Icon type="file-text" theme="twoTone"/>
-                                                <span><FormattedMessage id="Instructions"/></span>
-                                            </a>
-                                        </Menu.Item>
-                                    </Menu>
-                                </Sider>
-                            );
-                        default:
-                            return (
-                                <Sider
-                                    width={200}
-                                    style={{background: '#fff', marginTop: '64px', zIndex: '0'}}
-                                    collapsible
-                                    collapsed={this.state.collapsed}
-                                    onCollapse={this.onCollapse}
-                                >
-                                    <GraphqlSidebar inlineCollapsed={this.state.inlineCollapsed}
-                                                    sideBar={this.state.sideBar} switchMenu={this.switchMenu}
-                                                    showModal={this.showModal}/>
-                                </Sider>
-                            );
-                    }
-                })()}
-                <Create visible={visible} hideModal={this.hideModal} switchSidebar={this.switchSidebar}/>
-                <WxCreate visible={wxVisible} hideModal={this.wxHideModal} switchSidebar={this.switchSidebar}/>
-
-                <LocaleProvider locale={locale}>
-                    <Layout style={{marginTop: '64px', zIndex: '0'}}
-                            key={locale ? locale.locale : 'en'/* Have to refresh for production environment */}>
-                        <Switch>
-                            <Route path="/developer" exact component={TrialCase}/>
-                            <Route path="/developer/graphql-service/trial-case/:case" component={TrialCase}/>
-                            <Route path="/developer/graphql-service/my-create/:case" component={UserCreate}/>
-                            <Route path="/developer/wechat-service/trial-case/:case" component={WxTrialCase}/>
-                            <Route path="/developer/wechat-service/my-create/:case" component={WxUserCreate}/>
-                            <Route path="/developer/quant-service/:sidebar/:case" component={QuantService}/>
-                            <Route path="/developer/login/:setting" component={Login}/>
-                            <Route path="/developer/login" component={Login}/>
-                            <Route path="/developer/ticket" component={Ticket}/>
-                            <Route path="/developer/graphiql" component={Graphiql}/>
-                            <Redirect path="*" to="/"/>
-                        </Switch>
-                    </Layout>
-                </LocaleProvider>
-            </Layout>
-        );
-    }
-}
-
-export default DevelopVersion;
-
-class GraphqlSidebar extends Component {
-    constructor(props) {
-        super(props);
-        this.state = {
-            userID: getCookie('user_id'),
-        }
-    }
-
-    render() {
-        return (
-            <Query query={gql(CASE_AND_PROJECT)} variables={{projectType: 'graphql', user_id: this.state.userID}}>
-                {
-                    ({loading, error, data}) => {
-                        if (loading) return (
-                            <Menu
-                                theme="dark"
-                                mode="inline"
-                                style={{
-                                    borderRight: 0,
-                                    overflow: 'auto',
-                                    height: '100vh',
-                                    left: '0',
-                                    width: '200px',
-                                    position: 'fixed'
-                                }}
-                            >
-                                <Menu.Item >
-                                    <Icon type="loading" />
-                                    <span><FormattedMessage id="loading"/></span>
-                                </Menu.Item>
-                            </Menu>
-                        );
-                        if (error) return 'error!';
-                        // console.log('CASE_AND_PROJECT data', data);
-                        data.caseProject.forEach((project) => {
-                            switch (project.schema_id.schemaName) {
-                                case 'ecommerce' :
-                                    localStorage.setItem('ecommerce', project.schema_id.schemaData);
-                                    break;
-                                case 'order':
-                                    localStorage.setItem('order', project.schema_id.schemaData);
-                                    break;
-                                case 'bills':
-                                    localStorage.setItem('bills', project.schema_id.schemaData);
-                                    break;
-                                default:
-                                    break;
-                            }
-                        });
-                        return (
-                            <Menu
-                                theme="dark"
-                                mode="inline"
-                                inlineCollapsed={this.props.inlineCollapsed}
-                                defaultSelectedKeys={['ecommerce']}
-                                defaultOpenKeys={['trial-case', 'my-create']}
-                                // openKeys={['trial-case', 'my-create']}
-                                onClick={(e) => this.props.switchMenu('sideBar', e)}
-                                selectedKeys={[this.props.sideBar]}
-                                style={{
-                                    borderRight: 0,
-                                    overflow: 'auto',
-                                    height: '100vh',
-                                    left: '0',
-                                    width: '200px',
-                                    position: 'fixed'
-                                }}
-                            >
-                                <SubMenu
-                                    key="trial-case"
-                                    title={<span><Icon type="appstore" theme="twoTone"/><span><FormattedMessage
-                                        id="Case Show"/></span></span>}>
-                                    {
-                                        data.caseProject.map((project) =>
-                                            <Menu.Item key={project.projectName}>
-                                                <Link to={{
-                                                    pathname: `/developer/graphql-service/trial-case/${project.projectName}`,
-                                                    state: {
-                                                        schemaName: project.projectName,
-                                                        schemaID: project.schema_id.id,
-                                                        projectID: project.id
-                                                    }
-                                                }}><FormattedMessage id={project.projectName}/></Link>
-                                            </Menu.Item>)
-                                    }
-                                </SubMenu>
-
-                                <Menu.Item key="create-graphql" onClick={this.props.showModal}>
-                                    <Icon type="edit" theme="twoTone"/>
-                                    <span><FormattedMessage id="Create"/></span>
-                                    <Icon type="plus" style={{
-                                        position: 'absolute',
-                                        top: '35%',
-                                        right: '6px',
-                                        color: 'white'
-                                    }}/>
-                                </Menu.Item>
-
-                                <SubMenu
-                                    key="my-create"
-                                    title={<span><Icon type="user" theme="outlined"/><span><FormattedMessage
-                                        id="My Create"/></span></span>}>
-                                    {
-                                        data.project.map((project) =>
-                                            <Menu.Item key={project.projectName}>
-                                                <Link to={{
-                                                    pathname: `/developer/graphql-service/my-create/${project.projectName}`,
-                                                    state: {
-                                                        schemaName: project.projectName,
-                                                        schemaID: project.schema_id.id,
-                                                        projectID: project.id
-                                                    }
-                                                }}>{project.projectName}</Link>
-                                            </Menu.Item>)
-                                    }
-                                </SubMenu>
-
-                                <Menu.Item key="instructions">
-                                    <a href="https://ioobot-document.netlify.com/" title="instructions" target="_blank"
-                                       rel="noopener noreferrer">
-                                        <Icon type="file-text" theme="twoTone"/>
-                                        <span><FormattedMessage id="Instructions"/></span>
-                                    </a>
-                                </Menu.Item>
-
-                            </Menu>
-                        )
-                    }
-                }
-            </Query>
-        )
-    }
-}
-
-class WxConfigSiderbar extends Component {
-    constructor(props) {
-        super(props);
-        this.state = {
-            userID: getCookie('user_id'),
-        }
-    }
-
-    render() {
-        return (
-            <Query query={gql(CASE_AND_PROJECT)} variables={{projectType: 'wx', user_id: this.state.userID}}>
-                {
-                    ({loading, error, data}) => {
-                        // console.log('CASE_WXCONFIG_AND_PROJECT data', data);
-                        if (loading) return (
-                            <Menu
-                                theme="dark"
-                                mode="inline"
-                                style={{
-                                    borderRight: 0,
-                                    overflow: 'auto',
-                                    height: '100vh',
-                                    left: '0',
-                                    width: '200px',
-                                    position: 'fixed'
-                                }}
-                            >
-                                <Menu.Item >
-                                    <Icon type="loading" />
-                                    <span><FormattedMessage id="loading"/></span>
-                                </Menu.Item>
-                            </Menu>
-                        );
-                        if (error) return 'error!';
-                        return (
-                            <Menu
-                                theme="dark"
-                                mode="inline"
-                                inlineCollapsed={this.props.inlineCollapsed}
-                                // defaultSelectedKeys={['my-wechat']}
-                                defaultOpenKeys={['trial-case', 'my-create']}
-                                // openKeys={['trial-case', 'my-create']}
-                                onClick={(e) => this.props.switchMenu('sideBar', e)}
-                                selectedKeys={[this.props.sideBar]}
-                                style={{
-                                    borderRight: 0,
-                                    overflow: 'auto',
-                                    height: '100vh',
-                                    left: '0',
-                                    width: '200px',
-                                    position: 'fixed'
-                                }}
-                            >
-                                <SubMenu key="trial-case" title={<span><Icon type="appstore" theme="twoTone"/>
-                                    <span><FormattedMessage id="Case Show"/></span>
-                                </span>}>
-                                    {
-                                        data.caseProject.map((project) => {
-                                            if (project) {
-                                                let appName = project.projectName;
-                                                let configID = project.wxConfig_id.id;
-                                                let projectID = project.id;
-                                                return (
-                                                    <Menu.Item key={appName}>
-                                                        <Link to={{
-                                                            pathname: `/developer/wechat-service/trial-case/${appName}`,
-                                                            state: {
-                                                                appName,
-                                                                configID,
-                                                                projectID
-                                                            }
-                                                        }}><FormattedMessage id={appName}/></Link>
-                                                    </Menu.Item>
-                                                )
-                                            }
-                                            return false;
-                                        })
-                                    }
-                                </SubMenu>
-
-                                <Menu.Item key="create-config" onClick={this.props.wxShowModal}>
-                                    <Icon type="edit" theme="twoTone"/>
-                                    <span><FormattedMessage id="Create"/></span>
-                                    <Icon type="plus" style={{
-                                        position: 'absolute',
-                                        top: '35%',
-                                        right: '6px',
-                                        color: 'white'
-                                    }}/>
-                                </Menu.Item>
-
-                                <SubMenu key="my-create" title={<span><Icon type="user" theme="outlined"/>
-                                    <span><FormattedMessage id="My Create"/></span>
-                                </span>}>
-                                    {
-                                        data.project.map((project) => {
-                                            if (project) {
-                                                let appName = project.projectName;
-                                                let configID = project.wxConfig_id.id;
-                                                let projectID = project.id;
-                                                return (
-                                                    <Menu.Item key={appName}>
-                                                        <Link to={{
-                                                            pathname: `/developer/wechat-service/my-create/${appName}`,
-                                                            state: {
-                                                                appName,
-                                                                configID,
-                                                                projectID
-                                                            }
-                                                        }}>{appName}</Link>
-                                                    </Menu.Item>
-                                                )
-                                            }
-                                            return false;
-                                        })
-                                    }
-                                </SubMenu>
-
-                                <Menu.Item key="instructions">
-                                    <a href="https://ioobot-document.netlify.com/" title="instructions" target="_blank"
-                                       rel="noopener noreferrer">
-                                        <Icon type="file-text" theme="twoTone"/>
-                                        <span><FormattedMessage id="Instructions"/></span>
-                                    </a>
-                                </Menu.Item>
-
-                            </Menu>
-
-                        )
-                    }
-                }
-            </Query>
-        )
-    }
-}
-
-class User extends Component {
-    constructor(props) {
-        super(props);
-        this.state = {
-            show: false
-        }
-    }
-
-    logout = () => {
-
-        axios.get(logoutUrl)
-            .then((res) => {
-               console.log('logout success',res);
-                setCookie("user_id", '');
-            })
-            .catch((err) => {
-        });
-    };
-
-    render() {
-        return (
-            <Query query={gql(GET_USER)} variables={{id: this.props.userID}}>
-                {
-                    ({loading, error, data}) => {
-                        if (loading) {
-                            return <Spin className='login-nickname'/>
-                        }
-                        if (error) {
-                            return 'error!';
-                        }
-                        let user = data.user_by_id;
-                        if (user !== null) {
-                            const menu = (
-                                <Menu className={'user-detail'}>
-                                    <Menu.Item className={'user-info'}>
-                                        <p className={'user-info-nickname'}>{user.nickname}</p>
-                                        <p className={'user-info-email'}>{user.email}</p>
-                                    </Menu.Item>
-                                    <Menu.Item>
-                                        <a href='https://www.ioobot.com' onClick={(e) => {
-                                            e.preventDefault();
-                                            this.props.changeLocale(e)
-                                        }}>{this.props.languageButton}</a>
-                                    </Menu.Item>
-                                    <Menu.Item>
-                                        <Link to="/login">
-                                            <div>
-                                                <FormattedMessage id="Account center"/>
-                                            </div>
-                                        </Link>
-                                    </Menu.Item>
-                                    <Menu.Item>
-                                        <Link to="/common/communication">
-                                            <div>
-                                                <FormattedMessage id="Submit Support Ticket"/>
-                                            </div>
-                                        </Link>
-                                    </Menu.Item>
-                                    <Menu.Item className={'login-out'}>
-                                        <a href='https://www.ioobot.com' onClick={(e) => {
-                                            e.preventDefault();
-                                            this.logout();
-                                            this.props.history.push({
-                                                pathname: '/'
-                                            })
-                                        }}><FormattedMessage id="exit"/></a>
-                                    </Menu.Item>
-                                </Menu>
-                            );
-                            return (
-                                <div className='login-nickname' onClick={()=>{}}>
-                                    <Dropdown overlay={menu} placement="bottomRight" trigger={['click']}>
-                                        <div>
-                                            <span style={{ marginRight: 5 }}>
-                                                <Badge dot><Avatar shape="user" icon="user" /></Badge>
-                                            </span>
-                                            {/*<Icon type="down" />*/}
-                                        </div>
-                                    </Dropdown>
-                                </div>
-                            )
-                        }
-                    }
-                }
-            </Query>
-        )
-    }
-}

+ 0 - 52
src/app/developVersion/common/Graphiql.jsx

@@ -1,52 +0,0 @@
-import React, {Component} from 'react';
-import {Input, Spin} from 'antd';
-import GraphiQL from "graphiql";
-import fetch from "isomorphic-fetch";
-
-const Search = Input.Search;
-
-class Graphiql extends Component {
-    constructor(props) {
-        super(props);
-        this.state = {
-            api: 'http://123.206.193.98:3123/graphql',
-        };
-    };
-
-    shouldComponentUpdate(nextProps,nextState){
-        if(nextState.api !== this.state.api){
-            return true;
-        }
-        return false;
-    }
-
-    graphQLFetcher = (graphQLParams) => {
-        // console.log('graphQLParams',graphQLParams);
-        // 已经存在的 magazine api, 设想: 用户生成 schema,返回 api 自动替换这里
-        return fetch(this.state.api, {
-            method: 'post',
-            headers: {'Content-Type': 'application/json'},
-            body: JSON.stringify(graphQLParams),
-        }).then(response => response.json());
-    };
-
-    render() {
-        return (
-            <div>
-                <Search
-                    style={{marginTop: 10}}
-                    placeholder="input api url"
-                    defaultValue={this.state.api}
-                    enterButton="POST"
-                    onSearch={value => {
-                        // console.log(value);
-                        this.setState({api: value});
-                    }}
-                />
-                <GraphiQL fetcher={this.graphQLFetcher.bind(this)}/>
-            </div>
-        )
-    }
-}
-
-export default Graphiql;

+ 0 - 64
src/app/developVersion/common/deploy/Deploy.jsx

@@ -1,64 +0,0 @@
-import React, {Component} from 'react';
-import {FormattedMessage} from 'react-intl';
-import {Card} from 'antd';
-
-import TencentConfig from './tencent/TencentConfig';
-import AliConfig from './ali/AliConfig';
-import AmazonConfig from './amazon/AmazonConfig';
-
-import './index.css';
-
-const tabListNoTitle =
-[{
-    key: 'tencent',
-    tab: <FormattedMessage id='Tencent'/>,
-}, {
-    key: 'aliyun',
-    tab: <FormattedMessage id='Aliyun'/>,
-}, {
-    key: 'amazon',
-    tab: <FormattedMessage id='AWS'/>,
-}];
-
-
-class Deploy extends Component {
-    constructor(props) {
-        super(props);
-        this.state = {
-            cloud: 'tencent'
-        };
-    }
-
-    componentWillReceiveProps(next) {
-        this.setState({
-            projectID: next.projectID
-        })
-    }
-
-    render() {
-        const contentListNoTitle = {
-            tencent: <TencentConfig userID={this.props.userID} projectID={this.props.projectID} trialcase={this.props.trialcase} kind={this.props.kind}/>,
-            aliyun: <AliConfig/>,
-            amazon: <AmazonConfig/>,
-        };
-
-        return (
-            <div>
-                <Card
-                    style={{width: '100%'}}
-                    tabList={tabListNoTitle}
-                    activeTabKey={this.state.cloud}
-                    onTabChange={(cloud) => {
-                        this.setState({
-                            cloud
-                        })
-                    }}
-                >
-                    {contentListNoTitle[this.state.cloud]}
-                </Card>
-            </div>
-        )
-    }
-}
-
-export default Deploy;

+ 0 - 22
src/app/developVersion/common/deploy/ali/AliConfig.jsx

@@ -1,22 +0,0 @@
-import React, {Component} from 'react';
-import {FormattedMessage} from 'react-intl';
-
-class AliConfig extends Component {
-    constructor(props) {
-        super(props);
-        this.state = {
-        };
-    }
-
-
-
-    render() {
-        return (
-            <div>
-                <p><b><FormattedMessage id="It is under development, please look forward to it. Thank you for your attention"/></b></p>
-            </div>
-        )
-    }
-}
-
-export default AliConfig;

+ 0 - 22
src/app/developVersion/common/deploy/amazon/AmazonConfig.js

@@ -1,22 +0,0 @@
-import React, {Component} from 'react';
-import {FormattedMessage} from 'react-intl';
-
-class AmazonConfig extends Component {
-    constructor(props) {
-        super(props);
-        this.state = {
-        };
-    }
-
-
-
-    render() {
-        return (
-            <div>
-                <p><b><FormattedMessage id="It is under development, please look forward to it. Thank you for your attention"/></b></p>
-            </div>
-        )
-    }
-}
-
-export default AmazonConfig;

+ 0 - 22
src/app/developVersion/common/deploy/huawei/HuaweiConfig.jsx

@@ -1,22 +0,0 @@
-import React, {Component} from 'react';
-import {FormattedMessage} from 'react-intl';
-
-class HuaweiConfig extends Component {
-    constructor(props) {
-        super(props);
-        this.state = {
-        };
-    }
-
-
-
-    render() {
-        return (
-            <div>
-                <p><b><FormattedMessage id="It is under development, please look forward to it. Thank you for your attention"/></b></p>
-            </div>
-        )
-    }
-}
-
-export default HuaweiConfig;

+ 0 - 69
src/app/developVersion/common/deploy/index.css

@@ -1,69 +0,0 @@
-.current {
-    background-color: #0F83E8;
-    color: white;
-    text-align: center;
-    height: 50px;
-    line-height: 50px;
-    margin-top: 3px;
-}
-
-.title {
-    font-weight: bold;
-    font-size: 16px;
-    margin: 10px 0 0 5px;
-}
-
-p.show {
-    margin: 5px 0 3px 10px;
-    cursor: pointer;
-}
-
-.table-title {
-    font-weight: bold;
-    font-size: large;
-    display: block;
-    height: 35px;
-}
-
-.table-title::before {
-    content: '|';
-    display: inline-block;
-    font-weight: 900;
-    color: #0B7FC7;
-    /*border-right: */
-}
-
-.vice-title {
-    width: 150px;
-    display: inline-block;
-    font-size: 14px;
-}
-
-.cloud-name {
-    font-weight: bold;
-    font-size: medium;
-    display: block;
-    height: 35px;
-}
-
-.deploy {
-    width: 50px;
-    height: 30px;
-    background-color: green;
-    color: #ffffff;
-    font-weight: bold;
-    padding-top: 500px;
-}
-
-.kind {
-
-}
-
-.item {
-
-}
-
-.item-title {
-    display: inline-block;
-    width: 180px;
-}

+ 0 - 490
src/app/developVersion/common/deploy/tencent/TencentConfig.js

@@ -1,490 +0,0 @@
-import React, {Component} from 'react';
-import {Row, Col, Card, Button, Spin, Alert, Steps, Progress} from 'antd';
-import axios from 'axios';
-import APIGroupCardFetch from './apiGroupCard/APIGroupCardFetch';
-import APIPathCardFetch from './apiPathCard/APIPathCardFetch';
-import DeployCardFetch from './deployCard/DeployCardFetch';
-import NotificationCardFetch from './notificationCard/NotificationCardFetch';
-
-import {GET_PROJECT, SHOW_APIGWPATH, UPDATE_PROJECT_ONLY_STATUS} from "../../../../../gql";
-import {deployUrl, graphqlUrl} from "../../../../../config";
-import {FormattedMessage} from 'react-intl';
-import {request} from 'graphql-request'
-
-const Step = Steps.Step;
-
-class TencentConfig extends Component {
-    constructor(props) {
-        super(props);
-        this.state = {
-            region: '',
-            couldDeploy: false,
-            deployIdPassToPath: '',
-            groupIdPassToPath: '',
-            pathIdPassToConfig: '',
-            reachStep: '',
-            currentStep: '',
-            stepAllShow: false,
-            deploying: '',
-            stepUpdated: false,
-        };
-    }
-
-    componentWillMount() {
-        let projectID = this.props.projectID ? this.props.projectID : this.props.kind === 'graphql' ? 'ecommerce_projectID' : 'ecommerce_projectID_wx';
-
-        request(graphqlUrl, GET_PROJECT, {id: projectID}).then(
-            data => {
-                let dataProject = data.project_by_id;
-                if (dataProject !== null) {
-                    this.setState({
-                        schemaState: dataProject.schema_id ? dataProject.schema_id.schemaState : '',
-                        projectType: dataProject.projectType
-                    });
-                    switch (dataProject.projectStatus) {
-                        case 'deployed':
-                            this.setState({
-                                currentStep: 5,
-                                reachStep: 5,
-                                stepAllShow: true,
-                                deploying: 'deployed'
-                            });
-                            break;
-                        case 'notificationed':
-                            this.setState({
-                                currentStep: 4,
-                                reachStep: 4,
-                            });
-                            break;
-                        case 'pathed':
-                            this.setState({
-                                currentStep: 3,
-                                reachStep: 3,
-                            });
-                            break;
-                        case 'grouped':
-                            this.setState({
-                                currentStep: 2,
-                                reachStep: 2
-                            });
-                            break;
-                        case 'functioned':
-                            this.setState({
-                                currentStep: 1,
-                                reachStep: 1
-                            });
-                            break;
-                        case 'created':
-                            this.setState({
-                                currentStep: 0,
-                                reachStep: 0
-                            });
-                            break;
-                        case 'updated':
-                            this.setState({
-                                stepUpdated: true,
-                                stepAllShow: true,
-                                deploying: 'updated'
-                            });
-                            break;
-                        case 'deploying':
-                            this.setState({
-                                deploying: 'deploying'
-                            });
-                            break;
-                        default:
-                            this.setState({
-                                currentStep: 0,
-                                reachStep: 0
-                            });
-                            break;
-                    }
-                } else {
-                    console.log('project 没存 status');
-                }
-            }
-        )
-    }
-
-    componentWillReceiveProps(next) {
-        this.setState({
-            couldDeploy: false,
-            region: '',
-            deployIdPassToPath: '',
-            groupIdPassToPath: '',
-            currentStep: '',
-            deploying: '',
-            stepAllShow: false,
-            stepUpdated: false
-        });
-
-        let projectID = next.projectID ? next.projectID : 'ecommerce_projectID';
-
-        request(graphqlUrl, GET_PROJECT, {id: projectID}).then(
-            data => {
-                let dataProject = data.project_by_id;
-                if (dataProject !== null) {
-                    this.setState({
-                        schemaState: dataProject.schema_id ? dataProject.schema_id.schemaState : '',
-                        projectType: dataProject.projectType
-                    });
-                    switch (dataProject.projectStatus) {
-                        case 'deployed':
-                            this.setState({
-                                deploying: 'deployed',
-                                currentStep: 5,
-                                reachStep: 5,
-                                stepAllShow: true
-                            });
-                            break;
-                        case 'notificationed':
-                            this.setState({
-                                currentStep: 4,
-                                reachStep: 4
-                            });
-                            break;
-                        case 'pathed':
-                            this.setState({
-                                currentStep: 3,
-                                reachStep: 3
-                            });
-                            break;
-                        case 'grouped':
-                            this.setState({
-                                currentStep: 2,
-                                reachStep: 2
-                            });
-                            break;
-                        case 'functioned':
-                            this.setState({
-                                currentStep: 1,
-                                reachStep: 1
-                            });
-                            break;
-                        case 'created':
-                            this.setState({
-                                currentStep: 0,
-                                reachStep: 0
-                            });
-                            break;
-                        case 'updated':
-                            this.setState({
-                                stepUpdated: true,
-                                stepAllShow: true,
-                                deploying: 'updated'
-                            });
-                            break;
-                        case 'deploying':
-                            this.setState({
-                                deploying: 'deploying'
-                            });
-                            break;
-                        default:
-                            this.setState({
-                                currentStep: 0,
-                                reachStep: 0
-                            });
-                            break;
-                    }
-                } else {
-                    console.log('project 没存 status');
-                }
-            }
-        )
-    }
-
-
-    switchRegion = (e) => {
-        this.setState({
-            region: e.target.value
-        });
-    };
-
-    deployFC = () => {
-        request(graphqlUrl, GET_PROJECT, {id: this.props.projectID}).then(
-            data => {
-                let dataProject = data.project_by_id;
-                if (dataProject !== null) {
-                    let schema = dataProject.schema_id.id;
-                    let deploy = dataProject.deploy_id.id;
-                    let group = dataProject.apiGWGroup_id.id;
-                    request(graphqlUrl, SHOW_APIGWPATH, {apiGWGroup_id: group}).then(
-                        data => {
-                            if (data.apiGWPath_by_props !== null) {
-
-                                // 给 project 加 deploying 状态
-                                request(graphqlUrl, UPDATE_PROJECT_ONLY_STATUS, {
-                                    id: this.props.projectID,
-                                    updatedAt: new Date().getTime(),
-                                    projectStatus: 'deploying'
-                                });
-
-                                // console.log(data);
-                                let api = data.apiGWPath_by_props[0].id;
-                                console.log('schema', schema);
-                                console.log('deploy', deploy);
-                                console.log('api', api);
-                                console.log('group', group);
-                                if (schema && deploy && api && group) {
-                                    console.log('deploying');
-                                    this.setState({
-                                        deploying: 'deploying'
-                                    });
-                                    axios.get(`${deployUrl}`,
-                                        {
-                                            params: {
-                                                'cloud-id': 'tencent_CloudID',
-                                                'cloud-name': 'tencent',
-                                                schema,
-                                                deploy,
-                                                api,
-                                                group
-                                            }
-                                        })
-                                        .then((res) => {
-                                            console.log('deploy res', res);
-                                            this.setState({
-                                                deploying: 'deployed'
-                                            });
-
-                                            // 给 project 加 deployed 状态
-                                            request(graphqlUrl, UPDATE_PROJECT_ONLY_STATUS, {
-                                                id: this.props.projectID,
-                                                updatedAt: new Date().getTime(),
-                                                projectStatus: 'deployed'
-                                            })
-
-                                        })
-                                        .catch((err) => {
-                                            this.setState({
-                                                deploying: 'error'
-                                            });
-
-                                            // 给 project 加 error 状态
-                                            request(graphqlUrl, UPDATE_PROJECT_ONLY_STATUS, {
-                                                id: this.props.projectID,
-                                                updatedAt: new Date().getTime(),
-                                                projectStatus: 'error'
-                                            });
-                                            console.log('err', err);
-                                            console.log('err.response', err.response);
-                                            console.log('err.response.data', err.response.data);
-                                        });
-                                }
-                            } else {
-                                console.log('path 没存');
-                            }
-                        }
-                    );
-                } else {
-                    console.log('project 没存 status');
-                }
-            }
-        );
-    };
-
-    stepByStep = (bool) => {
-        return (stepNum) => {
-            this.setState({
-                currentStep: stepNum,
-                reachStep: bool ? stepNum : this.state.reachStep
-            })
-        };
-    };
-
-    stepStatus = (value) => {
-        if (this.state.reachStep === value)
-            return '进行中';
-        else if (this.state.reachStep > value)
-            return '完成';
-        else
-            return '等待';
-    };
-
-    render() {
-        let projectID = this.props.projectID ? this.props.projectID : 'ecommerce_projectID';
-        return (
-            <div>
-                {
-                    this.state.projectType === 'graphql' ?
-                        this.state.schemaState === 'ok' ?
-                            ''
-                            :
-                            this.props.trialcase ?
-                                ''
-                                :
-                                <div style={{marginBottom: 10}}>
-                                    <Alert message="数据表结构不符合规范,暂不能部署,请修改" type="warning"
-                                           banner closable/>
-                                </div>
-                        :
-                        ''
-                }
-                <div style={{padding: '30px'}}>
-                    <Row gutter={16}>
-                        <Col span={14}>
-
-                            {
-                                this.state.currentStep !== '' || this.state.deploying === 'deploying' || this.state.deploying === 'deployed' ?
-                                    <Steps current={this.state.deploying !== 'deploying' ? this.state.currentStep : 4}
-                                           style={{marginBottom: 30}}>
-                                        <Step onClick={() => {
-                                            this.stepByStep(false)(0)
-                                        }} title={this.stepStatus(0)} description="云函数配置"/>
-                                        <Step onClick={() => {
-                                            if (this.state.reachStep > 0)
-                                                this.stepByStep(false)(1);
-                                        }} title={this.stepStatus(1)} description="服务配置"/>
-                                        <Step onClick={() => {
-                                            if (this.state.reachStep > 1)
-                                                this.stepByStep(false)(2)
-                                        }} title={this.stepStatus(2)} description="API 配置"/>
-                                        <Step onClick={() => {
-                                            if (this.state.reachStep > 2)
-                                                this.stepByStep(false)(3)
-                                        }} title={this.stepStatus(3)} description="通知配置"/>
-                                    </Steps>
-                                    :
-                                    ''
-                            }
-
-                            {
-                                this.state.currentStep === 0 || this.state.stepAllShow ?
-                                    <FormattedMessage id="fc Deploy">
-                                        {
-                                            msg =>
-                                                <Card title={msg} style={{marginBottom: 10}}>
-                                                    <DeployCardFetch
-                                                        switchRegion={this.switchRegion}
-                                                        region={this.state.region}
-                                                        trialcase={this.props.trialcase}
-                                                        stepByStep={this.stepByStep(true)}
-                                                        projectID={projectID}
-                                                    />
-                                                </Card>
-                                        }
-                                    </FormattedMessage>
-                                    :
-                                    ''
-                            }
-
-                            {
-                                this.state.currentStep === 1 || this.state.stepAllShow ?
-                                    <FormattedMessage id="API Group">
-                                        {
-                                            msg =>
-                                                <Card title={msg} style={{marginBottom: 10}}>
-                                                    <APIGroupCardFetch
-                                                        switchRegion={this.switchRegion}
-                                                        region={this.state.region}
-                                                        trialcase={this.props.trialcase}
-                                                        stepByStep={this.stepByStep(true)}
-                                                        userID={this.props.userID}
-                                                        projectID={projectID}
-                                                        stepAllShow={this.state.stepAllShow}
-                                                    />
-                                                </Card>
-                                        }
-                                    </FormattedMessage>
-                                    :
-                                    ''
-                            }
-                            {
-                                this.state.currentStep === 2 || this.state.stepAllShow ?
-                                    <FormattedMessage id="API Path">
-                                        {
-                                            msg =>
-                                                <Card title={msg} style={{marginBottom: 10}}>
-                                                    <APIPathCardFetch
-                                                        trialcase={this.props.trialcase}
-                                                        stepByStep={this.stepByStep(true)}
-                                                        userID={this.props.userID}
-                                                        projectID={projectID}
-                                                        stepAllShow={this.state.stepAllShow}
-                                                    />
-                                                </Card>
-                                        }
-                                    </FormattedMessage>
-                                    :
-                                    ''
-                            }
-
-                            {
-                                this.state.currentStep === 3 || this.state.stepAllShow ?
-                                    <FormattedMessage id="Notification">
-                                        {
-                                            msg =>
-                                                <Card title={msg}>
-                                                    <NotificationCardFetch
-                                                        userID={this.props.userID}
-                                                        trialcase={this.props.trialcase}
-                                                        stepByStep={this.stepByStep(true)}
-                                                        projectID={projectID}
-                                                        stepAllShow={this.state.stepAllShow}
-                                                    />
-                                                </Card>
-                                        }
-                                    </FormattedMessage>
-                                    :
-                                    ''
-                            }
-
-                        </Col>
-                        <Col span={8} offset={2}>
-                            {
-                                this.state.currentStep === 4 || this.state.stepAllShow ?
-                                    this.props.trialcase ?
-                                        ''
-                                        :
-                                        this.state.projectType === 'graphql' ?
-
-                                            this.state.schemaState === 'ok' ?
-
-                                                this.state.deploying === '' ?
-                                                    <Button type='primary' onClick={this.deployFC}><FormattedMessage
-                                                        id="deploy"/>!</Button>
-                                                    :
-                                                    ''
-                                                :
-                                                <Button type='primary'
-                                                        disabled><FormattedMessage
-                                                    id="deploy"/>!</Button>
-                                            :
-                                            <Button type='primary' onClick={() => {
-                                            }}><FormattedMessage id="deploy"/>!</Button>
-                                    :
-                                    ''
-                            }
-
-                            {
-                                this.props.trialcase ?
-                                    <Progress type="circle" percent={100}/>
-                                    :
-                                    this.state.deploying === 'deploying' ?
-                                        <div>
-                                            <Spin size="large"/>
-                                            &nbsp;&nbsp;
-                                            <span><b>大约需要等待 30s</b></span>
-                                        </div>
-                                        :
-                                        this.state.deploying === 'deployed' ?
-                                            <Progress type="circle" percent={100}/>
-                                            :
-                                            this.state.deploying === 'error' ?
-                                                <Progress type="circle" percent={99} status="exception"/>
-                                                :
-                                                this.state.deploying === 'updated' ?
-                                                    <Button type='primary' onClick={this.deployFC}><FormattedMessage
-                                                        id="redeploy"/>!</Button>
-                                                    :
-                                                    ''
-                            }
-                        </Col>
-                    </Row>
-                </div>
-            </div>
-        );
-    }
-}
-
-export default TencentConfig;

+ 0 - 70
src/app/developVersion/common/deploy/tencent/apiGroupCard/APIGroupCardFetch.js

@@ -1,70 +0,0 @@
-import React, {Component} from 'react';
-import {Spin} from 'antd';
-import {GET_PROJECT} from "../../../../../../gql";
-import {Query} from "react-apollo";
-import gql from "graphql-tag";
-import APIGroupCardRender from "./APIGroupCardRender";
-import {removeSpace} from "../../../../../../func";
-
-class APIGroupCardFetch extends Component {
-    constructor(props) {
-        super(props);
-        this.state = {
-
-        }
-    }
-
-    render() {
-        return (
-            <Query query={gql(GET_PROJECT)} variables={{id: this.props.projectID}}>
-                {
-                    ({loading, error, data}) => {
-                        if (loading) {
-                            return <Spin style={{marginLeft: 3}}/>
-                        }
-                        if (error) {
-                            return 'error!';
-                        }
-
-                        let group = '',
-                            cloudID = 'tencent_CloudID';
-
-                        let dataProject = data.project_by_id;
-                        let {cloud_id, apiGWGroup_id, projectName, projectStatus} = dataProject;
-
-                        if (cloud_id !== null && cloud_id.cloudName === 'tencent') {
-                            group = apiGWGroup_id;
-                            cloudID = cloud_id.id;
-                        }
-
-                        return (
-                            <APIGroupCardRender
-                                // props
-                                switchRegion={this.props.switchRegion}
-                                region={this.props.region}
-                                trialcase={this.props.trialcase}
-                                stepByStep={this.props.stepByStep}
-                                userID={this.props.userID}
-                                projectID={this.props.projectID}
-                                stepAllShow={this.props.stepAllShow}
-
-                                // this
-                                switchConfig={this.switchConfig}
-                                ok={this.ok}
-
-                                // query
-                                defalutName={removeSpace(projectName)}
-                                group={group}
-                                cloudID={cloudID}
-                                projectStatus={projectStatus}
-                            />
-                        )
-                    }
-                }
-            </Query>
-
-        )
-    }
-}
-
-export default APIGroupCardFetch;

+ 0 - 396
src/app/developVersion/common/deploy/tencent/apiGroupCard/APIGroupCardRender.js

@@ -1,396 +0,0 @@
-import React, {Component} from 'react';
-import {Input, Collapse, Button, Radio, Icon, Tooltip} from 'antd';
-import {idGen} from "../../../../../../func";
-import {graphqlUrl, manageUsers} from "../../../../../../config";
-import {FormattedMessage} from 'react-intl';
-import {ADD_APIGROUP, UPDATE_APIGROUP, UPDATE_PROJECT_GROUP, UPDATE_PROJECT_ONLY_STATUS} from "../../../../../../gql";
-import {request} from 'graphql-request'
-import {removePrefix, shiftPrefix} from "../../../../../../func";
-
-const Panel = Collapse.Panel;
-
-// 如需改变显示,请在此处 value 处更改
-// 如需添加中文,请在此处 value 处添加
-// eg: 'xxxx': <F..  id='xxx'/>
-const valueToKey = {
-    'groupName': 'groupName',
-    'environmentName': 'environmentName',
-    'defaultDomain': 'defaultDomain',
-    'frontType': 'frontType',
-    'userDomain': 'userDomain',
-    'userStatus': 'userStatus',
-    'region': 'region',
-};
-
-const toolTipTitle = {
-    'groupName': 'its groupName',
-    'environmentName': 'its environmentName',
-    'defaultDomain': 'its defaultDomain',
-    'frontType': 'its frontType',
-    'userDomain': 'its userDomain',
-    'userStatus': 'its userStatus',
-    'region': 'its region',
-};
-
-const youMustFill = {
-    'groupName': true,
-    'environmentName': true,
-    'defaultDomain': true,
-    'frontType': true,
-    'userDomain': false,
-    'userStatus': true,
-    'region': true,
-};
-
-class APIGroupCardRender extends Component {
-    constructor(props) {
-        super(props);
-        if (props.group !== '' && props.group !== null) {
-            let {groupName, environmentName, defaultDomain, frontType, userDomain, userStatus, region} = props.group;
-            this.state = {
-                showOK: false,
-                groupName,
-                environmentName,
-                defaultDomain,
-                frontType,
-                userDomain,
-                userStatus,
-                groupRegion: region
-            }
-        } else {
-            this.state = {
-                showOK: false,
-                groupName: props.defalutName,
-                environmentName: 'test',
-                defaultDomain: '',
-                frontType: 'http&https',
-                userDomain: '',
-                userStatus: 'open',
-                groupRegion: props.region === '' ? 'ap-beijing' : props.region,
-            };
-        }
-    }
-
-    componentWillReceiveProps(next) {
-        if (next.group !== '' && next.group !== null) {
-            let {groupName, environmentName, defaultDomain, frontType, userDomain, userStatus, region} = next.group;
-            this.setState({
-                groupName,
-                environmentName,
-                defaultDomain,
-                frontType,
-                userDomain,
-                userStatus,
-                groupRegion: next.region === '' ? region : next.region
-            })
-        } else {
-            this.setState({
-                groupName: next.defalutName,
-                environmentName: 'test',
-                defaultDomain: '',
-                frontType: 'http&https',
-                userDomain: '',
-                userStatus: 'open',
-                groupRegion: next.region === '' ? 'ap-beijing' : next.region
-            });
-        }
-    };
-
-    switchConfig = (label) => {
-        return (e) => {
-            this.setState({
-                [label]: e.target.value
-            })
-        };
-    };
-
-    ok = (id, userID, projectID, cloudID, group, projectStatus) => {
-        let {userStatus, userDomain, groupName, groupRegion, frontType, environmentName} = this.state;
-        let region = shiftPrefix('ap-', groupRegion);
-        let varObj = {
-            id,
-            cloud_id: cloudID,
-            user_id: userID,
-            userStatus,
-            userDomain,
-            groupName,
-            frontType,
-            region,
-            environmentName,
-            defaultDomain: '',
-            status: '',
-            serviceId: '',
-            createdAt: new Date().getTime(),
-            updatedAt: ''
-        };
-        if (group === '' || group === null) {
-            request(graphqlUrl, ADD_APIGROUP, varObj).then(
-                data => {
-                    if (data.create_apiGWGroup !== null) {
-                        this.setState({
-                            showOK: true
-                        });
-                        // 写回 project
-                        request(graphqlUrl, UPDATE_PROJECT_GROUP, {
-                            id: projectID,
-                            updatedAt: new Date().getTime(),
-                            apiGWGroup_id: id,
-                            projectStatus: 'grouped'
-                        }).then(data => {
-                            if (data.update_project !== null)
-                                this.props.stepByStep(2);
-                        });
-                    }
-                    setTimeout(() => {
-                        this.setState({
-                            showOK: false
-                        })
-                    }, 1500)
-                }
-            )
-        } else {
-            let {userStatus, userDomain, groupName, groupRegion, frontType, environmentName} = this.state;
-            let region = shiftPrefix('ap-', groupRegion);
-            let varObj = {
-                id: group.id,
-                userStatus,
-                userDomain,
-                groupName,
-                frontType,
-                region,
-                environmentName,
-                updatedAt: new Date().getTime()
-            };
-            request(graphqlUrl, UPDATE_APIGROUP, varObj).then(
-                data => {
-                    if (data.update_apiGWGroup !== null) {
-                        this.setState({
-                            showOK: true
-                        });
-                        request(graphqlUrl, UPDATE_PROJECT_ONLY_STATUS, {
-                            id: projectID,
-                            updatedAt: new Date().getTime(),
-                            projectStatus: projectStatus === 'deployed' ? 'updated': 'grouped'
-                        }).then(data => {
-                            if(data.update_project !== null)
-                                this.props.stepByStep(2);
-                        })
-                    }
-                    setTimeout(() => {
-                        this.setState({
-                            showOK: false
-                        })
-                    }, 1500)
-                }
-            )
-        }
-    };
-
-    render() {
-        const customPanelStyle = {
-            background: '#f7f7f7',
-            borderRadius: 4,
-            marginBottom: 24,
-            border: 0,
-            overflow: 'hidden',
-        };
-
-        return (
-            <div>
-                <div style={{marginBottom: 10}}>
-                    <span className='vice-title'>
-                        {
-                            youMustFill['groupName'] ?
-                                <span
-                                    style={{color: 'red', display: 'inline', marginRight: 10}}>*</span>
-                                :
-                                ''
-                        }
-                        <FormattedMessage id={valueToKey['groupName']}/>
-                        &nbsp;
-                        <Tooltip placement="top" title={toolTipTitle['groupName']}>
-                            <Icon type="question-circle"/>
-                        </Tooltip>
-                    </span>
-                    <Input value={this.state.groupName} style={{width: 400}}
-                           onChange={this.switchConfig('groupName')}/>
-                </div>
-
-                <div style={{marginBottom: 10}}>
-                    <span className='vice-title'>
-                        {
-                            youMustFill['region'] ?
-                                <span
-                                    style={{color: 'red', display: 'inline', marginRight: 10}}>*</span>
-                                :
-                                ''
-                        }
-                        <FormattedMessage id={valueToKey['region']}/>
-                        &nbsp;
-                        <Tooltip placement="top" title={toolTipTitle['region']}>
-                            <Icon type="question-circle"/>
-                        </Tooltip>
-                    </span>
-                    <Radio.Group onChange={(e) => {
-                        // 如果不想一变所有都变,就将 onchange 改成
-                        // onChange={this.switchConfig('groupRegion')}
-                        this.props.switchRegion(e);
-                    }} value={removePrefix('ap-', this.state.groupRegion)} buttonStyle="solid">
-                        <Radio.Button value="guangzhou"><FormattedMessage id="Guangzhou"/></Radio.Button>
-                        <Radio.Button value="shanghai"><FormattedMessage id="Shanghai"/></Radio.Button>
-                        <Radio.Button value="beijing"><FormattedMessage id="Beijing"/></Radio.Button>
-                        <Radio.Button value="chengdu"><FormattedMessage id="Chengdu"/></Radio.Button>
-                    </Radio.Group>
-                </div>
-
-                <div style={{marginBottom: 10}}>
-                            <span className='vice-title'>
-                                {
-                                    youMustFill['frontType'] ?
-                                        <span style={{
-                                            color: 'red',
-                                            display: 'inline',
-                                            marginRight: 10
-                                        }}>*</span>
-                                        :
-                                        ''
-                                }
-                                <FormattedMessage id={valueToKey['frontType']}/>
-                                &nbsp;
-                                <Tooltip placement="top" title={toolTipTitle['frontType']}>
-                                    <Icon type="question-circle"/>
-                                </Tooltip>
-                            </span>
-                    <Radio.Group onChange={this.switchConfig('frontType')}
-                                 defaultValue={this.state.frontType}
-                                 buttonStyle="solid">
-                        <Radio.Button value="http">http</Radio.Button>
-                        <Radio.Button value="https">https</Radio.Button>
-                        <Radio.Button value="http&https">http&https</Radio.Button>
-                    </Radio.Group>
-                </div>
-
-                <div style={{marginBottom: 10}}>
-                    <span className='vice-title'>
-                        {
-                            youMustFill['environmentName'] ?
-                                <span
-                                    style={{color: 'red', display: 'inline', marginRight: 10}}>*</span>
-                                :
-                                ''
-                        }
-                        <FormattedMessage id={valueToKey['environmentName']}/>
-                        &nbsp;
-                        <Tooltip placement="top" title={toolTipTitle['environmentName']}>
-                            <Icon type="question-circle"/>
-                        </Tooltip>
-                    </span>
-                    <Radio.Group onChange={this.switchConfig('environmentName')}
-                                 defaultValue={this.state.environmentName}
-                                 buttonStyle="solid">
-                        <Radio.Button value="test"><FormattedMessage id="test"/></Radio.Button>
-                        <Radio.Button value="prepub"><FormattedMessage id="prepub"/></Radio.Button>
-                        <Radio.Button value="release"><FormattedMessage id="release"/></Radio.Button>
-                    </Radio.Group>
-                </div>
-                <Collapse bordered={false}>
-                    <Panel header={<FormattedMessage id="Want more options?"/>}
-                           style={customPanelStyle}>
-                        {/*<div style={{marginBottom: 10}}>*/}
-                        {/*<span className='vice-title'>{valueToKey['defaultDomain']}*/}
-                        {/*&nbsp;*/}
-                        {/*<Tooltip placement="top" title={toolTipTitle['defaultDomain']}>*/}
-                        {/*<Icon type="question-circle"/>*/}
-                        {/*</Tooltip>*/}
-                        {/*</span>*/}
-                        {/*<Input value={this.state.defaultDomain} style={{width: 400}} disabled/>*/}
-                        {/*</div>*/}
-
-                        <div style={{marginBottom: 10}}>
-                            <span className='vice-title'>
-                                {
-                                    youMustFill['userDomain'] ?
-                                        <span style={{color: 'red', display: 'inline', marginRight: 10}}>*</span>
-                                        :
-                                        ''
-                                }
-                                <FormattedMessage id={valueToKey['userDomain']}/>
-                                &nbsp;
-                                <Tooltip placement="top" title={toolTipTitle['userDomain']}>
-                                    <Icon type="question-circle"/>
-                                </Tooltip>
-                            </span>
-                            <Input value={this.state.userDomain} style={{width: 400}}
-                                   onChange={this.switchConfig('userDomain')}/>
-                        </div>
-                        {/*<div style={{marginBottom: 10}}>*/}
-                        {/*<span className='vice-title'>{valueToKey['userStatus']}*/}
-                        {/*&nbsp;*/}
-                        {/*<Tooltip placement="top" title={toolTipTitle['userStatus']}>*/}
-                        {/*<Icon type="question-circle"/>*/}
-                        {/*</Tooltip>*/}
-                        {/*</span>*/}
-                        {/*<Radio.Group onChange={this.switchConfig('userStatus')} defaultValue={this.state.userStatus}*/}
-                        {/*buttonStyle="solid">*/}
-                        {/*<Radio.Button value="open">open</Radio.Button>*/}
-                        {/*<Radio.Button value="close">close</Radio.Button>*/}
-                        {/*</Radio.Group>*/}
-                        {/*</div>*/}
-                    </Panel>
-                </Collapse>
-                {
-                    manageUsers.includes(this.props.userID) ?
-                        <div>
-                            <div>
-                                {
-                                    this.props.stepAllShow ? '' :
-                                        <Button onClick={() => {
-                                            this.props.stepByStep(0)
-                                        }}><FormattedMessage id="previous-step"/></Button>
-
-                                }
-                                <Button onClick={() => {
-                                    const id = idGen('group');
-                                    this.ok(id, this.props.userID, this.props.projectID, this.props.cloudID, this.props.group, this.props.projectStatus);
-                                }} type='primary'><FormattedMessage id="save"/></Button>
-                            </div>
-                            {
-                                this.state.showOK === true ?
-                                    <Icon type="check-circle" theme="twoTone" twoToneColor="#52c41a"/>
-                                    :
-                                    ''
-                            }
-                        </div>
-                        :
-                        this.props.trialcase ?
-                            ''
-                            :
-                            <div>
-                                <div>
-                                    {
-                                        this.props.stepAllShow ? '' :
-                                            <Button onClick={() => {
-                                                this.props.stepByStep(0)
-                                            }}><FormattedMessage id="previous-step"/></Button>
-
-                                    }
-                                    <Button onClick={() => {
-                                        const id = idGen('group');
-                                        this.ok(id, this.props.userID, this.props.projectID, this.props.cloudID, this.props.group, this.props.projectStatus);
-                                    }} type='primary'><FormattedMessage id="save"/></Button>
-                                </div>
-                                {
-                                    this.state.showOK === true ?
-                                        <Icon type="check-circle" theme="twoTone"
-                                              twoToneColor="#52c41a"/>
-                                        :
-                                        ''
-                                }
-                            </div>
-                }
-            </div>
-        )
-    }
-}
-
-export default APIGroupCardRender;

+ 0 - 85
src/app/developVersion/common/deploy/tencent/apiPathCard/APIPathCardFetch.js

@@ -1,85 +0,0 @@
-import React, {Component} from 'react';
-import {Collapse, Spin} from 'antd';
-import {GET_PROJECT, SHOW_APIGWPATH} from "../../../../../../gql";
-import gql from "graphql-tag";
-import {Query} from "react-apollo";
-import APIPathCardRender from "./APIPathCardRender";
-import {removeSpace} from "../../../../../../func";
-
-const Panel = Collapse.Panel;
-
-class APIPathCardFetch extends Component {
-    constructor(props) {
-        super(props);
-        this.state = {}
-    }
-
-    render() {
-        return (
-            <Query query={gql(GET_PROJECT)} variables={{id: this.props.projectID}} fetchPolicy={'network-only'}>
-                {
-                    ({loading, error, data}) => {
-                        if (loading) {
-                            return <Spin style={{marginLeft: 3}}/>
-                        }
-                        if (error) {
-                            return 'error!';
-                        }
-
-                        let group = '',
-                            deploy = '',
-                            path = '';
-
-                        let dataProject = data.project_by_id;
-                        let {cloud_id, apiGWGroup_id, deploy_id, projectName, projectStatus} = dataProject;
-
-                        if (cloud_id !== null && cloud_id.cloudName === 'tencent') {
-                            group = apiGWGroup_id;
-                            deploy = deploy_id;
-                        }
-
-                        return (
-                            <Query query={gql(SHOW_APIGWPATH)} variables={{apiGWGroup_id: group? group.id : ''}}>
-                                {
-                                    ({loading, error, data}) => {
-                                        if (loading) {
-                                            return <Spin style={{marginLeft: 3}}/>
-                                        }
-                                        if (error) {
-                                            return 'error!';
-                                        }
-
-                                        if (data.apiGWPath_by_props.length > 0)
-                                            path = data.apiGWPath_by_props[0];
-
-                                        return (
-                                            <APIPathCardRender
-                                                // props
-                                                trialcase={this.props.trialcase}
-                                                stepByStep={this.props.stepByStep}
-                                                userID={this.props.userID}
-                                                projectID={this.props.projectID}
-                                                stepAllShow={this.props.stepAllShow}
-
-                                                // query1
-                                                deployID={deploy.id}
-                                                groupID={group? group.id : ''}
-
-                                                // query2
-                                                defalutName={removeSpace(projectName)}
-                                                path={path}
-                                                projectStatus={projectStatus}
-                                            />
-                                        )
-                                    }
-                                }
-                            </Query>
-                        )
-                    }
-                }
-            </Query>
-        )
-    }
-}
-
-export default APIPathCardFetch;

+ 0 - 287
src/app/developVersion/common/deploy/tencent/apiPathCard/APIPathCardRender.js

@@ -1,287 +0,0 @@
-import React, {Component} from 'react';
-import {FormattedMessage} from 'react-intl';
-import {Input, Radio, Collapse, Button, Icon, Tooltip} from 'antd';
-import {idGen} from "../../../../../../func";
-import {graphqlUrl, manageUsers} from "../../../../../../config";
-import {ADD_APIGWPATH, UPDATE_APIGWPATH, UPDATE_PROJECT_ONLY_STATUS} from "../../../../../../gql";
-import {request} from 'graphql-request'
-
-const Panel = Collapse.Panel;
-
-// 如需改变显示,请在此处 value 处更改
-// 如需添加中文,请在此处 value 处添加
-// eg: 'xxxx': <F..  id='xxx'/>
-const valueToKey = {
-    'apiGWName': 'apiGWName',
-    'apiGWDesc': 'apiGWDesc',
-    'requestMethod': 'requestMethod'
-};
-
-const toolTipTitle = {
-    'apiGWName': 'its apiGWName',
-    'apiGWDesc': 'its apiGWDesc',
-    'requestMethod': 'its requestMethod'
-};
-
-const youMustFill = {
-    'apiGWName': true,
-    'apiGWDesc': false,
-    'requestMethod': true
-};
-
-class APIPathCardRender extends Component {
-    constructor(props) {
-        super(props);
-        if(props.path !== '' && props.path !== null) {
-            let {apiGWName, apiGWDesc, requestMethod} = props.path;
-            this.state = {
-                configs: ['apiGWDesc'],
-                showOK: false,
-                apiGWName,
-                apiGWDesc,
-                requestMethod: requestMethod
-            }
-        } else {
-            this.state = {
-                configs: ['apiGWDesc'],
-                showOK: false,
-                apiGWName: props.defalutName,
-                apiGWDesc: '',
-                requestMethod: 'GET',
-            };
-        }
-    }
-
-
-    componentWillReceiveProps(next) {
-        if (next.path !== '' && next.path !== null) {
-            let {apiGWName, apiGWDesc, requestMethod} = next.path;
-            this.setState({
-                apiGWName,
-                apiGWDesc,
-                requestMethod
-            })
-        } else {
-            this.setState({
-                apiGWName: next.defalutName,
-                apiGWDesc: '',
-                requestMethod: 'GET',
-            });
-        }
-    };
-
-    switchConfig = (label) => {
-        return (e) => {
-            this.setState({
-                [label]: e.target.value
-            })
-        };
-    };
-
-    ok = (id, userID, projectID, groupID, deployID, path, projectStatus) => {
-        let {apiGWName, apiGWDesc, requestMethod} = this.state;
-        let varObj = {
-            id,
-            user_id: userID,
-            apiGWGroup_id: groupID,
-            deploy_id: deployID,
-            apiGWName,
-            apiGWDesc,
-            requestMethod,
-            serviceType: 'SCF',
-            apiGWPath: '/graphql',
-            timeout: 300,
-            apiId: '',
-            createdAt: new Date().getTime(),
-            updatedAt: ''
-        };
-        if (path === '' || path === null) {
-            if (deployID !== '' && groupID !== '' && deployID !== null && groupID !== null) {
-                request(graphqlUrl, ADD_APIGWPATH, varObj).then(
-                    data => {
-                        if (data.create_apiGWPath !== null) {
-                            this.setState({
-                                showOK: true
-                            });
-                            // 写回 project
-                            request(graphqlUrl, UPDATE_PROJECT_ONLY_STATUS, {
-                                id: projectID,
-                                updatedAt: new Date().getTime(),
-                                projectStatus: 'pathed'
-                            }).then(data => {
-                                if(data.update_project !== null)
-                                    this.props.stepByStep(3);
-                            })
-
-                        }
-                        setTimeout(() => {
-                            this.setState({
-                                showOK: false
-                            })
-                        }, 1500)
-                    }
-                )
-            }
-        } else {
-            let {apiGWName, apiGWDesc, requestMethod} = this.state;
-            let varObj = {
-                id: path.id,
-                apiGWName,
-                apiGWDesc,
-                requestMethod,
-                updatedAt: new Date().getTime()
-            };
-            request(graphqlUrl, UPDATE_APIGWPATH, varObj).then(
-                data => {
-                    if (data.update_apiGWPath !== null) {
-                        this.setState({
-                            showOK: true
-                        });
-                        request(graphqlUrl, UPDATE_PROJECT_ONLY_STATUS, {
-                            id: projectID,
-                            updatedAt: new Date().getTime(),
-                            projectStatus: projectStatus === 'deployed' ? 'updated': 'pathed'
-                        }).then(data => {
-                            if(data.update_project !== null)
-                                this.props.stepByStep(3);
-                        })
-                    }
-                    setTimeout(() => {
-                        this.setState({
-                            showOK: false
-                        })
-                    }, 1500)
-                }
-            )
-        }
-    };
-
-    render() {
-        const customPanelStyle = {
-            background: '#f7f7f7',
-            borderRadius: 4,
-            marginBottom: 24,
-            border: 0,
-            overflow: 'hidden',
-        };
-
-        return (
-            <div>
-                <div key={'apiGWName'} style={{marginBottom: 10}}>
-                    <span className='vice-title'>
-                        {
-                            youMustFill['apiGWName']?
-                                <span style={{color: 'red', display: 'inline', marginRight: 10}}>*</span>
-                                :
-                                ''
-                        }
-                        <FormattedMessage id={valueToKey['apiGWName']}/>
-                        &nbsp;
-                        <Tooltip placement="top" title={toolTipTitle['apiGWName']}>
-                            <Icon type="question-circle"/>
-                        </Tooltip>
-                    </span>
-                    <Input value={this.state.apiGWName} style={{width: 400}}
-                           onChange={this.switchConfig('apiGWName')}/>
-                </div>
-                <div style={{marginBottom: 10}}>
-                            <span className='vice-title'>
-                                {
-                                    youMustFill['requestMethod']?
-                                        <span style={{color: 'red', display: 'inline', marginRight: 10}}>*</span>
-                                        :
-                                        ''
-                                }
-                                <FormattedMessage id={valueToKey['requestMethod']}/>
-                                &nbsp;
-                                <Tooltip placement="top" title={toolTipTitle['requestMethod']}>
-                                    <Icon type="question-circle"/>
-                                </Tooltip>
-                            </span>
-                    <Radio.Group onChange={this.switchConfig('requestMethod')}
-                                 defaultValue={this.state.requestMethod}
-                                 buttonStyle="solid">
-                        <Radio.Button value="GET">get</Radio.Button>
-                        <Radio.Button value="POST">post</Radio.Button>
-                    </Radio.Group>
-                </div>
-                <Collapse bordered={false}>
-                    <Panel header={<FormattedMessage id="Want more options?"/>} style={customPanelStyle}>
-                        {
-                            this.state.configs.map(config => (
-                                <div key={config} style={{marginBottom: 10}}>
-                                    <span className='vice-title'>
-                                        {
-                                            youMustFill[config]?
-                                                <span style={{color: 'red', display: 'inline', marginRight: 10}}>*</span>
-                                                :
-                                                ''
-                                        }
-                                        <FormattedMessage id={valueToKey[config]}/>
-                                        &nbsp;
-                                        <Tooltip placement="top" title={toolTipTitle[config]}>
-                                            <Icon type="question-circle"/>
-                                        </Tooltip>
-                                    </span>
-                                    <Input value={this.state[config]} style={{width: 400}}
-                                           onChange={this.switchConfig(config)}/>
-                                </div>
-                            ))
-                        }
-
-                    </Panel>
-                </Collapse>
-                {
-                    manageUsers.includes(this.props.userID) ?
-                        <div>
-                            <div>
-                                {
-                                    this.props.stepAllShow? '' :
-                                        <Button onClick={()=>{
-                                            this.props.stepByStep(1)
-                                        }}><FormattedMessage id="previous-step"/></Button>
-                                }
-                                <Button onClick={()=>{
-                                    const id = idGen('path');
-                                    this.ok(id, this.props.userID, this.props.projectID, this.props.groupID, this.props.deployID, this.props.path, this.props.projectStatus);
-                                }} type='primary'><FormattedMessage id="save"/></Button>
-                            </div>
-                            {
-                                this.state.showOK === true?
-                                    <Icon type="check-circle" theme="twoTone" twoToneColor="#52c41a"/>
-                                    :
-                                    ''
-                            }
-                        </div>
-                        :
-                        this.props.trialcase?
-                            ''
-                            :
-                            <div>
-                                <div>
-                                    {
-                                        this.props.stepAllShow? '' :
-                                            <Button onClick={()=>{
-                                                this.props.stepByStep(1)
-                                            }}><FormattedMessage id="previous-step"/></Button>
-                                    }
-                                    <Button onClick={()=>{
-                                        const id = idGen('path');
-                                        this.ok(id, this.props.userID, this.props.projectID, this.props.groupID, this.props.deployID, this.props.path, this.props.projectStatus);
-                                    }} type='primary'><FormattedMessage id="save"/></Button>
-                                </div>
-                                {
-                                    this.state.showOK === true?
-                                        <Icon type="check-circle" theme="twoTone" twoToneColor="#52c41a"/>
-                                        :
-                                        ''
-                                }
-                            </div>
-                }
-
-            </div>
-        )
-    }
-}
-
-export default APIPathCardRender;

+ 0 - 75
src/app/developVersion/common/deploy/tencent/deployCard/DeployCardFetch.js

@@ -1,75 +0,0 @@
-import React, {Component} from 'react';
-import {Spin} from 'antd';
-import {GET_PROJECT} from "../../../../../../gql";
-import {Query} from "react-apollo";
-import gql from "graphql-tag";
-import DeployCardRender from "./DeployCardRender";
-import {removeSpace} from "../../../../../../func";
-
-const removePrefix = (prefix, value) => {
-    let r = new RegExp(prefix);
-    return value.replace(r, '');
-};
-
-const shiftPrefix = (prefix, value) => {
-    value = removePrefix(prefix, value);
-    return prefix + value;
-};
-
-class DeployCardFetch extends Component {
-    constructor(props) {
-        super(props);
-        this.state = {
-
-        }
-    }
-
-    render() {
-        return (
-            <Query query={gql(GET_PROJECT)} variables={{id: this.props.projectID}}>
-                {
-                    ({loading, error, data}) => {
-                        if (loading) {
-                            return <Spin style={{marginLeft: 3}}/>
-                        }
-                        if (error) {
-                            return 'error!';
-                        }
-
-                        let deploy = '',
-                            cloudID = 'tencent_CloudID';
-
-                        let dataProject = data.project_by_id;
-                        let {cloud_id, deploy_id, projectName, projectStatus} = dataProject;
-
-                        if (cloud_id !== null && cloud_id.cloudName === 'tencent') {
-                            deploy = deploy_id;
-                            cloudID = cloud_id.id;
-                        }
-
-                        return (
-                            <DeployCardRender
-                                // props
-                                switchRegion={this.props.switchRegion}
-                                region={this.props.region}
-                                trialcase={this.props.trialcase}
-                                stepByStep={this.props.stepByStep}
-                                userID={this.props.userID}
-                                projectID={this.props.projectID}
-
-                                // query
-                                defalutName={removeSpace(projectName)}
-                                deploy={deploy}
-                                cloudID={cloudID}
-                                projectStatus={projectStatus}
-                            />
-                        )
-                    }
-                }
-            </Query>
-
-        )
-    }
-}
-
-export default DeployCardFetch;

+ 0 - 412
src/app/developVersion/common/deploy/tencent/deployCard/DeployCardRender.js

@@ -1,412 +0,0 @@
-import React, {Component} from 'react';
-import {FormattedMessage} from 'react-intl';
-import {Input, Radio, Collapse, Button, Icon, Tooltip} from 'antd';
-import {idGen} from "../../../../../../func";
-import {graphqlUrl, manageUsers} from "../../../../../../config";
-import {
-    ADD_DEPLOY,
-    UPDATE_DEPLOY,
-    UPDATE_PROJECT_DEPLOY_AND_CLOUD,
-    UPDATE_PROJECT_ONLY_STATUS
-} from "../../../../../../gql";
-import {request} from 'graphql-request'
-import {removePrefix, shiftPrefix, pushPostfix} from "../../../../../../func";
-
-const Panel = Collapse.Panel;
-
-// 如需改变显示,请在此处 value 处更改
-// 如需添加中文,请在此处 value 处添加
-// eg: 'xxxx': <F..  id='xxx'/>
-const valueToKey = {
-    'functionName': 'functionName',
-    'cosBucketName': 'cosBucketName',
-    'cosObjectName': 'cosObjectName',
-    'cosBucketRegion': 'cosBucketRegion',
-    'serviceName': 'serviceName',
-    'subnetId': 'subnetId',
-    'vpcId': 'vpcId',
-    'region': 'region',
-    'description': 'description',
-};
-
-const toolTipTitle = {
-    'functionName': 'its funcname',
-    'cosBucketName': 'its cosBucketName',
-    'cosObjectName': 'its cosObjectName',
-    'cosBucketRegion': 'its cosBucketRegion',
-    'serviceName': 'its serviceName',
-    'subnetId': 'its subnetId',
-    'vpcId': 'its vpcId',
-    'region': 'its region',
-    'description': 'its description',
-};
-
-const youMustFill = {
-    'functionName': true,
-    'cosBucketName': true,
-    'cosObjectName': true,
-    'cosBucketRegion': true,
-    'serviceName': true,
-    'subnetId': false,
-    'vpcId': false,
-    'region': true,
-    'description': false,
-};
-
-class DeployCardRender extends Component {
-    constructor(props) {
-        super(props);
-        if(props.deploy !== '' && props.deploy !== null) {
-            let {functionName, cosBucketName, cosObjectName, cosBucketRegion, serviceName, vpcId, subnetId, region, description} = props.deploy;
-            this.state = {
-                configs: ['description', 'vpcId', 'subnetId'],
-                description,
-                showOK: false,
-                functionName,
-                region,
-                cosBucketName,
-                cosObjectName: removePrefix('.jar', cosObjectName),
-                cosBucketRegion,
-                serviceName,
-                vpcId,
-                subnetId
-            }
-        } else {
-            this.state = {
-                configs: ['description', 'vpcId', 'subnetId'],
-                description: '',
-                showOK: false,
-                functionName: props.defalutName,
-                region: props.region === '' ? 'ap-beijing' : props.region,
-                cosBucketName: 'graphqlfc',
-                cosObjectName: props.defalutName,
-                cosBucketRegion: props.region === '' ? 'ap-beijing' : props.region,
-                serviceName: '',
-                vpcId: '',
-                subnetId: '',
-            };
-        }
-    }
-
-    componentWillReceiveProps(next) {
-        if (next.deploy !== '' && next.deploy !== null) {
-            let {functionName, cosBucketName, cosObjectName, cosBucketRegion, serviceName, vpcId, subnetId, region, description} = next.deploy;
-            this.setState({
-                description,
-                functionName,
-                region: next.region === '' ? region : next.region,
-                cosBucketName,
-                cosObjectName: removePrefix('.jar', cosObjectName),
-                cosBucketRegion: next.region === '' ? cosBucketRegion : next.region,
-                serviceName,
-                vpcId,
-                subnetId
-            })
-        } else {
-            this.setState({
-                functionName: next.defalutName,
-                region: next.region === '' ? 'ap-beijing' : next.region,
-                cosBucketName: 'graphqlfc',
-                cosObjectName: next.defalutName,
-                cosBucketRegion: next.region === '' ? 'ap-beijing' : next.region,
-                serviceName: '',
-                vpcId: '',
-                subnetId: ''
-            });
-        }
-    };
-
-    switchConfig = (label) => {
-        return (e) => {
-            this.setState({
-                [label]: e.target.value
-            })
-        };
-    };
-
-    ok = (id, userID, projectID, cloudID, deploy, projectStatus) => {
-        let {description, cosBucketName, subnetId, cosObjectName, region, vpcId, cosBucketRegion, functionName} = this.state;
-        let varObj = {
-            id,
-            cloud_id: cloudID,
-            user_id: userID,
-            cosObjectName: pushPostfix('.jar', cosObjectName),
-            region: shiftPrefix('ap-', region),
-            cosBucketRegion: shiftPrefix('ap-', cosBucketRegion),
-            description,
-            cosBucketName,
-            vpcId,
-            subnetId,
-            functionName,
-            memorySize: 512,
-            timeout: 300,
-            handler: 'tencent_graphql.Bridge::handler',
-            serviceName: "",
-            fc_id: '',
-            createdAt: new Date().getTime(),
-            updatedAt: ''
-        };
-        if (deploy === '' || deploy === null) {
-            request(graphqlUrl, ADD_DEPLOY, varObj).then(
-                data => {
-                    if (data.create_deploy !== null) {
-                        this.setState({
-                            showOK: true
-                        });
-                        // 写回 project
-                        request(graphqlUrl, UPDATE_PROJECT_DEPLOY_AND_CLOUD, {
-                            id: projectID,
-                            updatedAt: new Date().getTime(),
-                            deploy_id: id,
-                            cloud_id: cloudID,
-                            projectStatus: 'functioned'
-                        }).then(data => {
-                            if(data.update_project !== null)
-                                this.props.stepByStep(1);
-                        })
-                    }
-                    setTimeout(() => {
-                        this.setState({
-                            showOK: false
-                        })
-                    }, 1500)
-                }
-            )
-        } else {
-            let {description, cosBucketName, subnetId, cosObjectName, region, vpcId, cosBucketRegion, functionName} = this.state;
-            let varObj = {
-                id: deploy.id,
-                cosObjectName: pushPostfix('.jar', cosObjectName),
-                region: shiftPrefix('ap-', region),
-                cosBucketRegion: shiftPrefix('ap-', cosBucketRegion),
-                description,
-                subnetId,
-                cosBucketName,
-                vpcId,
-                functionName,
-                updatedAt: new Date().getTime()
-            };
-            request(graphqlUrl, UPDATE_DEPLOY, varObj).then(
-                data => {
-                    if (data.update_deploy !== null) {
-                        this.setState({
-                            showOK: true
-                        });
-                        request(graphqlUrl, UPDATE_PROJECT_ONLY_STATUS, {
-                            id: projectID,
-                            updatedAt: new Date().getTime(),
-                            projectStatus: projectStatus === 'deployed' ? 'updated': 'functioned'
-                        }).then(data => {
-                            if(data.update_project !== null)
-                                this.props.stepByStep(1);
-                        })
-                    }
-                    setTimeout(() => {
-                        this.setState({
-                            showOK: false
-                        })
-                    }, 1500)
-                }
-            )
-        }
-    };
-
-    render() {
-        const customPanelStyle = {
-            background: '#f7f7f7',
-            borderRadius: 4,
-            marginBottom: 24,
-            border: 0,
-            overflow: 'hidden',
-        };
-
-        const ioobotCloudID = ['tencent_CloudID', 'aliyun_CloudID'];
-
-        const disable = {
-            'subnetId': ioobotCloudID.includes(this.props.cloudID) ? true : '',
-            'vpcId': ioobotCloudID.includes(this.props.cloudID) ? true : '',
-        };
-
-        return (
-            <div>
-                <div style={{marginBottom: 10}}>
-                                    <span className='vice-title'>
-                                        {
-                                            youMustFill['functionName']?
-                                                <span style={{color: 'red', display: 'inline', marginRight: 10}}>*</span>
-                                                :
-                                                ''
-                                        }
-                                        <FormattedMessage id={valueToKey['functionName']}/>
-                                        &nbsp;
-                                        <Tooltip placement="top" title={toolTipTitle['functionName']}>
-                                            <Icon type="question-circle"/>
-                                        </Tooltip>
-                                    </span>
-                    <Input value={this.state.functionName} style={{width: 400}}
-                           onChange={this.switchConfig('functionName')}/>
-                </div>
-                <div style={{marginBottom: 10}}>
-                                    <span className='vice-title'>
-                        {
-                            youMustFill['region']?
-                                <span style={{color: 'red', display: 'inline', marginRight: 10}}>*</span>
-                                :
-                                ''
-                        }
-                                        <FormattedMessage id={valueToKey['region']}/>
-                                        &nbsp;
-                                        <Tooltip placement="top" title={toolTipTitle['region']}>
-                            <Icon type="question-circle"/>
-                        </Tooltip>
-                    </span>
-                    <Radio.Group onChange={(e) => {
-                        this.props.switchRegion(e);
-                    }} defaultValue={this.state.region} value={removePrefix('ap-', this.state.region)}
-                                 buttonStyle="solid">
-                        <Radio.Button value="guangzhou"><FormattedMessage id="Guangzhou"/></Radio.Button>
-                        <Radio.Button value="shanghai"><FormattedMessage id="Shanghai"/></Radio.Button>
-                        <Radio.Button value="beijing"><FormattedMessage id="Beijing"/></Radio.Button>
-                        <Radio.Button value="chengdu"><FormattedMessage id="Chengdu"/></Radio.Button>
-                    </Radio.Group>
-                </div>
-                <div style={{marginBottom: 10}}>
-                                    <span className='vice-title'>
-                                {
-                                    youMustFill['cosBucketRegion']?
-                                        <span style={{color: 'red', display: 'inline', marginRight: 10}}>*</span>
-                                        :
-                                        ''
-                                }
-                                        <FormattedMessage id={valueToKey['cosBucketRegion']}/>
-                                        &nbsp;
-                                        <Tooltip placement="top" title={toolTipTitle['cosBucketRegion']}>
-                                    <Icon type="question-circle"/>
-                                </Tooltip>
-                            </span>
-                    <Radio.Group onChange={(e) => {
-                        // 如果不想一变所有都变,就将 onchange 改成
-                        // onChange={this.switchConfig('cosBucketRegion')}
-                        this.props.switchRegion(e);
-                    }} defaultValue={this.state.region}
-                                 value={removePrefix('ap-', this.state.cosBucketRegion)} buttonStyle="solid">
-                        <Radio.Button value="guangzhou"><FormattedMessage id="Guangzhou"/></Radio.Button>
-                        <Radio.Button value="shanghai"><FormattedMessage id="Shanghai"/></Radio.Button>
-                        <Radio.Button value="beijing"><FormattedMessage id="Beijing"/></Radio.Button>
-                        <Radio.Button value="chengdu"><FormattedMessage id="Chengdu"/></Radio.Button>
-                    </Radio.Group>
-                </div>
-                <div key={'cosBucketName'} style={{marginBottom: 10}}>
-                                    <span className='vice-title'>
-                                        {
-                                            youMustFill['cosBucketName']?
-                                                <span style={{color: 'red', display: 'inline', marginRight: 10}}>*</span>
-                                                :
-                                                ''
-                                        }
-                                        <FormattedMessage id={valueToKey['cosBucketName']}/>
-                                        &nbsp;
-                                        <Tooltip placement="top" title={toolTipTitle['cosBucketName']}>
-                                            <Icon type="question-circle"/>
-                                        </Tooltip>
-                                    </span>
-                    <Input value={this.state.cosBucketName} style={{width: 400}}
-                           disabled={disable['cosBucketName'] === true}
-                           onChange={this.switchConfig('cosBucketName')}/>
-                </div>
-                <div key={'cosObjectName'} style={{marginBottom: 10}}>
-                                    <span className='vice-title'>
-                                        {
-                                            youMustFill['cosObjectName']?
-                                                <span style={{color: 'red', display: 'inline', marginRight: 10}}>*</span>
-                                                :
-                                                ''
-                                        }
-                                        <FormattedMessage id={valueToKey['cosObjectName']}/>
-                                        &nbsp;
-                                        <Tooltip placement="top" title={toolTipTitle['cosObjectName']}>
-                                            <Icon type="question-circle"/>
-                                        </Tooltip>
-                                    </span>
-                    <Input value={this.state.cosObjectName} style={{width: 400}}
-                           disabled={disable['cosObjectName'] === true} addonAfter=".jar"
-                           onChange={this.switchConfig('cosObjectName')}/>
-                </div>
-                <Collapse bordered={false}>
-                    <Panel header={<FormattedMessage id="Want more options?"/>} style={customPanelStyle}>
-
-                        {/*腾讯云为空字符串,不显示,这里未作区分*/}
-                        {/*<div style={{marginBottom: 10}}>*/}
-                        {/*<span className='vice-title'>{valueToKey['serviceName']}*/}
-                        {/*<span> </span>*/}
-                        {/*<Tooltip placement="top" title={toolTipTitle['serviceName']}>*/}
-                        {/*<Icon type="question-circle"/>*/}
-                        {/*</Tooltip>*/}
-                        {/*</span>*/}
-                        {/*<Input value={this.state.serviceName} style={{width: 400}} disabled*/}
-                        {/*onChange={this.switchConfig('serviceName')}/>*/}
-                        {/*</div>*/}
-                        {
-                            this.state.configs.map(config => (
-                                <div key={config} style={{marginBottom: 10}}>
-                                    <span className='vice-title'>
-                                        {
-                                            youMustFill[config]?
-                                                <span style={{color: 'red', display: 'inline', marginRight: 10}}>*</span>
-                                                :
-                                                ''
-                                        }
-                                        <FormattedMessage id={valueToKey[config]}/>
-                                        &nbsp;
-                                        <Tooltip placement="top" title={toolTipTitle[config]}>
-                                            <Icon type="question-circle"/>
-                                        </Tooltip>
-                                    </span>
-                                    <Input value={this.state[config]} style={{width: 400}}
-                                           disabled={disable[config] === true}
-                                           onChange={this.switchConfig(config)}/>
-                                </div>
-                            ))
-                        }
-                    </Panel>
-                </Collapse>
-                <div>
-                    {
-                        manageUsers.includes(this.props.userID) ?
-                            <div>
-                                <Button onClick={() => {
-                                    const id = idGen('deploy');
-                                    this.ok(id, this.props.userID, this.props.projectID, this.props.cloudID, this.props.deploy, this.props.projectStatus);
-                                }} type='primary'><FormattedMessage id="save"/></Button>
-                                {
-                                    this.state.showOK === true ?
-                                        <Icon type="check-circle" theme="twoTone" twoToneColor="#52c41a"/>
-                                        :
-                                        ''
-                                }
-                            </div>
-                            :
-                            this.props.trialcase ?
-                                ''
-                                :
-                                <div>
-                                    <Button onClick={() => {
-                                        const id = idGen('deploy');
-                                        this.ok(id, this.props.userID, this.props.projectID, this.props.cloudID, this.props.deploy, this.props.projectStatus);
-                                    }} type='primary'><FormattedMessage id="save"/></Button>
-                                    {
-                                        this.state.showOK === true ?
-                                            <Icon type="check-circle" theme="twoTone" twoToneColor="#52c41a"/>
-                                            :
-                                            ''
-                                    }
-                                </div>
-                    }
-
-                </div>
-            </div>
-        )
-    }
-}
-
-export default DeployCardRender;

+ 0 - 53
src/app/developVersion/common/deploy/tencent/notificationCard/NotificationCardFetch.js

@@ -1,53 +0,0 @@
-import React, {Component} from 'react';
-import {Spin} from 'antd';
-import {GET_PROJECT} from "../../../../../../gql";
-import {Query} from "react-apollo";
-import gql from "graphql-tag";
-import {removeSpace} from "../../../../../../func";
-import NotificationCardRender from './NotificationCardRender';
-import DeployCardRender from "../deployCard/DeployCardRender";
-
-class NotificationCardFetch extends Component {
-    render() {
-        return (
-            <Query query={gql(GET_PROJECT)} variables={{id: this.props.projectID}}>
-                {
-                    ({loading, error, data}) => {
-                        if (loading) {
-                            return <Spin style={{marginLeft: 3}}/>
-                        }
-                        if (error) {
-                            return 'error!';
-                        }
-
-
-                        let dataProject = data.project_by_id;
-                        let {projectName, projectStatus} = dataProject;
-
-                        let notification = dataProject.notification_id || '';
-
-                        return (
-                            <NotificationCardRender
-                                // props
-                                trialcase={this.props.trialcase}
-                                stepByStep={this.props.stepByStep}
-                                userID={this.props.userID}
-                                projectID={this.props.projectID}
-                                stepAllShow={this.props.stepAllShow}
-
-                                // query
-                                notification={notification}
-                                defaultName={removeSpace(projectName)}
-                                projectStatus={projectStatus}
-                            />
-                        )
-                    }
-                }
-            </Query>
-
-        )
-
-    }
-}
-
-export default NotificationCardFetch;

+ 0 - 242
src/app/developVersion/common/deploy/tencent/notificationCard/NotificationCardRender.js

@@ -1,242 +0,0 @@
-import React, {Component} from 'react';
-import {FormattedMessage} from 'react-intl';
-import {Input, Tooltip, Icon, Button} from 'antd';
-import {graphqlUrl, manageUsers} from "../../../../../../config";
-import {ADD_NOTIFICATION, UPDATE_NOTIFICATION, UPDATE_PROJECT_ONLY_STATUS} from "../../../../../../gql";
-import {request} from 'graphql-request'
-import {idGen} from "../../../../../../func";
-
-const valueToKey = {
-    'dingding webhook': 'dingding webhook',
-    'notification name': 'requestMethod'
-};
-
-const toolTipTitle = {
-    'dingding webhook': 'its dingding webhook',
-    'notification name': 'its notification name'
-};
-
-const youMustFill = {
-    'dingding webhook': false,
-    'notification name': false
-};
-
-
-class NotificationCardFetch extends Component {
-    constructor(props) {
-        super(props);
-        if(props.notification !== '' && props.notification !== null) {
-            let {type, webhook, name} = props.notification;
-            this.state = {
-                type,
-                webhook,
-                name
-            }
-        } else {
-            this.state = {
-                type: 'dingding',
-                webhook: '',
-                name: props.defaultName
-            }
-        }
-    }
-
-    componentWillReceiveProps(next) {
-        if(next.notification !== '' && next.notification !== null) {
-            let {type, webhook, name} = next.notification;
-            this.setState({
-                type,
-                webhook,
-                name
-            })
-        } else {
-            this.setState({
-                type: 'dingding',
-                webhook: '',
-                name: next.defaultName
-            })
-        }
-    }
-
-    ok = (id, userID, projectID, notification, projectStatus) => {
-        let {type, webhook, name} = this.state;
-        let varObj = {
-            id,
-            user_id: userID,
-            type,
-            webhook,
-            name,
-            createdAt: new Date().getTime(),
-            updatedAt: ''
-        };
-        if (notification === '' || notification === null) {
-            request(graphqlUrl, ADD_NOTIFICATION, varObj).then(
-                data => {
-                    if (data.create_notification !== null) {
-                        this.setState({
-                            showOK: true
-                        });
-                        // 写回 project
-                        request(graphqlUrl, UPDATE_PROJECT_ONLY_STATUS, {
-                            id: projectID,
-                            updatedAt: new Date().getTime(),
-                            projectStatus: 'notificationed'
-                        }).then(data => {
-                            if (data.update_project !== null)
-                                this.props.stepByStep(4);
-                        })
-
-                    }
-                    setTimeout(() => {
-                        this.setState({
-                            showOK: false
-                        })
-                    }, 1500)
-                }
-            )
-
-        } else {
-            let varObj = {
-                id: notification.id,
-                type,
-                webhook,
-                name,
-                updatedAt: new Date().getTime()
-            };
-            request(graphqlUrl, UPDATE_NOTIFICATION, varObj).then(
-                data => {
-                    if (data.update_notification !== null) {
-                        this.setState({
-                            showOK: true
-                        });
-                        request(graphqlUrl, UPDATE_PROJECT_ONLY_STATUS, {
-                            id: projectID,
-                            updatedAt: new Date().getTime(),
-                            projectStatus: projectStatus === 'deployed' ? 'updated': 'notificationed'
-                        }).then(data => {
-                            if (data.update_project !== null)
-                                this.props.stepByStep(4);
-                        })
-                    }
-                    setTimeout(() => {
-                        this.setState({
-                            showOK: false
-                        })
-                    }, 1500)
-                }
-            )
-        }
-    };
-
-    render() {
-        return (
-            <div>
-                <div>
-                    <p style={{marginBottom: 10}}><b><FormattedMessage id="Ding Talk"/></b></p>
-                    <div>
-                        <p style={{marginBottom: 10}}>
-                            <span className='vice-title'>
-                                {
-                                    youMustFill['dingding webhook'] ?
-                                        <span style={{color: 'red', display: 'inline', marginRight: 10}}>*</span>
-                                        :
-                                        ''
-                                }
-                                <FormattedMessage id="Web hook"/>
-                                &nbsp;
-                                <Tooltip placement="top" title={toolTipTitle['dingding webhook']}>
-                                    <Icon type="question-circle"/>
-                                </Tooltip>
-                            </span>
-                            <Input style={{width: 400}} value={this.state.webhook} onChange={(e) => {
-                                this.setState({
-                                    webhook: e.target.value
-                                })
-                            }}/>
-                        </p>
-                        <p style={{marginBottom: 10}}>
-                            <span className='vice-title'>
-                                {
-                                    youMustFill['notification name'] ?
-                                        <span style={{color: 'red', display: 'inline', marginRight: 10}}>*</span>
-                                        :
-                                        ''
-                                }
-                                <FormattedMessage id="Notification Name"/>
-                                &nbsp;
-                                <Tooltip placement="top" title={toolTipTitle['notification name']}>
-                                    <Icon type="question-circle"/>
-                                </Tooltip>
-                            </span>
-                            <Input style={{width: 300}} value={this.state.name} onChange={(e) => {
-                                this.setState({
-                                    name: e.target.value
-                                })
-                            }}/></p>
-                    </div>
-                </div>
-
-                {/*<div className='kind'>*/}
-                {/*<p><b>QQ</b></p>*/}
-                {/*<div className='item'>*/}
-                {/*<p>*/}
-                {/*<span className='item-title'>*/}
-                {/*<span>Web hook  </span>*/}
-                {/*<Tooltip placement="top" title='hahahha'>*/}
-                {/*<Icon type="question-circle"/>*/}
-                {/*</Tooltip>*/}
-                {/*</span>*/}
-                {/*<Input style={{width: 600}}/>*/}
-                {/*</p>*/}
-                {/*<p>*/}
-                {/*<span className='item-title'>*/}
-                {/*<span>Notification Name  </span>*/}
-                {/*<Tooltip placement="top" title='heheheheh'>*/}
-                {/*<Icon type="question-circle"/>*/}
-                {/*</Tooltip>*/}
-                {/*</span>*/}
-                {/*<Input style={{width: 300}}/></p>*/}
-                {/*</div>*/}
-                {/*</div>*/}
-
-                <div>
-                    {
-                        manageUsers.includes(this.props.userID) ?
-                            <div>
-                                {
-                                    this.props.stepAllShow? '' :
-                                        <Button onClick={()=>{
-                                            this.props.stepByStep(2)
-                                        }}><FormattedMessage id="previous-step"/></Button>
-                                }
-                                <Button type="primary" onClick={() => {
-                                    const id = idGen('notification');
-                                    this.ok(id, this.props.userID, this.props.projectID, this.props.notification, this.props.projectStatus);
-                                }}><FormattedMessage id="save"/></Button>
-                            </div>
-
-                            :
-                            this.props.trialcase ?
-                                ''
-                                :
-                                <div>
-                                    {
-                                        this.props.stepAllShow? '' :
-                                            <Button onClick={()=>{
-                                                this.props.stepByStep(2)
-                                            }}><FormattedMessage id="previous-step"/></Button>
-                                    }
-                                    <Button type="primary" onClick={() => {
-                                        const id = idGen('notification');
-                                        this.ok(id, this.props.userID, this.props.projectID, this.props.notification, this.props.projectStatus);
-                                    }}><FormattedMessage id="save1"/></Button>
-                                </div>
-                    }
-                </div>
-            </div>
-        )
-
-    }
-}
-
-export default NotificationCardFetch;

+ 0 - 22
src/app/developVersion/common/manage/AliyunResult.js

@@ -1,22 +0,0 @@
-import React, {Component} from 'react';
-import {Switch, Input, Icon} from 'antd';
-import {FormattedMessage} from 'react-intl';
-
-class AliyunResult extends Component {
-    constructor(props) {
-        super(props);
-        this.state = {
-
-        }
-    }
-
-    render() {
-        return (
-            <div>
-                <p><b><FormattedMessage id="It is under development, please look forward to it. Thank you for your attention"/></b></p>
-            </div>
-        )
-    }
-}
-
-export default AliyunResult;

+ 0 - 22
src/app/developVersion/common/manage/AmazonResult.js

@@ -1,22 +0,0 @@
-import React, {Component} from 'react';
-import {Switch, Input, Icon} from 'antd';
-import {FormattedMessage} from 'react-intl';
-class AmazonResult extends Component {
-    constructor(props) {
-        super(props);
-        this.state = {
-            url: '1111',
-            checked: true
-        }
-    }
-
-    render() {
-        return (
-            <div>
-                <p><b><FormattedMessage id="It is under development, please look forward to it. Thank you for your attention"/></b></p>
-            </div>
-        )
-    }
-}
-
-export default AmazonResult;

+ 0 - 63
src/app/developVersion/common/manage/Manage.jsx

@@ -1,63 +0,0 @@
-import React, {Component} from 'react';
-import {FormattedMessage} from 'react-intl';
-import {Card} from 'antd';
-
-import TencentResult from './TencentResult';
-import AliyunResult from './AliyunResult';
-import AmazonResult from './AmazonResult';
-
-
-const tabListNoTitle =
-[{
-    key: 'tencent',
-    tab: <FormattedMessage id='Tencent'/>,
-}, {
-    key: 'aliyun',
-    tab: <FormattedMessage id='Aliyun'/>,
-}, {
-    key: 'amazon',
-    tab: <FormattedMessage id='AWS'/>,
-}];
-
-
-class Manage extends Component {
-    constructor(props) {
-        super(props);
-        this.state = {
-            cloud: 'tencent'
-        };
-    }
-
-    componentWillReceiveProps(next) {
-        this.setState({
-            projectID: next.projectID
-        })
-    }
-
-    render() {
-        const contentListNoTitle = {
-            tencent: <TencentResult userID={this.props.userID} projectID={this.props.projectID} trialcase={this.props.trialcase} switchMenu={this.props.switchMenu} kind={this.props.kind}/>,
-            aliyun: <AliyunResult/>,
-            amazon: <AmazonResult/>,
-        };
-
-        return (
-            <div>
-                <Card
-                    style={{width: '100%'}}
-                    tabList={tabListNoTitle}
-                    activeTabKey={this.state.cloud}
-                    onTabChange={(cloud) => {
-                        this.setState({
-                            cloud
-                        })
-                    }}
-                >
-                    {contentListNoTitle[this.state.cloud]}
-                </Card>
-            </div>
-        )
-    }
-}
-
-export default Manage;

+ 0 - 403
src/app/developVersion/common/manage/TencentResult.js

@@ -1,403 +0,0 @@
-import React, {Component} from 'react';
-import {FormattedMessage} from 'react-intl';
-import {Switch, Input, Icon, Spin, Row, Col, message} from 'antd';
-import {
-    DELETE_APIGWPATH,
-    DELETE_APIGROUP,
-    GET_PROJECT,
-    SHOW_APIGWPATH,
-    UPDATE_APIGROUP,
-    UPDATE_PROJECT_ONLY_STATUS
-} from "../../../../gql";
-import {request} from 'graphql-request'
-import gql from "graphql-tag";
-import {Query, Mutation} from "react-apollo";
-import copy from 'copy-to-clipboard';
-import axios from 'axios';
-import {removeAPI, graphqlUrl} from "../../../../config";
-
-axios.defaults.withCredentials = true;
-
-class TencentResult extends Component {
-    constructor(props) {
-        super(props);
-        this.state = {}
-    }
-
-    render() {
-        let projectID = this.props.projectID ? this.props.projectID : this.props.kind === 'graphql' ? 'ecommerce_projectID' : 'ecommerce_projectID_wx';
-        return (
-            <Query query={gql(GET_PROJECT)} variables={{id: projectID}} fetchPolicy={'network-only'}>
-                {
-                    ({loading, error, data}) => {
-                        if (loading) {
-                            return <Spin style={{marginLeft: 3}}/>
-                        }
-                        if (error) {
-                            return 'error!';
-                        }
-                        let group = data.project_by_id.apiGWGroup_id || {};
-                        let projectType = data.project_by_id.projectType || 'graphql';
-                        let projectStatus = data.project_by_id.projectStatus || 'created';
-                        let cloudID = data.project_by_id.cloud_id || 'tencent_CloudID';
-                        return (
-                            <div>
-                                {
-                                    projectStatus === 'deployed'?
-                                        <div>
-                                            <div className={'schema-name'}><FormattedMessage id='service manage'/></div>
-                                            <div className={'schema-table-list-title'}>
-                                                <Row>
-                                                    <Col span={4}><span className={'schema-table-title'}><FormattedMessage id='groupName'/></span></Col>
-                                                    <Col span={10}><span className={'schema-table-title'}><FormattedMessage id='defaultDomain'/></span></Col>
-                                                    <Col span={3}><span className={'schema-table-title'}><FormattedMessage id='frontType'/></span></Col>
-                                                    <Col span={4}><span className={'schema-table-title'}><FormattedMessage id='environmentName'/></span></Col>
-                                                    <Col span={3}><span className={'schema-table-title'}><FormattedMessage id='operation'/></span></Col>
-                                                </Row>
-                                            </div>
-                                            <div className={'schema-table-list-content'}>
-                                                <Row>
-                                                    <Col span={4}>
-                                                        <span className={'schema-table-content'}>{group.serviceId}</span>
-                                                    </Col>
-                                                    <Col span={10}>
-                                                        <span className={'schema-table-content'}>{group.defaultDomain} </span>
-                                                        <Icon type="copy" theme="twoTone" onClick={() => {
-                                                            copy(group.defaultDomain);
-                                                            message.success('复制成功.');
-                                                        }}/>
-                                                    </Col>
-                                                    <Col span={3}>
-                                                        <span className={'schema-table-content'}>{group.frontType}</span>
-                                                    </Col>
-                                                    <Col span={4}>
-                                                        <span className={'schema-table-content'}>{group.environmentName}</span>
-                                                    </Col>
-                                                    <Col span={3}>
-                                                    <span className={'schema-table-content'}>
-                                                        {
-                                                            this.props.trialcase?
-                                                                <Switch checked={true} disabled/>
-                                                                :
-                                                                <SwitchStatus group={group}/>
-                                                        }
-                                                        &nbsp;
-                                                        {
-                                                            this.props.trialcase ?
-                                                                ''
-                                                                :
-                                                                <DeleteGroupSpan
-                                                                cloudID={cloudID}
-                                                                groupID={group.id}
-                                                                projectID={projectID}
-                                                                userID={this.props.userID}
-                                                            />
-                                                        }
-                                                    </span>
-                                                    </Col>
-                                                </Row>
-                                            </div>
-                                            <div style={{marginTop: 30}}>
-                                                <div className={'schema-name'}><FormattedMessage id='API manage'/></div>
-                                                <APIGWPathResult
-                                                    group={group}
-                                                    projectType={projectType}
-                                                    switchMenu={this.props.switchMenu}
-                                                    cloudID={cloudID}
-                                                    projectID={projectID}
-                                                    userID={this.props.userID}
-                                                    trialcase={this.props.trialcase}
-                                                />
-                                            </div>
-                                        </div>
-                                        :
-                                        projectStatus === 'updated'?
-                                            <FormattedMessage id='deploy updated'/>
-                                            :
-                                            <FormattedMessage id='No deploy'/>
-                                }
-                            </div>
-                        )
-                    }
-                }
-            </Query>
-        )
-    }
-}
-
-export default TencentResult;
-
-class SwitchStatus extends Component {
-    constructor(props) {
-        super(props);
-        this.state = {
-            checked: props.group.userStatus === 'open'
-        }
-    }
-
-    componentWillReceiveProps(next) {
-        this.setState({
-            checked: next.group.userStatus === 'open'
-        })
-    }
-
-    render() {
-        let {group} = this.props;
-        let {id, userDomain, groupName, frontType, region, environmentName} = group;
-        return (
-            <div style={{display: 'inline', marginRight: '10px'}}>
-                <Mutation
-                    mutation={gql(UPDATE_APIGROUP)}
-                    onCompleted={(data) => {
-                        this.setState({
-                            checked: data.update_apiGWGroup.userStatus === 'open'
-                        })
-                    }}
-                >
-
-                    {(update_apiGWGroup, {loading, error}) => {
-                        if (loading)
-                            return <Spin style={{marginLeft: 30, marginTop: 10}}/>;
-                        if (error)
-                            return 'error';
-                        return (
-                            <Switch checked={this.state.checked} onChange={(checked) => {
-                                update_apiGWGroup({
-                                    variables: {
-                                        id,
-                                        userStatus: checked ? 'open' : 'close',
-                                        userDomain,
-                                        groupName,
-                                        frontType,
-                                        region,
-                                        environmentName,
-                                        updatedAt: new Date().getTime()
-                                    }
-                                })
-                            }}/>
-                        )
-                    }}
-                </Mutation>
-            </div>
-        )
-    }
-}
-
-class APIGWPathResult extends Component {
-    constructor(props) {
-        super(props);
-        this.state = {}
-    }
-
-    render() {
-        let {group, projectType} = this.props;
-        let {id} = group;
-        return (
-            <Query query={gql(SHOW_APIGWPATH)} variables={{apiGWGroup_id: id}} fetchPolicy={'network-only'}>
-                {
-                    ({loading, error, data}) => {
-                        if (loading) {
-                            return <Spin style={{marginLeft: 3}}/>
-                        }
-                        if (error) {
-                            return 'error!';
-                        }
-                        let paths = data.apiGWPath_by_props || [];
-                        return (
-                            <div>
-                                {
-                                    Object.keys(paths).length !== 0 ?
-                                        <div>
-                                            <div className={'schema-table-list-title'}>
-                                                <Row>
-                                                    <Col span={6}><span className={'schema-table-title'}><FormattedMessage id='name'/></span></Col>
-                                                    <Col span={6}><span className={'schema-table-title'}><FormattedMessage id='path'/></span></Col>
-                                                    <Col span={3}><span className={'schema-table-title'}><FormattedMessage id='method'/></span></Col>
-                                                    <Col span={6}><span className={'schema-table-title'}><FormattedMessage id='description'/></span></Col>
-                                                    <Col span={3}><span className={'schema-table-title'}><FormattedMessage id='operation'/></span></Col>
-                                                </Row>
-                                            </div>
-                                            {
-                                                paths.map(path => (
-                                                    <div key={path.apiGWPath} className={'schema-table-list-content'}>
-                                                        <Row>
-                                                            <Col span={6}>
-                                                                <span className={'schema-table-content'}>{path.apiGWName}</span>
-                                                            </Col>
-                                                            <Col span={6}>
-                                                                <span className={'schema-table-content'}>{path.apiGWPath}</span>
-                                                            </Col>
-                                                            <Col span={3}>
-                                                                <span className={'schema-table-content'}>{path.requestMethod}</span>
-                                                            </Col>
-                                                            <Col span={6}>
-                                                                <span className={'schema-table-content'}>{path.apiGWDesc}</span>
-                                                            </Col>
-                                                            <Col span={3}>
-                                                                {
-                                                                    projectType === 'graphql'?
-                                                                        <span className={'schema-table-content name'}
-                                                                              onClick={() => {
-                                                                                  this.props.switchMenu('menuLevel2', {key: 'graphiql'});
-                                                                              }}>
-                                                                            <FormattedMessage id='try'/>
-                                                                        </span>
-                                                                        :
-                                                                        ''
-                                                                }
-                                                                &nbsp;
-                                                                {
-                                                                    this.props.trialcase?
-                                                                        ''
-                                                                        :
-                                                                        <DeletePathSpan
-                                                                            cloudID={this.props.cloudID}
-                                                                            groupID={id}
-                                                                            path={path}
-                                                                            projectID={this.props.projectID}
-                                                                            userID={this.props.userID}
-                                                                        />
-                                                                }
-
-                                                            </Col>
-                                                        </Row>
-                                                    </div>
-                                                ))
-                                            }
-                                        </div>
-                                        :
-                                        '路径不存在'
-                                }
-                            </div>
-
-                        )
-                    }
-                }
-            </Query>
-        )
-    }
-}
-
-class DeletePathSpan extends Component {
-    constructor(props) {
-        super(props);
-        this.state = {
-
-        }
-    }
-
-    render() {
-        return (
-            <Mutation
-                mutation={gql(DELETE_APIGWPATH)}
-                refetchQueries={[{query: gql(SHOW_APIGWPATH), variables: {apiGWGroup_id: this.props.groupID}}]}
-            >
-                {(delete_apiGWPath, {loading, error}) => {
-                    if (error)
-                        return 'error';
-                    if (loading)
-                        return <Spin style={{marginLeft: 3}}/>;
-
-                    return (
-                        <span className={'schema-table-content name'} onClick={() => {
-                                  let _this = this;
-                                  axios.get(`${removeAPI}`, {
-                                      params: {
-                                          'cloud-id': `${_this.props.cloudID}`,
-                                          'group-id': `${_this.props.groupID}`,
-                                          'api-id': `${_this.props.path.id}`
-                                      }
-                                  })
-                                      .then((res) => {
-                                          console.log('delete api');
-                                          if (res.data !== '') {
-
-                                              console.log('path id', _this.props.path.id, 'user id', _this.props.userID);
-
-                                              delete_apiGWPath({variables: {id:_this.props.path.id, user_id: _this.props.userID}});
-
-                                              // 写回 project 状态
-                                              request(graphqlUrl, UPDATE_PROJECT_ONLY_STATUS, {
-                                                  id: this.props.projectID,
-                                                  updatedAt: new Date().getTime(),
-                                                  projectStatus: 'grouped'
-                                              });
-
-                                              console.log(res.data);
-                                          } else {
-                                              console.log('error');
-                                          }
-                                      })
-                                      .catch((err) => {
-                                          console.log(err);
-                                      });
-                              }}
-                        >
-                            删除
-                        </span>
-                    )
-                }}
-            </Mutation>
-        )
-    }
-}
-
-class DeleteGroupSpan extends Component {
-    constructor(props) {
-        super(props);
-        this.state = {
-        }
-    }
-
-    render() {
-        let {projectID, cloudID, groupID, userID} = this.props;
-        return (
-            <Mutation
-                mutation={gql(DELETE_APIGROUP)}
-                refetchQueries={[{query: gql(GET_PROJECT), variables: {id: projectID}}]}
-            >
-                {(delete_apiGWGroup, {loading, error}) => {
-                    if (error)
-                        return 'error';
-                    if (loading)
-                        return <Spin style={{marginLeft: 3}}/>;
-
-                    return (
-                        <span className={'schema-table-content name'} onClick={() => {
-                            axios.get(`${removeAPI}`, {
-                                params: {
-                                    'cloud-id': `${cloudID}`,
-                                    'group-id': `${groupID}`,
-                                }
-                            })
-                                .then((res) => {
-                                    console.log('delete service');
-                                    if (res.data !== '') {
-
-                                        delete_apiGWGroup({variables: {id: groupID, user_id: userID}});
-
-                                        // 写回 project 状态
-                                        request(graphqlUrl, UPDATE_PROJECT_ONLY_STATUS, {
-                                            id: projectID,
-                                            updatedAt: new Date().getTime(),
-                                            projectStatus: 'functioned'
-                                        });
-
-                                        console.log(res.data);
-                                    } else {
-                                        console.log('error');
-                                    }
-                                })
-                                .catch((err) => {
-                                    console.log(err);
-                                });
-                        }}
-                        >
-                            删除
-                        </span>
-                    )
-                }}
-            </Mutation>
-        )
-    }
-}

+ 0 - 115
src/app/developVersion/graphqlService/TrialCase.jsx

@@ -1,115 +0,0 @@
-import React, {Component} from 'react';
-import {Layout, Menu} from 'antd';
-import {FormattedMessage} from 'react-intl';
-
-import GenerateJs from "./component/generateJs/GenerateJs";
-import Deploy from '../common/deploy/Deploy';
-import Manage from '../common/manage/Manage';
-import Schema from './component/schema/Schema';
-import Graphql from "./component/graphql/Graphql";
-import CaseMetabase from "./component/caseMetabase/CaseMetabase";
-import Application from "./component/application/Application";
-import axios from 'axios';
-import {getIdUrl} from "../../../config";
-import classnames from 'classnames';
-
-axios.defaults.withCredentials = true;
-
-const {Content} = Layout;
-
-class TrialCase extends Component {
-    constructor(props) {
-        super(props);
-        this.state = {
-            menuLevel2: "preview",
-            // default user
-            userID: "ioobot",
-            showPadding: true,
-            api: ''
-        }
-    }
-
-    switchMenu = (menuName, e) => {
-        this.setState({
-            [menuName]: e.key,
-        });
-    };
-
-    switchAPI = (api) => {
-        this.setState({
-            api
-        })
-    };
-
-    componentWillMount() {
-        let _this = this;
-        axios.get(getIdUrl)
-            .then((res) => {
-                if (res.data !== '') {
-                    _this.setState({
-                        userID: res.data
-                    })
-                }
-            })
-            .catch(function (err) {
-                console.log(err);
-            });
-    }
-
-    render() {
-        let schemaID = this.props.location.state ? this.props.location.state.schemaID : "ecommerce_schemaID";
-        let schemaName = this.props.location.state ? this.props.location.state.schemaName : "ecommerce";
-        let projectID = this.props.location.state ? this.props.location.state.projectID : "";
-        return (
-            <div>
-                <Menu
-                    mode="horizontal"
-                    defaultSelectedKeys={['preview']}
-                    style={{padding: '0 24px', position: 'fixed', width: '100%', zIndex: '5',lineHeight:'50px',fontWeight:600}}
-                    onClick={(e) => this.switchMenu('menuLevel2', e)}
-                    selectedKeys={[this.state.menuLevel2]}
-                >
-                    <Menu.Item key="preview"><FormattedMessage id="preview"/></Menu.Item>
-                    <Menu.Item key="schema"><FormattedMessage id="schema"/></Menu.Item>
-                    <Menu.Item key="deploy"><FormattedMessage id="deploy"/></Menu.Item>
-                    <Menu.Item key="manage"><FormattedMessage id="manage"/></Menu.Item>
-                    <Menu.Item key="graphiql"><FormattedMessage id="graphql IDE"/></Menu.Item>
-                    <Menu.Item key="template"><FormattedMessage id="template"/></Menu.Item>
-                    <Menu.Item key="metabase"><FormattedMessage id="metabase"/></Menu.Item>
-                </Menu>
-
-
-                <Layout style={{padding: '24px', zIndex: '0'}}>
-                    <Content className={classnames({'layout-content': this.state.showPadding})}>
-                        {
-                            (() => {
-                                switch (this.state.menuLevel2) {
-                                    case 'schema':
-                                        return <Schema trialcase={true} userID={this.state.userID} projectID={projectID} schemaName={schemaName} schemaID={schemaID} history={this.props.history} location={this.props.location}/>;
-                                    case 'deploy':
-                                        return <Deploy trialcase={true} userID={this.state.userID} projectID={projectID} kind={'graphql'}/>;
-                                    case 'manage':
-                                        return <Manage trialcase={true} userID={this.state.userID} projectID={projectID} switchMenu={this.switchMenu} kind={'graphql'}/>;
-                                    case 'graphiql':
-                                        return <Graphql api={this.state.api} projectID={projectID}/>;
-                                    case 'template':
-                                        return <GenerateJs schemaID={schemaID} schemaName={schemaName}/>;
-                                    case 'preview':
-                                        return <Application location={this.props.location}/>;
-                                    case 'metabase':
-                                        return <CaseMetabase/>;
-                                    default:
-                                        return <Graphql/>;
-                                }
-                            })()
-                        }
-
-                    </Content>
-                </Layout>
-            </div>
-        )
-    }
-}
-
-export default TrialCase;
-

+ 0 - 109
src/app/developVersion/graphqlService/UserCreate.jsx

@@ -1,109 +0,0 @@
-import React, {Component} from 'react';
-import {Layout, Menu} from 'antd';
-import {FormattedMessage} from 'react-intl';
-
-import GenerateJs from "./component/generateJs/GenerateJs";
-import Deploy from '../common/deploy/Deploy';
-import Manage from '../common/manage/Manage';
-import Schema from './component/schema/Schema';
-import Graphql from "./component/graphql/Graphql";
-import CaseMetabase from "./component/caseMetabase/CaseMetabase";
-import axios from 'axios';
-import {getIdUrl} from "../../../config";
-import Application from "./component/application/Application";
-
-axios.defaults.withCredentials = true;
-
-const {Content} = Layout;
-
-class UserCreate extends Component {
-    constructor(props) {
-        super(props);
-        this.state = {
-            menuLevel2: "schema",
-            userID: "",
-            api: ''
-        }
-    }
-
-    componentWillMount() {
-        let _this = this;
-        axios.get(getIdUrl)
-            .then((res) => {
-                if (res.data !== '') {
-                    _this.setState({
-                        userID: res.data
-                    })
-                }
-            })
-            .catch(function (err) {
-                console.log(err);
-            });
-    }
-
-    switchMenu = (menuName, e) => {
-        this.setState({
-            [menuName]: e.key,
-        });
-    };
-
-    switchAPI = (api) => {
-        this.setState({
-            api
-        })
-    };
-
-    render() {
-        let schemaID = this.props.location.state ? this.props.location.state.schemaID : "ecommerce_schemaID";
-        let schemaName = this.props.location.state ? this.props.location.state.schemaName : "ecommerce";
-        let projectID = this.props.location.state ? this.props.location.state.projectID : "";
-        return (
-            <div>
-                <Menu
-                    mode="horizontal"
-                    defaultSelectedKeys={['schema']}
-                    style={{padding: '0 24px', position: 'fixed', width: '100%', zIndex: '5',lineHeight:'50px',fontWeight:600}}
-                    onClick={(e) => this.switchMenu('menuLevel2', e)}
-                    selectedKeys={[this.state.menuLevel2]}
-                >
-                    <Menu.Item key="schema"><FormattedMessage id="schema"/></Menu.Item>
-                    <Menu.Item key="deploy"><FormattedMessage id="deploy"/></Menu.Item>
-                    <Menu.Item key="manage"><FormattedMessage id="manage"/></Menu.Item>
-                    <Menu.Item key="graphiql"><FormattedMessage id="graphql IDE"/></Menu.Item>
-                    <Menu.Item key="template"><FormattedMessage id="template"/></Menu.Item>
-                    <Menu.Item key="metabase"><FormattedMessage id="metabase"/></Menu.Item>
-                </Menu>
-
-
-                <Layout style={{padding: '24px', zIndex: '0'}}>
-                    <Content style={{padding: '24px', minHeight: 280, background: '#fff', marginTop: '48px'}}>
-                        {
-                            (() => {
-                                switch (this.state.menuLevel2) {
-                                    case 'schema':
-                                        return <Schema trialcase={false} userID={this.state.userID} projectID={projectID} schemaName={schemaName} schemaID={schemaID} history={this.props.history} location={this.props.location}/>;
-                                    case 'deploy':
-                                        return <Deploy trialcase={false} userID={this.state.userID} projectID={projectID}/>;
-                                    case 'manage':
-                                        return <Manage trialcase={false} userID={this.state.userID} projectID={projectID} switchMenu={this.switchMenu}/>;
-                                    case 'graphiql':
-                                        return <Graphql api={this.state.api} projectID={projectID}/>;
-                                    case 'template':
-                                        return <GenerateJs schemaID={schemaID} schemaName={schemaName}/>;
-                                    case 'metabase':
-                                        return <CaseMetabase/>;
-                                    default:
-                                        return <Application location={this.props.location}/>;
-                                }
-                            })()
-                        }
-
-                    </Content>
-                </Layout>
-            </div>
-        )
-    }
-}
-
-export default UserCreate;
-

+ 0 - 24
src/app/developVersion/graphqlService/component/application/Application.js

@@ -1,24 +0,0 @@
-import React, {Component} from 'react';
-import ShopApp from '../../../../../case/ShopApp/src/index'
-import BillApp from '../../../../../case/BillApp/src/App'
-import OrderApp from '../../../../../case/OrderApp/src/index'
-class Application extends Component {
-
-    render() {
-        let schemaName = this.props.location.state ? this.props.location.state.schemaName : 'e-commerce';
-        return (
-            <div style={{height: '100%'}}>
-                {
-                    schemaName === "appointment template" ?
-                        <OrderApp/> :
-                        schemaName === 'account template'?
-                            <BillApp /> :
-                                <ShopApp />
-
-                }
-            </div>
-        )
-    }
-}
-
-export default Application;

+ 0 - 19
src/app/developVersion/graphqlService/component/caseMetabase/CaseMetabase.jsx

@@ -1,19 +0,0 @@
-import React, {Component} from 'react';
-import {FormattedMessage} from 'react-intl';
-
-import './index.css';
-
-class CaseMetabase extends Component {
-
-
-    render() {
-        return (
-            <div>
-                <p><b><FormattedMessage id="It is under development, please look forward to it. Thank you for your attention"/></b></p>
-                {/*Only members to use this website.*/}
-            </div>
-        )
-    }
-}
-
-export default CaseMetabase;

+ 0 - 3
src/app/developVersion/graphqlService/component/caseMetabase/index.css

@@ -1,3 +0,0 @@
-p {
-    font-size: 16px;
-}

+ 0 - 178
src/app/developVersion/graphqlService/component/generateJs/GenerateJs.jsx

@@ -1,178 +0,0 @@
-import React, {Component} from 'react';
-import {FormattedMessage} from 'react-intl';
-import axios from 'axios';
-import {BackTop, Tabs, Button, Spin, Alert} from 'antd';
-import saveAs from 'file-saver';
-import beautify from 'js-beautify';
-import {genJsUrl} from '../../../../../config';
-
-import './index.css';
-
-const TabPane = Tabs.TabPane;
-axios.defaults.withCredentials = true;
-
-class GenerateJs extends Component {
-    constructor(props) {
-        super(props);
-        this.state = {
-            schemaID: props.schemaID,
-            schemaName: props.schemaName,
-            graphqlJs: '',
-            show: false
-        };
-    }
-
-    componentDidMount() {
-        this._isMounted = true;
-        let _this = this;
-        let {schemaID} = this.state;
-        axios.get(`${genJsUrl}?schema=${schemaID}`)
-            .then((res) => {
-                if (this._isMounted) {
-                    if (res.data !== '') {
-                        // console.log('js res', res.data);
-                        let graphqlJs = beautify(res.data, {indent_size: 2, space_in_empty_paren: true});
-                        // console.log('beautify graphqlJs',graphqlJs);
-                        _this.setState({
-                            graphqlJs,
-                            show: true
-                        });
-                    } else {
-                        _this.setState({
-                            show: true
-                        })
-                    }
-                }
-            })
-            .catch((err) => {
-                console.log(err);
-            });
-    }
-
-    componentWillReceiveProps(next) {
-        this.setState({
-            schemaID: next.schemaID,
-        });
-    }
-
-    componentDidUpdate() {
-        this._isMounted = true;
-        let _this = this;
-        let {schemaID} = this.state;
-        // axios.get(`${genJsUrl}?schema=${'onlineSchema'}`)
-        // axios.get(`${genJsUrl}?schema=${'commentsSchema'}`)
-        // axios.get(`${genJsUrl}?schema=${'order_schemaID'}`)
-        axios.get(`${genJsUrl}?schema=${schemaID}`)
-            .then((res) => {
-                if (this._isMounted) {
-                    if (res.data !== '') {
-                        // console.log('js res', res.data);
-                        let graphqlJs = beautify(res.data, {indent_size: 2, space_in_empty_paren: true});
-                        // console.log('beautify graphqlJs',graphqlJs);
-                        _this.setState({
-                            graphqlJs,
-                            show: true
-                        });
-                    } else {
-                        _this.setState({
-                            show: true
-                        })
-                    }
-                }
-            })
-            .catch((err) => {
-                console.log(err);
-            });
-    }
-
-    componentWillUnmount() {
-        this._isMounted = false;
-    }
-
-    saveFile = () => {
-        let {schemaName, graphqlJs} = this.state;
-        let blob = new Blob([graphqlJs], {type: "text/plain;charset=utf-8"});
-        saveAs(blob, `${schemaName}_graphql.js`);
-    };
-
-    render() {
-        let {graphqlJs} = this.state;
-        let queryList = [];
-        let mutationList = [];
-        let graphqlJsList = beautify(graphqlJs, {indent_size: 2, space_in_empty_paren: true});
-        // console.log('beautify graphqlJs',graphqlJsList);
-        graphqlJsList.split("}\n}\n").forEach((item) => {
-            if (item.indexOf('query') > -1) queryList.push(item + "}\n}\n");
-            else mutationList.push(item + "}\n}\n");
-        });
-
-        return (
-            <div>
-                <Tabs
-                    defaultActiveKey="query"
-                    tabPosition="left"
-                >
-                    <TabPane tab="Query" key="query">
-                        <div className='download-button'>
-                            <Button type="primary" style={{float: 'right'}} onClick={() => this.saveFile()}>
-                                <FormattedMessage id="Download"/>
-                            </Button>
-                        </div>
-                        <br/>
-                        {this.state.show ?
-                            <GraphqlJs graphqlList={queryList}/>
-                            :
-                            <Loading/>
-                        }
-                    </TabPane>
-
-                    <TabPane tab="Mutation" key="mutation">
-                        <div className='download-button'>
-                            <Button type="primary" style={{float: 'right'}} onClick={() => this.saveFile()}>
-                                <FormattedMessage id="Download"/>
-                            </Button>
-                        </div>
-                        <br/>
-                        {this.state.show ?
-                            <GraphqlJs graphqlList={mutationList}/>
-                            :
-                            <Loading/>
-                        }
-                    </TabPane>
-                </Tabs>
-                <div>
-                    <BackTop/>
-                </div>
-            </div>
-        )
-    }
-}
-
-export default GenerateJs;
-
-const GraphqlJs = (props) => {
-    return (
-        <div>
-            <pre>
-                <code>
-                    {props.graphqlList}
-                </code>
-            </pre>
-        </div>
-    );
-};
-
-const Loading = () => {
-    return (
-        <div style={{width: '100%', height: window.innerHeight - 164}}>
-            <Spin
-                tip={'loading...'}
-                style={{
-                    position: 'relative',
-                    top: '50%',
-                    left: '50%',
-                    transform: 'translate(-50%,-50%)'
-                }}/>
-        </div>
-    );
-};

+ 0 - 3
src/app/developVersion/graphqlService/component/generateJs/index.css

@@ -1,3 +0,0 @@
-.ant-back-top-content{
-    background-color: #1890ff;
-}

+ 0 - 89
src/app/developVersion/graphqlService/component/graphql/Graphql.jsx

@@ -1,89 +0,0 @@
-import React, {Component} from 'react';
-import {Input, Spin} from 'antd';
-import GraphiQL from "graphiql";
-import fetch from "isomorphic-fetch";
-import gql from "graphql-tag";
-import {Query} from "react-apollo";
-
-import {GET_PROJECT} from "../../../../../gql";
-
-class Graphql extends Component {
-    constructor(props) {
-        super(props);
-        this.state = {
-            api: props.api,
-            show: props.api !== ''
-        };
-    };
-
-    componentWillReceiveProps(next) {
-        this.setState({
-            api: next.api,
-            show: next.api !== ''
-        })
-    }
-
-    graphQLFetcher = (graphQLParams) => {
-        // 已经存在的 magazine api, 设想: 用户生成 schema,返回 api 自动替换这里
-        // return fetch(this.state.api, {
-        return fetch('http://service-dan6exu1-1254337200.ap-shanghai.apigateway.myqcloud.com/test/graphql', {
-            method: 'post',
-            headers: {'Content-Type': 'application/json'},
-            body: JSON.stringify(graphQLParams),
-        }).then(response => response.json());
-    };
-
-    render() {
-        let projectID = this.props.projectID ? this.props.projectID : 'ecommerce_projectID';
-        return (
-            <Query query={gql(GET_PROJECT)} variables={{id: projectID}} fetchPolicy={'network-only'}>
-                {
-                    ({loading, error, data}) => {
-                        if (loading) {
-                            return <Spin style={{marginLeft: 3}}/>
-                        }
-                        if (error) {
-                            return 'error!';
-                        }
-                        let group = data.project_by_id.apiGWGroup_id;
-
-                        if (this.state.api === '') {
-                            if (group !== null) {
-                                let domain = group.userDomain ? group.userDomain : (group.defaultDomain + '/' + group.environmentName);
-                                this.setState({
-                                    api: group.frontType.slice(0, 4) + '://' + domain + '/graphql',
-                                    show: true
-                                })
-                            } else {
-                                this.setState({
-                                    api: '尚未部署成功',
-                                    show: true
-                                })
-                            }
-                        }
-
-                        return (
-                            <div>
-                                <Input
-                                    style={{marginTop: 10}}
-                                    addonBefore="POST"
-                                    defaultValue={this.state.api}
-                                    onChange={(e) => {
-                                        this.setState({api: e.target.value})
-                                    }}/>
-                                {
-                                    this.state.show ?
-                                        <GraphiQL fetcher={this.graphQLFetcher}/>
-                                        :
-                                        ''
-                                }
-                            </div>
-                        )
-                    }
-                }
-            </Query>
-        )
-    }
-}
-
-export default Graphql;

+ 0 - 1767
src/app/developVersion/graphqlService/component/graphql/index.css

@@ -1,1767 +0,0 @@
-.graphiql-container,
-.graphiql-container button,
-.graphiql-container input {
-    color: #141823;
-    font-family:
-            system,
-            -apple-system,
-            'San Francisco',
-            '.SFNSDisplay-Regular',
-            'Segoe UI',
-            Segoe,
-            'Segoe WP',
-            'Helvetica Neue',
-            helvetica,
-            'Lucida Grande',
-            arial,
-            sans-serif;
-    font-size: 14px;
-}
-
-.graphiql-container {
-    display: -webkit-box;
-    display: -ms-flexbox;
-    display: flex;
-    -webkit-box-orient: horizontal;
-    -webkit-box-direction: normal;
-    -ms-flex-direction: row;
-    flex-direction: row;
-    height: 800px;
-    margin-top: 10px;
-    overflow: hidden;
-    width: 100%;
-}
-
-.graphiql-container .editorWrap {
-    display: -webkit-box;
-    display: -ms-flexbox;
-    display: flex;
-    -webkit-box-orient: vertical;
-    -webkit-box-direction: normal;
-    -ms-flex-direction: column;
-    flex-direction: column;
-    -webkit-box-flex: 1;
-    -ms-flex: 1;
-    flex: 1;
-    overflow-x: hidden;
-}
-
-.graphiql-container .title {
-    font-size: 18px;
-}
-
-.graphiql-container .title em {
-    font-family: georgia;
-    font-size: 19px;
-}
-
-.graphiql-container .topBarWrap {
-    display: -webkit-box;
-    display: -ms-flexbox;
-    display: flex;
-    -webkit-box-orient: horizontal;
-    -webkit-box-direction: normal;
-    -ms-flex-direction: row;
-    flex-direction: row;
-}
-
-.graphiql-container .topBar {
-    -webkit-box-align: center;
-    -ms-flex-align: center;
-    align-items: center;
-    background: -webkit-gradient(linear, left top, left bottom, from(#f7f7f7), to(#e2e2e2));
-    background: linear-gradient(#f7f7f7, #e2e2e2);
-    border-bottom: 1px solid #d0d0d0;
-    cursor: default;
-    display: -webkit-box;
-    display: -ms-flexbox;
-    display: flex;
-    -webkit-box-orient: horizontal;
-    -webkit-box-direction: normal;
-    -ms-flex-direction: row;
-    flex-direction: row;
-    -webkit-box-flex: 1;
-    -ms-flex: 1;
-    flex: 1;
-    height: 45px;
-    overflow-y: visible;
-    padding: 7px 14px 6px;
-    -webkit-user-select: none;
-    -moz-user-select: none;
-    -ms-user-select: none;
-    user-select: none;
-}
-
-.graphiql-container .toolbar {
-    overflow-x: visible;
-    display: -webkit-box;
-    display: -ms-flexbox;
-    display: flex;
-}
-
-.graphiql-container .docExplorerShow,
-.graphiql-container .historyShow {
-    background: -webkit-gradient(linear, left top, left bottom, from(#f7f7f7), to(#e2e2e2));
-    background: linear-gradient(#f7f7f7, #e2e2e2);
-    border-radius: 0;
-    border-bottom: 1px solid #d0d0d0;
-    border-right: none;
-    border-top: none;
-    color: #3B5998;
-    cursor: pointer;
-    font-size: 14px;
-    margin: 0;
-    outline: 0;
-    padding: 2px 20px 0 18px;
-}
-
-.graphiql-container .docExplorerShow {
-    border-left: 1px solid rgba(0, 0, 0, 0.2);
-}
-
-.graphiql-container .historyShow {
-    border-right: 1px solid rgba(0, 0, 0, 0.2);
-    border-left: 0;
-}
-
-.graphiql-container .docExplorerShow:before {
-    border-left: 2px solid #3B5998;
-    border-top: 2px solid #3B5998;
-    content: '';
-    display: inline-block;
-    height: 9px;
-    margin: 0 3px -1px 0;
-    position: relative;
-    -webkit-transform: rotate(-45deg);
-    transform: rotate(-45deg);
-    width: 9px;
-}
-
-.graphiql-container .editorBar {
-    display: -webkit-box;
-    display: -ms-flexbox;
-    display: flex;
-    -webkit-box-orient: horizontal;
-    -webkit-box-direction: normal;
-    -ms-flex-direction: row;
-    flex-direction: row;
-    -webkit-box-flex: 1;
-    -ms-flex: 1;
-    flex: 1;
-}
-
-.graphiql-container .queryWrap {
-    display: -webkit-box;
-    display: -ms-flexbox;
-    display: flex;
-    -webkit-box-orient: vertical;
-    -webkit-box-direction: normal;
-    -ms-flex-direction: column;
-    flex-direction: column;
-    -webkit-box-flex: 1;
-    -ms-flex: 1;
-    flex: 1;
-}
-
-.graphiql-container .resultWrap {
-    border-left: solid 1px #e0e0e0;
-    display: -webkit-box;
-    display: -ms-flexbox;
-    display: flex;
-    -webkit-box-orient: vertical;
-    -webkit-box-direction: normal;
-    -ms-flex-direction: column;
-    flex-direction: column;
-    -webkit-box-flex: 1;
-    -ms-flex: 1;
-    flex: 1;
-    position: relative;
-}
-
-.graphiql-container .docExplorerWrap,
-.graphiql-container .historyPaneWrap {
-    background: white;
-    -webkit-box-shadow: 0 0 8px rgba(0, 0, 0, 0.15);
-    box-shadow: 0 0 8px rgba(0, 0, 0, 0.15);
-    position: relative;
-    z-index: 3;
-}
-
-.graphiql-container .historyPaneWrap {
-    min-width: 230px;
-    z-index: 5;
-}
-
-.graphiql-container .docExplorerResizer {
-    cursor: col-resize;
-    height: 100%;
-    left: -5px;
-    position: absolute;
-    top: 0;
-    width: 10px;
-    z-index: 10;
-}
-
-.graphiql-container .docExplorerHide {
-    cursor: pointer;
-    font-size: 18px;
-    margin: -7px -8px -6px 0;
-    padding: 18px 16px 15px 12px;
-}
-
-.graphiql-container div .query-editor {
-    -webkit-box-flex: 1;
-    -ms-flex: 1;
-    flex: 1;
-    position: relative;
-}
-
-.graphiql-container .variable-editor {
-    display: -webkit-box;
-    display: -ms-flexbox;
-    display: flex;
-    -webkit-box-orient: vertical;
-    -webkit-box-direction: normal;
-    -ms-flex-direction: column;
-    flex-direction: column;
-    height: 30px;
-    position: relative;
-}
-
-.graphiql-container .variable-editor-title {
-    background: #eeeeee;
-    border-bottom: 1px solid #d6d6d6;
-    border-top: 1px solid #e0e0e0;
-    color: #777;
-    font-variant: small-caps;
-    font-weight: bold;
-    letter-spacing: 1px;
-    line-height: 14px;
-    padding: 6px 0 8px 43px;
-    text-transform: lowercase;
-    -webkit-user-select: none;
-    -moz-user-select: none;
-    -ms-user-select: none;
-    user-select: none;
-}
-
-.graphiql-container .codemirrorWrap {
-    -webkit-box-flex: 1;
-    -ms-flex: 1;
-    flex: 1;
-    height: 100%;
-    position: relative;
-}
-
-.graphiql-container .result-window {
-    -webkit-box-flex: 1;
-    -ms-flex: 1;
-    flex: 1;
-    height: 100%;
-    position: relative;
-}
-
-.graphiql-container .footer {
-    background: #f6f7f8;
-    border-left: 1px solid #e0e0e0;
-    border-top: 1px solid #e0e0e0;
-    margin-left: 12px;
-    position: relative;
-}
-
-.graphiql-container .footer:before {
-    background: #eeeeee;
-    bottom: 0;
-    content: " ";
-    left: -13px;
-    position: absolute;
-    top: -1px;
-    width: 12px;
-}
-
-/* No `.graphiql-container` here so themes can overwrite */
-.result-window .CodeMirror {
-    background: #f6f7f8;
-}
-
-.graphiql-container .result-window .CodeMirror-gutters {
-    background-color: #eeeeee;
-    border-color: #e0e0e0;
-    cursor: col-resize;
-}
-
-.graphiql-container .result-window .CodeMirror-foldgutter,
-.graphiql-container .result-window .CodeMirror-foldgutter-open:after,
-.graphiql-container .result-window .CodeMirror-foldgutter-folded:after {
-    padding-left: 3px;
-}
-
-.graphiql-container .toolbar-button {
-    background: #fdfdfd;
-    background: -webkit-gradient(linear, left top, left bottom, from(#f9f9f9), to(#ececec));
-    background: linear-gradient(#f9f9f9, #ececec);
-    border-radius: 3px;
-    -webkit-box-shadow:
-            inset 0 0 0 1px rgba(0,0,0,0.20),
-            0 1px 0 rgba(255,255,255, 0.7),
-            inset 0 1px #fff;
-    box-shadow:
-            inset 0 0 0 1px rgba(0,0,0,0.20),
-            0 1px 0 rgba(255,255,255, 0.7),
-            inset 0 1px #fff;
-    color: #555;
-    cursor: pointer;
-    display: inline-block;
-    margin: 0 5px;
-    padding: 3px 11px 5px;
-    text-decoration: none;
-    text-overflow: ellipsis;
-    white-space: nowrap;
-    max-width: 150px;
-}
-
-.graphiql-container .toolbar-button:active {
-    background: -webkit-gradient(linear, left top, left bottom, from(#ececec), to(#d5d5d5));
-    background: linear-gradient(#ececec, #d5d5d5);
-    -webkit-box-shadow:
-            0 1px 0 rgba(255, 255, 255, 0.7),
-            inset 0 0 0 1px rgba(0,0,0,0.10),
-            inset 0 1px 1px 1px rgba(0, 0, 0, 0.12),
-            inset 0 0 5px rgba(0, 0, 0, 0.1);
-    box-shadow:
-            0 1px 0 rgba(255, 255, 255, 0.7),
-            inset 0 0 0 1px rgba(0,0,0,0.10),
-            inset 0 1px 1px 1px rgba(0, 0, 0, 0.12),
-            inset 0 0 5px rgba(0, 0, 0, 0.1);
-}
-
-.graphiql-container .toolbar-button.error {
-    background: -webkit-gradient(linear, left top, left bottom, from(#fdf3f3), to(#e6d6d7));
-    background: linear-gradient(#fdf3f3, #e6d6d7);
-    color: #b00;
-}
-
-.graphiql-container .toolbar-button-group {
-    margin: 0 5px;
-    white-space: nowrap;
-}
-
-.graphiql-container .toolbar-button-group > * {
-    margin: 0;
-}
-
-.graphiql-container .toolbar-button-group > *:not(:last-child) {
-    border-top-right-radius: 0;
-    border-bottom-right-radius: 0;
-}
-
-.graphiql-container .toolbar-button-group > *:not(:first-child) {
-    border-top-left-radius: 0;
-    border-bottom-left-radius: 0;
-    margin-left: -1px;
-}
-
-.graphiql-container .execute-button-wrap {
-    height: 34px;
-    margin: 0 14px 0 28px;
-    position: relative;
-}
-
-.graphiql-container .execute-button {
-    background: -webkit-gradient(linear, left top, left bottom, from(#fdfdfd), to(#d2d3d6));
-    background: linear-gradient(#fdfdfd, #d2d3d6);
-    border-radius: 17px;
-    border: 1px solid rgba(0,0,0,0.25);
-    -webkit-box-shadow: 0 1px 0 #fff;
-    box-shadow: 0 1px 0 #fff;
-    cursor: pointer;
-    fill: #444;
-    height: 34px;
-    margin: 0;
-    padding: 0;
-    width: 34px;
-}
-
-.graphiql-container .execute-button svg {
-    pointer-events: none;
-}
-
-.graphiql-container .execute-button:active {
-    background: -webkit-gradient(linear, left top, left bottom, from(#e6e6e6), to(#c3c3c3));
-    background: linear-gradient(#e6e6e6, #c3c3c3);
-    -webkit-box-shadow:
-            0 1px 0 #fff,
-            inset 0 0 2px rgba(0, 0, 0, 0.2),
-            inset 0 0 6px rgba(0, 0, 0, 0.1);
-    box-shadow:
-            0 1px 0 #fff,
-            inset 0 0 2px rgba(0, 0, 0, 0.2),
-            inset 0 0 6px rgba(0, 0, 0, 0.1);
-}
-
-.graphiql-container .execute-button:focus {
-    outline: 0;
-}
-
-.graphiql-container .toolbar-menu,
-.graphiql-container .toolbar-select {
-    position: relative;
-}
-
-.graphiql-container .execute-options,
-.graphiql-container .toolbar-menu-items,
-.graphiql-container .toolbar-select-options {
-    background: #fff;
-    -webkit-box-shadow:
-            0 0 0 1px rgba(0,0,0,0.1),
-            0 2px 4px rgba(0,0,0,0.25);
-    box-shadow:
-            0 0 0 1px rgba(0,0,0,0.1),
-            0 2px 4px rgba(0,0,0,0.25);
-    margin: 0;
-    padding: 6px 0;
-    position: absolute;
-    z-index: 100;
-}
-
-.graphiql-container .execute-options {
-    min-width: 100px;
-    top: 37px;
-    left: -1px;
-}
-
-.graphiql-container .toolbar-menu-items {
-    left: 1px;
-    margin-top: -1px;
-    min-width: 110%;
-    top: 100%;
-    visibility: hidden;
-}
-
-.graphiql-container .toolbar-menu-items.open {
-    visibility: visible;
-}
-
-.graphiql-container .toolbar-select-options {
-    left: 0;
-    min-width: 100%;
-    top: -5px;
-    visibility: hidden;
-}
-
-.graphiql-container .toolbar-select-options.open {
-    visibility: visible;
-}
-
-.graphiql-container .execute-options > li,
-.graphiql-container .toolbar-menu-items > li,
-.graphiql-container .toolbar-select-options > li {
-    cursor: pointer;
-    display: block;
-    margin: none;
-    max-width: 300px;
-    overflow: hidden;
-    padding: 2px 20px 4px 11px;
-    text-overflow: ellipsis;
-    white-space: nowrap;
-}
-
-.graphiql-container .execute-options > li.selected,
-.graphiql-container .toolbar-menu-items > li.hover,
-.graphiql-container .toolbar-menu-items > li:active,
-.graphiql-container .toolbar-menu-items > li:hover,
-.graphiql-container .toolbar-select-options > li.hover,
-.graphiql-container .toolbar-select-options > li:active,
-.graphiql-container .toolbar-select-options > li:hover,
-.graphiql-container .history-contents > p:hover,
-.graphiql-container .history-contents > p:active {
-    background: #e10098;
-    color: #fff;
-}
-
-.graphiql-container .toolbar-select-options > li > svg {
-    display: inline;
-    fill: #666;
-    margin: 0 -6px 0 6px;
-    pointer-events: none;
-    vertical-align: middle;
-}
-
-.graphiql-container .toolbar-select-options > li.hover > svg,
-.graphiql-container .toolbar-select-options > li:active > svg,
-.graphiql-container .toolbar-select-options > li:hover > svg {
-    fill: #fff;
-}
-
-.graphiql-container .CodeMirror-scroll {
-    overflow-scrolling: touch;
-}
-
-.graphiql-container .CodeMirror {
-    color: #141823;
-    font-family:
-            'Consolas',
-            'Inconsolata',
-            'Droid Sans Mono',
-            'Monaco',
-            monospace;
-    font-size: 13px;
-    height: 100%;
-    left: 0;
-    position: absolute;
-    top: 0;
-    width: 100%;
-}
-
-.graphiql-container .CodeMirror-lines {
-    padding: 20px 0;
-}
-
-.CodeMirror-hint-information .content {
-    box-orient: vertical;
-    color: #141823;
-    display: -webkit-box;
-    display: -ms-flexbox;
-    display: flex;
-    font-family: system, -apple-system, 'San Francisco', '.SFNSDisplay-Regular', 'Segoe UI', Segoe, 'Segoe WP', 'Helvetica Neue', helvetica, 'Lucida Grande', arial, sans-serif;
-    font-size: 13px;
-    line-clamp: 3;
-    line-height: 16px;
-    max-height: 48px;
-    overflow: hidden;
-    text-overflow: -o-ellipsis-lastline;
-}
-
-.CodeMirror-hint-information .content p:first-child {
-    margin-top: 0;
-}
-
-.CodeMirror-hint-information .content p:last-child {
-    margin-bottom: 0;
-}
-
-.CodeMirror-hint-information .infoType {
-    color: #CA9800;
-    cursor: pointer;
-    display: inline;
-    margin-right: 0.5em;
-}
-
-.autoInsertedLeaf.cm-property {
-    -webkit-animation-duration: 6s;
-    animation-duration: 6s;
-    -webkit-animation-name: insertionFade;
-    animation-name: insertionFade;
-    border-bottom: 2px solid rgba(255, 255, 255, 0);
-    border-radius: 2px;
-    margin: -2px -4px -1px;
-    padding: 2px 4px 1px;
-}
-
-@-webkit-keyframes insertionFade {
-    from, to {
-        background: rgba(255, 255, 255, 0);
-        border-color: rgba(255, 255, 255, 0);
-    }
-
-    15%, 85% {
-        background: #fbffc9;
-        border-color: #f0f3c0;
-    }
-}
-
-@keyframes insertionFade {
-    from, to {
-        background: rgba(255, 255, 255, 0);
-        border-color: rgba(255, 255, 255, 0);
-    }
-
-    15%, 85% {
-        background: #fbffc9;
-        border-color: #f0f3c0;
-    }
-}
-
-div.CodeMirror-lint-tooltip {
-    background-color: white;
-    border-radius: 2px;
-    border: 0;
-    color: #141823;
-    -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
-    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
-    font-family:
-            system,
-            -apple-system,
-            'San Francisco',
-            '.SFNSDisplay-Regular',
-            'Segoe UI',
-            Segoe,
-            'Segoe WP',
-            'Helvetica Neue',
-            helvetica,
-            'Lucida Grande',
-            arial,
-            sans-serif;
-    font-size: 13px;
-    line-height: 16px;
-    max-width: 430px;
-    opacity: 0;
-    padding: 8px 10px;
-    -webkit-transition: opacity 0.15s;
-    transition: opacity 0.15s;
-    white-space: pre-wrap;
-}
-
-div.CodeMirror-lint-tooltip > * {
-    padding-left: 23px;
-}
-
-div.CodeMirror-lint-tooltip > * + * {
-    margin-top: 12px;
-}
-
-/* COLORS */
-
-.graphiql-container .CodeMirror-foldmarker {
-    border-radius: 4px;
-    background: #08f;
-    background: -webkit-gradient(linear, left top, left bottom, from(#43A8FF), to(#0F83E8));
-    background: linear-gradient(#43A8FF, #0F83E8);
-    -webkit-box-shadow:
-            0 1px 1px rgba(0, 0, 0, 0.2),
-            inset 0 0 0 1px rgba(0, 0, 0, 0.1);
-    box-shadow:
-            0 1px 1px rgba(0, 0, 0, 0.2),
-            inset 0 0 0 1px rgba(0, 0, 0, 0.1);
-    color: white;
-    font-family: arial;
-    font-size: 12px;
-    line-height: 0;
-    margin: 0 3px;
-    padding: 0px 4px 1px;
-    text-shadow: 0 -1px rgba(0, 0, 0, 0.1);
-}
-
-.graphiql-container div.CodeMirror span.CodeMirror-matchingbracket {
-    color: #555;
-    text-decoration: underline;
-}
-
-.graphiql-container div.CodeMirror span.CodeMirror-nonmatchingbracket {
-    color: #f00;
-}
-
-/* Comment */
-.cm-comment {
-    color: #999;
-}
-
-/* Punctuation */
-.cm-punctuation {
-    color: #555;
-}
-
-/* Keyword */
-.cm-keyword {
-    color: #B11A04;
-}
-
-/* OperationName, FragmentName */
-.cm-def {
-    color: #D2054E;
-}
-
-/* FieldName */
-.cm-property {
-    color: #1F61A0;
-}
-
-/* FieldAlias */
-.cm-qualifier {
-    color: #1C92A9;
-}
-
-/* ArgumentName and ObjectFieldName */
-.cm-attribute {
-    color: #8B2BB9;
-}
-
-/* Number */
-.cm-number {
-    color: #2882F9;
-}
-
-/* String */
-.cm-string {
-    color: #D64292;
-}
-
-/* Boolean */
-.cm-builtin {
-    color: #D47509;
-}
-
-/* EnumValue */
-.cm-string-2 {
-    color: #0B7FC7;
-}
-
-/* Variable */
-.cm-variable {
-    color: #397D13;
-}
-
-/* Directive */
-.cm-meta {
-    color: #B33086;
-}
-
-/* Type */
-.cm-atom {
-    color: #CA9800;
-}
-/* BASICS */
-
-.CodeMirror {
-    /* Set height, width, borders, and global font properties here */
-    color: black;
-    font-family: monospace;
-    height: 300px;
-}
-
-/* PADDING */
-
-.CodeMirror-lines {
-    padding: 4px 0; /* Vertical padding around content */
-}
-.CodeMirror pre {
-    padding: 0 4px; /* Horizontal padding of content */
-}
-
-.CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {
-    background-color: white; /* The little square between H and V scrollbars */
-}
-
-/* GUTTER */
-
-.CodeMirror-gutters {
-    border-right: 1px solid #ddd;
-    background-color: #f7f7f7;
-    white-space: nowrap;
-}
-.CodeMirror-linenumbers {}
-.CodeMirror-linenumber {
-    color: #999;
-    min-width: 20px;
-    padding: 0 3px 0 5px;
-    text-align: right;
-    white-space: nowrap;
-}
-
-.CodeMirror-guttermarker { color: black; }
-.CodeMirror-guttermarker-subtle { color: #999; }
-
-/* CURSOR */
-
-.CodeMirror .CodeMirror-cursor {
-    border-left: 1px solid black;
-}
-/* Shown when moving in bi-directional text */
-.CodeMirror div.CodeMirror-secondarycursor {
-    border-left: 1px solid silver;
-}
-.CodeMirror.cm-fat-cursor div.CodeMirror-cursor {
-    background: #7e7;
-    border: 0;
-    width: auto;
-}
-.CodeMirror.cm-fat-cursor div.CodeMirror-cursors {
-    z-index: 1;
-}
-
-.cm-animate-fat-cursor {
-    -webkit-animation: blink 1.06s steps(1) infinite;
-    animation: blink 1.06s steps(1) infinite;
-    border: 0;
-    width: auto;
-}
-@-webkit-keyframes blink {
-    0% { background: #7e7; }
-    50% { background: none; }
-    100% { background: #7e7; }
-}
-@keyframes blink {
-    0% { background: #7e7; }
-    50% { background: none; }
-    100% { background: #7e7; }
-}
-
-/* Can style cursor different in overwrite (non-insert) mode */
-div.CodeMirror-overwrite div.CodeMirror-cursor {}
-
-.cm-tab { display: inline-block; text-decoration: inherit; }
-
-.CodeMirror-ruler {
-    border-left: 1px solid #ccc;
-    position: absolute;
-}
-
-/* DEFAULT THEME */
-
-.cm-s-default .cm-keyword {color: #708;}
-.cm-s-default .cm-atom {color: #219;}
-.cm-s-default .cm-number {color: #164;}
-.cm-s-default .cm-def {color: #00f;}
-.cm-s-default .cm-variable,
-.cm-s-default .cm-punctuation,
-.cm-s-default .cm-property,
-.cm-s-default .cm-operator {}
-.cm-s-default .cm-variable-2 {color: #05a;}
-.cm-s-default .cm-variable-3 {color: #085;}
-.cm-s-default .cm-comment {color: #a50;}
-.cm-s-default .cm-string {color: #a11;}
-.cm-s-default .cm-string-2 {color: #f50;}
-.cm-s-default .cm-meta {color: #555;}
-.cm-s-default .cm-qualifier {color: #555;}
-.cm-s-default .cm-builtin {color: #30a;}
-.cm-s-default .cm-bracket {color: #997;}
-.cm-s-default .cm-tag {color: #170;}
-.cm-s-default .cm-attribute {color: #00c;}
-.cm-s-default .cm-header {color: blue;}
-.cm-s-default .cm-quote {color: #090;}
-.cm-s-default .cm-hr {color: #999;}
-.cm-s-default .cm-link {color: #00c;}
-
-.cm-negative {color: #d44;}
-.cm-positive {color: #292;}
-.cm-header, .cm-strong {font-weight: bold;}
-.cm-em {font-style: italic;}
-.cm-link {text-decoration: underline;}
-.cm-strikethrough {text-decoration: line-through;}
-
-.cm-s-default .cm-error {color: #f00;}
-.cm-invalidchar {color: #f00;}
-
-.CodeMirror-composing { border-bottom: 2px solid; }
-
-/* Default styles for common addons */
-
-div.CodeMirror span.CodeMirror-matchingbracket {color: #0f0;}
-div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}
-.CodeMirror-matchingtag { background: rgba(255, 150, 0, .3); }
-.CodeMirror-activeline-background {background: #e8f2ff;}
-
-/* STOP */
-
-/* The rest of this file contains styles related to the mechanics of
-   the editor. You probably shouldn't touch them. */
-
-.CodeMirror {
-    background: white;
-    overflow: hidden;
-    position: relative;
-}
-
-.CodeMirror-scroll {
-    height: 100%;
-    /* 30px is the magic margin used to hide the element's real scrollbars */
-    /* See overflow: hidden in .CodeMirror */
-    margin-bottom: -30px; margin-right: -30px;
-    outline: none; /* Prevent dragging from highlighting the element */
-    overflow: scroll !important; /* Things will break if this is overridden */
-    padding-bottom: 30px;
-    position: relative;
-}
-.CodeMirror-sizer {
-    border-right: 30px solid transparent;
-    position: relative;
-}
-
-/* The fake, visible scrollbars. Used to force redraw during scrolling
-   before actual scrolling happens, thus preventing shaking and
-   flickering artifacts. */
-.CodeMirror-vscrollbar, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {
-    display: none;
-    position: absolute;
-    z-index: 6;
-}
-.CodeMirror-vscrollbar {
-    overflow-x: hidden;
-    overflow-y: scroll;
-    right: 0; top: 0;
-}
-.CodeMirror-hscrollbar {
-    bottom: 0; left: 0;
-    overflow-x: scroll;
-    overflow-y: hidden;
-}
-.CodeMirror-scrollbar-filler {
-    right: 0; bottom: 0;
-}
-.CodeMirror-gutter-filler {
-    left: 0; bottom: 0;
-}
-
-.CodeMirror-gutters {
-    min-height: 100%;
-    position: absolute; left: 0; top: 0;
-    z-index: 3;
-}
-.CodeMirror-gutter {
-    display: inline-block;
-    height: 100%;
-    margin-bottom: -30px;
-    vertical-align: top;
-    white-space: normal;
-    /* Hack to make IE7 behave */
-    *zoom:1;
-    *display:inline;
-}
-.CodeMirror-gutter-wrapper {
-    background: none !important;
-    border: none !important;
-    position: absolute;
-    z-index: 4;
-}
-.CodeMirror-gutter-background {
-    position: absolute;
-    top: 0; bottom: 0;
-    z-index: 4;
-}
-.CodeMirror-gutter-elt {
-    cursor: default;
-    position: absolute;
-    z-index: 4;
-}
-.CodeMirror-gutter-wrapper {
-    -webkit-user-select: none;
-    -moz-user-select: none;
-    -ms-user-select: none;
-    user-select: none;
-}
-
-.CodeMirror-lines {
-    cursor: text;
-    min-height: 1px; /* prevents collapsing before first draw */
-}
-.CodeMirror pre {
-    -webkit-tap-highlight-color: transparent;
-    /* Reset some styles that the rest of the page might have set */
-    background: transparent;
-    border-radius: 0;
-    border-width: 0;
-    color: inherit;
-    font-family: inherit;
-    font-size: inherit;
-    -webkit-font-variant-ligatures: none;
-    font-variant-ligatures: none;
-    line-height: inherit;
-    margin: 0;
-    overflow: visible;
-    position: relative;
-    white-space: pre;
-    word-wrap: normal;
-    z-index: 2;
-}
-.CodeMirror-wrap pre {
-    word-wrap: break-word;
-    white-space: pre-wrap;
-    word-break: normal;
-}
-
-.CodeMirror-linebackground {
-    position: absolute;
-    left: 0; right: 0; top: 0; bottom: 0;
-    z-index: 0;
-}
-
-.CodeMirror-linewidget {
-    overflow: auto;
-    position: relative;
-    z-index: 2;
-}
-
-.CodeMirror-widget {}
-
-.CodeMirror-code {
-    outline: none;
-}
-
-/* Force content-box sizing for the elements where we expect it */
-.CodeMirror-scroll,
-.CodeMirror-sizer,
-.CodeMirror-gutter,
-.CodeMirror-gutters,
-.CodeMirror-linenumber {
-    -webkit-box-sizing: content-box;
-    box-sizing: content-box;
-}
-
-.CodeMirror-measure {
-    height: 0;
-    overflow: hidden;
-    position: absolute;
-    visibility: hidden;
-    width: 100%;
-}
-
-.CodeMirror-cursor { position: absolute; }
-.CodeMirror-measure pre { position: static; }
-
-div.CodeMirror-cursors {
-    position: relative;
-    visibility: hidden;
-    z-index: 3;
-}
-div.CodeMirror-dragcursors {
-    visibility: visible;
-}
-
-.CodeMirror-focused div.CodeMirror-cursors {
-    visibility: visible;
-}
-
-.CodeMirror-selected { background: #d9d9d9; }
-.CodeMirror-focused .CodeMirror-selected { background: #d7d4f0; }
-.CodeMirror-crosshair { cursor: crosshair; }
-.CodeMirror-line::-moz-selection, .CodeMirror-line > span::-moz-selection, .CodeMirror-line > span > span::-moz-selection { background: #d7d4f0; }
-.CodeMirror-line::selection, .CodeMirror-line > span::selection, .CodeMirror-line > span > span::selection { background: #d7d4f0; }
-.CodeMirror-line::-moz-selection, .CodeMirror-line > span::-moz-selection, .CodeMirror-line > span > span::-moz-selection { background: #d7d4f0; }
-
-.cm-searching {
-    background: #ffa;
-    background: rgba(255, 255, 0, .4);
-}
-
-/* IE7 hack to prevent it from returning funny offsetTops on the spans */
-.CodeMirror span { *vertical-align: text-bottom; }
-
-/* Used to force a border model for a node */
-.cm-force-border { padding-right: .1px; }
-
-@media print {
-    /* Hide the cursor when printing */
-    .CodeMirror div.CodeMirror-cursors {
-        visibility: hidden;
-    }
-}
-
-/* See issue #2901 */
-.cm-tab-wrap-hack:after { content: ''; }
-
-/* Help users use markselection to safely style text background */
-span.CodeMirror-selectedtext { background: none; }
-
-.CodeMirror-dialog {
-    background: inherit;
-    color: inherit;
-    left: 0; right: 0;
-    overflow: hidden;
-    padding: .1em .8em;
-    position: absolute;
-    z-index: 15;
-}
-
-.CodeMirror-dialog-top {
-    border-bottom: 1px solid #eee;
-    top: 0;
-}
-
-.CodeMirror-dialog-bottom {
-    border-top: 1px solid #eee;
-    bottom: 0;
-}
-
-.CodeMirror-dialog input {
-    background: transparent;
-    border: 1px solid #d3d6db;
-    color: inherit;
-    font-family: monospace;
-    outline: none;
-    width: 20em;
-}
-
-.CodeMirror-dialog button {
-    font-size: 70%;
-}
-.graphiql-container .doc-explorer {
-    background: white;
-}
-
-.graphiql-container .doc-explorer-title-bar,
-.graphiql-container .history-title-bar {
-    cursor: default;
-    display: -webkit-box;
-    display: -ms-flexbox;
-    display: flex;
-    height: 50px;
-    line-height: 14px;
-    padding: 8px 8px 5px;
-    position: relative;
-    -webkit-user-select: none;
-    -moz-user-select: none;
-    -ms-user-select: none;
-    user-select: none;
-}
-
-.graphiql-container .doc-explorer-title,
-.graphiql-container .history-title {
-    -webkit-box-flex: 1;
-    -ms-flex: 1;
-    flex: 1;
-    font-weight: bold;
-    overflow-x: hidden;
-    padding: 10px 0 5px 10px;
-    text-align: center;
-    text-overflow: ellipsis;
-    -webkit-user-select: initial;
-    -moz-user-select: initial;
-    -ms-user-select: initial;
-    user-select: initial;
-    white-space: nowrap;
-}
-
-.graphiql-container .doc-explorer-back {
-    color: #3B5998;
-    cursor: pointer;
-    margin: -7px 0 -6px -8px;
-    overflow-x: hidden;
-    padding: 17px 12px 16px 16px;
-    text-overflow: ellipsis;
-    white-space: nowrap;
-}
-
-.doc-explorer-narrow .doc-explorer-back {
-    width: 0;
-}
-
-.graphiql-container .doc-explorer-back:before {
-    border-left: 2px solid #3B5998;
-    border-top: 2px solid #3B5998;
-    content: '';
-    display: inline-block;
-    height: 9px;
-    margin: 0 3px -1px 0;
-    position: relative;
-    -webkit-transform: rotate(-45deg);
-    transform: rotate(-45deg);
-    width: 9px;
-}
-
-.graphiql-container .doc-explorer-rhs {
-    position: relative;
-}
-
-.graphiql-container .doc-explorer-contents,
-.graphiql-container .history-contents {
-    background-color: #ffffff;
-    border-top: 1px solid #d6d6d6;
-    bottom: 0;
-    left: 0;
-    overflow-y: auto;
-    padding: 20px 15px;
-    position: absolute;
-    right: 0;
-    top: 47px;
-}
-
-.graphiql-container .doc-explorer-contents {
-    min-width: 300px;
-}
-
-.graphiql-container .doc-type-description p:first-child ,
-.graphiql-container .doc-type-description blockquote:first-child {
-    margin-top: 0;
-}
-
-.graphiql-container .doc-explorer-contents a {
-    cursor: pointer;
-    text-decoration: none;
-}
-
-.graphiql-container .doc-explorer-contents a:hover {
-    text-decoration: underline;
-}
-
-.graphiql-container .doc-value-description > :first-child {
-    margin-top: 4px;
-}
-
-.graphiql-container .doc-value-description > :last-child {
-    margin-bottom: 4px;
-}
-
-.graphiql-container .doc-category {
-    margin: 20px 0;
-}
-
-.graphiql-container .doc-category-title {
-    border-bottom: 1px solid #e0e0e0;
-    color: #777;
-    cursor: default;
-    font-size: 14px;
-    font-variant: small-caps;
-    font-weight: bold;
-    letter-spacing: 1px;
-    margin: 0 -15px 10px 0;
-    padding: 10px 0;
-    -webkit-user-select: none;
-    -moz-user-select: none;
-    -ms-user-select: none;
-    user-select: none;
-}
-
-.graphiql-container .doc-category-item {
-    margin: 12px 0;
-    color: #555;
-}
-
-.graphiql-container .keyword {
-    color: #B11A04;
-}
-
-.graphiql-container .type-name {
-    color: #CA9800;
-}
-
-.graphiql-container .field-name {
-    color: #1F61A0;
-}
-
-.graphiql-container .field-short-description {
-    color: #999;
-    margin-left: 5px;
-    overflow: hidden;
-    text-overflow: ellipsis;
-}
-
-.graphiql-container .enum-value {
-    color: #0B7FC7;
-}
-
-.graphiql-container .arg-name {
-    color: #8B2BB9;
-}
-
-.graphiql-container .arg {
-    display: block;
-    margin-left: 1em;
-}
-
-.graphiql-container .arg:first-child:last-child,
-.graphiql-container .arg:first-child:nth-last-child(2),
-.graphiql-container .arg:first-child:nth-last-child(2) ~ .arg {
-    display: inherit;
-    margin: inherit;
-}
-
-.graphiql-container .arg:first-child:nth-last-child(2):after {
-    content: ', ';
-}
-
-.graphiql-container .arg-default-value {
-    color: #43A047;
-}
-
-.graphiql-container .doc-deprecation {
-    background: #fffae8;
-    -webkit-box-shadow: inset 0 0 1px #bfb063;
-    box-shadow: inset 0 0 1px #bfb063;
-    color: #867F70;
-    line-height: 16px;
-    margin: 8px -8px;
-    max-height: 80px;
-    overflow: hidden;
-    padding: 8px;
-    border-radius: 3px;
-}
-
-.graphiql-container .doc-deprecation:before {
-    content: 'Deprecated:';
-    color: #c79b2e;
-    cursor: default;
-    display: block;
-    font-size: 9px;
-    font-weight: bold;
-    letter-spacing: 1px;
-    line-height: 1;
-    padding-bottom: 5px;
-    text-transform: uppercase;
-    -webkit-user-select: none;
-    -moz-user-select: none;
-    -ms-user-select: none;
-    user-select: none;
-}
-
-.graphiql-container .doc-deprecation > :first-child {
-    margin-top: 0;
-}
-
-.graphiql-container .doc-deprecation > :last-child {
-    margin-bottom: 0;
-}
-
-.graphiql-container .show-btn {
-    -webkit-appearance: initial;
-    display: block;
-    border-radius: 3px;
-    border: solid 1px #ccc;
-    text-align: center;
-    padding: 8px 12px 10px;
-    width: 100%;
-    -webkit-box-sizing: border-box;
-    box-sizing: border-box;
-    background: #fbfcfc;
-    color: #555;
-    cursor: pointer;
-}
-
-.graphiql-container .search-box {
-    border-bottom: 1px solid #d3d6db;
-    display: block;
-    font-size: 14px;
-    margin: -15px -15px 12px 0;
-    position: relative;
-}
-
-.graphiql-container .search-box:before {
-    content: '\26b2';
-    cursor: pointer;
-    display: block;
-    font-size: 24px;
-    position: absolute;
-    top: -2px;
-    -webkit-transform: rotate(-45deg);
-    transform: rotate(-45deg);
-    -webkit-user-select: none;
-    -moz-user-select: none;
-    -ms-user-select: none;
-    user-select: none;
-}
-
-.graphiql-container .search-box .search-box-clear {
-    background-color: #d0d0d0;
-    border-radius: 12px;
-    color: #fff;
-    cursor: pointer;
-    font-size: 11px;
-    padding: 1px 5px 2px;
-    position: absolute;
-    right: 3px;
-    top: 8px;
-    -webkit-user-select: none;
-    -moz-user-select: none;
-    -ms-user-select: none;
-    user-select: none;
-}
-
-.graphiql-container .search-box .search-box-clear:hover {
-    background-color: #b9b9b9;
-}
-
-.graphiql-container .search-box > input {
-    border: none;
-    -webkit-box-sizing: border-box;
-    box-sizing: border-box;
-    font-size: 14px;
-    outline: none;
-    padding: 6px 24px 8px 20px;
-    width: 100%;
-}
-
-.graphiql-container .error-container {
-    font-weight: bold;
-    left: 0;
-    letter-spacing: 1px;
-    opacity: 0.5;
-    position: absolute;
-    right: 0;
-    text-align: center;
-    text-transform: uppercase;
-    top: 50%;
-    -webkit-transform: translate(0, -50%);
-    transform: translate(0, -50%);
-}
-.CodeMirror-foldmarker {
-    color: blue;
-    cursor: pointer;
-    font-family: arial;
-    line-height: .3;
-    text-shadow: #b9f 1px 1px 2px, #b9f -1px -1px 2px, #b9f 1px -1px 2px, #b9f -1px 1px 2px;
-}
-.CodeMirror-foldgutter {
-    width: .7em;
-}
-.CodeMirror-foldgutter-open,
-.CodeMirror-foldgutter-folded {
-    cursor: pointer;
-}
-.CodeMirror-foldgutter-open:after {
-    content: "\25BE";
-}
-.CodeMirror-foldgutter-folded:after {
-    content: "\25B8";
-}
-.graphiql-container .history-contents,
-.graphiql-container .history-contents input {
-    font-family: 'Consolas', 'Inconsolata', 'Droid Sans Mono', 'Monaco', monospace;
-    padding: 0;
-}
-
-.graphiql-container .history-contents p {
-    -webkit-box-align: center;
-    -ms-flex-align: center;
-    align-items: center;
-    display: -webkit-box;
-    display: -ms-flexbox;
-    display: flex;
-    font-size: 12px;
-    overflow: hidden;
-    text-overflow: ellipsis;
-    white-space: nowrap;
-    margin: 0;
-    padding: 8px;
-    border-bottom: 1px solid #e0e0e0;
-}
-
-.graphiql-container .history-contents p.editable {
-    padding-bottom: 6px;
-    padding-top: 7px;
-}
-
-.graphiql-container .history-contents input {
-    -webkit-box-flex: 1;
-    -ms-flex-positive: 1;
-    flex-grow: 1;
-    font-size: 12px;
-}
-
-.graphiql-container .history-contents p:hover {
-    cursor: pointer;
-}
-
-.graphiql-container .history-contents p span.history-label {
-    -webkit-box-flex: 1;
-    -ms-flex-positive: 1;
-    flex-grow: 1;
-    overflow: hidden;
-    text-overflow: ellipsis;
-}.CodeMirror-info {
-     background: white;
-     border-radius: 2px;
-     -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
-     box-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
-     -webkit-box-sizing: border-box;
-     box-sizing: border-box;
-     color: #555;
-     font-family:
-             system,
-             -apple-system,
-             'San Francisco',
-             '.SFNSDisplay-Regular',
-             'Segoe UI',
-             Segoe,
-             'Segoe WP',
-             'Helvetica Neue',
-             helvetica,
-             'Lucida Grande',
-             arial,
-             sans-serif;
-     font-size: 13px;
-     line-height: 16px;
-     margin: 8px -8px;
-     max-width: 400px;
-     opacity: 0;
-     overflow: hidden;
-     padding: 8px 8px;
-     position: fixed;
-     -webkit-transition: opacity 0.15s;
-     transition: opacity 0.15s;
-     z-index: 50;
- }
-
-.CodeMirror-info :first-child {
-    margin-top: 0;
-}
-
-.CodeMirror-info :last-child {
-    margin-bottom: 0;
-}
-
-.CodeMirror-info p {
-    margin: 1em 0;
-}
-
-.CodeMirror-info .info-description {
-    color: #777;
-    line-height: 16px;
-    margin-top: 1em;
-    max-height: 80px;
-    overflow: hidden;
-}
-
-.CodeMirror-info .info-deprecation {
-    background: #fffae8;
-    -webkit-box-shadow: inset 0 1px 1px -1px #bfb063;
-    box-shadow: inset 0 1px 1px -1px #bfb063;
-    color: #867F70;
-    line-height: 16px;
-    margin: -8px;
-    margin-top: 8px;
-    max-height: 80px;
-    overflow: hidden;
-    padding: 8px;
-}
-
-.CodeMirror-info .info-deprecation-label {
-    color: #c79b2e;
-    cursor: default;
-    display: block;
-    font-size: 9px;
-    font-weight: bold;
-    letter-spacing: 1px;
-    line-height: 1;
-    padding-bottom: 5px;
-    text-transform: uppercase;
-    -webkit-user-select: none;
-    -moz-user-select: none;
-    -ms-user-select: none;
-    user-select: none;
-}
-
-.CodeMirror-info .info-deprecation-label + * {
-    margin-top: 0;
-}
-
-.CodeMirror-info a {
-    text-decoration: none;
-}
-
-.CodeMirror-info a:hover {
-    text-decoration: underline;
-}
-
-.CodeMirror-info .type-name {
-    color: #CA9800;
-}
-
-.CodeMirror-info .field-name {
-    color: #1F61A0;
-}
-
-.CodeMirror-info .enum-value {
-    color: #0B7FC7;
-}
-
-.CodeMirror-info .arg-name {
-    color: #8B2BB9;
-}
-
-.CodeMirror-info .directive-name {
-    color: #B33086;
-}
-.CodeMirror-jump-token {
-    text-decoration: underline;
-    cursor: pointer;
-}
-/* The lint marker gutter */
-.CodeMirror-lint-markers {
-    width: 16px;
-}
-
-.CodeMirror-lint-tooltip {
-    background-color: infobackground;
-    border-radius: 4px 4px 4px 4px;
-    border: 1px solid black;
-    color: infotext;
-    font-family: monospace;
-    font-size: 10pt;
-    max-width: 600px;
-    opacity: 0;
-    overflow: hidden;
-    padding: 2px 5px;
-    position: fixed;
-    -webkit-transition: opacity .4s;
-    transition: opacity .4s;
-    white-space: pre-wrap;
-    z-index: 100;
-}
-
-.CodeMirror-lint-mark-error, .CodeMirror-lint-mark-warning {
-    background-position: left bottom;
-    background-repeat: repeat-x;
-}
-
-.CodeMirror-lint-mark-error {
-    background-image:
-            url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAYAAAC09K7GAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJDw4cOCW1/KIAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAHElEQVQI12NggIL/DAz/GdA5/xkY/qPKMDAwAADLZwf5rvm+LQAAAABJRU5ErkJggg==")
-;
-}
-
-.CodeMirror-lint-mark-warning {
-    background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAYAAAC09K7GAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJFhQXEbhTg7YAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAMklEQVQI12NkgIIvJ3QXMjAwdDN+OaEbysDA4MPAwNDNwMCwiOHLCd1zX07o6kBVGQEAKBANtobskNMAAAAASUVORK5CYII=");
-}
-
-.CodeMirror-lint-marker-error, .CodeMirror-lint-marker-warning {
-    background-position: center center;
-    background-repeat: no-repeat;
-    cursor: pointer;
-    display: inline-block;
-    height: 16px;
-    position: relative;
-    vertical-align: middle;
-    width: 16px;
-}
-
-.CodeMirror-lint-message-error, .CodeMirror-lint-message-warning {
-    background-position: top left;
-    background-repeat: no-repeat;
-    padding-left: 18px;
-}
-
-.CodeMirror-lint-marker-error, .CodeMirror-lint-message-error {
-    background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAHlBMVEW7AAC7AACxAAC7AAC7AAAAAAC4AAC5AAD///+7AAAUdclpAAAABnRSTlMXnORSiwCK0ZKSAAAATUlEQVR42mWPOQ7AQAgDuQLx/z8csYRmPRIFIwRGnosRrpamvkKi0FTIiMASR3hhKW+hAN6/tIWhu9PDWiTGNEkTtIOucA5Oyr9ckPgAWm0GPBog6v4AAAAASUVORK5CYII=");
-}
-
-.CodeMirror-lint-marker-warning, .CodeMirror-lint-message-warning {
-    background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAANlBMVEX/uwDvrwD/uwD/uwD/uwD/uwD/uwD/uwD/uwD6twD/uwAAAADurwD2tQD7uAD+ugAAAAD/uwDhmeTRAAAADHRSTlMJ8mN1EYcbmiixgACm7WbuAAAAVklEQVR42n3PUQqAIBBFUU1LLc3u/jdbOJoW1P08DA9Gba8+YWJ6gNJoNYIBzAA2chBth5kLmG9YUoG0NHAUwFXwO9LuBQL1giCQb8gC9Oro2vp5rncCIY8L8uEx5ZkAAAAASUVORK5CYII=");
-}
-
-.CodeMirror-lint-marker-multiple {
-    background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAHCAMAAADzjKfhAAAACVBMVEUAAAAAAAC/v7914kyHAAAAAXRSTlMAQObYZgAAACNJREFUeNo1ioEJAAAIwmz/H90iFFSGJgFMe3gaLZ0od+9/AQZ0ADosbYraAAAAAElFTkSuQmCC");
-    background-position: right bottom;
-    background-repeat: no-repeat;
-    width: 100%; height: 100%;
-}
-.graphiql-container .spinner-container {
-    height: 36px;
-    left: 50%;
-    position: absolute;
-    top: 50%;
-    -webkit-transform: translate(-50%, -50%);
-    transform: translate(-50%, -50%);
-    width: 36px;
-    z-index: 10;
-}
-
-.graphiql-container .spinner {
-    -webkit-animation: rotation .6s infinite linear;
-    animation: rotation .6s infinite linear;
-    border-bottom: 6px solid rgba(150, 150, 150, .15);
-    border-left: 6px solid rgba(150, 150, 150, .15);
-    border-radius: 100%;
-    border-right: 6px solid rgba(150, 150, 150, .15);
-    border-top: 6px solid rgba(150, 150, 150, .8);
-    display: inline-block;
-    height: 24px;
-    position: absolute;
-    vertical-align: middle;
-    width: 24px;
-}
-
-@-webkit-keyframes rotation {
-    from { -webkit-transform: rotate(0deg); transform: rotate(0deg); }
-    to { -webkit-transform: rotate(359deg); transform: rotate(359deg); }
-}
-
-@keyframes rotation {
-    from { -webkit-transform: rotate(0deg); transform: rotate(0deg); }
-    to { -webkit-transform: rotate(359deg); transform: rotate(359deg); }
-}
-.CodeMirror-hints {
-    background: white;
-    -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
-    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
-    font-family: 'Consolas', 'Inconsolata', 'Droid Sans Mono', 'Monaco', monospace;
-    font-size: 13px;
-    list-style: none;
-    margin-left: -6px;
-    margin: 0;
-    max-height: 14.5em;
-    overflow-y: auto;
-    overflow: hidden;
-    padding: 0;
-    position: absolute;
-    z-index: 10;
-}
-
-.CodeMirror-hint {
-    border-top: solid 1px #f7f7f7;
-    color: #141823;
-    cursor: pointer;
-    margin: 0;
-    max-width: 300px;
-    overflow: hidden;
-    padding: 2px 6px;
-    white-space: pre;
-}
-
-li.CodeMirror-hint-active {
-    background-color: #08f;
-    border-top-color: white;
-    color: white;
-}
-
-.CodeMirror-hint-information {
-    border-top: solid 1px #c0c0c0;
-    max-width: 300px;
-    padding: 4px 6px;
-    position: relative;
-    z-index: 1;
-}
-
-.CodeMirror-hint-information:first-child {
-    border-bottom: solid 1px #c0c0c0;
-    border-top: none;
-    margin-bottom: -1px;
-}
-
-.CodeMirror-hint-deprecation {
-    background: #fffae8;
-    -webkit-box-shadow: inset 0 1px 1px -1px #bfb063;
-    box-shadow: inset 0 1px 1px -1px #bfb063;
-    color: #867F70;
-    font-family:
-            system,
-            -apple-system,
-            'San Francisco',
-            '.SFNSDisplay-Regular',
-            'Segoe UI',
-            Segoe,
-            'Segoe WP',
-            'Helvetica Neue',
-            helvetica,
-            'Lucida Grande',
-            arial,
-            sans-serif;
-    font-size: 13px;
-    line-height: 16px;
-    margin-top: 4px;
-    max-height: 80px;
-    overflow: hidden;
-    padding: 6px;
-}
-
-.CodeMirror-hint-deprecation .deprecation-label {
-    color: #c79b2e;
-    cursor: default;
-    display: block;
-    font-size: 9px;
-    font-weight: bold;
-    letter-spacing: 1px;
-    line-height: 1;
-    padding-bottom: 5px;
-    text-transform: uppercase;
-    -webkit-user-select: none;
-    -moz-user-select: none;
-    -ms-user-select: none;
-    user-select: none;
-}
-
-.CodeMirror-hint-deprecation .deprecation-label + * {
-    margin-top: 0;
-}
-
-.CodeMirror-hint-deprecation :last-child {
-    margin-bottom: 0;
-}

+ 0 - 164
src/app/developVersion/graphqlService/component/schema/Create.js

@@ -1,164 +0,0 @@
-import React, {Component} from 'react';
-import {withRouter} from "react-router-dom";
-import {Modal, Input, notification, Spin} from 'antd';
-import {Mutation} from "react-apollo";
-import gql from "graphql-tag";
-import {ADD_PROJECT_AND_SCHEMA, SHOW_PROJECT} from '../../../../../gql'
-import './index.css';
-import {getCookie} from "../../../../../cookie";
-import {idGen, removeSpace} from "../../../../../func";
-import {FormattedMessage} from 'react-intl';
-
-class Create extends Component {
-    constructor(props) {
-        super(props);
-        this.state = {
-            schemaName: '',
-            schemaID: '',
-            visible: false,
-            confirmLoading: false,
-        };
-    }
-
-    redirectToLogin = () => {
-        this.props.history.push({
-            pathname: `/login`,
-        });
-    };
-
-    componentWillReceiveProps(nextProps) {
-        this.setState({
-            visible: nextProps.visible,
-        });
-    }
-
-
-    handleOk = (userID, create_project_and_schema) => {
-        let schemaId = idGen('schema');
-        let projectId = idGen('project');
-        let schemaName = this.state.schemaName;
-        let createdAt = new Date().getTime();
-
-        let schemaVarObj = {
-            schemaId,
-            schemaName,
-            user_id: userID,
-            schemaCreatedAt: createdAt,
-            schemaUpdatedAt: '',
-            schemaState: 'create',
-            schemaData: JSON.stringify([]),
-            reference: ''
-        };
-        let projectVarObj = {
-            projectCreatedAt: createdAt,
-            projectUpdatedAt: '',
-            database_id: '',
-            apiGWGroup_id: '',
-            projectName: removeSpace(schemaName),
-            deploy_id: '',
-            case_id: '',
-            projectId,
-            projectType: 'graphql',
-            cloud_id: '',
-            user_id: userID,
-            wxConfig_id: '',
-            schema_id: schemaId,
-            projectStatus: 'created'
-        };
-
-        this.setState({
-            confirmLoading: true,
-        });
-
-        create_project_and_schema({
-            variables: {...schemaVarObj, ...projectVarObj},
-            refetchQueries: [{query: gql(SHOW_PROJECT), variables: {projectType: 'graphql', user_id: userID}}]
-        });
-        setTimeout(() => {
-            this.setState({
-                visible: false,
-                confirmLoading: false,
-            });
-        }, 1000);
-        this.props.hideModal();
-        this.props.switchSidebar(schemaName);
-        this.props.history.push({
-            pathname: `/graphql-service/my-create/${schemaName}`,
-            state: {
-                schemaName,
-                schemaID: schemaId,
-                projectID: projectId,
-                create: true
-            }
-        });
-    };
-
-    render() {
-        let userID = this.props.userID || getCookie('user_id');
-        const {visible, confirmLoading} = this.state;
-
-        return (
-            <div>
-                <Mutation
-                    mutation={gql(ADD_PROJECT_AND_SCHEMA)}
-                >
-                    {(create_project_and_schema, {loading, error}) => {
-                        if (loading)
-                            return <Spin style={{marginLeft: 30, marginTop: 10}}/>;
-                        if (error)
-                            return 'error';
-                        return (
-                            <FormattedMessage id="Create Graphql Service">
-                                {(msg) => (
-                                    <Modal title={msg}
-                                           centered
-                                           visible={visible}
-                                           onOk={() => {
-                                               if (userID !== '' && userID !== undefined)
-                                                   this.handleOk(userID, create_project_and_schema)
-                                           }}
-                                           confirmLoading={confirmLoading}
-                                           onCancel={() => {
-                                               this.props.hideModal();
-                                           }}
-                                    >
-                                        <div>
-                                            <p><FormattedMessage id="schema name"/></p>
-                                            <FormattedMessage id="input schema name">
-                                                {(msg) => (
-                                                    <Input
-                                                        className='add-input'
-                                                        placeholder={msg}
-                                                        onChange={e => {
-                                                            e.persist();
-                                                            if (userID === '' || undefined) {
-                                                                notification.open({
-                                                                    message: '提醒',
-                                                                    description: '需要登录.',
-                                                                });
-                                                                this.redirectToLogin();
-                                                                this.props.hideModal();
-                                                            } else {
-                                                                this.setState({
-                                                                    schemaName: e.target.value,
-                                                                });
-                                                            }
-                                                        }}
-                                                    />
-                                                )}
-
-                                            </FormattedMessage>
-                                        </div>
-                                    </Modal>
-                                )}
-                            </FormattedMessage>
-
-                        )
-                    }}
-                </Mutation>
-            </div>
-        )
-    }
-}
-
-export default withRouter(Create);

+ 0 - 801
src/app/developVersion/graphqlService/component/schema/Schema.jsx

@@ -1,801 +0,0 @@
-import React, {Component} from 'react';
-
-import {Button, Col, Icon, Modal, Pagination, Row, Spin, Input, notification} from 'antd';
-import './index.css';
-import {Mutation, Query} from "react-apollo";
-import gql from "graphql-tag";
-import {
-    DELETE_PROJECT,
-    SHOW_SCHEMA,
-    SHOW_TABLE,
-    UPDATE_SCHEMA,
-    UPDATE_SCHEMA_PROJECT_NAME,
-    SEARCH_SCHEMA,ADD_PROJECT_AND_SCHEMA,
-    ADD_SCHEMA, SHOW_PROJECT
-} from '../../../../../gql'
-import Table from "./Table";
-import {request} from 'graphql-request'
-import {idGen, removeSpace} from "../../../../../func";
-import {graphqlUrl} from "../../../../../config";
-import {manageUsers} from "../../../../../config";
-import {FormattedMessage} from 'react-intl';
-
-const confirm = Modal.confirm;
-const Search = Input.Search;
-
-
-class Schema extends Component {
-    constructor(props) {
-        super(props);
-        this.state = {
-            currentTable: props.location.state === undefined ? '' : props.location.state.create ? 'add' : '',
-            // default schemaID and schemaName
-            schemaID: props.location.state === undefined ? props.schemaID : props.location.state.schemaID,
-            schemaName: props.location.state === undefined ? props.schemaName : props.location.state.schemaName,
-            projectID: props.location.state === undefined ? props.projectID : props.location.state.projectID,
-            editSchemaName: '',
-            allData: '',
-            data: '',
-            page: '1',
-            pageSize: '15',
-            once: 0
-        };
-    }
-
-    shouldComponentUpdate(nextProps, nextState) {
-        return true;
-    }
-
-    switchTable = (table) => {
-        this.setState({
-            currentTable: table
-        })
-    };
-
-    changeEditSchemaName = (e) => {
-        this.setState({
-            editSchemaName: e.target.value
-        })
-    };
-
-    clearEditSchemaName = () => {
-        this.setState({
-            editSchemaName: ''
-        })
-    };
-
-    findColumns = data => this.state.currentTable === '' ? [] : data.find(table => table.name === this.state.currentTable) ? data.find(table => table.name === this.state.currentTable).cols : [];
-
-    findRemark = data => this.state.currentTable === '' ? '' : data.find(table => table.name === this.state.currentTable) ? data.find(table => table.name === this.state.currentTable).remark : '';
-
-    goBack = () => {
-        this.setState({
-            currentTable: ''
-        })
-    };
-
-    showTablePagination = (page, pageSize, data) => {
-        // console.log(page);
-        // console.log(pageSize);
-        // console.log(data);
-        // 这个之所以这么麻烦,是因为 'apollo 不能存数据' 而 '分页又得用数据展示',
-        // 所以展示 table 的时候分了两个,
-        // 首先进入展示 15个 , 这前 15 个没有任何问题。
-        // 如果数据多于 15个,在按下第二页的时候 将数据通过 antd 的分页组件的回调函数传入 state,之后 table 的展示由 this.state.data 来接管
-        // 但是这又引起一个问题,通过 this.state.data 的展示如果进行删除,是不会通过 apollo 的,这也意味着数据库被删除了,而页面还存在
-        // 于是,在使用 this.state.data 的页面的 deleteTableButton 组件内调用该函数,重新刷新 this.state.data
-        this.setState({
-            page,
-            pageSize,
-            allData: data,
-            data: data.slice((page - 1) * pageSize, page * pageSize)
-        });
-    };
-
-    fetchData = (referenceID) => {
-        let schemaData;
-        if (localStorage.getItem('ecommerce') && localStorage.getItem('bills') && localStorage.getItem('order')) {
-            switch (referenceID) {
-                case 'ecommerce_schemaID':
-                    schemaData = localStorage.getItem('ecommerce');
-                    break;
-                case 'bills_schemaID':
-                    schemaData = localStorage.getItem('bills');
-                    break;
-                case 'order_schemaID':
-                    schemaData = localStorage.getItem('order');
-                    break;
-                default:
-                    schemaData = ''
-            }
-            return Promise.resolve(schemaData);
-        } else {
-            return new Promise((resolve, reject) => {
-                request(graphqlUrl, SEARCH_SCHEMA, {id: referenceID}).then(
-                    data => {
-                        if (data.schema_by_id !== null) {
-                            localStorage.setItem('ecommerce', data.caseSchema.find(obj => obj.schemaName === 'ecommerce').schemaData);
-                            localStorage.setItem('order', data.caseSchema.find(obj => obj.schemaName === 'order').schemaData);
-                            localStorage.setItem('bills', data.caseSchema.find(obj => obj.schemaName === 'bills').schemaData);
-                            resolve(data.schema_by_id.schemaData);
-                        }
-                    }
-                )
-            });
-
-        }
-    };
-
-    receiveDataFromTable = (data) => {
-        this.setState({
-            data
-        })
-    };
-
-    componentWillReceiveProps(next) {
-        this.setState({
-            currentTable: next.location.state === undefined ? '' : next.location.state.create ? 'add' : '',
-            schemaID: next.schemaID,
-            schemaName: next.schemaName,
-            projectID:next.projectID,
-            data: '',
-            once: 0
-        });
-    }
-
-    render() {
-        let userID = this.props.userID;
-        let trialcase = this.props.trialcase;
-        return (
-            <Query query={gql(SHOW_TABLE)} variables={{schema_id: this.state.schemaID}}>
-
-                {
-                    ({loading, error, data}) => {
-                        if (loading) {
-                            return <Spin style={{marginLeft: 3}}/>
-                        }
-                        if (error) {
-                            return 'error!';
-                        }
-
-                        let copy;
-                        if (this.props.location.state)
-                            copy = this.props.location.state.copy;
-
-                        // 找到 copy 一定几率不显示的 问题原因,异步导致的未存先取
-                        if (data.schema_by_id === null && copy !== true) data = [];
-                        else {
-                            let reference = data.schema_by_id ? data.schema_by_id.reference : this.props.location.state.reference;
-                            data = data.schema_by_id ? JSON.parse(data.schema_by_id.schemaData) : [];
-                            if (data.length === 0 && reference !== '' && this.state.once === 0) {
-                                this.fetchData(reference).then((data) => {
-                                    // 会执行好多好多次
-                                    this.setState({
-                                        data: JSON.parse(data),
-                                        once: 1
-                                    })
-                                });
-
-                            }
-
-                        }
-
-                        return (
-                            <div>
-                                {
-                                    this.state.currentTable === '' ?
-                                        <div>
-                                            {
-                                                this.state.editSchemaName ?
-                                                    <ModifySchemaNameInput
-                                                        projectID={this.state.projectID}
-                                                        editSchemaName={this.state.editSchemaName}
-                                                        changeEditSchemaName={this.changeEditSchemaName}
-                                                        clearEditSchemaName={this.clearEditSchemaName}
-                                                        schemaID={this.state.schemaID}
-                                                        userID={userID}
-                                                        schemaName={this.state.schemaName}
-                                                        history={this.props.history}
-                                                    />
-                                                    :
-                                                    <div className={'schema'}>
-                                                        <span className={'schema-name'}>{
-                                                            trialcase?
-                                                                <FormattedMessage id={this.state.schemaName}/>
-                                                                :
-                                                                this.state.schemaName
-                                                        }</span>
-                                                        {
-                                                            userID.indexOf(manageUsers) > -1 ?
-                                                                <Icon style={{marginLeft: 15}}
-                                                                      type="edit"
-                                                                      theme="twoTone"
-                                                                      onClick={
-                                                                          () => {
-                                                                              this.setState({editSchemaName: this.state.schemaName})
-                                                                          }
-                                                                      }
-                                                                />
-                                                                :
-                                                                trialcase ?
-                                                                    ''
-                                                                    :
-                                                                    <Icon style={{marginLeft: 15}}
-                                                                          type="edit"
-                                                                          theme="twoTone"
-                                                                          onClick={
-                                                                              () => {
-                                                                                  this.setState({editSchemaName: this.state.schemaName})
-                                                                              }
-                                                                          }
-                                                                    />
-                                                        }
-                                                    </div>
-                                            }
-
-                                            <div className={'schema-table-list-title'}>
-                                                <Row>
-                                                    <Col span={10}><span
-                                                        className={'schema-table-title'}><FormattedMessage
-                                                        id="Name"/></span></Col>
-                                                    <Col span={10}><span
-                                                        className={'schema-table-title'}><FormattedMessage id="Remark"/></span></Col>
-                                                    <Col span={2} offset={2}>
-                                                        {
-                                                            userID.indexOf(manageUsers) > -1 ?
-                                                                <span
-                                                                    className={'schema-table-title'}
-                                                                    onClick={() => {
-                                                                        this.setState({
-                                                                            currentTable: 'add'
-                                                                        })
-                                                                    }}>
-                                                                    <Icon type="plus"/>
-                                                                </span>
-                                                                :
-                                                                trialcase ?
-                                                                    ''
-                                                                    :
-                                                                    <span
-                                                                        className={'schema-table-title'}
-                                                                        onClick={() => {
-                                                                            this.setState({
-                                                                                currentTable: 'add'
-                                                                            })
-                                                                        }}>
-                                                                        <Icon type="plus" style={{color: '#096dd9',cursor: 'pointer'}}/>
-                                                                </span>
-                                                        }
-
-                                                    </Col>
-                                                </Row>
-                                            </div>
-                                            <div>
-                                                {
-                                                    this.state.data ?
-                                                        this.state.data.map(table => (
-                                                            <div key={table.name}
-                                                                 className={'schema-table-list-content'}>
-                                                                <Row>
-                                                                    <Col
-                                                                        span={10}
-                                                                        onClick={() => this.switchTable(table.name)}
-                                                                    >
-                                                                        <span
-                                                                            className={'schema-table-content name'}>{table.name}</span>
-                                                                    </Col>
-                                                                    <Col span={10}>
-                                                                        <span
-                                                                            className={'schema-table-content'}>{table.remark}</span>
-                                                                    </Col>
-                                                                    <Col span={2} offset={2}>
-
-                                                                        <span className={'schema-table-content'}>
-                                                                            {
-                                                                                userID.indexOf(manageUsers) > -1 ?
-                                                                                    <DeleteTableButton
-                                                                                        currentTable={table.name}
-                                                                                        schemaData={data}
-                                                                                        schemaID={this.state.schemaID}
-                                                                                        userID={userID}
-                                                                                        showTablePagination={this.showTablePagination}
-                                                                                        page={this.state.page}
-                                                                                        pageSize={this.state.pageSize}
-                                                                                        fetchData={this.fetchData}
-                                                                                        location={this.props.location}
-                                                                                    />
-                                                                                    :
-                                                                                    trialcase ?
-                                                                                        ''
-                                                                                        :
-                                                                                        <DeleteTableButton
-                                                                                            currentTable={table.name}
-                                                                                            schemaData={data}
-                                                                                            schemaID={this.state.schemaID}
-                                                                                            userID={userID}
-                                                                                            showTablePagination={this.showTablePagination}
-                                                                                            page={this.state.page}
-                                                                                            pageSize={this.state.pageSize}
-                                                                                            fetchData={this.fetchData}
-                                                                                            location={this.props.location}
-                                                                                        />
-                                                                            }
-                                                                        </span>
-                                                                    </Col>
-                                                                </Row>
-                                                            </div>
-                                                        ))
-                                                        :
-                                                        data.slice(0, 15).map(table => (
-                                                            <div key={table.name}
-                                                                 className={'schema-table-list-content'}>
-                                                                <Row>
-                                                                    <Col
-                                                                        span={10}
-                                                                        onClick={() => this.switchTable(table.name)}
-                                                                    >
-                                                                <span
-                                                                    className={'schema-table-content name'}>{table.name}</span>
-                                                                    </Col>
-                                                                    <Col span={10}>
-                                                                <span
-                                                                    className={'schema-table-content'}>{table.remark}</span>
-                                                                    </Col>
-                                                                    <Col span={2} offset={2}>
-                                                                <span className={'schema-table-content'}>
-                                                                    {
-                                                                        userID.indexOf(manageUsers) > -1 ?
-                                                                            <DeleteTableButton
-                                                                                currentTable={table.name}
-                                                                                schemaData={data}
-                                                                                schemaID={this.state.schemaID}
-                                                                                showTablePagination={this.showTablePagination}
-                                                                                page={this.state.page}
-                                                                                pageSize={this.state.pageSize}
-                                                                                userID={userID}
-                                                                                fetchData={this.fetchData}
-                                                                                location={this.props.location}
-                                                                            />
-                                                                            :
-                                                                            trialcase ?
-                                                                                ''
-                                                                                :
-                                                                                <DeleteTableButton
-                                                                                    currentTable={table.name}
-                                                                                    schemaData={data}
-                                                                                    schemaID={this.state.schemaID}
-                                                                                    showTablePagination={this.showTablePagination}
-                                                                                    page={this.state.page}
-                                                                                    pageSize={this.state.pageSize}
-                                                                                    userID={userID}
-                                                                                    fetchData={this.fetchData}
-                                                                                    location={this.props.location}
-                                                                                />
-                                                                    }
-                                                                </span>
-                                                                    </Col>
-                                                                </Row>
-                                                            </div>
-                                                        ))
-                                                }
-                                            </div>
-
-                                            <div className={'schema-bottom'}>
-                                                <Row>
-                                                    <Col span={4}>
-                                                        {
-                                                            userID.indexOf(manageUsers) > -1 ?
-                                                                trialcase ?
-                                                                    <div>
-                                                                        <div style={{display: 'inline-block'}}
-                                                                             className={'delete-schema'}>
-                                                                            <CopySchemaButton
-                                                                                userID={userID}
-                                                                                history={this.props.history}
-                                                                                schemaID={this.state.schemaID}
-                                                                                schemaName={this.state.schemaName}
-                                                                            />
-                                                                        </div>
-                                                                        <div style={{display: 'inline-block'}}
-                                                                             className={'delete-schema'}>
-                                                                            <DeleteProjectButton
-                                                                                userID={userID}
-                                                                                projectID={this.state.projectID}
-                                                                                history={this.props.history}
-                                                                            />
-                                                                        </div>
-                                                                    </div>
-                                                                    :
-                                                                    <div className={'delete-schema'}>
-                                                                        <DeleteProjectButton
-                                                                            userID={userID}
-                                                                            projectID={this.state.projectID}
-                                                                            history={this.props.history}
-                                                                        />
-                                                                    </div>
-                                                                :
-                                                                trialcase ?
-                                                                    <div className={'delete-schema'}>
-                                                                        <CopySchemaButton
-                                                                            userID={userID}
-                                                                            history={this.props.history}
-                                                                            schemaID={this.state.schemaID}
-                                                                            schemaName={this.state.schemaName}
-                                                                        />
-                                                                    </div>
-                                                                    :
-                                                                    <div className={'delete-schema'}>
-                                                                        <DeleteProjectButton
-                                                                            userID={userID}
-                                                                            projectID={this.state.projectID}
-                                                                            history={this.props.history}
-                                                                        />
-                                                                    </div>
-                                                        }
-                                                    </Col>
-                                                    <Col span={4} offset={16}>
-                                                        <div className={'pagination'}>
-                                                            <Pagination
-                                                                simple
-                                                                defaultCurrent={1}
-                                                                hideOnSinglePage={true}
-                                                                defaultPageSize={15}
-                                                                total={data.length}
-                                                                onChange={(page, pageSize) => {
-                                                                    this.showTablePagination(page, pageSize, data)
-                                                                }}
-                                                            />
-                                                        </div>
-                                                    </Col>
-                                                </Row>
-                                            </div>
-                                        </div>
-                                        :
-                                        this.state.currentTable === 'add' ?
-                                            <Table
-                                                currentTable={''}
-                                                schemaData={data}
-                                                columns={[]}
-                                                remark=''
-                                                schemaID={this.state.schemaID}
-                                                schemaName={this.state.schemaName}
-                                                userID={userID}
-                                                goBack={this.goBack}
-                                                trialcase={trialcase}
-                                                fetchData={this.fetchData}
-                                                showTablePagination={this.showTablePagination}
-                                                page={this.state.page}
-                                                pageSize={this.state.pageSize}
-                                                history={this.props.history}
-                                                add={'add'}
-                                            /> :
-                                            <Table
-                                                currentTable={this.state.currentTable}
-                                                schemaData={data}
-                                                columns={this.findColumns(data.length !== 0 ? data : this.state.data)}
-                                                remark={this.findRemark(data.length !== 0 ? data : this.state.data)}
-                                                schemaID={this.state.schemaID}
-                                                schemaName={this.state.schemaName}
-                                                userID={userID}
-                                                goBack={this.goBack}
-                                                trialcase={trialcase}
-                                                fetchData={this.fetchData}
-                                                showTablePagination={this.showTablePagination}
-                                                page={this.state.page}
-                                                pageSize={this.state.pageSize}
-                                                history={this.props.history}
-                                                add={'whatever but not add'}
-                                            />
-                                }
-
-                            </div>
-                        );
-                    }
-                }
-            </Query>
-
-        )
-    }
-}
-
-export default Schema;
-
-class CopySchemaButton extends Component {
-    constructor(props) {
-        super(props);
-        this.state = {
-            schemaName: '',
-            schemaID: '',
-        };
-    }
-
-    redirectToLogin = () => {
-        this.props.history.push({
-            pathname: `/login`,
-        });
-    };
-
-    handleOk = (userID, create_project_and_schema) => {
-        let {history,schemaName,schemaID} = this.props;
-        let projectName = removeSpace(schemaName) + '_' + Math.random().toString().slice(-3) + Math.random().toString().slice(-4);
-        let schemaId = idGen('schema');
-        let projectId= idGen('project');
-        let createdAt = new Date().getTime();
-
-        let schemaVarObj = {
-            schemaId,
-            schemaName:projectName,
-            user_id: userID,
-            schemaCreatedAt: createdAt,
-            schemaUpdatedAt: '',
-            // copy的时候直接给 ok,不用检测
-            schemaState: 'ok',
-            schemaData: JSON.stringify([]),
-            reference:  schemaID
-        };
-        let projectVarObj = {
-            projectCreatedAt: createdAt,
-            projectUpdatedAt: '',
-            database_id: '',
-            apiGWGroup_id: '',
-            projectName,
-            deploy_id: '',
-            case_id: '',
-            projectId,
-            projectType: 'graphql',
-            cloud_id: '',
-            user_id: userID,
-            wxConfig_id: '',
-            schema_id: schemaId,
-            projectStatus: 'created'
-        };
-
-        create_project_and_schema({
-            variables: {...schemaVarObj,...projectVarObj},
-            refetchQueries:[{query: gql(SHOW_PROJECT), variables: {projectType:'graphql',user_id: userID}}]
-        });
-
-        history.push({
-            pathname: `/graphql-service/my-create/${projectName}`,
-            state: {
-                schemaName:projectName,
-                schemaID:schemaId,
-                projectID: projectId,
-                copy: true,
-                reference: schemaID
-            }
-        });
-    };
-
-    render() {
-        let {userID} = this.props;
-        // let schemaID = schemaName + '_schemaID';
-        return (
-            <div>
-                <Mutation
-                    mutation={gql(ADD_PROJECT_AND_SCHEMA)}
-                    // refetchQueries={[{query: gql(SHOW_SCHEMA), variables: {user_id: userID}}]}
-                >
-                    {(create_project_and_schema, {loading, error}) => {
-                        if (loading)
-                            return <Spin style={{marginLeft: 30, marginTop: 10}}/>;
-                        if (error)
-                            return 'error';
-
-                        return (
-                            <Button
-                                type="primary"
-                                onClick={() => {
-                                    if(userID !== '' && userID !== undefined && userID !== 'ioobot') {
-                                        this.handleOk(userID, create_project_and_schema);
-                                    }
-                                    else {
-                                        notification.open({
-                                            message: '提醒',
-                                            description: '需要登录.',
-                                        });
-                                        this.redirectToLogin();
-                                    }
-
-
-                                }}
-
-                            ><FormattedMessage id="copy"/></Button>
-                        )
-                    }}
-                </Mutation>
-            </div>
-        )
-    }
-}
-
-class DeleteProjectButton extends Component {
-    constructor(props) {
-        super(props);
-        this.state = {
-            projectID:props.projectID
-        }
-    }
-
-    showConfirm = (delete_graphql_project, projectID, userID) => {
-        let _this = this;
-        confirm({
-            title: 'Do you want to delete this schema?',
-            content: 'It cannot be found back!',
-            onOk() {
-                delete_graphql_project({variables: {id:projectID, user_id: userID}});
-                _this.props.history.push({
-                    pathname: '/graphql-service',
-                });
-            },
-            onCancel() {
-            },
-        });
-    };
-
-    render() {
-        let userID = this.props.userID;
-        let {projectID} = this.state;
-
-        return (
-            <Mutation
-                mutation={gql(DELETE_PROJECT)}
-                refetchQueries={[{query: gql(SHOW_PROJECT), variables: {projectType:'graphql',user_id: userID}}]}
-            >
-                {(delete_graphql_project, {loading, error}) => {
-                    if (error)
-                        return 'error';
-                    if (loading)
-                        return <Spin style={{marginLeft: 3}}/>;
-                    return (
-                        <Button
-                            type="danger"
-                            onClick={() => {
-                                this.showConfirm(delete_graphql_project, projectID, userID);
-                            }}
-                        >
-                            <FormattedMessage id="delete"/>
-                        </Button>
-                    )
-                }}
-            </Mutation>
-        )
-    }
-}
-
-class DeleteTableButton extends Component {
-    render() {
-        let schemaID = this.props.schemaID;
-        let userID = this.props.userID;
-
-        let varobj = {
-            id: schemaID,
-            updatedAt: new Date().getTime(),
-            schemaState: 'updated-delete-table',
-        };
-
-        return (
-            <Query query={gql(SHOW_TABLE)} variables={{schema_id: schemaID}}>
-                {
-                    ({loading, error, data}) => {
-                        if (loading)
-                            return <Spin style={{marginLeft: 30, marginTop: 10}}/>;
-                        if (error)
-                            return 'error';
-
-                        let schemaData = data;
-                        let referenceID = data.schema_by_id ? data.schema_by_id.reference : this.props.location.state.reference;
-
-                        return (
-                            <Mutation
-                                mutation={gql(UPDATE_SCHEMA)}
-                                refetchQueries={[{query: gql(SHOW_TABLE), variables: {schema_id: schemaID}}]}
-                            >
-                                {(update_schema, {loading, error}) => {
-                                    if (loading)
-                                        return <Spin style={{marginLeft: 30, marginTop: 10}}/>;
-                                    if (error)
-                                        return 'error';
-
-                                    // 先 query 再 mutation,然后删除
-                                    let schemaCols;
-                                    if (schemaData.schema_by_id === null) schemaCols = [];
-                                    else schemaCols = JSON.parse(schemaData.schema_by_id.schemaData);
-
-                                    const index = this.props.schemaData.findIndex(obj => obj.name === this.props.currentTable);
-                                    if (index === -1) {
-                                        // 先取数据,然后删除,然后填充
-                                        this.props.fetchData(referenceID).then(value => {
-                                            schemaCols = JSON.parse(value);
-                                            const index = schemaCols.findIndex(obj => obj.name === this.props.currentTable);
-                                            schemaCols.splice(index, 1);
-                                        });
-                                    } else {
-                                        schemaCols.splice(index, 1);
-                                    }
-
-                                    return (
-                                        <Icon type="delete"
-                                              theme="twoTone"
-                                              onClick={() => {
-                                                  update_schema({
-                                                      variables: {
-                                                          ...varobj,
-                                                          schemaData: JSON.stringify(schemaCols)
-                                                      }
-                                                  });
-                                                  this.props.showTablePagination(this.props.page, this.props.pageSize, schemaCols)
-                                              }}>
-
-                                        </Icon>
-                                    )
-                                }}
-                            </Mutation>
-                        )
-                    }
-                }
-
-            </Query>
-
-
-        )
-    }
-}
-
-class ModifySchemaNameInput extends Component {
-    constructor(props) {
-        super(props);
-        this.state = {}
-    }
-
-    render() {
-        let userID = this.props.userID;
-        let schemaName = this.props.schemaName;
-
-        return (
-            <Mutation mutation={gql(UPDATE_SCHEMA_PROJECT_NAME)}>
-                {(update_schema_project_name, {loading, error}) => {
-                    if (error)
-                        return 'error';
-                    if (loading)
-                        return <Spin style={{marginLeft: 3}}/>;
-                    return (
-                        <div className={'schema'}>
-                            <FormattedMessage id="Confirm">
-                                {(msg) => (
-                                    <Search
-                                        value={this.props.editSchemaName}
-                                        enterButton={msg}
-                                        style={{width: 500}}
-                                        size="large"
-                                        onChange={this.props.changeEditSchemaName}
-                                        onSearch={value => {
-                                            update_schema_project_name({
-                                                variables: {
-                                                    schemaID: this.props.schemaID,
-                                                    projectID:this.props.projectID,
-                                                    schemaName: value,
-                                                    updateAt: new Date().getTime()
-                                                }
-                                            }).then((res)=>{
-                                                // console.log('update_schema_project_name res',res)
-                                            });
-                                            this.props.history.push({
-                                                pathname: `/graphql-service/my-create/${value}`,
-                                                state: {
-                                                    schemaName: value,
-                                                    schemaID: this.props.schemaID,
-                                                }
-                                            });
-                                            this.props.clearEditSchemaName();
-                                        }}
-                                    />)}
-                            </FormattedMessage>
-
-                        </div>
-                    )
-                }}
-            </Mutation>
-        )
-    }
-}

+ 0 - 471
src/app/developVersion/graphqlService/component/schema/Table.js

@@ -1,471 +0,0 @@
-import React, {Component} from 'react';
-import axios from 'axios';
-
-import {Layout, Select, Input, Icon, Button, notification, Spin, Modal} from 'antd';
-import {UPDATE_SCHEMA, SHOW_SCHEMA, SHOW_TABLE} from "../../../../../gql";
-import gql from "graphql-tag";
-import {FormattedMessage} from 'react-intl';
-
-import {Mutation, Query} from "react-apollo";
-import {getCookie} from "../../../../../cookie";
-import {manageUsers} from "../../../../../config";
-import {checkSchemaUrl} from '../../../../../config';
-
-const Option = Select.Option;
-const {Content} = Layout;
-const confirm = Modal.confirm;
-
-class Table extends Component {
-    constructor(props) {
-        super(props);
-        this.state = {
-            currentTable: props.currentTable,
-            remark: props.remark,
-            columns: props.columns,
-            newColName: '',
-            newColType: 'type',
-            types: ['ID', 'String', 'Int', 'Float', 'Boolean', 'DateTime'],
-            descriptions: ['description', 'key', 'non-null', 'non-null-list', 'list'],
-            characterTips: false,
-        }
-    }
-
-    // 下面的 handlexxxx 全是 state 内部方法,用于操作视图
-    // cache 仅在提交删除整体使用
-
-    handleNameChange = (index) => {
-        return (e) => {
-            let columns = this.state.columns;
-            columns[index].name = e.target.value;
-            this.setState({
-                columns
-            })
-        };
-    };
-
-    handleNameNew = (e) => {
-        let r = /^[^\u4e00-\u9fa5]*$/;
-        if (r.test(e.target.value)) {
-            this.setState({
-                newColName: e.target.value,
-            })
-        } else {
-            this.setState({
-                characterTips: true
-            });
-            setTimeout(() => {
-                this.setState({
-                    characterTips: false
-                })
-            }, 2000)
-        }
-    };
-
-    handleTypeChange = (index) => {
-        return (value) => {
-            let columns = this.state.columns;
-            columns[index].type = value;
-            this.setState({
-                columns
-            });
-        }
-    };
-
-    handleTypeNew = (value) => {
-        if (this.state.newColName !== '') {
-            let columns = this.state.columns;
-            columns.push({name: this.state.newColName, type: value, description: 'description'});
-            this.setState({
-                columns,
-                newColName: '',
-                newColType: 'type'
-            })
-        } else {
-            notification['warning']({
-                message: 'Notification',
-                description: 'Input a field name first.',
-            });
-        }
-    };
-
-    handleDescChange = (index) => {
-        return (value) => {
-            let columns = this.state.columns;
-            columns[index].description = value;
-            this.setState({
-                columns
-            });
-        };
-    };
-
-    handleColDelete = (index) => {
-        return () => {
-            let columns = this.state.columns;
-            columns.splice(index, 1);
-            this.setState({
-                columns
-            });
-        }
-    };
-
-    componentWillReceiveProps(next) {
-        this.setState({
-            currentTable: next.currentTable,
-            columns: next.columns,
-            remark: next.remark
-        });
-    };
-
-    render() {
-        let schemaID = this.props.schemaID || this.props.history.location.state.schemaID;
-        let schemaName = this.props.schemaName || this.props.history.location.state.schemaName;
-        let userID = this.props.userID || getCookie('user_id');
-        let trialcase = this.props.trialcase;
-
-        return (
-            <div>
-                <div className="column-menu" onClick={this.props.goBack}>
-                    <Icon type="left" style={{color: '#3187FA'}}/> {schemaName}
-                </div>
-
-                <Layout style={{zIndex: '0'}}>
-                    <Content style={{padding: '24px', minHeight: 280, background: '#fff'}}>
-                        <div className="column-content">
-                            <span className='table-title'> <FormattedMessage id="Table name"/></span>
-                            <FormattedMessage id="please input table name">
-                                {(msg) => (<Input
-                                    value={this.state.currentTable}
-                                    placeholder={msg}
-                                    style={{width: 200, margin: '10px 0'}}
-                                    onChange={(e) => {
-                                        this.setState({currentTable: e.target.value})
-                                    }}/>)}
-                            </FormattedMessage>
-
-                        </div>
-
-                        <div style={{marginBottom: 20}}>
-                            <span className='table-title'> <FormattedMessage id="Table remark"/></span>
-                            <FormattedMessage id="please input table remark">
-                                {(msg) => (<Input
-                                    value={this.state.remark}
-                                    placeholder={msg}
-                                    style={{width: 250, margin: '10px 0'}}
-                                    onChange={(e) => {
-                                        this.setState({remark: e.target.value})
-                                    }}/>)}
-                            </FormattedMessage>
-
-                        </div>
-
-                        <div>
-                            <span className='table-title'> <FormattedMessage id="Table fields"/></span>
-                            <span className='column-title'><FormattedMessage id="name"/></span>
-                            <span className='column-title'><FormattedMessage id="type"/></span>
-                            <span className='column-title'><FormattedMessage id="description"/></span>
-                            {
-                                this.state.columns.map((col, index) =>
-                                    <div key={index} style={{marginBottom: 3}}>
-                                        <Input
-                                            className="column-details"
-                                            value={col.name}
-                                            onChange={this.handleNameChange(index)}
-                                        />
-                                        <Select
-                                            className="column-details"
-                                            defaultValue={col.type}
-                                            onChange={this.handleTypeChange(index)}>
-                                            {
-                                                this.state.types.map((value) =>
-                                                    <Option key={Math.random() + 'types'}
-                                                            value={value.toLowerCase()}>{value}</Option>
-                                                )
-                                            }
-                                        </Select>
-                                        <Select
-                                            className="column-details"
-                                            defaultValue={col.description}
-                                            onChange={this.handleDescChange(index)}>
-                                            {
-                                                this.state.descriptions.map((value) =>
-                                                    <Option key={Math.random() + 'descriptions'}
-                                                            value={value.toLowerCase()}>{value}</Option>
-                                                )
-                                            }
-                                        </Select>
-                                        {
-                                            userID.indexOf(manageUsers) > -1 ?
-                                                <Icon type="delete" theme="twoTone" style={{cursor: 'pointer'}}
-                                                      onClick={this.handleColDelete(index)}/>
-                                                :
-                                                trialcase ?
-                                                    ''
-                                                    :
-                                                    <Icon type="delete" theme="twoTone" style={{cursor: 'pointer'}}
-                                                          onClick={this.handleColDelete(index)}/>
-                                        }
-                                    </div>
-                                )
-                            }
-                            <div>
-                                <FormattedMessage id="field name">
-                                    {(msg) => (<Input
-                                        className="column-details"
-                                        placeholder={msg}
-                                        onChange={this.handleNameNew}
-                                        value={this.state.newColName}
-                                    />)}
-                                </FormattedMessage>
-
-                                <Select
-                                    className="column-details"
-                                    defaultValue="type"
-                                    onChange={this.handleTypeNew}
-                                    value={this.state.newColType}>
-                                    {
-                                        this.state.types.map((value) =>
-                                            <Option key={Math.random()} value={value.toLowerCase()}>{value}</Option>
-                                        )
-                                    }
-                                </Select>
-                            </div>
-                        </div>
-
-                        {
-                            userID.indexOf(manageUsers) > -1 ?
-                                <div style={{marginTop: 20}}>
-                                    <UpdateTableButton
-                                        currentTable={this.state.currentTable}
-                                        columns={this.state.columns}
-                                        remark={this.state.remark}
-                                        schemaID={schemaID}
-                                        userID={userID}
-                                        schemaData={this.props.schemaData}
-                                        fetchData={this.props.fetchData}
-                                        showTablePagination={this.props.showTablePagination}
-                                        page={this.props.page}
-                                        pageSize={this.props.pageSize}
-                                        history={this.props.history}
-                                        schemaName={schemaName}
-                                        add={this.props.add}
-                                    />
-                                </div>
-                                :
-                                trialcase ?
-                                    ''
-                                    :
-                                    <div style={{marginTop: 20}}>
-                                        <UpdateTableButton
-                                            currentTable={this.state.currentTable}
-                                            columns={this.state.columns}
-                                            remark={this.state.remark}
-                                            schemaID={schemaID}
-                                            userID={userID}
-                                            schemaData={this.props.schemaData}
-                                            fetchData={this.props.fetchData}
-                                            showTablePagination={this.props.showTablePagination}
-                                            page={this.props.page}
-                                            pageSize={this.props.pageSize}
-                                            history={this.props.history}
-                                            schemaName={schemaName}
-                                            add={this.props.add}
-                                        />
-                                    </div>
-                        }
-
-                    </Content>
-                </Layout>
-            </div>
-        )
-    }
-}
-
-export default Table;
-
-
-class UpdateTableButton extends Component {
-    constructor(props) {
-        super(props);
-        this.state = {
-            originTableName: props.currentTable,
-            schemaCheck: ''
-        }
-    }
-
-    showConfirm = (schemaName, schemaID, data) => {
-        let _this = this;
-
-        if (this.props.add !== 'add') {
-            if(data.update_schema.schemaState === 'ok')
-                this.props.history.push({
-                    pathname: `/graphql-service/my-create/${schemaName}`,
-                    state: {
-                        schemaName,
-                        schemaID
-                    }
-                });
-        } else {
-            confirm({
-                title: '添加成功',
-                content: '继续添加数据表?',
-                onOk() {
-                    console.log('继续添加');
-                },
-                onCancel() {
-                    _this.props.history.push({
-                        pathname: `/graphql-service/my-create/${schemaName}`,
-                        state: {
-                            schemaName,
-                            schemaID
-                        }
-                    });
-                }
-            });
-        }
-    };
-
-    checkSchema = (update_schema, schemaID, varobj, schemaCols) => {
-        update_schema({
-            variables: {
-                ...varobj,
-                schemaData: JSON.stringify(schemaCols)
-            }
-        });
-        let _this = this;
-
-        axios.get(`${checkSchemaUrl}?schema=${schemaID}`)
-            .then((res) => {
-                console.log('check schema res', res);
-                if (res.data !== '') {
-                    update_schema({
-                        variables: {
-                            ...varobj,
-                            schemaData: JSON.stringify(schemaCols),
-                            schemaState: 'ok',
-                        }
-                    });
-                    _this.setState({
-                        schemaCheck: '',
-                    });
-                }
-            })
-            .catch((err) => {
-                // console.log('err',err);
-                // console.log('err.response',err.response);
-                _this.setState({
-                    schemaCheck: err.response.data,
-                });
-                console.log('err.response.data', err.response.data);
-            });
-    };
-
-    render() {
-        let schemaID = this.props.schemaID;
-        let schemaName = this.props.schemaName;
-        let userID = this.props.userID;
-
-        let varobj = {
-            id: schemaID,
-            updatedAt: new Date().getTime(),
-            schemaState: 'updated-update-table',
-        };
-
-        return (
-            <Query query={gql(SHOW_TABLE)} variables={{schema_id: schemaID}}>
-
-                {
-                    ({loading, error, data}) => {
-                        if (loading)
-                            return <Spin style={{marginLeft: 30, marginTop: 10}}/>;
-                        if (error)
-                            return 'error';
-
-                        let schemaData = data;
-                        let referenceID = '';
-                        if (data.schema_by_id)
-                            referenceID = data.schema_by_id.reference;
-
-                        return (
-                            <Mutation
-                                mutation={gql(UPDATE_SCHEMA)}
-                                onCompleted={(data) => this.showConfirm(schemaName, schemaID, data)}
-                                refetchQueries={[{query: gql(SHOW_TABLE), variables: {schema_id: schemaID}}]}
-                            >
-
-                                {(update_schema, {loading, error}) => {
-                                    if (loading)
-                                        return <Spin style={{marginLeft: 30, marginTop: 10}}/>;
-                                    if (error)
-                                        return 'error';
-
-                                    // 更新代码
-                                    // 先 query 再 mutation,然后替换,做一个判断
-                                    let schemaCols;
-                                    if (schemaData.schema_by_id === null) schemaCols = [];
-                                    else schemaCols = JSON.parse(schemaData.schema_by_id.schemaData);
-
-                                    // 处理一下description的问题
-
-                                    let cols = this.props.columns;
-                                    cols.map(obj => {
-                                        if (obj.description === 'description')
-                                            obj.description = '';
-                                        return obj
-                                    });
-
-                                    let newTable = {
-                                        name: this.props.currentTable,
-                                        remark: this.props.remark,
-                                        cols
-                                    };
-
-                                    const index = this.state.originTableName === '' ? -2 : this.props.schemaData.findIndex(obj => obj.name === this.state.originTableName);
-                                    if (index === -2) {
-                                        if (referenceID !== '' && schemaCols.length === 0) {
-                                            this.props.fetchData(referenceID).then(value => {
-                                                schemaCols = JSON.parse(value);
-                                                schemaCols.push(newTable);
-                                            });
-                                        } else {
-                                            schemaCols.push(newTable);
-                                        }
-
-                                    } else if (index === -1) {
-                                        // 先取数据,然后替换,然后填充
-                                        this.props.fetchData(referenceID).then(value => {
-                                            schemaCols = JSON.parse(value);
-                                            const index = schemaCols.findIndex(obj => obj.name === this.state.originTableName);
-                                            schemaCols.splice(index, 1, newTable);
-                                        });
-                                    } else {
-                                        schemaCols.splice(index, 1, newTable);
-                                    }
-
-                                    return (
-                                        <div>
-                                            <div style={{display: 'inline-block'}}>
-                                                <Button type="primary" onClick={() => {
-                                                    this.checkSchema(update_schema, schemaID, varobj, schemaCols);
-                                                    this.props.showTablePagination(this.props.page, this.props.pageSize, schemaCols);
-                                                }}>
-                                                    <FormattedMessage id="save"/>
-                                                </Button>
-                                            </div>
-                                            {
-                                                this.state.schemaCheck !== '' ?
-                                                    <span>  failed, cause '{this.state.schemaCheck}'</span>
-                                                    :
-                                                    ''
-                                            }
-                                        </div>
-
-                                    )
-                                }}
-                            </Mutation>
-                        )
-                    }
-                }
-            </Query>
-        )
-    }
-}

+ 0 - 144
src/app/developVersion/graphqlService/component/schema/index.css

@@ -1,144 +0,0 @@
-.current {
-  background-color: #0F83E8;
-  color: white;
-  text-align: center;
-  height: 50px;
-  line-height: 50px;
-  margin-top: 3px;
-}
-
-.title {
-  font-weight: bolder;
-  font-size: 18px;
-  margin: 10px 0 0 5px;
-}
-
-p.show {
-  margin: 5px 0 3px 10px;
-  cursor: pointer;
-  font-size: 16px;
-  font-weight: bold;
-}
-
-.wrapper {
-  position: relative;
-}
-
-.add {
-  position: absolute;
-  right: 10px;
-  top: 10px;
-  z-index: 2;
-}
-
-.add-input {
-  margin-top: 10px;
-}
-
-.column-menu {
-  /*padding: 0 24px;*/
-  /*position: fixed;*/
-  width: 100%;
-  z-index: 1;
-  line-height: 50px;
-  font-weight: 600;
-  background-color: white;
-  border-bottom: 1px solid #dcdadb;
-  cursor: pointer;
-}
-
-.column-title {
-  /*padding-left: 10px;*/
-  font-weight: 500;
-  font-size: 16px;
-  display: inline-block;
-  width: 168px;
-  height: 35px;
-  color: #3a76c5;
-}
-
-.column-content {
-  margin-bottom: 20px;
-}
-
-.column-details {
-  width: 120px;
-  margin: 10px 48px 10px 0 !important;
-}
-
-.table-title {
-  font-weight: 500;
-  font-size: 20px;
-  display: block;
-  height: 35px;
-  margin: 10px 0;
-}
-
-.table-title::before {
-  content: '|';
-  display: inline-block;
-  font-weight: 900;
-  color: #3187FA;
-  /*border-right: */
-}
-
-.remark {
-  font-weight: lighter;
-  font-size: smaller;
-}
-
-.schema {
-  width: 100%;
-  height: 50px;
-  margin-bottom: 10px;
-  cursor: pointer;
-}
-
-.schema-name {
-  color: #3187FA;
-  font-weight: bold;
-  font-size: 20px;
-  line-height: 50px;
-}
-
-.schema-table-list-title {
-  background-color: #f7f7f7;
-  height: 40px;
-  padding-left: 10px;
-}
-
-.schema-table-title {
-  line-height: 40px;
-  font-weight: bold;
-}
-
-.schema-table-list-content {
-  height: 40px;
-  padding-left: 10px;
-  border-bottom: 1px solid #e9e9e9;
-}
-
-.schema-table-list-content .ant-row div:first-child{
-    cursor: pointer;
-}
-
-.name {
-    color: #006eff;
-    cursor: pointer;
-}
-
-.schema-table-list-content:last-child {
-  border-bottom: none;
-}
-
-.schema-table-content {
-  line-height: 40px;
-}
-
-.schema-bottom {
-  margin-top: 70px;
-}
-
-.delete-schema {
-
-}

+ 0 - 54
src/app/developVersion/graphqlService/dataAnalysis/DataAnalysis.jsx

@@ -1,54 +0,0 @@
-import React, {Component} from 'react';
-
-import {Layout, Menu} from 'antd';
-import Metabase from "./metabase/Metabase";
-
-
-const { Content } = Layout;
-
-class DataAnalysis extends Component {
-    constructor() {
-        super();
-        this.state = {
-            menuLevel2: "metabase",
-        }
-    }
-
-    switchMenu = (menuName, e) => {
-        console.log('menuName', menuName, 'e', e);
-        this.setState({
-            [menuName]: e.key,
-        });
-    };
-
-    render() {
-        return (
-            <div>
-                <Menu
-                    mode="horizontal"
-                    defaultSelectedKeys={['metabase']}
-                    style={{padding: '0 24px', position: 'fixed', width: '100%', zIndex: '1'}}
-                    onClick={(e) => this.switchMenu('menuLevel2', e)}
-                    selectedKeys={[this.state.menuLevel2]}
-                >
-                    <Menu.Item key="metabase">metabase</Menu.Item>
-                </Menu>
-
-                <Layout style={{ padding: '24px', zIndex: '0'}}>
-                    <Content style={{ padding: '24px', minHeight: 280, background: '#fff',marginTop: '48px'  }}>
-                        {(() => {
-                            switch (this.state.menuLevel2) {
-                                case 'metabase':
-                                    return <Metabase />;
-                                default:
-                                    return <Metabase />
-                            }
-                        })()}
-                    </Content>
-                </Layout>
-            </div>
-        )
-    }
-}
-
-export default DataAnalysis;

+ 0 - 15
src/app/developVersion/graphqlService/dataAnalysis/metabase/Metabase.jsx

@@ -1,15 +0,0 @@
-import React, {Component} from 'react';
-
-class Metabase extends Component {
-
-
-    render() {
-        return (
-            <div>
-                Metabase
-            </div>
-        )
-    }
-}
-
-export default Metabase;

+ 0 - 58
src/app/developVersion/graphqlService/dataStorage/DataStorage.jsx

@@ -1,58 +0,0 @@
-import React, {Component} from 'react';
-
-import {Layout, Menu} from 'antd';
-
-import SchemaCreate from "./schemaCreate/SchemaCreate";
-import DatabaseSetting from "./databaseSetting/DatabaseSetting";
-
-const { Content } = Layout;
-
-class DataStorage extends Component {
-    constructor() {
-        super();
-        this.state = {
-            menuLevel2: "schema-creations",
-        }
-    }
-
-    switchMenu = (menuName, e) => {
-        console.log('menuName', menuName, 'e', e);
-        this.setState({
-            [menuName]: e.key,
-        });
-    };
-
-    render() {
-        return (
-            <div>
-                <Menu
-                    mode="horizontal"
-                    defaultSelectedKeys={['schema-creations']}
-                    style={{padding: '0 24px', position: 'fixed', width: '100%', zIndex: '1'}}
-                    onClick={(e) => this.switchMenu('menuLevel2', e)}
-                    selectedKeys={[this.state.menuLevel2]}
-                >
-                    <Menu.Item key="schema-creations">schema creations</Menu.Item>
-                    <Menu.Item key="database-settings">database settings</Menu.Item>
-                </Menu>
-
-                <Layout style={{ padding: '24px', zIndex: '0'}}>
-                    <Content style={{ padding: '24px', minHeight: 280, background: '#fff',marginTop: '48px'  }}>
-                        {(() => {
-                            switch (this.state.menuLevel2) {
-                                case 'schema-creations':
-                                    return <SchemaCreate />;
-                                case 'database-settings':
-                                    return <DatabaseSetting />;
-                                default:
-                                    return <SchemaCreate />
-                            }
-                        })()}
-                    </Content>
-                </Layout>
-            </div>
-        )
-    }
-}
-
-export default DataStorage;

+ 0 - 14
src/app/developVersion/graphqlService/dataStorage/databaseSetting/DatabaseSetting.jsx

@@ -1,14 +0,0 @@
-import React, {Component} from 'react';
-
-class DatabaseSetting extends Component {
-
-    render() {
-        return (
-            <div>
-                Database Setting
-            </div>
-        )
-    }
-}
-
-export default DatabaseSetting;

+ 0 - 83
src/app/developVersion/index.css

@@ -1,83 +0,0 @@
-.logo-wrapper {
-    width: 122px;
-    height: 31px;
-    margin: 16px 28px 16px 0;
-    float: left;
-}
-
-.logo {
-    background-image: url("../../images/logo.png");
-    background-repeat:no-repeat;
-    background-size:100% 100%;
-}
-
-.change-locale {
-    position: absolute;
-    top: 0;
-    right: 24px;
-    float: right;
-}
-
-.login-button {
-     position: absolute;
-     top: 15px;
-     right: 20px;
-     float: right;
- }
-
-.login-nickname {
-    position: absolute;
-    top: 0;
-    right: 20px;
-    float: right;
-    font-size: 20px;
-    color: white;
-}
-
-.layout-content {
-    padding: 24px;
-    min-height: 280px;
-    background: #fff;
-    margin-top: 48px;
-}
-
-.layout-content-deploy {
-    padding: 0;
-}
-
-.user-detail{
-    width: 200px;
-    /*height: 350px;*/
-    background-color: #fff;
-    border-radius: 4px;
-    box-shadow: 0 4px 8px 0 #c5d9e8;
-}
-
-.user-info {
-    background-color: #fff !important;
-    padding: 28px 16px 12px !important;
-    font-size: 14px;
-    height: 86px!important;
-    color: #3f536e;
-}
-
-.user-info-nickname {
-    color: #3f536e;
-    font-size: 16px;
-    line-height: 20px;
-    font-weight: 700;
-    margin-bottom: 5px;
-}
-
-.user-info-email {
-    color: #8dabc4;
-    font-size: 15px;
-    min-height: 30px;
-    line-height: 15px;
-    word-break: break-all;
-    white-space: normal;
-}
-
-.login-out {
-    margin-top: 20px;
-}

+ 0 - 63
src/app/developVersion/quantService/QuantService.jsx

@@ -1,63 +0,0 @@
-import React, {Component} from 'react';
-import {FormattedMessage} from 'react-intl';
-import {Layout, Menu} from 'antd';
-
-import QuantConfig from "./quantConfig/QuantConfig";
-import Deploy from "../common/deploy/Deploy";
-import QuantManage from "./quantManage/QuantManage";
-
-const { Content } = Layout;
-
-class QuantService extends Component {
-    constructor() {
-        super();
-        this.state = {
-            menuLevel3: "quant-config",
-        }
-    }
-
-    switchMenu = (menuName, e) => {
-        // console.log('menuName', menuName, 'e', e);
-        this.setState({
-            [menuName]: e.key,
-        });
-    };
-
-    render() {
-        return (
-            <div>
-                <Menu
-                    mode="horizontal"
-                    defaultSelectedKeys={['quant-config']}
-                    style={{padding: '0 24px', position: 'fixed', width: '100%', zIndex: '1',lineHeight:'50px',fontWeight:600}}
-                    onClick={(e) => this.switchMenu('menuLevel3', e)}
-                    selectedKeys={[this.state.menuLevel3]}
-                >
-                    <Menu.Item key="quant-config"><FormattedMessage id="config"/></Menu.Item>
-                    <Menu.Item key="quant-deploy"><FormattedMessage id="deploy"/></Menu.Item>
-                    <Menu.Item key="quant-manage"><FormattedMessage id="manage"/></Menu.Item>
-                </Menu>
-
-                <Layout style={{ padding: '24px', zIndex: '0'}}>
-                    <Content style={{ padding: '24px', minHeight: 280, background: '#fff',marginTop: '48px'  }}>
-                        {(() => {
-                            switch (this.state.menuLevel3) {
-                                case 'quant-config':
-                                    return <QuantConfig />;
-                                case 'quant-deploy':
-                                    // return <Deploy />;
-                                    return <QuantConfig />;
-                                case 'quant-manage':
-                                    return <QuantManage />;
-                                default:
-                                    return <QuantConfig />
-                            }
-                        })()}
-                    </Content>
-                </Layout>
-            </div>
-        )
-    }
-}
-
-export default QuantService;

+ 0 - 17
src/app/developVersion/quantService/quantConfig/QuantConfig.jsx

@@ -1,17 +0,0 @@
-import React, {Component} from 'react';
-import {FormattedMessage} from 'react-intl';
-
-class QuantConfig extends Component {
-
-
-    render() {
-        return (
-            <div>
-                <p><b><FormattedMessage id="It is under development, please look forward to it. Thank you for your attention"/></b></p>
-                {/*Only members to use this website.*/}
-            </div>
-        )
-    }
-}
-
-export default QuantConfig;

+ 0 - 16
src/app/developVersion/quantService/quantManage/QuantManage.jsx

@@ -1,16 +0,0 @@
-import React, {Component} from 'react';
-import {FormattedMessage} from 'react-intl';
-
-class QuantManage extends Component {
-
-    render() {
-        return (
-            <div>
-                <p><b><FormattedMessage id="It is under development, please look forward to it. Thank you for your attention"/></b></p>
-                {/*Only members to use this website.*/}
-            </div>
-        )
-    }
-}
-
-export default QuantManage;

+ 0 - 72
src/app/developVersion/wechatService/WxTrialCase.js

@@ -1,72 +0,0 @@
-import React, {Component} from 'react';
-import {Layout, Menu} from 'antd';
-import {FormattedMessage} from 'react-intl';
-
-import WxConfig from "./wxConfig/WxConfig";
-import WxDeploy from "../common/deploy/Deploy";
-import Manage from '../common/manage/Manage';
-
-const {Content} = Layout;
-
-class WxTrialCase extends Component {
-    constructor() {
-        super();
-        this.state = {
-            menuLevel3: "wechat-config",
-            userID: 'ioobot'
-        }
-    }
-
-    switchMenu = (menuName, e) => {
-        this.setState({
-            [menuName]: e.key,
-        });
-    };
-
-    render() {
-        let configID = this.props.location.state ? this.props.location.state.configID : "ecommerce_wxConfigID";
-        let appName = this.props.location.state ? this.props.location.state.appName : "ecommerce";
-        let projectID = this.props.location.state ? this.props.location.state.projectID : "";
-        return (
-            <div>
-                <Menu
-                    mode="horizontal"
-                    defaultSelectedKeys={['wechat-config']}
-                    style={{
-                        padding: '0 24px',
-                        position: 'fixed',
-                        width: '100%',
-                        zIndex: '1',
-                        lineHeight: '50px',
-                        fontWeight: 600
-                    }}
-                    onClick={(e) => this.switchMenu('menuLevel3', e)}
-                    selectedKeys={[this.state.menuLevel3]}
-                >
-                    <Menu.Item key="wechat-config"><FormattedMessage id="config"/></Menu.Item>
-                    <Menu.Item key="wechat-deploy"><FormattedMessage id="deploy"/></Menu.Item>
-                    <Menu.Item key="wechat-manage"><FormattedMessage id="manage"/></Menu.Item>
-                </Menu>
-
-                <Layout style={{padding: '24px', zIndex: '0'}}>
-                    <Content style={{padding: '24px', minHeight: 280, background: '#fff', marginTop: '48px'}}>
-                        {(() => {
-                            switch (this.state.menuLevel3) {
-                                case 'wechat-config':
-                                    return <WxConfig trialcase={true} userID={this.state.userID} projectID={projectID} defaultAppName={'ecommerce'} defaultConfigID={'ecommerce_wxConfigID'} history={this.props.history} location={this.props.location}/>;
-                                case 'wechat-deploy':
-                                    return <WxDeploy trialcase={true} userID={this.state.userID} projectID={projectID} kind={'wx'}/>;
-                                case 'wechat-manage':
-                                    return <Manage trialcase={true} userID={this.state.userID} projectID={projectID} kind={'wx'}/>;
-                                default:
-                                    return <WxConfig/>
-                            }
-                        })()}
-                    </Content>
-                </Layout>
-            </div>
-        )
-    }
-}
-
-export default WxTrialCase;

+ 0 - 94
src/app/developVersion/wechatService/WxUserCreate.js

@@ -1,94 +0,0 @@
-import React, {Component} from 'react';
-
-import {Layout, Menu} from 'antd';
-
-import {getIdUrl} from '../../../config'
-
-import WxConfig from "./wxConfig/WxConfig";
-import WxDeploy from "../common/deploy/Deploy";
-import Manage from '../common/manage/Manage';
-import axios from 'axios';
-import {FormattedMessage} from 'react-intl';
-axios.defaults.withCredentials = true;
-
-const {Content} = Layout;
-
-class WxUserCreate extends Component {
-    constructor() {
-        super();
-        this.state = {
-            menuLevel3: "wechat-config",
-            userID: '',
-            getIdUrl
-        }
-    }
-
-    componentWillMount() {
-        let _this = this;
-        axios.get(this.state.getIdUrl)
-            .then((res) => {
-                if (res.data !== '') {
-                    _this.setState({
-                        userID: res.data
-                    })
-                }
-            })
-            .catch(function (err) {
-                console.log(err);
-            });
-    }
-
-    switchMenu = (menuName, e) => {
-        this.setState({
-            [menuName]: e.key,
-        });
-    };
-
-    render() {
-        let configID = this.props.location.state ? this.props.location.state.configID : "ecommerce_wxConfigID";
-        let appName = this.props.location.state ? this.props.location.state.appName : "ecommerce";
-        let projectID = this.props.location.state ? this.props.location.state.projectID : "";
-        // console.log('userId',this.state.userID,"projectID",projectID);
-        return (
-            <div>
-                <Menu
-                    mode="horizontal"
-                    defaultSelectedKeys={['wechat-config']}
-                    style={{
-                        padding: '0 24px',
-                        position: 'fixed',
-                        width: '100%',
-                        zIndex: '1',
-                        lineHeight: '50px',
-                        fontWeight: 600
-                    }}
-                    onClick={(e) => this.switchMenu('menuLevel3', e)}
-                    selectedKeys={[this.state.menuLevel3]}
-                >
-                    <Menu.Item key="wechat-config"><FormattedMessage id="config"/></Menu.Item>
-                    <Menu.Item key="wechat-deploy"><FormattedMessage id="deploy"/></Menu.Item>
-                    <Menu.Item key="wechat-manage"><FormattedMessage id="manage"/></Menu.Item>
-                </Menu>
-
-                <Layout style={{padding: '24px', zIndex: '0'}}>
-                    <Content style={{padding: '24px', minHeight: 280, background: '#fff', marginTop: '48px'}}>
-                        {(() => {
-                            switch (this.state.menuLevel3) {
-                                case 'wechat-config':
-                                    return <WxConfig trialcase={false} userID={this.state.userID} projectID={projectID} history={this.props.history} location={this.props.location}/>;
-                                case 'wechat-deploy':
-                                    return <WxDeploy trialcase={false} userID={this.state.userID} projectID={projectID}/>;
-                                case 'wechat-manage':
-                                    return <Manage trialcase={false} userID={this.state.userID} projectID={projectID}/>;
-                                default:
-                                    return <WxConfig/>
-                            }
-                        })()}
-                    </Content>
-                </Layout>
-            </div>
-        )
-    }
-}
-
-export default WxUserCreate;

+ 0 - 370
src/app/developVersion/wechatService/wxConfig/WxConfig.jsx

@@ -1,370 +0,0 @@
-import React, {Component} from 'react';
-import {Input, Spin, Button, Icon, Modal, Tooltip} from 'antd';
-import './index.css';
-import {UPDATE_WXCONFIG, SHOW_WXCONTENT, DELETE_WXCONFIG, SHOW_WXCONFIG,DELETE_PROJECT,SHOW_PROJECT} from "../../../../gql";
-import gql from "graphql-tag";
-import {Mutation, Query} from "react-apollo";
-import {getCookie} from "../../../../cookie";
-import {FormattedMessage} from 'react-intl';
-const confirm = Modal.confirm;
-
-const valueToKey = {
-    'appName': 'appName',
-    'appID': 'appID',
-    'appSecret': 'appSecret',
-    'enter_url': 'enter_url',
-    'token': 'token',
-    'welcome_words': 'welcome_words',
-    'pay_api_key': 'pay_api_key',
-    'attach': 'attach',
-    'mch_id': 'mch_id',
-    'body': 'body',
-    'spbill_create_ip': 'spbill_create_ip',
-    'notify_url': 'notify_url',
-};
-
-const toolTipTitle = {
-    'appName': 'its appName',
-    'appID': 'its appID',
-    'appSecret': 'its appSecret',
-    'enter_url': 'its enter_url',
-    'token': 'its token',
-    'welcome_words': 'its welcome_words',
-    'pay_api_key': 'its pay_api_key',
-    'attach': 'its attach',
-    'mch_id': 'its mch_id',
-    'body': 'its body',
-    'spbill_create_ip': 'its spbill_create_ip',
-    'notify_url': 'its notify_url',
-};
-
-const youMustFill = {
-    'appName': true,
-    'appID': true,
-    'appSecret': true,
-    'enter_url': true,
-    'token': true,
-    'welcome_words': true,
-    'pay_api_key': true,
-    'attach': true,
-    'mch_id': true,
-    'body': true,
-    'spbill_create_ip': true,
-    'notify_url': true,
-};
-
-class WxConfig extends Component {
-    constructor(props) {
-        super(props);
-        this.state = {
-            config1s: ['appName', 'appID', 'appSecret'],
-            config2s: ['enter_url', 'token', 'welcome_words'],
-            config3s: ['pay_api_key', 'attach', 'mch_id', 'body', 'spbill_create_ip', 'notify_url'],
-            configID: props.location.state === undefined ? props.defaultConfigID : props.location.state.configID,
-            appName: props.location.state === undefined ? props.defaultAppName : props.location.state.appName,
-            projectID: props.location.state === undefined ? props.projectID : props.location.state.projectID,
-            userID:props.userID
-        }
-    }
-
-    componentWillReceiveProps(next) {
-        this.setState({
-            userID:next.userID,
-            configID: next.location.state === undefined ? next.defaultConfigID : next.location.state.configID,
-            appName: next.location.state === undefined ? next.defaultAppName : next.location.state.appName,
-            projectID: next.location.state === undefined ? next.projectID : next.location.state.projectID,
-        });
-    }
-
-    render() {
-        return (
-            <Query query={gql(SHOW_WXCONTENT)} variables={{id: this.state.configID}}>
-                {
-                    ({loading, error, data}) => {
-                        if (loading) {
-                            return <Spin style={{marginLeft: 3}}/>
-                        }
-                        if (error) {
-                            return 'error!';
-                        }
-                        let {history, location, trialcase} = this.props;
-                        let {appName, configID, config1s, config2s, config3s, projectID,userID} = this.state;
-                        return (
-                            <Display
-                                config1s={config1s}
-                                config2s={config2s}
-                                config3s={config3s}
-                                userID={userID}
-                                projectID={projectID}
-                                configID={configID}
-                                appName={appName}
-                                location={location}
-                                history={history}
-                                trialcase={trialcase}
-                                data={data.wxConfig_by_id}
-                            />
-                        )
-                    }
-                }
-            </Query>
-        )
-    }
-}
-
-export default WxConfig;
-
-class Display extends Component {
-    constructor(props) {
-        super(props);
-        this.state = {
-            userID:props.userID,
-            configID: props.configID,
-            appName: props.appName,
-            projectID:props.projectID,
-            mch_id: props.data === null ? '' : props.data.mch_id,
-            notify_url: props.data === null ? '' : props.data.notify_url,
-            appSecret: props.data === null ? '' : props.data.appSecret,
-            appID: props.data === null ? '' : props.data.appID,
-            token: props.data === null ? '' : props.data.token,
-            spbill_create_ip: props.data === null ? '' : props.data.spbill_create_ip,
-            enter_url: props.data === null ? '' : props.data.enter_url,
-            pay_api_key: props.data === null ? '' : props.data.pay_api_key,
-            body: props.data === null ? '' : props.data.body,
-            welcome_words: props.data === null ? '' : props.data.welcome_words,
-            attach: props.data === null ? '' : props.data.attach,
-        }
-    }
-
-    componentWillReceiveProps(next) {
-        this.setState({
-            userID:next.userID,
-            configID: next.configID,
-            appName: next.appName,
-            projectID:next.projectID,
-            mch_id: next.data === null ? '' : next.data.mch_id,
-            notify_url: next.data === null ? '' : next.data.notify_url,
-            appSecret: next.data === null ? '' : next.data.appSecret,
-            appID: next.data === null ? '' : next.data.appID,
-            token: next.data === null ? '' : next.data.token,
-            spbill_create_ip: next.data === null ? '' : next.data.spbill_create_ip,
-            enter_url: next.data === null ? '' : next.data.enter_url,
-            pay_api_key: next.data === null ? '' : next.data.pay_api_key,
-            body: next.data === null ? '' : next.data.body,
-            welcome_words: next.data === null ? '' : next.data.welcome_words,
-            attach: next.data === null ? '' : next.data.attach,
-        });
-    }
-
-
-    switchConfig = (label) => {
-        return (e) => {
-            this.setState({
-                [label]: e.target.value
-            })
-        };
-    };
-
-    render() {
-        let {config1s, config2s, config3s} = this.props;
-        let {userID,configID, appName,projectID, mch_id, notify_url, appSecret, appID, token, spbill_create_ip, enter_url, pay_api_key, body, welcome_words, attach} = this.state;
-        return (
-            <div>
-                <div className={'schema-name'}>
-                    <FormattedMessage id="WeChat Subscription Data"/>
-                </div>
-                {
-                    config1s.map(config => (
-                        <div key={config} style={{marginBottom: 10}}>
-                            <span className='vice-title'>
-                                {
-                                    youMustFill[config]?
-                                        <span style={{color: 'red', display: 'inline', marginRight: 10}}>*</span>
-                                        :
-                                        ''
-                                }
-                                <FormattedMessage id={valueToKey[config]}/>
-                                &nbsp;
-                                <Tooltip placement="top" title={toolTipTitle[config]}>
-                                    <Icon type="question-circle"/>
-                                </Tooltip>
-                            </span>
-                            <Input value={this.state[config]} style={{width: 200}}
-                                   onChange={this.switchConfig(config)}/>
-                        </div>
-                    ))
-                }
-                <div className={'schema-name'}>
-                    <FormattedMessage id="Server configurations"/>
-                </div>
-                {
-                    config2s.map(config => (
-                        <div key={config} style={{marginBottom: 10}}>
-                            <span className='vice-title'>
-                                {
-                                    youMustFill[config]?
-                                        <span style={{color: 'red', display: 'inline', marginRight: 10}}>*</span>
-                                        :
-                                        ''
-                                }
-                                <FormattedMessage id={valueToKey[config]}/>
-                                &nbsp;
-                                <Tooltip placement="top" title={toolTipTitle[config]}>
-                                    <Icon type="question-circle"/>
-                                </Tooltip>
-                            </span>
-                            <Input value={this.state[config]} style={{width: 200}}
-                                   onChange={this.switchConfig(config)}/>
-                        </div>
-                    ))
-                }
-                <div className={'schema-name'}>
-                    <FormattedMessage id="Pay configurations"/>
-                </div>
-                {
-                    config3s.map(config => (
-                        <div key={config} style={{marginBottom: 10}}>
-                            <span className='vice-title'>
-                                {
-                                    youMustFill[config]?
-                                        <span style={{color: 'red', display: 'inline', marginRight: 10}}>*</span>
-                                        :
-                                        ''
-                                }
-                                <FormattedMessage id={valueToKey[config]}/>
-                                &nbsp;
-                                <Tooltip placement="top" title={toolTipTitle[config]}>
-                                    <Icon type="question-circle"/>
-                                </Tooltip>
-                            </span>
-                            <Input value={this.state[config]} style={{width: 200}}
-                                   onChange={this.switchConfig(config)}/>
-                        </div>
-                    ))
-                }
-                {
-                    this.props.trialcase ?
-                        ""
-                        :
-                        <div>
-                            <UpdateWXConfigButton
-                                id={configID}
-                                appName={appName}
-                                mch_id={mch_id}
-                                notify_url={notify_url}
-                                appSecret={appSecret}
-                                appID={appID}
-                                token={token}
-                                spbill_create_ip={spbill_create_ip}
-                                enter_url={enter_url}
-                                pay_api_key={pay_api_key}
-                                body={body}
-                                welcome_words={welcome_words}
-                                attach={attach}
-                            />
-                            {/*<DeleteWXProjectButton*/}
-                                {/*id={configID}*/}
-                                {/*userID={userID}*/}
-                                {/*projectID={projectID}*/}
-                                {/*history={this.props.history}*/}
-                            {/*/>*/}
-                        </div>
-
-                }
-            </div>
-        )
-    }
-}
-
-class UpdateWXConfigButton extends Component {
-    constructor(props) {
-        super(props);
-        this.state = {}
-    }
-
-    render() {
-        return (
-            <Mutation mutation={gql(UPDATE_WXCONFIG)}>
-                {(update_wxConfig, {loading, error}) => {
-                    if (loading)
-                        return <Spin style={{marginLeft: 30, marginTop: 10}}/>;
-                    if (error)
-                        return 'error';
-                    let {id, appName, mch_id, notify_url, appSecret, appID, token, spbill_create_ip, enter_url, pay_api_key, body, welcome_words, attach} = this.props;
-                    return (
-                        <Button type={'primary'} onClick={() => {
-                            update_wxConfig({
-                                variables: {
-                                    id,
-                                    appName,
-                                    mch_id,
-                                    notify_url,
-                                    appSecret,
-                                    appID,
-                                    token,
-                                    spbill_create_ip,
-                                    enter_url,
-                                    pay_api_key,
-                                    body,
-                                    welcome_words,
-                                    attach,
-                                    updatedAt: new Date().getTime()
-                                }
-                            });
-                        }}><FormattedMessage id="save"/></Button>
-                    )
-                }}
-            </Mutation>
-        )
-    }
-}
-
-class DeleteWXProjectButton extends Component {
-    constructor(props) {
-        super(props);
-        this.state = {
-            userID: props.userID,
-            projectID:props.projectID
-        }
-    }
-
-    showConfirm = (delete_wx_project,  projectID, userID) => {
-        let _this = this;
-        confirm({
-            title: 'Do you want to delete this config?',
-            content: 'It cannot be found back!',
-            onOk() {
-                delete_wx_project({variables: {id:projectID, user_id: userID}});
-                _this.props.history.push({
-                    pathname: `/wechat-service/trial-case/index`,
-                });
-            },
-            onCancel() {
-            },
-        });
-    };
-
-    render() {
-        let {userID,projectID} = this.state;
-
-        return (
-            <Mutation
-                mutation={gql(DELETE_PROJECT)}
-                refetchQueries={[{query: gql(SHOW_PROJECT), variables: {projectType:'wx',user_id: userID}}]}
-            >
-                {(delete_wx_project, {loading, error}) => {
-                    if (loading)
-                        return <Spin style={{marginLeft: 30, marginTop: 10}}/>;
-                    if (error)
-                        return 'error';
-                    return (
-                        <Button
-                            type={'danger'}
-                            onClick={() => {
-                                this.showConfirm(delete_wx_project, projectID, userID);
-                            }}><FormattedMessage id="delete"/></Button>
-                    )
-                }}
-            </Mutation>
-        )
-    }
-}

+ 0 - 5
src/app/developVersion/wechatService/wxConfig/index.css

@@ -1,5 +0,0 @@
-.vice-title {
-  width: 150px;
-  display: inline-block;
-  font-size: 14px;
-}

+ 0 - 178
src/app/developVersion/wechatService/wxCreate/WxCreate.js

@@ -1,178 +0,0 @@
-import React, {Component} from 'react';
-import {withRouter} from "react-router-dom";
-import {Modal, Input, notification, Spin} from 'antd';
-
-import {Mutation, Query} from "react-apollo";
-import gql from "graphql-tag";
-
-import {ADD_PROJECT_AND_WX, SHOW_PROJECT} from '../../../../gql'
-import './index.css';
-import {getCookie} from "../../../../cookie";
-import {idGen} from "../../../../func";
-
-class WxCreate extends Component {
-    constructor(props) {
-        super(props);
-        this.state = {
-            appName: '',
-            configID: '',
-            visible: false,
-            confirmLoading: false,
-            mch_id: '',
-            notify_url: '',
-            appSecret: '',
-            appID: '',
-            token: '',
-            spbill_create_ip: '',
-            enter_url: '',
-            pay_api_key: '',
-            body: '',
-            welcome_words: '',
-            attach: ''
-        };
-    }
-
-    componentWillReceiveProps(nextProps) {
-        this.setState({
-            visible: nextProps.visible,
-        });
-    }
-
-    redirectToLogin = () => {
-        this.props.history.push({
-            pathname: `/login`,
-        });
-    };
-
-    handleOk = (userID, create_project_and_wxConfig) => {
-        let {mch_id, notify_url, appSecret, appID, token, spbill_create_ip, enter_url, pay_api_key, body, welcome_words, attach} = this.state;
-        let wxConfigId = idGen('wxConfig');
-        let projectId= idGen('project');
-        let appName = this.state.appName;
-        let createdAt = new Date().getTime();
-
-        let wxConfigVarObj = {
-            wxConfigId,
-            appName,
-            user_id: userID,
-            wxCreatedAt: createdAt,
-            wxUpdatedAt: '',
-            mch_id,
-            notify_url,
-            appSecret,
-            appID,
-            token,
-            spbill_create_ip,
-            enter_url,
-            pay_api_key,
-            body,
-            welcome_words,
-            attach
-        };
-        let projectVarObj = {
-            projectCreatedAt: createdAt,
-            projectUpdatedAt: '',
-            database_id: '',
-            apiGWGroup_id: '',
-            projectName: appName,
-            deploy_id: '',
-            projectId,
-            projectType: 'wx',
-            cloud_id: '',
-            user_id: userID,
-            wxConfig_id: wxConfigId,
-            schema_id: '',
-            case_id: '',
-            projectStatus: 'created'
-        };
-
-        this.setState({
-            confirmLoading: true,
-        });
-
-        create_project_and_wxConfig({
-            variables: {
-                ...wxConfigVarObj,
-                ...projectVarObj
-            },
-            refetchQueries:[{query: gql(SHOW_PROJECT), variables: {projectType:'wx',user_id: userID}}]
-        });
-
-        setTimeout(() => {
-            this.setState({
-                visible: false,
-                confirmLoading: false,
-            });
-        }, 1000);
-
-        this.props.hideModal();
-        this.props.switchSidebar(appName);
-        this.props.history.push({
-            pathname: `/wechat-service/my-create/${appName}`,
-            state: {
-                appName,
-                configID: wxConfigId,
-                create: true
-            }
-        });
-    };
-
-    render() {
-        let userID = this.props.userID || getCookie('user_id');
-        const {visible, confirmLoading} = this.state;
-
-        return (
-            <div>
-                <Mutation
-                    mutation={gql(ADD_PROJECT_AND_WX)}
-                >
-                    {(create_project_and_wxConfig, {loading, error}) => {
-                        if (loading)
-                            return <Spin style={{marginLeft: 30, marginTop: 10}}/>;
-                        if (error)
-                            return 'error';
-                        return (
-                            <Modal title="Create Wechat Service"
-                                   centered
-                                   visible={visible}
-                                   onOk={() => {
-                                       if(userID !== '' && userID !== undefined)
-                                           this.handleOk(userID, create_project_and_wxConfig)
-                                   }}
-                                   confirmLoading={confirmLoading}
-                                   onCancel={() => {
-                                       this.props.hideModal();
-                                   }}
-                            >
-                                <div>
-                                    <p>app name</p>
-                                    <Input
-                                        className='add-input'
-                                        placeholder="input app_name"
-                                        onChange={e => {
-                                            e.persist();
-                                            if(userID === '' || undefined) {
-                                                notification.open({
-                                                    message: '提醒',
-                                                    description: '需要登录.',
-                                                });
-                                                this.redirectToLogin();
-                                                this.props.hideModal();
-                                            } else {
-                                                this.setState({
-                                                    appName: e.target.value,
-                                                });
-                                            }
-                                        }}
-                                    />
-                                </div>
-                            </Modal>
-                        )
-                    }}
-                </Mutation>
-            </div>
-        )
-    }
-}
-
-export default withRouter(WxCreate);

+ 0 - 3
src/app/developVersion/wechatService/wxCreate/index.css

@@ -1,3 +0,0 @@
-.add-input {
-  margin-top: 10px;
-}

+ 0 - 114
src/app/index.css

@@ -1,114 +0,0 @@
-.layout-home {
-    background-color: white;
-}
-
-/* header 相关开始 */
-.logo {
-    width: 25%;
-    height: 31px;
-    padding: 16px 24px 16px 70px;
-    float: left;
-}
-
-.logo img {
-    width: 25%;
-    padding: 0 0 40px 20px
-}
-/* header 结束 */
-
-/* intro 相关开始 */
-.intro-wrapper {
-    width: 100%;
-    height: 500px;
-    background: url("https://workbench-1254337200.cos.ap-shanghai.myqcloud.com/bgt2.jpg") no-repeat;
-    background-size: cover;
-}
-
-.intro h2 {
-    color: white;
-    font-size: 40px;
-    font-weight: 800;
-}
-
-.intro h3 {
-    color: lightgrey;
-    font-size: 25px;
-    font-weight: 800;
-}
-
-.home-btn-group {
-    padding: 60px 60px 30px 60px;
-}
-
-.home-btn {
-    border-radius: 30px;
-}
-
-.intro-below h4 {
-    color: lightgrey;
-    font-size: 20px;
-    font-weight: 400;
-}
-
-/* intro 结束 */
-
-/*case 相关开始*/
-.cases-show-wrapper {
-    margin-top: 100px;
-}
-
-.cases-show-title {
-    text-align: center;
-    font-weight: bold;
-    font-size: 38px;
-    line-height: 40px;
-}
-
-.case-show-tabs {
-    width: 60%;
-    margin: 60px auto 0;
-}
-
-.cover-div {
-
-}
-
-.cover-img {
-    width: 170px;
-    height: 170px;
-    margin-top: 50px;
-    border: 5px solid #ebebeb;
-}
-
-.logo-cover-div {
-    display: inline-block;
-    margin: 50px 50px 20px 0;
-    text-align: center;
-    opacity: 0.25
-}
-
-.logo-cover-div-on {
-    opacity: 1
-}
-
-.logo-cover-img {
-    width: 100px;
-    height: 100px;
-}
-
-.case-detail-title {
-    font-weight: bold;
-    font-size: 38px;
-    line-height: 40px;
-}
-
-.case-detail-attention {
-    color: red;
-}
-
-.case-detail-description {
-    font-size: 22px;
-    line-height: 30px;
-    margin-top: 20px;
-}
-/*case 结束*/

+ 0 - 1
src/app/user/User.js

@@ -1 +0,0 @@
-// 还没分离

+ 0 - 0
src/app/user/index.css


+ 0 - 162
src/case/BillApp/src/App.js

@@ -1,162 +0,0 @@
-import React, { Component } from 'react';
-import { BrowserRouter as Router, Switch, Route} from 'react-router-dom';
-import {PageContext} from './components/context'
-import config from './api/url_config'
-
-
-import {graphqls} from './api/graphql_request'
-import {BILL_BY_PROPS} from './api/graphql/bills'
-import {getMonDayAndSunDay} from './untils/date'
-
-import TabBarBottom from './components/App/TabBarBottom'
-import HomePage from './components/HomePage/HomePage'
-import Assets from './components/Assets/Assets'
-import My from './components/My/My'
-import Bill from './components/Bill/Bill'
-import BillDetail from './components/BillDetail/BillDetail'
-import CreateAssets from './components/Create_assets/Create_assets'
-import Account from './components/Account/Account'
-
-
-import './components/App/App.css';
-
-window.sessionStorage.setItem('openid',config.APPID)
-
-class BillApp extends Component{
-  constructor(){
-    super()
-    //初始化状态
-    this.state={
-      weekBottom:'',
-      weekTop:'',
-      bills:[],
-      page:"home",
-      detail:'day'
-    }
-
-    this.changePage=this.changePage.bind(this)
-    this.setDetail=this.setDetail.bind(this)
-    this.getBills=this.getBills.bind(this)
-
-  }
-
-  componentDidMount() {
-      this.getBills()
-  }
-
-    //更改页面
-  changePage(page=''){
-    console.log(page)
-    this.setState({page})
-  }
-  
-
-  setDetail(detail){
-    this.setState({detail})
-  }
-
-  //获取数据
-  getBills(){
-    graphqls(BILL_BY_PROPS,{}).then((e)=>{
-      //console.log('1----',e.billbyprops)
-        this.setState({
-            bills:e.billbyprops
-        })
-
-      return e
-    })
-  }
-
-  //根据状态渲染页面
-  renderPage(page){
-    switch(page){
-      case ('home'):
-        return(
-          <div className="pageWrap">
-            <div className="scrollPage">
-              <HomePage changePage={this.changePage} setDetail={this.setDetail} getBills={this.getBills}/>
-            </div>
-          </div>
-          )
-      case('assets'):
-          return(
-            <div className="pageWrap">
-              <div className="scrollPage">
-                <Assets changePage={this.changePage} bills={this.state.bills} getBills={this.getBills}/>
-              </div>
-            </div>
-          )
-     case('my'):
-          return(
-            <div className="pageWrap">
-              <div className="scrollPage">
-                <My changePage={this.changePage}/>
-              </div>
-            </div>
-          )
-
-      case('bill'):
-          return(
-            <div className="pageWrap">
-              <div className="scrollPage">
-                <Bill changePage={this.changePage}/>
-              </div>
-            </div>
-          )
-      case('detail'):
-          return (
-            <div className="pageWrap">
-              <div className="scrollPage">
-                <BillDetail changePage={this.changePage} detail={this.state.detail} bills={this.state.bills}/>
-              </div>
-            </div>
-          )
-      case('create_assets'):
-        return(
-          <div className="pageWrap">
-            <div className="scrollPage">
-              <CreateAssets changePage={this.changePage}  bills={this.state.bills}/>
-            </div>
-          </div>
-        )
-
-      case('account'):
-        return(
-          <div className="pageWrap">
-            <div className="scrollPage">
-              <Account changePage={this.changePage} />
-            </div>
-          </div>
-        )
-          
-      default:
-          return(
-            <div>页面加载失败,请刷新页面</div>
-          )
-    }
-  }
-  //是否渲染底部bar
-  renderBottom(){
-    let page=this.state.page
-    if(page==='home'||page==='assets'||page==='my'){
-      return(<TabBarBottom changePage={this.changePage}/>)
-    }
-  }
-
-  render(){
-    const changePage=this.changePage
-    return(
-      <div className="AppWrap">
-        <div className="phone6s">
-          <div className="App billApp">
-            <PageContext.Provider value={changePage}>
-              {this.renderPage(this.state.page)}
-              {this.renderBottom()}
-            </PageContext.Provider>
-          </div>
-        </div>
-      </div>
-    )
-  }
-}
-export default BillApp;

+ 0 - 57
src/case/BillApp/src/api/graphql/account.js

@@ -1,57 +0,0 @@
-export  const ACCOUNT_BY_PROPS=`query accountbyprops($user_id: ID, $accountName: String, $createdAt: String, $updateAt: String) {
-    accountbyprops: account_by_props(user_id: $user_id accountName: $accountName createdAt: $createdAt updateAt: $updateAt) {
-        id
-        user_id {
-            id
-            openid
-            username
-            password
-            avatar
-            createdAt
-            updateAt
-        }
-        accountName
-        createdAt
-        updateAt
-    }
-}`
-
-export const CREATE_ACCOUNT=`mutation createaccount($id: ID!, $user_id: ID, $accountName: String, $createdAt: String, $updateAt: String) {
-    createaccount: create_account(id: $id user_id: $user_id accountName: $accountName createdAt: $createdAt updateAt: $updateAt) {
-        id
-        user_id {
-            id
-            openid
-            username
-            password
-            avatar
-            createdAt
-            updateAt
-        }
-        accountName
-        createdAt
-        updateAt
-    }
-}`
-
-export const DELETE_ACCOUNT=`mutation deleteaccount($id: ID, $user_id: ID, $accountName: String, $createdAt: String, $updateAt: String) {
-    deleteaccount: delete_account(id: $id user_id: $user_id accountName: $accountName createdAt: $createdAt updateAt: $updateAt)
-}`
-
-export const UPDATE_ACCOUNT=`mutation updateaccount($id: ID, $user_id: ID, $accountName: String, $createdAt: String, $updateAt: String) {
-    updateaccount: update_account(id: $id user_id: $user_id accountName: $accountName createdAt: $createdAt updateAt: $updateAt) {
-        id
-        user_id {
-            id
-            openid
-            username
-            password
-            avatar
-            createdAt
-            updateAt
-        }
-        accountName
-        createdAt
-        updateAt
-    }
-}`

+ 0 - 65
src/case/BillApp/src/api/graphql/assets.js

@@ -1,65 +0,0 @@
-
-export const CREATE_ASSETS=`mutation createassets($id: ID!, $user_id: ID, $name: String, $money: Float, $createdAt: String, $updateAt: String) {
-  createassets: create_assets(id: $id user_id: $user_id name: $name money: $money createdAt: $createdAt updateAt: $updateAt) {
-    id
-    user_id {
-      id
-      openid
-      username
-      password
-      avatar
-      createdAt
-      updateAt
-    }
-    name
-    money
-    createdAt
-    updateAt
-  }
-}`
-
-export const DELETE_ASSETS=`mutation deleteassets($id: ID, $user_id: ID, $name: String, $money: Float, $createdAt: String, $updateAt: String) {
-    deleteassets: delete_assets(id: $id user_id: $user_id name: $name money: $money createdAt: $createdAt updateAt: $updateAt)
-}`
-
-export const ASSETS_BY_PROPS=`query assetsbyprops($user_id: ID, $name: String, $money: Float, $createdAt: String, $updateAt: String) {
-    assetsbyprops: assets_by_props(user_id: $user_id name: $name money: $money createdAt: $createdAt updateAt: $updateAt) {
-        id
-        user_id {
-            id
-            openid
-            username
-            password
-            avatar
-            createdAt
-            updateAt
-        }
-        name
-        money
-        createdAt
-        updateAt
-    }
-}`
-
-
-export const UPDATE_ASSETS=`mutation updateassets($id: ID, $user_id: ID, $name: String, $money: Float, $createdAt: String, $updateAt: String) {
-    updateassets: update_assets(id: $id user_id: $user_id name: $name money: $money createdAt: $createdAt updateAt: $updateAt) {
-        id
-        user_id {
-            id
-            openid
-            username
-            password
-            avatar
-            createdAt
-            updateAt
-        }
-        name
-        money
-        createdAt
-        updateAt
-    }
-}`
-
-
-

+ 0 - 70
src/case/BillApp/src/api/graphql/bills.js

@@ -1,70 +0,0 @@
-export const  BILL_BY_PROPS=`query billbyprops($money: Float, $updateAt: String, $remark: String, $account_id: ID, $time: String, $createdAt: String, $class: String, $user_id: ID, $tag_id: ID) {
-    billbyprops: bill_by_props(money: $money updateAt: $updateAt remark: $remark account_id: $account_id time: $time createdAt: $createdAt class: $class user_id: $user_id tag_id: $tag_id) {
-        money
-        updateAt
-        remark
-        account_id {
-            id
-            accountName
-            createdAt
-            updateAt
-        }
-        time
-        createdAt
-        id
-        class
-        user_id {
-            id
-            openid
-            username
-            password
-            avatar
-            createdAt
-            updateAt
-        }
-        tag_id {
-            id
-            name
-            icon
-            createdAt
-            updateAt
-        }
-    }
-}`
-
-export const CREATE_BILL=`mutation createbill($money: Float, $updateAt: String, $remark: String, $account_id: ID, $time: String, $createdAt: String, $id: ID!, $class: String, $user_id: ID, $tag_id: ID) {
-    createbill: create_bill(money: $money updateAt: $updateAt remark: $remark account_id: $account_id time: $time createdAt: $createdAt id: $id class: $class user_id: $user_id tag_id: $tag_id) {
-        money
-        updateAt
-        remark
-        account_id {
-            id
-
-            accountName
-            createdAt
-            updateAt
-        }
-        time
-        createdAt
-        id
-        class
-        user_id {
-            id
-            openid
-            username
-            password
-            avatar
-            createdAt
-            updateAt
-        }
-        tag_id {
-            id
-
-
-            name
-            icon
-            createdAt
-            updateAt
-        }
-    }
-}`

+ 0 - 50
src/case/BillApp/src/api/graphql/class.js

@@ -1,50 +0,0 @@
-export const CREATE_CLASS=`mutation createclass($id: ID!, $user_id: ID, $account_id: ID, $name: String, $createdAt: String, $updateAt: String) {
-    createclass: create_class(id: $id user_id: $user_id account_id: $account_id name: $name createdAt: $createdAt updateAt: $updateAt) {
-        id
-        user_id {
-            id
-            openid
-            username
-            password
-            avatar
-            createdAt
-            updateAt
-        }
-        account_id {
-            id
-
-            accountName
-            createdAt
-            updateAt
-        }
-        name
-        createdAt
-        updateAt
-    }
-}`
-
-export const CLASS_BY_PROPS=`query classbyprops($user_id: ID, $account_id: ID, $name: String, $createdAt: String, $updateAt: String) {
-    classbyprops: class_by_props(user_id: $user_id account_id: $account_id name: $name createdAt: $createdAt updateAt: $updateAt) {
-        id
-        user_id {
-            id
-            openid
-            username
-            password
-            avatar
-            createdAt
-            updateAt
-        }
-        account_id {
-            id
-
-            accountName
-            createdAt
-            updateAt
-        }
-        name
-        createdAt
-        updateAt
-    }
-}`
-

+ 0 - 51
src/case/BillApp/src/api/graphql/tag.js

@@ -1,51 +0,0 @@
-export const TAG_BY_PROPS=`query tagbyprops($user_id: ID, $account_id: ID, $name: String, $icon: String, $createdAt: String, $updateAt: String) {
-    tagbyprops: tag_by_props(user_id: $user_id account_id: $account_id name: $name icon: $icon createdAt: $createdAt updateAt: $updateAt) {
-        id
-        user_id {
-            id
-            openid
-            username
-            password
-            avatar
-            createdAt
-            updateAt
-        }
-        account_id {
-            id
-
-            accountName
-            createdAt
-            updateAt
-        }
-        name
-        icon
-        createdAt
-        updateAt
-    }
-}`
-
-export const CREATE_TAG=`mutation createtag($id: ID!, $user_id: ID, $account_id: ID, $name: String, $icon: String, $createdAt: String, $updateAt: String) {
-    createtag: create_tag(id: $id user_id: $user_id account_id: $account_id name: $name icon: $icon createdAt: $createdAt updateAt: $updateAt) {
-        id
-        user_id {
-            id
-            openid
-            username
-            password
-            avatar
-            createdAt
-            updateAt
-        }
-        account_id {
-            id
-
-            accountName
-            createdAt
-            updateAt
-        }
-        name
-        icon
-        createdAt
-        updateAt
-    }
-}`

+ 0 - 13
src/case/BillApp/src/api/graphql_request.js

@@ -1,13 +0,0 @@
-import { request } from 'graphql-request'
-import URL from './url_config'
-
-
-export const graphqls=(query,variables)=>{
-   
-    //console.log(URL.HTTP_DATA_URL)
-    const http_request=URL.HTTP_DATA_URL
-      
-    return request(http_request, query,variables).then(data =>data)
-}
-
-

+ 0 - 507
src/case/BillApp/src/api/js.txt

@@ -1,507 +0,0 @@
-query collectbyid($id: ID) {
-    collectbyid: collect_by_id(id: $id) {
-        updateAt
-        remark
-        account_id {
-            id
-
-            accountName
-            createdAt
-            updateAt
-        }
-        month
-        createdAt
-        allIncome
-        allPay
-        year
-        id
-        user_id {
-            id
-            openid
-            username
-            password
-            avatar
-            createdAt
-            updateAt
-        }
-    }
-}
-
-query userbyid($id: ID) {
-    userbyid: user_by_id(id: $id) {
-        id
-        openid
-        username
-        password
-        avatar
-        createdAt
-        updateAt
-    }
-}
-
-query accountbyid($id: ID) {
-    accountbyid: account_by_id(id: $id) {
-        id
-        user_id {
-            id
-            openid
-            username
-            password
-            avatar
-            createdAt
-            updateAt
-        }
-        accountName
-        createdAt
-        updateAt
-    }
-}
-
-query tagbyprops($account_id: ID, $name: String, $icon: String, $createdAt: String, $updateAt: String) {
-    tagbyprops: tag_by_props(account_id: $account_id name: $name icon: $icon createdAt: $createdAt updateAt: $updateAt) {
-        id
-        account_id {
-            id
-
-            accountName
-            createdAt
-            updateAt
-        }
-        name
-        icon
-        createdAt
-        updateAt
-    }
-}
-
-query billbyid($id: ID) {
-    billbyid: bill_by_id(id: $id) {
-        id
-        account_id {
-            id
-
-            accountName
-            createdAt
-            updateAt
-        }
-        tag_id {
-            id
-
-            name
-            icon
-            createdAt
-            updateAt
-        }
-        money
-        class
-        remark
-        createdAt
-        updateAt
-    }
-}
-
-query accountbyprops($user_id: ID, $accountName: String, $createdAt: String, $updateAt: String) {
-    accountbyprops: account_by_props(user_id: $user_id accountName: $accountName createdAt: $createdAt updateAt: $updateAt) {
-        id
-        user_id {
-            id
-            openid
-            username
-            password
-            avatar
-            createdAt
-            updateAt
-        }
-        accountName
-        createdAt
-        updateAt
-    }
-}
-
-query assetsbyprops($user_id: ID, $name: String, $money: Float, $createdAt: String, $updateAt: String) {
-    assetsbyprops: assets_by_props(user_id: $user_id name: $name money: $money createdAt: $createdAt updateAt: $updateAt) {
-        id
-        user_id {
-            id
-            openid
-            username
-            password
-            avatar
-            createdAt
-            updateAt
-        }
-        name
-        money
-        createdAt
-        updateAt
-    }
-}
-
-query tagbyid($id: ID) {
-    tagbyid: tag_by_id(id: $id) {
-        id
-        account_id {
-            id
-
-            accountName
-            createdAt
-            updateAt
-        }
-        name
-        icon
-        createdAt
-        updateAt
-    }
-}
-
-query collectbyprops($updateAt: String, $remark: String, $account_id: ID, $month: String, $createdAt: String, $allIncome: Float, $allPay: Float, $year: String, $user_id: ID) {
-    collectbyprops: collect_by_props(updateAt: $updateAt remark: $remark account_id: $account_id month: $month createdAt: $createdAt allIncome: $allIncome allPay: $allPay year: $year user_id: $user_id) {
-        updateAt
-        remark
-        account_id {
-            id
-
-            accountName
-            createdAt
-            updateAt
-        }
-        month
-        createdAt
-        allIncome
-        allPay
-        year
-        id
-        user_id {
-            id
-            openid
-            username
-            password
-            avatar
-            createdAt
-            updateAt
-        }
-    }
-}
-
-query assetsbyid($id: ID) {
-    assetsbyid: assets_by_id(id: $id) {
-        id
-        user_id {
-            id
-            openid
-            username
-            password
-            avatar
-            createdAt
-            updateAt
-        }
-        name
-        money
-        createdAt
-        updateAt
-    }
-}
-
-query billbyprops($account_id: ID, $tag_id: ID, $money: Float, $class: String, $remark: String, $createdAt: String, $updateAt: String) {
-    billbyprops: bill_by_props(account_id: $account_id tag_id: $tag_id money: $money class: $class remark: $remark createdAt: $createdAt updateAt: $updateAt) {
-        id
-        account_id {
-            id
-
-            accountName
-            createdAt
-            updateAt
-        }
-        tag_id {
-            id
-
-            name
-            icon
-            createdAt
-            updateAt
-        }
-        money
-        class
-        remark
-        createdAt
-        updateAt
-    }
-}
-
-query userbyprops($openid: String, $username: String, $password: String, $avatar: String, $createdAt: String, $updateAt: String) {
-    userbyprops: user_by_props(openid: $openid username: $username password: $password avatar: $avatar createdAt: $createdAt updateAt: $updateAt) {
-        id
-        openid
-        username
-        password
-        avatar
-        createdAt
-        updateAt
-    }
-}
-
-mutation createuser($id: ID!, $openid: String, $username: String, $password: String, $avatar: String, $createdAt: String, $updateAt: String) {
-    createuser: create_user(id: $id openid: $openid username: $username password: $password avatar: $avatar createdAt: $createdAt updateAt: $updateAt) {
-        id
-        openid
-        username
-        password
-        avatar
-        createdAt
-        updateAt
-    }
-}
-
-mutation deleteaccount($id: ID, $user_id: ID, $accountName: String, $createdAt: String, $updateAt: String) {
-    deleteaccount: delete_account(id: $id user_id: $user_id accountName: $accountName createdAt: $createdAt updateAt: $updateAt)
-}
-
-mutation updatebill($id: ID, $account_id: ID, $tag_id: ID, $money: Float, $class: String, $remark: String, $createdAt: String, $updateAt: String) {
-    updatebill: update_bill(id: $id account_id: $account_id tag_id: $tag_id money: $money class: $class remark: $remark createdAt: $createdAt updateAt: $updateAt) {
-        id
-        account_id {
-            id
-
-            accountName
-            createdAt
-            updateAt
-        }
-        tag_id {
-            id
-
-            name
-            icon
-            createdAt
-            updateAt
-        }
-        money
-        class
-        remark
-        createdAt
-        updateAt
-    }
-}
-
-mutation deletecollect($updateAt: String, $remark: String, $account_id: ID, $month: String, $createdAt: String, $allIncome: Float, $allPay: Float, $year: String, $id: ID, $user_id: ID) {
-    deletecollect: delete_collect(updateAt: $updateAt remark: $remark account_id: $account_id month: $month createdAt: $createdAt allIncome: $allIncome allPay: $allPay year: $year id: $id user_id: $user_id)
-}
-
-mutation updateassets($id: ID, $user_id: ID, $name: String, $money: Float, $createdAt: String, $updateAt: String) {
-    updateassets: update_assets(id: $id user_id: $user_id name: $name money: $money createdAt: $createdAt updateAt: $updateAt) {
-        id
-        user_id {
-            id
-            openid
-            username
-            password
-            avatar
-            createdAt
-            updateAt
-        }
-        name
-        money
-        createdAt
-        updateAt
-    }
-}
-
-mutation updateuser($id: ID, $openid: String, $username: String, $password: String, $avatar: String, $createdAt: String, $updateAt: String) {
-    updateuser: update_user(id: $id openid: $openid username: $username password: $password avatar: $avatar createdAt: $createdAt updateAt: $updateAt) {
-        id
-        openid
-        username
-        password
-        avatar
-        createdAt
-        updateAt
-    }
-}
-
-mutation deleteassets($id: ID, $user_id: ID, $name: String, $money: Float, $createdAt: String, $updateAt: String) {
-    deleteassets: delete_assets(id: $id user_id: $user_id name: $name money: $money createdAt: $createdAt updateAt: $updateAt)
-}
-
-mutation createassets($id: ID!, $user_id: ID, $name: String, $money: Float, $createdAt: String, $updateAt: String) {
-    createassets: create_assets(id: $id user_id: $user_id name: $name money: $money createdAt: $createdAt updateAt: $updateAt) {
-        id
-        user_id {
-            id
-            openid
-            username
-            password
-            avatar
-            createdAt
-            updateAt
-        }
-        name
-        money
-        createdAt
-        updateAt
-    }
-}
-
-mutation updatetag($id: ID, $account_id: ID, $name: String, $icon: String, $createdAt: String, $updateAt: String) {
-    updatetag: update_tag(id: $id account_id: $account_id name: $name icon: $icon createdAt: $createdAt updateAt: $updateAt) {
-        id
-        account_id {
-            id
-
-            accountName
-            createdAt
-            updateAt
-        }
-        name
-        icon
-        createdAt
-        updateAt
-    }
-}
-
-mutation createcollect($updateAt: String, $remark: String, $account_id: ID, $month: String, $createdAt: String, $allIncome: Float, $allPay: Float, $year: String, $id: ID!, $user_id: ID) {
-    createcollect: create_collect(updateAt: $updateAt remark: $remark account_id: $account_id month: $month createdAt: $createdAt allIncome: $allIncome allPay: $allPay year: $year id: $id user_id: $user_id) {
-        updateAt
-        remark
-        account_id {
-            id
-
-            accountName
-            createdAt
-            updateAt
-        }
-        month
-        createdAt
-        allIncome
-        allPay
-        year
-        id
-        user_id {
-            id
-            openid
-            username
-            password
-            avatar
-            createdAt
-            updateAt
-        }
-    }
-}
-
-mutation createtag($id: ID!, $account_id: ID, $name: String, $icon: String, $createdAt: String, $updateAt: String) {
-    createtag: create_tag(id: $id account_id: $account_id name: $name icon: $icon createdAt: $createdAt updateAt: $updateAt) {
-        id
-        account_id {
-            id
-
-            accountName
-            createdAt
-            updateAt
-        }
-        name
-        icon
-        createdAt
-        updateAt
-    }
-}
-
-mutation deleteuser($id: ID, $openid: String, $username: String, $password: String, $avatar: String, $createdAt: String, $updateAt: String) {
-    deleteuser: delete_user(id: $id openid: $openid username: $username password: $password avatar: $avatar createdAt: $createdAt updateAt: $updateAt)
-}
-
-mutation updateaccount($id: ID, $user_id: ID, $accountName: String, $createdAt: String, $updateAt: String) {
-    updateaccount: update_account(id: $id user_id: $user_id accountName: $accountName createdAt: $createdAt updateAt: $updateAt) {
-        id
-        user_id {
-            id
-            openid
-            username
-            password
-            avatar
-            createdAt
-            updateAt
-        }
-        accountName
-        createdAt
-        updateAt
-    }
-}
-
-mutation createaccount($id: ID!, $user_id: ID, $accountName: String, $createdAt: String, $updateAt: String) {
-    createaccount: create_account(id: $id user_id: $user_id accountName: $accountName createdAt: $createdAt updateAt: $updateAt) {
-        id
-        user_id {
-            id
-            openid
-            username
-            password
-            avatar
-            createdAt
-            updateAt
-        }
-        accountName
-        createdAt
-        updateAt
-    }
-}
-
-mutation deletebill($id: ID, $account_id: ID, $tag_id: ID, $money: Float, $class: String, $remark: String, $createdAt: String, $updateAt: String) {
-    deletebill: delete_bill(id: $id account_id: $account_id tag_id: $tag_id money: $money class: $class remark: $remark createdAt: $createdAt updateAt: $updateAt)
-}
-
-mutation deletetag($id: ID, $account_id: ID, $name: String, $icon: String, $createdAt: String, $updateAt: String) {
-    deletetag: delete_tag(id: $id account_id: $account_id name: $name icon: $icon createdAt: $createdAt updateAt: $updateAt)
-}
-
-mutation updatecollect($updateAt: String, $remark: String, $account_id: ID, $month: String, $createdAt: String, $allIncome: Float, $allPay: Float, $year: String, $id: ID, $user_id: ID) {
-    updatecollect: update_collect(updateAt: $updateAt remark: $remark account_id: $account_id month: $month createdAt: $createdAt allIncome: $allIncome allPay: $allPay year: $year id: $id user_id: $user_id) {
-        updateAt
-        remark
-        account_id {
-            id
-
-            accountName
-            createdAt
-            updateAt
-        }
-        month
-        createdAt
-        allIncome
-        allPay
-        year
-        id
-        user_id {
-            id
-            openid
-            username
-            password
-            avatar
-            createdAt
-            updateAt
-        }
-    }
-}
-
-mutation createbill($id: ID!, $account_id: ID, $tag_id: ID, $money: Float, $class: String, $remark: String, $createdAt: String, $updateAt: String) {
-    createbill: create_bill(id: $id account_id: $account_id tag_id: $tag_id money: $money class: $class remark: $remark createdAt: $createdAt updateAt: $updateAt) {
-        id
-        account_id {
-            id
-
-            accountName
-            createdAt
-            updateAt
-        }
-        tag_id {
-            id
-
-            name
-            icon
-            createdAt
-            updateAt
-        }
-        money
-        class
-        remark
-        createdAt
-        updateAt
-    }
-}

+ 0 - 9
src/case/BillApp/src/api/url_config.js

@@ -1,9 +0,0 @@
-var config={
-    APPID:"ovtkn4zONC3IzhpykQ7cSLZ85YFg",
-    HTTP_DATA_URL:'http://bills.ioobot.cn/graphql',
-    HTTP_PAY_URL:'https://xcx.ioobot.com/payinfo'
-}
-export default config
-
-
-

+ 0 - 86
src/case/BillApp/src/components/Account/Account.jsx

@@ -1,86 +0,0 @@
-import React, {Component} from 'react';
-
-
-import NavBars from '../common/NavBar'
-import Buttons from '../common/Button'
-
-import {graphqls} from '../../api/graphql_request'
-import {ACCOUNT_BY_PROPS,CREATE_ACCOUNT,DELETE_ACCOUNT,UPDATE_ACCOUNT} from '../../api/graphql/account'
-
-
-import config from '../../api/url_config'
-
-const user_id=config.APPID
-
-class Account extends Component {
-  constructor(props){
-    super(props)
-    this.state={
-      accountList:[]
-    }
-
-    this.deleteAccount=this.deleteAccount.bind(this)
-  }
-
-  componentDidMount() {
-    this.getAccount({user_id})
-  }
-
-  getAccount(data){
-    graphqls(ACCOUNT_BY_PROPS,data).then((e)=>{
-      console.log(e)
-      this.setState({accountList:e.accountbyprops})
-    })
-  }
-
-
-  createAccount(data){
-    graphqls(CREATE_ACCOUNT,data).then((e)=>{
-
-    })
-  }
-
-  deleteAccount(data){
-    graphqls(DELETE_ACCOUNT,data).then((e)=>{
-      this.getAccount({user_id})
-    })
-  }
-
-  updateAccount(data){
-    graphqls(UPDATE_ACCOUNT,data).then((e)=>{
-
-    })
-  }
-
-  createAccountPage(){
-
-  }
-
-  render() {
-    const accountList=this.state.accountList
-    return (
-      <div>
-        <NavBars changePage={this.props.changePage} page={"my"} navBarText={"账户"}/>
-        {
-          accountList.length===0?
-            <div>
-              <div>暂无账户</div>
-              <div style={{height:"20px"}}></div>
-              <Buttons buttonText={"新建账户"}  changePage={this.createAccountPage}/>
-            </div>
-            :
-            accountList.map((item)=>{
-              return(
-                <div key={item.id} style={{minHeight:"20px",background:"#fff",padding:"5px",margin:"10px"}}>
-                  <div style={{padding:"10px 0",fontWeight:"bold",display:"flex"}}><span style={{flexGrow:"1"}}>{item.accountName}</span><span onClick={()=>{this.deleteAccount({id:item.id})}} style={{flexBasis:"23px",height:"23px"}}>x</span></div>
-                  <div style={{padding:"10px 0",color:"#ccc"}}>收入:<span style={{color:"red"}}>10</span>支出:<span style={{color:"green"}}>20</span></div>
-                </div>
-              )
-            })
-        }
-      </div>
-    );
-  }
-}
-
-export default Account;

+ 0 - 100
src/case/BillApp/src/components/App/App.css

@@ -1,100 +0,0 @@
-.billApp .pageWrap{
-    position: relative;
-    z-index: 2;
-    height: 100%;
-    margin-top: 0;
-    padding-top: 45px;
-}
-.scrollPage{
-    height: 440px;
-    overflow-y: hidden;
-    overflow:scroll;
-    margin-top: 1px;
-    background-color: #f5f5f5;
-}
-
-.billApp div.am-tabs-default-bar-tab{
-    font-size: 10px;
-}
-
-
-.billApp  .navBars{
-    position: absolute;
-    width: 100%;
-    top: 0;
-    left: 0;
-    z-index:2;
-}
-
-.billApp  div.am-navbar{
-    background-color: black;
-}
-
-.billWrap form{
-    margin-top: 20px;
-    padding: 0;
-    display: flex;
-    flex-direction: column;
-    justify-content: center;
-    align-items: center;
-}
-
-.billWrap .row{
-    width: 283px;
-    padding: 19px;
-    font-size: 10px;
-    border-bottom: 1px solid #ddd;
-} 
-
-.billWrap .input{
-    padding-left: 53px;
-    border: none;
-}
-
-.billWrap .submit{
-    color: #ffffff;
-    background: green;
-    margin-top: 30px;
-    border: none;
-    border-radius: 3px;
-    padding: 11px 93px;
-}
-
-.billWrap .assetsWrap{
-    display: flex;
-    justify-content: center;
-    align-items: center;
-    
-}
-
-
-
-
-.assetsWrap .collect{
-    text-align: center;
-    margin-top: 150px;
-}
-
-.assetsWrap .buttonWrap{
-    margin-top: 30px;
-}
-
-.assetsWrap .tips{
-    margin-top: 5px;
-    color: #ddd;
-    font-size: 8px;
-    text-align: center;
-}
-
-
-.xxx{
-    display: flex;
-flex-basis: 100px;
-    flex-grow: 1;
-}
-
-
-
-
-
-

+ 0 - 133
src/case/BillApp/src/components/App/TabBarBottom.jsx

@@ -1,133 +0,0 @@
-import React from 'react';
-import { TabBar } from 'antd-mobile';
-//import {PageContext} from '../context'
-
-
-
-
-
-class TabBarBottom extends React.Component {
-  constructor(props) {
-    super(props);
-    this.state = {
-      selectedTab: 'bill',
-      hidden: false,
-      fullScreen: true,
-    };
-    this.handleChange=this.handleChange.bind(this)
-  }
-  
-  //要保留,勿动
-  renderContent(page){}
-
-  handleChange(page){
-    this.props.changePage(page)
-  }
-
-  render() {
-    //这里渲染一次
-    return (
-      <div style={this.state.fullScreen ? { position: 'absolute', height: '100%', width: '100%', bottom: 0 } : { height: 400 }}>
-        <TabBar
-          unselectedTintColor="#949494"
-          tintColor="#33A3F4"
-          barTintColor="white"
-          hidden={this.state.hidden}
-        >
-          <TabBar.Item
-            title="账单"
-            key="bill"
-            icon={<div style={{
-              width: '22px',
-              height: '22px',
-              background: 'url(https://wly-1254337200.cos.ap-guangzhou.myqcloud.com/bill.svg) center center /  21px 21px no-repeat' }}
-            />
-            }
-            selectedIcon={<div style={{
-              width: '22px',
-              height: '22px',
-              background: 'url(https://wly-1254337200.cos.ap-guangzhou.myqcloud.com/bill_s.svg) center center /  21px 21px no-repeat' }}
-            />
-            }
-            selected={this.state.selectedTab === 'bill'}
-         
-            onPress={() => {
-              this.setState({
-                selectedTab: 'bill',
-              });
-              this.handleChange('home')
-            }}
-            data-seed="logId"
-          >
-            {this.renderContent('bill')}
-          </TabBar.Item>
-          <TabBar.Item
-            icon={
-              <div style={{
-                width: '22px',
-                height: '22px',
-                background: 'url(https://wly-1254337200.cos.ap-guangzhou.myqcloud.com/assets.svg) center center /  21px 21px no-repeat' }}
-              />
-            }
-            selectedIcon={
-              <div style={{
-                width: '22px',
-                height: '22px',
-                background: 'url(https://wly-1254337200.cos.ap-guangzhou.myqcloud.com/assets_s.svg) center center /  21px 21px no-repeat' }}
-              />
-            }
-            title="总资产"
-            key="assets"
-          
-            selected={this.state.selectedTab === 'assets'}
-            onPress={() => {
-              this.setState({
-                selectedTab: 'assets',
-              });
-              this.handleChange('assets')
-            }}
-            data-seed="logId1"
-          >
-            {this.renderContent('assets')}
-          </TabBar.Item>
-          <TabBar.Item
-            icon={
-              <div style={{
-                width: '22px',
-                height: '22px',
-                background: 'url(https://wly-1254337200.cos.ap-guangzhou.myqcloud.com/user.svg) center center /  21px 21px no-repeat' }}
-              />
-            }
-            selectedIcon={
-              <div style={{
-                width: '22px',
-                height: '22px',
-                background: 'url(https://wly-1254337200.cos.ap-guangzhou.myqcloud.com/user_s.svg) center center /  21px 21px no-repeat' }}
-              />
-            }
-            title="我的"
-            key="my"
-  
-            selected={this.state.selectedTab === 'my'}
-            onPress={() => {
-              this.setState({
-                selectedTab: 'my',
-              });
-              this.handleChange('my')
-            }}
-          >
-            {this.renderContent('my')}
-          </TabBar.Item>
-        </TabBar>
-      </div>
-    );
-  }
-}
-
-
-export default TabBarBottom
-// export default props => (
-//   <PageContext.Consumer>
-//     {(obj)=> <TabBarBottom {...props} {...obj}/>}
-//   </PageContext.Consumer>
-// );

+ 0 - 66
src/case/BillApp/src/components/Assets/Assets.jsx

@@ -1,66 +0,0 @@
-import React, { Component } from 'react'
-
-import NavBars from '../common/NavBar'
-import Buttons from '../common/Button'
-import {getAllCollect} from '../../untils/collect'
-
-import {graphqls} from "../../api/graphql_request";
-import {CREATE_ASSETS,ASSETS_BY_PROPS,UPDATE_ASSETS} from '../../api/graphql/assets'
-import {BILL_BY_PROPS} from '../../api/graphql/bills'
-
-import config from '../../api/url_config'
-
-
-const user_id=config.APPID
-
-export default class Assets extends Component {
-  constructor(props){
-    super(props)
-    this.state={
-      navBarText:'资产统计',
-      collect:0,
-      pay:0,
-      money:0,
-      bills:[]
-    }
-
-  }
-  componentWillMount(){
-
-
-    let collects= getAllCollect(this.state.bills)
-    this.setState({pay:collects.pay})
-
-    graphqls(ASSETS_BY_PROPS,{user_id}).then(e=>{
-      this.setState({money:e.assetsbyprops[0].money||0})
-    })
-
-  }
-
-  getBills(){
-    graphqls(BILL_BY_PROPS,{}).then((e)=>{
-      //console.log('1----',e.billbyprops)
-      this.setState({
-        bills:e.billbyprops
-      })
-    })
-  }
-
-  // componentWillReceiveProps(props) {
-  //   console.log(props)
-  // }
-
-  render() {
-    console.log(this.state)
-    return (
-      <div>
-       <NavBars navBarText={this.state.navBarText} changePage={this.props.changePage}/>
-       <div className="assetsWrap">
-        <div className="collect">¥<span>{this.state.money-this.state.collect}</span>元</div>
-        <div className="buttonWrap"><Buttons  changePage={this.props.changePage} toPage='create_assets' buttonText='去统计资产'/></div>
-        <div className="tips">tip:总资产使用统计自己每个月内的消费的情况</div>
-       </div>
-      </div>
-    )
-  }
-}

+ 0 - 165
src/case/BillApp/src/components/Bill/Bill.jsx

@@ -1,165 +0,0 @@
-import React, { Component } from 'react'
-import TabBar from './TabBar'
-import NavBars from '../common/NavBar'
-import Pickers from '../common/Picker'
-import Input from '../common/Input'
-import {  WhiteSpace } from 'antd-mobile';
-
-
-import {graphqls} from '../../api/graphql_request'
-import {ACCOUNT_BY_PROPS} from '../../api/graphql/account'
-import {TAG_BY_PROPS} from '../../api/graphql/tag'
-import {CREATE_BILL} from '../../api/graphql/bills'
-
-import {failToast} from '../common/Toast'
-
-
-
-
-let user_id=sessionStorage.getItem('openid')
-
-export default class Bill extends Component {
-  constructor(props){
-    super(props)
-    this.state={
-        picker:[],
-        tabs:[{title:'收入'},{title:'支出'}],
-        class:'收入',
-        account:[],
-        tags:[],
-        account_id:'',
-        time:'',
-        remark:'',
-        money:'',
-        tag_id:'',
-        showPicker:false
-    }
-
-    this.tabChange=this.tabChange.bind(this)
-    this.handleSubmit=this.handleSubmit.bind(this)
-    this.setMoney=this.setMoney.bind(this)
-    this.setAccount_id=this.setAccount_id.bind(this)
-    this.setTime=this.setTime.bind(this)
-    this.setRemark=this.setRemark.bind(this)
-    this.handleSubmit=this.handleSubmit.bind(this)
-    this.showAccountPicker=this.showAccountPicker.bind(this)
-    this.showTimetPicker=this.showTimetPicker.bind(this)
-    this.showTagPicker=this.showTagPicker.bind(this)
-  }
-
-  componentDidMount(){
-    
-    this.getAccount()
-    this.getTag()
-  }
-
-  getAccount(){
-    console.log(user_id)
-    graphqls(ACCOUNT_BY_PROPS,{user_id}).then((e)=>{
-        //console.log('account',e.accountbyprops)
-        this.setState({account:e.accountbyprops})
-    })
-  }
-
-  getTag(){
-    let user_id=sessionStorage.getItem('openid')
-    graphqls(TAG_BY_PROPS,{user_id}).then((e)=>{
-        this.setState({account:e.accountbyprops})
-    })
-  }
-
-  handleSubmit(e){
-    e.preventDefault()
-    let data={
-        id:new Date().getTime()+parseInt(Math.random(),10),
-        class:this.state.class,
-        account_id:this.state.account_id,
-        money:this.state.money,
-        remark:this.state.remark,
-        tag_id:this.state.tag_id,
-        time:this.state.time,
-        user_id,
-        createdAt:new Date().toLocaleString('chinese', { hour12: false }),
-        updateAt:new Date().toLocaleString('chinese', { hour12: false })
-    }
-
-    let key =Object.keys(data)
-    let submit =true
-    key.forEach((item)=>{
-        if(data[item]===''){
-            submit=false
-        }
-    })
-
-    if(submit){
-        graphqls(CREATE_BILL,data).then((e)=>{
-            console.log(e)
-        })
-    }else{
-        failToast('所有选项不能为空',1)
-    }
-  }
-  //picker
-  showAccountPicker(){
-    
-    this.setState({showPicker:true})
-  }
-  showTimetPicker(){
-      
-  }
-  showTagPicker(){
-    
-    this.setState({showPicker:true}) 
-  }
-  //设置state的函数
-  tabChange(e){
-    console.log(e)
-    this.setState({class:e.title})
-  }
-  setMoney(money){
-    console.log(money)
-    this.setState({money})
-  }
-  setAccount_id(account_id){
-    console.log(account_id)
-    this.setState({account_id})
-  }
-  setTime(time){
-    console.log(time)
-    this.setState({time})
-  }  
-  setRemark(remark){
-    console.log(remark)
-    this.setState({remark})
-  }
-
-
-
-  render() {
-    const account=this.state.account
-    const classs=this.state.classs  
-    return (
-      <div className="billWrap">
-        <NavBars page='home' navBarText='记一笔' changePage={this.props.changePage}/>
-        <TabBar tabs={this.state.tabs} tabChange={this.tabChange}/>
-        <form onSubmit={this.handleSubmit}>
-            <Input title="金额" callback={this.setMoney} value={this.state.money} />
-            <WhiteSpace />
-            <div onClick={this.showAccountPicker}><Input title="账户"  disabled={true} callback={this.setAccount_id} value={this.state.account_id} extra={true} /></div>
-            
-            <WhiteSpace />
-            <div onClick={this.showTagPicker}><Input title="分类"  disabled={true} extra={true} onClick={()=>{}}/></div>
-            
-            <WhiteSpace />
-            <div onClick={()=>{console.log('click time')}}><Input title="时间"  disabled={true} callback={this.setTime} value={this.state.time} extra={true} onClick={()=>{}}/></div>
-            
-            <WhiteSpace />
-            <Input title="备注" callback={this.setRemark} value={this.state.remark}/>
-            <button className="submit" type="submit">保存</button>
-        </form>
-        <div style={this.state.showPicker?{}:{display:"none"}}><Pickers data={this.state.picker}/></div>
-    
-      </div>
-    )
-  }
-}

+ 0 - 21
src/case/BillApp/src/components/Bill/TabBar.jsx

@@ -1,21 +0,0 @@
-import React, { Component } from 'react';
-
-import { Tabs, WhiteSpace } from 'antd-mobile';
-
-
-class TabBar extends Component {
-  
-    render() {
-      //console.log('this.state.products',this.state.products)
-      return (
-        <div>
-          <WhiteSpace />
-            <Tabs onChange={e=>this.props.tabChange(e)} tabs={this.props.tabs} renderTabBar={props => <Tabs.DefaultTabBar {...props} page={4} />}>
-            </Tabs>
-          <WhiteSpace />
-        </div>
-      );
-    }
-  }
-
-  export default TabBar

+ 0 - 41
src/case/BillApp/src/components/BillDetail/BillDetail.css

@@ -1,41 +0,0 @@
-.detail-wrap{
-    padding: 10px 5px;
-    background:#fff;
-}
-
-
-
-.detail-wrap .balance{
-    font-size: 9px;
-    color: #cccccc;
-}
-
-.balance-money{
-    font-size: 15px;
-    font-weight: bold;
-    padding: 3px 0;
-}
-.income-wrap , .pay-wrap{
-    display: flex;
-    padding: 5px 0;
-}
-
-.income-wrap span:nth-child(1){
-    flex-grow: 0.9;
-
-}
-
-.income-wrap span:nth-child(2){
-    flex-grow: 0.1;
-    color: red;
-}
-
-.pay-wrap span:nth-child(1){
-    flex-grow: 0.9;
-
-}
-
-.pay-wrap span:nth-child(2){
-    flex-grow: 0.1;
-    color: green;
-}

+ 0 - 116
src/case/BillApp/src/components/BillDetail/BillDetail.jsx

@@ -1,116 +0,0 @@
-import React, { Component } from 'react'
-
-import NavBars from '../common/NavBar'
-//import Pickers from '../common/Picker'
-
-
-
-
-//import {setSessionStorage,getSessionStorage} from '../../untils/session_help'
-import {getDayCollect,getWeekCollect,getMonthCollect,getAllCollect} from '../../untils/collect'
-import './BillDetail.css'
-
-
-// const season = [
-//     {
-//       label: '春',
-//       value: '春',
-//     },
-//     {
-//       label: '夏',
-//       value: '夏',
-//     },
-//   ];
-
-export default class BillDetail extends Component {
-    constructor(props){
-        super(props)
-        this.state={
-            bill:[],
-            pay:0,
-            income:0,
-            billArr:[]
-        }
-
-    }
-
-    componentDidMount(props){
-        console.log('detailPageProps',props)
-        const detail=this.props.detail
-        const bills=this.props.bills
-        if(detail==='day'){
-            this.getDay(bills)
-        }else if(detail==='week'){
-            this.getWeek(bills)
-        }else if(detail==='month'){
-            this.getMonth(bills)
-        }else{
-            this.getAll(bills)
-        }
-
-    }
-
-    getDay(bills){
-        let collect=getDayCollect(bills)
-        this.setState({pay:collect.pay,income:collect.income,billArr:collect.billArr})
-    }
-    getWeek(bills){
-        let collect=getWeekCollect(bills)
-        this.setState({pay:collect.pay,income:collect.income,billArr:collect.billArr})
-    }
-    getMonth(bills){
-        let collect=getMonthCollect(bills)
-        this.setState({pay:collect.pay,income:collect.income,billArr:collect.billArr})
-    }
-    getAll(bills){
-        let collect=getAllCollect(bills)
-        this.setState({pay:collect.pay,income:collect.income,billArr:collect.billArr})
-    }
-
-    renderList(){
-        let billArr=this.state.billArr||[]
-        let length=billArr.lemgth
-        if(length){
-            return <div>没有流水记录</div>
-        }else{
-            return (
-             billArr.map((item)=>{
-                 return (
-                   <div className={"pay-wrap"} style={{background:"#fff",margin:"5px 0",padding:"13px 5px"}} key={item.id}>
-                       <span>{item.remark}</span>
-                       <span>{item.money}</span>
-                   </div>
-                 )
-             })
-            )
-        }
-
-    }
-
-    render() {
-
-        return (
-        <div>
-            <NavBars changePage={this.props.changePage} page="home" navBarText={"账单详情"}/>
-            <div className={'detail-wrap'}>
-                <div className="balance">结余:</div>
-                <div className={"balance-money"}>{this.state.income - this.state.pay}</div>
-                <div className={"income-wrap"}>
-                    <span>收入</span>
-                    <span>{this.state.income}</span>
-                </div>
-                <div className={"pay-wrap"}>
-                    <span>支出</span>
-                    <span>{this.state.pay}</span>
-                </div>
-            </div>
-            <div style={{height:'20px'}}></div>
-            {this.renderList()}
-
-            {/*<div className="deatilWrap">
-                <Pickers data={season}/>
-            </div>*/}
-        </div>
-        )
-    }
-}

+ 0 - 88
src/case/BillApp/src/components/Create_assets/Create_assets.jsx

@@ -1,88 +0,0 @@
-import React, {Component} from 'react';
-import {  WhiteSpace } from 'antd-mobile';
-
-import NavBars from '../common/NavBar'
-import Input from '../common/Input'
-import Buttons from '../common/Button'
-
-
-import {graphqls} from '../../api/graphql_request'
-import {CREATE_ASSETS,ASSETS_BY_PROPS,UPDATE_ASSETS} from '../../api/graphql/assets'
-import config from '../../api/url_config'
-
-const user_id=config.APPID
-
-
-
-class CreateAssets extends Component {
-  constructor(props){
-    super(props)
-    this.state={
-      navBarText:'统计资产',
-      assetsList:[],
-      name:'',
-      money:0
-    }
-    this.save=this.save.bind(this)
-  }
-
-
-  componentDidMount() {
-    this.getAssets({user_id})
-  }
-
-  getAssets(data){
-    graphqls(ASSETS_BY_PROPS,data).then((e)=>{
-      this.setState({
-        assetsList:e.assetsbyprops,
-        money:e.assetsbyprops[0].money||0
-      })
-    })
-
-    this.handleChange=this.handleChange.bind(this)
-  }
-
-  renderList(){
-
-
-  }
-
-  handleChange(e){
-    this.setState({money:e})
-  }
-
-  save(){
-    let that=this
-    console.log('money',this.state)
-    let data={
-      user_id:user_id,
-      money:this.state.money
-    }
-    this.updateAssets(data)
-  }
-
-
-  updateAssets(data){
-    graphqls(UPDATE_ASSETS,data).then((e)=>{
-      this.getAssets()
-    })
-  }
-
-  render() {
-    return (
-      <div>
-        <NavBars navBarText={this.state.navBarText} changePage={this.props.changePage} page={'assets'}/>
-        <div style={{display:"flex",justifyContent:"center",flexDirection: "column",alignItems: "center",height:"500px"}}>
-          <div style={{fontSize:"10px",coloe:"#ccc",padding:"10px"}}>我拥有:</div>
-          <WhiteSpace/>
-          <Input title="财富值" callback={this.handleChange} value={this.state.money} />
-          <WhiteSpace/>
-          <div style={{width:"300px"}}><Buttons buttonText={"确认修改"}  changePage={this.save}/></div>
-        </div>
-      </div>
-    );
-  }
-
-}
-
-export default CreateAssets;

+ 0 - 31
src/case/BillApp/src/components/HomePage/HomePage.css

@@ -1,31 +0,0 @@
-
-.dateWrap{
-    padding: 10px 15px;
-    text-align: left;
-}
-
-.month{
-    font-size: 20px;
-    color:green;
-}
-.buttonWrap{
-    padding-top: 40px;
-}
-
-
-.listWrap{
-    margin-top: 10px;
-}
-.itemWrap{
-    display: flex;
-}
-
-
-.itemWrap > div:nth-child(1){
-    padding:12px 0;
-}
-
-.itemWrap > div:nth-child(2){
-    padding-left: 126px;
-}
-

Nem az összes módosított fájl került megjelenítésre, mert túl sok fájl változott