webpack.config.js 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556
  1. const path = require('path');
  2. const HtmlWebpackPlugin = require('html-webpack-plugin');
  3. /*const HtmlWebpackInlineSourcePlugin=require('html-webpack-inline-source-plugin');*/
  4. const CleanWebpackPlugin = require('clean-webpack-plugin') // 清空打包目录的插件
  5. const MiniCssExtractPlugin = require('mini-css-extract-plugin');
  6. const CopyWebpackPlugin = require('copy-webpack-plugin');
  7. const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
  8. const webpack = require('webpack');
  9. const proxyHost = "http://192.168.2.236:5858";
  10. // const proxyHost = "http://192.168.2.241:5858";
  11. // const proxyHost = "http://192.168.3.117:5858";//铁钢
  12. // const proxyHost = "http://192.168.3.113:5858";//王峰
  13. module.exports = {
  14. entry: {
  15. index: path.resolve(__dirname, 'src/js', 'index.js'),
  16. qcScore:path.resolve(__dirname, 'src/js', 'qcScore.js'),
  17. login:path.resolve(__dirname, 'src/js', 'login.js'),
  18. console:path.resolve(__dirname, 'src/js', 'console.js'),
  19. deptConsole:path.resolve(__dirname, 'src/js', 'deptConsole.js'),
  20. moduleManager: path.resolve(__dirname, 'src/js', 'moduleManager.js'),
  21. itemManager: path.resolve(__dirname, 'src/js', 'itemManager.js'),
  22. qcList: path.resolve(__dirname, 'src/js', 'qcList.js'),
  23. qcListDept:path.resolve(__dirname, 'src/js', 'qcListDept.js'),
  24. qcListPerson:path.resolve(__dirname, 'src/js', 'qcListPerson.js'),
  25. userManager: path.resolve(__dirname, 'src/js', 'userManager.js'),
  26. roleManager: path.resolve(__dirname, 'src/js', 'roleManager.js'),
  27. tiaomu: path.resolve(__dirname, 'src/js', 'tiaomu.js'),
  28. mukuai: path.resolve(__dirname, 'src/js', 'mukuai.js'),
  29. abnormal: path.resolve(__dirname, 'src/js', 'abnormal.js'),
  30. partDetail: path.resolve(__dirname, 'src/js', 'partDetail.js'),
  31. dayDetail: path.resolve(__dirname, 'src/js', 'dayDetail.js'),
  32. payDetail: path.resolve(__dirname, 'src/js', 'payDetail.js'),
  33. deptScoreDetail: path.resolve(__dirname, 'src/js', 'deptScoreDetail.js'),
  34. deptScoreDetailControl: path.resolve(__dirname, 'src/js', 'deptScoreDetailControl.js'),
  35. jiaji: path.resolve(__dirname, 'src/js', 'jiaji.js'),
  36. partDetailControl: path.resolve(__dirname, 'src/js', 'partDetailControl.js'),
  37. quexianXQ: path.resolve(__dirname, 'src/js', 'quexianXQ.js'),
  38. quexianDetail: path.resolve(__dirname, 'src/js', 'quexianDetail.js'),
  39. quexianDetailControl: path.resolve(__dirname, 'src/js', 'quexianDetailControl.js'),
  40. mukuaiControl: path.resolve(__dirname, 'src/js', 'mukuaiControl.js'),
  41. tiaomuControl: path.resolve(__dirname, 'src/js', 'tiaomuControl.js'),
  42. assertType: path.resolve(__dirname, 'src/js', 'assertType.js'),
  43. assertTypeDetail: path.resolve(__dirname, 'src/js', 'assertTypeDetail.js'),
  44. vendor: 'lodash'// 多个页面所需的公共库文件,防止重复打包带入
  45. },
  46. output: {
  47. publicPath: '/', //这里要放的是静态资源CDN的地址
  48. path: path.resolve(__dirname, 'dist'),
  49. filename: 'js/[name].js'
  50. },
  51. resolve: {
  52. extensions: [".js", ".css", ".json"],
  53. alias: {} //配置别名可以加快webpack查找模块的速度
  54. },
  55. plugins: [//多入口的html文件用chunks这个参数来区分
  56. new HtmlWebpackPlugin({
  57. title: 'index',
  58. template: path.resolve(__dirname, 'src/html', 'index.html'),
  59. filename: 'index.html',
  60. chunks: ['index', 'vendor', 'common'],
  61. hash: true, //防止缓存
  62. inject: true,
  63. minify: {
  64. removeAttributeQuotes: true, //压缩 去掉引号
  65. removeComments: true, //移除HTML中的注释
  66. collapseWhitespace: true //删除空白符与换行符
  67. }
  68. }),
  69. new HtmlWebpackPlugin({
  70. title: 'console.html',
  71. template: path.resolve(__dirname, 'src/html', 'console.html'),
  72. filename: 'console.html',
  73. chunks: ['console', 'vendor', 'common'],
  74. hash: true, //防止缓存
  75. inject: true,
  76. minify: {
  77. removeAttributeQuotes: true, //压缩 去掉引号
  78. removeComments: true, //移除HTML中的注释
  79. collapseWhitespace: true //删除空白符与换行符
  80. }
  81. }),
  82. new HtmlWebpackPlugin({
  83. title: 'tiaomuControl.html',
  84. template: path.resolve(__dirname, 'src/html', 'tiaomuControl.html'),
  85. filename: 'tiaomuControl.html',
  86. chunks: ['tiaomuControl', 'vendor', 'common'],
  87. hash: true, //防止缓存
  88. inject: true,
  89. minify: {
  90. removeAttributeQuotes: true, //压缩 去掉引号
  91. removeComments: true, //移除HTML中的注释
  92. collapseWhitespace: true //删除空白符与换行符
  93. }
  94. }),
  95. new HtmlWebpackPlugin({
  96. title: 'assertTypeDetail.html',
  97. template: path.resolve(__dirname, 'src/html', 'assertTypeDetail.html'),
  98. filename: 'assertTypeDetail.html',
  99. chunks: ['assertTypeDetail', 'vendor', 'common'],
  100. hash: true, //防止缓存
  101. inject: true,
  102. minify: {
  103. removeAttributeQuotes: true, //压缩 去掉引号
  104. removeComments: true, //移除HTML中的注释
  105. collapseWhitespace: true //删除空白符与换行符
  106. }
  107. }),
  108. new HtmlWebpackPlugin({
  109. title: 'assertType.html',
  110. template: path.resolve(__dirname, 'src/html', 'assertType.html'),
  111. filename: 'assertType.html',
  112. chunks: ['assertType', 'vendor', 'common'],
  113. hash: true, //防止缓存
  114. inject: true,
  115. minify: {
  116. removeAttributeQuotes: true, //压缩 去掉引号
  117. removeComments: true, //移除HTML中的注释
  118. collapseWhitespace: true //删除空白符与换行符
  119. }
  120. }),
  121. new HtmlWebpackPlugin({
  122. title: 'mukuaiControl.html',
  123. template: path.resolve(__dirname, 'src/html', 'mukuaiControl.html'),
  124. filename: 'mukuaiControl.html',
  125. chunks: ['mukuaiControl', 'vendor', 'common'],
  126. hash: true, //防止缓存
  127. inject: true,
  128. minify: {
  129. removeAttributeQuotes: true, //压缩 去掉引号
  130. removeComments: true, //移除HTML中的注释
  131. collapseWhitespace: true //删除空白符与换行符
  132. }
  133. }),
  134. new HtmlWebpackPlugin({
  135. title: 'quexianDetail.html',
  136. template: path.resolve(__dirname, 'src/html', 'quexianDetail.html'),
  137. filename: 'quexianDetail.html',
  138. chunks: ['quexianDetail', 'vendor', 'common'],
  139. hash: true, //防止缓存
  140. inject: true,
  141. minify: {
  142. removeAttributeQuotes: true, //压缩 去掉引号
  143. removeComments: true, //移除HTML中的注释
  144. collapseWhitespace: true //删除空白符与换行符
  145. }
  146. }),
  147. new HtmlWebpackPlugin({
  148. title: 'quexianDetailControl.html',
  149. template: path.resolve(__dirname, 'src/html', 'quexianDetailControl.html'),
  150. filename: 'quexianDetailControl.html',
  151. chunks: ['quexianDetailControl', 'vendor', 'common'],
  152. hash: true, //防止缓存
  153. inject: true,
  154. minify: {
  155. removeAttributeQuotes: true, //压缩 去掉引号
  156. removeComments: true, //移除HTML中的注释
  157. collapseWhitespace: true //删除空白符与换行符
  158. }
  159. }),
  160. new HtmlWebpackPlugin({
  161. title: 'quexianXQ.html',
  162. template: path.resolve(__dirname, 'src/html', 'quexianXQ.html'),
  163. filename: 'quexianXQ.html',
  164. chunks: ['quexianXQ', 'vendor', 'common'],
  165. hash: true, //防止缓存
  166. inject: true,
  167. minify: {
  168. removeAttributeQuotes: true, //压缩 去掉引号
  169. removeComments: true, //移除HTML中的注释
  170. collapseWhitespace: true //删除空白符与换行符
  171. }
  172. }),
  173. new HtmlWebpackPlugin({
  174. title: 'partDetailControl.html',
  175. template: path.resolve(__dirname, 'src/html', 'partDetailControl.html'),
  176. filename: 'partDetailControl.html',
  177. chunks: ['partDetailControl', 'vendor', 'common'],
  178. hash: true, //防止缓存
  179. inject: true,
  180. minify: {
  181. removeAttributeQuotes: true, //压缩 去掉引号
  182. removeComments: true, //移除HTML中的注释
  183. collapseWhitespace: true //删除空白符与换行符
  184. }
  185. }),
  186. new HtmlWebpackPlugin({
  187. title: 'jiaji.html',
  188. template: path.resolve(__dirname, 'src/html', 'jiaji.html'),
  189. filename: 'jiaji.html',
  190. chunks: ['jiaji', 'vendor', 'common'],
  191. hash: true, //防止缓存
  192. inject: true,
  193. minify: {
  194. removeAttributeQuotes: true, //压缩 去掉引号
  195. removeComments: true, //移除HTML中的注释
  196. collapseWhitespace: true //删除空白符与换行符
  197. }
  198. }),
  199. new HtmlWebpackPlugin({
  200. title: 'abnormal.html',
  201. template: path.resolve(__dirname, 'src/html', 'abnormal.html'),
  202. filename: 'abnormal.html',
  203. chunks: ['abnormal', 'vendor', 'common'],
  204. hash: true, //防止缓存
  205. inject: true,
  206. minify: {
  207. removeAttributeQuotes: true, //压缩 去掉引号
  208. removeComments: true, //移除HTML中的注释
  209. collapseWhitespace: true //删除空白符与换行符
  210. }
  211. }),
  212. new HtmlWebpackPlugin({
  213. title: 'deptScoreDetailControl.html',
  214. template: path.resolve(__dirname, 'src/html', 'deptScoreDetailControl.html'),
  215. filename: 'deptScoreDetailControl.html',
  216. chunks: ['deptScoreDetailControl', 'vendor', 'common'],
  217. hash: true, //防止缓存
  218. inject: true,
  219. minify: {
  220. removeAttributeQuotes: true, //压缩 去掉引号
  221. removeComments: true, //移除HTML中的注释
  222. collapseWhitespace: true //删除空白符与换行符
  223. }
  224. }),
  225. new HtmlWebpackPlugin({
  226. title: 'payDetail.html',
  227. template: path.resolve(__dirname, 'src/html', 'payDetail.html'),
  228. filename: 'payDetail.html',
  229. chunks: ['payDetail', 'vendor', 'common'],
  230. hash: true, //防止缓存
  231. inject: true,
  232. minify: {
  233. removeAttributeQuotes: true, //压缩 去掉引号
  234. removeComments: true, //移除HTML中的注释
  235. collapseWhitespace: true //删除空白符与换行符
  236. }
  237. }),
  238. new HtmlWebpackPlugin({
  239. title: 'partDetail.html',
  240. template: path.resolve(__dirname, 'src/html', 'partDetail.html'),
  241. filename: 'partDetail.html',
  242. chunks: ['partDetail', 'vendor', 'common'],
  243. hash: true, //防止缓存
  244. inject: true,
  245. minify: {
  246. removeAttributeQuotes: true, //压缩 去掉引号
  247. removeComments: true, //移除HTML中的注释
  248. collapseWhitespace: true //删除空白符与换行符
  249. }
  250. }),
  251. new HtmlWebpackPlugin({
  252. title: 'dayDetail.html',
  253. template: path.resolve(__dirname, 'src/html', 'dayDetail.html'),
  254. filename: 'dayDetail.html',
  255. chunks: ['dayDetail', 'vendor', 'common'],
  256. hash: true, //防止缓存
  257. inject: true,
  258. minify: {
  259. removeAttributeQuotes: true, //压缩 去掉引号
  260. removeComments: true, //移除HTML中的注释
  261. collapseWhitespace: true //删除空白符与换行符
  262. }
  263. }),
  264. new HtmlWebpackPlugin({
  265. title: 'deptScoreDetail.html',
  266. template: path.resolve(__dirname, 'src/html', 'deptScoreDetail.html'),
  267. filename: 'deptScoreDetail.html',
  268. chunks: ['deptScoreDetail', 'vendor', 'common'],
  269. hash: true, //防止缓存
  270. inject: true,
  271. minify: {
  272. removeAttributeQuotes: true, //压缩 去掉引号
  273. removeComments: true, //移除HTML中的注释
  274. collapseWhitespace: true //删除空白符与换行符
  275. }
  276. }),
  277. new HtmlWebpackPlugin({
  278. title: 'deptConsole.html',
  279. template: path.resolve(__dirname, 'src/html', 'deptConsole.html'),
  280. filename: 'deptConsole.html',
  281. chunks: ['deptConsole', 'vendor', 'common'],
  282. hash: true, //防止缓存
  283. inject: true,
  284. minify: {
  285. removeAttributeQuotes: true, //压缩 去掉引号
  286. removeComments: true, //移除HTML中的注释
  287. collapseWhitespace: true //删除空白符与换行符
  288. }
  289. }),
  290. new HtmlWebpackPlugin({
  291. title: 'itemManager.html',
  292. template: path.resolve(__dirname, 'src/html', 'itemManager.html'),
  293. filename: 'itemManager.html',
  294. chunks: ['itemManager', 'vendor', 'common'],
  295. hash: true, //防止缓存
  296. inject: true,
  297. minify: {
  298. removeAttributeQuotes: true, //压缩 去掉引号
  299. removeComments: true, //移除HTML中的注释
  300. collapseWhitespace: true //删除空白符与换行符
  301. }
  302. }),
  303. new HtmlWebpackPlugin({
  304. title: 'moduleManager.html',
  305. template: path.resolve(__dirname, 'src/html', 'moduleManager.html'),
  306. filename: 'moduleManager.html',
  307. chunks: ['moduleManager', 'vendor', 'common'],
  308. hash: true, //防止缓存
  309. inject: true,
  310. minify: {
  311. removeAttributeQuotes: true, //压缩 去掉引号
  312. removeComments: true, //移除HTML中的注释
  313. collapseWhitespace: true //删除空白符与换行符
  314. }
  315. }),
  316. new HtmlWebpackPlugin({
  317. title: 'tiaomu.html',
  318. template: path.resolve(__dirname, 'src/html', 'tiaomu.html'),
  319. filename: 'tiaomu.html',
  320. chunks: ['tiaomu', 'vendor', 'common'],
  321. hash: true, //防止缓存
  322. inject: true,
  323. minify: {
  324. removeAttributeQuotes: true, //压缩 去掉引号
  325. removeComments: true, //移除HTML中的注释
  326. collapseWhitespace: true //删除空白符与换行符
  327. }
  328. }),
  329. new HtmlWebpackPlugin({
  330. title: 'mukuai.html',
  331. template: path.resolve(__dirname, 'src/html', 'mukuai.html'),
  332. filename: 'mukuai.html',
  333. chunks: ['mukuai', 'vendor', 'common'],
  334. hash: true, //防止缓存
  335. inject: true,
  336. minify: {
  337. removeAttributeQuotes: true, //压缩 去掉引号
  338. removeComments: true, //移除HTML中的注释
  339. collapseWhitespace: true //删除空白符与换行符
  340. }
  341. }),
  342. new HtmlWebpackPlugin({
  343. title: 'login.html',
  344. template: path.resolve(__dirname, 'src/html', 'login.html'),
  345. filename: 'login.html',
  346. chunks: ['login', 'vendor', 'common'],
  347. hash: true, //防止缓存
  348. inject: true,
  349. minify: {
  350. removeAttributeQuotes: true, //压缩 去掉引号
  351. removeComments: true, //移除HTML中的注释
  352. collapseWhitespace: true //删除空白符与换行符
  353. }
  354. }),
  355. new HtmlWebpackPlugin({
  356. title: 'qcList.html',
  357. template: path.resolve(__dirname, 'src/html', 'qcList.html'),
  358. filename: 'qcList.html',
  359. chunks: ['qcList', 'vendor', 'common'],
  360. hash: true, //防止缓存
  361. inject: true,
  362. minify: {
  363. removeAttributeQuotes: true, //压缩 去掉引号
  364. removeComments: true, //移除HTML中的注释
  365. collapseWhitespace: true //删除空白符与换行符
  366. }
  367. }),
  368. new HtmlWebpackPlugin({
  369. title: 'qcListPerson.html',
  370. template: path.resolve(__dirname, 'src/html', 'qcListPerson.html'),
  371. filename: 'qcListPerson.html',
  372. chunks: ['qcListPerson', 'vendor', 'common'],
  373. hash: true, //防止缓存
  374. inject: true,
  375. minify: {
  376. removeAttributeQuotes: true, //压缩 去掉引号
  377. removeComments: true, //移除HTML中的注释
  378. collapseWhitespace: true //删除空白符与换行符
  379. }
  380. }),
  381. new HtmlWebpackPlugin({
  382. title: 'qcListDept.html',
  383. template: path.resolve(__dirname, 'src/html', 'qcListDept.html'),
  384. filename: 'qcListDept.html',
  385. chunks: ['qcListDept', 'vendor', 'common'],
  386. hash: true, //防止缓存
  387. inject: true,
  388. minify: {
  389. removeAttributeQuotes: true, //压缩 去掉引号
  390. removeComments: true, //移除HTML中的注释
  391. collapseWhitespace: true //删除空白符与换行符
  392. }
  393. }),
  394. new HtmlWebpackPlugin({
  395. title: 'qcScore.html',
  396. template: path.resolve(__dirname, 'src/html', 'qcScore.html'),
  397. filename: 'qcScore.html',
  398. chunks: [ 'qcScore','vendor', 'common'],
  399. hash: true, //防止缓存
  400. inject: true,
  401. minify: {
  402. removeAttributeQuotes: true, //压缩 去掉引号
  403. removeComments: true, //移除HTML中的注释
  404. collapseWhitespace: true //删除空白符与换行符
  405. }
  406. }),
  407. new HtmlWebpackPlugin({
  408. title: 'statistics.html',
  409. template: path.resolve(__dirname, 'src/html', 'statistics.html'),
  410. filename: 'statistics.html',
  411. chunks: ['index', 'vendor', 'common'],
  412. hash: true, //防止缓存
  413. inject: true,
  414. minify: {
  415. removeAttributeQuotes: true, //压缩 去掉引号
  416. removeComments: true, //移除HTML中的注释
  417. collapseWhitespace: true //删除空白符与换行符
  418. }
  419. }),
  420. new HtmlWebpackPlugin({
  421. title: 'userManager.html',
  422. template: path.resolve(__dirname, 'src/html', 'userManager.html'),
  423. filename: 'userManager.html',
  424. chunks: ['userManager', 'vendor', 'common'],
  425. hash: true, //防止缓存
  426. inject: true,
  427. minify: {
  428. removeAttributeQuotes: true, //压缩 去掉引号
  429. removeComments: true, //移除HTML中的注释
  430. collapseWhitespace: true //删除空白符与换行符
  431. }
  432. }),
  433. new HtmlWebpackPlugin({
  434. title: 'roleManager.html',
  435. template: path.resolve(__dirname, 'src/html', 'roleManager.html'),
  436. filename: 'roleManager.html',
  437. chunks: ['roleManager', 'vendor', 'common'],
  438. hash: true, //防止缓存
  439. inject: true,
  440. minify: {
  441. removeAttributeQuotes: true, //压缩 去掉引号
  442. removeComments: true, //移除HTML中的注释
  443. collapseWhitespace: true //删除空白符与换行符
  444. }
  445. }),
  446. new CopyWebpackPlugin([
  447. {
  448. from:'src/resource',
  449. to:path.resolve(__dirname,'dist','resource'),
  450. flatten:true, //false会拷贝原始文件夹路径
  451. }
  452. ]),
  453. new MiniCssExtractPlugin({
  454. filename: 'css/[name].css',
  455. chunkFilename: '[id].css'
  456. }),
  457. new webpack.HotModuleReplacementPlugin(),
  458. new CleanWebpackPlugin()
  459. ],
  460. optimization: { //webpack4.x的最新优化配置项,用于提取公共代码
  461. minimizer: [
  462. new UglifyJsPlugin({
  463. uglifyOptions: {
  464. ie8: true,
  465. compress: {
  466. properties: false,
  467. warnings: false
  468. },
  469. mangle: {
  470. screw_ie8: false,
  471. except: ['e']
  472. },
  473. output: {
  474. beautify: true
  475. },
  476. sourceMap: false
  477. }
  478. })
  479. ],
  480. splitChunks: {
  481. cacheGroups: {
  482. commons: {
  483. chunks: "initial",
  484. name: "common",
  485. minChunks: 2,
  486. maxInitialRequests: 5, // The default limit is too small to showcase the effect
  487. minSize: 0, // This is example is too small to create commons chunks
  488. reuseExistingChunk: true // 可设置是否重用该chunk
  489. }
  490. }
  491. }
  492. },
  493. module: {
  494. noParse: /WdatePicker/,
  495. rules: [
  496. {
  497. test: /.js$/,
  498. enforce: 'post',
  499. loader: 'es3ify-loader'
  500. },
  501. {
  502. test: /\.m?js$/,
  503. exclude: /(node_modules|bower_components)/,
  504. use: {
  505. loader: 'babel-loader',
  506. options: {
  507. presets:['@babel/preset-env']
  508. }
  509. }
  510. },
  511. {
  512. test: /\.css$/,
  513. use: [{
  514. loader: MiniCssExtractPlugin.loader
  515. },
  516. 'css-loader'
  517. ]
  518. },
  519. {
  520. test: /\.less$/,
  521. use: [{
  522. loader: MiniCssExtractPlugin.loader
  523. },
  524. 'css-loader', 'less-loader'
  525. ]
  526. },
  527. {
  528. test:/\.(png|gif|jpg|jpeg|svg|eot|ttf|woff|woff2)$/,
  529. use:[{
  530. loader:'url-loader',
  531. options:{
  532. limit:10240,
  533. esModule:false,
  534. name:'[name]_[hash:6].[ext]',
  535. outputPath:'images/'
  536. }
  537. }],
  538. exclude:/node_modules/
  539. },{
  540. test:/.html$/,
  541. use:'html-withimg-loader'
  542. }
  543. ]
  544. },
  545. // devtool: 'cheap-module-eval-source-map', //开发环境cheap-module-eval-source-map //生产环境cheap-module-source-map
  546. mode: 'development',
  547. devServer: {
  548. contentBase: "./dist", //静态文件根目录
  549. proxy: {
  550. '/': proxyHost
  551. },
  552. hot: true,
  553. openPage:'login.html'
  554. }
  555. }