Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
xiaomai-cloud-class-web
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xiaomai-cloud-class
xiaomai-cloud-class-web
Commits
1295862f
Commit
1295862f
authored
Jan 18, 2021
by
zhujian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
'fixed'
parent
89af2e0f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
1 deletions
+12
-1
config/webpack.config.js
+4
-0
src/index.tsx
+8
-1
No files found.
config/webpack.config.js
View file @
1295862f
...
...
@@ -20,6 +20,7 @@ const ModuleScopePlugin = require('react-dev-utils/ModuleScopePlugin');
const
getCSSModuleLocalIdent
=
require
(
'react-dev-utils/getCSSModuleLocalIdent'
);
const
paths
=
require
(
'./paths'
);
const
modules
=
require
(
'./modules'
);
const
vConsolePlugin
=
require
(
'vconsole-webpack-plugin'
);
const
getClientEnvironment
=
require
(
'./env'
);
const
ModuleNotFoundPlugin
=
require
(
'react-dev-utils/ModuleNotFoundPlugin'
);
const
ForkTsCheckerWebpackPlugin
=
require
(
'react-dev-utils/ForkTsCheckerWebpackPlugin'
);
...
...
@@ -662,6 +663,9 @@ module.exports = function (webpackEnv) {
// The formatter is invoked directly in WebpackDevServerUtils during development
formatter
:
isEnvProduction
?
typescriptFormatter
:
undefined
,
}),
new
vConsolePlugin
({
enable
:
(
process
.
env
.
DEPLOY_ENV
===
'prod'
||
process
.
env
.
DEPLOY_ENV
===
'beta'
)
?
false
:
true
})
].
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.
...
...
src/index.tsx
View file @
1295862f
...
...
@@ -49,7 +49,14 @@ function mount() {
document
.
getElementById
(
'root'
));
}
if
(
getParameterByName
(
'code'
))
{
function
isWeiXin
()
{
const
ua
=
navigator
.
userAgent
.
toLowerCase
();
return
ua
.
indexOf
(
'micromessenger'
)
>
0
;
}
console
.
log
(
isWeiXin
(),
'isWeiXin()'
)
if
(
getParameterByName
(
'code'
)
&&
isWeiXin
())
{
Service
.
Hades
(
'anon/hades/wXWorkUserLogin'
,
{
appTermEnum
:
'XIAOMAI_CLOUD_CLASS_PC_WEB_ADMIN'
,
code
:
getParameterByName
(
'code'
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment