panhui há 4 anos atrás
pai
commit
2eb05623c9

+ 3 - 3
project.config.json

@@ -145,9 +145,9 @@
         },
         {
           "id": -1,
-          "name": "资讯资讯",
-          "pathName": "pagesNews/News",
-          "query": "type=INDUSTRY_NEWS",
+          "name": "资讯详情",
+          "pathName": "pagesNews/Detail",
+          "query": "id=46589",
           "scene": null
         }
       ]

+ 3 - 3
src/locales/en.json

@@ -387,9 +387,9 @@
   "ge-shang-pin": "Products",
   "guo-qi": "State-owned enterprise",
   "he-zi": "joint venture",
-  "imt-fu-wu": "T-PARK Services",
-  "imt-gai-kuang": "T-PARK Overview",
-  "imt-you-shi": "T-PARK Advantage",
+  "imt-fu-wu": "IMT Services",
+  "imt-gai-kuang": "IMT Overview",
+  "imt-you-shi": "IMT Advantage",
   "imt-zhan-ting-xian-xia-ti-yan": "Offline experience in T-PARK showroom",
   "jian-jie": "Introduction",
   "jin-ri": "today",

+ 4 - 0
src/native/mineNode/index.js

@@ -21,6 +21,10 @@ const componentOptions = {
                 current: e.target.dataset.src, // 当前显示图片的http链接
                 urls: this.properties.imgList.length > 0 ? this.properties.imgList : [e.target.dataset.src] // 需要预览的图片http链接列表
             });
+        },
+        getText(text) {
+            console.log(text);
+            return text.replace(/_Code/g, 'code');
         }
     }
 };

+ 2 - 0
src/pages/Home.vue

@@ -232,6 +232,8 @@
                 <div class="content" v-html="tipInfo.value"></div>
             </div>
         </van-dialog>
+
+        <robot id="robot" @chatAdmin="chatAdmin" />
     </div>
 </template>
 <script>

+ 15 - 1
src/pagesImt/Index.vue

@@ -66,7 +66,7 @@
                         </div>
                     </div>
                 </div>
-                <div class="core-box">
+                <div class="core-box" id="overview">
                     <block v-for="(item, index) in modulars" :key="index">
                         <Core :info="item"></Core>
                     </block>
@@ -229,6 +229,20 @@ export default {
         this.$http.get('/sysConfig/get/ThreeD_URL').then(res => {
             this.tDurl = res.value;
         });
+
+        if (options.hash === 'overview') {
+            console.log(options.hash);
+            this.$nextTick(() => {
+                wx.createSelectorQuery()
+                    .select('#overview')
+                    .boundingClientRect(rect => {
+                        wx.pageScrollTo({
+                            scrollTop: rect.top - 100
+                        });
+                    })
+                    .exec();
+            });
+        }
     },
     components: {
         Banner,

+ 9 - 3
src/pagesNews/Detail.vue

@@ -121,6 +121,7 @@ export default {
             this.info = res;
             this.imgList = [];
             let _this = this;
+            res.content = res.content.replace(/code/g, '_Code');
             let options = {
                 visitors: {
                     img(node) {
@@ -135,7 +136,6 @@ export default {
                         _this.imgList.push(node.attr.src);
                     },
                     tr(node) {
-                        console.log(node);
                         node.styleStr = 'height:auto;';
                     },
                     td(node) {
@@ -144,8 +144,9 @@ export default {
                 }
             };
             // this.getImgList(res.content);
-            this.detail = octoparse.htmlParse(res.content, options);
-
+            let detail = octoparse.htmlParse(res.content, options);
+            this.detail = this.changeText(detail);
+            // = detail.replace(/_Code/g, 'code');
             // console.log(res.content);
         });
     },
@@ -160,6 +161,11 @@ export default {
         }
     },
     methods: {
+        changeText(info) {
+            let allText = JSON.stringify(info);
+            allText = allText.replace(/_Code/g, 'code');
+            return JSON.parse(allText);
+        },
         getActivity() {
             this.$http
                 .post(