소스 검색

消息页

Shan9312 9 달 전
부모
커밋
776d7c850d
4개의 변경된 파일32개의 추가작업 그리고 1개의 파일을 삭제
  1. 7 0
      src/pages.json
  2. 5 1
      src/pages/index/index.vue
  3. 19 0
      src/pages/notice/notice.vue
  4. 1 0
      src/types/uni-pages.d.ts

+ 7 - 0
src/pages.json

@@ -94,6 +94,13 @@
         "navigationBarBackgroundColor": "#f6d7a7"
       }
     },
+    {
+      "path": "pages/notice/notice",
+      "type": "page",
+      "style": {
+        "navigationBarTitleText": "消息"
+      }
+    },
     {
       "path": "pages/phone/phone",
       "type": "page",

+ 5 - 1
src/pages/index/index.vue

@@ -15,7 +15,7 @@
       class="overflow-hidden header header-fixed header-bg"
       :style="{ paddingTop: safeAreaInsets?.top + 'px' }"
     >
-      <wd-badge modelValue="12">
+      <wd-badge modelValue="12" @click="watchNotice">
         <wd-icon name="dong" size="52rpx" />
       </wd-badge>
       <view class="input-box mt-2" @click="handleSerch">
@@ -147,6 +147,10 @@ const addBattle = (val) => {
   uni.navigateTo({ url: '/pages/battleForm/battleForm?type=1' })
 }
 
+// 查看消息
+const watchNotice = () => {
+  uni.navigateTo({ url: '/pages/notice/notice' })
+}
 onMounted(() => {
   // logins()
 })

+ 19 - 0
src/pages/notice/notice.vue

@@ -0,0 +1,19 @@
+<route lang="json5" type="page">
+{
+  style: { navigationBarTitleText: '消息' },
+}
+</route>
+
+<template>
+  <view class="text-center">消息</view>
+</template>
+
+<script lang="ts" setup>
+defineOptions({
+  name: 'Notice',
+})
+</script>
+
+<style lang="scss" scoped>
+//
+</style>

+ 1 - 0
src/types/uni-pages.d.ts

@@ -10,6 +10,7 @@ interface NavigateToOptions {
        "/pages/battleForm/battleForm" |
        "/pages/login/login" |
        "/pages/my/my" |
+       "/pages/notice/notice" |
        "/pages/phone/phone" |
        "/pages/searchDetail/searchDetail" |
        "/pages/serch/serch";