Kaynağa Gözat

消息模块初始化

宋飞扬 1 yıl önce
ebeveyn
işleme
e91b315c57

+ 6 - 0
src/pages.json

@@ -205,6 +205,12 @@
           "style": {
             "navigationBarTitleText": "点赞回复"
           }
+        },
+        {
+          "path": "info/index",
+          "style": {
+            "navigationBarTitleText": "私聊"
+          }
         }
       ]
     },

+ 9 - 0
src/pages/message/info/index.vue

@@ -0,0 +1,9 @@
+<template>
+    <view>私聊页面</view>
+  </template>
+  
+  <script>
+  export default {};
+  </script>
+  
+  <style lang="scss" scoped></style>

+ 8 - 2
src/pages/tabbar/message/index.vue

@@ -3,12 +3,13 @@
     <u-navbar>
       <view slot="left"></view>
       <view slot="center">
-        <u-tabs :list="list" lineWidth="60" />
+        <u-tabs :list="list" lineWidth="60" :current="current" @change="changeInfo"/>
       </view>
     </u-navbar>
     <view :style="{ marginTop: totalHeight + 'px' }">
       <!-- 系统通知 -->
       <view
+      v-if="current == 0"
         class="orderList"
         v-for="item in orderList"
         :key="item.id"
@@ -22,7 +23,7 @@
         <u-icon name="arrow-right"></u-icon>
       </view>
       <!-- 消息通知 -->
-      <view class="message">
+      <view class="message" v-if="current == 1" @tap="$Router.push(infoUrl)">
         <image
           src="/static/images/home-select.png"
           style="width: 40px; height: 40px"
@@ -53,6 +54,7 @@ export default {
           },
         },
       ],
+      current:0,
       orderList: [
         {
           id: '1',
@@ -93,6 +95,7 @@ export default {
       type: 'warning',
       value: 99999,
       flag: true,
+      infoUrl:'/pages/message/info/index'
     };
   },
   computed: {
@@ -104,6 +107,9 @@ export default {
     change(e) {
       console.log('-----------', e);
     },
+    changeInfo(index){
+      this.current = index.index;
+    }
   },
 };
 </script>