소스 검색

修复bug

shaogen1995 3 년 전
부모
커밋
706ab7b466

+ 2 - 2
src/common/http.js

@@ -2,8 +2,8 @@ import axios from 'axios'
 
 var isProduction = process.env.NODE_ENV === 'production'
 
-const serverName = isProduction ? 'http://192.168.0.135:8001/' : 'http://192.168.0.135:8001/'
-// const serverName = isProduction ? 'http://8.135.106.227:8001/' : 'http://8.135.106.227:8001/'
+// const serverName = isProduction ? 'http://192.168.0.135:8001/' : 'http://192.168.0.135:8001/'
+const serverName = isProduction ? 'http://8.135.106.227:8001/' : 'http://8.135.106.227:8001/'
 
 axios.defaults.baseURL = serverName
 axios.defaults.headers['X-Requested-with'] = 'XMLHttpRequest'

+ 37 - 37
src/pages/activity/activity-detail.vue

@@ -103,56 +103,56 @@
 </template>
 
 <script>
-//这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
-//例如:import 《组件名称》 from '《组件路径》';
-import Paging from "@/components/pagination";
+// 这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
+// 例如:import 《组件名称》 from '《组件路径》';
+import Paging from '@/components/pagination'
 export default {
-  name: "survey",
-  //import引入的组件需要注入到对象中才能使用
+  name: 'survey',
+  // import引入的组件需要注入到对象中才能使用
   components: {
-    Paging,
+    Paging
   },
-  data() {
-    //这里存放数据
+  data () {
+    // 这里存放数据
     return {
-      activityType: "onLine",
-      detail: {},
-    };
+      activityType: 'onLine',
+      detail: {}
+    }
   },
-  //监听属性 类似于data概念
+  // 监听属性 类似于data概念
   computed: {},
-  //监控data中的数据变化
+  // 监控data中的数据变化
   watch: {},
-  //方法集合
+  // 方法集合
   methods: {
-    switchType(type) {
-      this.$router.push({ path: "/activity-type", query: { type } });
+    switchType (type) {
+      this.$router.push({ path: '/activity-type', query: { type } })
     },
-    back() {
+    back () {
       this.$router.push({
-        path: "/activity-type",
-        query: { type: this.detail.navType || "" },
-      });
-    },
+        path: '/activity-type',
+        query: { type: this.detail.navType || '' }
+      })
+    }
   },
-  //生命周期 - 创建完成(可以访问当前this实例)
-  created() {
+  // 生命周期 - 创建完成(可以访问当前this实例)
+  created () {
     // console.log("this.$route.query", this.$route.query);
-    this.detail = this.$route.query;
-    this.activityType = this.detail.navType;
-    console.log('this.detail',this.detail)
+    this.detail = this.$route.query
+    this.activityType = this.detail.navType
+    console.log('this.detail', this.detail)
     // console.log("this.detail", this.detail);
   },
-  //生命周期 - 挂载完成(可以访问DOM元素)
-  mounted() {},
-  beforeCreate() {}, //生命周期 - 创建之前
-  beforeMount() {}, //生命周期 - 挂载之前
-  beforeUpdate() {}, //生命周期 - 更新之前
-  updated() {}, //生命周期 - 更新之后
-  beforeDestroy() {}, //生命周期 - 销毁之前
-  destroyed() {}, //生命周期 - 销毁完成
-  activated() {}, //如果页面有keep-alive缓存功能,这个函数会触发
-};
+  // 生命周期 - 挂载完成(可以访问DOM元素)
+  mounted () {},
+  beforeCreate () {}, // 生命周期 - 创建之前
+  beforeMount () {}, // 生命周期 - 挂载之前
+  beforeUpdate () {}, // 生命周期 - 更新之前
+  updated () {}, // 生命周期 - 更新之后
+  beforeDestroy () {}, // 生命周期 - 销毁之前
+  destroyed () {}, // 生命周期 - 销毁完成
+  activated () {} // 如果页面有keep-alive缓存功能,这个函数会触发
+}
 </script>
 <style lang='less' scoped>
 .bg {
@@ -283,7 +283,7 @@ export default {
               line-height: 61px;
               .bottom-nav-left,
               .bottom-nav-right {
-                cursor: pointer;  
+                cursor: pointer;
                 overflow: hidden;
                 > img {
                   width: 16px;

+ 4 - 6
src/pages/exhibition/exhibition-detail.vue

@@ -76,7 +76,7 @@
             <div class="detail">
               <div class="detail-wrapper">
                 <div class="detail-title">{{ detail.name }}</div>
-                <div class="detail-desc">
+                <div class="detail-desc" v-if="exhibitionType!=='preview'">
                   展览日期:
                   {{ detail.startTime | dateFormat1("yyyy-MM-yy") }}-{{
                     detail.endTime | dateFormat1("yyyy-MM-yy")
@@ -286,12 +286,10 @@ export default {
               }
               .detail-con {
                 margin-top: 62px;
-                /deep/ p {
-                  text-indent: 2em;
-                }
                 /deep/ img {
-                  margin-left: -34px;
-                  max-width: 696px;
+                  display: block;
+                  margin: 10px auto;
+                  max-height: 400px;
                 }
               }
             }

+ 1 - 1
src/pages/exhibition/exhibition-type.vue

@@ -73,7 +73,7 @@
                 <div class="cover">
                   <div class="txt">
                     <div class="txt-name">{{ item.name }}</div>
-                    <div class="txt-time">{{ item.startTime | dateFormat2('yyyy-MM-yy') }}-{{item.endTime | dateFormat2('yyyy-MM-yy') }}</div>
+                    <div class="txt-time" v-if="exhibitionType!=='preview'">{{ item.startTime | dateFormat2('yyyy-MM-yy') }}-{{item.endTime | dateFormat2('yyyy-MM-yy') }}</div>
                   </div>
                 </div>
               </li>

+ 45 - 36
src/pages/information/information-detail.vue

@@ -112,55 +112,55 @@
 </template>
 
 <script>
-//这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
-//例如:import 《组件名称》 from '《组件路径》';
-import Paging from "@/components/pagination";
+// 这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
+// 例如:import 《组件名称》 from '《组件路径》';
+import Paging from '@/components/pagination'
 export default {
-  name: "survey",
-  //import引入的组件需要注入到对象中才能使用
+  name: 'survey',
+  // import引入的组件需要注入到对象中才能使用
   components: {
-    Paging,
+    Paging
   },
-  data() {
-    //这里存放数据
+  data () {
+    // 这里存放数据
     return {
-      informationType: "recentNews",
-      detail: {},
-    };
+      informationType: 'recentNews',
+      detail: {}
+    }
   },
-  //监听属性 类似于data概念
+  // 监听属性 类似于data概念
   computed: {},
-  //监控data中的数据变化
+  // 监控data中的数据变化
   watch: {},
-  //方法集合
+  // 方法集合
   methods: {
-    switchType(type) {
-      this.$router.push({ path: "/information-type", query: { type } });
+    switchType (type) {
+      this.$router.push({ path: '/information-type', query: { type } })
     },
-    back() {
+    back () {
       this.$router.push({
-        path: "/information-type",
-        query: { type: this.detail.navType || "" },
-      });
-    },
+        path: '/information-type',
+        query: { type: this.detail.navType || '' }
+      })
+    }
   },
-  //生命周期 - 创建完成(可以访问当前this实例)
-  created() {
+  // 生命周期 - 创建完成(可以访问当前this实例)
+  created () {
     // console.log("this.$route.query", this.$route.query);
-    this.detail = this.$route.query;
-    this.informationType = this.detail.navType;
+    this.detail = this.$route.query
+    this.informationType = this.detail.navType
     // console.log("this.detail", this.detail);
   },
-  //生命周期 - 挂载完成(可以访问DOM元素)
-  mounted() {},
-  beforeCreate() {}, //生命周期 - 创建之前
-  beforeMount() {}, //生命周期 - 挂载之前
-  beforeUpdate() {}, //生命周期 - 更新之前
-  updated() {}, //生命周期 - 更新之后
-  beforeDestroy() {}, //生命周期 - 销毁之前
-  destroyed() {}, //生命周期 - 销毁完成
-  activated() {}, //如果页面有keep-alive缓存功能,这个函数会触发
-};
+  // 生命周期 - 挂载完成(可以访问DOM元素)
+  mounted () {},
+  beforeCreate () {}, // 生命周期 - 创建之前
+  beforeMount () {}, // 生命周期 - 挂载之前
+  beforeUpdate () {}, // 生命周期 - 更新之前
+  updated () {}, // 生命周期 - 更新之后
+  beforeDestroy () {}, // 生命周期 - 销毁之前
+  destroyed () {}, // 生命周期 - 销毁完成
+  activated () {} // 如果页面有keep-alive缓存功能,这个函数会触发
+}
 </script>
 <style lang='less' scoped>
 .bg {
@@ -281,6 +281,15 @@ export default {
               }
               .detail-con {
                 margin-top: 32px;
+                /deep/img {
+                  display:block;
+                  margin: 10px auto;
+                  max-height: 400px;
+                }
+                /deep/video {
+                  max-width: 100% !important;
+                  margin: 10px auto;
+                }
               }
             }
             .bottom-nav {
@@ -291,7 +300,7 @@ export default {
               line-height: 61px;
               .bottom-nav-left,
               .bottom-nav-right {
-                cursor: pointer;  
+                cursor: pointer;
                 overflow: hidden;
                 > img {
                   width: 16px;

+ 57 - 57
src/pages/information/information.vue

@@ -73,83 +73,83 @@
 </template>
 
 <script>
-//这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
-//例如:import 《组件名称》 from '《组件路径》';
+// 这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
+// 例如:import 《组件名称》 from '《组件路径》';
 
 export default {
-  name: "information",
-  //import引入的组件需要注入到对象中才能使用
+  name: 'information',
+  // import引入的组件需要注入到对象中才能使用
   components: {},
-  data() {
-    //这里存放数据
+  data () {
+    // 这里存放数据
     return {
-      select:'',
+      select: '',
       recentNewsHover: false,
       activityHover: false,
       inforHover: false,
-      bookHover: false,
-    };
+      bookHover: false
+    }
   },
-  //监听属性 类似于data概念
+  // 监听属性 类似于data概念
   computed: {},
-  //监控data中的数据变化
+  // 监控data中的数据变化
   watch: {},
-  //方法集合
+  // 方法集合
   methods: {
-    toType(type) {
-      this.$router.push({ path: "/information-type", query: { type } });
+    toType (type) {
+      this.$router.push({ path: '/information-type', query: { type } })
     },
-    mouseOver(type) {
-      this.select=type
+    mouseOver (type) {
+      this.select = type
       switch (type) {
-        case "recentNews":
-          this.recentNewsHover = true;
-          break;
-        case "activity":
-          this.activityHover = true;
-          break;
-        case "infor":
-          this.inforHover = true;
-          break;
-        case "book":
-          this.bookHover = true;
-          break;
+        case 'recentNews':
+          this.recentNewsHover = true
+          break
+        case 'activity':
+          this.activityHover = true
+          break
+        case 'infor':
+          this.inforHover = true
+          break
+        case 'book':
+          this.bookHover = true
+          break
         default:
-          break;
+          break
       }
     },
-    mouseLeave(type) {
-      this.select=''
+    mouseLeave (type) {
+      this.select = ''
       switch (type) {
-        case "recentNews":
-          this.recentNewsHover = false;
-          break;
-        case "activity":
-          this.activityHover = false;
-          break;
-        case "infor":
-          this.inforHover = false;
-          break;
-        case "book":
-          this.bookHover = false;
-          break;
+        case 'recentNews':
+          this.recentNewsHover = false
+          break
+        case 'activity':
+          this.activityHover = false
+          break
+        case 'infor':
+          this.inforHover = false
+          break
+        case 'book':
+          this.bookHover = false
+          break
         default:
-          break;
+          break
       }
-    },
+    }
   },
-  //生命周期 - 创建完成(可以访问当前this实例)
-  created() {},
-  //生命周期 - 挂载完成(可以访问DOM元素)
-  mounted() {},
-  beforeCreate() {}, //生命周期 - 创建之前
-  beforeMount() {}, //生命周期 - 挂载之前
-  beforeUpdate() {}, //生命周期 - 更新之前
-  updated() {}, //生命周期 - 更新之后
-  beforeDestroy() {}, //生命周期 - 销毁之前
-  destroyed() {}, //生命周期 - 销毁完成
-  activated() {}, //如果页面有keep-alive缓存功能,这个函数会触发
-};
+  // 生命周期 - 创建完成(可以访问当前this实例)
+  created () {},
+  // 生命周期 - 挂载完成(可以访问DOM元素)
+  mounted () {},
+  beforeCreate () {}, // 生命周期 - 创建之前
+  beforeMount () {}, // 生命周期 - 挂载之前
+  beforeUpdate () {}, // 生命周期 - 更新之前
+  updated () {}, // 生命周期 - 更新之后
+  beforeDestroy () {}, // 生命周期 - 销毁之前
+  destroyed () {}, // 生命周期 - 销毁完成
+  activated () {} // 如果页面有keep-alive缓存功能,这个函数会触发
+}
 </script>
 <style lang='less' scoped>
 .information {

+ 7 - 0
src/pages/service/service-detail.vue

@@ -242,6 +242,13 @@ export default {
 }
 </script>
 <style lang='less' scoped>
+.detail-content{
+  /deep/img {
+    display: block;
+    margin: 10px auto;
+    max-height: 400px;
+  }
+}
 .bg {
   width: 100%;
   height: 100%;

+ 43 - 43
src/pages/service/service.vue

@@ -43,69 +43,69 @@
 </template>
 
 <script>
-//这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
-//例如:import 《组件名称》 from '《组件路径》';
+// 这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
+// 例如:import 《组件名称》 from '《组件路径》';
 
 export default {
-  name: "service",
-  //import引入的组件需要注入到对象中才能使用
+  name: 'service',
+  // import引入的组件需要注入到对象中才能使用
   components: {},
-  data() {
-    //这里存放数据
+  data () {
+    // 这里存放数据
     return {
-      select:'',
+      select: '',
       guideHover: false,
-      messageHover: false,
-    };
+      messageHover: false
+    }
   },
-  //监听属性 类似于data概念
+  // 监听属性 类似于data概念
   computed: {},
-  //监控data中的数据变化
+  // 监控data中的数据变化
   watch: {},
-  //方法集合
+  // 方法集合
   methods: {
-    toType(type) {
-      this.$router.push({ path: "/service-detail", query: { navType: type } });
+    toType (type) {
+      this.$router.push({ path: '/service-detail', query: { navType: type } })
     },
-    mouseOver(type) {
+    mouseOver (type) {
       this.select = type
       switch (type) {
-        case "guide":
-          this.guideHover = true;
-          break;
-        case "message":
-          this.messageHover = true;
-          break;
+        case 'guide':
+          this.guideHover = true
+          break
+        case 'message':
+          this.messageHover = true
+          break
         default:
-          break;
+          break
       }
     },
-    mouseLeave(type) {
+    mouseLeave (type) {
       this.select = ''
       switch (type) {
-        case "guide":
-          this.guideHover = false;
-          break;
-        case "message":
-          this.messageHover = false;
-          break;
+        case 'guide':
+          this.guideHover = false
+          break
+        case 'message':
+          this.messageHover = false
+          break
         default:
-          break;
+          break
       }
-    },
+    }
   },
-  //生命周期 - 创建完成(可以访问当前this实例)
-  created() {},
-  //生命周期 - 挂载完成(可以访问DOM元素)
-  mounted() {},
-  beforeCreate() {}, //生命周期 - 创建之前
-  beforeMount() {}, //生命周期 - 挂载之前
-  beforeUpdate() {}, //生命周期 - 更新之前
-  updated() {}, //生命周期 - 更新之后
-  beforeDestroy() {}, //生命周期 - 销毁之前
-  destroyed() {}, //生命周期 - 销毁完成
-  activated() {}, //如果页面有keep-alive缓存功能,这个函数会触发
-};
+  // 生命周期 - 创建完成(可以访问当前this实例)
+  created () {},
+  // 生命周期 - 挂载完成(可以访问DOM元素)
+  mounted () {},
+  beforeCreate () {}, // 生命周期 - 创建之前
+  beforeMount () {}, // 生命周期 - 挂载之前
+  beforeUpdate () {}, // 生命周期 - 更新之前
+  updated () {}, // 生命周期 - 更新之后
+  beforeDestroy () {}, // 生命周期 - 销毁之前
+  destroyed () {}, // 生命周期 - 销毁完成
+  activated () {} // 如果页面有keep-alive缓存功能,这个函数会触发
+}
 </script>
 <style lang='less' scoped>
 .service {

+ 0 - 4
src/pages/survey/survey-type.vue

@@ -255,10 +255,6 @@ export default {
             width: 83%;
             margin: 0 auto;
             text-align: center;
-            text-indent: 2em;
-            /deep/img {
-              margin-left: -34px;
-            }
           }
           .title {
             margin-top: 94px;