瀏覽代碼

功能优化

songxy 1 月之前
父節點
當前提交
a2b9ca6534

+ 1 - 1
client_h5/src/pages/dailyNotify/editors.vue

@@ -28,7 +28,7 @@ defineOptions({
 
 const router = useRouter();
 const { query } = useRoute()
-const userInfo = getStoreObject("_userInfo", "id") || {
+const userInfo = getStoreObject("_userInfo") || {
   deptName: '测试部门',
   nickname: '宋向阳'
 }

+ 11 - 0
client_h5/src/pages/home/index.scss

@@ -61,6 +61,7 @@
         background: linear-gradient( 180deg, #EBF6FF 0%, #FFFFFF 100%);
         box-shadow: 0px 2px 10px 1px rgba(0,0,0,0.05);
         padding: 10px 15px;
+        padding-bottom: 0px;
         border-radius: 4px;
         >.top {
           display: flex;
@@ -81,6 +82,16 @@
           }
         }
         .swipe_content {
+          padding-bottom: 10px;
+          &.swipe_indicator {
+            padding-bottom: 20px;
+          }
+          >.msg {
+            color: #0E1F38;
+            font-size: 14px;
+            padding: 6px 0px;
+            text-align: center;
+          }
           p {
             margin: 0px;
           }

+ 19 - 10
client_h5/src/pages/home/index.vue

@@ -214,16 +214,25 @@ const getAssetURL = (image: string) => {
           <span class="more" @click="onNotifyMoreHandle">更多<span class="arrow">></span></span>
         </div>
         <div class="content">
-          <van-swipe class="my-swipe" :autoplay="3000" indicator-color="white">
-            <van-swipe-item v-for="(item, index) in dailyNotifyList" :key="index">
-              <div class="swipe_content" @click="clickHandler(item,)">
-                <p class="title">{{item['content']}}</p>
-                <p class="tip">
-                  <span>{{ item['nickname'] }}</span>
-                  <span>{{item['createTime']}}</span>
-                </p>
-              </div>
-            </van-swipe-item>
+          <van-swipe class="my-swipe" :autoplay="3000">
+            <template v-if="dailyNotifyList.length > 0">
+              <van-swipe-item v-for="(item, index) in dailyNotifyList" :key="index">
+                <div :class="{ swipe_content: true, swipe_indicator: dailyNotifyList.length > 1 }" @click="clickHandler(item,)">
+                  <p class="title">{{item['content']}}</p>
+                  <p class="tip">
+                    <span>{{ item['nickname'] }}</span>
+                    <span>{{item['createTime']}}</span>
+                  </p>
+                </div>
+              </van-swipe-item>
+            </template>
+            <template v-else>
+              <van-swipe-item >
+                <div class="swipe_content">
+                  <p class="msg">暂无速递信息</p>
+                </div>
+              </van-swipe-item>
+            </template>
           </van-swipe>
         </div>
       </div>

+ 2 - 0
client_h5/src/router/index.ts

@@ -14,6 +14,8 @@ const router = createRouter({
 })
 // 路由加载前
 router.beforeEach((to, from, next) => {
+  // next()
+  // return
   getUserInfoPromise(true).then((isLogin) => {
     next()
     if (!isLogin) {