Commit 3872a787 by guomingpang

Merge branch 'feature/pangguoming/20210802/login-authentication' into dev

parents 53420726 b8e3b458
......@@ -24,19 +24,16 @@ const getClientEnvironment = require('./env');
const ModuleNotFoundPlugin = require('react-dev-utils/ModuleNotFoundPlugin');
const ForkTsCheckerWebpackPlugin = require('react-dev-utils/ForkTsCheckerWebpackPlugin');
const typescriptFormatter = require('react-dev-utils/typescriptFormatter');
var PREFIX = 'wechect-common-'
const postcssNormalize = require('postcss-normalize');
// const vConsolePlugin = require('vconsole-webpack-plugin');
const appPackageJson = require(paths.appPackageJson);
// 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';
const isExtendingEslintConfig = process.env.EXTEND_ESLINT === 'true';
const imageInlineSizeLimit = parseInt(
process.env.IMAGE_INLINE_SIZE_LIMIT || '10000'
......@@ -178,14 +175,14 @@ module.exports = function(webpackEnv) {
// There will be one main bundle, and one file per asynchronous chunk.
// In development, it does not produce real files.
filename: isEnvProduction
? 'static/js/[name].[contenthash:8].js'
: isEnvDevelopment && 'static/js/bundle.js',
?PREFIX+ 'static/js/[name].[contenthash:8].js'
: isEnvDevelopment && PREFIX+'static/js/bundle.js',
// TODO: remove this when upgrading to webpack 5
futureEmitAssets: true,
// There are also additional JS chunk files if you use code splitting.
chunkFilename: isEnvProduction
? 'static/js/[name].[contenthash:8].chunk.js'
: isEnvDevelopment && 'static/js/[name].chunk.js',
? PREFIX+'static/js/[name].[contenthash:8].chunk.js'
: isEnvDevelopment && PREFIX+'static/js/[name].chunk.js',
// 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.
// We inferred the "public path" (such as / or /my-project) from homepage.
......@@ -373,7 +370,7 @@ module.exports = function(webpackEnv) {
loader: require.resolve('url-loader'),
options: {
limit: imageInlineSizeLimit,
name: 'static/media/[name].[hash:8].[ext]',
name: PREFIX+'static/media/[name].[hash:8].[ext]',
},
},
// Process application JS with Babel.
......@@ -508,7 +505,7 @@ module.exports = function(webpackEnv) {
// by webpacks internal loaders.
exclude: [/\.(js|mjs|jsx|ts|tsx)$/, /\.html$/, /\.json$/],
options: {
name: 'static/media/[name].[hash:8].[ext]',
name: PREFIX+'static/media/[name].[hash:8].[ext]',
},
},
// ** STOP ** Are you adding a new loader?
......@@ -581,8 +578,8 @@ module.exports = function(webpackEnv) {
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',
filename: PREFIX+'static/css/[name].[contenthash:8].css',
chunkFilename: PREFIX+'static/css/[name].[contenthash:8].chunk.css',
}),
// Generate an asset manifest file with the following content:
// - "files" key: Mapping of all asset filenames to their corresponding
......@@ -608,9 +605,6 @@ module.exports = function(webpackEnv) {
};
},
}),
// new vConsolePlugin({
// enable: (process.env.DEPLOY_ENV === 'prod' || process.env.DEPLOY_ENV === 'beta') ? false : true
// }),
// 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.
......
......@@ -128,6 +128,7 @@
if (res.code == 200) {
$('#success').show()
}else if(res.code === 'DEPLOY_CROP_ADD_USER_NO'){
//租户配置到限,跳转空白提示缺省页
$('#tenant-config-error').show();
$('#tenant-config-error-message').html(res.message)
emptyAnimation()
......
......@@ -41,7 +41,7 @@ if (!checkRequiredFiles([paths.appHtml, paths.appIndexJs])) {
}
// Tools like Cloud9 rely on this.
const DEFAULT_PORT = parseInt(process.env.PORT, 10) || 3000;
const DEFAULT_PORT = parseInt(process.env.PORT, 10) || 3003;
const HOST = process.env.HOST || '0.0.0.0';
if (process.env.HOST) {
......
......@@ -68,6 +68,7 @@ class Axios {
if (success || resultCode === 0) {
return response;
}else if(code === 'DEPLOY_CROP_ADD_USER_NO'){
//租户配置到限,跳转空白提示缺省页
window.location.replace("/wechat-common/#/empty-page")
return Promise.reject(response.data)
}
......
......@@ -29,7 +29,7 @@ const CloudClassConfig: MenuConfig = {
},
{
key: 'empty-page',
name: '授权登录',
name: '提示',
path: '/empty-page',
component:EmptyPage,
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment