zhangwencui
2 天以前 49b6ad612dcc44e9e45c7e1256acfad24ff94393
src/pages/message.vue
@@ -37,10 +37,11 @@
            <text class="message-time">{{ formatTime(item.createTime) }}</text>
          </view>
          <text class="message-desc">{{ item.noticeContent }}</text>
          <view class="message-footer">
          <view v-if="activeTab === 0"
                class="message-footer">
            <text class="message-view"
                  @click="goToDetail(item)">
              去查看 >
              确认消息
            </text>
          </view>
        </view>
@@ -61,7 +62,7 @@
<script setup>
  import { ref, reactive, onMounted } from "vue";
  import { listNotice } from "@/api/login.js";
  import { listNotice, confirmMessage } from "@/api/login.js";
  import useUserStore from "@/store/modules/user";
  // 标签页数据
@@ -100,6 +101,11 @@
  // 跳转到详情页
  const goToDetail = item => {
    confirmMessage(item.noticeId, 1).then(res => {
      if (res.code === 200) {
        uni.showToast({ title: "确认成功", icon: "success" });
        loadMessages(false);
        if (item.appJumpPath) {
    if (item.appJumpPath.indexOf("/") === 0) {
      uni.navigateTo({
        url: item.appJumpPath,
@@ -109,6 +115,11 @@
        url: "/" + item.appJumpPath,
      });
    }
        }
      } else {
        uni.showToast({ title: "确认失败", icon: "none" });
      }
    });
  };
  const userStore = useUserStore();
  const userId = ref("");