Browse Source

Merge branch 'master' of http://git.itopmap.com:300/iTopmap/vue-cdutDigitalMap

napier 2 years ago
parent
commit
0f246be0b4
4 changed files with 29 additions and 28 deletions
  1. 0 1
      .eslintignore
  2. 8 8
      build/webpack.base.conf.js
  3. 20 17
      src/components/pcBar.vue
  4. 1 2
      static/js/axios-config.js

+ 0 - 1
.eslintignore

@@ -3,4 +3,3 @@
 /dist/
 /*.js
 /test/unit/coverage/
-/src/

+ 8 - 8
build/webpack.base.conf.js

@@ -9,14 +9,14 @@ function resolve (dir) {
 }
 
 const createLintingRule = () => ({
-  test: /\.(js|vue)$/,
-  loader: 'eslint-loader',
-  enforce: 'pre',
-  include: [resolve('src'), resolve('test')],
-  options: {
-    formatter: require('eslint-friendly-formatter'),
-    emitWarning: !config.dev.showEslintErrorsInOverlay
-  }
+  // test: /\.(js|vue)$/,
+  // loader: 'eslint-loader',
+  // enforce: 'pre',
+  // include: [resolve('src'), resolve('test')],
+  // options: {
+  //   formatter: require('eslint-friendly-formatter'),
+  //   emitWarning: !config.dev.showEslintErrorsInOverlay
+  // }
 })
 
 module.exports = {

+ 20 - 17
src/components/pcBar.vue

@@ -478,14 +478,16 @@ export default {
      */
     getNoticeList: function () {
       var that = this;
-      this.$axios.get("/notice/list").then(function (response) {
-        that.listData.notice = response.data; 
-        //排序
-        that.listData.notice= that.listData.notice.sort(that.compare('level'))
-        // items备份
-        that.colonData.notice = JSON.parse(
-          JSON.stringify(that.listData.notice)
-        )
+      this.$axios
+        .get("/notice/list")
+        .then(function (response) {
+          that.listData.notice = response.data; 
+          //排序
+          that.listData.notice= that.listData.notice.sort(that.compare('level'))
+          // items备份
+          that.colonData.notice = JSON.parse(
+            JSON.stringify(that.listData.notice)
+          )
       })
     },
 
@@ -541,13 +543,15 @@ export default {
      */
     getOthersList: function () {
       var that = this;
-      this.$axios.get("/others/list").then(function (response) {
-        that.listData.others = response.data
-        that.listData.others= that.listData.others.sort(that.compare('level'))
-        // items备份
-        that.colonData.others = JSON.parse(
-          JSON.stringify(that.listData.others)
-        );
+      this.$axios
+        .get("/others/list")
+        .then(function (response) {
+          that.listData.others = response.data
+          that.listData.others= that.listData.others.sort(that.compare('level'))
+          // items备份
+          that.colonData.others = JSON.parse(
+            JSON.stringify(that.listData.others)
+          );
       });
     },
 
@@ -728,7 +732,7 @@ export default {
     giveupChange: function () {
       this.data = JSON.parse(JSON.stringify(this.colonData))
       this.deleteArr = []
-      this.refresh
+      this.refresh()
     },
 
     /**
@@ -1009,7 +1013,6 @@ export default {
       }
     },
 
-
     /**
      * @description:监听预删除数据,当其不为空时使得‘应用更改’按钮可用
      * @param {DOM} newOne:新值

+ 1 - 2
static/js/axios-config.js

@@ -14,8 +14,7 @@ export default {
     // Vue.prototype.$axios.defaults.baseURL = 'http://139.155.20.56:300'
     //  https
     // Vue.prototype.$axios.defaults.baseURL = 'http://139.155.20.56:300'
-    // Vue.prototype.$axios.defaults.baseURL = 'https://server.itopmap.com'
-    Vue.prototype.$axios.defaults.baseURL = 'http://localhost:300'
+    Vue.prototype.$axios.defaults.baseURL = 'https://server.itopmap.com'
     
 
     // 设置超时时间