Browse Source

重新配置兼容文件

306132416@qq.com 4 years ago
parent
commit
a27880d6e4
7 changed files with 13 additions and 52 deletions
  1. 2 1
      .browserslistrc
  2. 1 11
      babel.config.js
  3. 0 30
      public/browser.min.js
  4. 0 1
      public/index.html
  5. 8 8
      src/App.vue
  6. 0 1
      src/main.js
  7. 2 0
      vue.config.js

+ 2 - 1
.browserslistrc

@@ -1,3 +1,4 @@
 > 1%
 last 2 versions
-not ie <= 8
+IE 9
+IE 10

+ 1 - 11
babel.config.js

@@ -1,13 +1,3 @@
 module.exports = {
-  presets: [
-    [
-      "@babel/preset-env", {
-      "modules": false,
-      "useBuiltIns": "entry",
-      "corejs": "3",
-    }
-    ]
-  ],
-  plugins: [
-  ]
+  presets: [['@vue/app', { 'useBuiltIns': 'entry', polyfills: ['es6.promise', 'es6.symbol'] }]]
 }

File diff suppressed because it is too large
+ 0 - 30
public/browser.min.js


+ 0 - 1
public/index.html

@@ -6,7 +6,6 @@
     <meta name="viewport" content="width=device-width,initial-scale=1.0">
     <link rel="icon" href="<%= BASE_URL %>favicon.ico">
     <title><%= htmlWebpackPlugin.options.title %></title>
-    <script src="./browser.min.js"></script>
   </head>
   <body>
     <noscript>

+ 8 - 8
src/App.vue

@@ -57,7 +57,7 @@ export default {
         data: this.userToken,
       })
         .then((res) => {
-          console.log(res);
+          // console.log(res);
           if (res.data.code === 200) {
             let userInfo = res.data.data;
             this.userAccount = userInfo.userCode;
@@ -99,12 +99,12 @@ export default {
       // dXNlcklkPTE1NiZhY2NvdW50PUwwTTE0X01NJmZyb209c2l3ZWkmdGltZXN0YW1wPTE2MTg1NTYzMDAmc2lnbj1lNDZmM2Q3MmFiZDI3ODYwMDYyMmY2N2NmZjFiNjZmNw== //测试厂商TOKEN
       this.userToken = sessionStorage.getItem("setToken");
       if (this.userToken) {
-        console.log(
-          "已登录",
-          this.userToken,
-          this.$route.path,
-          sessionStorage.getItem("userNameAccount")
-        );
+        // console.log(
+        //   "已登录",
+        //   this.userToken,
+        //   this.$route.path,
+        //   sessionStorage.getItem("userNameAccount")
+        // );
         this.userAccount = sessionStorage.getItem("userNameAccount");
         if (sessionStorage.getItem("userPath") === "distributor") {
           this.isManufacturer = "distributor";
@@ -124,7 +124,7 @@ export default {
         if (query.token) {
           sessionStorage.setItem("setToken", query.token);
           this.userToken = query.token || "";
-          console.log("token:", this.userToken);
+          // console.log("token:", this.userToken);
           this.getTokenRequest();
         } else {
           this.goHomePage();

+ 0 - 1
src/main.js

@@ -1,4 +1,3 @@
-import 'babel-polyfill'
 import Vue from 'vue'
 import App from './App.vue'
 import router from './router'

+ 2 - 0
vue.config.js

@@ -19,7 +19,9 @@ module.exports = {
         }
     },
     outputDir: process.env.NODE_ENV === "development" ? 'devDist' : 'dist',
+    transpileDependencies: ['wangeditor','cache-loader','vuejs-datepicker'],
     configureWebpack: { // webpack 配置
+        entry: ['babel-polyfill', './src/main.js'],
         output: { // 输出重构  打包编译后的 文件名称  【模块名称.版本号.时间戳】
             filename: `js/[name].${Timestamp}.js`,
             chunkFilename: `js/chunk-vendors.${Timestamp}.js`