Эх сурвалжийг харах

Merge branch 'master' of http://git.izouma.com/xiongzhu/jetour

drew 5 жил өмнө
parent
commit
116a3b4ba7

+ 7 - 0
project.config.json

@@ -79,6 +79,13 @@
                     "pathName": "pages/tuxiang",
                     "scene": null
                 },
+                {
+                    "id": -1,
+                    "name": "新闻详情&活动详情",
+                    "pathName": "pages/ArticleDetail",
+                    "query": "id=453",
+                    "scene": null
+                },
                 {
                     "id": -1,
                     "name": "注册",

+ 1 - 0
src/main.js

@@ -65,6 +65,7 @@ export default {
             'pages/home',
             'pages/car',
             'pages/tuxiang',
+            'pages/ArticleDetail',
             'pages/my',
             'pages/register',
             'pages/login',

+ 74 - 0
src/pages/ArticleDetail.vue

@@ -0,0 +1,74 @@
+<config>
+{
+'navigationBarTitleText': '',
+}
+</config>
+<template>
+    <div class="content">
+        <div class="title">
+            {{ info.articleKeyword }}
+        </div>
+        <div class="time">
+            {{ info.createTime }}
+        </div>
+        <rich-text :nodes="content" space="nbsp"></rich-text>
+    </div>
+</template>
+<script>
+export default {
+    data() {
+        return {
+            info: '',
+            content: ''
+        };
+    },
+    onShow() {
+        this.$http.get(`https://www.jetour.com.cn/cmsapi/business/Article/get/${this.$mp.query.id}`).then(res => {
+            this.content = res.data.articleContent.replace(/<img /g, '<img class="rich-text-img"');
+            this.info = res.data;
+
+            wx.setNavigationBarTitle({
+                title: res.data.articleType == '1' ? '新闻详情' : '活动详情'
+            });
+        });
+    }
+};
+</script>
+
+<style lang="less">
+.content {
+    padding: 30px;
+}
+rich-text {
+    width: 100%;
+    background: white;
+}
+.rich-text-img {
+    width: 100% !important;
+    height: auto;
+}
+.p1 {
+    font-size: 13px;
+    line-height: 24px;
+    padding: 10px 0;
+}
+
+.s1 {
+    font-weight: bold;
+}
+
+.title {
+    font-size: 16px;
+    font-weight: bold;
+    text-align: center;
+    padding-top: 20px;
+}
+
+.time {
+    font-size: 12px;
+    color: #666;
+    text-align: center;
+    padding-bottom: 10px;
+    margin-top: 5px;
+}
+</style>

+ 3 - 1
src/pages/eventList.vue

@@ -56,7 +56,9 @@ export default {
                 this.getData();
             }
         },
-        detail(item) {}
+        detail(item) {
+            this.goNext('/pages/ArticleDetail?id=' + item.id);
+        }
     }
 };
 </script>

+ 3 - 1
src/pages/newsList.vue

@@ -56,7 +56,9 @@ export default {
                 this.getData();
             }
         },
-        detail(item) {}
+        detail(item) {
+            this.goNext('/pages/ArticleDetail?id=' + item.id);
+        }
     }
 };
 </script>

+ 2 - 2
src/pages/order/evaluation.vue

@@ -71,11 +71,11 @@
                 show-word-limit
                 :autosize="true"
             />
-            <van-cell title="添加晒单图片(最多上传5张)" use-label-slot>
+            <!-- <van-cell title="添加晒单图片(最多上传5张)" use-label-slot>
                 <div style="padding:10px 0 5px" slot="label">
                     <van-uploader multiple :file-list="item.commentPics" :max-count="5" @after-read="afterRead" />
                 </div>
-            </van-cell>
+            </van-cell> -->
             <van-cell>
                 <div slot="title">
                     <van-checkbox

+ 2 - 2
src/pages/order/evaluationInfo.vue

@@ -71,7 +71,7 @@
                 :autosize="true"
                 readonly
             />
-            <van-cell title="评价图片:" use-label-slot v-if="item.commentPics.length > 0">
+            <!-- <van-cell title="评价图片:" use-label-slot v-if="item.commentPics.length > 0">
                 <div style="padding:10px 0 5px" class="imgsList" slot="label">
                     <van-image
                         v-for="(img, index) in item.commentPics"
@@ -81,7 +81,7 @@
                         :src="img"
                     />
                 </div>
-            </van-cell>
+            </van-cell> -->
         </div>
     </div>
 </template>