浏览代码

修复bug

shaogen1995 3 年之前
父节点
当前提交
3a579408c7
共有 2 个文件被更改,包括 53 次插入38 次删除
  1. 52 37
      src/pages/exhibition/exhibition-detail.vue
  2. 1 1
      src/pages/information/information-type.vue

+ 52 - 37
src/pages/exhibition/exhibition-detail.vue

@@ -8,7 +8,12 @@
           :src="require('@/assets/images/exhibition-type-top-bg.png')"
           :src="require('@/assets/images/exhibition-type-top-bg.png')"
           alt=""
           alt=""
         />
         />
-        <div class="btn" @click="jumpTo()">线上展览<img :src="require('@/assets/images/exhibition-right-arrow.png')" alt=""/></div>
+        <div class="btn" @click="jumpTo()">
+          线上展览<img
+            :src="require('@/assets/images/exhibition-right-arrow.png')"
+            alt=""
+          />
+        </div>
       </div>
       </div>
       <div class="bottom">
       <div class="bottom">
         <img
         <img
@@ -72,7 +77,10 @@
               <div class="detail-wrapper">
               <div class="detail-wrapper">
                 <div class="detail-title">{{ detail.name }}</div>
                 <div class="detail-title">{{ detail.name }}</div>
                 <div class="detail-desc">
                 <div class="detail-desc">
-                  展览日期: {{ detail.startTime | dateFormat1('yyyy-MM-yy') }}-{{ detail.endTime | dateFormat1('yyyy-MM-yy') }}
+                  展览日期:
+                  {{ detail.startTime | dateFormat1("yyyy-MM-yy") }}-{{
+                    detail.endTime | dateFormat1("yyyy-MM-yy")
+                  }}
                 </div>
                 </div>
                 <div class="detail-con" v-html="detail.content"></div>
                 <div class="detail-con" v-html="detail.content"></div>
               </div>
               </div>
@@ -85,53 +93,53 @@
 </template>
 </template>
 
 
 <script>
 <script>
-//这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
-//例如:import 《组件名称》 from '《组件路径》';
+// 这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
+// 例如:import 《组件名称》 from '《组件路径》';
 export default {
 export default {
-  name: "exhibition-detail",
-  //import引入的组件需要注入到对象中才能使用
+  name: 'exhibition-detail',
+  // import引入的组件需要注入到对象中才能使用
   components: {},
   components: {},
-  data() {
-    //这里存放数据
+  data () {
+    // 这里存放数据
     return {
     return {
-      exhibitionType: "hot",
-      detail: {},
-    };
+      exhibitionType: 'hot',
+      detail: {}
+    }
   },
   },
-  //监听属性 类似于data概念
+  // 监听属性 类似于data概念
   computed: {},
   computed: {},
-  //监控data中的数据变化
+  // 监控data中的数据变化
   watch: {},
   watch: {},
-  //方法集合
+  // 方法集合
   methods: {
   methods: {
-    switchType(type) {
-      this.$router.push({ path: "/exhibition-type", query: { type } });
+    switchType (type) {
+      this.$router.push({ path: '/exhibition-type', query: { type } })
     },
     },
-    back() {
+    back () {
       this.$router.push({
       this.$router.push({
-        path: "/exhibition-type",
-        query: { type: this.detail.navType || "" },
-      });
+        path: '/exhibition-type',
+        query: { type: this.detail.navType || '' }
+      })
     },
     },
-    jumpTo(){
+    jumpTo () {
       window.open('http://www.4dmodel.com/SuperTwo/index.html?m=1025')
       window.open('http://www.4dmodel.com/SuperTwo/index.html?m=1025')
     }
     }
   },
   },
-  //生命周期 - 创建完成(可以访问当前this实例)
-  created() {
-    this.detail = this.$route.query;
-    this.exhibitionType = this.detail.navType;
+  // 生命周期 - 创建完成(可以访问当前this实例)
+  created () {
+    this.detail = this.$route.query
+    this.exhibitionType = this.detail.navType
   },
   },
-  //生命周期 - 挂载完成(可以访问DOM元素)
-  mounted() {},
-  beforeCreate() {}, //生命周期 - 创建之前
-  beforeMount() {}, //生命周期 - 挂载之前
-  beforeUpdate() {}, //生命周期 - 更新之前
-  updated() {}, //生命周期 - 更新之后
-  beforeDestroy() {}, //生命周期 - 销毁之前
-  destroyed() {}, //生命周期 - 销毁完成
-  activated() {}, //如果页面有keep-alive缓存功能,这个函数会触发
-};
+  // 生命周期 - 挂载完成(可以访问DOM元素)
+  mounted () {},
+  beforeCreate () {}, // 生命周期 - 创建之前
+  beforeMount () {}, // 生命周期 - 挂载之前
+  beforeUpdate () {}, // 生命周期 - 更新之前
+  updated () {}, // 生命周期 - 更新之后
+  beforeDestroy () {}, // 生命周期 - 销毁之前
+  destroyed () {}, // 生命周期 - 销毁完成
+  activated () {} // 如果页面有keep-alive缓存功能,这个函数会触发
+}
 </script>
 </script>
 <style lang='less' scoped>
 <style lang='less' scoped>
 .bg {
 .bg {
@@ -167,10 +175,10 @@ export default {
         font-weight: 400;
         font-weight: 400;
         color: #ffffff;
         color: #ffffff;
         cursor: pointer;
         cursor: pointer;
-        >img {
+        > img {
           position: absolute;
           position: absolute;
           right: 20px;
           right: 20px;
-          top:14px;
+          top: 14px;
           width: 29px;
           width: 29px;
           height: 29px;
           height: 29px;
         }
         }
@@ -278,6 +286,13 @@ export default {
               }
               }
               .detail-con {
               .detail-con {
                 margin-top: 62px;
                 margin-top: 62px;
+                /deep/ p {
+                  text-indent: 2em;
+                }
+                /deep/ img {
+                  margin-left: -34px;
+                  max-width: 696px;
+                }
               }
               }
             }
             }
           }
           }

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

@@ -84,7 +84,7 @@
                 <div class="desc">
                 <div class="desc">
                   <div class="desc-title">{{ item.name || "--" }}</div>
                   <div class="desc-title">{{ item.name || "--" }}</div>
                   <div class="desc-content" v-html="item.description"></div>
                   <div class="desc-content" v-html="item.description"></div>
-                  <div class="desc-time">出版时间 {{ item.createTime }}</div>
+                  <div class="desc-time">出版时间 {{ item.pubDate.slice(0,7)}}</div>
                 </div>
                 </div>
               </li>
               </li>
             </ul>
             </ul>