浏览代码

消息中心页面

13127578837 11 月之前
父节点
当前提交
5b6fcd00f4

+ 10 - 0
src/api/mine/info.js

@@ -32,6 +32,16 @@ export function getMceReceiveStatic(param) {
     data: param,
   });
 }
+/**
+ * @消息列表接口
+ */
+export function getMceList(param) {
+  return request({
+    url: "/service-iot/mceReceive/mceList",
+    method: "GET",
+    data: param,
+  });
+}
 
 /**
  * @字典类型接口

+ 3 - 3
src/pages.json

@@ -90,7 +90,7 @@
         {
           "path": "textview/index",
           "style": {
-            "navigationBarTitleText": "浏览文本"
+            "navigationBarTitleText": "消息详情"
           }
         },
         {
@@ -139,7 +139,7 @@
         {
           "path": "appMessage/index",
           "style": {
-            "navigationBarTitleText": "应用消息",
+            "navigationBarTitleText": "消息列表",
             "enablePullDownRefresh": false
           }
         },
@@ -215,7 +215,7 @@
         {
           "path": "msg/index",
           "style": {
-            "navigationBarTitleText": "新消息通知"
+            "navigationBarTitleText": "消息设置"
           }
         },
         {

+ 184 - 0
src/pages/common/appMessage/index copy.vue

@@ -0,0 +1,184 @@
+<template>
+  <u-sticky class="shadow-default" bgColor="#fff" style="top: 0">
+    <u-tabs :list="tabsList" :current="tabsCurrent" @click="tabsClick" lineColor="#333" :activeStyle="{ color: '#333' }" :inactiveStyle="{ color: '#909399' }" :scrollable="true"></u-tabs>
+  </u-sticky>
+
+  <scroll-view class="scroll-height" :scroll-y="true" :scroll-into-view="scrollIntoView" :data-theme="'theme-' + proxy.$settingStore.themeColor.name" style="padding-bottom: 44px">
+    <view class="appMessage-container">
+      <view class="content-area" v-show="tabsCurrent == 0">
+        <u-empty v-show="allInfoList.length <= 0" text="暂无数据" mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png"> </u-empty>
+        <view :id="index == allInfoList.length - 1 ? 'bottomInfo' : ''" v-for="(all, index) in allInfoList" :key="index" v-show="allInfoList.length > 0" @click="goContentDetails(all)">
+          <view class="content-area-time font12">{{ all.listTime }}</view>
+          <view class="content-area-center radius bg-white">
+            <view class="content-area-center-title">{{ all.typeTitle }}</view>
+            <view class="content-area-center-cont">{{ all.listTitle }}</view>
+            <view class="content-area-center-buttom font12">查看详情 </view>
+          </view>
+        </view>
+      </view>
+      <view class="content-area" v-show="tabsCurrent == 1">
+        <u-empty v-show="noticeList.length <= 0" text="暂无数据" mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png"> </u-empty>
+        <view :id="index == noticeList.length - 1 ? 'bottomInfo' : ''" v-for="(all, index) in noticeList" :key="index" v-show="noticeList.length > 0" @click="goContentDetails(all)">
+          <view class="content-area-time font12">{{ all.listTime }}</view>
+          <view class="content-area-center radius bg-white">
+            <view class="content-area-center-title">{{ all.typeTitle }}</view>
+            <view class="content-area-center-cont">{{ all.listTitle }}</view>
+            <view class="content-area-center-buttom font12">查看详情 </view>
+          </view>
+        </view>
+      </view>
+    </view>
+  </scroll-view>
+</template>
+
+<script setup>
+import { onLoad, onShow, onReady, onHide, onLaunch, onNavigationBarButtonTap, onPageScroll } from "@dcloudio/uni-app";
+import { ref, reactive, computed, getCurrentInstance, toRefs, inject } from "vue";
+import { useStores, commonStores } from "@/store/modules/index";
+
+import { infoList } from "@/api/common/message.js";
+
+const useStore = useStores();
+const { proxy } = getCurrentInstance();
+
+const data = reactive({
+  scrollIntoView: "",
+
+  tabsList: [
+    {
+      name: "全部",
+    },
+    {
+      name: "通知公告",
+    },
+  ],
+  tabsCurrent: 0,
+
+  allInfoList: [],
+  noticeList: [],
+});
+
+const { scrollIntoView, scrollIntoViewBool, tabsList, tabsCurrent, allInfoList, noticeList } = toRefs(data);
+
+/**
+ * @初始化
+ */
+function init() {
+  infoListApi();
+}
+
+/**
+ * @tabs点击事件
+ */
+function tabsClick(e) {
+  tabsCurrent.value = e.index;
+}
+
+/**
+ * @跳转
+ */
+function goContentDetails(e) {
+  if (e.type == "通知公告") {
+    proxy.$tab.navigateTo(`/pages/common/textview/index1?title=${e.typeTitle}&content=${e.listContent}&contentTitle=${e.listTitle}`);
+  }
+}
+
+/**
+ * @通知公告列表
+ * @api接口调用
+ */
+function infoListApi() {
+  proxy.$modal.loading("加载中");
+  infoList({
+    pageNum: 1,
+    pageSize: 20000,
+  }).then((requset) => {
+    if (requset.status === "SUCCESS") {
+      requset.data.rows.forEach((el) => {
+        allInfoList.value.push({
+          type: "通知公告",
+          typeTitle: el.noticeType === "1" ? "系统通知" : el.noticeType === "2" ? "系统公告" : "系统消息",
+          listTime: proxy.$common.jktTimes(el.createTime),
+          listCreateTime: el.createTime,
+          listTitle: el.noticeTitle,
+          listContent: el.noticeContent,
+        });
+
+        noticeList.value.push({
+          type: "通知公告",
+          typeTitle: el.noticeType === "1" ? "系统通知" : el.noticeType === "2" ? "系统公告" : "系统消息",
+          listTime: proxy.$common.jktTimes(el.createTime),
+          listCreateTime: proxy.$common.jktTimes(el.createTime),
+          listTitle: el.noticeTitle,
+          listContent: el.noticeContent,
+        });
+      });
+
+      setTimeout(() => {
+        scrollIntoView.value = "bottomInfo";
+      }, 0);
+
+      setTimeout(() => {
+        proxy.$modal.closeLoading();
+      }, 100);
+    }
+  });
+}
+
+onLoad((options) => {
+  init();
+});
+
+onReady(() => {});
+
+onShow(() => {
+  //调用系统主题颜色
+  proxy.$settingStore.systemThemeColor([1]);
+});
+
+// 自定义导航事件
+onNavigationBarButtonTap((e) => {
+  if (e.float == "right") {
+    proxy.$tab.navigateTo("/pages/mine/setting/index");
+  }
+});
+</script>
+
+<style lang="scss" scoped>
+:deep(.uni-page-head__title) {
+  opacity: 1 !important;
+}
+
+.appMessage-container {
+  padding-bottom: 1px;
+
+  .content-area {
+    &-time {
+      padding: 10px 0;
+      text-align: center;
+      color: #909399;
+    }
+
+    &-center {
+      margin: 0 10px 20px 10px;
+      padding: 15px;
+      overflow: hidden;
+
+      &-title {
+        margin: 0 0 15px 0;
+        color: #909399;
+      }
+
+      &-cont {
+        font-weight: 600;
+        color: #000000;
+      }
+
+      &-buttom {
+        float: right;
+        color: #2a98ff;
+      }
+    }
+  }
+}
+</style>

+ 66 - 79
src/pages/common/appMessage/index.vue

@@ -1,29 +1,17 @@
 <template>
-  <u-sticky class="shadow-default" bgColor="#fff" style="top: 0">
-    <u-tabs :list="tabsList" :current="tabsCurrent" @click="tabsClick" lineColor="#333" :activeStyle="{ color: '#333' }" :inactiveStyle="{ color: '#909399' }" :scrollable="true"></u-tabs>
-  </u-sticky>
-
   <scroll-view class="scroll-height" :scroll-y="true" :scroll-into-view="scrollIntoView" :data-theme="'theme-' + proxy.$settingStore.themeColor.name" style="padding-bottom: 44px">
     <view class="appMessage-container">
-      <view class="content-area" v-show="tabsCurrent == 0">
-        <u-empty v-show="allInfoList.length <= 0" text="暂无数据" mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png"> </u-empty>
-        <view :id="index == allInfoList.length - 1 ? 'bottomInfo' : ''" v-for="(all, index) in allInfoList" :key="index" v-show="allInfoList.length > 0" @click="goContentDetails(all)">
-          <view class="content-area-time font12">{{ all.listTime }}</view>
-          <view class="content-area-center radius bg-white">
-            <view class="content-area-center-title">{{ all.typeTitle }}</view>
-            <view class="content-area-center-cont">{{ all.listTitle }}</view>
-            <view class="content-area-center-buttom font12">查看详情 </view>
-          </view>
-        </view>
-      </view>
-      <view class="content-area" v-show="tabsCurrent == 1">
-        <u-empty v-show="noticeList.length <= 0" text="暂无数据" mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png"> </u-empty>
+      <view class="content-area">
+        <u-empty v-if="noticeList.length <= 0 && loading" text="暂无数据" mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png"> </u-empty>
         <view :id="index == noticeList.length - 1 ? 'bottomInfo' : ''" v-for="(all, index) in noticeList" :key="index" v-show="noticeList.length > 0" @click="goContentDetails(all)">
-          <view class="content-area-time font12">{{ all.listTime }}</view>
-          <view class="content-area-center radius bg-white">
-            <view class="content-area-center-title">{{ all.typeTitle }}</view>
-            <view class="content-area-center-cont">{{ all.listTitle }}</view>
-            <view class="content-area-center-buttom font12">查看详情 </view>
+          
+          <view class="content-area-center radius bg-white list-cell2 list-cell-arrow2">
+            <view class="">
+              <image class="content-area-center-image-bg" :src="all.img" />
+              <view class="content-area-center-title font16">{{ all.infoTitle }}</view>
+              <view class="content-area-center-time font14 ">{{ all.createTime.substring(5,10) }} {{ all.createTime.substring(11,16) }}</view>
+            </view>
+            <view class="content-area-center-cont font14">{{ all.infoContent }}</view>
           </view>
         </view>
       </view>
@@ -34,31 +22,22 @@
 <script setup>
 import { onLoad, onShow, onReady, onHide, onLaunch, onNavigationBarButtonTap, onPageScroll } from "@dcloudio/uni-app";
 import { ref, reactive, computed, getCurrentInstance, toRefs, inject } from "vue";
-import { useStores, commonStores } from "@/store/modules/index";
-
-import { infoList } from "@/api/common/message.js";
-
+import { useStores, commonStores,stystemStores } from "@/store/modules/index";
+import { getMceList } from "@/api/mine/info.js";
 const useStore = useStores();
+const stystemStore = stystemStores();
 const { proxy } = getCurrentInstance();
-
+const infoType = ref()//消息类型
+const loading =ref(false)
 const data = reactive({
   scrollIntoView: "",
-
-  tabsList: [
-    {
-      name: "全部",
-    },
-    {
-      name: "通知公告",
-    },
-  ],
   tabsCurrent: 0,
 
   allInfoList: [],
   noticeList: [],
 });
 
-const { scrollIntoView, scrollIntoViewBool, tabsList, tabsCurrent, allInfoList, noticeList } = toRefs(data);
+const { scrollIntoView, scrollIntoViewBool, tabsCurrent, allInfoList, noticeList } = toRefs(data);
 
 /**
  * @初始化
@@ -78,9 +57,7 @@ function tabsClick(e) {
  * @跳转
  */
 function goContentDetails(e) {
-  if (e.type == "通知公告") {
-    proxy.$tab.navigateTo(`/pages/common/textview/index1?title=${e.typeTitle}&content=${e.listContent}&contentTitle=${e.listTitle}`);
-  }
+    proxy.$tab.navigateTo(`/pages/common/textview/index?id=${e.id}`);
 }
 
 /**
@@ -89,31 +66,23 @@ function goContentDetails(e) {
  */
 function infoListApi() {
   proxy.$modal.loading("加载中");
-  infoList({
-    pageNum: 1,
-    pageSize: 20000,
+  getMceList({
+    current: 1,
+    size: 10,
+    infoType: infoType.value
   }).then((requset) => {
+    let data = requset.data.records
+    let infoTypeList = stystemStore.infoList.static.infoTypeStatic
     if (requset.status === "SUCCESS") {
-      requset.data.rows.forEach((el) => {
-        allInfoList.value.push({
-          type: "通知公告",
-          typeTitle: el.noticeType === "1" ? "系统通知" : el.noticeType === "2" ? "系统公告" : "系统消息",
-          listTime: proxy.$common.jktTimes(el.createTime),
-          listCreateTime: el.createTime,
-          listTitle: el.noticeTitle,
-          listContent: el.noticeContent,
-        });
-
-        noticeList.value.push({
-          type: "通知公告",
-          typeTitle: el.noticeType === "1" ? "系统通知" : el.noticeType === "2" ? "系统公告" : "系统消息",
-          listTime: proxy.$common.jktTimes(el.createTime),
-          listCreateTime: proxy.$common.jktTimes(el.createTime),
-          listTitle: el.noticeTitle,
-          listContent: el.noticeContent,
-        });
-      });
-
+      for (let i = 0; i < data.length; i++) {
+        for (let j = 0; j < infoTypeList.length; j++) {
+          if(data[i].infoType == infoTypeList[j].infoType){
+            data[i].img = infoTypeList[j].img
+          }
+        }
+      }
+      noticeList.value = data
+      loading.value = true
       setTimeout(() => {
         scrollIntoView.value = "bottomInfo";
       }, 0);
@@ -122,10 +91,18 @@ function infoListApi() {
         proxy.$modal.closeLoading();
       }, 100);
     }
+    setTimeout(() => {
+      scrollIntoView.value = "bottomInfo";
+    }, 0);
+
+    setTimeout(() => {
+      proxy.$modal.closeLoading();
+    }, 100);
   });
 }
 
 onLoad((options) => {
+  infoType.value = options.type
   init();
 });
 
@@ -153,30 +130,40 @@ onNavigationBarButtonTap((e) => {
   padding-bottom: 1px;
 
   .content-area {
-    &-time {
-      padding: 10px 0;
-      text-align: center;
-      color: #909399;
-    }
-
     &-center {
       margin: 0 10px 20px 10px;
       padding: 15px;
       overflow: hidden;
-
+      position: relative;
+      &-image-bg {
+        width: 40px;
+        height: 40px;
+        display: inline-block;
+        vertical-align: middle;
+      }
       &-title {
-        margin: 0 0 15px 0;
+        margin-left: 15px;
+        color: #000;
+        display: inline-block;
+        vertical-align: middle;
+        white-space: nowrap;      /* 确保文本在一行内显示 */
+        overflow: hidden;         /* 隐藏超出容器的内容 */
+        text-overflow: ellipsis;  /* 使用省略号表示被截断的文本 */
+        width: 60%;             /* 定义容器宽度 */
+      }
+      &-time {
         color: #909399;
+        float:right;
+        margin-right:4px;
+        margin-top:12px
       }
-
       &-cont {
-        font-weight: 600;
-        color: #000000;
-      }
-
-      &-buttom {
-        float: right;
-        color: #2a98ff;
+        color: #ccc;
+        margin-top:16px;
+        white-space: nowrap;      /* 确保文本在一行内显示 */
+        overflow: hidden;         /* 隐藏超出容器的内容 */
+        text-overflow: ellipsis;  /* 使用省略号表示被截断的文本 */
+        width: 100%;             /* 定义容器宽度 */
       }
     }
   }

+ 0 - 0
src/pages/common/appMessage/receiveSettings.vue


+ 24 - 20
src/pages/common/textview/index.vue

@@ -1,7 +1,8 @@
 <template>
   <view>
-    <uni-card class="view-title" :title="title">
-      <text class="uni-body view-content">{{ content }}</text>
+    <uni-card class="view-title" :title="data?.infoTitle || ''">
+      <view class="uni-body view-content">{{ data?.infoContent  || ''}}</view>
+      <text class="uni-body view-time">{{ data?.createTime ?  data.createTime.replace("T", " ") : ''}}</text>
     </uni-card>
   </view>
 </template>
@@ -9,25 +10,22 @@
 <script setup>
 import { onReady, onLoad, onShow, onNavigationBarButtonTap } from "@dcloudio/uni-app";
 import { ref, onMounted, inject, shallowRef, reactive, getCurrentInstance, toRefs } from "vue";
-import { useStores, commonStores } from "@/store/modules/index";
-
-const useStore = useStores();
-
+import { getMceList } from "@/api/mine/info.js";
 const { proxy } = getCurrentInstance();
-
-const data = reactive({
-  title: "",
-  content: "",
-});
-
-const { title, content } = toRefs(data);
-
+const id = ref()//消息id
+const data = ref({});
+function init(){
+  getMceList({
+    current: 1,
+    size: 10,
+    id:id.value
+  }).then((requset) => {
+    data.value = requset.data.records[0]
+  })
+}
 onLoad((options) => {
-  title.value = options.title;
-  content.value = options.content;
-  uni.setNavigationBarTitle({
-    title: options.title,
-  });
+  id.value = options.id
+  init()
 });
 
 onShow(() => {
@@ -43,9 +41,15 @@ onShow(() => {
 
 .view-content {
   font-size: 26rpx;
-  padding: 12px 5px 0;
+  padding: 12px 0 0;
   color: #333;
   line-height: 24px;
   font-weight: normal;
+  text-indent: 20px;
+}
+.view-time {
+  margin:30px 0 10px;
+  font-size: 24rpx;
+  float: right;
 }
 </style>

+ 2 - 1
src/pages/index.vue

@@ -256,6 +256,7 @@ function getLocation() {
  * @九宫格页面跳转
  */
 function navItemClick(item) {
+  console.log(item,13)
   if (item.path) {
     item.sort = 0;
 
@@ -267,7 +268,7 @@ function navItemClick(item) {
         el.sort++;
       }
     });
-    recentlyUsed.value = commonStore.sortEvent(recentlyUsed.value, 1);
+    recentlyUsed.value = proxy.$common.sortEvent(recentlyUsed.value, 1);
 
     uni.setStorageSync(useStore.$state.nickName + useStore.$state.tenantId, recentlyUsed.value);
 

+ 161 - 0
src/pages/info copy.vue

@@ -0,0 +1,161 @@
+<template>
+  <u-navbar :autoBack="false" :placeholder="true" :safeAreaInsetTop="true" :bgColor="proxy.$settingStore.themeColor.color">
+    <template #left>
+      <view class="u-navbar__content__left__item">
+        <view class="u-navbar__content__left__item__title" style="color: #fff">消息</view>
+      </view>
+    </template>
+    <template #right>
+      <view class="u-navbar__content__right__item">
+        <text class="iconfont oaIcon-qingchu" @click="handleIconClick('清除')"></text>
+      </view>
+      <view class="u-navbar__content__right__item">
+        <text class="iconfont oaIcon-sousuo" @click="handleIconClick('搜索')"></text>
+      </view>
+      <view class="u-navbar__content__right__item">
+        <text class="iconfont oaIcon-jiahao" @click="handleIconClick('加号')"></text>
+      </view>
+    </template>
+  </u-navbar>
+
+  <scroll-view class="info-container bg-white" scroll-y :style="`height: calc(100vh - (50px + ${proxy.$settingStore.barHightTop} + ${proxy.$settingStore.tabBarHeight}))`">
+    <view class="content-area" v-for="item in infoList" :key="item" @tap="goAppMessage(item.path)">
+      <view class="content-area-avatar">
+        <image class="image-bg" :src="item.img" />
+      </view>
+      <view class="content-area-child">
+        <view class="uni-item mb5">
+          <view class="uni-item-text font14" style="color: #000000">{{ item.label }}</view>
+          <view class="uni-item-right font12" style="color: #909399">{{ item.time }}</view>
+        </view>
+        <view class="uni-item">
+          <view class="uni-item-text font12" style="color: #909399">{{ item.cont }}</view>
+          <view class="uni-item-right font12" style="margin: auto 0">
+            <u-badge numberType="overflow" max="99" :value="item.badge"></u-badge>
+          </view>
+        </view>
+      </view>
+    </view>
+  </scroll-view>
+
+  <oa-tabbar :tabbarValue="1"></oa-tabbar>
+</template>
+
+<script setup>
+/*----------------------------------依赖引入-----------------------------------*/
+import { onLoad, onShow, onHide, onLaunch } from "@dcloudio/uni-app";
+import { ref, onMounted, inject, shallowRef, reactive, getCurrentInstance, toRefs } from "vue";
+/*----------------------------------接口引入-----------------------------------*/
+import { getMceReceiveStatic, getDictList } from "@/api/mine/info.js";
+/*----------------------------------组件引入-----------------------------------*/
+/*----------------------------------store引入-----------------------------------*/
+import { stystemStores } from "@/store/modules/index";
+/*----------------------------------公共方法引入-----------------------------------*/
+/*----------------------------------公共变量-----------------------------------*/
+const { proxy } = getCurrentInstance();
+const stystemStore = stystemStores();
+/*----------------------------------变量声明-----------------------------------*/
+
+const data = reactive({
+  infoList: [
+    {
+      id: 1,
+      label: "应用消息",
+      img: "/static/images/common/appMessage.png",
+      time: "5月15日",
+      cont: "您收到一条最新消息,请及时查看",
+      badge: 1,
+      path: "/pages/common/appMessage/index",
+    },
+    // {
+    //   id: 2,
+    //   label: "消防知识库",
+    //   time: "5月15日",
+    //   cont: "您收到一条最新消息,请及时查看",
+    //   badge: 0,
+    // },
+    {
+      id: 3,
+      label: "告警通知",
+      img: "/static/images/common/alarmMessage.png",
+      time: "5月15日",
+      cont: "您收到一条最新消息,请及时查看",
+      badge: 0,
+      path: "/pages/common/alarmMessage/index",
+    },
+  ],
+});
+
+const { infoList } = toRefs(data);
+
+function init() {
+  getMceReceiveStatic().then((res) => {
+    stystemStore.infoList.messageCountData = res.data;
+    getDictList({
+      dictType: "sys_message_type",
+    }).then((res1) => {
+      stystemStore.infoList.messageTypeData = res1.data.rows;
+      res.data.infoTypeStatic.forEach((e) => {});
+    });
+  });
+}
+
+function goAppMessage(path) {
+  proxy.$tab.navigateTo(path);
+}
+
+function handleIconClick(type) {
+  if (type === "清除") {
+  } else if (type === "搜索") {
+    proxy.$tab.navigateTo("/pages/common/searchSelect/index");
+  } else if (type === "加号") {
+  }
+}
+
+onShow(() => {
+  init();
+});
+
+onLoad((options) => {
+  uni.hideTabBar(); //隐藏自带tabbar
+});
+</script>
+
+<style lang="scss" scoped>
+.info-container {
+  .content-area {
+    display: flex;
+    padding: 13px 13px 0 13px;
+
+    &-avatar {
+      display: flex;
+      margin: auto 20upx auto 0;
+      .image-bg {
+        width: 40px;
+        height: 40px;
+      }
+    }
+
+    &-child {
+      width: calc(100% - (32px + 0.625rem));
+      justify-content: center;
+      margin: auto;
+      .uni-item {
+        display: flex;
+        white-space: nowrap;
+
+        .uni-item-text {
+          margin-right: auto;
+          overflow: hidden;
+          text-overflow: ellipsis;
+        }
+
+        .uni-item-right {
+          width: auto;
+          text-align: right;
+        }
+      }
+    }
+  }
+}
+</style>

+ 45 - 19
src/pages/info.vue

@@ -2,37 +2,36 @@
   <u-navbar :autoBack="false" :placeholder="true" :safeAreaInsetTop="true" :bgColor="proxy.$settingStore.themeColor.color">
     <template #left>
       <view class="u-navbar__content__left__item">
-        <view class="u-navbar__content__left__item__title" style="color: #fff">消息</view>
+        <view class="u-navbar__content__left__item__title" style="color: #fff">消息({{ stystemStore.infoList.static.total || 0 }})</view>
       </view>
     </template>
     <template #right>
-      <view class="u-navbar__content__right__item">
+      <!-- <view class="u-navbar__content__right__item">
         <text class="iconfont oaIcon-qingchu" @click="handleIconClick('清除')"></text>
       </view>
       <view class="u-navbar__content__right__item">
         <text class="iconfont oaIcon-sousuo" @click="handleIconClick('搜索')"></text>
-      </view>
+      </view> -->
       <view class="u-navbar__content__right__item">
-        <text class="iconfont oaIcon-jiahao" @click="handleIconClick('加号')"></text>
+        <text class="iconfont oaIcon-shezhi" @click="handleIconClick('设置')"></text>
       </view>
     </template>
   </u-navbar>
 
   <scroll-view class="info-container bg-white" scroll-y :style="`height: calc(100vh - (50px + ${proxy.$settingStore.barHightTop} + ${proxy.$settingStore.tabBarHeight}))`">
-    <view class="content-area" v-for="item in infoList" :key="item" @tap="goAppMessage(item.path)">
+    <view class="content-area" v-for="item in stystemStore.infoList.static.infoTypeStatic" :key="item" @tap="goAppMessage(`/pages/common/appMessage/index?type=${item.type}`)">
       <view class="content-area-avatar">
         <image class="image-bg" :src="item.img" />
+        <view class="uni_top_right font12" style="margin: auto 0">
+            <u-badge numberType="overflow" max="99" :value="item.notReadCount"></u-badge>
+          </view>
       </view>
       <view class="content-area-child">
-        <view class="uni-item mb5">
+        <view class="uni-item mb5 ml10">
           <view class="uni-item-text font14" style="color: #000000">{{ item.label }}</view>
-          <view class="uni-item-right font12" style="color: #909399">{{ item.time }}</view>
         </view>
         <view class="uni-item">
           <view class="uni-item-text font12" style="color: #909399">{{ item.cont }}</view>
-          <view class="uni-item-right font12" style="margin: auto 0">
-            <u-badge numberType="overflow" max="99" :value="item.badge"></u-badge>
-          </view>
         </view>
       </view>
     </view>
@@ -90,12 +89,34 @@ const { infoList } = toRefs(data);
 
 function init() {
   getMceReceiveStatic().then((res) => {
-    stystemStore.infoList.messageCountData = res.data;
     getDictList({
       dictType: "sys_message_type",
     }).then((res1) => {
-      stystemStore.infoList.messageTypeData = res1.data.rows;
-      res.data.infoTypeStatic.forEach((e) => {});
+      let receiveStatic = { infoTypeStatic:res.data.infoTypeStatic ,total:res.data.notReadCount }
+      let dictList = res1.data.rows
+      if(receiveStatic.infoTypeStatic.length>0){
+        for (let i = 0; i < receiveStatic.infoTypeStatic.length; i++) {
+          for (let j = 0; j < dictList.length; j++) {
+            if(receiveStatic.infoTypeStatic[i].infoType == dictList[j].dictValue){
+              receiveStatic.infoTypeStatic[i].label = dictList[j].dictLabel
+              receiveStatic.infoTypeStatic[i].type = dictList[j].dictValue
+              if(receiveStatic.infoTypeStatic[i].infoType == 1){
+                receiveStatic.infoTypeStatic[i].img = "/static/images/common/noticeMessage.png"
+              }
+              if(receiveStatic.infoTypeStatic[i].infoType == 2){
+                receiveStatic.infoTypeStatic[i].img = "/static/images/common/inspectionMessage.png"
+              }
+              if(receiveStatic.infoTypeStatic[i].infoType == 3){
+                receiveStatic.infoTypeStatic[i].img = "/static/images/common/meetingMessage.png"
+              }
+              if(receiveStatic.infoTypeStatic[i].infoType == 4){
+                receiveStatic.infoTypeStatic[i].img = "/static/images/common/alarmMessage.png"
+              }
+            }
+          }
+        }
+      }
+      stystemStore.infoList.static = receiveStatic;
     });
   });
 }
@@ -105,10 +126,8 @@ function goAppMessage(path) {
 }
 
 function handleIconClick(type) {
-  if (type === "清除") {
-  } else if (type === "搜索") {
-    proxy.$tab.navigateTo("/pages/common/searchSelect/index");
-  } else if (type === "加号") {
+  if (type === "设置") {
+    proxy.$tab.navigateTo("/pages/mine/msg/index")
   }
 }
 
@@ -123,17 +142,24 @@ onLoad((options) => {
 
 <style lang="scss" scoped>
 .info-container {
+  padding:0 12px;
   .content-area {
     display: flex;
-    padding: 13px 13px 0 13px;
-
+    padding: 13px 13px 13px 0px;
+    border-bottom:1px solid #EDEDED;
     &-avatar {
       display: flex;
       margin: auto 20upx auto 0;
+      position: relative;
       .image-bg {
         width: 40px;
         height: 40px;
       }
+      .uni_top_right{
+        position: absolute;
+        right:-10px;
+        top:-4px;
+      }
     }
 
     &-child {

+ 2 - 2
src/pages/login.vue

@@ -138,8 +138,8 @@ function init() {
 
   //#ifdef H5
   if (window.location.host) {
-    linkUrl.value = window.location.host;
-    // linkUrl.value = "172.16.120.165:13200";
+    // linkUrl.value = window.location.host;
+    linkUrl.value = "172.16.120.165:13200";
     // linkUrl.value = "localhost:81";
 
     useStore.GetMobileTenantConfig({ url: linkUrl.value });

+ 1 - 0
src/permission.js

@@ -20,6 +20,7 @@ const whiteList = [
   "/pages/common/repairReport/record",//报修历史
   "/pages/common/evaluate/record",//服务评价
   "/pages/common/NFC/index",//NFC读取
+  "/pages/common/textview/index",//消息详情
 ];
 
 // 检查地址白名单

二进制
src/static/images/common/alarmMessage.png


二进制
src/static/images/common/alarmMessage1.png


二进制
src/static/images/common/informMessage.png


二进制
src/static/images/common/inspectionMessage.png


二进制
src/static/images/common/meetingMessage.png


二进制
src/static/images/common/noticeMessage.png


+ 26 - 1
src/static/scss/global.scss

@@ -55,8 +55,33 @@
   margin-top: -6px;
   right: 30rpx;
 }
+.list-cell2::after {
+  content: '';
+  position: absolute;
+  border-bottom: 1px solid #eaeef1;
+  -webkit-transform: scaleY(0.5) translateZ(0);
+  transform: scaleY(0.5) translateZ(0);
+  transform-origin: 0 100%;
+  bottom: 0;
+  right: 0;
+  left: 0;
+  pointer-events: none;
+}
 
-
+.list-cell-arrow2::before {
+  content: ' ';
+  height: 10px;
+  width: 10px;
+  border-width: 2px 2px 0 0;
+  border-color: #c0c0c0;
+  border-style: solid;
+  -webkit-transform: matrix(0.5, 0.5, -0.5, 0.5, 0, 0);
+  transform: matrix(0.5, 0.5, -0.5, 0.5, 0, 0);
+  position: absolute;
+  top: 32.5%;
+  margin-top: -6px;
+  right: 10rpx;
+}
 
 .menu-list {
   margin: 0.625rem 0.625rem;

+ 3 - 2
src/store/modules/stystem.js

@@ -5,7 +5,6 @@ import { defineStore } from "pinia";
 import storage from "@/utils/storage";
 import common from "@/plugins/common.plugins.js";
 
-
 const stystemStores = defineStore(`${storage.get("nickName") + storage.get("tenantId")}_storage-stystem`, {
     state: () => ({
         homeList: {
@@ -17,7 +16,9 @@ const stystemStores = defineStore(`${storage.get("nickName") + storage.get("tena
             cuIconList: [],
             recentlyUsed: [],
         },
-        infoList: {},
+        infoList: {
+            
+        },
     }),
     unistorage: true,
     actions: {