Skip to content

Commit

Permalink
set registry
Browse files Browse the repository at this point in the history
  • Loading branch information
zhanghuiyin committed Jun 21, 2024
1 parent d5d2a54 commit 637706f
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ WORKDIR /app

COPY package.json pnpm-lock.yaml ./

RUN npm install -g pnpm && pnpm install
RUN npm install -g pnpm && pnpm config set registry https://registry.npmmirror.com && pnpm install

COPY . .

Expand Down
3 changes: 1 addition & 2 deletions src/pages/teacher/account/create.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ const CreateAccount = (props) => {
} else if (
confirmPassword !== password &&
confirmPassword?.length > 0 &&
password?.length > 0 &&
type === 'confirm'
password?.length > 0
) {
return Promise.reject('两次密码不一致');
}
Expand Down
8 changes: 6 additions & 2 deletions src/pages/teacher/device/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,10 @@ const Data: React.FC = () => {
for(let item of res.items){
if(!(item.spec.deviceStatus === 'Running' || item.spec.deviceStatus === 'default')){
setIsLoop(true);
intervalTime = setInterval(() => refreshCallBack(), 5000);
intervalTime = setInterval(() =>{
refreshCallBack();
refreshCallBackSum();
} , 5000);
break;
}
}
Expand All @@ -48,7 +51,8 @@ const Data: React.FC = () => {

/* Tips===使用情况 */
const {
data: sumupsData
data: sumupsData,
refresh: refreshCallBackSum,
} = useRequest(() => DevicesServices.getDevicesSum());

/* 默认的设备类型 === 在菜单平台设置中进行配置的*/
Expand Down
10 changes: 5 additions & 5 deletions webpack/webpack.config.pro.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const BASE = require('./webpack.config.base.js');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
// eslint-disable-next-line no-undef,@typescript-eslint/no-var-requires
// const CopyWebpackPlugin = require('copy-webpack-plugin');
const CopyWebpackPlugin = require('copy-webpack-plugin');

module.exports = merge(BASE, {
mode: 'production',
Expand All @@ -36,10 +36,10 @@ module.exports = merge(BASE, {
// more options:
// https://github.com/kangax/html-minifier#options-quick-reference
}
})
// new CopyWebpackPlugin({
// // patterns: [{ from: resolve(__dirname, '../public/externalLinkConfig.js'), to: resolve(__dirname, '../dist') }]
// }) //打包静态资源
}),
new CopyWebpackPlugin({
patterns: [{ from: resolve(__dirname, '../public/studentImg'), to: resolve(__dirname, '../dist/studentImg') }]
}) //打包静态资源
//暂时屏蔽,使用后导致css包导入有误,可能有冲突,后期再解决
// new PurgeCSSPlugin({ // 删除没有用到的css样式
// paths: glob.sync(`${PATHS.src}/**/*`, {nodir: true}),
Expand Down

0 comments on commit 637706f

Please sign in to comment.